From nobody Fri Nov 22 14:07:22 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 4XvxkR4GWzz5dwfH for ; Fri, 22 Nov 2024 14:07:27 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (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 4XvxkR0dxSz4yyH; Fri, 22 Nov 2024 14:07:27 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x734.google.com with SMTP id af79cd13be357-7b15416303aso131747785a.1; Fri, 22 Nov 2024 06:07:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732284446; x=1732889246; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=CQjMjM56d2tYNCHaPutow6udezjJOixhfiZQ6pjNOSI=; b=Mvryhkw7/TBGH2J/LSoS9RFtWVcazx40FAV7PAxnmiJTJ7u5sNO6y+A7bLeGuwNv6C AyKxLQTHn3wueCcK/yVzSv328+vnid/C5XeZ//ycu/0n07fYkTtVHZGfAEYvADqMDMOW /rKZ8PLsu8MiXf9aq6AlZOhQNM1pMjCuUdztvyQENkuTZ7p/6gSH04obmPm5cPjHWxDE Ecuw+htLejx2ieepo8f1wDAkvFto7sy6PJutYoB9X9HYqnh+88UTqQ1uYvuR2KmuxTMk hBLQmXkYF2N7MPbqIXc4EffKDz/8I+B775dNFxHuWoQzqShE8PR3c5rYL+5tkPVFizPO FHGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732284446; x=1732889246; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CQjMjM56d2tYNCHaPutow6udezjJOixhfiZQ6pjNOSI=; b=Emc/jupx4rxENww6VSW4P7EQ13JcpW3khUyXdmZjXPEnLtb87VHiFNiKywJZ7TJQUE laOkImIAg/slhx4/xvQl5XInYXUyKOrxyzpbBFfh7SbD/KDRiryidQdDI4dGHZPZcnVH BHQdbn+qE39rjg1BNAjXRufW2ai2U8hZlNO5pruxFP0vzyZh0ukcT9kHDWmZC3yt92Ow zsy1w1Trz7pkuOjOhWmaR+3baES56K0ojtbHA3asDEG0KWwv2uR5F1tDVGdUGbVQPa1D lX/zA5f+czEkWzJ16LYfeQb1PfBF3XDAnv1wbJWXOHAofAMMvWAJJuYPHJP4GI2aIQYb 7vrQ== X-Gm-Message-State: AOJu0YwvhIv0tFfQ5A6yUViRbxDPbSoQ/y+U1wGtE3GZ7lfUhU77eW9k ZgilPGtA4c1DO05fKAoZBCZOux78qZStoVXRmkfMTIAfw3rfFiKHQ0rOYQ== X-Gm-Gg: ASbGncvRndUJk+j+W2PP/Zfo5hr/xaMNUV/m5778IHYdgW8nZJoulkXSecILZAwYhk3 g2hNKxuMMauY6YYn/W2gcz0FYIYFXe8fQQSnceuAlvXB9KY/dbKqgf3JlFfCycxt5OPFhRTMKJO W2UGdjds8OBc49XGTwKDZ7wfe3Z4NTIGcbgYFUTBcSgDP+IjmFMOqB/ETtQlG3YzpD9eqsnVt+m n8D/KanBYRcVvlRRuPxRwsk8taXO8yMB42WI4AG77A5KpRa+XsGU6O/d0Ag2Ma9 X-Google-Smtp-Source: AGHT+IGmCrJYo0ycCb/TJewAwnOEA8jsaHNsZE/4W05sui7YMen/oakUIRjZlh0/sVe0dPGklVl3WA== X-Received: by 2002:a05:620a:4548:b0:7b1:4869:38dc with SMTP id af79cd13be357-7b5144e608fmr457164485a.27.1732284445626; Fri, 22 Nov 2024 06:07:25 -0800 (PST) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b514167e42sm88617685a.110.2024.11.22.06.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 06:07:25 -0800 (PST) Date: Fri, 22 Nov 2024 09:07:22 -0500 From: Mark Johnston To: Alan Somers Cc: FreeBSD Hackers Subject: Re: KMSAN and dtrace Message-ID: References: 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XvxkR0dxSz4yyH X-Spamd-Bar: ---- 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=418d8f0dc269b314bba51de63869b20da1d9a76e https://cgit.freebsd.org/src/commit/?id=cc3da1955c16df5eb0019e0fef810696b035b7cf 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=5d12db2dafece9f6a0453c4a45c4abed6b1e15ec 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.