From nobody Sun Nov 01 17:13:24 2026 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 4jHhJ21Hxnz6xZqq for ; Sun, 01 Nov 2026 17:13:38 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jHhJ13sGXz4rLd for ; Sun, 01 Nov 2026 17:13:37 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.42 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4a140e7405dso23228295e9.3 for ; Sun, 01 Nov 2026 09:13:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793553216; x=1794158016; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=7Ov09mYrWatlkGGq1oGqbn9VsTfR0JIhjiIpCK2ockk=; b=hI+9hb+/0vIaKHfuYtc/keOSrZXxHJhNrsyu54cmEyE8W71wFU+9DE1J6QW7BMOmEB ASfEZ+VvQ0K2Sx/ohE9MP9h0zRLq+Cz33VBDBHh0jX2aS8eVN4saZyl9SQLdPrnf+2G8 XWbhdv3c9RHrwT6LVf7I48azeDBiIUcK1d0B3Z/KLIV6vwgX+/HlrEKmFwOa9y3qGpz8 g0OMbyo6fBNrBuH9Ip55R19rlxkDWGZMhnXLa/mAlkQBK550Mo66cMGkN95THjqcuQbr YdNuvpssJpvf7oTGmevK4K+BDjk+kWXNtVKbK6KruIsH9wNTUPsunGfihj1Xe3zUoLjx 8x1A== X-Gm-Message-State: AFq9FYKmI4uDAquUACbh11EdrNZG0K0k8i9aZcflQxHB+OP/o/tYL90y hRz9+9CC6y1I4mcrv3X55t+TbQvSso1zMjGMsmmVp2jHxLOd4muV/dC4xfEktPqcsFkvWLMKD5O PhqyMbKc= X-Gm-Gg: AYBFou1S2l9631UNTUIeyjNPp/JMApS+2OObHOIToXvkHJNv98I5APfS8XSYIZ/stld sg5AC7DdL72BYpjPN1MUfFnbtv2TE5jSqiSrnxUqr+HC0pugKnp6UJ4N9WzU3wRRfn9qGMVS8EX CTCzMVJ7PzRt3att0GlZOYB31F6Bd2NaHWXsMT09FYAMMNABSTpMJUo7lbmAQP9+ksnHewJQR4/ EMVD2WQIwmbJUwmR+dEvUCbRiaEz1z1sYkZ8jkFCH6pJsPK62nybHOhQcshT2MiJjV9uuFiGzs+ gZ1oApt2S3vebLADEwYKKpsga6KrlNxXlr9srmzb4orAfDv2xhaNQGPBjuRKSiPSr3D6Up8z0Ef ZLVxhq5Aw5TtxMzaOdeo63XT+IglYINvHFKaLIbLytuXbODgpts74DCH9D8UqPb+9amj4oTxaQc TlC22v44TgF/COj7kaDpMMspbKcNA3mHeBf6HhZkVj5Cz8VBe4DHOjshSz1O3BUhasq8wxkKIAY Ga23nd/anm2rPzNcTp2OTYmO43SHWcRjgJXNutr9p3w7erLIaTkJpc2lr7TQut2tqpncx644tfR v3kHwXTuXZZrZTSnhSWlD8eztaPPG78z+G1kxM3E551Fre/fKmFUyDGWC183Wg2dDHWthwzNtcY M58TmOueZTPm7IUGuoSc7D+0kBGRSxJ/S6yrNZD+XmqiPiUVA X-Received: by 2002:a05:600c:34d1:b0:4a2:133:45e1 with SMTP id 5b1f17b1804b1-4ac183d136dmr174289145e9.24.1793553215973; Sun, 01 Nov 2026 09:13:35 -0800 (PST) Received: from smtpclient.apple (host86-142-176-254.range86-142.btcentralplus.com. [86.142.176.254]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4abf60f1076sm222304245e9.6.2026.11.01.09.13.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Nov 2026 09:13:35 -0800 (PST) Content-Type: text/plain; charset=us-ascii List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3901.200.71.1.16\)) Subject: Re: git: f6ee1d20d368 - main - kern_thread: Fix i386 p_emuldata KBI assertion From: Jessica Clarke In-Reply-To: Date: Sun, 1 Nov 2026 17:13:24 +0000 Cc: "dev-commits-src-all@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <91B6DA70-7673-4D87-A0BF-6F4AD8AF03C1@freebsd.org> References: <6a54557b.39c2c.4c5d4012@gitrepo.freebsd.org> To: Harry Schmalzbauer X-Mailer: Apple Mail (2.3901.200.71.1.16) X-Rspamd-Queue-Id: 4jHhJ13sGXz4rLd X-Spamd-Bar: / X-Spamd-Result: default: False [0.60 / 15.00]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.42:from]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TO_DN_SOME(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEFALL_USER(0.00)[jrtc27]; RCPT_COUNT_TWO(0.00)[2]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.42:from] On 1 Nov 2026, at 16:26, Harry Schmalzbauer wrote: > On 2026-11-01 10:29, Harry Schmalzbauer wrote: >> On 2026-07-13 05:03, Jessica Clarke wrote: >>> The branch main has been updated by jrtc27: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Df6ee1d20d36813e9906916f48cf06f44= a2fd668d >>>=20 >>> commit f6ee1d20d36813e9906916f48cf06f44a2fd668d >>> Author: Jessica Clarke >>> AuthorDate: 2026-07-13 03:03:03 +0000 >>> Commit: Jessica Clarke >>> CommitDate: 2026-07-13 03:03:03 +0000 >>>=20 >>> kern_thread: Fix i386 p_emuldata KBI assertion >>> On amd64 there was 4 bytes of padding between the 20-byte = p_comm and >>> (for LP64) 8-byte p_sysent, so the addition of p_execblock just = caused >>> that padding to be eaten up. However, on i386, there was no = such >>> padding, and so the addition of p_execblock rippled through to >>> p_emuldata. >>> Fixes: e1a84b7708c2 ("execve_block(): a mechanism for = mutual exclusion with execve() on the process") >>=20 >>=20 >> Hello, >>=20 >> I think this is a quiet important fix missing in stable/15 (15.2) - = despite i386 isn't tier0 anymore. >=20 >=20 > Test-build failed with this e1a84b7708c2-fix. > I couldn't identify the change which made this fix superfluous, but = reverting local-MFC of f6ee1d20d368 lets me build i386 kernel. > With this applied: > i386 kernel build fails with f6ee1d20d368 MFCd on 15.2-PRERELEASE: >=20 > sys/kern/kern_thread.c:125:16: error: static assertion failed due = to > requirement > '__builtin_offsetof(struct proc, p_emuldata) =3D=3D 796': = struct proc > KBI p_emuldata > 125 | _Static_assert(offsetof(struct proc, p_emuldata) =3D=3D = 0x31c, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > sys/sys/stddef.h:41:31: > note: expanded from macro 'offsetof' > 41 | #define offsetof(type, field) __offsetof(type, field) > | ^ > sys/sys/cdefs.h:368:34: > note: expanded from macro '__offsetof' > 368 | #define __offsetof(type, field) __builtin_offsetof(type, = field) > | ^ > sys/kern/kern_thread.c:125:50: > note: expression evaluates to '792 =3D=3D 796' > 125 | _Static_assert(offsetof(struct proc, p_emuldata) =3D=3D = 0x31c, > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ > 1 error generated. >=20 > This reverts commit 75d28f36da6658c032613d7a1e4eabf70ec6cd27 = (local MFC). >=20 > note: expression evaluates to '792 =3D=3D 796' > 0x318 =3D=3D 0x31c >=20 >=20 > Sorry for the noise, please ignore. 9d6498310f5c was the stable/15 cherry-pick of e1a84b7708c2 and put p_execblock at the end of struct proc rather than in the middle where it more logically belongs, in order to (mostly*) preserve KBI on the stable branch. Putting it in the middle would be much more of a break. Jessica * Sizes of structs is also KBI, but there was no reserved space at the end to use, so this is about the closest you can get to that and presumably the slight KBI breakage was weighed against the security importance of the fix.=