Date: Fri, 22 Nov 2024 07:47:07 -0700 From: Alan Somers <asomers@freebsd.org> To: Mark Johnston <markj@freebsd.org> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: KMSAN and dtrace Message-ID: <CAOtMX2iPntWUBv=q_Udr7ShLgYpHYW74Qc_p6%2BZw-AtfsUdK3w@mail.gmail.com> In-Reply-To: <Z0CQGsUOHbpifvOp@nuc> References: <CAOtMX2i46vwjUD5=fJHe_PZM=ucw8HD9jZQfHvjcYqR1XF7p_A@mail.gmail.com> <Z0CQGsUOHbpifvOp@nuc>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 22, 2024 at 7:07=E2=80=AFAM Mark Johnston <markj@freebsd.org> w= rote: > > On Thu, Nov 21, 2024 at 04:06:53PM -0700, Alan Somers wrote: > > Would it be possible to make dtrace with with KMSAN? It would > > certainly make my life easier. As it is, every time I try to kldload > > traceall, whether from the command line or in the loader, my VM > > infinite loops printing alerts like this: > > > > MSan: Uninitialized stack memory from isize64+0x2e > > #0 0xffffffff833d8f10 at __msan_warning+0x140 > > #1 0xffffffff86ec9c03 at dtrace_disp_opnd+0xd3 > > #2 0xffffffff86ebe552 at dtrace_disx86+0xc602 > > #3 0xffffffff86eca98e at dtrace_instr_size+0xee > > #4 0xffffffff86d5ec27 at fbt_provide_module_function+0x957 > > #5 0xffffffff83303eff at link_elf_each_function_nameval+0x56f > > #6 0xffffffff86d56cb3 at fbt_provide_module+0x423 > > #7 0xffffffff86d56871 at fbt_linker_file_cb+0x41 > > #8 0xffffffff830d9f5c at linker_file_foreach+0xdc > > #9 0xffffffff830d63dd at linker_load_module+0x413d > > #10 0xffffffff830e6116 at linker_load_dependencies+0x1136 > > #11 0xffffffff853b70b8 at link_elf_load_file+0x65c8 > > #12 0xffffffff830d542e at linker_load_module+0x318e > > #13 0xffffffff830e0611 at kern_kldload+0x5d1 > > #14 0xffffffff830e0d74 at sys_kldload+0x1a4 > > #15 0xffffffff84fe56f6 at amd64_syscall+0x706 > > #16 0xffffffff84f0ef4b at fast_syscall_common+0xf8 > > > > Here you go: > > https://cgit.freebsd.org/src/commit/?id=3D418d8f0dc269b314bba51de63869b20= da1d9a76e > https://cgit.freebsd.org/src/commit/?id=3Dcc3da1955c16df5eb0019e0fef81069= 6b035b7cf > > This one might also be important if your test system is low on RAM, > since the KMSAN shadow map gobbles up quite a lot of memory: > > https://cgit.freebsd.org/src/commit/?id=3D5d12db2dafece9f6a0453c4a45c4abe= d6b1e15ec > > I haven't yet tried running through the full test suite, but this was > enough to load dtracell (quite slow under KMSAN) and run some simple > scripts. Wow, thanks! I'll try it out later today.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2iPntWUBv=q_Udr7ShLgYpHYW74Qc_p6%2BZw-AtfsUdK3w>