NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/56355: dtrace triggers double-fault in supervisor mode



The following reply was made to PR kern/56355; it has been noted by GNATS.

From: bch <brad.harder%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost, "riastradh%netbsd.org@localhost" <riastradh%netbsd.org@localhost>
Cc: 
Subject: Re: kern/56355: dtrace triggers double-fault in supervisor mode
Date: Tue, 10 Aug 2021 13:26:08 -0700

 --000000000000843d9705c93a506b
 Content-Type: text/plain; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable
 
 On Tue, Aug 10, 2021 at 11:49 bch <brad.harder%gmail.com@localhost> wrote:
 
 >
 >
 > On Tue, Aug 10, 2021 at 00:25 <gnats-admin%netbsd.org@localhost> wrote:
 >
 >> Thank you very much for your problem report.
 >> It has the internal identification `kern/56355'.
 >> The individual assigned to look at your
 >> report is: kern-bug-people.
 >>
 >> >Category:       kern
 >> >Responsible:    kern-bug-people
 >> >Synopsis:       dtrace triggers double-fault in supervisor mode
 >> >Arrival-Date:   Tue Aug 10 07:25:00 +0000 2021
 >>
 >
 
 Updated - move logic to arch-specific (x86) code:
 
 --- a/external/cddl/osnet/dev/fbt/x86/fbt_isa.c Thu Aug 05 09:46:09 2021
 -0700
 +++ b/external/cddl/osnet/dev/fbt/x86/fbt_isa.c Tue Aug 10 12:19:50 2021
 -0700
 @@ -251,8 +251,9 @@
         /*
          * Exclude some more symbols which can be called from probe context=
 .
          */
 -       if (strcmp(name, "x86_curcpu") =3D=3D 0 ||
 -           strcmp(name, "x86_curlwp") =3D=3D 0) {
 +       if (strncmp(name, "x86_curcpu", 10) =3D=3D 0 ||
 +           strncmp(name, "trap", 4) =3D=3D 0 ||
 +           strncmp(name, "x86_curlwp", 10) =3D=3D 0) {
                 return 0;
         }
  #endif
 
 
 
 
 
 > ~50000 probes, and I found one that simply shouldn=E2=80=99t be there. Pr=
 oposed
 > patch after discussion w @riastradh:
 >
 > --- a/external/cddl/osnet/dev/fbt/fbt.c Thu Aug 05 09:46:09 2021 -0700
 > +++ b/external/cddl/osnet/dev/fbt/fbt.c Tue Aug 10 11:39:10 2021 -0700
 > @@ -178,6 +178,7 @@
 >             strncmp(name, "lockdebug_", 10) =3D=3D 0 ||
 >             strncmp(name, "kauth_", 5) =3D=3D 0 ||
 >             strncmp(name, "ktext_write", 11) =3D=3D 0 ||
 > +           strncmp(name, "trap", 4) =3D=3D 0 ||
 >             strncmp(name, "fbt_", 4) =3D=3D 0) {
 >                 return (1);
 >         }
 >
 >
 >
 >
 >
 >
 >>
 
 --000000000000843d9705c93a506b
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable
 
 <div><br></div><div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=
 =3D"gmail_attr">On Tue, Aug 10, 2021 at 11:49 bch &lt;<a href=3D"mailto:bra=
 d.harder%gmail.com@localhost">brad.harder%gmail.com@localhost</a>&gt; wrote:<br></div><blockquo=
 te class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc so=
 lid;padding-left:1ex"><div><br></div><div><br><div class=3D"gmail_quote"></=
 div></div><div><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_a=
 ttr">On Tue, Aug 10, 2021 at 00:25 &lt;<a href=3D"mailto:gnats-admin@netbsd=
 .org" target=3D"_blank">gnats-admin%netbsd.org@localhost</a>&gt; wrote:<br></div><blo=
 ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
 cc solid;padding-left:1ex">Thank you very much for your problem report.<br>
 It has the internal identification `kern/56355&#39;.<br>
 The individual assigned to look at your<br>
 report is: kern-bug-people. <br>
 <br>
 &gt;Category:=C2=A0 =C2=A0 =C2=A0 =C2=A0kern<br>
 &gt;Responsible:=C2=A0 =C2=A0 kern-bug-people<br>
 &gt;Synopsis:=C2=A0 =C2=A0 =C2=A0 =C2=A0dtrace triggers double-fault in sup=
 ervisor mode<br>
 &gt;Arrival-Date:=C2=A0 =C2=A0Tue Aug 10 07:25:00 +0000 2021<br>
 </blockquote><div dir=3D"auto"></div></div></div></blockquote><div dir=3D"a=
 uto"><br></div><div dir=3D"auto"><br></div><div dir=3D"auto">Updated - move=
  logic to arch-specific (x86) code:</div><div dir=3D"auto"><br></div><div d=
 ir=3D"auto"><div dir=3D"auto">--- a/external/cddl/osnet/dev/fbt/x86/fbt_isa=
 .c Thu Aug 05 09:46:09 2021 -0700</div><div dir=3D"auto">+++ b/external/cdd=
 l/osnet/dev/fbt/x86/fbt_isa.c Tue Aug 10 12:19:50 2021 -0700</div><div dir=
 =3D"auto">@@ -251,8 +251,9 @@</div><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0 =
 =C2=A0 /*</div><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* Exclud=
 e some more symbols which can be called from probe context.</div><div dir=
 =3D"auto">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/</div><div dir=3D"auto">- =C2=
 =A0 =C2=A0 =C2=A0 if (strcmp(name, &quot;x86_curcpu&quot;) =3D=3D 0 ||</div=
 ><div dir=3D"auto">- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 strcmp(name, &quot;=
 x86_curlwp&quot;) =3D=3D 0) {</div><div dir=3D"auto">+ =C2=A0 =C2=A0 =C2=A0=
  if (strncmp(name, &quot;x86_curcpu&quot;, 10) =3D=3D 0 ||</div><div dir=3D=
 "auto">+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 strncmp(name, &quot;trap&quot;,=
  4) =3D=3D 0 ||</div><div dir=3D"auto">+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
  strncmp(name, &quot;x86_curlwp&quot;, 10) =3D=3D 0) {</div><div dir=3D"aut=
 o">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return 0;</div><=
 div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0 =C2=A0 }</div><div dir=3D"auto">=C2=
 =A0#endif</div><div dir=3D"auto"><br></div></div><div dir=3D"auto"><br></di=
 v><div dir=3D"auto"><br></div><div dir=3D"auto"><br></div><blockquote class=
 =3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
 ing-left:1ex"><div><div class=3D"gmail_quote"><div dir=3D"auto"><br></div><=
 /div></div><div><div class=3D"gmail_quote"><div dir=3D"auto">~50000 probes,=
  and I found one that simply shouldn=E2=80=99t be there. Proposed patch aft=
 er discussion w @riastradh:</div><div dir=3D"auto"><br></div><div dir=3D"au=
 to"><div dir=3D"auto">--- a/external/cddl/osnet/dev/fbt/fbt.c Thu Aug 05 09=
 :46:09 2021 -0700</div><div dir=3D"auto">+++ b/external/cddl/osnet/dev/fbt/=
 fbt.c Tue Aug 10 11:39:10 2021 -0700</div><div dir=3D"auto">@@ -178,6 +178,=
 7 @@</div><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 strnc=
 mp(name, &quot;lockdebug_&quot;, 10) =3D=3D 0 ||</div><div dir=3D"auto">=C2=
 =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 strncmp(name, &quot;kauth_&quot;, 5)=
  =3D=3D 0 ||</div><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
 =A0 strncmp(name, &quot;ktext_write&quot;, 11) =3D=3D 0 ||</div><div dir=3D=
 "auto">+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 strncmp(name, &quot;trap&quot;,=
  4) =3D=3D 0 ||</div><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
 =C2=A0 strncmp(name, &quot;fbt_&quot;, 4) =3D=3D 0) {</div><div dir=3D"auto=
 ">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return (1);</div>=
 <div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0 =C2=A0 }</div><div dir=3D"auto"><br>=
 </div></div><div dir=3D"auto"><br></div><div dir=3D"auto"><br></div><div di=
 r=3D"auto"><br></div><div dir=3D"auto"><br></div><blockquote class=3D"gmail=
 _quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:=
 1ex"><br>
 </blockquote></div></div>
 </blockquote></div></div>
 
 --000000000000843d9705c93a506b--
 


Home | Main Index | Thread Index | Old Index