Message ID | 20220905122452.2258262-40-glider@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 21428ECAAD5 for <linux-mm@archiver.kernel.org>; Mon, 5 Sep 2022 12:26:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B39918D008E; Mon, 5 Sep 2022 08:26:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AE87C8D0076; Mon, 5 Sep 2022 08:26:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9894D8D008E; Mon, 5 Sep 2022 08:26:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 892158D0076 for <linux-mm@kvack.org>; Mon, 5 Sep 2022 08:26:46 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 633B6809AB for <linux-mm@kvack.org>; Mon, 5 Sep 2022 12:26:46 +0000 (UTC) X-FDA: 79877955612.15.3F06B06 Received: from mail-ej1-f74.google.com (mail-ej1-f74.google.com [209.85.218.74]) by imf16.hostedemail.com (Postfix) with ESMTP id 0EAAA18006F for <linux-mm@kvack.org>; Mon, 5 Sep 2022 12:26:45 +0000 (UTC) Received: by mail-ej1-f74.google.com with SMTP id sb14-20020a1709076d8e00b0073d48a10e10so2275971ejc.16 for <linux-mm@kvack.org>; Mon, 05 Sep 2022 05:26:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date; bh=y7GARGHGPpfPMqaRIp9ae7D7QgvYSCiDFPeV4nzQ3Rk=; b=ddTOCduO5x6A/vNQMTAUwanA9sA0BCMeAUh+AbwWZsHDAk9+85xCqrDPAoy/kXj/yM pZSbfcwBzuznV/e1nsCZpHlDb15U84fy2lfiqZMe8aoHY/I7P25KzOs1d3vrlFmbReSY CMgox+WoZoI864HUj6y69WtC8wXEhJsfJO1HGhmgOHeHxH+VxZafKqFKdLrvdFRpq+z3 ENymG35akVbdRkGAMGE8Z8s0OdqqWY6HbsmxVcinzKH7wWkH7p+aAzFkQtSI/s7mr3da ilHo8C+mpJ4L2avMdUVG4qeyBVv1yqdqrzQBpWWV9P63dsr6gXP1A1YwiJarV7ILSOFv WffQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date; bh=y7GARGHGPpfPMqaRIp9ae7D7QgvYSCiDFPeV4nzQ3Rk=; b=yeWeHHmyeKB1+8wnVmie+uNzbjd1Ny5k2kzeporS5XTQ9ws1xLoe7vfc5yh/pSEn4A Gx4I80s8KXqbVshgpUeJrMK0AqxlnEFgL+ARZ9KSS6usqrixD163joIrpUsnO4Ujk/Il IUKsfiWOA8UDCMtSjEs2RDHT4VhG92G3MsEyAFfG6BCdatxZCHHqf92zVdIzwjsI2cVn Rd3KNrgEf7+XkSvBMPPc4fFujssXTCR1ZhusUK28xxRmv8t+OGVCOI589TLigN9vX3Pn Sc+9clfmS4ua1AmOaYGHsvfruTwk94uO9iGPFFvrY+qM0SjBxbWKxjCausGJOtcCtUz6 t5Dg== X-Gm-Message-State: ACgBeo00YyYO/+y5zAMfGaFqYS4eylH/p6vajinokld5IZHqHki9TS44 s1iBDJIfpnhwJUaSf2jdfFy0BCYGz2o= X-Google-Smtp-Source: AA6agR4QT5xvR//Dr9lpspZ++6X8QeAx9PC0zKsZbmb97U5jvQ2WfdBoaCZHo4G5Gg4skY0cmggOzLItUto= X-Received: from glider.muc.corp.google.com ([2a00:79e0:9c:201:b808:8d07:ab4a:554c]) (user=glider job=sendgmr) by 2002:a17:906:fe46:b0:730:ca2b:cb7b with SMTP id wz6-20020a170906fe4600b00730ca2bcb7bmr37494826ejb.703.1662380804705; Mon, 05 Sep 2022 05:26:44 -0700 (PDT) Date: Mon, 5 Sep 2022 14:24:47 +0200 In-Reply-To: <20220905122452.2258262-1-glider@google.com> Mime-Version: 1.0 References: <20220905122452.2258262-1-glider@google.com> X-Mailer: git-send-email 2.37.2.789.g6183377224-goog Message-ID: <20220905122452.2258262-40-glider@google.com> Subject: [PATCH v6 39/44] x86: fs: kmsan: disable CONFIG_DCACHE_WORD_ACCESS From: Alexander Potapenko <glider@google.com> To: glider@google.com Cc: Alexander Viro <viro@zeniv.linux.org.uk>, Alexei Starovoitov <ast@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, Andrey Konovalov <andreyknvl@google.com>, Andy Lutomirski <luto@kernel.org>, Arnd Bergmann <arnd@arndb.de>, Borislav Petkov <bp@alien8.de>, Christoph Hellwig <hch@lst.de>, Christoph Lameter <cl@linux.com>, David Rientjes <rientjes@google.com>, Dmitry Vyukov <dvyukov@google.com>, Eric Dumazet <edumazet@google.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Herbert Xu <herbert@gondor.apana.org.au>, Ilya Leoshkevich <iii@linux.ibm.com>, Ingo Molnar <mingo@redhat.com>, Jens Axboe <axboe@kernel.dk>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, Kees Cook <keescook@chromium.org>, Marco Elver <elver@google.com>, Mark Rutland <mark.rutland@arm.com>, Matthew Wilcox <willy@infradead.org>, "Michael S. Tsirkin" <mst@redhat.com>, Pekka Enberg <penberg@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Petr Mladek <pmladek@suse.com>, Steven Rostedt <rostedt@goodmis.org>, Thomas Gleixner <tglx@linutronix.de>, Vasily Gorbik <gor@linux.ibm.com>, Vegard Nossum <vegard.nossum@oracle.com>, Vlastimil Babka <vbabka@suse.cz>, kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Andrey Konovalov <andreyknvl@gmail.com> Content-Type: text/plain; charset="UTF-8" ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=ddTOCduO; spf=pass (imf16.hostedemail.com: domain of 3BOsVYwYKCFEz41wxAz77z4x.v75416DG-553Etv3.7Az@flex--glider.bounces.google.com designates 209.85.218.74 as permitted sender) smtp.mailfrom=3BOsVYwYKCFEz41wxAz77z4x.v75416DG-553Etv3.7Az@flex--glider.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662380806; a=rsa-sha256; cv=none; b=MyiI+IqFXx/VwYkNLrSBWj9wPYvpXtNcS94QKIvcE6jcY08XZwiU/4Drpw++pDueYNsddi fizP+JmuS2Lg6Xv0E7n6RD9I0x7GmqYrmxGRAtxZG/lpaqpSLem+SQ3VEkUj6aCzdoCz8F 9Fvgqg/Ul8GybC+M+kav5iza9zVH97U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662380806; 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=y7GARGHGPpfPMqaRIp9ae7D7QgvYSCiDFPeV4nzQ3Rk=; b=Nl/SBxbcQ1B/U5KwqeWs/H0hEtj8U8XSl7OIUVPXBJXC69NDy7DSll1x/bcudY/TVLanWx uRFGlZ4hapamrinMUAcW3L/9LgWeNYBPZG2GZPVa5o6cQwMLXADHknrAzoCCF6eO1xBPYf jKfzuI8CvTyR0jMj1J4fgdpnNrBw2dc= X-Rspam-User: Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=ddTOCduO; spf=pass (imf16.hostedemail.com: domain of 3BOsVYwYKCFEz41wxAz77z4x.v75416DG-553Etv3.7Az@flex--glider.bounces.google.com designates 209.85.218.74 as permitted sender) smtp.mailfrom=3BOsVYwYKCFEz41wxAz77z4x.v75416DG-553Etv3.7Az@flex--glider.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 0EAAA18006F X-Stat-Signature: 7skmd8xeynwmmk13bm3tpyed8euhipyk X-HE-Tag: 1662380805-256706 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/arch/x86/Kconfig b/arch/x86/Kconfig index 33f4d4baba079..697da8dae1418 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -128,7 +128,9 @@ config X86 select CLKEVT_I8253 select CLOCKSOURCE_VALIDATE_LAST_CYCLE select CLOCKSOURCE_WATCHDOG - select DCACHE_WORD_ACCESS + # Word-size accesses may read uninitialized data past the trailing \0 + # in strings and cause false KMSAN reports. + select DCACHE_WORD_ACCESS if !KMSAN select DYNAMIC_SIGFRAME select EDAC_ATOMIC_SCRUB select EDAC_SUPPORT
dentry_string_cmp() calls read_word_at_a_time(), which might read uninitialized bytes to optimize string comparisons. Disabling CONFIG_DCACHE_WORD_ACCESS should prohibit this optimization, as well as (probably) similar ones. Suggested-by: Andrey Konovalov <andreyknvl@gmail.com> Signed-off-by: Alexander Potapenko <glider@google.com> --- Link: https://linux-review.googlesource.com/id/I4c0073224ac2897cafb8c037362c49dda9cfa133 --- arch/x86/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)