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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F896C433EF for ; Tue, 21 Jun 2022 10:47:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347764AbiFUKrT (ORCPT ); Tue, 21 Jun 2022 06:47:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346961AbiFUKqu (ORCPT ); Tue, 21 Jun 2022 06:46:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB6BA29346; Tue, 21 Jun 2022 03:46:49 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 5FC5AB81761; Tue, 21 Jun 2022 10:46:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51AEBC341C4; Tue, 21 Jun 2022 10:46:45 +0000 (UTC) Date: Tue, 21 Jun 2022 11:46:41 +0100 From: Catalin Marinas To: Kefeng Wang Cc: elver@google.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, Jonathan Corbet , linux-doc@vger.kernel.org, arnd@arndb.de Subject: Re: [PATCH v4 2/2] arm64: kcsan: Support detecting more missing memory barriers Message-ID: References: <20220523113126.171714-1-wangkefeng.wang@huawei.com> <20220523113126.171714-3-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220523113126.171714-3-wangkefeng.wang@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 23, 2022 at 07:31:26PM +0800, Kefeng Wang wrote: > As "kcsan: Support detecting a subset of missing memory barriers"[1] > introduced KCSAN_STRICT/KCSAN_WEAK_MEMORY which make kcsan detects > more missing memory barrier, but arm64 don't have KCSAN instrumentation > for barriers, so the new selftest test_barrier() and test cases for > memory barrier instrumentation in kcsan_test module will fail, even > panic on selftest. > > Let's prefix all barriers with __ on arm64, as asm-generic/barriers.h > defined the final instrumented version of these barriers, which will > fix the above issues. > > Note, barrier instrumentation that can be disabled via __no_kcsan with > appropriate compiler-support (and not just with objtool help), see > commit bd3d5bd1a0ad ("kcsan: Support WEAK_MEMORY with Clang where no > objtool support exists"), it adds disable_sanitizer_instrumentation to > __no_kcsan attribute which will remove all sanitizer instrumentation fully > (with Clang 14.0). Meanwhile, GCC does the same thing with no_sanitize. > > [1] https://lore.kernel.org/linux-mm/20211130114433.2580590-1-elver@google.com/ > > Acked-by: Marco Elver > Signed-off-by: Kefeng Wang Acked-by: Catalin Marinas I'll leave the series to Will to queue for 5.20. Thanks. -- Catalin 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 5CE97C43334 for ; Tue, 21 Jun 2022 10:47:52 +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=Hfp5z4dNeon6Qgxve6xiCciUtVXroWkv7nw4QVRsp44=; b=G397dAHqlsnLnc rB8L4fLvYitRh8zCOVXkZKKlMLjinhcT33+fLwQwHvMaJl2lVGJtZUsKyjoN6oxJ07fXacFtGDbEl wgV48I7cUrgK1XrLVmgiXkPeHA4UcYjgzqUhsQM31i2B7Y11p+PhDbaspfTumtvPhM/KRUuwkkPz+ RhfoKorpw5gt1qvNHY6lmO2+eCwz4K/klDL8dImaHzBan3s2EjZ2bd7CcIdylExoA15Fv5BGslPLn 1nwhULCkiB9prR5AjFmXFdNpFD01CI8m1kAjbgi8W6fyd/lmqek2efFlCPhj8jxkGyRyqKE8Ncy2U eU8D+II5d7NCeyqLEdXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3bPK-004v5O-Rn; Tue, 21 Jun 2022 10:46:54 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3bPG-004v1x-Ae for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2022 10:46:53 +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 ams.source.kernel.org (Postfix) with ESMTPS id 573E8B816DA; Tue, 21 Jun 2022 10:46:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51AEBC341C4; Tue, 21 Jun 2022 10:46:45 +0000 (UTC) Date: Tue, 21 Jun 2022 11:46:41 +0100 From: Catalin Marinas To: Kefeng Wang Cc: elver@google.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, Jonathan Corbet , linux-doc@vger.kernel.org, arnd@arndb.de Subject: Re: [PATCH v4 2/2] arm64: kcsan: Support detecting more missing memory barriers Message-ID: References: <20220523113126.171714-1-wangkefeng.wang@huawei.com> <20220523113126.171714-3-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220523113126.171714-3-wangkefeng.wang@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220621_034650_571750_3FA7F708 X-CRM114-Status: GOOD ( 15.44 ) 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 Mon, May 23, 2022 at 07:31:26PM +0800, Kefeng Wang wrote: > As "kcsan: Support detecting a subset of missing memory barriers"[1] > introduced KCSAN_STRICT/KCSAN_WEAK_MEMORY which make kcsan detects > more missing memory barrier, but arm64 don't have KCSAN instrumentation > for barriers, so the new selftest test_barrier() and test cases for > memory barrier instrumentation in kcsan_test module will fail, even > panic on selftest. > > Let's prefix all barriers with __ on arm64, as asm-generic/barriers.h > defined the final instrumented version of these barriers, which will > fix the above issues. > > Note, barrier instrumentation that can be disabled via __no_kcsan with > appropriate compiler-support (and not just with objtool help), see > commit bd3d5bd1a0ad ("kcsan: Support WEAK_MEMORY with Clang where no > objtool support exists"), it adds disable_sanitizer_instrumentation to > __no_kcsan attribute which will remove all sanitizer instrumentation fully > (with Clang 14.0). Meanwhile, GCC does the same thing with no_sanitize. > > [1] https://lore.kernel.org/linux-mm/20211130114433.2580590-1-elver@google.com/ > > Acked-by: Marco Elver > Signed-off-by: Kefeng Wang Acked-by: Catalin Marinas I'll leave the series to Will to queue for 5.20. Thanks. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel