From nobody Wed Nov 20 04:43: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 4XtTJf1ZJ5z5dBy9 for ; Wed, 20 Nov 2024 04:43:30 +0000 (UTC) (envelope-from pat@patmaddox.com) Received: from fhigh-a5-smtp.messagingengine.com (fhigh-a5-smtp.messagingengine.com [103.168.172.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtTJd2SCqz4D1C; Wed, 20 Nov 2024 04:43:28 +0000 (UTC) (envelope-from pat@patmaddox.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=patmaddox.com header.s=fm2 header.b=RMQow0b7; dkim=pass header.d=messagingengine.com header.s=fm3 header.b="Srqj3z/b"; spf=pass (mx1.freebsd.org: domain of pat@patmaddox.com designates 103.168.172.156 as permitted sender) smtp.mailfrom=pat@patmaddox.com; dmarc=none Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 637CB11401C7; Tue, 19 Nov 2024 23:43:28 -0500 (EST) Received: from phl-imap-01 ([10.202.2.91]) by phl-compute-01.internal (MEProxy); Tue, 19 Nov 2024 23:43:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=patmaddox.com; h=cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :subject:subject:to:to; s=fm2; t=1732077808; x=1732164208; bh=MX 6kn7+G9pPQ9O02Vvbmq5XUOCHMmuTAHPkIe4rEYFo=; b=RMQow0b79CedNq7Ndj gc50nlZLsjmICgTXl18odURhIwSkGh4CI8c9dPWJbtZKqFLwhHIkLuf7P0KWq7KK rWyd1ETa9+Z2V396KFpvCHl3UWNhU0KpNPzH91WNtPaUCt5QIJWrcYjP5rqreFqq PW0649in67+83+gzcBVqefj7X4u/KOMOs4u+mP349prnfqNzQ+M+nrVUocYnZ9JQ +H74vhNDCKOIH9KTCdaNA7gpDvmeL/830LMDvzXV3DVBOe+A8k0Gt4LOREoFmo75 Xq56Ppo+7Q4AyAlOhJd/83h30vgY9ESZprc4GPYdcA1Mzc7QdXzy7TwKPrpafqtV osJQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1732077808; x=1732164208; bh=MX6kn7+G9pPQ9O02Vvbmq5XUOCHMmuTAHPk Ie4rEYFo=; b=Srqj3z/bP91vY/QzsXw5NZeq9oesCq2j+ktfR2pGIYPlIplq5nR S+KYzcj0X1CCTTfA362EM7zHK8ojntul7CWk94jAyBLMNdTEVx3HSLeTvRXDbOPB Z8pyw4nQa1nrVGQ9kQY9COLJ4V6VTytFBw26ascSEWPbabwGKR5lTeJ5m4mJnwUp 9v/zXZCBcmIlFVtENuAccwKzbHEDYikI15rjDgvbJN9dlBF0Mwg1pa/Dp1580oYx 8/auRhNAk2HolpMDat6E3QrxumTvNl3ITvgEQS/JwSVASTs1fA4yskMxiocopAlQ 6sUfsFtqwvZwSxQm1JsGPDNUNv9mjH+qZyw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfeefgdejvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepofggfffhvf fkufgtgfesthejredtredttdenucfhrhhomhepfdfrrghtucforgguughogidfuceophgr thesphgrthhmrgguughogidrtghomheqnecuggftrfgrthhtvghrnhepjefffeevtedvvd duvedujedtheffuedvlefgtdehuedtkeegffevgfejhfffgeelnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgrthesphgrthhmrgguughogi drtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthht ohepfhhrvggvsghsugdqhhgrtghkvghrshesfhhrvggvsghsugdrohhrghdprhgtphhtth hopehmrghrkhhjsehfrhgvvggsshgurdhorhhg X-ME-Proxy: Feedback-ID: i8b6c40f9:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 0A3FE3360079; Tue, 19 Nov 2024 23:43:28 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface 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 Date: Tue, 19 Nov 2024 20:43:07 -0800 From: "Pat Maddox" To: freebsd-hackers@freebsd.org Message-Id: Subject: A proposal for makefs -t zfs to support more zpool layouts Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-3.58 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.992]; R_DKIM_ALLOW(-0.20)[patmaddox.com:s=fm2,messagingengine.com:s=fm3]; R_SPF_ALLOW(-0.20)[+ip4:103.168.172.128/27]; RCVD_IN_DNSWL_LOW(-0.10)[103.168.172.156:from]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[pat]; ASN(0.00)[asn:209242, ipnet:103.168.172.0/24, country:US]; DWL_DNSWL_NONE(0.00)[messagingengine.com:dkim]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[103.168.172.156:from]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[patmaddox.com]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[patmaddox.com:+,messagingengine.com:+] X-Rspamd-Queue-Id: 4XtTJd2SCqz4D1C X-Spamd-Bar: --- Here's a valid zpool configuration that makefs -t zfs does not currently support: truncate -s 100m file.zfs zpool create -m none my-test-pool $(realpath)/file.zfs zfs create -o mountpoint=/dataset1 my-test-pool/dataset1 zfs create -o mountpoint=/foo/dataset2 my-test-pool/dataset2 zfs list -r my-test-pool NAME USED AVAIL REFER MOUNTPOINT my-test-pool 218K 39.8M 24K none my-test-pool/dataset1 24K 39.8M 24K /dataset1 my-test-pool/dataset2 24K 39.8M 24K /foo/dataset2 makefs has a few constraints that prevent this: - there must be a dataset with a mountpoint matching the rootpath - all mountpoints must descend from the root path - root path must not be canmount=off My assertion: makefs -t zfs should, as much as possible, be able to create zpool configurations equivalent to those produced by a series of zpool/zfs commands. 1. What are your thoughts on that as a worthwhile direction for makefs? 2. What obstacles do you see in terms of getting there? I am interested in implementing these changes, and invite all ideas and feedback before proceeding. Thanks, Pat From nobody Thu Nov 21 23:06:53 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 4XvYlb4yXmz5djsF for ; Thu, 21 Nov 2024 23:07:07 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (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 4XvYlZ6fCRz4Mb5 for ; Thu, 21 Nov 2024 23:07:06 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.208.47 as permitted sender) smtp.mailfrom=asomers@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none) Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5d0102fc7beso1209514a12.0 for ; Thu, 21 Nov 2024 15:07:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732230425; x=1732835225; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hf/QVpy1bW+JUfeB/enAiKfm/gt1J+LD/X+MK4Ne30s=; b=sBTZjqyJzoLCEP774yKW8G0XYBjP82L/CO3L1KbtncGrh5VOyRAd7JOqRSfHuvJEzP PY2aKmrQzkwH43egV97sN5TZGHq6cL0e0CFJHTL3KFI5hy1RV6uFYEz7SbzvMvQZTySQ Yq36+ivsTNinzmxycf8ZOZeCb9VrU/LWQQzUI8YwREhBhjQEqalZHh9lMC7CkWZZ813N jD3/5H+iceaoETUW9ss/NoSmHJLomMM5HoGHmULrptJ4uXTiSggIol7bLaenzHeXLcXy +5mVFeTTarDho7hxGKqIEHbKhVWVm7c31nMKVDImEqr9KasECO28osgOC0fOalTTV9IR DxjQ== X-Gm-Message-State: AOJu0YwoQRPeYhnNqanaGPPz7yo/CUrOqVKKMj8S4VXDYi8FQMyG4ZEm gUUf5BQa4CSJG+p5fQ+7Cv7tNnyS7o6FELopfV3TpkHsDyUCPSFZ/aEbVs7uzbSUOm5P3UI9+G9 M0uqPMwU7XLQFMhtOfJCYkJGK/9z6TXDb X-Gm-Gg: ASbGnctxf/IWsS6DS+R0W35ejbFVgwoYSkxIfsAB/B+UODXxXfAHYLYg+lPHHXFTLM9 LAf3fm+YE/oVI8K/fcPNRUoMKPfxo3XQ= X-Google-Smtp-Source: AGHT+IFF7ruwhFhXar4BZb1j5nNdGlPOS1kCblHx+TtXJZ2jMk3YkBrjqnb37McpdgfZP3KBeVIQd2YFVxMZ0dzFlFc= X-Received: by 2002:a05:6402:3788:b0:5cf:8dc1:9406 with SMTP id 4fb4d7f45d1cf-5d020641201mr328254a12.20.1732230424631; Thu, 21 Nov 2024 15:07:04 -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 From: Alan Somers Date: Thu, 21 Nov 2024 16:06:53 -0700 Message-ID: Subject: KMSAN and dtrace To: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [0.34 / 15.00]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; NEURAL_HAM_LONG(-0.88)[-0.878]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_SPAM_SHORT(0.12)[0.122]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.47:from]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; MISSING_XM_UA(0.00)[]; R_DKIM_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.47:from]; TO_DOM_EQ_FROM_DOM(0.00)[]; FREEFALL_USER(0.00)[asomers]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_HAS_DN(0.00)[] X-Rspamd-Queue-Id: 4XvYlZ6fCRz4Mb5 X-Spamd-Bar: / 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 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. 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. From nobody Fri Nov 22 20:49:37 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 4Xw6gD5Nlmz5dMXr; Fri, 22 Nov 2024 20:50:16 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (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 4Xw6gC6Zt0z4X6N; Fri, 22 Nov 2024 20:50:15 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=U9CEgz25; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2607:f8b0:4864:20::62a as permitted sender) smtp.mailfrom=marietto2008@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-21285c1b196so25984725ad.3; Fri, 22 Nov 2024 12:50:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732308614; x=1732913414; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Y0Rz76Loymxk49BDVLfA7QTEhqZes1A2e/7+EsTJbI0=; b=U9CEgz256sQ3f6mq4cycgOfezGixSN6qmwe3MPDyzJCPo5oAUGVhrmyrEziczyaBrT 47zSHULU9mIEZ563q3pvHASzN29XAhT0PgHR89MPdj17aeCMgVrf/WUZ1qyqRE//2ZE2 fvxujykuhuYu0UmX1nVFd8/I6v6FUpSpeZLAq6fzYV1UlVeadp5cWaK8KnL735QEN21W sS3GXAXl4bEU6sONQ0DbyNcLuJExcWG8Ej85tgtcaNrnlv7SBDxO3c46PAVYYHadOhbB tZcLnJNvEjtSzJmy35vt09+nr9gVJzfBMR+rUESY8xnZ7h8aTgBpnZkLH5PaDI+DYm8R lVMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732308614; x=1732913414; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Y0Rz76Loymxk49BDVLfA7QTEhqZes1A2e/7+EsTJbI0=; b=fzcO4PYsB/jBSSwgu51y7MJMs9ExaslLQJfln7sbGueQlUG8kOxjBEuxhtPI8wIFd1 /tpxiy9owDyYRiRbuRwQfa1SKFUOwP/L+uVByPyf2Hdt1uObocYGFblX45WhmzoZkmwB dtI+X9nJ1iV+7bVqWGRh7//QGseworF0M2eI2iG7hJVSDtSFuth52BQZFNdJWtYx6vBv B4erXmeRorufEB+HoJnXFoUiCqU6KloaU4gLNw0gKyM21Piy18iCt1zwrNUn8VKDwqzv YoZFqjdx3SVMhVQY9dO0AepFr11lrP6zvTTYxbcy2USXBp26LYENHq4g34p4xiSZf4XG /j+g== X-Forwarded-Encrypted: i=1; AJvYcCW2qR3cuWEv3/fyZLgxDJtt0OFyrM33mfTeUUcTMLYww396TMkg30FvM3SqOqmWbiIwhiBAvkX8Fk7iRhCH6minmB31qP4XrA==@freebsd.org, AJvYcCX1PUF856Kh9mWBZmz7y9Z92ttbRH3EuYwWYSz35MOCAwEkbg9TxqyNAdVzRTvmRqsmboHtw0b/ToeFq+4yIIg=@freebsd.org X-Gm-Message-State: AOJu0YxRqR+MXvPSJfM0ekxcSb+zppyaElNPnW9Ak0iWMAbsm5T3YgI5 dre0rgdm/C7vlHZBthUlWt8wpMl8BKvXFVksCpr3GUoZNhmGUM0+IBJtbXkwTUUFUMQXPvnTzFN FJoYFwbIt+BWOOOwhMDv/wmXyVOSnqc7WET4= X-Gm-Gg: ASbGncuNbZ8MPZGgIi5o9zPzfv+iUQajVDopBzSkyVcrc3JpZwfroMFQXVQsA4HnoiG 8QyUdLXj3QC+dzlRK38Y/ouROshQRbBs= X-Google-Smtp-Source: AGHT+IGvbQuE1vVYCBY4nRjdLVyapQNV3kl2ige2GZooe2potgLBnletS8GDJehWJlqIerHbIjWoiD//HcVRFyBkjXM= X-Received: by 2002:a17:902:ea10:b0:20c:d469:ba95 with SMTP id d9443c01a7336-2129f67ae5dmr46596255ad.16.1732308613854; Fri, 22 Nov 2024 12:50:13 -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 From: Mario Marietto Date: Fri, 22 Nov 2024 21:49:37 +0100 Message-ID: Subject: ADB server does not ACK if it is launched inside Linux chrooted / jailed / emulated with the Linuxulator To: FreeBSD Mailing List , freebsd-hackers , FreeBSD virtualization Content-Type: multipart/alternative; boundary="00000000000091fd6a0627868760" X-Spamd-Result: default: False [-2.85 / 15.00]; HTTP_TO_IP(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.85)[-0.849]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROMTLD(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org,freebsd-hackers@freebsd.org,freebsd-virtualization@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::62a:from]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4Xw6gC6Zt0z4X6N X-Spamd-Bar: -- --00000000000091fd6a0627868760 Content-Type: text/plain; charset="UTF-8" Hello. I'm trying to connect to my mobile phone using adb over wifi using the Linuxulator because I want to install a specific java application that requires Linux to work. I have already used Linux virtualized with bhyve and it worked. But I prefer to save some memory by trying to use the Linuxulator instead of starting a vm,if possible. I've already tried to run the app using java installed natively on FreeBSD,but it fails because it wasn't designed for this. So : [root@noble /]==> adb connect 192.168.1.2:5555 * daemon not running. starting it now on port 5037 * cannot bind 'tcp:5037' ADB server didn't ACK * failed to start daemon * error: cannot connect to daemon that's the error that I get. I'm not sure if I can use some trick or if there is anything that I can do because the Linuxulator does not support that in any way. Instead,if I launch it directly in FreeBSD,it works : [root@marietto /home/marietto]==> adb connect 192.168.1.2:5555 * daemon not running; starting now at tcp:5037 * daemon started successfully connected to 192.168.1.2:5555 The problem is that the java app does not recognizes that the adb server is working : [root@noble /home/marietto/Desktop/Files/OS/Linux/Tools/DeskDockServer_1.3.0]==> java -jar DeskDockServer_1.3.0.jar Program: DeskDockServer 1.3.0 System: Linux 5.15.0, amd64 JRE: 21.0.5+11-Ubuntu-1ubuntu124.04 AdbLocator: Found ADB in env PATH class com.floriandraschbacher.deskdockserver.Main: Using ADB from /usr/bin/adb ab@3f95b479: Error getting devices: ADB server didn't ACK q$b@31524dfb: Error getting ADB devices: java.io.IOException: java.io.IOException: ADB server didn't ACK but it is working : [root@noble /home/marietto/Desktop/Files/OS/Linux/Tools/DeskDockServer_1.3.0]==> ps ax PID TTY STAT TIME COMMAND 6089 pts/0 R+ 0:00 ps ax 5979 pts/0 S 0:00 adb -P 5037 fork-server server 5952 pts/0 S 0:00 /bin/zsh According with this thread : https://forums.freebsd.org/threads/make-jail-available-to-bind-only-certain-ports.85609/ I want to create a Jail with a public IP address. But as we have an IPv4 address shortage. I want to only make the jail able to bind to a range of ports (say 700 to 750). I asked in the IRC and one answer was to use pf to NAT ports from/to the jail. this is what I tried to do : nano /etc/pf.conf nat on $ext_if from 127.0.0.0/24 to any -> 192.168.1.2 rdr on $ext_if proto tcp from any to any port 5037:5555 -> 127.0.0.255 root@noble:/home/marietto/Desktop/Files/OS/Linux/Tools/DeskDockServer_1.3.0# ./adb connect * daemon not running. starting it now on port 5037 * * daemon started successfully * ** daemon still not running error: cannot connect to daemon root@noble:/home/marietto/Desktop/Files/OS/Linux/Tools/DeskDockServer_1.3.0# ps ax PID TTY STAT TIME COMMAND 8759 pts/2 R+ 0:00 ps ax 8758 pts/2 S 0:00 adb -P 5037 fork-server server 8739 pts/2 S 0:00 /bin/bash but it didn't work : root@noble:/home/marietto/Desktop/Files/OS/Linux/Tools/DeskDockServer_1.3.0# java -jar DeskDockServer_1.3.0.jar 2024-11-22 17:33:02.348 Program: DeskDockServer 1.3.0 2024-11-22 17:33:02.348 System: Linux 5.15.0, amd64 2024-11-22 17:33:02.348 JRE: 21.0.5+11-Ubuntu-1ubuntu124.04 2024-11-22 17:33:02.469 AdbLocator: Found ADB in env PATH 2024-11-22 17:33:02.469 class com.floriandraschbacher.deskdockserver.Main: Using ADB from /usr/bin/adb 2024-11-22 17:33:02.508 ab@c703a44: Error getting devices: ADB server didn't ACK 2024-11-22 17:33:02.508 q$b@2b7d5ba: Error getting ADB devices: java.io.IOException: java.io.IOException: ADB server didn't ACK127.0.0.255192.168.1.2:5555 -- Mario. --00000000000091fd6a0627868760 Content-Type: text/html; charset="UTF-8"

Hello.

I'm trying to connect to my mobile phone using adb over wifi using the Linuxulator because I want to install a specific java application that requires Linux to work. I have already used Linux virtualized with bhyve and it worked. But I prefer to save some memory by trying to use the Linuxulator instead of starting a vm,if possible. I've already tried to run the app using java installed natively on FreeBSD,but it fails because it wasn't designed for this. So :

[root@noble /]==> adb connect 192.168.1.2:5555

* daemon not running. starting it now on port 5037 *
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon

that's the error that I get. I'm not sure if I can use some trick or if there is anything that I can do because the Linuxulator does not support that in any way. Instead,if I launch it directly in FreeBSD,it works :

[root@marietto /home/marietto]==> adb connect 192.168.1.2:5555

* daemon not running; starting now at tcp:5037
* daemon started successfully
connected to 192.168.1.2:5555

The problem is that the java app does not recognizes that the adb server is working :

[root@noble /home/marietto/Desktop/Files/OS/Linux/Tools/DeskDockServer_1.3.0]==> java -jar DeskDockServer_1.3.0.jar

Program: DeskDockServer 1.3.0
System: Linux 5.15.0, amd64
JRE: 21.0.5+11-Ubuntu-1ubuntu124.04
AdbLocator: Found ADB in env PATH
class com.floriandraschbacher.deskdockserver.Main: 
Using ADB from /usr/bin/adb
ab@3f95b479: Error getting devices: 
ADB server didn't ACK
q$b@31524dfb: Error getting ADB devices: 
java.io.IOException: java.io.IOException: 
ADB server didn't ACK

but it is working :

[root@noble /home/marietto/Desktop/Files/OS/Linux/Tools/DeskDockServer_1.3.0]==> ps ax
      
  PID TTY      STAT   TIME COMMAND
 6089 pts/0    R+     0:00 ps ax
 5979 pts/0    S      0:00 adb -P 5037 fork-server server
 5952 pts/0    S      0:00 /bin/zsh

According with this thread :

https://forums.freebsd.org/threads/make-jail-available-to-bind-only-certain-ports.85609/

I want to create a Jail with a public IP address. But as we have an IPv4 address shortage. I want to only make the jail able to bind to a range of ports (say 700 to 750). I asked in the IRC and one answer was to use pf to NAT ports from/to the jail.

this is what I tried to do :

nano /etc/pf.conf

nat on $ext_if from 127.0.0.0/24 to any -> 192.168.1.2
rdr on $ext_if proto tcp from any to any port 5037:5555 -> 127.0.0.255

root@noble:/home/marietto/Desktop/Files/OS/Linux/Tools/DeskDockServer_1.3.0# ./adb connect 

* daemon not running. starting it now on port 5037 *
* daemon started successfully *
** daemon still not running
error: cannot connect to daemon

root@noble:/home/marietto/Desktop/Files/OS/Linux/Tools/DeskDockServer_1.3.0# ps ax

  PID TTY      STAT   TIME COMMAND
 8759 pts/2    R+     0:00 ps ax
 8758 pts/2    S      0:00 adb -P 5037 fork-server server
 8739 pts/2    S      0:00 /bin/bash

but it didn't work :

root@noble:/home/marietto/Desktop/Files/OS/Linux/Tools/DeskDockServer_1.3.0# java -jar DeskDockServer_1.3.0.jar 

2024-11-22 17:33:02.348   Program: DeskDockServer 1.3.0
2024-11-22 17:33:02.348   System: Linux 5.15.0, amd64
2024-11-22 17:33:02.348   JRE: 21.0.5+11-Ubuntu-1ubuntu124.04
2024-11-22 17:33:02.469   AdbLocator: Found ADB in env PATH
2024-11-22 17:33:02.469   class com.floriandraschbacher.deskdockserver.Main: Using ADB from /usr/bin/adb
2024-11-22 17:33:02.508   ab@c703a44: Error getting devices: ADB server didn't ACK
2024-11-22 17:33:02.508   q$b@2b7d5ba: Error getting ADB devices: java.io.IOException: java.io.IOException: 
ADB server didn't ACK127.0.0.255192.168.1.2:5555
--
Mario.
--00000000000091fd6a0627868760-- From nobody Fri Nov 22 20:58:39 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 4Xw6sB5PCXz5dMX0 for ; Fri, 22 Nov 2024 20:58:54 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (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 4Xw6sB3gC8z4ZbZ; Fri, 22 Nov 2024 20:58:54 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5cfe5da1251so3091808a12.1; Fri, 22 Nov 2024 12:58:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732309131; x=1732913931; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=shChSQucrtkvr+pbrOhSvWqz8sdtoH+lOOerT9sR3mc=; b=D7ILAa9RTo09G+ozR9njij2736HP3b+07H12mK81+IqUb/1ZMwiHnzpfRJ8yLnxNdN bGSekNudlZ7+eU6LvVRekkpg/xwLcMgSmyU5JvhPyBfl1XXcK/+4J9bcp6uZvCcli5bK Ue6aOKQIl8l20r6iuIlPOGlTvgReyrNzh52swLeWmAsSoR67gpAWgJJxXUmQ6FEiAJn/ 3OhryBzscl5ESzXYL7Ur0NK12guebxVhGGcOtNTqiNbFblO5fT9/aWilF9kDQjM7xcWy h/UzmgiCTdlHaRobpykwAjO94VQTsuhj7qo0gRLn03NjmcRk6L2BptZ4/ePSzAhty+wK wEVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732309131; x=1732913931; 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=shChSQucrtkvr+pbrOhSvWqz8sdtoH+lOOerT9sR3mc=; b=t8YHGWkaBNSTX1TiSlZLEFSprSxJ+llhvam8LY1VWjBeOmNxgrCShZqDnv6r+mefs2 R3c6MX4v3Z3VYysFC4HXmtgcR8sHwTzH66EpaFlMA82oXwiFSDT/78k/grSTBUBPyTrP J1cU9tpqpNxmDAlKOBf740kR4+wVnwv7dFXTM5UDpVTTSWOFSA3Rt/NIMQuHA+Qhk9xr uWbJOAf7lRgDvSe7JPDtKQ91b297A05eBvq1b8HG0sjrNme8ZnT3Ve2hmOmj9kYX0cYL 0HOuOaSKfYwchvORiODr4OyHMTDL5kiLUdiKgJ8nktoB5YRD6phURBg5Q6oMyvX3FiwR LtXg== X-Forwarded-Encrypted: i=1; AJvYcCWxmacb6AkXG4fzv+vuqUwlj1hsFDGjueP05u6foI1IE8vJn617+yRlPeKrXjdJ4Z0Yol238Eo07lq4dQi1cCA=@freebsd.org X-Gm-Message-State: AOJu0YwMa2GR/NegfN2DHHyu/KpefIHzKePt0OfobuPpTGFo1E5dJt3c 5f4kT4nMgDX24Y+uPZAnmxduXQW/KDFYl4SVbX/6aXTPfm4v2gUna/t/5ikiD9eSHvb8YGMYhMb WufMzQoQE76N4H7GZDZGKrCJmpkSLZl5h X-Gm-Gg: ASbGncufvH5lyKDNi2ia3/O7DBieab+3FfMbi501PPoEcDtZLHumpC4RVCT1GESG6OC bSVuejt1B1gCWYPdXMNC4GeryqkeeurA= X-Google-Smtp-Source: AGHT+IEP0Ha9bf9dOEiceSRSym4emaxORoLWNoiLuUfMvHnDauYqca2/kZKBMWQKjolMP/xm61X/ntFfe9Go8iUqPPA= X-Received: by 2002:a05:6402:42cb:b0:5cf:cfa8:d6bd with SMTP id 4fb4d7f45d1cf-5d0207995b0mr3629810a12.25.1732309131384; Fri, 22 Nov 2024 12:58:51 -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 13:58:39 -0700 Message-ID: Subject: Re: KMSAN and dtrace To: Alan Somers Cc: Mark Johnston , 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:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4Xw6sB3gC8z4ZbZ X-Spamd-Bar: ---- On Fri, Nov 22, 2024 at 7:47=E2=80=AFAM Alan Somers w= rote: > > On Fri, Nov 22, 2024 at 7:07=E2=80=AFAM Mark Johnston = wrote: > > > > 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=3D418d8f0dc269b314bba51de63869b= 20da1d9a76e > > https://cgit.freebsd.org/src/commit/?id=3Dcc3da1955c16df5eb0019e0fef810= 696b035b7cf > > > > 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=3D5d12db2dafece9f6a0453c4a45c4a= bed6b1e15ec > > > > 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. It works now. I can load the module and do some probes. Other probes, though, still trigger warnings. For instance, 'fbt:zfs:zio_data_buf_alloc:entry {@z[stack()] =3D count();}' triggers warnings like this: MSan: Uninitialized stack memory in copyout():arg1, offset 24/368, addr 0xfffffe00b68ae018, from w_stillcold+0x28 #0 0xffffffff8340009c at kmsan_report_hook+0x15c #1 0xffffffff833dbc61 at kmsan_copyout+0x1f1 #2 0xffffffff87e800f0 at dtrace_ioctl+0x4420 #3 0xffffffff8297795f at devfs_ioctl+0x3ef #4 0xffffffff8547c277 at VOP_IOCTL_APV+0x107 #5 0xffffffff8381f974 at vn_ioctl+0x7a4 #6 0xffffffff8297a0f6 at devfs_ioctl_f+0x186 #7 0xffffffff834f3c2b at kern_ioctl+0xc5b #8 0xffffffff834f2dc0 at sys_ioctl+0x580 #9 0xffffffff84fe7836 at amd64_syscall+0x706 #10 0xffffffff84f1128b at fast_syscall_common+0xf8 From nobody Sat Nov 23 02:37:32 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 4XwGN11Q9pz5dmMx for ; Sat, 23 Nov 2024 02:37:37 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) (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 4XwGN05hXVz46Vx; Sat, 23 Nov 2024 02:37:36 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-xf32.google.com with SMTP id 6a1803df08f44-6d40d77aa97so19094416d6.1; Fri, 22 Nov 2024 18:37:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732329456; x=1732934256; darn=freebsd.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=o1rup4zbYwtH6MgmiQvQMbOwumWdkYEVZAJxhiN6cVQ=; b=jq/CAOvGPw029i6SD5vFpvpqT5jlEcXsmZ85c57tMy/pgGTpxumJQzWIc3WmR7KTqv ua6QET6Me0SNkQzd4uN0Exg+m05wksLbAkrrvQgE0B2pC2dg5Mcl1VIpHdIAoujOMBHo p8gj/WKCDluy4EnIUC0xmf0mfqJinvgkCOQnLqsvdBdSfMFwrOkxU42bhiiFb9gGUxor 5grAYSHM/5MtTJtcC0FBLEydFRIsUKyfkj4ZKtBMgMv6663ufsEsKVBZW7um1fCsBuxb ZXEXoW/aM5MM9eR4M6xVSqKX2xuYwfk2OhkebeJDqBc9K8OCPGcb1uxNoFwU8+yMWr2w K7eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732329456; x=1732934256; h=in-reply-to:content-transfer-encoding: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=o1rup4zbYwtH6MgmiQvQMbOwumWdkYEVZAJxhiN6cVQ=; b=NxhD+YG4xkc5GxmMfuSthQdNLGPvLOMdKonzNZ8AoIEaPhz4NK0dIr9E9Zauo9snp7 c5L8ZnILgIRRFnXQ2b9MqX1swfMEo5VOKIz8mcbOiLI5xl7fzvsZkDeXncRM0lK+++Sd i0OyYTcOstZwQvoPlwZEWTPN1s3ZIWcoxEphcqIiAZ/PRg3hLYXel0AqY2wtBE13Hs5c Wz86+T0C/aPwwbN3wbZoWRxF8agdWbE60lIDIYSXES9UxdHZc6UDlVQRQC3mqbRpmdHh nap94aMCX1RoNpHd32LsJ3HEL9Q+pc1irFZYtIs4ddbsKAbAcnj2KU2RQXzStmz038qu tAGQ== X-Forwarded-Encrypted: i=1; AJvYcCXJCVSqfNthKlfuafLsKzXMeVuSG6qzMhePBB+AsusRqoL2dXHrNU9sO8D/3FHYhexXsdwhvZZGcUnCKYiEGs8=@freebsd.org X-Gm-Message-State: AOJu0YzjQkLZ5G9MFsOUyTeUTR8VBenUo+AQC7/52KvOC5VraziiUSof PdtgfDAEEdymstycw+bpMWj0pUXkabaDa0hINj+GwOv4/v7vaSR7+CfTew== X-Gm-Gg: ASbGnctOgDaKXTUp7eMAiXtKEg4RrKci31mvmg3r7tsJJ9eUz012Mcb8k5TpNBtrnYy K1Ba44i8cb7iZ0YvsNiSa/AtTOaMBkF569NIFIjUyYHROzgLKiVOADJsWcCI8qcxiu1lvD++Nsn MaB1be/x3JzyNMa7thnmEnDOJBwosbMMUZ9HxSnvLRIJds7lfGKQV3uJbYpnRvPDX5EuS2vT1/r olvePQEiObbqcqO1jJ4qZHTifD8BCHksCC17DFQe8YHtaRRvMsx/HNKSOv5YpwX X-Google-Smtp-Source: AGHT+IHPbzCDVs2BTkn8FldGmFYsjKZduTQwSZ8f1hO7YfZEu0AhwelRPSzD2hT5zkIQ6sdel/NSkg== X-Received: by 2002:a05:6214:29c3:b0:6d4:215d:91c3 with SMTP id 6a1803df08f44-6d450eaf8c1mr89452646d6.28.1732329455846; Fri, 22 Nov 2024 18:37:35 -0800 (PST) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b51415286esm145256885a.101.2024.11.22.18.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 18:37:34 -0800 (PST) Date: Fri, 22 Nov 2024 21:37:32 -0500 From: Mark Johnston To: alan somers Cc: Alan Somers , 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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: 4XwGN05hXVz46Vx X-Spamd-Bar: ---- On Fri, Nov 22, 2024 at 01:58:39PM -0700, alan somers wrote: > On Fri, Nov 22, 2024 at 7:47 AM Alan Somers wrote: > > > > On Fri, Nov 22, 2024 at 7:07 AM Mark Johnston wrote: > > > > > > 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. > > > > Wow, thanks! I'll try it out later today. > > It works now. I can load the module and do some probes. Other > probes, though, still trigger warnings. For instance, > 'fbt:zfs:zio_data_buf_alloc:entry {@z[stack()] = count();}' triggers > warnings like this: I believe this is resolved by commit fdeb273d49bf2fa2544d3c98114859db10385550. > MSan: Uninitialized stack memory in copyout():arg1, offset 24/368, > addr 0xfffffe00b68ae018, from w_stillcold+0x28 > #0 0xffffffff8340009c at kmsan_report_hook+0x15c > #1 0xffffffff833dbc61 at kmsan_copyout+0x1f1 > #2 0xffffffff87e800f0 at dtrace_ioctl+0x4420 > #3 0xffffffff8297795f at devfs_ioctl+0x3ef > #4 0xffffffff8547c277 at VOP_IOCTL_APV+0x107 > #5 0xffffffff8381f974 at vn_ioctl+0x7a4 > #6 0xffffffff8297a0f6 at devfs_ioctl_f+0x186 > #7 0xffffffff834f3c2b at kern_ioctl+0xc5b > #8 0xffffffff834f2dc0 at sys_ioctl+0x580 > #9 0xffffffff84fe7836 at amd64_syscall+0x706 > #10 0xffffffff84f1128b at fast_syscall_common+0xf8