Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3678619iog; Tue, 21 Jun 2022 03:50:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ssq161Vxibr2BmJn+dnAiD9wQqeMK/YlnsA7Qu8MheVDv03A8Jqhe8RTnfSi9nsvuLT8Ue X-Received: by 2002:a17:906:74cc:b0:712:381:9c5a with SMTP id z12-20020a17090674cc00b0071203819c5amr24833289ejl.466.1655808620874; Tue, 21 Jun 2022 03:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655808620; cv=none; d=google.com; s=arc-20160816; b=HoxLG5P9UPAJyb/Pvkhwyxl5Sf9CgBVwc9+oLavAPf8zKRl+HrJ4RuzGa2US8Kudn/ 99BzcvsbrfVDE+MVBU0zteIz6DJFPXVtjnK9ab2CwrGj8lEyrQlbIRbVspLjJJhKNv04 h+xua6RXj5KB1ED5kaByEj5hpJvBgXRYTkjPu//KimSdLpCqNmJkSQO89HOFkC1IzH4T LKQzFFIjDHDlF5HQsXuhbcbqykqUZjwyid4R0j18DjG4BwuVWQsNdB0A4qWN8FXXvUQt s4QBvL35B++AqHEZ1ZR3uQNADwg+j3gNBOYZYfaCPAsFj9fACXWZaI0ynURiM4f3259C MF2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=u70t/C9njR+iH5ug43ajl040oSd0rDh2MsdkGVaxx1w=; b=qiJlWnA1NEmW9H0NMdMdi5kXlRETSmP6iwytYvTwHncMOCRkjq2mnqhgLgQI4FEDpo EqTxRMCVrGCOg+eQ5iWvrynXucyDCcrRhX001v1xyg1rRHZhtY3M/R1W0tY70euC2kgp pInYYf8Ng96+TthretLwanKbkOLlEruEkt0AQE4OZ5HZJmZMpkzMbG3XPrRETW5iZXxt 4mCgaiSDO75NYq6TQCXdi0IchzZi+iuJ+ys04U3dF58/+stnGW2zjWT6TuRktdk9DYVX COPNlXNyW64TemQVMOGCGmIiVDfUK37EZV86l9h2ineEQSrtIopVSiwIw3rLWqMuR9Ej E3qA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a056402520300b0042dd34081d8si19052278edd.598.2022.06.21.03.49.53; Tue, 21 Jun 2022 03:50:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347396AbiFUKrR (ORCPT + 99 others); Tue, 21 Jun 2022 06:47:17 -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> X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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