From nobody Thu Aug 7 18:18:21 2025 X-Original-To: dev-commits-src-all@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 4byb584ph1z64ZNj for ; Thu, 07 Aug 2025 18:18:36 +0000 (UTC) (envelope-from bT.scwf0dauhh0c7l2=00ha5dfzm51l=mfkkuxlzkiyt7n@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 4byb575Nbtz3mJr for ; Thu, 07 Aug 2025 18:18:35 +0000 (UTC) (envelope-from bT.scwf0dauhh0c7l2=00ha5dfzm51l=mfkkuxlzkiyt7n@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=IThdkp9Z; spf=pass (mx1.freebsd.org: domain of "bT.scwf0dauhh0c7l2=00ha5dfzm51l=mfkkuxlzkiyt7n@return.smtpservice.net" designates 103.2.141.248 as permitted sender) smtp.mailfrom="bT.scwf0dauhh0c7l2=00ha5dfzm51l=mfkkuxlzkiyt7n@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=1754591615; h=Feedback-ID: X-Smtpcorp-Track:To:Date:Subject:Message-Id:From:Reply-To:Sender: List-Unsubscribe:List-Unsubscribe-Post; bh=wKQfGDhnsqEW6OO2/C5oIz9tlJ7JEfx7ORzQmJsZZAo=; b=IThdkp9ZS6yDKrvA8oTRJfoIcj 2c1js33sOXZM9azrb6e/mFC9+64yv+BJtYCVgl7uAjpETKqZqMHVdfudc6rKjUnCwa9sp6OF5/xzy KfsoprSyKiRqCMcbvia4RlkCBWhGEcTUqYL7z0sUs/FGzccyXFgl61YMq+y8EF5JWkIs/FqBlCM/z 3UuOfpGExOKM4MTyx0uJtCHhwp63jyD7VlC3j/a9zvvM1XOjJotLUKGUa0mcQ4xxe7sG84kKQ+uwe zxv71lFn27mJY53sIlJ+IUP6uelYkP37LYCAwiy/KrAYYmy4qAldmq/nkhXWK3uDM226feSoSuETW 9mKOmVgw==; 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: H_aiTWjfpgBW.ir53WscRJd76.LLq4TA5jmaV 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.scwf0dauhh0c7l2=00ha5dfzm51l=mfkkuxlzkiyt7n@return.smtpservice.net]; R_SPF_ALLOW(-0.20)[+ip4:103.2.140.0/22]; 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]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; R_DKIM_PERMFAIL(0.00)[smtpservice.net:s=mgy720.a1-4.dyn]; 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.scwf0dauhh0c7l2=00ha5dfzm51l=mfkkuxlzkiyt7n@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-all@FreeBSD.org]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_SOME(0.00)[] X-Rspamd-Queue-Id: 4byb575Nbtz3mJr 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--