From nobody Fri Nov 22 01:03:14 2024 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=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1723038544; cv=none; d=zohomail.com; s=zohoarc; b=bbGuaGOK81Ud86H7I9eBvMmh42bor4h4AoHQJ86Th7FRWCYeIlGJBIuPAu5kVlGL0h/M9t6MVMtkPOACXbPA01oasN1s4+EGbflD5xpVBurAT2wJAUNwBnBTzi0vbMc1PtcUyBVtFWHWUqv5a32gZJIvYM+56URyzJmzsdy3fS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723038544; h=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=o7eodO/9HzqH08fbvCI7vy2Uyw8SnwXrkAc77uD4d2A=; b=IMqFtJYpUyVJRMoel+uyWzE10JRSsG5x64xj8erAk09arwHD0iJcAuUVbB2OweKetVtHOMMoxwJB+k1W1wtkYNXBupddUODCgcs7ToTEqhZzDFd82sug1sOWuEcjWKr0k7Vnp02tLSc+8y4fr89X/JATKTKOgZCcMmh3UgXXtcY= 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=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1723038544645771.8818650332588; Wed, 7 Aug 2024 06:49:04 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.773500.1183943 (Exim 4.92) (envelope-from ) id 1sbh1x-0005JH-EY; Wed, 07 Aug 2024 13:48:45 +0000 Received: by outflank-mailman (output) from mailman id 773500.1183943; Wed, 07 Aug 2024 13:48:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sbh1x-0005HQ-7G; Wed, 07 Aug 2024 13:48:45 +0000 Received: by outflank-mailman (input) for mailman id 773500; Wed, 07 Aug 2024 13:48:43 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sbh1v-0005AD-It for xen-devel@lists.xenproject.org; Wed, 07 Aug 2024 13:48:43 +0000 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [2a00:1450:4864:20::532]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c193147c-54c3-11ef-8776-851b0ebba9a2; Wed, 07 Aug 2024 15:48:41 +0200 (CEST) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5a10835487fso2854813a12.1 for ; Wed, 07 Aug 2024 06:48:41 -0700 (PDT) Received: from EMEAENGAAD19049.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5b83960f353sm7017710a12.15.2024.08.07.06.48.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Aug 2024 06:48:40 -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" X-Inumbo-ID: c193147c-54c3-11ef-8776-851b0ebba9a2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1723038521; x=1723643321; 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=o7eodO/9HzqH08fbvCI7vy2Uyw8SnwXrkAc77uD4d2A=; b=eBmFeBDkNd87aJhO+ZE7x/ImfPfj+wxGn0b6RqJRAry5eqGWjMu2VUkh3mniOF1LUY 8kJfDYYZkcDYt+MEkFIgHLYwdSVQlsQga4mP3d/xyAiQMoAPUJysjYgxXKw96el3Wxy/ GEmzKfZkfRwpLxhevcFbs85MkQwB77S3BpB7o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723038521; x=1723643321; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o7eodO/9HzqH08fbvCI7vy2Uyw8SnwXrkAc77uD4d2A=; b=Z/JNdUw//WdfpfZ1FMEzStTe2l3w2u/IHPrhWSFpk00EdoS/c5qQHpcsmvR7dR5+D/ C4dSPxIyitib2C8Bn07m9I4L924HopFlXXPXzRkyUuQ9FDd/HyOKLjTDBUx6t8URqPGD omodKRDHbPyX183YMItTs3E2JR63diKKgu2f1OY2fGA+kcU5PCIsf3fIRMMO+3T1ZHzZ ahVx73ytZ76Sq4kbMQsSCupIrklq08P7MnxHN0mYM6XJ/qAxx7+ZguPmr8afRGtWHCjy 5XJ4hESuJfK//08o2ltT6/TkqVzz9cPLxy/Z4xuCSycAPuRPPRaLaY57YuGQWL+ghNTN QSnw== X-Gm-Message-State: AOJu0Ywkf6nM/fM8uHMTgUZwJzAKD1RYO2D0dprDUcwSk5Mz1qeX7jLk dr+NwXnhu8lcWM53IJtongKm/79S0hkU7OWu38JCLXTiSxa+++hYLBP0qvmHi0X7g/Vmu6XMXOl 4 X-Google-Smtp-Source: AGHT+IHfPjkr6YvB77y4L8XA3v+BcfW12X55BGLdGL+x8IdxKIMhcYOiZjiZPba6g4zjb1J6DD+tUA== X-Received: by 2002:a05:6402:2032:b0:5a3:a4d7:caf5 with SMTP id 4fb4d7f45d1cf-5b7f5dc13cemr11942212a12.36.1723038520673; Wed, 07 Aug 2024 06:48:40 -0700 (PDT) From: Alejandro Vallejo To: Xen-devel Cc: Alejandro Vallejo , Frediano Ziglio , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 1/5] x86: Put trampoline in .init.data section Date: Wed, 7 Aug 2024 14:48:15 +0100 Message-ID: <20240807134819.8987-2-alejandro.vallejo@cloud.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240807134819.8987-1-alejandro.vallejo@cloud.com> References: <20240807134819.8987-1-alejandro.vallejo@cloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1723038545726116600 Content-Type: text/plain; charset="utf-8" This change allows to put the trampoline in a separate, not executable section. The trampoline contains a mix of code and data (data which is modified from C code during early start so must be writable). This is in preparation for W^X patch in order to satisfy UEFI CA memory mitigation requirements. At the moment .init.text and .init.data in EFI mode are put together so they will be in the same final section as before this patch. Signed-off-by: Frediano Ziglio --- xen/arch/x86/boot/head.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index d8ac0f0494..f027ff45fd 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -870,6 +870,8 @@ cmdline_parse_early: reloc: .incbin "reloc.bin" =20 + .section .init.data, "aw", @progbits + .align 4 ENTRY(trampoline_start) #include "trampoline.S" ENTRY(trampoline_end) --=20 2.45.2