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 34671C433FE for ; Fri, 18 Nov 2022 13:54:51 +0000 (UTC) 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:In-Reply-To:MIME-Version: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=FZoCdFniPAivoyA3U+DpHmMiNLsm9NfyvVFvJYUgI0M=; b=3ESjev7/zv3DjQ bCgxKjfmjsgFb3W9tBKpgVGa3savkO1ltBjpgBn8iCrav8nxh4b0Io50Hb4gifD77/Ir9hKIKyFaN 0FKpAVlHuvObrK0E3ioNq2HKQ6TSx2fLGDIOiXlHmD+MmOHmMGHzeTsikd2wdYIb8Lp61uhsboc8n n0ns9Cdl/GTbzYuBq7c6J/hKw/OyDDB8EvjH9Q+Ebx/9rJsk6jyjYtiJbx9/kCjjRdOaS1k3MdFQr MWFOR67ilLe9h546VdWTiaY8FiOgaRGYD2KxeNByEQaul+0b4LVP9WSDTL+vWKlN1CugNwKJwun43 abuFIXrVAafG9S3g9ZQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ow1oW-004EfH-Uf; Fri, 18 Nov 2022 13:53:53 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ow1oT-004EeE-Vl for linux-arm-kernel@lists.infradead.org; Fri, 18 Nov 2022 13:53:51 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5849C6254C; Fri, 18 Nov 2022 13:53:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A41CC433D6; Fri, 18 Nov 2022 13:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668779628; bh=bEb1gkbySTKFNyk4/5da9+0KRkVnIw10FP/mSqbWNKY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=plwTieCl1q3JjWOy6dU6fuAxJA4f3f7SVX9KvBebkr6VVU+Cw2xAMXZpjlScIwU8b UxDvZ+N6UYD+8WrqgNF/lNQwKSCwo89Dd13eGUPdxhnh/t9JfPy73ehiObqe5EOx9E Pzp6KDsmfrRdJPnqPoDYPaCZNgm8XLpoORvl2mfymTw51Z4CjhTmHSX0l3HIsINAzh ha2TD3JqQq9eBXJsGP7JBwi2Obe/NabToOpusPunrIpQaM4ER0OXzXHSuC3l5mrSTi GZKg2ibZbQ1Yy4UAQoKD0oFiHCDpr6FWqqkzbb7zfk9HaghrlH63pMt/K/PdBEcLut YFGXG9zUpvKog== Date: Fri, 18 Nov 2022 13:53:43 +0000 From: Will Deacon To: Mark Brown Cc: Catalin Marinas , Shuah Khan , Shuah Khan , Szabolcs Nagy , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 2/4] arm64/signal: Include TPIDR2 in the signal context Message-ID: <20221118135343.GC4046@willie-the-truck> References: <20221031201736.894374-1-broonie@kernel.org> <20221031201736.894374-3-broonie@kernel.org> <20221114161005.GB31141@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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-20221118_055350_081066_672F219C X-CRM114-Status: GOOD ( 17.46 ) 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 On Tue, Nov 15, 2022 at 05:13:39PM +0000, Mark Brown wrote: > On Mon, Nov 14, 2022 at 04:10:06PM +0000, Will Deacon wrote: > > On Mon, Oct 31, 2022 at 08:17:34PM +0000, Mark Brown wrote: > > > > + __get_user_error(tpidr2_el0, &user->tpidr2->tpidr2, err); > > > + if (!err) > > > + current->thread.tpidr2_el0 = tpidr2_el0; > > > What guarantees this makes its way into the hardware register before we > > return to userspace, context switch or deliver another signal? > > Context switch is handled, part of context switch is to restore > the value from the task struct, but other cases aren't AFAICT. > This is in general an oversight in our signal testing framework, > it does not have a pattern of validating values set in signals. Right, but my question is about going to userspace _before_ we context switch, so I think there's an issue here. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel