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 792D4C433F5 for ; Tue, 29 Mar 2022 12:41:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236510AbiC2Mnb (ORCPT ); Tue, 29 Mar 2022 08:43:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236412AbiC2Mmr (ORCPT ); Tue, 29 Mar 2022 08:42:47 -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 1741C21547E for ; Tue, 29 Mar 2022 05:40:53 -0700 (PDT) Received: by mail-ed1-x549.google.com with SMTP id l14-20020aa7cace000000b003f7f8e1cbbdso10941231edt.20 for ; Tue, 29 Mar 2022 05:40:53 -0700 (PDT) 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=O7QheLFrb7/gpanG0WgUH3CDvOfcWzGQKyw+meqIa2c=; b=nwdrOPNgrlRK/p217vtYWLPWJHANewfRLQpav+XSHbkAVHEnW3oP60FbQ/XxJx5Wey 8DRycD6Z8aEu0MC/3X0fisGnjf5imwmv/pW9pycKVeSdzaHTJ5Rg895wxW0ZrqOGPo10 IfXG+qAD/A/UF9Bi9etjM3pLZn0NbG7nPno2kSpwLlV8g6SDRLw6y8Wk3qoccWfMZ8be drDAk5gciM2kZ8tcU4aiCTs8FvlgiztSYF5pfb76GBFYTSFhMc7u/3/M4f77WEnkaJxj KHDu5r2kXFtX3OnAiGQmLBocYjFXf2eOhSXJmKa/Qj5ogXrOHpI3AL+qNsyyhKmK9AoV 8PsQ== 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=O7QheLFrb7/gpanG0WgUH3CDvOfcWzGQKyw+meqIa2c=; b=fVYOF2q2RE5CiJnYCdTGK+Cw7Wt6N1hXkO4J97fND2QAscYSKPygbDOrd2gQnPQKEH 1bD30U/SwNMih5D5apudI2R8tNq4qCrEoNj2lN8cnITvdfHYRbCiwRVa/D1UlP9FkinP Pfl/m/YWDbIfPWOCu46dQKqY79QMYRjP/L4ffLbojmDo3wXZhAD2qIGZ4QE8cNE0UYxj b+88c+VFkAIwMSMnAI4N4ljST+TFtHhjOAQh7/Zq5qOqvwtSwBnuhZ0LpnzTHdr1/veM ElPJYU8EfMUzqzBpDtZxCLnvN9BJniLkOwtR8YnWUwyrSRXbwAMG7vUY8dg4Dgvy90cI 7oaA== X-Gm-Message-State: AOAM531G1CZXD11Hqy+ulTk9T6Gpr4/+ga+5uP2r6VXIMEg61aezHYAe bZLEvPKP3oAPqFm+3mG/IQQsA5ri4cw= X-Google-Smtp-Source: ABdhPJw72M5zTQlc12l/JxfWqejUITTKjW22Nisg7zg2gWpioCaXSJXtz0/OVqyNYeeR7potvImif+IfrBc= X-Received: from glider.muc.corp.google.com ([2a00:79e0:15:13:36eb:759:798f:98c3]) (user=glider job=sendgmr) by 2002:a17:907:60cc:b0:6e0:dab3:ca76 with SMTP id hv12-20020a17090760cc00b006e0dab3ca76mr19088650ejc.154.1648557652185; Tue, 29 Mar 2022 05:40:52 -0700 (PDT) Date: Tue, 29 Mar 2022 14:39:38 +0200 In-Reply-To: <20220329124017.737571-1-glider@google.com> Message-Id: <20220329124017.737571-10-glider@google.com> Mime-Version: 1.0 References: <20220329124017.737571-1-glider@google.com> X-Mailer: git-send-email 2.35.1.1021.g381101b075-goog Subject: [PATCH v2 09/48] kmsan: mark noinstr as __no_sanitize_memory From: Alexander Potapenko To: glider@google.com Cc: Alexander Viro , 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 , Marco Elver , Mark Rutland , Matthew Wilcox , "Michael S. Tsirkin" , Pekka Enberg , Peter Zijlstra , Petr Mladek , Steven Rostedt , Thomas Gleixner , Vasily Gorbik , Vegard Nossum , Vlastimil Babka , linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org noinstr functions should never be instrumented, so make KMSAN skip them by applying the __no_sanitize_memory attribute. Signed-off-by: Alexander Potapenko --- 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 3c1795fdb5686..286675559cbba 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -221,7 +221,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.35.1.1021.g381101b075-goog