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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 662E7C433B4 for ; Mon, 19 Apr 2021 12:01:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 37E6161285 for ; Mon, 19 Apr 2021 12:01:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233519AbhDSMBz (ORCPT ); Mon, 19 Apr 2021 08:01:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:54274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232272AbhDSMBy (ORCPT ); Mon, 19 Apr 2021 08:01:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1A3F66023E; Mon, 19 Apr 2021 12:01:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618833683; bh=mnHUtff+VuAPhbk5Pbx5r+Qb0vj43frhxKcHoJT4dSg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jm4JzOcAEuUzOnLVDeaqBpnXEzoL0ZwKCi9q95ZigKpBXZMPAQmOOTqPy1MPE0H33 DPxMYLuaLLLjv5RT59hxVXzar2rX5o8XzIcGTYK5STYi5/YL9KgIqiHDYs8m6u8S8L tY0633NbXsag2O+CSybHYeocv+0JzD+UcC//wMws= Date: Mon, 19 Apr 2021 14:01:21 +0200 From: Greg Kroah-Hartman To: Catalin Marinas Cc: stable@vger.kernel.org, Will Deacon , Vincenzo Frascino , Mark Rutland Subject: Re: [PATCH stable 5.10.x] arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is set atomically Message-ID: References: <20210419102849.2526-1-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210419102849.2526-1-catalin.marinas@arm.com> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Mon, Apr 19, 2021 at 11:28:49AM +0100, Catalin Marinas wrote: > commit 2decad92f4731fac9755a083fcfefa66edb7d67d upstream. > > The entry from EL0 code checks the TFSRE0_EL1 register for any > asynchronous tag check faults in user space and sets the > TIF_MTE_ASYNC_FAULT flag. This is not done atomically, potentially > racing with another CPU calling set_tsk_thread_flag(). > > Replace the non-atomic ORR+STR with an STSET instruction. While STSET > requires ARMv8.1 and an assembler that understands LSE atomics, the MTE > feature is part of ARMv8.5 and already requires an updated assembler. > > Signed-off-by: Catalin Marinas > Fixes: 637ec831ea4f ("arm64: mte: Handle synchronous and asynchronous tag check faults") > Cc: # 5.10.x Thanks, now queued up. greg k-h