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.4 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 9885CC48BE5 for ; Wed, 16 Jun 2021 12:58:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 60B5061019 for ; Wed, 16 Jun 2021 12:58:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60B5061019 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Subject:Cc: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=lYMOylgVE4kZV9oFDFHfLzn+vousWQD/asRYeOtxNqE=; b=EY2XdanQ6YaYcy bCUGROiCCnBNjY74h9ueNidtOoPNpe/XKrsmOhWLBvnaegTWVaID/HpfB0GpNfyIHM9bmdDr3bj3x gweRx9oGPPVLEHcqlR9vnKyMTaC1mKimb+L3PeBm5tshyW8fhFfKigXwIVzwyrV0xp3HV36bdA7nR /F4T8L7XkOE16nb4E+UGkYsNBP2tHH7Yr4x7silFxu3y/2dubSUWKfh0CUz9iCRwGaPhra3EZQMCF zd8lGk0q1nJ8xplZ2m1TsUUT9MWKjoncMnn+R073jB6ZuA0owHf4UyTUBCMnEkf/wvBU7PFXkETHW fD/30PYKZNBhW7mMmepg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltV5m-006K8e-5g; Wed, 16 Jun 2021 12:56:26 +0000 Received: from mail-vi1eur05on2065.outbound.protection.outlook.com ([40.107.21.65] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltV5g-006K65-OK for linux-arm-kernel@lists.infradead.org; Wed, 16 Jun 2021 12:56:23 +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=pNqoL0HL8R0kb7AWjuFxlgNNGn1MRNEwkjwuXd+f7HE=; b=8PTOL5SR3uVs4vkwP4az0+9SJqRQFQLALzdxr8LnEQSiwqM3897x9UM04pQxEs1+RdDztVLTnDrwEQoFRzlLzK9cBQZbi1heSRLKzPb6fXg3o1Y2p0lx2oyzvzrJPMe6QTELcFJB+bEllm0xgqY7P4DzjZzNiNFKMC24UDB5C8c= Received: from DB6PR0202CA0031.eurprd02.prod.outlook.com (2603:10a6:4:a5::17) by DBBPR08MB6220.eurprd08.prod.outlook.com (2603:10a6:10:205::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15; Wed, 16 Jun 2021 12:56:14 +0000 Received: from DB5EUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:a5:cafe::7a) by DB6PR0202CA0031.outlook.office365.com (2603:10a6:4:a5::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Wed, 16 Jun 2021 12:56:14 +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 DB5EUR03FT007.mail.protection.outlook.com (10.152.20.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Wed, 16 Jun 2021 12:56:14 +0000 Received: ("Tessian outbound 596959d6512a:v93"); Wed, 16 Jun 2021 12:56:14 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 442c89f34507cde8 X-CR-MTA-TID: 64aa7808 Received: from f08631b6cba3.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 55CB67C4-3E85-4974-A7CD-7AFC8D7C924A.1; Wed, 16 Jun 2021 12:55:50 +0000 Received: from EUR03-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f08631b6cba3.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 16 Jun 2021 12:55:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AYo6nWhohR7SH5yqOsmnZnUMpPuL7PnNszok5HSa04XeExpgIDlaYknEinAn2dqWZ6vgYYibHuWdJeZkb2MzG9Q3kzNJwaJE0yYLN2zm10Dx5Hd2AGmbdjYXvzrQbqiv+N2IEV4WK5cRoIK9yfzqNq0vsUbA8uce4VR1PND9FEkxw2w5FP/ppoMDHTDpMZ+Ib52uEmknKpCZ3N93d/723BWHZjaGeMPDW8csbvb8igDJGU6SoZ1vJlVzY3IkyYF3Bi++3mfF8wD+BAr3jD1Gyf1wAEzpon2VrZU1rnG6uxQwq5rrTVwIf0L4+J4wSXEAKeBAoK32eh6nxvd8+9pLVQ== 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=pNqoL0HL8R0kb7AWjuFxlgNNGn1MRNEwkjwuXd+f7HE=; b=gypcYB3wSv6kR0Lb7t4dNKYwR4f8ZlaOXA5dUc0frM9/PFKdGRWQeeCThGEenoKDIVXdIzzf7/FaPyotshvzxSe61NW60ea/GY6SU+SFqSb9M09LYr0/oEBNw/zR1POyeUpzudGH71oZ30+0+E4xHDE5XYpbOhuNWekMRfceGA89le1ZgpYkHFnubp92W26+/qfeQrg/VaEhH3Z73vwmRREzIo7f4NxvqnN8SyFrogjgDamZvWIwhJu41uTsaeN24HBet3Ist8Y2kNA8cqdKI/liO/LvFhoRcQJrMPB7RdwBcXuAIoVntS8cButcEJ2VW25HAgAiHo+RIQo9W9JcRg== 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=pNqoL0HL8R0kb7AWjuFxlgNNGn1MRNEwkjwuXd+f7HE=; b=8PTOL5SR3uVs4vkwP4az0+9SJqRQFQLALzdxr8LnEQSiwqM3897x9UM04pQxEs1+RdDztVLTnDrwEQoFRzlLzK9cBQZbi1heSRLKzPb6fXg3o1Y2p0lx2oyzvzrJPMe6QTELcFJB+bEllm0xgqY7P4DzjZzNiNFKMC24UDB5C8c= 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 PA4PR08MB6320.eurprd08.prod.outlook.com (2603:10a6:102:e5::9) by PAXPR08MB6927.eurprd08.prod.outlook.com (2603:10a6:102:133::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Wed, 16 Jun 2021 12:55:46 +0000 Received: from PA4PR08MB6320.eurprd08.prod.outlook.com ([fe80::e5bd:60d4:dce0:7d63]) by PA4PR08MB6320.eurprd08.prod.outlook.com ([fe80::e5bd:60d4:dce0:7d63%6]) with mapi id 15.20.4242.019; Wed, 16 Jun 2021 12:55:45 +0000 Date: Wed, 16 Jun 2021 13:55:43 +0100 From: Szabolcs Nagy To: Peter Collingbourne Cc: Catalin Marinas , Evgenii Stepanov , Kostya Serebryany , Vincenzo Frascino , Dave Martin , Will Deacon , Linux ARM , Andrey Konovalov , Linux API , nd@arm.com Subject: Re: [PATCH 2/2] arm64: allow TCR_EL1.TBID0 to be configured Message-ID: <20210616125543.GE12580@arm.com> References: <20f64e26fc8a1309caa446fffcb1b4e2fe9e229f.1605952129.git.pcc@google.com> <64c0fa360333fd5275582d25019614156a8302bc.1605952129.git.pcc@google.com> <20201124184742.GC42276@C02TF0J2HF1T.local> <20201125143753.GO20578@arm.com> Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [217.140.106.55] X-ClientProxiedBy: LNXP265CA0092.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:76::32) To PA4PR08MB6320.eurprd08.prod.outlook.com (2603:10a6:102:e5::9) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.55) by LNXP265CA0092.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:76::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15 via Frontend Transport; Wed, 16 Jun 2021 12:55:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4a0ca38a-e7eb-47e3-1725-08d930c61fa2 X-MS-TrafficTypeDiagnostic: PAXPR08MB6927:|DBBPR08MB6220: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 3xL6HZBF8pzeu6F7BjlJq0t4T/J1XEz8Jsn8Aqj/oF5SFGb3swPr5gd9uw4luW9qa5m4TVzfx69qOUsAb975e2fxiqtoSVFnt7ey7RBp7Jbmph/p/sUKFj3RoFU9R/NOe88DyLxKlJA7NZ+kkCREAI4W0eyV5xl/tKNirnoQ6qzk7JbrB9TlAEyxuYZi+IuJJOJVnxgkp/tIZ4SK3itmotJ2RMpy8JMw6jW5GVu8OFt0N1Etcs091F1F33FFGVHdt9T9Qt4UWkrpbQGl6IAaKmKs2AC307EZD7pd17QtAQaTIcVirhRS/oasl0pAfljtbmlefnwWMzrqSHcTmUHFkRQmLOM+O6BI0lHWgSPjf8elCVlPPhn9UGlv1xTup6V+FFbfwPl7embkxxrGbWvDjvxd4s9AyPb+UULzEpaHu+YI1cofY5cxQwMY3sTMLpSNQDTa5Xv9I7ImzIZezEme4c6KycuzXB42KzxCXT+9gfC+k6cjlcYnTf5zK/UQFYqK7ndYCd/FNW47iEOF2UrkeQPfMLq4SSHs3AJL/3wqF5byRqoBMihzDFay35dFJFrzbMwE7gRb6HunxJcGzbkF2Z2KZHTDRgJfRlot2QObOuoyWYbkwfF7ztSLoGzgDnQEEbKulwr7XNtn3XPiidKOnisKPpioTY7b+Xe+CDl/O+7jT7f095ECHOpaWVM+5xFzaqdwzG/JmYsH+qqOEh71GEUluXA9Vk11bZNfvu30yEdMsf1kbWXJ1ATvTh8ljM9G/R41DBfpPmUW4fg8G1DNYw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PA4PR08MB6320.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(396003)(136003)(346002)(39860400002)(366004)(5660300002)(44832011)(6916009)(83380400001)(38350700002)(38100700002)(55016002)(36756003)(53546011)(316002)(8886007)(66556008)(1076003)(66476007)(966005)(478600001)(956004)(8676002)(33656002)(4326008)(66946007)(86362001)(54906003)(2616005)(16526019)(7696005)(26005)(186003)(52116002)(8936002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?M1ZjU2N1bXY1bFdsVWVnby80Ry9XNGhQY1RlblVIVy9xelZtellXbGlmTlpQ?= =?utf-8?B?K2J3YTJDMjZwdjhJdUN2SmdTaytWZzZGYVBzS1FsbmROc25VVWFYY3VnaWF1?= =?utf-8?B?cE1GTHh5WnVCZ0JLeGFhZjhsVGNpcldOTDNUdXlwZXhDOWZxcHRubkk0TzZC?= =?utf-8?B?SE5DYVN5MlYycFBUYkZNdjZqb1FnYVFocGpaZXlZOFc2NUhJYnAzZDlWdW91?= =?utf-8?B?TXpURlAxQU0vSytPOTNrL0JzRzdKc3lISVYxbTJkb0NQR0NEU3ZJbk1PNUVV?= =?utf-8?B?RUphRmprSEF1NzJFdXRibWYrMnFQYVQwUnUyZnlsdGRrRklMdWNPVmRCU0xv?= =?utf-8?B?dHF4bjFTVm14bGFXTmZVTzl6VXNmTlBQdTJTS2VUek80NitwMzd4aHBPNDFI?= =?utf-8?B?VmZEdkFNQnNja1Jad1pmbDY2V1ZrRXE2VEZTandXdFZrdHkzRlNKMlUvNnU0?= =?utf-8?B?UG8yNlNrY1pLVjRVVUJTbmljQm1VNGFBNGUvTnlsSktBeHRTVUl4WThRRlM1?= =?utf-8?B?cVpNVUhvdWkyanNOakhMYkE4YmtSUktDTFQ2TmpsZGMyNE13SS9YZlRrRFlB?= =?utf-8?B?ZEEzeWZaaGNZRWswUWVmaW5RSFEyclN1czJOTGdiTDNrS0poS09iVDBhR0Fk?= =?utf-8?B?T0lDcWNPcERIV2VaaWVpRXlZdDdMK29uN2xOZVdyaDh4aWtMc3RjMGwyVFV5?= =?utf-8?B?blI2Q3pRUG9xSzYrajNTbVdOTnBsZ2QyYkpCT1o0eHRHRnVkb1FoUWZGd09Y?= =?utf-8?B?TTNmMkJIZmlNeWtqOGUrbnk0L2dKNElPcUMrQ3RkeFhCbXNLdUNJQXR5MDVw?= =?utf-8?B?a0NQanUzd3IzNGFkQXhUQjhDb2VuQzhTNlp2aWhHOG1Yb1NEY1A2VXRUSkll?= =?utf-8?B?YzhNamQza1R6YnVDZlFmUHFEWjJZWUZaK0lLTVFQSU02SFZvMFNWaCtvVTVV?= =?utf-8?B?cWZEZ2VFSXVWczhVTGc5aldEa09laXJYY2J1US81aVJjQ010TC80enpmekt0?= =?utf-8?B?aVVuZzZDWnNjMm5pMUJTb29jUHhBZ2NrQU1BYnhTN0lWRUszVHliSE5ubVNa?= =?utf-8?B?Y3VCRE80ejNBUmg0aHRCeUVPcUg1R3g1WTNSaFFnTGFmS1h0dFRmdG1wV1Rq?= =?utf-8?B?VjNzK3NNdVoyWjBFd2NOdWQzUXJVUDZaYU11OS8ya3NLWFIyN01HYmZidTZX?= =?utf-8?B?MEpZYWhEZUg1ZnFvREttZ3hHZm8wT25TN0FNWUZqVHA2eFlCRXFRa2tjYjFj?= =?utf-8?B?TXF2SVpyY0hzTURrYk5vZmUrcEI5bnIxdzkzS0hhSHkwZEpDdmp2OXlKTjdy?= =?utf-8?B?Q21rRE9oS1dDNkJtSXNIV3ZxMXVJVDB0NkRBdktuY3hVMWlHV0RiaHdjOWJy?= =?utf-8?B?eDBiSWQ0d3Bna0tsQU5RTDRxVTZ5RWY5UWZMSGFWM01Xdml0cFV2aDlyaTJB?= =?utf-8?B?RHFJdFpmUlF4bFZ6WWd1M1dnQkhjeFFUWE5pTVBWRHk2WlhHRVdPQmlwM2g2?= =?utf-8?B?NDd2dDBtYzlJRUt1QTNHTktDNFJCanVQMFdIbUVGTXNGaFRnc2ZQODdrQVpl?= =?utf-8?B?d0hhQ0psZW5NQ2Z6d0k5K25pcE1lWHVhODJSOENDcHJ6anc5N3FBMVVreEx1?= =?utf-8?B?YXhNTm9iRzFjcG8xUmRlc2p3V2JKb2o2WERzTXR4VjdPSXh4MFdPMFJJS2d1?= =?utf-8?B?Q3crTjlUR2dRN0tLV2lURmFiM0VUT2FyZEUwZ3MrTDJaUjVyblA1cUJ6bGJF?= =?utf-8?Q?ID0Lyc99YrUqiJfVWrofuSd9P6iglkktZvPskbi?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6927 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: DB5EUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: c46c1093-c2a9-486e-65a7-08d930c60e7c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fthMKxs8j/Dn0LMOulmG2aOFX9AsCMgHyPLmJmmk1OrQ8sQCJBs3kckS0QXYiVLQ7pJLj5OpT4AxYC0NPBp9SGUiBipee2H8koLPLdjXuJW6pjT36iL9kqq+xW5zFF6kJzRcvH/z6fio56NoEd6yHH6ChsDeRokWvJggnzfDTq7CtnrlBgnYA9yxXFHTzrMrm8QPU8nD46r8EM/IHe7bnUmHnSD5x8oO0DfxpQUl9IuGbtOdJRfZ/8bFhdfdYUrv7tnhMtwZ9g4AJKGMgnKDxsfeE1BSd0ZuDktpZ1jFENZNQtonx4gys5VII8iy6OkFOUPYfXBEJLt+8JBR7jPY57ICfNgRA2h7fbt9qZ8VkgLlobrep9LSfjg1RcHcdnP/i37H+UN/pt0WTGFecrGk5uBC/xRsKPFm44Mxup4EXKLKL1CjhH3hqYmDVVz1kuOwfwlK9oUbWv6cstjxEjqreSqOjUz3BUduUoOXby35yS/+/DbF6gn58eBWgz0QpLZGwXlrP7fF3vgSbytg/nl3A2ZiCnPpZzdvhi1MKWgP4sQ5ZfluIo8hVyWafstByVOYgnShIY/9nRZe4S0XD828obqqbhwXX/OZprQsp2jTpxMHFz4KNJVEqHWq13T867UuCw3AuuNOxcTOvWMXO5AG+oTD8BQWmZsGguwytMF/6u6oBbWxx9YHXA10oE+kIlDHCdYAIu3omJ1ImKS9oGBhggspjOzWfTYLd26+ZR5lkvCeE/uPHxWMRKAeMpNPMRn0Wl+bImJBs6R9AULIWHZlsw== 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)(396003)(39850400004)(376002)(136003)(346002)(46966006)(36840700001)(8676002)(70586007)(26005)(36756003)(33656002)(5660300002)(44832011)(1076003)(8886007)(966005)(186003)(54906003)(8936002)(70206006)(4326008)(86362001)(16526019)(82310400003)(956004)(2616005)(55016002)(356005)(7696005)(6862004)(81166007)(2906002)(478600001)(316002)(83380400001)(53546011)(336012)(36860700001)(47076005)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2021 12:56:14.1930 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4a0ca38a-e7eb-47e3-1725-08d930c61fa2 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: DB5EUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB6220 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210616_055621_070742_E744890B X-CRM114-Status: GOOD ( 33.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 06/15/2021 16:41, Peter Collingbourne wrote: > On Wed, Nov 25, 2020 at 6:38 AM Szabolcs Nagy wrote: > > > > 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.) > > Hi Szabolcs, > > Did you get a chance to think about this? > > I propose that we start with a command line option that defaults to > off. If/when any ABI transition happens we can change the default. a default off per boot option sounds safe even if there are some incompatible binaries. (i assume virtualization works: host and guest can have different settings, so users can always run old systems in kvm.) however it would be nice to make this part of the linux platform abi and avoid fragmentation. the difficult bits are - unclear trade-off: does the abi change have adverse effect on potential tbi/mte/.. use? or even existing usage? (data only tbi is a more complicated concept than plain tbi) - incompatibility cannot be statically detected. (toolchain cannot diagnose or enforce it, it is only detectable at runtime, on a system with the changed setting.) i think in c the usability of tbi is very limited now. the libc and compiler needs a tbi abi for it to work (e.g. different tags on pointers to the same object break pointer comparision). if tagged pointers are not dereferenced and don't escape then tbi is not needed. so only custom runtimes and implementation internal tooling like hwasan or heap tagging can use it. arbitrary user tagged pointer is not supported in libc now. there is glibc discussion about the libc tbi abi because intel LAM needs it too, i don't know yet how that will work, but we can try to make it compatible with the new setting and roll that out as the right way to use tbi. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel