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=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 710CCC5519F for ; Wed, 18 Nov 2020 17:31:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 161E0248E5 for ; Wed, 18 Nov 2020 17:31:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726085AbgKRRb2 (ORCPT ); Wed, 18 Nov 2020 12:31:28 -0500 Received: from albireo.enyo.de ([37.24.231.21]:42098 "EHLO albireo.enyo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725774AbgKRRb2 (ORCPT ); Wed, 18 Nov 2020 12:31:28 -0500 Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1kfRIf-0003M0-M3; Wed, 18 Nov 2020 17:31:21 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1kfRIf-0004SR-K8; Wed, 18 Nov 2020 18:31:21 +0100 From: Florian Weimer To: Dave Martin Cc: Peter Collingbourne , libc-alpha@sourceware.org, Catalin Marinas , Kevin Brodsky , linux-api@vger.kernel.org, Kostya Serebryany , Evgenii Stepanov , Andrey Konovalov , Vincenzo Frascino , Will Deacon , Linux ARM Subject: Re: [PATCH v2] arm64: Introduce prctl(PR_PAC_{SET,GET}_ENABLED_KEYS) References: <20201014055106.25164-1-pcc@google.com> <87blfv6fj3.fsf@mid.deneb.enyo.de> <20201118171945.GG6882@arm.com> Date: Wed, 18 Nov 2020 18:31:21 +0100 In-Reply-To: <20201118171945.GG6882@arm.com> (Dave Martin's message of "Wed, 18 Nov 2020 17:19:45 +0000") Message-ID: <874klmvafq.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org * Dave Martin: > IIUC the default compiler options when using PAC will only use the > A key, and only use the PAC instructions that execute as NOPs when the > affected key is disabled (precisely so that the code still runs on non- > PAC supporting hardware). But you can't simply flip it on and off while > there are function frames on the stack that assume it's either on or off. I think we can do the switch at the top-most frame, at least in ld.so. I have not thought about statically linked binaries. 8-/ 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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 51BCFC5519F for ; Wed, 18 Nov 2020 17:32: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 39D78248E2 for ; Wed, 18 Nov 2020 17:32:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Wx1/jocS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39D78248E2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de 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:Message-ID:In-Reply-To:Date:References: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9ADcZB7KxUXvOPB6kOttAQ8GIGpS+IOh4gMyVLXeq3c=; b=Wx1/jocSa+lv8K8bP51Xh+Gwc YZ7kb41eFBK3SpbbrzFa04leY5vMRam6OKkL3rnZmIUxIik00fxDebUhdJ9H3GHUAvdTmXXL2UK4H L3I1ZuG0dHS0GQYpsEjtRsM9sQnlOVnI8yo8HpXXg2AQpI4gkQTVuqsznpVYfSzFN3hznmuhPFiEW C1Mr62aotJSp2xcQR64uf9qeRrlXEKl+W9gsfTXSLd1uFYo31fVpPpMU9fs3+kdHEFqQGsXokbfS/ MEG8XaniGQwgQ6/HfhLJ3b6cL5JXenmGSfuBKHAR4YzNAq8ZoglM1vbvW7d2KBvArov4ResQAwzWv XAd0CElfQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfRIr-0004BO-Rq; Wed, 18 Nov 2020 17:31:33 +0000 Received: from albireo.enyo.de ([37.24.231.21]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfRIq-0004Az-3w for linux-arm-kernel@lists.infradead.org; Wed, 18 Nov 2020 17:31:32 +0000 Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1kfRIf-0003M0-M3; Wed, 18 Nov 2020 17:31:21 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1kfRIf-0004SR-K8; Wed, 18 Nov 2020 18:31:21 +0100 From: Florian Weimer To: Dave Martin Subject: Re: [PATCH v2] arm64: Introduce prctl(PR_PAC_{SET,GET}_ENABLED_KEYS) References: <20201014055106.25164-1-pcc@google.com> <87blfv6fj3.fsf@mid.deneb.enyo.de> <20201118171945.GG6882@arm.com> Date: Wed, 18 Nov 2020 18:31:21 +0100 In-Reply-To: <20201118171945.GG6882@arm.com> (Dave Martin's message of "Wed, 18 Nov 2020 17:19:45 +0000") Message-ID: <874klmvafq.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201118_123132_193456_F5382759 X-CRM114-Status: GOOD ( 12.37 ) 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: libc-alpha@sourceware.org, Will Deacon , linux-api@vger.kernel.org, Kevin Brodsky , Andrey Konovalov , Kostya Serebryany , Linux ARM , Catalin Marinas , Vincenzo Frascino , Peter Collingbourne , 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 * Dave Martin: > IIUC the default compiler options when using PAC will only use the > A key, and only use the PAC instructions that execute as NOPs when the > affected key is disabled (precisely so that the code still runs on non- > PAC supporting hardware). But you can't simply flip it on and off while > there are function frames on the stack that assume it's either on or off. I think we can do the switch at the top-most frame, at least in ld.so. I have not thought about statically linked binaries. 8-/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel