Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4439913ioa; Wed, 27 Apr 2022 04:03:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxjPCo8tV4/yA2lZAtcJcPHBrkPMy5HRAUz19d1geuEykieLzP9mFq7Z1OIF0dWtEb/3+q X-Received: by 2002:a17:90a:ac15:b0:1d9:839d:3fac with SMTP id o21-20020a17090aac1500b001d9839d3facmr15328216pjq.195.1651057406734; Wed, 27 Apr 2022 04:03:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651057406; cv=none; d=google.com; s=arc-20160816; b=jxVji5+f+VxGM+VPkqwgMGxkhZcyN4TVItq7WtR0FxXyOvLi61LtPiOQzjmTtna3OE XegSbNvHA5xJ9YnZg4NLxHyAsb1boIoOpKFBWw86xtg5ySWOkM2PrO39/METIzbjNjTn IyCC4UWDz3WU+xzrRIKrd/zJS3pnal1cZjB8+jRVt6dwR6soNI0/S5VFnoVXKXmYnL+/ pfrzY8x8IKkxlwJFnKD+wl/yMNpY9lzLPMA9hDf/TGP5hcDQdfm0jdy4YcmgzPIsPgRv xOWJ86OLrIsGOKjeORZSys/HWezDJql2Ln4R7ldCKb0T+tfKBZg8euzAjquj3dbmnNNP cSRA== 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:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=ednioRVQi+463GyxSxojLtYXRmMb4k6reZrR8s7PDTk=; b=jCekIIM5UmMQDAfZQ0txEUQ3yTVPr88dpt7QYFbX6pCzeJdB3p4/U0Ub4TVIr0JuPe aAlLKHOMwmYW8Uxbjb6PUiNIzcinUIu2mLKuOV3E8qxtOUzPdUq10EBEQ8Ewy1E8szJu LYE+h0xCZAAVrtmZH6POYtjcgOHBjfVndQh/MJsqYMuXd7XeFz8F/M+mDf9ltenezrZW C4rmcOnw++Fa2t4ZMN2QQIAu6ird3iMs2QjGJWChqfshBxy236YizuimCqgQ/i+DHiCr ZQtAetaLmiqau4N2w6PfjVTB9r4iv61YhMvVH7ILdmCbXNTJcy/rATaTF2xlc3KtCIlb 3Gfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=s7nDKeE2; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s10-20020a056a0008ca00b004fa3a8e006fsi1227547pfu.294.2022.04.27.04.03.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 04:03:26 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=s7nDKeE2; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9BF56468678; Wed, 27 Apr 2022 03:13:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353179AbiDZQsa (ORCPT + 99 others); Tue, 26 Apr 2022 12:48:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353132AbiDZQrx (ORCPT ); Tue, 26 Apr 2022 12:47:53 -0400 Received: from mail-lj1-x249.google.com (mail-lj1-x249.google.com [IPv6:2a00:1450:4864:20::249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47B14191446 for ; Tue, 26 Apr 2022 09:44:45 -0700 (PDT) Received: by mail-lj1-x249.google.com with SMTP id l8-20020a2ea808000000b0024da289e41dso4843014ljq.7 for ; Tue, 26 Apr 2022 09:44:45 -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=ednioRVQi+463GyxSxojLtYXRmMb4k6reZrR8s7PDTk=; b=s7nDKeE2uO8tPBSHXhKtgeVd4KJBULrFKzji5KxbrLSqAsd9qwd5XqsiW4sxXc2Zuj /LDHzi6oYDxLjayBmNbbHHd8x60Z1q11m24TiSwhP8RYbreiv3W6YuCWDnMHnOA40Zg6 2XAh/SQC3o2WwNcd888BCR1ayDkPme9nLNf+yFJmAhhH+5m2makPEnGrUgDcpKDvSpAx uZ/EMSRFu7oZ7g4w8LFxCUmwK7SAeXqsUvws74aRat1Udaq+/e8oYjQBcJ/MQ0phtMYp ItWJ4UPus1+bGv6Mz6YHzcXh/jQw/SqfpbBVzObyfR2JQ5g2erl9ttRuMQ0dfEHG3Yf8 GoPQ== 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=ednioRVQi+463GyxSxojLtYXRmMb4k6reZrR8s7PDTk=; b=io1OmFgsqAM6OdKPBiLUsx5B5NGYGAeOC+i0OLtlWZIkiRs8u2akNbtA2E3rJHd5Kl +04GS8uLj4QFrfO5yyfXNdeQbsGHcthEfRHQBlxHsmEjY4xK1gsaVKmTn2avPiOtSIFY CLlt6RPA200M51E5kXtjIQ6H2rGG/Ab1DM7CEucKP0ytGc89V8148qmLgI4ssKHV/ig3 DVktISon6qblLWctEiQMPIJiith7beVFX35TNttAvc606b3LS9Mln5dfTG9gq4gkKi5T j4S2BtJ0/SogB5JCdfZYIruPdvI5GoWvOJnlisynVZBzkbiSBSZrCP+14nhDHsuG7BWn fnVg== X-Gm-Message-State: AOAM532PLZpaEtbBHe//z4GmQAcj17ApIfiw83/OZQIPG6KlH28ESxDP d6P260aREUkB1Aj2Jphz5aKd9dMtqU8= X-Received: from glider.muc.corp.google.com ([2a00:79e0:15:13:d580:abeb:bf6d:5726]) (user=glider job=sendgmr) by 2002:a05:6512:114f:b0:471:b097:4a29 with SMTP id m15-20020a056512114f00b00471b0974a29mr17572189lfg.93.1650991483323; Tue, 26 Apr 2022 09:44:43 -0700 (PDT) Date: Tue, 26 Apr 2022 18:42:38 +0200 In-Reply-To: <20220426164315.625149-1-glider@google.com> Message-Id: <20220426164315.625149-10-glider@google.com> Mime-Version: 1.0 References: <20220426164315.625149-1-glider@google.com> X-Mailer: git-send-email 2.36.0.rc2.479.g8af0fa9b8e-goog Subject: [PATCH v3 09/46] 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 , 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" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,USER_IN_DEF_DKIM_WL autolearn=no 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 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 1c2c33ae1b37d..a9ba5edd8208b 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.36.0.rc2.479.g8af0fa9b8e-goog