From patchwork Fri Nov 22 11:25:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Potapenko X-Patchwork-Id: 11257881 Return-Path: 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 BB3BF1593 for ; Fri, 22 Nov 2019 11:27:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 871F120679 for ; Fri, 22 Nov 2019 11:27:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="cgzH7UBA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 871F120679 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 24AD96B04D5; Fri, 22 Nov 2019 06:27:03 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1AE296B04D6; Fri, 22 Nov 2019 06:27:03 -0500 (EST) 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 04F926B04D7; Fri, 22 Nov 2019 06:27:02 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0247.hostedemail.com [216.40.44.247]) by kanga.kvack.org (Postfix) with ESMTP id DA0BF6B04D5 for ; Fri, 22 Nov 2019 06:27:02 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 98E8F3AB7 for ; Fri, 22 Nov 2019 11:27:02 +0000 (UTC) X-FDA: 76183686684.25.shoes21_33b353182955 X-Spam-Summary: 2,0,0,6a26edef04058b1f,d41d8cd98f00b204,3bmbxxqykcomlqnijwlttlqj.htrqnszc-rrpafhp.twl@flex--glider.bounces.google.com,:aryabinin@virtuozzo.com:axboe@kernel.dk:luto@kernel.org:vegard.nossum@oracle.com:dvyukov@google.com:hch@lst.de::glider@google.com:viro@zeniv.linux.org.uk:adilger.kernel@dilger.ca:akpm@linux-foundation.org:andreyknvl@google.com:ard.biesheuvel@linaro.org:arnd@arndb.de:hch@infradead.org:darrick.wong@oracle.com:davem@davemloft.net:dmitry.torokhov@gmail.com:ebiggers@google.com:edumazet@google.com:ericvh@gmail.com:gregkh@linuxfoundation.org:harry.wentland@amd.com:herbert@gondor.apana.org.au:iii@linux.ibm.com:mingo@elte.hu:jasowang@redhat.com:m.szyprowski@samsung.com:elver@google.com:mark.rutland@arm.com:martin.petersen@oracle.com:schwidefsky@de.ibm.com:willy@infradead.org:mst@redhat.com:monstr@monstr.eu:pmladek@suse.com:cai@lca.pw:rdunlap@infradead.org:robin.murphy@arm.com:sergey.senozhatsky@gmail.com:rostedt@goodmis.org:tiwai@suse.com:tytso@mit.edu :tglx@li X-HE-Tag: shoes21_33b353182955 X-Filterd-Recvd-Size: 4738 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Fri, 22 Nov 2019 11:27:02 +0000 (UTC) Received: by mail-wr1-f74.google.com with SMTP id u14so3710611wrq.19 for ; Fri, 22 Nov 2019 03:27:01 -0800 (PST) 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=sftwESPBiZhdaYqambX8M9Y8nR13BiUN/PMUasnsZnI=; b=cgzH7UBAuQreO7BTqh50HgAf6UjW2UmBzh15obLEbucoOPqm1HFz4N5/rlh/LVlc9u xlx3cQA9v/TmYtDoKdAzyL2iRigLaGPvqBmn0z+halvqr8BaLNwSw6l4qKE7P0b7bALJ PWyMz8Vo0I3vveirFJE/QddgrV2WU3xy+Ht63qF9pivC5o6SAL4JmAManHUHXi7aenmz ynTAo2PtLfO9RtoVw71AIxcOL5PMzPF0ETbJV0EjBhk4OIxQGVcwB6NsCYSycBJIXTtz vW3mi8xGIZEZRuHB3bZv91bSteWTRtwOIrqZYjq4tOyWg/+WRdAIqkkmCmkJco1rrJwz /jPg== 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=sftwESPBiZhdaYqambX8M9Y8nR13BiUN/PMUasnsZnI=; b=afmlrY/X0cxQrIbZBX5KUpd4dUPiHbfLmT4LSZELvM/GnKStBUsDG15ElKLR/zUbvo PsLTuoVeVOK5Q24/+4yLjL040bA6JSW4SD7sRBbUSFaz9IvTA5NupVhoFw9MVepg4pLe ja4IZqjcdMxQxEUjfNnl21CWikXVYpj9H+nSCSkHqqv6kZJMirBmU0g85xaKNyU02RZp Jl/A5JAorlusdnVKYgXRif8wQbrrp8BuE+FOitJW01T0gG+pMRCuuOCFGiKNuVPFNZWb Jpx9oc6Q1GK+KzeClaPN/eVdrFL5heydH4f5GLnGcpDh5wtWTkNf9dZsKYvkOdN9Ef0q YFTg== X-Gm-Message-State: APjAAAUB6RSQFcRzuosvj8rG6fFksg0qVSApj4Xp9lsWZiqBqPauciOk Hz7Hup/trVbS2xV1z4UWU5V33x45fiQ= X-Google-Smtp-Source: APXvYqwwICbj1stiIWuyOyWAsB0IdsJw0vovVbSn4n5XtrzjzV6ngGd9E8DDn78jXNv2qAaJSm6D+t2AP3o= X-Received: by 2002:adf:f489:: with SMTP id l9mr16478942wro.337.1574422020635; Fri, 22 Nov 2019 03:27:00 -0800 (PST) Date: Fri, 22 Nov 2019 12:25:56 +0100 In-Reply-To: <20191122112621.204798-1-glider@google.com> Message-Id: <20191122112621.204798-12-glider@google.com> Mime-Version: 1.0 References: <20191122112621.204798-1-glider@google.com> X-Mailer: git-send-email 2.24.0.432.g9d3f5f5b63-goog Subject: [PATCH RFC v3 11/36] kmsan: stackdepot: don't allocate KMSAN metadata for stackdepot From: glider@google.com To: Andrey Ryabinin , Jens Axboe , Andy Lutomirski , Vegard Nossum , Dmitry Vyukov , Christoph Hellwig , linux-mm@kvack.org Cc: glider@google.com, viro@zeniv.linux.org.uk, adilger.kernel@dilger.ca, akpm@linux-foundation.org, andreyknvl@google.com, ard.biesheuvel@linaro.org, arnd@arndb.de, hch@infradead.org, darrick.wong@oracle.com, davem@davemloft.net, dmitry.torokhov@gmail.com, ebiggers@google.com, edumazet@google.com, ericvh@gmail.com, gregkh@linuxfoundation.org, harry.wentland@amd.com, herbert@gondor.apana.org.au, iii@linux.ibm.com, mingo@elte.hu, jasowang@redhat.com, m.szyprowski@samsung.com, elver@google.com, mark.rutland@arm.com, martin.petersen@oracle.com, schwidefsky@de.ibm.com, willy@infradead.org, mst@redhat.com, monstr@monstr.eu, pmladek@suse.com, cai@lca.pw, rdunlap@infradead.org, robin.murphy@arm.com, sergey.senozhatsky@gmail.com, rostedt@goodmis.org, tiwai@suse.com, tytso@mit.edu, tglx@linutronix.de, gor@linux.ibm.com, wsa@the-dreams.de 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: We assume nothing interesting could happen in stackdepot, and save some memory by not tracking stackdepot allocations with KMSAN. Signed-off-by: Alexander Potapenko Cc: Andrey Ryabinin Cc: Jens Axboe Cc: Andy Lutomirski Cc: Vegard Nossum Cc: Dmitry Vyukov Cc: Christoph Hellwig Cc: linux-mm@kvack.org --- Change-Id: Ic3ec9b3dff3fff2732d874508a3582fb26ff0b1f --- lib/stackdepot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/stackdepot.c b/lib/stackdepot.c index e2f000a9fad8..2b053c429454 100644 --- a/lib/stackdepot.c +++ b/lib/stackdepot.c @@ -294,7 +294,8 @@ depot_stack_handle_t stack_depot_save(unsigned long *entries, * contexts and I/O. */ alloc_flags &= ~GFP_ZONEMASK; - alloc_flags &= (GFP_ATOMIC | GFP_KERNEL); + alloc_flags &= (GFP_ATOMIC | GFP_KERNEL | + __GFP_NO_KMSAN_SHADOW); alloc_flags |= __GFP_NOWARN; page = alloc_pages(alloc_flags, STACK_ALLOC_ORDER); if (page)