From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1690EB64D7 for ; Fri, 23 Jun 2023 16:26:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6EFEB8D0002; Fri, 23 Jun 2023 12:26:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6790C8D0001; Fri, 23 Jun 2023 12:26:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 47D388D0002; Fri, 23 Jun 2023 12:26:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 327738D0001 for ; Fri, 23 Jun 2023 12:26:10 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id E2B5A40262 for ; Fri, 23 Jun 2023 16:26:09 +0000 (UTC) X-FDA: 80934539658.06.5773D0E Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2053.outbound.protection.outlook.com [40.107.7.53]) by imf13.hostedemail.com (Postfix) with ESMTP id 8801C20004 for ; Fri, 23 Jun 2023 16:26:04 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=q5WJWZJV; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=q5WJWZJV; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf13.hostedemail.com: domain of Szabolcs.Nagy@arm.com designates 40.107.7.53 as permitted sender) smtp.mailfrom=Szabolcs.Nagy@arm.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1687537566; a=rsa-sha256; cv=fail; b=WeneVQ95iRzwbtY2r5htk3EAyvu0i0oViaxLVfWzYeK/xgtscpLLtEwHWDecbAXg/LqZMh Gpce5bBtexdCa7we43/JRKY7jdLkphmqgzMthfU+dELx1JWPBcuSd9QQJ5SyxHJ/ak3W5z 5h/uKqyJhFjIr56iyMp14nHgSSTsEKU= ARC-Authentication-Results: i=2; imf13.hostedemail.com; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=q5WJWZJV; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=q5WJWZJV; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf13.hostedemail.com: domain of Szabolcs.Nagy@arm.com designates 40.107.7.53 as permitted sender) smtp.mailfrom=Szabolcs.Nagy@arm.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1687537566; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=1/DlcP6NFNh/v3X34McLagCs6euDIA5WhLlrq2giJUI=; b=OkzTeTG2TJqoJGSFy7psyGZBfwIiTs6KSQg8mPVeFUAC0nksVm3QdsYCgWvoatCh+miJHD 1iRpmh5bLIVZanuzyb5ZOnlAz3sfr/Y+rFuLMtOt3iqrsze7qab3uHtln2BipfU8SrnGwg jxpU6QINDwGhAYTLp2Jh564WW4ZT7yY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1/DlcP6NFNh/v3X34McLagCs6euDIA5WhLlrq2giJUI=; b=q5WJWZJVz+RWu2HWspSuO/x/YJev8GQMp2HGU4Z/P9iBlmOoeMR9Zx7OZz2uNolHbu4UI8rZRUlRYVG3qL3ii8beJpNJoTqHiFGuCK3r7VC0xxyae105QO7XJyttOzTATOv2ugMpm2qTpeMbRFvLQI5oxvN1pUOnRq9HRayOpL8= Received: from DUZPR01CA0126.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bc::20) by AM9PR08MB6001.eurprd08.prod.outlook.com (2603:10a6:20b:2d5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Fri, 23 Jun 2023 16:25:29 +0000 Received: from DBAEUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4bc:cafe::b) by DUZPR01CA0126.outlook.office365.com (2603:10a6:10:4bc::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26 via Frontend Transport; Fri, 23 Jun 2023 16:25:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT013.mail.protection.outlook.com (100.127.142.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.11 via Frontend Transport; Fri, 23 Jun 2023 16:25:29 +0000 Received: ("Tessian outbound 546d04a74417:v142"); Fri, 23 Jun 2023 16:25:28 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 988967d30cb6f782 X-CR-MTA-TID: 64aa7808 Received: from a28f41af7f1c.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 73587C64-D6D2-4FDE-BF67-51ABBAC1CF8C.1; Fri, 23 Jun 2023 16:25:22 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a28f41af7f1c.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Jun 2023 16:25:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GSSx+bBmm6VDl2OlIqPEgblGxSh/9RrElryjuSRiGZMnmmgKuNKStak0X/Nr3shFZyq75GlsQTTgEQBXd2ZxoQX6IGTMrOZd23Bod4XlDXV3NbqDgLKgshwwxiyh5I2F5qiVGk132UogI0l1hL1A1sdsqXF3/Vf7Ad0jly8UmbG+8tgM5yCKtbbWS/w1yUa+3cIDMQ8fTE/Zfm6yB9XndjqZHuoO7jnlGKEQMElYu7X7eKwRBCulmTmC53Dgh7yYcR7TO+unriCx8qfGSwFGikDoLU27LBu65vuSftPMSULaADB2O0m00xO9uVjo3NojaF9eGE9CSAlTj3M1MEwKFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=1/DlcP6NFNh/v3X34McLagCs6euDIA5WhLlrq2giJUI=; b=cOifoYhZSyHBF6NAECM5n0/4QOVDrJNsCmjwHlY4phxlHKfin3AVo7Z2PMHGGDV0eXDduBHO8BG4JECqZ6ok29RNfYOGHhgIqo9/EJa4BOE51wnkD9sTLbeavpqe/hp6gnP/M7XdsvhBP+hSTXRiu2RQnvastD2/OBo0ueeOMysjnT9eMFQkqGlul/xoRFoV78u0wEKufW/VkACQ1ziQEJ088/QzIObAAvtxlgGhNnhI2vsMPWSywf44ZkUVgZnquE8aA/AhtC0i6nFLAdmXcRkz2YvxmVqujspbAKr66+zZ/KmKWivA+X+UfCa51XJqD80s9lusoa//3OkSZuh0og== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1/DlcP6NFNh/v3X34McLagCs6euDIA5WhLlrq2giJUI=; b=q5WJWZJVz+RWu2HWspSuO/x/YJev8GQMp2HGU4Z/P9iBlmOoeMR9Zx7OZz2uNolHbu4UI8rZRUlRYVG3qL3ii8beJpNJoTqHiFGuCK3r7VC0xxyae105QO7XJyttOzTATOv2ugMpm2qTpeMbRFvLQI5oxvN1pUOnRq9HRayOpL8= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from DB9PR08MB7179.eurprd08.prod.outlook.com (2603:10a6:10:2cc::19) by VE1PR08MB5630.eurprd08.prod.outlook.com (2603:10a6:800:1ae::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Fri, 23 Jun 2023 16:25:18 +0000 Received: from DB9PR08MB7179.eurprd08.prod.outlook.com ([fe80::43b7:3a83:5cbe:4559]) by DB9PR08MB7179.eurprd08.prod.outlook.com ([fe80::43b7:3a83:5cbe:4559%4]) with mapi id 15.20.6521.026; Fri, 23 Jun 2023 16:25:18 +0000 Date: Fri, 23 Jun 2023 17:25:03 +0100 From: "szabolcs.nagy@arm.com" To: "Edgecombe, Rick P" , "broonie@kernel.org" Cc: "Xu, Pengfei" , "tglx@linutronix.de" , "linux-arch@vger.kernel.org" , "kcc@google.com" , "Lutomirski, Andy" , "nadav.amit@gmail.com" , "kirill.shutemov@linux.intel.com" , "david@redhat.com" , "Schimpe, Christina" , "Yang, Weijiang" , "peterz@infradead.org" , "corbet@lwn.net" , "nd@arm.com" , "dethoma@microsoft.com" , "jannh@google.com" , "linux-kernel@vger.kernel.org" , "debug@rivosinc.com" , "mike.kravetz@oracle.com" , "bp@alien8.de" , "x86@kernel.org" , "linux-api@vger.kernel.org" , "rppt@kernel.org" , "jamorris@linux.microsoft.com" , "pavel@ucw.cz" , "john.allen@amd.com" , "bsingharora@gmail.com" , "andrew.cooper3@citrix.com" , "oleg@redhat.com" , "keescook@chromium.org" , "gorcunov@gmail.com" , "arnd@arndb.de" , "Yu, Yu-cheng" , "rdunlap@infradead.org" , "fweimer@redhat.com" , "hpa@zytor.com" , "mingo@redhat.com" , "hjl.tools@gmail.com" , "linux-mm@kvack.org" , "Syromiatnikov, Eugene" , "linux-doc@vger.kernel.org" , "Torvalds, Linus" , "dave.hansen@linux.intel.com" , "akpm@linux-foundation.org" , "Eranian, Stephane" Subject: Re: [PATCH v9 23/42] Documentation/x86: Add CET shadow stack description Message-ID: References: <64837d2af3ae39bafd025b3141a04f04f4323205.camel@intel.com> <5794e4024a01e9c25f0951a7386cac69310dbd0f.camel@intel.com> <5ae619e03ab5bd3189e606e844648f66bfc03b8f.camel@intel.com> <46a5ffc762bfd6ccb60c9568b7fb564d40c04c45.camel@intel.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <46a5ffc762bfd6ccb60c9568b7fb564d40c04c45.camel@intel.com> X-ClientProxiedBy: LO4P265CA0278.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:37a::19) To DB9PR08MB7179.eurprd08.prod.outlook.com (2603:10a6:10:2cc::19) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB9PR08MB7179:EE_|VE1PR08MB5630:EE_|DBAEUR03FT013:EE_|AM9PR08MB6001:EE_ X-MS-Office365-Filtering-Correlation-Id: 8369b828-20b3-4ecf-1505-08db74067585 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 34lEmS4C+mqFf6r4UUeCWp5i/6n4YPPeeohayU648GYv3ZhlMAL0/H7yrYNqmLZCwQ2y3qRQ+s+kdFD0gAkPO0qkFEdnC5zPqZlq2weLFVRD+BKlrmfe30azzWSBN8Z8m+sQJ5S1HatPT81rbcqFwRwXEc391I4O2vO6CIl5/uKunpNBesT/kUToyIXnbE7WpPBbtw4cnRd6jXKqQcQeU7wsKlogrECtHuBeyQCKHzpLcJUmpVkX3c4Yucp4LJUq3167ClRjbBbZ6UX/9aYnrsy2A+rk2bmty67UMoucI3bqYJ4PqfB9e+jQ/l/UmieGNtTYpK5fu2W6Z46aKa3RtiyGg8LBz9n4MiXe6iBDQRcMWn3pcp7XOF79mjwj9JVu8vjxTP99MRduGroqMYz4iu5Jz7fF4bs5kqTmrfTBLJlDSicBzwwxNVCYPhKNocHz23WxTySwj7UqeYXqPAaal7fFBpVTayPnyXLUZ9nhkGxM792VpdIZogbudjSf+nG+GHHiihNPnGBvZIAGwdjuOCDRHhiuseF14oUav3uqrFx8gljqyJqIiyQKNVb9Ou0m X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR08MB7179.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(136003)(346002)(376002)(396003)(366004)(451199021)(4326008)(110136005)(54906003)(38100700002)(86362001)(66946007)(66556008)(66476007)(478600001)(316002)(6666004)(83380400001)(6486002)(2616005)(8676002)(7416002)(7406005)(2906002)(8936002)(41300700001)(36756003)(186003)(26005)(5660300002)(6512007)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5630 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: cb23ab79-aa63-44d9-fc5b-08db74066e90 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HWQdu0qw7N6V2R4EpXdP2QsxJduWOt7TinXeZ5RzDa5zsUHxcJHN/h/3N8XzhPs37kjDIgc4kfivyvULrOVE8pFzQaWHClaoi6S4a361KEt41tZYkAO+brFuTFKhnQsdXl98c3Bg34M0BKplGX49TTM7yV0FLdsu+8yNnBMWiiPiv0tIxexUC/IgxFZEBzt/mZ8gNOzdlH0thTMEuSxCPkdNvharIvm587qouZ78nCaZiWUv698ni6/uRtPq1d7Fjq2B2qUBx+0qg1JnpS3b6+qWST54yDpt8Cfuo4ch1iLAT2QK8r/BwG2OyQFCTOQUv/GObuATtbF1aTIldAPQXJdXa5II8/0FqnANMyDO9YnNwYFPJU4RypK0VWM0EdY/vN97FDf5Ipw9nmRuALlCE2js2fTQeFbw7+NrlVX9lGOy/PR3VE9EYGe1sGo1hQV+NMUkUtXCps+QieMldQbr/I8pVNeo1IMW3XkUkIkzTFP/w5aeVbQbUc+1KIfAHfjzJnVJ2Lb9nrtfPw6R42b5gfT9rOftlBTxomC2Tpp5yROMnRikSjxSR08bQ3P1D5Cw9B34CMNSmtKzFmiWbLcvXNB5wGWY4N5tVlHT+oEpIbZYUg3oqw6U6Fdfp+U2vlPcws+z002HU2KVeBGJpLnZOMDtu2YiFXgKm/kWv5UhC2vdOigozFHEvvrkRKbEThcNtfDe7mkXX0FJc3o/CPu08GPacvzgHmaZGKDKjKVlAdyJmwT3K7tfb5R55by/Yf89 X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(136003)(346002)(396003)(376002)(451199021)(36840700001)(46966006)(40470700004)(6666004)(478600001)(110136005)(54906003)(4326008)(2616005)(40480700001)(86362001)(83380400001)(336012)(36756003)(47076005)(36860700001)(2906002)(6486002)(82310400005)(186003)(26005)(6506007)(70586007)(107886003)(6512007)(82740400003)(81166007)(356005)(40460700003)(70206006)(5660300002)(316002)(8936002)(41300700001)(8676002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2023 16:25:29.3182 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8369b828-20b3-4ecf-1505-08db74067585 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6001 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 8801C20004 X-Stat-Signature: jm7fgunced9j7d5a3fnp6yoajb4bjsjt X-HE-Tag: 1687537564-747328 X-HE-Meta: U2FsdGVkX19C8edDvQI9PjxxnXOfJbfTAGjlbUJPDhD+jxUEj3QuT3n6hdYwemaiIAmTui2g4mi0yLFI2JMewjLj3mvnMhM1xJ1vnoIufqIwNT6wQQFgQHG+2EWIysRFjJh3YtCYeuBYq8bgeSs9ilnI7r+s8rBOICMBnXo59vaIjBDUkyRwoOdNnamPFvSvHONlL5HSzFI84jAwogfnkxt3+ZKJYbihKnQHg1sdzQ0E5Uk2GR/4NaYj2MLPxHH/43WZDUV9IBWFnoxm+SSbHm6zYtbymzf8TqzhcEAL4iObytwnsksuiMhl6Zmhz5AG0mAq9sNY4JkBWiRRjY2ck9y6+gbImKz2pzFf+MCmsUf2cpMuCSCVDMK3TJ/5Mtr4lLNiaSKyib1o1x1kkg0rcZvtNMlkub5+owcQcMbdB9ecNJzIb34aU21mLRmCV9PzRtikLSfoXjxQYK28T1cD+yiyZVic/iZp+LDCZWLSruwarWn9eEm59EW2fp+G5mLgWDzMFuhkfUkKaBZ+qC7xzJWjVh3qWGtWmUt3adARICSGnDV2AktKuGqa5Yq1/ybTA1imJL/JdmJCn1GzArRO9iVQ4pTIqO26yKRNyDtcRGwe6vp2V9vrYqCzH2vJ7H+h/BKoj528MrildcSgO65mnffu+6Nx1iIY9aLUMVR3w6N4dzq3NT+VKBK/z8LMu/c8bedpvFg/gwf3AGWTa79CRrOc9htHu/mf+BT+vZdpokqcOxQTThz2YzIVeKFjMD037l4qXxK9+uenrSiIpfxgm4r+WuYH9nmxZHSf5bHahinnDeUZ1ufR6eW0n1aFFMbS36bybdW7anku+EPhAdWGBWCEqp5cQBNH2IjveFckfa5mNVCi6iBsIXP8LjHmO8n8eybK1R4hiYRuJeLxZyTzDBmtE9cDGnBcCf0CFEqVmYUcpXlo4FjTOAVUpfPYhdvfl8hMeSlTQV5D+TQTFPd Y9wk1Yw0 61onLNQ9D2RuNuRj8t9Dn7NS7gpSpOuYO1Nfc/HRbuQP70fuzbmyBD3vzE1Mi3IaUhrLRL0owDPqaxZjx+Q/BFm0FIfvZXX77ldkBnfHwbG72f0VX27vx+DWSioTTf7dlzgU9bAeIJbilhpPl4/Sjf7mC1C2Gqq1SOJN+lCGe/i2GiMTljhgNwn+huH33h3suOHDxY1UPWqhq69aBZ6dzmIR7RqMfDoct2N/kcpWjiIu06QrUMk/D8s5E6XXqOZniEEHkQYHjqx9HJlS14UMoTExK3kxC18rs8qU+G/DNAjohQ6OzWnlVabe6d73eo3SIBvqh4jL46szDfX+MyfXvzoe6mWrjJ8V3DRV1WTdPH/tilJ2GnmumiXqwrUWS4n1vqc0ae3rrFyhebqvJmvarXawdyAHaSlrKAqQQnuQ93Z/xWFmOBeghKLN15s4jYuK5t3tGqYni0goJiNpsSSHt2e6kSfTtn3amXDDXE14I0Kk+bUs2PXu7IU4iKL5urOCxlpPdz0dNManHSCO/Qrl4xvBxyGgqKL94+07trsyneXF6ezPIT+cApXn3F1+GxE/5+UkDGbzAROmfDJ/zVpudMACaMvyXfzthQ9zGnyNs4liAlSJ7zVXzHAndk8pE4Z0dx9vcvNZlPBT5gBM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The 06/22/2023 16:47, Edgecombe, Rick P wrote: > On Thu, 2023-06-22 at 09:27 +0100, szabolcs.nagy@arm.com wrote: > > > [ snip ] > > > swapcontext is currently *not* supported: for it to work you have to > > be able to jump *back* into the signal handler, which does not work > > if > > the swapcontext target is on the original thread stack (instead of > > say a makecontext stack). > > > > jumping back can only be supported if alt stack can be paired with > > an alt shadow stack. > > > > unwinding across a series of signal interrupts should work even > > with discontinous shstk. libgcc does not implement this which is > > a problem i think. > > I would be helpful if you could enumerate the cases you think are > important to support. I would like to see how we could support them in > the future in some mode. > > > > > > But how does the proposed token placed by the kernel on the > > > original > > > stack help this problem? The longjmp() would have to be able to > > > find > > > the location of the restore tokens somehow, which would not > > > necessarily > > > be near the setjmp() point. The signal token could even be on a > > > different shadow stack. > > > > i posted the exact longjmp code and it takes care of this case. > > I see how it works for the simple case of longjmp() from an alt shadow > stack. I would still prefer a different solution that works with the > overflow case. (probably new kernel functionality) > > But I don't see how it works for unwinding off of a ucontext stack. Or > unwinding off of an ucontext stack that was swapped to from an alt > shadow stack. why? a stack can be active or inactive (task executing on it or not), and if inactive it can be live or dead (has stack frames that can be jumped to or not). this is independent of shadow stacks: longjmp is only valid if the target is either the same active stack or an inactive live stack. (there are cases that may seem to work, but fundamentally broken and not supportable: e.g. two tasks executing on the same stack where the one above happens to not clobber frames deep enough to collide with the task below.) the proposed longjmp design works for both cases. no assumption is made about ucontext or signals other than the shadow stack for an inactive live stack ends in a restore token, which is guaranteed by the isa so we only need the kernel to do the same when it switches shadow stacks. then longjmp works by construction. the only wart is that an overflowed shadow stack is inactive dead instead of inactive live because the token cannot be added. (note that handling shstk overflow and avoiding shstk overflow during signal handling still works with alt shstk!) an alternative solution is to allow jump to inactive dead stack if that's created by a signal interrupt. for that a syscall is needed and longjmp has to detect if the target stack is dead or live. (the kernel also has to be able to tell if switching to the dead stack is valid for security reasons.) i don't know if this is doable (if we allow some hacks it's doable). unwinding across signal handlers is just a matter of having enough information at the signal frame to continue, it does not have to follow crazy jumps or weird coroutine things: that does not work without shadow stacks either. but unwind across alt stack frame should work.