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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 32958D2C546 for ; Tue, 22 Oct 2024 12:36:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/2F4yJCj0L92MREys6bmvI9WZu1EIorOBPsQNU0+nvQ=; b=cKCpL25hvKUPNxPTVpF9aFz609 Ce93gqfqc57lc1/Dutl+ets6B8bVThhMO8JsYiLTjUDrHR7yVmsy1smeRHLHfBHgOSHwB7/cRB8fr Kk2qzbu2EY+CeW6u3PuL05J0msiZ66vA65odBLPPVbiLgzuNziZB0ek3aPf5CHgUi50gcw2ZiUFV7 Ihb4vy61GzbieMJ2bJWR61TVPuN52CVOkV6yuF2dfMV30+/kFhvgAVb7LuPkOqzMDoJkTuYOLCpFE X3CDqlCobjn0VzpCqWAH4cbMSGhwoMY8Gb5zcVeevTIZ8Y7t5NE2ejWI4EZpZZZHtkSHSu/hRFTdW ZErUnzyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3E75-0000000ApwK-43CT; Tue, 22 Oct 2024 12:35:51 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3E5Z-0000000Apmx-3php for linux-arm-kernel@lists.infradead.org; Tue, 22 Oct 2024 12:34:19 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A9D51497; Tue, 22 Oct 2024 05:34:44 -0700 (PDT) Received: from [10.57.66.29] (unknown [10.57.66.29]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B211E3F71E; Tue, 22 Oct 2024 05:34:11 -0700 (PDT) Message-ID: <12041781-6be0-4492-b352-a8d153de3415@arm.com> Date: Tue, 22 Oct 2024 14:34:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/5] arm64: signal: Improve POR_EL0 handling to avoid uaccess failures To: Dave Martin Cc: linux-arm-kernel@lists.infradead.org, akpm@linux-foundation.org, anshuman.khandual@arm.com, aruna.ramakrishna@oracle.com, broonie@kernel.org, catalin.marinas@arm.com, dave.hansen@linux.intel.com, jeffxu@chromium.org, joey.gouly@arm.com, shuah@kernel.org, will@kernel.org, linux-kselftest@vger.kernel.org, x86@kernel.org References: <20241017133909.3837547-1-kevin.brodsky@arm.com> <20241017133909.3837547-4-kevin.brodsky@arm.com> Content-Language: en-GB From: Kevin Brodsky In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241022_053418_034029_DF5CF304 X-CRM114-Status: GOOD ( 13.39 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 21/10/2024 15:43, Dave Martin wrote: > On Mon, Oct 21, 2024 at 12:06:07PM +0200, Kevin Brodsky wrote: >> On 17/10/2024 17:53, Dave Martin wrote: >>> [...] >>>> +/* >>>> + * Save the unpriv access state into ua_state and reset it to disable any >>>> + * restrictions. >>>> + */ >>>> +static void save_reset_unpriv_access_state(struct unpriv_access_state *ua_state) >>> Would _user_ be more consistent naming than _unpriv_ ? >> I did ponder on the naming. I considered user_access/uaccess instead of >> unpriv_access, but my concern is that it might imply that only uaccess >> is concerned, while in reality loads/stores that userspace itself >> executes are impacted too. I thought using the "unpriv" terminology from >> the Arm ARM (used for stage 1 permissions) might avoid such >> misunderstanding. I'm interested to hear opinions on this, maybe >> accuracy sacrifices readability. > "user_access" seemed natural to me: it parses equally as "[user > access]" (i.e., uaccess) and "[user] access" (i.e., access by, to, or > on behalf of user(space)). > > Introducing an architectural term when there is already a generic OS > and Linux kernel term that means the right thing seemed not to improve > readability, but I guess it's a matter of opinion. Both good points. "user_access" seems to strike the right balance, plus it's slightly shorter. Will switch to that naming in v2. Kevin