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 1DAA6C04FFE for ; Thu, 2 May 2024 11:21:50 +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=6C+QU1WYrzL2Ywu+GDI+UHxRjx38m0QUFQFxez69iBg=; b=CesFy7/tRTPdsD qYuzZ5+ZZQH4uY9MwoSpI37lr7QwsT4/5vMoIZ4G1AwMqmx39ccTdbkcMB+pZ4eq5I482evxC6SbL FHUigqNkkYaY/f0JtrHIRRBWLv00Q8UEbNBjf7jWhCEm3hF4SE/b8U2bWTaWR+uCfI8xn+FMPMFzx PyqubWsykIasAt1/YUw05CLwt7hHjJBaOomqRxpUohJ9P7a6uU/oDEBSFt+ZI1mUnm4C9IToO6oug eHcSVMmlm75u1KaSnRCRZ0y4Ocd3cveNhLc8wsqL632E2t5K4I7Mnmzh22KZJkQy3pQ/RyrigLDiE R3yLgvI37AQl5lMIwTyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2UVQ-0000000CVMh-3q5X; Thu, 02 May 2024 11:21:40 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2UVO-0000000CVLW-0uKy for linux-arm-kernel@lists.infradead.org; Thu, 02 May 2024 11:21:39 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5DD7F61A2A; Thu, 2 May 2024 11:21:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 307A2C4AF18; Thu, 2 May 2024 11:21:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714648897; bh=0ln9TXID18gsJMnDENXiItJGRtQ3Til5tzw9qOWE/sc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oEKEViO8AxOjXR6iIdgwCu7M9Gy8KOg7xF4nyGPC+Q6kiqWHLioCWc+TKN1O1xGFU R5r916favQUmXsHYwF3hhP1H4QIqQhlQ5wBll2sEvQCjHIUs30q9p6EEUJISyRnuoX PHUjcgdQN9lWXGwzx/xhDdXqpWVdoLEkQ1youg+dV29CHaL49sDwtdB0b1hRj6Eg69 lcXC8doU0yUE99/DKUCyscpgTShpcBrE9CN7lHget3Yx3haAYwZdFxiJdtAF84yIlo C6EgORkHpFEimOrGiEho7ncdyeWM6rlP3wOVXAEfpup/tHM7MZKMUzUJzKk2OPSgFw Ug3evdCl5UR1w== Date: Thu, 2 May 2024 12:21:28 +0100 From: Will Deacon To: Kees Cook Cc: Mark Rutland , Peter Zijlstra , Boqun Feng , Catalin Marinas , linux-arm-kernel@lists.infradead.org, Jakub Kicinski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Arnd Bergmann , Andrew Morton , "David S. Miller" , David Ahern , Eric Dumazet , Paolo Abeni , "Paul E. McKenney" , Uros Bizjak , linux-kernel@vger.kernel.org, x86@kernel.org, linux-arch@vger.kernel.org, netdev@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH 2/4] arm64: atomics: lse: Silence intentional wrapping addition Message-ID: <20240502112127.GA17013@willie-the-truck> References: <20240424191225.work.780-kees@kernel.org> <20240424191740.3088894-2-keescook@chromium.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240424191740.3088894-2-keescook@chromium.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-20240502_042138_498571_F7E0BDD3 X-CRM114-Status: GOOD ( 13.49 ) 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 Wed, Apr 24, 2024 at 12:17:35PM -0700, Kees Cook wrote: > Annotate atomic_add_return() and atomic_sub_return() to avoid signed > overflow instrumentation. They are expected to wrap around. > > Signed-off-by: Kees Cook > --- > Cc: Will Deacon > Cc: Peter Zijlstra > Cc: Boqun Feng > Cc: Mark Rutland > Cc: Catalin Marinas > Cc: linux-arm-kernel@lists.infradead.org > --- > arch/arm64/include/asm/atomic_lse.h | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) How come the ll/sc routines (in atomic_ll_sc.h) don't need the same treatment? If that's just an oversight, then maybe it's better to instrument the higher-level wrappers in asm/atomic.h? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel