Message ID | 20191018094304.37056-9-glider@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=Fj1U=YL=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D2C913B1 for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 18 Oct 2019 09:43:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 20D2520820 for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 18 Oct 2019 09:43:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="foQBOT+r" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20D2520820 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 373F88E0023; Fri, 18 Oct 2019 05:43:39 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2FCC98E0003; Fri, 18 Oct 2019 05:43:39 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 213AB8E0023; Fri, 18 Oct 2019 05:43:39 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0034.hostedemail.com [216.40.44.34]) by kanga.kvack.org (Postfix) with ESMTP id F04438E0003 for <linux-mm@kvack.org>; Fri, 18 Oct 2019 05:43:38 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 7A0278277BED for <linux-mm@kvack.org>; Fri, 18 Oct 2019 09:43:38 +0000 (UTC) X-FDA: 76056418116.13.fact92_770e06ca9e854 X-Spam-Summary: 2,0,0,a7c49aa4a5f74068,d41d8cd98f00b204,3simpxqykcpmbgdyzmbjjbgz.xjhgdips-hhfqvxf.jmb@flex--glider.bounces.google.com,:glider@google.com:vegard.nossum@oracle.com:akpm@linux-foundation.org:dvyukov@google.com:,RULES_HIT:41:152:355:379:541:800:960:973:988:989:1260:1277:1313:1314:1345:1359:1431:1437:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3152:3352:3865:3867:3868:3871:3874:4250:4321:5007:6119:6120:6261:6653:7901:7903:7904:9969:10004:10400:11026:11232:11473:11658:11914:12043:12297:12438:12555:12895:13069:13311:13357:13846:14096:14097:14181:14394:14659:14721:21080:21365:21433:21444:21451:21627:30054:30064:30090,0,RBL:209.85.128.74:@flex--glider.bounces.google.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: fact92_770e06ca9e854 X-Filterd-Recvd-Size: 4393 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) by imf37.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Fri, 18 Oct 2019 09:43:37 +0000 (UTC) Received: by mail-wm1-f74.google.com with SMTP id v26so364956wmh.2 for <linux-mm@kvack.org>; Fri, 18 Oct 2019 02:43:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=Fq1aR6bk0bOUK9AfN6hxl7otJcG65B93WABxCwJyYAU=; b=foQBOT+r+tvtFJQdtLJM7hHIJC9CEZwProhyezQxi0mPc4Ts1zdsgj62S+tSdIT3Go Zow1l3rX6q0UI26hEGvc2v10LPwxIn2JFlaaD/4n81KMts5bYn/JOLa/IH4uZWoYQf3V 0KUDZ4nIHiXTxkIa6WANJYaRfk0E3ibRxP1jWRupjH1/7qrr5oBAIgfH8TlH4WfUMihA fbUmIqHndri27r34k680cyGg026vieL8YIZnltaDCQnK7kDdc+gNQ9UZB+vjlZGRvUmq CAEC+E7WProy36BPpAvBY9nSkbnfOHNj4G3Rt3zdzxNukcent5IP4T5SituWJawtCO4y bmBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=Fq1aR6bk0bOUK9AfN6hxl7otJcG65B93WABxCwJyYAU=; b=O1MaUudDjljQPxo2ZsbKfAKuvqh+pPvJzttfmXHLszSVVCLiOZ7f+i8mPDLdSa0yUC UxuamsGHncpR8GgLcL1QbMXTiVKhfnkU18kyCAByNp5HPSMyoIsRtkl0lESlNVaVbFXZ k630emik1d15wten9o8HzafhI0oPNbe0ARiT0UG3DYD57AXR2yO2herSJDXITrLtuOd8 fPG9bjE3/uOSdavZuSam1UwgHOJEpisC2ZTsxYwDIKAO+cIAl3w988Xiv8sIjwEE6i5i M+eQ0icGN4rUBXEs3wb5Uf6pTmp3kuYkJPMuHj37SjAprb4bItpMj2tObsv9hqbKYkb8 08FA== X-Gm-Message-State: APjAAAVF7yaB4TPG7jOJla5bx71xEG+kEJ7VSW9GOFsUt1d4B+/RvJmU VFO7PCBmKSIEaPgMx4+PshQKc1zEskI= X-Google-Smtp-Source: APXvYqwqmQbdcaEtuC6Tdfd2oIHdTU1EQ9xvJORBBqGBrZL5scw397C+KzjGjfJOMwLMNSnbMK/RvbNZ0CA= X-Received: by 2002:adf:fc10:: with SMTP id i16mr6689092wrr.157.1571391816882; Fri, 18 Oct 2019 02:43:36 -0700 (PDT) Date: Fri, 18 Oct 2019 11:42:46 +0200 In-Reply-To: <20191018094304.37056-1-glider@google.com> Message-Id: <20191018094304.37056-9-glider@google.com> Mime-Version: 1.0 References: <20191018094304.37056-1-glider@google.com> X-Mailer: git-send-email 2.23.0.866.gb869b98d4c-goog Subject: [PATCH RFC v1 08/26] kmsan: gfp: introduce __GFP_NO_KMSAN_SHADOW From: glider@google.com To: Alexander Potapenko <glider@google.com> Cc: Vegard Nossum <vegard.nossum@oracle.com>, Andrew Morton <akpm@linux-foundation.org>, Dmitry Vyukov <dvyukov@google.com>, linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" 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: <linux-mm.kvack.org> |
Series |
Add KernelMemorySanitizer infrastructure
|
expand
|
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index fb07b503dc45..b4e7963cd94b 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -44,6 +44,7 @@ struct vm_area_struct; #else #define ___GFP_NOLOCKDEP 0 #endif +#define ___GFP_NO_KMSAN_SHADOW 0x1000000u /* If the above are modified, __GFP_BITS_SHIFT may need updating */ /* @@ -212,12 +213,13 @@ struct vm_area_struct; #define __GFP_NOWARN ((__force gfp_t)___GFP_NOWARN) #define __GFP_COMP ((__force gfp_t)___GFP_COMP) #define __GFP_ZERO ((__force gfp_t)___GFP_ZERO) +#define __GFP_NO_KMSAN_SHADOW ((__force gfp_t)___GFP_NO_KMSAN_SHADOW) /* Disable lockdep for GFP context tracking */ #define __GFP_NOLOCKDEP ((__force gfp_t)___GFP_NOLOCKDEP) /* Room for N __GFP_FOO bits */ -#define __GFP_BITS_SHIFT (23 + IS_ENABLED(CONFIG_LOCKDEP)) +#define __GFP_BITS_SHIFT (25) #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) /**
This flag is to be used by KMSAN runtime to mark that newly created memory pages don't need KMSAN metadata backing them. Signed-off-by: Alexander Potapenko <glider@google.com> To: Alexander Potapenko <glider@google.com> Cc: Vegard Nossum <vegard.nossum@oracle.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: linux-mm@kvack.org --- We can't decide what to do here: - do we need to conditionally define ___GFP_NO_KMSAN_SHADOW depending on CONFIG_KMSAN like LOCKDEP does? - if KMSAN is defined, and LOCKDEP is not, do we want to "compactify" the GFP bits? Change-Id: If5d0352fd5711ad103328e2c185eb885e826423a --- include/linux/gfp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)