From nobody Sun Feb 15 14:02:32 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 4fDSKL5RRgz6RXLK for ; Sun, 15 Feb 2026 14:02:46 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 4fDSKL1zgGz3V6K for ; Sun, 15 Feb 2026 14:02:46 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-435f177a8f7so2596124f8f.1 for ; Sun, 15 Feb 2026 06:02:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771164165; x=1771768965; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=r2mK9jtLPZXbxcd6kVyQVs9jmqYwoY3TzfsvGmFCef0=; b=vpEw5rP0Ylbc0QhDBUhEuxghVvrkV1sne3I/V2//9SranHMgH+zRnnhJ2mUIc5U2yi 9JljgNGsQ9H8Av0VOl1I67iYRW6ghCx9LRJvsG+Wy4f/30qe9RlV/Iwt3NHZSOIOAt4l jETzD+aCNXrGqW4mAXVDczfbt3YlFBdmz1/qP5/C+WI6/UIF8Y7XAhEvaXh1mf2d8vlu aeqhFOnnOTnF3OhzmYov+GSnnUp3LlGewXEBY09+cNHioFWjYvocfR2pQDL2VieWbMRx X+5ByKWlVk69lvJ+hxHV3por4hZ6rBlWm02r5y1fKDphoKZ09EIx0aZOMRYZ1cpZ/ABa atYg== X-Forwarded-Encrypted: i=1; AJvYcCXcmLIPhbi3GmcldQsB+iAJsynKTUgNraoajOcwkfxrYlT67DQG0OzS6Ah2sOzlURijOhehw/sebC1Q773zhBvFn9QY@freebsd.org X-Gm-Message-State: AOJu0YynFJfh7pKT/3IkN5HsuwETRD08oRZUYK4q3XG5gK1cQhSvONnZ Y/KcqUzQL9XL88OYjEd2n2J95BKCa+KeYhDe1VPjBG03uK+WIZ+k4xr5ov91YV1pbH4D53edkt4 U2FsF X-Gm-Gg: AZuq6aLe7SkFZz2E7Gtd/FeJ+y8mOHAhEvIHV0/ZDNjoQz83/iaVvdvNN92DNIwWdAz uEUYF7QsIACh4Vfn9fjeTlSI67thjaLzfI7T+BgMvsTySMB0un4g9yPtykUu4hVpk4V4+l78zbj /Q7iDY3DzButClG5i/cHC8TLBqD7EkCue8YMgRAlU0raxKNqFGT+TJ7E06BjJ1X5if19vm7CsT6 AxuKuxrVIBJCewo3RuWSMHbLfUcQcbIy49AHuW96hyOqn8EqoL5GGWhsODeXIBmkoKFWXQ8KN2B llpIxfvVuWwD/FrjnuEpS1yr7XGWdel19iEluqnmdDaOKMN86CU2i4h5UnD9lXmVe3exwK1HXbU qqc5gsk1MvF0A1u8p4p+XFAqfOYTXiuM4uphbxn5MTIJxqoBEiscx59M3cBqF12XJnYvoO+5NTF rGx6XIxpjWEjPT57NOXNQaVGIpCRQhP+lKFJ8b4GQUzAqNiRa1Y5h+hrWq3p/8PcW4ZQ== X-Received: by 2002:a05:6000:420e:b0:437:7168:af4d with SMTP id ffacd0b85a97d-4379db93a8cmr11465764f8f.38.1771164164383; Sun, 15 Feb 2026 06:02:44 -0800 (PST) Received: from smtpclient.apple (nat-184-7.net.cam.ac.uk. [131.111.184.7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43796acffcesm18010907f8f.37.2026.02.15.06.02.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Feb 2026 06:02:43 -0800 (PST) Content-Type: text/plain; charset=us-ascii 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 \(3864.300.41.1.7\)) Subject: Re: git: a60e7e6ff0ec - main - stand: compile ia32 EFI loader with -malign-double From: Jessica Clarke In-Reply-To: <6991d07b.43f21.696cde4f@gitrepo.freebsd.org> Date: Sun, 15 Feb 2026 14:02:32 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <0B6A645E-D9E4-4337-B280-7E3CBA1FDC1B@freebsd.org> References: <6991d07b.43f21.696cde4f@gitrepo.freebsd.org> To: Ahmad Khalifa X-Mailer: Apple Mail (2.3864.300.41.1.7) 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: 4fDSKL1zgGz3V6K X-Spamd-Bar: ---- On 15 Feb 2026, at 13:56, Ahmad Khalifa wrote: >=20 > The branch main has been updated by vexeduxr: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Da60e7e6ff0ec1fdd66c2568ac6c03b84= 3dbb3c9d >=20 > commit a60e7e6ff0ec1fdd66c2568ac6c03b843dbb3c9d > Author: Ahmad Khalifa > AuthorDate: 2026-02-15 12:23:26 +0000 > Commit: Ahmad Khalifa > CommitDate: 2026-02-15 13:30:06 +0000 >=20 > stand: compile ia32 EFI loader with -malign-double >=20 > The UEFI spec says: >> Structures are aligned on boundaries equal to the largest internal >> datum of the structure and internal data are implicitly padded to >> achieve natural alignment. >=20 > By default, structs containing members of type "long long" have 4 = byte > alignment on i386. This caused some EFI structures to be subtly = wrong. >=20 > Fix this by compiling the ia32 EFI loader with -malign-double, = which > bumps the alignment up to 8 if such members are present. This seems like a dangerously big hammer. Are there any types shared with libsa or the kernel itself that would change layout? (I suppose for the latter they already need to be aligned as the kernel is 64-bit?) Annotating just the EFI types would seem more appropriate, like how we annotate function pointers to use the Microsoft calling convention. Jessica > MFC after: 3 days > --- > stand/efi/loader/arch/i386/Makefile.inc | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/stand/efi/loader/arch/i386/Makefile.inc = b/stand/efi/loader/arch/i386/Makefile.inc > index e27b553c6bab..89fcb2a3c093 100644 > --- a/stand/efi/loader/arch/i386/Makefile.inc > +++ b/stand/efi/loader/arch/i386/Makefile.inc > @@ -7,3 +7,5 @@ SRCS+=3D amd64_tramp.S \ > SRCS+=3D nullconsole.c \ > comconsole.c \ > spinconsole.c > + > +CFLAGS+=3D -malign-double >=20