Message ID | 20220701142310.2188015-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 AC2E5C433EF for <linux-mm@archiver.kernel.org>; Fri, 1 Jul 2022 14:25:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 44DE76B007D; Fri, 1 Jul 2022 10:25:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D53B6B007E; Fri, 1 Jul 2022 10:25:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 29D106B0085; Fri, 1 Jul 2022 10:25:07 -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 1A9006B007D for <linux-mm@kvack.org>; Fri, 1 Jul 2022 10:25:07 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id EAB2333AC8 for <linux-mm@kvack.org>; Fri, 1 Jul 2022 14:25:06 +0000 (UTC) X-FDA: 79638753012.26.5219171 Received: from mail-lf1-f73.google.com (mail-lf1-f73.google.com [209.85.167.73]) by imf24.hostedemail.com (Postfix) with ESMTP id 7E1FB180047 for <linux-mm@kvack.org>; Fri, 1 Jul 2022 14:25:06 +0000 (UTC) Received: by mail-lf1-f73.google.com with SMTP id b2-20020a0565120b8200b00477a4532448so1188074lfv.22 for <linux-mm@kvack.org>; Fri, 01 Jul 2022 07:25:06 -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=MLo3LhenoRrRqNTI2r4mtWD3J0vGsm9bvjleadBpMkY=; b=anOUkKWtulGEKBkArfZgJyNh0cGJx9d7Cq23k1uQwOBaeBk8BsWD249jvt+waaUJ0W wFq6nFfeaRMqhTZBfdHnekYcU9Y6DlOKwhd7zz8Pwv5Mf7POcnXxXlRO9IdWwc7sHxG8 EJehSvYRYGgoI66twoBlGoYEACzjwkAkNmneLnfsKkPQFvcZRfWhgQAodIu6D09PjFk8 Icdf6H3+rBIz7HcFSJ3Z9tX02BV8EOgwwt+6yOVuoCYfJOPeNjzAXzZ5xayTIEyTNe+u 12rzA9yQKhB/zdr6mRJsJWTzWXROIdNbnWlGX7VZEuLugd3XmFTzxEYhZNDwatZ7SBn9 IL1g== 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=MLo3LhenoRrRqNTI2r4mtWD3J0vGsm9bvjleadBpMkY=; b=vro+b7/dWbtMDEUQXEXM1xz6sghV1SBjbpzs2XX7PJ7qMBb/12vcKkgwUo16PUOPs6 1J2mjTx58y7LzGgtdUxXf1/ebgEjeKcDLgvXBCluilq9ki4NHMfN6avvuCSkwilMzr6P k2CbtOrdGNRKNnhc0hNimrGsYqgiyRjD7CgYCSp+nqzNvQyxb7LXYmtM5oNbH0lollD8 EsAHXVg9tcH7doveou/5xX6R0h/xIlD1FRbzOttgycntIHOcXIfBhaRiZ+zJJ5brl30X d+uNlcQ10u8dtg8KhC7nzGoSxUElyfebU7HvFmS7Ve0hn4S4fexjAMTEumTQVpJS9SKP 9LOw== X-Gm-Message-State: AJIora+hKQo9hzPbtUnqKgNARhDM8yiCaUxxhTPP89y2tKkDUIT+hL3m AVoS2Q0VLwM7L17/HC9UT/T9OYF5yzI= X-Google-Smtp-Source: AGRyM1vhkmL+KohFz0MszVF5zMXVYF2SuHbeJwCxM549Y5UN3wtICSWeskVNj4IhdECyposUmY2NkdReg2A= X-Received: from glider.muc.corp.google.com ([2a00:79e0:9c:201:a6f5:f713:759c:abb6]) (user=glider job=sendgmr) by 2002:a05:6512:e83:b0:47f:635c:3369 with SMTP id bi3-20020a0565120e8300b0047f635c3369mr8918326lfb.659.1656685504982; Fri, 01 Jul 2022 07:25:04 -0700 (PDT) Date: Fri, 1 Jul 2022 16:23:04 +0200 In-Reply-To: <20220701142310.2188015-1-glider@google.com> Message-Id: <20220701142310.2188015-40-glider@google.com> Mime-Version: 1.0 References: <20220701142310.2188015-1-glider@google.com> X-Mailer: git-send-email 2.37.0.rc0.161.g10f37bed90-goog Subject: [PATCH v4 39/45] 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; imf24.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=anOUkKWt; spf=pass (imf24.hostedemail.com: domain of 3wAO_YgYKCN8HMJEFSHPPHMF.DPNMJOVY-NNLWBDL.PSH@flex--glider.bounces.google.com designates 209.85.167.73 as permitted sender) smtp.mailfrom=3wAO_YgYKCN8HMJEFSHPPHMF.DPNMJOVY-NNLWBDL.PSH@flex--glider.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656685506; 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=MLo3LhenoRrRqNTI2r4mtWD3J0vGsm9bvjleadBpMkY=; b=4hLODbWvLGyflZCLkxEjYRtxQlkDRxpAIYWR9upGm2IuORv8aZ8ayw/eSxiRrN9mTXYcqN 8QL3yHIeUiRXlQaF5lJJtx9XoCT+YN13ZkLLvMlFk1l5hBh5q+5ElprXJHBwPyiXKMkIER la3jVs2Blr2uT1xBRB8xSyQmQ5HDnfA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656685506; a=rsa-sha256; cv=none; b=qEsUKrWKCVwpx0rPIIf15eVVNsfQB/NiydbCvu1hffLI5luPdeWs1ucoZoVuBTJ+fHtvjF TpTjKBiz16vWZmzfSlO9s30puyMZL5Zoa71zcPSlbGLPhTWIpuF0csbL0umYni0gpOz95t 3tUMOKU0ln7dd/xRtpSoIiAbWGErCsg= X-Stat-Signature: tn61cbfg1yr3qaebi5ngm37id8abm44n X-Rspamd-Queue-Id: 7E1FB180047 Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=anOUkKWt; spf=pass (imf24.hostedemail.com: domain of 3wAO_YgYKCN8HMJEFSHPPHMF.DPNMJOVY-NNLWBDL.PSH@flex--glider.bounces.google.com designates 209.85.167.73 as permitted sender) smtp.mailfrom=3wAO_YgYKCN8HMJEFSHPPHMF.DPNMJOVY-NNLWBDL.PSH@flex--glider.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam12 X-Rspam-User: X-HE-Tag: 1656685506-518721 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 4a5d0a0f54dea..aadbb16a59f01 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -129,7 +129,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(-)