From nobody Mon Aug 24 18:43:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1783334804; cv=none; d=zohomail.com; s=zohoarc; b=PLoTVQvdtZX5EuyAC0TUnALeTNkBInkt7IbnSBoSVBCoU0HyyhOMAejHRvLk+jQRzy4AgWDpXOPBEcdadP5gKUscWEZAyVLea+/yriXZX559k5vPMFbBbUDnctB0NhEElAc4IQCLOS6bZrBBosOlff8YCtOJJxWwNfXroVHFA7s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783334804; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=EgcFpTg0M719DUSQiohUXmyN6KV71kHNHsNKWBm10go=; b=O9llCp8OKniapEpgBE6m25teZ3APjt4LXXOa9h+qne/bwFDRPUFgn57qwsaSqb9QZ0/ys0li23CimkjMMyZ+enQ7XvvVtLahnX7dk/rnIZ+WiX6P5P5wu9UtZ7PBTz8HyzyXvTVbAoHINzuHF8c/eX/A7+TluhjJoEoOHixufZY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1783334804884773.4844327494875; Mon, 6 Jul 2026 03:46:44 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1355301.1610063 (Exim 4.92) (envelope-from ) id 1wggq1-0002UO-Dn; Mon, 06 Jul 2026 10:46:09 +0000 Received: by outflank-mailman (output) from mailman id 1355301.1610063; Mon, 06 Jul 2026 10:46:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wggq1-0002UH-Ae; Mon, 06 Jul 2026 10:46:09 +0000 Received: by outflank-mailman (input) for mailman id 1355301; Mon, 06 Jul 2026 10:46:08 +0000 Received: from mx.expurgate.net ([194.145.224.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wggpz-0002Tu-Uf for xen-devel@lists.xenproject.org; Mon, 06 Jul 2026 10:46:08 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wggpy-008v6e-Qe for xen-devel@lists.xenproject.org; Mon, 06 Jul 2026 12:46:06 +0200 Received: from [10.42.69.9] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a4b8761-5cb7-0a2a0a5109dd-0a2a4509a9f8-18 for ; Mon, 06 Jul 2026 12:46:06 +0200 Received: from [209.85.128.48] (helo=mail-wm1-f48.google.com) by tlsNG-bad1c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a4b876e-97e6-0a2a45090019-d1558030b820-3 for ; Mon, 06 Jul 2026 12:46:06 +0200 Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-493c2b3dc8bso19813285e9.2 for ; Mon, 06 Jul 2026 03:46:06 -0700 (PDT) Received: from localhost.localdomain (2.115.147.147.dyn.plus.net. [147.147.115.2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493c63ba97csm349823985e9.12.2026.07.06.03.46.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2026 03:46:05 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783334766; x=1783939566; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EgcFpTg0M719DUSQiohUXmyN6KV71kHNHsNKWBm10go=; b=IHVYOHTvrVFjr9fT3MFu16T0q8cr7HeZNsuqpJ3YeBy4rdCkrSzZCxIdl4sBAyB5h7 96f82zINis75KaIq0MwKyICFHEtbBfEtAnyfF+Do1+xVjWj8U7roE/6RulbN6YPVwKCy dAIVlqWv+LOvSIP8Zut9OJJSC3GLVkrl4dk4IJopqDU+Q/BHdH9zf/NcZfdnpZ9sbvOO 27axMr1mrqfgDTdXs6wOyOXIw9/P0Tn/tfesrhQZuP11CSEX9LX/oQ5mW6UpQGvPdxJd YuTc3agrcoEaoxI0J7IfgHp+ufn8aL7qYRxAnmmt0/0ZTQMkL0w+IGvCTLby0TSCn7y8 Ds0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783334766; x=1783939566; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=EgcFpTg0M719DUSQiohUXmyN6KV71kHNHsNKWBm10go=; b=fJhlfTxKSJnNXZYZVCoqyD1WrWD4+dLkYe1jSdx0rmPv7nBLoV4tuTMuWV66gJkMF/ 5vO72D31sTWQGVYWhIXnxu/h9C6zIFytwi4ZH77/crM+0EAcpTuppnkkGqJMVft1wrPc QoN/8RsE4cYG9C4VkUVUkSikRwrIU0vvADc2WxFeu+67tN6dQeOAOPJabTDk7ojmLlFh WH+McYZFJ4IIlrmcBNHCynfC5f7Y/aVtXIfUc+I6XOypG3c0GFsCW3cgX81wvXbIBpBM btaS5QXfIeY0+KtFMbUlp5Y9hnhbim3A7JHE3qW4UxU10M8e4rwNYomGG6UNnL5Ox445 HntQ== X-Gm-Message-State: AOJu0YwD3wZyoWMw+aVlT6DJfsIEIteUYO05WVxc/wIw214l5cdGxYsK UT32JZZA9OhoS2SCnTHGgvLwAUlrUvyqlQk8C4uiWz8vOoXNdVO2BcIUqcjafx+ezgQ= X-Gm-Gg: AfdE7clYTsMU8SKRUALTwquyy1wN7jTFcd4ir5HFK6sPoqA4Hx3a4eccX/3n63jOleN z/pNCB3vN/3m2RmnECR5mWXw7qFGP9ryunqJ5Pye8JFEygoharWfE+mfSmLOef/Srj0jv0gFswa M+670mbyGGRuLRwlQXpbwFpa5/gNNf6b5BSLOQ8Z6XRvy1ZxW637srMNBNsfvcRiL7vUwX4oQFc RmP0LnYlHYBzUQMnyyAvBuaMQFayfxRtPzA9EJojglsjFEByjRPRKD1LdYv+X5h+wBuZHPFOANO PQqOBKdnfVMzfHBa1VCXXWPYCoYxWkp7jzsTRf/t3FS0TS05tsgZHq3kYmrGZnMZoYpwcWz9Py+ Pz9N9VZczHssWDLzeNecUtfHBTXxJ1gpL6/WLAm6WO9Y024XgZCc+0a+c215E5HTZRw8UVXF5/r ZkeHAnQHYJZjPltw05c4GPxr8BCtJ/7HXfgcN5iuquI8k6cr8VzujJ70bmzCii8B9ksml8YmZLN AHn7LklMkplc4kI9HY= X-Received: by 2002:a05:600c:3110:b0:493:c8c6:4989 with SMTP id 5b1f17b1804b1-493d11cf312mr130290115e9.6.1783334765621; Mon, 06 Jul 2026 03:46:05 -0700 (PDT) From: Frediano Ziglio X-Google-Original-From: Frediano Ziglio To: xen-devel@lists.xenproject.org Cc: Frediano Ziglio , Frediano Ziglio , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Jan Beulich Subject: [PATCH v7 1/4] Align relevant sections to 4KB Date: Mon, 6 Jul 2026 11:45:54 +0100 Message-ID: <20260706104557.430097-2-frediano.ziglio@citrix.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260706104557.430097-1-frediano.ziglio@citrix.com> References: <20260706104557.430097-1-frediano.ziglio@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-bad1c0/1783334766-577AD986-70FCADD3/0/0 X-purgate-type: clean X-purgate-size: 2076 X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1783334806334158500 From: Frediano Ziglio Required by UEFI CA memory mitigation. It is a requirement for NX_COMPAT so the PE can be loaded with W^X perms in the pagetables. NX_COMPAT is a requirement from shim-review, https://github.com/rhboot/shim-review#do-you-have-the-nx-bit-set-in-your-sh= im-if-so-is-your-entire-boot-stack-nx-compatible-and-what-testing-have-you-= done-to-ensure-such-compatibility Sections with different permissions must be in separate pages. In the case of debug sections they are contiguous and have the same permissions, including the immediately preceding .reloc section, so it's not an issue if they are not aligned to the page. Before the .debug sections you could have the .reloc or the SBAT section, either are permission-compatible. Signed-off-by: Frediano Ziglio Acked-by: Marek Marczykowski-G=C3=B3recki Acked-by: Jan Beulich --- Changes since v1: - Change subject. Changes since v2: - Improved commit message and subject. Changes since v3: - Added Acked-by; - Improved commit message. Changes since v4: - Added missing comment; - Added Acked-by. --- xen/arch/x86/xen.lds.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index b9e888e596..8e63cf5bc2 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -162,8 +162,8 @@ SECTIONS __note_gnu_build_id_end =3D .; } PHDR(note) PHDR(text) #elif defined(BUILD_ID_EFI) - /* Workaround bug in binutils < 2.36 */ - . =3D ALIGN(32); + /* Align to satisfy UEFI CA memory mitigation. */ + . =3D ALIGN(PAGE_SIZE); DECL_SECTION(.buildid) { __note_gnu_build_id_start =3D .; *(.buildid) @@ -330,6 +330,8 @@ SECTIONS __2M_rwdata_end =3D ALIGN(SECTION_ALIGN); =20 #ifdef EFI + /* Align to satisfy UEFI CA memory mitigation. */ + . =3D ALIGN(PAGE_SIZE); .reloc ALIGN(4) : { __base_relocs_start =3D .; *(.reloc) --=20 2.43.0