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 X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10CD6C5519F for ; Wed, 25 Nov 2020 14:39:53 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 49D192083E for ; Wed, 25 Nov 2020 14:39:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cvNnDs8T"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="ZVFGMKWg"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="ZVFGMKWg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 49D192083E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5lsJ0dgORE5YHN8jxRhKffsJ6RCYuDzUdtV/Tk4B4WI=; b=cvNnDs8TvGwOzcycj3jrSJzg+ s9oNsmf5PHvlj87Vs9wkOFt5950ujfzTsjfxWhuxXRzpeX8qZofojgBV7S6arDFfnRmz5nvvm6Usq Qy9souQtT+9nuqBHnGuFjE3TVl+kYZy631RSmw/S88JeMCbdxIDWiLzTK5mbMkEMpGL8sKaBwhuad fCMeVQiB7vSjWmWv/7VFRgOP0kcCCeQsnMgcUp5Z83wmrEj0u7331pQRsIhIYtgNfm8NSF/Zrl5Ec VqKtcBBH1y8QBrGnL0Em3Rm8AdwPN8g1bRx6Cx0yXX1sQXqGjm89yEi/qkgZ84A2qNdpA69DoyVdx bEKjvwM4Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khvw0-0005iN-NA; Wed, 25 Nov 2020 14:38:16 +0000 Received: from mail-db8eur05on2051.outbound.protection.outlook.com ([40.107.20.51] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khvvw-0005hf-Ql for linux-arm-kernel@lists.infradead.org; Wed, 25 Nov 2020 14:38:14 +0000 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=jrKkcCyZ3NT3eX5cRm+jpTomxuPLMcCvUvcXCCeCCRc=; b=ZVFGMKWgumBOCk5wdyJG0HZtb3J2jG7Kk07nz7/wHNQwXChV1OgDayaz5WWgi59CujdNZUcTPSzW7ToDKZm0Q5wY3E7elD9vVN6A0DPY14vhzuHYcvv3P576jpH6QXpw6wyYlJc3LDvTqHDGh0R5qJBsErwRRyBJsu1HDZeoD1Y= Received: from AM6P193CA0071.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:8e::48) by VI1PR08MB3456.eurprd08.prod.outlook.com (2603:10a6:803:7e::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.22; Wed, 25 Nov 2020 14:38:07 +0000 Received: from AM5EUR03FT033.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8e:cafe::13) by AM6P193CA0071.outlook.office365.com (2603:10a6:209:8e::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3611.22 via Frontend Transport; Wed, 25 Nov 2020 14:38:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.infradead.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.infradead.org; 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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT033.mail.protection.outlook.com (10.152.16.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20 via Frontend Transport; Wed, 25 Nov 2020 14:38:07 +0000 Received: ("Tessian outbound fcd5bc555ddc:v71"); Wed, 25 Nov 2020 14:38:07 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 33931dd6d35c8835 X-CR-MTA-TID: 64aa7808 Received: from 84a9dd5f86ae.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B95AA5ED-A476-41B8-91AB-7A6399F6F553.1; Wed, 25 Nov 2020 14:38:00 +0000 Received: from FRA01-MR2-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 84a9dd5f86ae.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 25 Nov 2020 14:38:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IQUHDSPrwESwUBUW+Ik6A1lx/B3bW2ucUMZmMWttPUqoepaaeuljMuiLAKotWKr5YnyEro/RoXQTIzjDfMd8pLXA2dJypZkykJmwEkY+rqfvIoBbhe5PMg5aTg/qS+olu/2iWVLz1o8tkMx8XEBcaTZ3S6zMv58J4Jr2KRD+aFzV6nijAb3zxKUG6r1dQTohIFVP+KChz/QPdNZlAg7qPUfpqL63f6UfOZ5NUmGuaHCtyiTITGf/JP/K0YgfF96Sojy3zknw9fIAgUk8Kp1/g1wYIWbvP9RppLnh7r2yCD66xw52k7tQyDWRT+rEh3BiuZXKrvObef4abHEFX71B/A== 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-SenderADCheck; bh=jrKkcCyZ3NT3eX5cRm+jpTomxuPLMcCvUvcXCCeCCRc=; b=gLLugsCQZWl6sKMntp9hIdKAu4q5S+q6Yv9+OtGj/VuOsS28JHcbmCxLAgPnj7vUMPvd0/abH6iOr8tVGB/A8mYV9hsWDf19Oao9kcjyOQScEbZC5YKW8mRs0B5v3y+TqbpTyPuNEqVcrMDMd976wdiYa9s92b/WiwjD7HrpIOuWb2LbQH3DwwULIWpWufzMuh70VRonBuUj4yWwfAVN5hKWoz6iu4nukGI/BAQr8727mSJNPtLFPu6PoUbKeU9gIOeICO4pOgg6FbkRmU4hltC/V6betmuuRWqJlrCzlt8gupxkHopUR+1MJzA44VdLyL35btPmR7B9ZlJKWtChBA== 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=jrKkcCyZ3NT3eX5cRm+jpTomxuPLMcCvUvcXCCeCCRc=; b=ZVFGMKWgumBOCk5wdyJG0HZtb3J2jG7Kk07nz7/wHNQwXChV1OgDayaz5WWgi59CujdNZUcTPSzW7ToDKZm0Q5wY3E7elD9vVN6A0DPY14vhzuHYcvv3P576jpH6QXpw6wyYlJc3LDvTqHDGh0R5qJBsErwRRyBJsu1HDZeoD1Y= Authentication-Results-Original: google.com; dkim=none (message not signed) header.d=none;google.com; dmarc=none action=none header.from=arm.com; Received: from PR3PR08MB5564.eurprd08.prod.outlook.com (2603:10a6:102:87::18) by PR2PR08MB4874.eurprd08.prod.outlook.com (2603:10a6:101:1d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.29; Wed, 25 Nov 2020 14:37:58 +0000 Received: from PR3PR08MB5564.eurprd08.prod.outlook.com ([fe80::ac13:db5:ef4:2dd2]) by PR3PR08MB5564.eurprd08.prod.outlook.com ([fe80::ac13:db5:ef4:2dd2%4]) with mapi id 15.20.3589.030; Wed, 25 Nov 2020 14:37:58 +0000 Date: Wed, 25 Nov 2020 14:37:55 +0000 From: Szabolcs Nagy To: Peter Collingbourne Subject: Re: [PATCH 2/2] arm64: allow TCR_EL1.TBID0 to be configured Message-ID: <20201125143753.GO20578@arm.com> References: <20f64e26fc8a1309caa446fffcb1b4e2fe9e229f.1605952129.git.pcc@google.com> <64c0fa360333fd5275582d25019614156a8302bc.1605952129.git.pcc@google.com> <20201124184742.GC42276@C02TF0J2HF1T.local> Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [217.140.106.54] X-ClientProxiedBy: LNXP265CA0025.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::13) To PR3PR08MB5564.eurprd08.prod.outlook.com (2603:10a6:102:87::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.54) by LNXP265CA0025.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3611.20 via Frontend Transport; Wed, 25 Nov 2020 14:37:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ec23eecd-efb6-467c-6fbc-08d8914fb9ae X-MS-TrafficTypeDiagnostic: PR2PR08MB4874:|VI1PR08MB3456: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 3/w4cF5lUqhnrclVmlYKn75Bux/X/4ayWUGXcUx88vEFC+5/+JNgssyYOuddbQz6eUXub9ygWBCcMMliQ07KwnOhQJyr/wx1X0mySW8+cAQ9rXFCToUxm2A9mW2mF2D5sU3HGhB0ApnrXf2v7jm4UVXlbYSIiSv3OmFo3j5NvVgs35oeaVZZtxUELLdC246NGHE5BbpDnGDIzighrqtCxtKmfmNO0cGI5kJxj4+CKGJt46mfgaKI98GOAQY3z3H0IDHNGyZLMyKq3Q/LUcjmGyR673hpIfwKDlGDfF0JE5t0lwTc5dKgla/4Vpdol+mwZwSFbLU4btHQ/pBcYU+vwqpCVojsH+KsFu33k+tDGHYsPz4Cbp66OhoQYM7+6cmbii1xEgvVrd/7FWYjvhskhQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR3PR08MB5564.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(366004)(346002)(136003)(396003)(376002)(26005)(66946007)(2616005)(316002)(2906002)(44832011)(6916009)(66476007)(66556008)(8936002)(8676002)(55016002)(956004)(83380400001)(4326008)(16526019)(186003)(53546011)(966005)(1076003)(36756003)(5660300002)(478600001)(52116002)(8886007)(33656002)(54906003)(7696005)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?NDQwSFJ1d1pndkdjSnpOUnUxS3cveDJoM1A1Nm5waXlwWnRjTTJrbVdwK3E5?= =?utf-8?B?ZHNnekdZZzhsMXc4ekxwVHN6UGUxY1YxOElPb0VMamN5L3MzN2tnaHFsUVM5?= =?utf-8?B?VVZzd2lNMFl1aktBZlE0NXZlNEllWmpyMDNKb2EwYVFxb1JLZnZlWW41TjZt?= =?utf-8?B?Vm5KTDViWWZLalRqL0RQS2pySS9FZ1pXZW56aHh0aWVHWk1Yc0JHcFhWZ0Vt?= =?utf-8?B?YnMrS3IyWlFWOFdlS3BPa214a1dZb2QxYlJpYndDVStic1QrZlkzSDZXRmlR?= =?utf-8?B?SlQrUUc5UXZLN3piRUV0MzRCcGNYcU4zT2NHakRrMHM5THF2V2JCc292MXlk?= =?utf-8?B?UmhlQWd0cnFVT1pscExxTk9UOFljWnpGTGNwaGZOTWVPUmdRaHlhb3pZbkpU?= =?utf-8?B?dmZiSitRMURmZHlCcE5QME5yZTJ4OUZPMkJKemJ3cWFSWnFzanJXNlIrRDNF?= =?utf-8?B?Q1E3dWNqOHNPYnRjM3NJMU9HK3lFYUpwVVFGTVdTVDBlNCtRRVVnZFFHc2Ey?= =?utf-8?B?Zm0zMGtBVENVUnVRdnR6R1MycFNkU3FJRDU1WXZhWmk1aXBZZ0srbUpZeGs4?= =?utf-8?B?amRuYllLNzFQNUUvWldJZzhUdXFrMXI3c3NSVkpzRGJOaUVvMGFKTEpIMnFU?= =?utf-8?B?OVN1RmxEcWZoUnpxZ3dMSjg2cGozZVZvSzA2UFE5ZEZNZEt5STVVZUtaQkEy?= =?utf-8?B?cUVDSWhpNXdKTE9rVGRPZWZ5QkRaUW9HQmpDTFkrQ0xGVjhnQjdvWk5ESy9u?= =?utf-8?B?SHU4TVZiWmpCQWlRendxb3Vmd0xtUVBFWmQ1VEtJdmRaUWEyaUozblZIcFRK?= =?utf-8?B?TUVvVXZvOS9WbFgwZllwQUdDYjlKeTlSRGtJRWZuWkVGY1h0QkM3bkhJd3pX?= =?utf-8?B?dTB2aElia0tzVHJTQlhSdHVFZE55SmpGZGY1alk2b09nRG1wVGp0b2piTTZS?= =?utf-8?B?R3lBajNSQi9ITDllakcrVEVHN2w0ZzAzT09aWVpsVnp1YjROMklwTnRqQ2F0?= =?utf-8?B?bGpuZGpGMkI0K2ZKWTNLQ0hpcGR0bk9hZW5rTzkxQXUzMDBKeWliTWNwT3h1?= =?utf-8?B?dU1PajM1QjViZllkbWdYbnJneHlVWHpYKzJmdGFHNG9tcDZJWktLSTBQY05l?= =?utf-8?B?bFB2anI3YmpORFJaYnI4R2NqZFpyL2F4bW8rOXVRNGZkMEgyU3FJS0xPT3Fn?= =?utf-8?B?QVNmSC9rSnRKRTBBc21yTDgxMC9WNFlqNUpKMTA1QVJVWjZZQzQvU09uK1VU?= =?utf-8?B?T3l0ZEI3RHVIRzBaOFEwMWJ5ejNPNjY3ak45ZDFHM1BDL2tyclNDdjJjQnd3?= =?utf-8?Q?fUArBgAi97ZucK267ih9bnPQfpci72P776?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4874 Original-Authentication-Results: google.com; dkim=none (message not signed) header.d=none;google.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: f4229882-fb1d-4984-7dfc-08d8914fb3c1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Mc1+bYQG8GkcuuPoQ1rN5MLjRVlQtNFN7vkW+mXK0iicitegzw2Yh5V+J9OzlWIn1Tbyczz3WIHu2N3t9pcUhOAwSwlr+JBPRqW3I9/WRRL1CVLiFk0tJufLPjav95xq12V8GqkBxYq71E3GAuUpLwax7WLQXPufUIiPEqkGNNxoMsljDf0zY8Odald6eQ6VegxfqHb0sPUzLJn9LzbRDLEEi+EZFtuKK/jmu1CaG8nTdreudM37MDS8tnapCQo0VF1/M4+QsGnacPTg3eiGryVbylNAg51ZeUp5AWhuXPVgSFymL1TKLxLlNpFbf3ZeIaasTp6ZfORebpXER2Fi7nRFjjKQXmgfYMlmDw9MbcUVQWfVDeAQPkQcFobtq8Uah77IVCsA2o84en2ChIQ59Kqw51eFhtmr2cnHu8QYZ4srYLkNQAooGhChBWOmaGBhgpTf77CToVQecrBbt1EKnud6IE85DBeCNczETxe0lUs= 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:(4636009)(346002)(39860400002)(136003)(396003)(376002)(46966005)(478600001)(8886007)(70206006)(82310400003)(81166007)(33656002)(86362001)(1076003)(82740400003)(70586007)(5660300002)(83380400001)(47076004)(16526019)(4326008)(36906005)(36756003)(2616005)(966005)(956004)(55016002)(8936002)(356005)(54906003)(8676002)(316002)(7696005)(53546011)(336012)(186003)(6862004)(44832011)(2906002)(26005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2020 14:38:07.5966 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ec23eecd-efb6-467c-6fbc-08d8914fb9ae 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: AM5EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3456 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201125_093813_094778_CD656D2F X-CRM114-Status: GOOD ( 36.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nd@arm.com, Catalin Marinas , Linux API , Kostya Serebryany , Linux ARM , Andrey Konovalov , Vincenzo Frascino , Will Deacon , Dave Martin , Evgenii Stepanov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The 11/24/2020 11:18, Peter Collingbourne wrote: > On Tue, Nov 24, 2020 at 10:47 AM Catalin Marinas > wrote: > > On Sat, Nov 21, 2020 at 01:59:03AM -0800, Peter Collingbourne wrote: > > > Introduce a Kconfig option that controls whether TCR_EL1.TBID0 is > > > set at boot time. > > > > > > Setting TCR_EL1.TBID0 increases the number of signature bits used by > > > the pointer authentication instructions for instruction addresses by 8, > > > which improves the security of pointer authentication, but it also has > > > the consequence of changing the operation of the branch instructions > > > so that they no longer ignore the top byte of the target address but > > > instead fault if they are non-zero. Since this is a change to the > > > userspace ABI the option defaults to off. > > > > > > Signed-off-by: Peter Collingbourne > > > Link: https://linux-review.googlesource.com/id/Ife724ad708142bc475f42e8c1d9609124994bbbd > > > --- > > > This is more of an RFC. An open question is how to expose this. > > > Having it be a build-time flag is probably the simplest option > > > but I guess it could also be a boot flag. Since it involves an > > > ABI change we may also want a prctl() so that userspace can > > > figure out which mode it is in. > > > > > > I think we should try to avoid it being a per-task property > > > so that we don't need to swap yet another system register on > > > task switch. > > > > Having it changed per task at run-time is problematic as this bit may be > > cached in the TLB, so it would require a synchronisation across all CPUs > > followed by TLBI. It's not even clear to me from the ARM ARM whether > > this bit is tagged by ASID, which, if not, would make a per-process > > setting impossible. > > > > So this leaves us with a cmdline option. If we are confident that no > > software makes use of tagged instruction pointers, we could have it > > default on. > > I would be concerned about turning it on by default because tagged > instruction pointers may end up being used unintentionally as a result > of emergent behavior. For example, when booting Android under FVP with > this enabled I discovered that SwiftShader would crash when entering > JITed code because the code was being stored at a tagged address > (tagged because it had been allocated using Scudo's MTE allocator). > Arguably software shouldn't be storing executable code in memory owned > by the allocator as this would require changing the permissions of > memory that it doesn't own, but from the kernel's perspective it is > valid. it might be still possible to change this abi on linux by default, but i don't know what's the right way to manage the abi transition. i will have to think about it. i dont think PROT_MTE|PROT_EXEC is architecturally well supported (e.g. to have different colored functions or similar, pc relative addressing doesn't work right). (tbi for instruction pointers is unlikely to be useful, but extra 8 bits for pac is useful. i think we should be able to move to an abi that is compatible with either setting.) (i think supporting mmap/munmap/madvise/mprotect on malloced memory is problematic in general not just with heap tagging so it would be nice to fix whatever jit that marks malloced memory as executable.) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel