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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72DE6CCA47C for ; Tue, 12 Jul 2022 14:17:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 58752940093; Tue, 12 Jul 2022 10:17:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 55E98940063; Tue, 12 Jul 2022 10:17:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3AFF6940093; Tue, 12 Jul 2022 10:17:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 2CA69940063 for ; Tue, 12 Jul 2022 10:17:55 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 0715B20801 for ; Tue, 12 Jul 2022 14:17:55 +0000 (UTC) X-FDA: 79678651710.05.B254045 Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) by imf10.hostedemail.com (Postfix) with ESMTP id B6DE6C005C for ; Tue, 12 Jul 2022 14:17:54 +0000 (UTC) Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-3137316bb69so82211507b3.10 for ; Tue, 12 Jul 2022 07:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BBNAmGtBjsKiAgWVGNt1epS6tn9dFMCvgo2fNVioNes=; b=s50HuPFgYbKen/bxFHp/HuYFIGEoTRrbQ/hn9+FX0DryxJbh3I2wjTB+ZqoXhGc1vF mefIGN7LwwVpoAKeN8uKzIaaj0R2z5on9iLq4c5JKv88W1Gtk6rtEkbHTKce6pJqoXso G/swJc2ySNFMa1ftgJM+l7qYjrVPgurj0mBwdLN0/nGKTw9F3TX0OG0BBlp9pWyECh7V +3ZCUQ7TwcVdDJlRCFDdPFcl6xhD9aPLCV5MzUYGyo3ixHOA5k+4V8hRnCuy0Twn4GF4 tj3NaPsBPNgM3ufwGa6cwLnx24GIqfOuwYwszd7NUyClxQaoG80Qt+zdHO1TLhwI7kwv 5Q4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BBNAmGtBjsKiAgWVGNt1epS6tn9dFMCvgo2fNVioNes=; b=jVWEDBE4AeE0eOXDMx0P+uluWQW+RYDYCGYK+1I+FWW9ly6Cy3T95pZ6lGM8ugBPZT S6lOg8mZ3Flgtoj6XC4KOE9m15MV5u+1nWDB7/jP1HsOG/WWymLkYzPZReDNnMiUwHq8 5xitdgv+HJgyeitOLQyyH0uMq5JajqLGe8fqIC+eK32Gpp4HrQL6cQV7IlHgXrazgO7b m5SjmJiJtTbjU+B4vKnmcxP2fvRgcJkiDhfZJsCiWZERhYWevRa4z0A3Fn/X0pkw8e6y KWXXMEVVNAVRKPhMoJistPvCgxjxq8zfdH3L2yaO0Zl1CNCpLHyAdyqrDhWAiTviLZHo mXiw== X-Gm-Message-State: AJIora+CbScfgwSOxyyVkKi7i0TuG2u7M7lXlSp3UU9+k35TMkGQlpCq qdfw99Xo6S89BqetYDyjqTjkZCgzkWWQjtY1v89mAw== X-Google-Smtp-Source: AGRyM1ugqmt9DDomYcxjZBCfHColnGRSwoMdU+8bT2TZSM+C2v9BWbIiEBZHHNxj556rRL/VmzE76DtGsOcOMTQT/sw= X-Received: by 2002:a81:1492:0:b0:31c:a1ff:9ec with SMTP id 140-20020a811492000000b0031ca1ff09ecmr24431681ywu.327.1657635473811; Tue, 12 Jul 2022 07:17:53 -0700 (PDT) MIME-Version: 1.0 References: <20220701142310.2188015-1-glider@google.com> <20220701142310.2188015-9-glider@google.com> In-Reply-To: <20220701142310.2188015-9-glider@google.com> From: Marco Elver Date: Tue, 12 Jul 2022 16:17:18 +0200 Message-ID: Subject: Re: [PATCH v4 08/45] kmsan: mark noinstr as __no_sanitize_memory To: Alexander Potapenko Cc: Alexander Viro , Alexei Starovoitov , Andrew Morton , Andrey Konovalov , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Christoph Hellwig , Christoph Lameter , David Rientjes , Dmitry Vyukov , Eric Dumazet , Greg Kroah-Hartman , Herbert Xu , Ilya Leoshkevich , Ingo Molnar , Jens Axboe , Joonsoo Kim , Kees Cook , Mark Rutland , Matthew Wilcox , "Michael S. Tsirkin" , Pekka Enberg , Peter Zijlstra , Petr Mladek , Steven Rostedt , Thomas Gleixner , Vasily Gorbik , Vegard Nossum , Vlastimil Babka , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657635474; a=rsa-sha256; cv=none; b=EWXDXV8ZSGXNbuZhgn+8tQOSD40pegR3vBtAqJSrdsWfWiRx43Aast7GWbX11t6+XxEVAP Ol/5GqsHHUyxIXXErKUfnyWlb8zzksYftgIzxWjAv1kY4KfIj5OBPbxlVy+X9cOb0LLAly nIT7s/mTTWz1TeMMukevrvsomRukSFU= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=s50HuPFg; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf10.hostedemail.com: domain of elver@google.com designates 209.85.128.173 as permitted sender) smtp.mailfrom=elver@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657635474; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=BBNAmGtBjsKiAgWVGNt1epS6tn9dFMCvgo2fNVioNes=; b=6NjJUt81cKt6o8PpPgyUFloNr7SZrM5m3ijcCdY7IvodJZ5Y0wJNA9xkNj79QokvyScmUK e0t8ICw/XP3WEWGL8PyexHZfxtRs0F3r9ZUSUw0qhF7uiyyzOrkKRO2lqyKULbENEb01+O 1zl8gpkIMIlBBCRkHCcAr3D0kqk9tTY= X-Stat-Signature: 5hqjkseodgab1qeiinhpthtp4oo1r68x X-Rspamd-Queue-Id: B6DE6C005C Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=s50HuPFg; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf10.hostedemail.com: domain of elver@google.com designates 209.85.128.173 as permitted sender) smtp.mailfrom=elver@google.com X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1657635474-165506 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: On Fri, 1 Jul 2022 at 16:23, Alexander Potapenko wrote: > > noinstr functions should never be instrumented, so make KMSAN skip them > by applying the __no_sanitize_memory attribute. > > Signed-off-by: Alexander Potapenko Reviewed-by: Marco Elver > --- > v2: > -- moved this patch earlier in the series per Mark Rutland's request > > Link: https://linux-review.googlesource.com/id/I3c9abe860b97b49bc0c8026918b17a50448dec0d > --- > include/linux/compiler_types.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h > index d08dfcb0ac687..fb5777e5228e7 100644 > --- a/include/linux/compiler_types.h > +++ b/include/linux/compiler_types.h > @@ -227,7 +227,8 @@ struct ftrace_likely_data { > /* Section for code which can't be instrumented at all */ > #define noinstr \ > noinline notrace __attribute((__section__(".noinstr.text"))) \ > - __no_kcsan __no_sanitize_address __no_profile __no_sanitize_coverage > + __no_kcsan __no_sanitize_address __no_profile __no_sanitize_coverage \ > + __no_sanitize_memory > > #endif /* __KERNEL__ */ > > -- > 2.37.0.rc0.161.g10f37bed90-goog >