From nobody Thu Aug 7 18:18:21 2025 X-Original-To: dev-commits-src-main@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 4byb596bwBz64ZNm for ; Thu, 07 Aug 2025 18:18:37 +0000 (UTC) (envelope-from bT.d16wipw2shp1oz2=g7w6na8xddxm=ezsbaizk7sbiui@return.smtpservice.net) Received: from e2i504.smtp2go.com (e2i504.smtp2go.com [103.2.141.248]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4byb594xNJz3mJt for ; Thu, 07 Aug 2025 18:18:37 +0000 (UTC) (envelope-from bT.d16wipw2shp1oz2=g7w6na8xddxm=ezsbaizk7sbiui@return.smtpservice.net) Authentication-Results: mx1.freebsd.org; dkim=none ("invalid DKIM record") header.d=smtpservice.net header.s=mgy720.a1-4.dyn header.b="s/k0bgZK"; spf=pass (mx1.freebsd.org: domain of "bT.d16wipw2shp1oz2=g7w6na8xddxm=ezsbaizk7sbiui@return.smtpservice.net" designates 103.2.141.248 as permitted sender) smtp.mailfrom="bT.d16wipw2shp1oz2=g7w6na8xddxm=ezsbaizk7sbiui@return.smtpservice.net"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=freebsd.org (policy=none) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpservice.net; s=mgy720.a1-4.dyn; x=1754591617; h=Feedback-ID: X-Smtpcorp-Track:To:Date:Subject:Message-Id:From:Reply-To:Sender: List-Unsubscribe:List-Unsubscribe-Post; bh=wKQfGDhnsqEW6OO2/C5oIz9tlJ7JEfx7ORzQmJsZZAo=; b=s/k0bgZKx5P6G0AqZ6cIKFRUKB gQ6rxWkev+K33v5/XKUUEus5kcpB+jiJWxZS/iBeDtNkpXxjdx/ztei5nRi5bfPYn0q2hIlTJ+6R5 786vW7V97UXP9nutMIzBsQY67ME/waHf7A1HFY6YFGmiTmkTzKMp3so3ANTdLnwUBJxOT72hezKX7 y84q2c46GIStY4hZMaZVjC0pTp6+gDdtMfYa5uqXtVRrq7Inhxrld4qWuuLyow+u53x9s+6+W5K9N h6TU/IF82Epp8D0vqvdySPy562d/JJG6OJfd8fnAJCfEWrA1zZd1GUZCQzuvy1Q3BSRoaQlTuQigy mwdPZ+kQ==; Received: from [10.172.233.58] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2-S2G) (envelope-from ) id 1uk5CE-TRk6tY-HO; Thu, 07 Aug 2025 18:18:34 +0000 Received: from [10.99.243.232] (helo=morbo.fubar.geek.nz) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.98.1-S2G) (envelope-from ) id 1uk5CD-FnQW0hPli96-ntwf; Thu, 07 Aug 2025 18:18:33 +0000 Received: from smtpclient.apple (unknown [IPv6:2a02:8012:a6a8:0:e8f7:66f7:40de:c5d9]) by morbo.fubar.geek.nz (Postfix) with ESMTPSA id DBB033229D; Thu, 07 Aug 2025 18:18:32 +0000 (UTC) From: Andrew Turner Message-Id: <6BCAD216-03E1-4DA3-B0BB-542366F003DB@FreeBSD.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_D384173A-B019-428E-93B1-239555A3C84A" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: git: 81f07332c03f - main - arm64: tidy up Top-Byte-Ignore (TBI) in the kernel Date: Thu, 7 Aug 2025 19:18:21 +0100 In-Reply-To: Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: Jessica Clarke References: <202508061738.576Hc0wZ076618@gitrepo.freebsd.org> X-Mailer: Apple Mail (2.3826.600.51.1.1) X-Smtpcorp-Track: KoIIseQ8yQty.3Ydyh4ZQ-OvT.198_8wNUXsu Feedback-ID: 790814m:790814amQcrys:790814sm59Ge4EAY X-Report-Abuse: Please forward a copy of this message, including all headers, to X-Spamd-Result: default: False [-2.99 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.991]; MV_CASE(0.50)[]; RWL_MAILSPIKE_EXCELLENT(-0.40)[103.2.141.248:from]; FORGED_SENDER(0.30)[andrew@FreeBSD.org,bT.d16wipw2shp1oz2=g7w6na8xddxm=ezsbaizk7sbiui@return.smtpservice.net]; R_SPF_ALLOW(-0.20)[+ip4:103.2.140.0/22:c]; RCVD_IN_DNSWL_MED(-0.20)[103.2.141.248:from]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed),none]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; ARC_NA(0.00)[]; R_DKIM_PERMFAIL(0.00)[smtpservice.net:s=mgy720.a1-4.dyn]; TO_DN_EQ_ADDR_SOME(0.00)[]; DKIM_TRACE(0.00)[smtpservice.net:~]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:23352, ipnet:103.2.140.0/22, country:US]; FROM_NEQ_ENVFROM(0.00)[andrew@FreeBSD.org,bT.d16wipw2shp1oz2=g7w6na8xddxm=ezsbaizk7sbiui@return.smtpservice.net]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@FreeBSD.org]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_SOME(0.00)[] X-Rspamd-Queue-Id: 4byb594xNJz3mJt X-Spamd-Bar: -- --Apple-Mail=_D384173A-B019-428E-93B1-239555A3C84A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 6 Aug 2025, at 18:43, Jessica Clarke wrote: >=20 > On 6 Aug 2025, at 18:38, Andrew Turner > wrote: >>=20 >> The branch main has been updated by andrew: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D81f07332c03fd2ac6efa8e15b1659a57= 3d250329 >>=20 >> commit 81f07332c03fd2ac6efa8e15b1659a573d250329 >> Author: Harry Moulton >> AuthorDate: 2025-07-31 14:10:57 +0000 >> Commit: Andrew Turner >> CommitDate: 2025-07-31 14:27:06 +0000 >>=20 >> arm64: tidy up Top-Byte-Ignore (TBI) in the kernel >>=20 >> In preparation for TBI to be enabled for processes from 15.0 we = need >> to clean up copying data between userspace and the kernel. These >> functions will check the address is within the valid userspace = range, >> however as the userspace and kernel ranges may overlap when TBI is >> enabled we need to mask off the top 8 bits. >>=20 >> Processes not using TBI are unaffected as the hardware will still >> check all bits in the address, however this will happen at the = first >> load/store instruction. >=20 > I thought Linux=E2=80=99s ABI was that addresses passed to the kernel = must be > canonical. Is that false, or is there a reason we=E2=80=99re diverging = from > that design choice? On Linux there is a flag to enable passing tagged pointers to the = kernel. It=E2=80=99s needed for HWASAN to work as any pointers may be = tagged, and I expect it will also be needed for MTE. I don=E2=80=99t know of a strong reason to not allow tagged pointers in = the kernel. Andrew= --Apple-Mail=_D384173A-B019-428E-93B1-239555A3C84A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On 6 Aug 2025, at 18:43, Jessica Clarke = <jrtc27@freebsd.org> wrote:

On 6 Aug 2025, at 18:38, Andrew Turner = <andrew@freebsd.org> = wrote:

The branch main has been updated by = andrew:

URL: = https://cgit.FreeBSD.org/src/commit/?id=3D81f07332c03fd2ac6efa8e15b1659a57= 3d250329

commit = 81f07332c03fd2ac6efa8e15b1659a573d250329
Author: =     Harry Moulton = <harry.moulton@arm.com>
AuthorDate: 2025-07-31 14:10:57 = +0000
Commit:     Andrew Turner = <andrew@FreeBSD.org>
CommitDate: 2025-07-31 14:27:06 = +0000

  arm64: tidy up Top-Byte-Ignore (TBI) in the = kernel

  In preparation for TBI to be enabled for = processes from 15.0 we need
  to clean up copying data = between userspace and the kernel. These
  functions will = check the address is within the valid userspace = range,
  however as the userspace and kernel ranges may = overlap when TBI is
  enabled we need to mask off the top 8 = bits.

  Processes not using TBI are unaffected as the = hardware will still
  check all bits in the address, = however this will happen at the first
  load/store = instruction.

I = thought Linux=E2=80=99s ABI was that addresses passed to the kernel must = be
canonical. Is that = false, or is there a reason we=E2=80=99re diverging from
that design choice?

On Linux there is a flag to = enable passing tagged pointers to the kernel. It=E2=80=99s needed for = HWASAN to work as any pointers may be tagged, and I expect it will also = be needed for MTE.

I don=E2=80=99t know of a = strong reason to not allow tagged pointers in the = kernel.

Andrew
= --Apple-Mail=_D384173A-B019-428E-93B1-239555A3C84A--