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.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 B7547C83000 for ; Tue, 28 Apr 2020 12:58:20 +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 8879A206D9 for ; Tue, 28 Apr 2020 12:58:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KULN1yWK"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="RGcDlEtW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8879A206D9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version: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=xeQWkXiPHxHn+2fWCOPQi31WEzWt2CEyYoa3Iba8mCU=; b=KULN1yWK/dtieR MtcaG5NXli300Y8N4ccBY+lr+qqBz2XbDZyDJ/qV2Rxb3jOFjJ52sgnTfpsSH9Cy+Xkgv3TKd3814 eVvNp1gThSdbAXoEBGCa+7BkDO1Vvjcq0BinA1Rr0M/xg24QFaJnPtS/jX8ldw76dXo3uVF49HLYn gnWjtzww+EX7y0AZ14HTX3IYP4FrrOykoybzLE+bq4iGNNvIuGzS1BqUTcdMiAv2v9i9NQIyPyPty 5dRev/HEBoi7tyBT5iWe9eBZRTNH3FqvC9R2HRD/4N8B5z301eiDE+1s4NAa1gMPfAaqWzMbwasP4 iUKNUxjx621Sub6WeF0A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jTPoa-0000wj-5G; Tue, 28 Apr 2020 12:58:20 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jTPoX-0000wB-7F for linux-arm-kernel@lists.infradead.org; Tue, 28 Apr 2020 12:58:18 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0343C206D6; Tue, 28 Apr 2020 12:58:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588078696; bh=R/W+sDgU2J6qq+7c61xQGriDtpNKBiLYZRy2nTsky8U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RGcDlEtW0lyHvNG0JAo7LmvFyfJ7mcbAuv7BsflDGTTgLkS8T24pKAI6RSIXE1cEr zU99CT7WIYtMV14X2ijQ6yklVUPczzQYDkpbqI28xNFOA2+w0rI1LFG0ZQQoHDDIQb TQ8PCWKWC5CyziO/Lx9xEAImU1mv1B5Nd0XOuEZ0= Date: Tue, 28 Apr 2020 13:58:12 +0100 From: Will Deacon To: George Spelvin Subject: Re: [PATCH v2] arm64: ptr auth: Use get_random_u64 instead of _bytes Message-ID: <20200428125812.GD6791@willie-the-truck> References: <202003311544.02VFiClP011630@sdf.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <202003311544.02VFiClP011630@sdf.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200428_055817_281557_F14CE9DB X-CRM114-Status: GOOD ( 12.23 ) 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 , Catalin Marinas , 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+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi George, On Tue, Mar 31, 2020 at 03:44:12PM +0000, George Spelvin wrote: > get_random_bytes() is approximately 4x the cost of two > get_random_u64() calls, because the former implements > anti-backtracking. > > Because these are authentication keys, useless to an attacker > as soon as the kernel stops using them, there is no security > benefit from anti-backtracking. > > Signed-off-by: George Spelvin > Cc: Mark Rutland > Cc: Will Deacon > Cc: Catalin Marinas > Cc: linux-arm-kernel@lists.infradead.org > --- > v2: Took out all the clever bitmap-based stuff and made a simple > boring helper function to replace get_random_bytes(&key, 16). > > arch/arm64/include/asm/pointer_auth.h | 16 +++++++++++----- > arch/arm64/kernel/pointer_auth.c | 10 +++++----- > 2 files changed, 16 insertions(+), 10 deletions(-) Please can you resend this against the arm64 for-next/ptr-auth branch [1]? I can't apply it as-is. Thanks, Will [1] https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/log/?h=for-next/ptr-auth _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel