From nobody Fri Dec 27 13:16:43 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; arc=pass (i=1 dmarc=pass fromdomain=epam.com); dmarc=pass(p=quarantine dis=none) header.from=epam.com ARC-Seal: i=2; a=rsa-sha256; t=1732309696; cv=pass; d=zohomail.com; s=zohoarc; b=TB+jEF9d/dSdTnRoh6JDHDlsh+oD9M1SWh5SFipgBhHXexmvw8ztRkUzA8FdKMgQ/gaLR7rzJqGJ3JtW+n0EVfxjUgHddpILQDnL1+JJpxe7VQHP5VRiQV00Bpi7QQisVWdPi2yhNnmZ8NGO/Lc98+ZdX3WojYwwbodMJxWniXo= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732309696; 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=hKhc6MOCXjks3p+mF1Hok1MhyOqzBUachJYh4VSNAfA=; b=FEAR5ha25669FnAQFYMrvWFjj7wVa4jf6bRkpKZmRROyLODaLaV+I59m+LHlt5Ruwl64u0IEAQloNsxoFd835mQ07sjm8o+41wRhf9CRH9WKMNZFh6iSpZ1VLnzUGyUUCStQC5j7zZeYu4FlIUHIu29aAOLa0taR2ARIQGHYEeg= ARC-Authentication-Results: i=2; 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; arc=pass (i=1 dmarc=pass fromdomain=epam.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1732309696403789.983013471434; Fri, 22 Nov 2024 13:08:16 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.842003.1257473 (Exim 4.92) (envelope-from ) id 1tEasT-0007QE-5j; Fri, 22 Nov 2024 21:07:45 +0000 Received: by outflank-mailman (output) from mailman id 842003.1257473; Fri, 22 Nov 2024 21:07: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 1tEasT-0007Q2-18; Fri, 22 Nov 2024 21:07:45 +0000 Received: by outflank-mailman (input) for mailman id 842003; Fri, 22 Nov 2024 21:07:44 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tEasS-0006xA-FC for xen-devel@lists.xenproject.org; Fri, 22 Nov 2024 21:07:44 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20624.outbound.protection.outlook.com [2a01:111:f403:2614::624]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d0226e3e-a915-11ef-a0cc-8be0dac302b0; Fri, 22 Nov 2024 22:07:42 +0100 (CET) Received: from GV1PR03MB10456.eurprd03.prod.outlook.com (2603:10a6:150:16a::21) by PAWPR03MB9738.eurprd03.prod.outlook.com (2603:10a6:102:2ed::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.20; Fri, 22 Nov 2024 21:07:33 +0000 Received: from GV1PR03MB10456.eurprd03.prod.outlook.com ([fe80::a41e:5aa8:e298:757e]) by GV1PR03MB10456.eurprd03.prod.outlook.com ([fe80::a41e:5aa8:e298:757e%7]) with mapi id 15.20.8182.016; Fri, 22 Nov 2024 21:07:33 +0000 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: d0226e3e-a915-11ef-a0cc-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDE6MTExOmY0MDM6MjYxNDo6NjI0IiwiaGVsbyI6IkVVUjA1LURCOC1vYmUub3V0Ym91bmQucHJvdGVjdGlvbi5vdXRsb29rLmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImQwMjI2ZTNlLWE5MTUtMTFlZi1hMGNjLThiZTBkYWMzMDJiMCIsInRzIjoxNzMyMzA5NjYyLjQyMjQzNiwic2VuZGVyIjoidm9sb2R5bXlyX2JhYmNodWtAZXBhbS5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ByzlH/mC/RxZMcA3Jn7WlK2C4XWE8REKDsqGHfRgSnr/0Po/17BWtfFqpY2BvucsxaDYL5jkUTE75MNQgeOb6wr4jiDSdk9hXPaQ5BX/CPOq95euYk3xIOOe/vS88vYFOFuXbesritFa1eEC2EX7B4Lozfm26dcaOvC60+VsHVJQW3mjY43VrdHjytMWXJSmJ4QBt5DW5OvNXcSXO9/FokxljoTmkaPe+I0lmHxHvoJre6gp6zz5oKsaH/a8J3r8UYyTWFVMkAXWPN4PcfIT6T8MoRWXxpxCbsdItu6q0vizdHW0La0Z1y5Ltiw8oeVjOURHbnYJTC8IExeDCtav/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hKhc6MOCXjks3p+mF1Hok1MhyOqzBUachJYh4VSNAfA=; b=pzOchMNl+fLT32dCQV7r01lAII9BvuvkhjInQ/RNH5X/xrJRs3aB4lXVCWE/n4OaWoFdbIwu5pKWfjAPCRg4LRhNxdH1+DcoTmh3pxINE8k4RYcTSZa2vqXoUxUNkWnPbtUXBBXSpDGTTPcAJRxdkWWUgu1nctjMAnr8geautjgOtGmdhTK29moic0FmmTxkh9N/49yos88deeSdMRFGpiP2AMFWmLyA5bmSUrHYz7QJwML9Q4I4B72B5ZDiFxs+PKbTWhc7wkwzzjHbC9Zrqgmz36aqSa4ziq6msKF5CiCFHIxBjxA87gv8cUwMCl0x3CnCL2DGapZ4g5aV/mS3xQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hKhc6MOCXjks3p+mF1Hok1MhyOqzBUachJYh4VSNAfA=; b=pt5H47fIUyJkZlZPkYguX3OnwuVCPvbRHPgulL39nx2yB/2tQrEmEx92hxjB3eEJ6bBNpiwi3BB/ZT+fAuK2GYdMCNfKCnIJNjDqkYsnz5rjHoC9XVGHyP/u1cWbLUnB17vxEAyT8FTGkGCeKVVjklEnLC/3yA0pxfM920Z8cAdjdnWZPcAJsCiFDqHoYeCKpuqFxZg4AboDPvHLYEczbX6xiWvc+rae41QTplfCbUKk+2HksElq5xEyVH4ZCNUCro6Uc2rkYB+pkjIy9tFm0EXU2N6Luu5w27oP+1u4RGuiBczL/77/pFpbahcUUf4qx3FX0H28ayH9P/63iJczpw== From: Volodymyr Babchuk To: "xen-devel@lists.xenproject.org" CC: Volodymyr Babchuk , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [PATCH 2/3] xen: arm: enable stack protector feature Thread-Topic: [PATCH 2/3] xen: arm: enable stack protector feature Thread-Index: AQHbPSKKppr5gbUiFkmSWcjt2gLITQ== Date: Fri, 22 Nov 2024 21:07:29 +0000 Message-ID: <20241122210719.2572072-3-volodymyr_babchuk@epam.com> References: <20241122210719.2572072-1-volodymyr_babchuk@epam.com> In-Reply-To: <20241122210719.2572072-1-volodymyr_babchuk@epam.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.47.0 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: GV1PR03MB10456:EE_|PAWPR03MB9738:EE_ x-ms-office365-filtering-correlation-id: 0ae32b17-3bee-4fa5-71ba-08dd0b39af41 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|1800799024|376014|366016|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?Q?+579lqAQJn6kfrGeZZuax79w41sh3ApDnHGJe3ih1gow+1IKiJy3sgXoer?= =?iso-8859-1?Q?EFdPAfetsNuDfx5B5/xoxgILkRvUgr5lzKkaZr58nG2AV3liptaBOh9w4S?= =?iso-8859-1?Q?emvuDzcdDWw//RgpaW6bIlEGAtTVJz8JetJAD0EXrUUpzAK27IBwBt38RG?= =?iso-8859-1?Q?W72K6lh3PYr17acSIsq2fKyBzBzLHl+vg+YeqYNz6ZZhdAJrUVI6cvL7mq?= =?iso-8859-1?Q?yfepkpzrtcg45VE+Sd1AygZlaMecLAaFMWmkoc72W1EC1IyFbC79R0kFV5?= =?iso-8859-1?Q?ZAwhsL+/vvXn4qpvnZY3aloxNK8WN+Y0UOMPFqtoRyQYASVCP8HIQe0n77?= =?iso-8859-1?Q?iN/WEbtT7al/YxGDIaODIyz7yTYRVGBVWSoGckMao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XfzT9MX3n8VQu2eqeONua7aCTGmrny1wA8t/I+vEgKCH5QCEItVY4QmX?= =?iso-8859-1?Q?TgwHRGaLxqUUwVuZjU+ufuQWKZVRRKME2oL3nFN8m8yCKvpbvoSEN/tgeu?= =?iso-8859-1?Q?/m8S6/rwOr0e0hvKm3u9Tl77dJhtMIjSPAQT31l1Dh+9v5j7PS7BQ=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:GV1PR03MB10456.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?/+Tecr5i2su+bV/AdY0bINogBkte2JNwP1tioneadIsb8AnAlKUmqeR7z0?= =?iso-8859-1?Q?4aPheOU9L3yj31MUB5WIzVr5LFH1HqBoi98v+f+jqZFbKkJJlvwa7IwmWZ?= =?iso-8859-1?Q?ToL207uEoCDpGWVLnL81mXU1g7nhbGsnh8Trw7VEv6sWa2CCVv4umeq0T0?= =?iso-8859-1?Q?ZD4k03xv7Fjet9b/cSh7JIbahxGiuy04BIH+yjc9TA6A8aELBhj5dWRoAO?= =?iso-8859-1?Q?MWImesC1UoX7dah8bABP50+YCuvFN61zgGyP6cCmiMcLeNJyvUTomxFQhG?= =?iso-8859-1?Q?P7e+U5dAQ69jycjqFxolt+IllSp1FEvOjJ8a5VpdGgstSbg5CfrEu49rLE?= =?iso-8859-1?Q?HdZKfW4ARrpJQDtHQWfkgOO4hsaagswpjCyuW39fdEEPSAQU/CMfqD8BY3?= =?iso-8859-1?Q?OJofNhnI0DVWwwOTJVBX87eFD9RsGzWIGlS2ZcmSsIax+cDtZLJgAWZVSD?= =?iso-8859-1?Q?0Ny/rBPXMXd/U3F1G33By0SHw269WEDMY/L3aBifG0LerMvU+zKnSWJBYT?= =?iso-8859-1?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uYFuuy4RxTz2nV3K71T?= =?iso-8859-1?Q?B1BMME54P/uU5GdnlGQDl1fpnmgizelprw8/ukrfFwAwcu4M7LJPs09k0e?= =?iso-8859-1?Q?iaxLHIyDkPMKxbOmy+5Iq/J2Whpdn90P1v/TxhTf6q8PkhMSi9WFeqom2l?= =?iso-8859-1?Q?7dq5shtD0MyJF+JsotuLs8cIkGKy4D0nWsZNFK6uz+v8qBvtSG76nB+3c8?= =?iso-8859-1?Q?guZoE40SJX+bPXO0CDFd7JdiyNfGXqjzwet+3VIAeV+I4F/LTIyGei2w?= =?iso-8859-1?Q?=3D=3D?= Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: GV1PR03MB10456.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ae32b17-3bee-4fa5-71ba-08dd0b39af41 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2024 21:07:29.9392 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: KMYuHsr6PE5ZEiu/DOeB5dDQSh190D8NrYXaktEnim0720bVzcySTr9s6Qj2Hb7DHt+64EoTnf4mzTZNWsusZIQUUnRzFWryflWdUh4mgm0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR03MB9738 X-ZohoMail-DKIM: pass (identity @epam.com) X-ZM-MESSAGEID: 1732309698265116600 Content-Type: text/plain; charset="utf-8" Enable previously added CONFIG_STACK_PROTECTOR feature for ARM platform. Here we can call boot_stack_chk_guard_setup() in start_xen() function, because it never returns, so stack protector code will not be triggered because of changed canary. Signed-off-by: Volodymyr Babchuk --- xen/arch/arm/Kconfig | 1 + xen/arch/arm/setup.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig index 15b2e4a227..8fbb31bc07 100644 --- a/xen/arch/arm/Kconfig +++ b/xen/arch/arm/Kconfig @@ -17,6 +17,7 @@ config ARM select HAS_PASSTHROUGH select HAS_UBSAN select IOMMU_FORCE_PT_SHARE + select HAS_STACK_PROTECTOR =20 config ARCH_DEFCONFIG string diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 71ebaa77ca..2bd3caf90b 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -341,6 +342,8 @@ void asmlinkage __init start_xen(unsigned long fdt_padd= r) */ system_state =3D SYS_STATE_boot; =20 + boot_stack_chk_guard_setup(); + if ( acpi_disabled ) { printk("Booting using Device Tree\n"); --=20 2.47.0