From nobody Fri Nov 22 14:47:07 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvycV6wCsz5dyZ0 for ; Fri, 22 Nov 2024 14:47:22 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvycV58Pxz53vn; Fri, 22 Nov 2024 14:47:22 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2fb5111747cso26231851fa.2; Fri, 22 Nov 2024 06:47:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732286839; x=1732891639; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/HCnjs8Upr9mwDh9gNr4xIEOiAOnRzxkxRq6EmxX8sU=; b=oj1QnBhYZJVbj9CHAqrbuGEdAIkGg1Km6MSuZeW1kv/WpqD0UXgaPe5HIcb7L0r7TO 3oOpVOJAOvTX5+T2G/SJJORhq2peJmCh0ljCiQMOFH1krdVecE/doPyW0L1p8vNt/bPD K6wiOmewJSg/uZmJuA23XpJ5I551O8sptgUnij6qbs1RhczEnmRQ6yVO2y2fkgDOwZ0S iI7c2+yrl2bI7qiH0urzxYgo/OCdpyDFHrQ9ZT9840WUQdFKlc2Xf968e3FeVAKfg2E9 STLqSLlY2rwhKk83MiS0pjpKOQ2gA/fEf0JbmAh/NsTf1TwfmdzhLIfZFJJvUPwhZych n3Lg== X-Gm-Message-State: AOJu0Yx9dwMjhX2OE+EL5D8F7jtY1EVBTYnzrEPjdooETzwtBzwFaOOL qHNye/4ObpA80qRq/tDkRlweQDAmHy66N4HHiUrPxslhfQh250oAWJ6HbuHTO8af7CVrZw63NAA TeAFFAOf563r/JRHH7FMMqht5Wm+0yg== X-Gm-Gg: ASbGncvR3TMvStqi8gNCS2owfCbAKIYb4TBDSNoU95Kc33fYlkuxc2yTQ+YMp03JNM6 JysmfnkrOatEl0evLIrK3VEqyVv7ReoA= X-Google-Smtp-Source: AGHT+IHuA+tUGmJDp5EvtVJPeVkhglidfy2r9RTjtpsLMm4KVm25od+CHzLuxmGxLBI6Ac13/wwBpNE6HKt8P7McAPA= X-Received: by 2002:a05:651c:b08:b0:2fa:c59d:1af3 with SMTP id 38308e7fff4ca-2ffa712abfbmr18937301fa.20.1732286839195; Fri, 22 Nov 2024 06:47:19 -0800 (PST) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Fri, 22 Nov 2024 07:47:07 -0700 Message-ID: Subject: Re: KMSAN and dtrace To: Mark Johnston Cc: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4XvycV58Pxz53vn X-Spamd-Bar: ---- On Fri, Nov 22, 2024 at 7:07=E2=80=AFAM Mark Johnston 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.