From patchwork Tue Nov 30 11:44:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Elver X-Patchwork-Id: 12647103 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83A39C433EF for ; Tue, 30 Nov 2021 11:56:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 75C496B0096; Tue, 30 Nov 2021 06:46:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 70AC26B0098; Tue, 30 Nov 2021 06:46:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D3126B0099; Tue, 30 Nov 2021 06:46:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0247.hostedemail.com [216.40.44.247]) by kanga.kvack.org (Postfix) with ESMTP id 4FFD06B0096 for ; Tue, 30 Nov 2021 06:46:08 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 0376618317032 for ; Tue, 30 Nov 2021 11:45:58 +0000 (UTC) X-FDA: 78865417554.09.3662777 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) by imf19.hostedemail.com (Postfix) with ESMTP id C70BCB0000AE for ; Tue, 30 Nov 2021 11:45:52 +0000 (UTC) Received: by mail-wr1-f73.google.com with SMTP id d3-20020adfa343000000b0018ed6dd4629so3530483wrb.2 for ; Tue, 30 Nov 2021 03:45:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=JzBhpw0Qm81Z9lbF5IGyZhQAb+5o04LDLkCFlxupKLc=; b=pHRgTgtBe9w8GJo+UVuCrCXkkBePrXHeJXXGSGxiMQTDZhPB1HMZjVhCQEHB+8iuxA QTqapU0TX6O4TE0Y48efyZW2bq1hF37Xt0PGzM68wPVdqNEwB+3nHHqWFUL1gWu3kHtR Cq7Wrdud5dEh12cWU90OhIU4V/9Q7ULAOS9mOORJ6Eqe+R8j1ryew/Yd+VDrcTllPVFh 5lcxmqYwyS4EYnDSPUY2x7vLF1W4hPQ8ICF36xbdENuMBTVVtdo+SbNEIlEehDKxtwYR kgzu3xNPjqGc6hHJvBg6+Ezt/2WHsUBVgd1XEwAmeXQPIFvn+uf/vjPzU0O+2NhHvmqd ksUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=JzBhpw0Qm81Z9lbF5IGyZhQAb+5o04LDLkCFlxupKLc=; b=pbMKd+UnEs8Hyyk8eROdyASPe1rDrd8KEHSvOY9L+s2iU5LtYckQJSf7WjPrrlFEd/ eWnGU6PwvDi2MbG37gOHlGaoHADyQm8yvJae2Eg4U6CqQf6IKQh5DNccj0VwC4ekRTAp hKo2JYU/hxoRKDDKa/mjAPtM5TWdZk6ThLD2HQPG0x9loyl6KEO5Dn849ZDg67u6sstu acoB9Kw0dMUiqFCXv9jAuLd5uvA16TGmBhZ8j1LHUdUlhvPb+Sn55K8maf2fIszglOgT 3GMdZb/innFhiHk9ip9nrsJHlc+H6UrCz0p19RlZdCKS07f6eEiEMzgcz30un4WspSmh IMpw== X-Gm-Message-State: AOAM530I9m/r6m70rfAMlyIAty9PRnZcf4UDubvf6N+hBBihstNB6TW8 yNtsvj3QILwxJzTOxBWHyh/yAalHSQ== X-Google-Smtp-Source: ABdhPJyGlw39n0+Jfq+xh033MGOvVeVGOoalcV20EEznri+jie430fZfA9+7esf3Wo7SpGvol2V1AwHpQw== X-Received: from elver.muc.corp.google.com ([2a00:79e0:15:13:86b7:11e9:7797:99f0]) (user=elver job=sendgmr) by 2002:a7b:cc8f:: with SMTP id p15mr4408290wma.129.1638272756667; Tue, 30 Nov 2021 03:45:56 -0800 (PST) Date: Tue, 30 Nov 2021 12:44:30 +0100 In-Reply-To: <20211130114433.2580590-1-elver@google.com> Message-Id: <20211130114433.2580590-23-elver@google.com> Mime-Version: 1.0 References: <20211130114433.2580590-1-elver@google.com> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog Subject: [PATCH v3 22/25] objtool, kcsan: Add memory barrier instrumentation to whitelist From: Marco Elver To: elver@google.com, "Paul E. McKenney" Cc: Alexander Potapenko , Boqun Feng , Borislav Petkov , Dmitry Vyukov , Ingo Molnar , Mark Rutland , Peter Zijlstra , Thomas Gleixner , Waiman Long , Will Deacon , kasan-dev@googlegroups.com, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, llvm@lists.linux.dev, x86@kernel.org X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: C70BCB0000AE X-Stat-Signature: xtonxo4r64yqfxc44kprak186eaiibj8 Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=pHRgTgtB; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf19.hostedemail.com: domain of 39A6mYQUKCL0hoyhujrrjoh.frpolqx0-ppnydfn.ruj@flex--elver.bounces.google.com designates 209.85.221.73 as permitted sender) smtp.mailfrom=39A6mYQUKCL0hoyhujrrjoh.frpolqx0-ppnydfn.ruj@flex--elver.bounces.google.com X-HE-Tag: 1638272752-726420 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Adds KCSAN's memory barrier instrumentation to objtool's uaccess whitelist. Signed-off-by: Marco Elver --- tools/objtool/check.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 21735829b860..61dfb66b30b6 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -849,6 +849,10 @@ static const char *uaccess_safe_builtin[] = { "__asan_report_store16_noabort", /* KCSAN */ "__kcsan_check_access", + "__kcsan_mb", + "__kcsan_wmb", + "__kcsan_rmb", + "__kcsan_release", "kcsan_found_watchpoint", "kcsan_setup_watchpoint", "kcsan_check_scoped_accesses",