Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp5017967rwn; Mon, 12 Sep 2022 03:08:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR6oqcp3S5zHPlVYBbCz/nUWicbb2ugN8/SlZvhkH2rjXgksgGuKFt1+89SPKwPlca+4pMru X-Received: by 2002:a17:903:110e:b0:171:3afa:e68c with SMTP id n14-20020a170903110e00b001713afae68cmr25830175plh.12.1662977300508; Mon, 12 Sep 2022 03:08:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662977300; cv=none; d=google.com; s=arc-20160816; b=rrikpT7SOnJejF9S+zCaM22saVz8qNUcaTRAVBmqg+CJ8oBsAvKqvdmOk0lSQzryzL qHRkYn2X58u79pASubEuKUI0euOMhV0WkGHa1uhwqqth15xzrzNFSalZzgPcOoAVASH6 /5+N7efeAWeXukgJrTQkTDTtv1yWpMaruwB3h6z1gSOztspspePCgUAjWczFKI68ny9S 5a+apwvxQS9EHmVGixy+olLkpt3ZxzRxM/6s201nbEr5+xgBb1kGN5esZjEkc+l9x1Hu wuPkczqgl5XpocbL0lFNvPfGaKZ4M76SspwZeQNu2mz7gqxd+0jYMRmkx8xXHp3AhvQV OP3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=uClVApymgkgK7fH66RPqLcCXsTpVvQDUaMyIyH9j81w=; b=tQMPk1Az+FOsXFZpy+r7JhUQTvJwqMASG+WSdOecEqEnjaB269QDYcoNl6aQCBu0+r 4THbsyvp8FsproF/UynKXlsTTIpFayQWyGdQ1dU0Pd5UuHO/IiRL9NHlYQZ7Kixe3xgb lq/YfqETzJKO34Np/RHyx0WDZCGA9E5HSZ3lWJ/ffxjegtVK9V7EcALcTCBcxTUQdoqe RnTvaOYYuJ+B9cpM2hj1ayM2VVOtyNu3LIIP5im4Q/21UWHyBkJL1Q5Ko683CAMuk066 K/Wm+PXkRC6AzaoAvEvuDYoim2w0P+WMN+4G3ktD1LJQ0VlIhbovnBVRLDY298HXeWK8 emiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=mzaREv75; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020a170902eb8100b0017280be5a02si8818351plg.589.2022.09.12.03.08.03; Mon, 12 Sep 2022 03:08: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; dkim=pass header.i=@google.com header.s=20210112 header.b=mzaREv75; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229777AbiILJp6 (ORCPT + 99 others); Mon, 12 Sep 2022 05:45:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229664AbiILJp4 (ORCPT ); Mon, 12 Sep 2022 05:45:56 -0400 Received: from mail-ed1-x549.google.com (mail-ed1-x549.google.com [IPv6:2a00:1450:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 129A933437 for ; Mon, 12 Sep 2022 02:45:55 -0700 (PDT) Received: by mail-ed1-x549.google.com with SMTP id r11-20020a05640251cb00b004516feb8c09so2912321edd.10 for ; Mon, 12 Sep 2022 02:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date; bh=uClVApymgkgK7fH66RPqLcCXsTpVvQDUaMyIyH9j81w=; b=mzaREv75OO9jeMTftu6qMrDvjWyoS7dmtczfI+DtBQstSDLGDMqZPaz7hb7dEGfdFa L5zrXlF3i7wXLMmc/QK6Cq1gQoQ9a8oRiW7/dJRFif9hjgAosjALtzl9zYJM/kgXcUiv BWoNUYm3av4TubtS3UGkngxlAUZMPWF08ez0R6WK4aVQK1mDMUs6iN3FjuBDChWgaNGZ M3tMcHSBdu3mzZG410pdINdYJt47pp8gj0t931+z+Ks59iJxlg22luFuhDE6QyxAau1S 4cCXlV1yaGQUnjHo4h9/zLpYnBs2LRgoFzpg7EJ638CRr5+zBKFWhWu/kUaeeIeZOdq+ jVmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date; bh=uClVApymgkgK7fH66RPqLcCXsTpVvQDUaMyIyH9j81w=; b=ayj+3IopnHwArwOJzv90Bpb1gzG2AXFdvowBBzeAaKMa4dwCbjttN7JCxs5JWqOfjl uGNJzsQ8Z00xFIP6nSjawLEDBdKMh7ywTC/Jd6MvGWjbR3Ica95x/d0npBRacr1teFsg ldBUJZ2ys2hHc95j4thBV8EVZgn3KV4qoaIcLlarYWVnnMVQvDIJ2dT0/+wEFEgfN5fD vHGsDmUOLBY9qjoZkSsl5pYX3DTkP0wnI10An0my+Q8ncwDrdKJCsZTvkJyffWpvdqn3 Wsi+lr3cvLOJKYJDmCXvIlfCYara1YwWjH3dJLNaaLG/n3TcPKL2Xj3I2je/w2hPT9F5 bkKA== X-Gm-Message-State: ACgBeo1+ljTnKcA8E74eO57AM/DvjT4BbzgVhCwAClXyQLEpkkVWDTFX QF/WRBH3CgGek50O3mzQBGxNLa7yOg== X-Received: from elver.muc.corp.google.com ([2a00:79e0:9c:201:f693:9fff:fef4:2449]) (user=elver job=sendgmr) by 2002:a05:6402:4011:b0:44e:b8b5:f52e with SMTP id d17-20020a056402401100b0044eb8b5f52emr21439836eda.352.1662975953684; Mon, 12 Sep 2022 02:45:53 -0700 (PDT) Date: Mon, 12 Sep 2022 11:45:41 +0200 In-Reply-To: <20220912094541.929856-1-elver@google.com> Mime-Version: 1.0 References: <20220912094541.929856-1-elver@google.com> X-Mailer: git-send-email 2.37.2.789.g6183377224-goog Message-ID: <20220912094541.929856-2-elver@google.com> Subject: [PATCH v3 2/2] objtool, kcsan: Add volatile read/write instrumentation to whitelist From: Marco Elver To: elver@google.com, "Paul E. McKenney" Cc: Mark Rutland , Dmitry Vyukov , Alexander Potapenko , Boqun Feng , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , llvm@lists.linux.dev, Josh Poimboeuf , Peter Zijlstra Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL 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 Adds KCSAN's volatile instrumentation to objtool's uaccess whitelist. Recent kernel change have shown that this was missing from the uaccess whitelist (since the first upstreamed version of KCSAN): mm/gup.o: warning: objtool: fault_in_readable+0x101: call to __tsan_volatile_write1() with UACCESS enabled Fixes: 75d75b7a4d54 ("kcsan: Support distinguishing volatile accesses") Signed-off-by: Marco Elver Reviewed-by: Dmitry Vyukov --- v2: * Fix commit message. --- tools/objtool/check.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index e55fdf952a3a..67afdce3421f 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -999,6 +999,16 @@ static const char *uaccess_safe_builtin[] = { "__tsan_read_write4", "__tsan_read_write8", "__tsan_read_write16", + "__tsan_volatile_read1", + "__tsan_volatile_read2", + "__tsan_volatile_read4", + "__tsan_volatile_read8", + "__tsan_volatile_read16", + "__tsan_volatile_write1", + "__tsan_volatile_write2", + "__tsan_volatile_write4", + "__tsan_volatile_write8", + "__tsan_volatile_write16", "__tsan_atomic8_load", "__tsan_atomic16_load", "__tsan_atomic32_load", -- 2.37.2.789.g6183377224-goog