Message ID | 20221102110611.1085175-3-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 A8BAAC4332F for <linux-mm@archiver.kernel.org>; Wed, 2 Nov 2022 11:06:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 478C58E0006; Wed, 2 Nov 2022 07:06:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 44F828E0001; Wed, 2 Nov 2022 07:06:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 365118E0006; Wed, 2 Nov 2022 07:06:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 261508E0001 for <linux-mm@kvack.org>; Wed, 2 Nov 2022 07:06:23 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id EC44B121132 for <linux-mm@kvack.org>; Wed, 2 Nov 2022 11:06:22 +0000 (UTC) X-FDA: 80088223404.09.8BA6605 Received: from mail-ej1-f73.google.com (mail-ej1-f73.google.com [209.85.218.73]) by imf12.hostedemail.com (Postfix) with ESMTP id 98C0340006 for <linux-mm@kvack.org>; Wed, 2 Nov 2022 11:06:22 +0000 (UTC) Received: by mail-ej1-f73.google.com with SMTP id sc40-20020a1709078a2800b007ae024e5e82so1049775ejc.13 for <linux-mm@kvack.org>; Wed, 02 Nov 2022 04:06:22 -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:message-id:reply-to; bh=fUQfvgq1r8lF9rRRm4NumpIHqFvDpVd5cUWloyxUIys=; b=ZOFvSA0cmseSVYIuYaM2BdEV+9xbe5Xbf2t7D0GgypSpP1gnX3wIZjxGtpGcZlix5E FCdURGEXcoZhbn0atFQBOKA8PWu5GZmM0PepNS7WW/UOv8wS8UBvhYQA/S017ZeMaU6B pduViuSKslfAwUv/JkReNhliQybOgcLy8uFrc0LLbfBUiBcHAE6KfsJe1A8kD7TZje6B IGivUc1aeRKlICNXfm5j+lzmy+rGqkvLo+gUkMJchlsBDJTqDJ/HltB0c5Jh1EmtZrYy udfceaJkn1m4l67dY8Nrhn/+bADs62+zBKdKM2OPoBBpBSlwpT6u6Adqi1g1JykfTIHV nquA== 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:message-id:reply-to; bh=fUQfvgq1r8lF9rRRm4NumpIHqFvDpVd5cUWloyxUIys=; b=4W4Y4cRdgZScV97C/S+E2/vNHq3hwxjsUchMKNmhjOt9Al193LhdxMVq9fVHNGLg3k XxPTnCv/eO0iV0ffD+HPCmJUaOSrC/ZD9tY1bguLYDCLIbicH8bAAQA4tf/+VJJbUDjg 1D9GptFNujDGuxW1cdXP3XY6G5JApu2jViFZODmG37f511s2Zk45Ur7rV6W7x+zFBTpa 705ra4WRyHflkoQS1rzI1gKlYW3x0Ge/M1dNPsLVOWiTCQ8kEWHuBCxLZ5EfrMI9F3mi X5USi4307R5F9f8dixud8mxniyDl5p+g/eI3kyr70YcjDAZd4Q18XZWAhTjwN+nZwZVt h54Q== X-Gm-Message-State: ACrzQf078fedCoNEab7wUdEQGoNxMf7lBQx+hYHY0VwV0ikI9Y4r87ym LyG+hWi222owjRUbGU/j1Tw+ieEEtBs= X-Google-Smtp-Source: AMsMyM6PXK1AcgbPYvS415aXFf4iDD8g9auqwdAGE8GYIznokzqnaxqJcwlrYZDt7ihqGTup8MwZef43Ezw= X-Received: from glider.muc.corp.google.com ([2a00:79e0:9c:201:7f41:af20:8:a96d]) (user=glider job=sendgmr) by 2002:a05:6402:450c:b0:443:6279:774f with SMTP id ez12-20020a056402450c00b004436279774fmr24423763edb.11.1667387181029; Wed, 02 Nov 2022 04:06:21 -0700 (PDT) Date: Wed, 2 Nov 2022 12:06:09 +0100 In-Reply-To: <20221102110611.1085175-1-glider@google.com> Mime-Version: 1.0 References: <20221102110611.1085175-1-glider@google.com> X-Mailer: git-send-email 2.38.1.273.g43a17bfeac-goog Message-ID: <20221102110611.1085175-3-glider@google.com> Subject: [PATCH 3/5] Kconfig.debug: ensure early check for KMSAN in CONFIG_KMSAN_WARN From: Alexander Potapenko <glider@google.com> To: glider@google.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>, Kees Cook <keescook@chromium.org>, Masahiro Yamada <masahiroy@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, linux-kbuild@vger.kernel.org Content-Type: text/plain; charset="UTF-8" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667387182; a=rsa-sha256; cv=none; b=ws0vG4CeqVXHZ0nHbR0+cul7bUsfeyeJvylWmKd6m5HYcatJUfIvSwDnLS6nYt7IhNscb1 Ihs3BGc/4L1A7pglmponI1QHqE0PIM9PGRr4jmAjWiAy+Jlps5AJXXeKbZI2X7j5vVWsfr o2T3hNZicJcxn+aA8t59KTnLs05WyR4= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=ZOFvSA0c; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf12.hostedemail.com: domain of 3LU9iYwYKCHYafcXYlaiiafY.Wigfchor-ggepUWe.ila@flex--glider.bounces.google.com designates 209.85.218.73 as permitted sender) smtp.mailfrom=3LU9iYwYKCHYafcXYlaiiafY.Wigfchor-ggepUWe.ila@flex--glider.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667387182; 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=fUQfvgq1r8lF9rRRm4NumpIHqFvDpVd5cUWloyxUIys=; b=aCmOyhW9r9ZnHTf2k3doZo4zW/RJUq8V23NWBgbhOeeceOp5cOMqGzHtmLenZ9dm4giqZa ZpX8V6gM9eKkIfOsXgIlyZQ7vVJegvvCgEBgiN/eHnglkeq1VwG1cflb55qBZ114gpZ2WI HeQ7ClyC3Xbyn0v8ihZpJQByYxAxfJY= X-Stat-Signature: xoctq3gqoandmtromqhxt96rnyxzwhki X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 98C0340006 X-Rspam-User: Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=ZOFvSA0c; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf12.hostedemail.com: domain of 3LU9iYwYKCHYafcXYlaiiafY.Wigfchor-ggepUWe.ila@flex--glider.bounces.google.com designates 209.85.218.73 as permitted sender) smtp.mailfrom=3LU9iYwYKCHYafcXYlaiiafY.Wigfchor-ggepUWe.ila@flex--glider.bounces.google.com X-HE-Tag: 1667387182-62649 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 |
[1/5] kmsan: core: kmsan_in_runtime() should return true in NMI context
|
expand
|
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 29280072dc0e4..b4a0988a7ffd2 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -395,12 +395,12 @@ endif # DEBUG_INFO config FRAME_WARN int "Warn for stack frames larger than" range 0 8192 + default 0 if KMSAN default 2048 if GCC_PLUGIN_LATENT_ENTROPY default 2048 if PARISC default 1536 if (!64BIT && XTENSA) default 1024 if !64BIT default 2048 if 64BIT - default 0 if KMSAN help Tell the compiler to warn at build time for stack frames larger than this. Setting this too low will cause a lot of warnings.
As pointed out by Masahiro Yamada, Kconfig picks up the first default entry which has true 'if' condition. Hence, the previously added check for KMSAN was never used, because it followed the checks for 64BIT and !64BIT. Put KMSAN check before others to ensure it is always applied. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Kees Cook <keescook@chromium.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: linux-kbuild@vger.kernel.org Link: https://github.com/google/kmsan/issues/89 Link: https://lore.kernel.org/linux-mm/20221024212144.2852069-3-glider@google.com/ Fixes: 921757bc9b61 ("Kconfig.debug: disable CONFIG_FRAME_WARN for KMSAN by default") Signed-off-by: Alexander Potapenko <glider@google.com> --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)