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=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_SANE_1 autolearn=no 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 550CBC433E0 for ; Wed, 8 Jul 2020 13:49:09 +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 0DD0E206E9 for ; Wed, 8 Jul 2020 13:49:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HaCMpVZe"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="mEj7YRsb"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="mEj7YRsb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DD0E206E9 Authentication-Results: mail.kernel.org; dmarc=none (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=HvWXldb8qnHf0HArE6NDjGX+DB2OILwwT2cqsCbBBu4=; b=HaCMpVZegOELCuwjVoV51sMVG uWup0fhj6/AoeBGVfdpewfifsxPwpIncGpuYNQUhX5+0sWEtVvufXF9rVj3eUps9ZsfEgHbE7nexe fSjq3nleL8EVTIrFThYohZ7sHcqzjpqZSgA4ypwHuIEBiyp6ndHxvsxm8loSN/OC3wtp9CH1igq2t fI/n8hveQY9xpF/VC5742ALwXSrU9cIt2hiJR4duj1G6HgAU9ClR+7vYOjPVzx+I2Sd9bYc4yQCVQ Cdal/K9O8ej1B/K5Jzm6L+TObUh7At/TXLx6NrMEs6Ackpg/qtDJ9oKAZq6yNt/Gz+0PA4zqv6h/r Sy6HlO4cA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtAQG-0002lh-4W; Wed, 08 Jul 2020 13:47:40 +0000 Received: from mail-eopbgr50056.outbound.protection.outlook.com ([40.107.5.56] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtAQD-0002kb-Cr for linux-arm-kernel@lists.infradead.org; Wed, 08 Jul 2020 13:47:38 +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=rLpyEIr7yZHjOqfkj6peVO5o29yF6en24pKy4PjG4kw=; b=mEj7YRsbs3vFc5niMSoeJVWGQ+ZbOXMFYCvQENmChv+ViiUoQIv5vC2NwIGxw0Fmpwd9zfKw2s6oyvmwFk4f3VFRcddLvSOU5NT9XL7JfWpuSKoIlxVw92G9Qydgh99iav+KQiv4Ex0w7Y2dMTpgvf84uOc5bKNnrXiOTB8r6cw= Received: from AM5PR0201CA0003.eurprd02.prod.outlook.com (2603:10a6:203:3d::13) by AM0PR08MB4562.eurprd08.prod.outlook.com (2603:10a6:208:124::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.28; Wed, 8 Jul 2020 13:47:02 +0000 Received: from AM5EUR03FT016.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:3d:cafe::27) by AM5PR0201CA0003.outlook.office365.com (2603:10a6:203:3d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20 via Frontend Transport; Wed, 8 Jul 2020 13:47:02 +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=bestguesspass 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 AM5EUR03FT016.mail.protection.outlook.com (10.152.16.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Wed, 8 Jul 2020 13:47:02 +0000 Received: ("Tessian outbound 8239f48e56bd:v62"); Wed, 08 Jul 2020 13:47:02 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: f7aaf3bf4d887b70 X-CR-MTA-TID: 64aa7808 Received: from 46b6ca42ae22.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0ECEEF00-61FD-4D4A-8489-D185D12527F4.1; Wed, 08 Jul 2020 13:46:56 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 46b6ca42ae22.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Jul 2020 13:46:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d75RHA3uoxEu40WzAMJ5AC7A+9eJf7rBRThXQztIwcnTdvZkXisYdrH7oQJm3V7hXT9H1q+JozNWEoqiKBKeAmwMcosr1gtfXROvVMS8oIFIrRbE6BMnoZJV36mmAa0uwv2WekWy0yKSrHUVHJzdAtbOXtd5d5478Q6TYnz501MWtlMYrI4xpmei0cqxszMcGH0thCkPZjBxkqBJpu3MdBxN8gE0ylvX5ZHMrHdWxcD4Kj+P96eEVQmZlKGjZ60dmOW5ptL4bazvc+7hth2xhcI5NlRkCRpcM5KrG21jCzaVvbeBK2UwZ3CyHR/nU0XKkNvGuSBO5pYU+ujiK2BJGA== 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=rLpyEIr7yZHjOqfkj6peVO5o29yF6en24pKy4PjG4kw=; b=kc6Kde1g1K/QgEqLKp34KLE7hUVmjWQTHaq+kvdzKwU27BDZuOH5JmVktTRLW94Q2ofYxBtBX99qenVKK21arnhJDDA1ay0XCtxm2mxnn9KjqIj+8+uD4mqKmaxshXrS3TPboTJfDp9VIhO9A534DU2+vdS7nFSCtr7tt/2GFNzk8WCu1Iwo0yN6h22FZqmnD+5BidlXHW9xGHwYimBIAhYsVTqFPvH4RiBXavk59Sph+ml2zlJEqtiplZnsvtg6sIfg5Ythq1H7AC7qfFFPVaGRzD+Tkkpgt2jXYc1mpowXZUGk0WnnyYAWHopYBPFquy37utenav0UsZa/l6cxbA== 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=rLpyEIr7yZHjOqfkj6peVO5o29yF6en24pKy4PjG4kw=; b=mEj7YRsbs3vFc5niMSoeJVWGQ+ZbOXMFYCvQENmChv+ViiUoQIv5vC2NwIGxw0Fmpwd9zfKw2s6oyvmwFk4f3VFRcddLvSOU5NT9XL7JfWpuSKoIlxVw92G9Qydgh99iav+KQiv4Ex0w7Y2dMTpgvf84uOc5bKNnrXiOTB8r6cw= Authentication-Results-Original: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com; Received: from DB8PR08MB4986.eurprd08.prod.outlook.com (2603:10a6:10:e0::18) by DBBPR08MB4904.eurprd08.prod.outlook.com (2603:10a6:10:f2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.22; Wed, 8 Jul 2020 13:46:54 +0000 Received: from DB8PR08MB4986.eurprd08.prod.outlook.com ([fe80::f9ba:4002:a159:6763]) by DB8PR08MB4986.eurprd08.prod.outlook.com ([fe80::f9ba:4002:a159:6763%3]) with mapi id 15.20.3153.030; Wed, 8 Jul 2020 13:46:54 +0000 Date: Wed, 8 Jul 2020 14:46:52 +0100 From: Steve Capper To: Will Deacon Subject: Re: [PATCH] arm64: Introduce sysctl to disable pointer authentication Message-ID: <20200708134650.GA27102@capper-ampere.manchester.arm.com> References: <20200707173232.5535-1-steve.capper@arm.com> <20200708073621.GA25261@willie-the-truck> Content-Disposition: inline In-Reply-To: <20200708073621.GA25261@willie-the-truck> User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: CWXP123CA0021.GBRP123.PROD.OUTLOOK.COM (2603:10a6:401:73::33) To DB8PR08MB4986.eurprd08.prod.outlook.com (2603:10a6:10:e0::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from capper-ampere.manchester.arm.com (213.86.15.71) by CWXP123CA0021.GBRP123.PROD.OUTLOOK.COM (2603:10a6:401:73::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Wed, 8 Jul 2020 13:46:54 +0000 X-Originating-IP: [213.86.15.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a5cd99b4-9d20-47fd-dc3f-08d8234564b5 X-MS-TrafficTypeDiagnostic: DBBPR08MB4904:|AM0PR08MB4562: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:883;OLM:883; X-Forefront-PRVS: 04583CED1A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: hBbUUU0Cly5KqFCHGhEwMjr/17o+JrKu8lKx6DlSJj6TAlBqi/Kqu/a/euPgjty7y0dLp9ScpHQTHpUad1e/HKrg50e+UbvM/xxeKKnsfnvTloyuRBiwbuRpvQOAXrY+F+cvAeAsWXd1ifP5oohoxxiKEkebWIDSJlwnqOUxqBwP4CgMBwGgsCeqYxp/47fo9qSdTv6xzsXzP/eGQC7Lkh7d8V4YL9uLSMrbYcg4ksGWILduaqIdH0ja7j2fsOw0G3fGXUr2GdjqvlCLSZ20n1cYloDNSPd+ntkyhV777/nxyra2PfRik6eG/K/MxvewbdA4rY7uvU9L9I2bHFjonA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR08MB4986.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(346002)(136003)(396003)(376002)(39860400002)(956004)(5660300002)(2906002)(26005)(86362001)(33656002)(55236004)(8676002)(4326008)(52116002)(7696005)(316002)(55016002)(478600001)(66476007)(8936002)(16526019)(44832011)(66556008)(6916009)(66946007)(83380400001)(1076003)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 8FKC7ZlMOnoSC+Eu7l2qRbycCrLbpdMwkDVj3AV+SzA+C3le0MSnad04ZF8n8CkAQ6Nxjc9TCP7QV2cvShHfKJ2+KqnaOZpCZWVPXOwS8zfzIE/ZFS+1VesgYHr0ivJfwNHY76SM8b2vwG5yfaZYqUci/omEDdyv7aDq6rFblIe6PUSZw49ARV2dwwooCxhU3g3zoBw+D8WAq7Kw6Opx1dIQcloTXsY29VlRqebAn4ZSeInOtZhnRUs6XPDVRIydoDygQp+RyzO7z7cdOrdhOctqFZViOEJnegeOyXG38ARGnRCXgPdNmIkmYO22D9qzUJcZzM7P8jzEMaG+Fplt6xAS89fsPO5Mw6lT3OUuL/vlXH/vk0utURspKBCEAJl0Jq8CXjePgk3jhShRANBkLUmo37xqTfEhH0DkhvQme2KVS0IGPtA1Hk1u35Am6nQPvnmR4TaxQprdj+zB28nRUDy9FSjQ/0id6fzSFmgJMR0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4904 Original-Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT016.eop-EUR03.prod.protection.outlook.com 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; SFTY:; SFS:(4636009)(46966005)(36906005)(44832011)(70586007)(70206006)(5660300002)(33656002)(7696005)(86362001)(336012)(956004)(1076003)(55016002)(6862004)(16526019)(4326008)(26005)(186003)(83380400001)(2906002)(82310400002)(81166007)(47076004)(498600001)(8936002)(8676002)(356005); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: be7c22fa-b53b-478d-f2cc-08d82345600c X-Forefront-PRVS: 04583CED1A X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CwhALW9qZV6u5vbEdAEYMUR2dmDR1rCkXg7+NX5dh0ovL7+/n5o1h3Js6Sw9AzgXLjIv/qYam6fkXWyMLc4UNxZI72dRUHfNiq7/fubZJAmjrFZ2QJoypcOpLganLOND9nin9ECwGB7S9cW8ME7MzhRSFlIqwuOtQN2MmPYRiCJ+6HfK66hpFMH+DELxf2G+N8vKfEuZPCqqf2KfugdT6rq9dhMhvwN9HeLyrayMFFI9HMh/qYFAylVgnUWFPSlqsYksUP69j9mwUIHpAiU8GdowesV8jK8DjmsEtu5uvaUZwG6t3Q6YbvFwW00431R+yhkPPnXUu0ebHjSJEE5C1W9E+P/OU9xaO1unfL4wjsTSlVM5WbDLl65A5B2tkQtCXeSNrw3ZS4Z7vzRz+OxsGQ== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2020 13:47:02.1641 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a5cd99b4-9d20-47fd-dc3f-08d8234564b5 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: AM5EUR03FT016.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4562 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200708_094737_455184_E176B7D1 X-CRM114-Status: GOOD ( 21.57 ) 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: mark.rutland@arm.com, catalin.marinas@arm.com, nd@arm.com, jeremy.linton@arm.com, linux-arm-kernel@lists.infradead.org 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 Hi Will, On Wed, Jul 08, 2020 at 08:36:21AM +0100, Will Deacon wrote: > On Tue, Jul 07, 2020 at 06:32:32PM +0100, Steve Capper wrote: > > Pointer authentication is a mandatory feature in the Armv8.3 > > architecture that provides protection against return oriented > > programming attacks. (meaning that all Arm CPUs targetting at least > > Armv8.3 will have this feature). > > > > Once CONFIG_ARM64_PTR_AUTH=y, any systems with the hardware support for > > pointer authentication will automatically have it enabled by the kernel. > > > > There are, however, situations where end users may want to disable > > pointer authentication. One could be tracking down/working around a bug > > in userspace relating to pointer auth. Also, one may wish to quantify > > the performance overhead of pointer auth by running a workload > > with/without it. > > If you're debugging userspace, just recompile your userspace application > without ptr auth, in the same way that you might recompile with -g. > > The performance argument sucks; this stuff needs to be fast otherwise it's > pointless. If you really need that last bit of speed, try Gentoo ;) I've tried Gentoo, and I liked it :-). Apologies, I could have done a better job with the commit log... I am trying to enable pointer authentication in distros. One concern I have is that a pointer auth bug could slip through the cracks (with a lot of hardware not yet supporting pointer auth), and then affect an end user. Also, I have had interest from distros in the performance cost of pointer auth, and there will very likely be folk switching it off/on again in order to perform tests. One approach to deploying this could be to have pointer auth disabled in the kernel completely (via kconfig) and interested parties could then switch kernels. Trouble with this is that distros ship single binaries so it would be up to the end user to build/install another kernel + modules. So this could be a barrier to adoption. Having a mechanism in the kernel that an end user can employ to activate/ de-activate pointer auth would help with deployment greatly, and that is what I was trying to achieve with this patch. Another way to approach this could be via a kernel command line that completely disables pointer auth? (i.e. kernel not activating pointer auth at all, and userspace not seeing the feature) Cheers, -- Steve _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel