From patchwork Mon Oct 24 21:21:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Potapenko X-Patchwork-Id: 13018172 Return-Path: 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 01498C67871 for ; Mon, 24 Oct 2022 21:22:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8216894000A; Mon, 24 Oct 2022 17:22:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7D1CB940007; Mon, 24 Oct 2022 17:22:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6994694000A; Mon, 24 Oct 2022 17:22:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 5BDA0940007 for ; Mon, 24 Oct 2022 17:22:06 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 259761C5D4E for ; Mon, 24 Oct 2022 21:22:06 +0000 (UTC) X-FDA: 80057115852.17.20967E5 Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.73]) by imf15.hostedemail.com (Postfix) with ESMTP id AD47EA0002 for ; Mon, 24 Oct 2022 21:22:05 +0000 (UTC) Received: by mail-ed1-f73.google.com with SMTP id c9-20020a05640227c900b0045d4a88c750so10469758ede.12 for ; Mon, 24 Oct 2022 14:22:05 -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=XYIeNtcSMBuwQ4ZUNtMrq5SFnntAuabRdvmK/d2x8js=; b=Z2RX/saDef7hn683V4j0i5oZ/4CeWuvGJYbdKV5tISFit7ef+6l5PCAipzwyZ7BeiO EPirZ8Rv7RC5dlr2jbxe8J5rDP6eyCRFXSbvCOHFLTgHO38oNZ8NcKEZz7LRJV9whBzw SlOVNCjuhY1/3D3mJnUM8hAamOdsnb/MAYvqsbY87QLHYWOnDOLJk2St3m6OCZXsAM0P wiQfeGmmaTY/zb3roX1oY3y/wFJBytPp5+wk9GOpCrE1kCU6zWIY1Vzoyj/dZdyQokMi KtKVBt799EJxWAxrx6ZXHTTkUeoPkaZT3jX6k+JwokHO7Nf58TS2z0+z03halrOoEixy Q+lA== 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=XYIeNtcSMBuwQ4ZUNtMrq5SFnntAuabRdvmK/d2x8js=; b=NYfSpn8vNUdA2m0rtBYZDj36ntcYpP50i025wrSyqnsnevt/wKYW7B+2F55eXiphSZ t4gAVIlhZAd9gozjVuSnKYdvmvbIsxuYEpP6Rnf/4g4L7AVoJ5sVz7OKrHh3YQe6ZM+W YgwGs4fHuOQVpWzyKraN2tsz2ZhziW3McU1zEpg3z/JZsK8O3pjVdDDjcIq35rbgNUtp 4pT1c6C0hjAdf2W/hdNDOinGQX8EskliNe2oiMzSpZ+5eCohLxoNfLs2rLl50WKu3MOr +zQvbTqhewL4NpEGYXVQRYbnYOWjqqqjUsxZKKUIEmeOcoqhoJbzTBFg4IY/nxQfx4nm aE1A== X-Gm-Message-State: ACrzQf10b56Np+GokvgyTaAvVKO9YELl37O5g/SMriGijg5cp7+6GMta eReVj2hCrn5bZR0R+ohg4zVwyKB0dWg= X-Google-Smtp-Source: AMsMyM4v3Qlkg/xauVd+MHmORNpeKek6l2QBmxJ3e+SVVwmlcYAuzT3vjefHuTAy1CPMCwZF2Oldi5XsCCI= X-Received: from glider.muc.corp.google.com ([2a00:79e0:9c:201:8695:7c88:66ed:f9d1]) (user=glider job=sendgmr) by 2002:a17:906:8451:b0:79d:af69:8a20 with SMTP id e17-20020a170906845100b0079daf698a20mr15002244ejy.406.1666646524113; Mon, 24 Oct 2022 14:22:04 -0700 (PDT) Date: Mon, 24 Oct 2022 23:21:42 +0200 In-Reply-To: <20221024212144.2852069-1-glider@google.com> Mime-Version: 1.0 References: <20221024212144.2852069-1-glider@google.com> X-Mailer: git-send-email 2.38.0.135.g90850a2211-goog Message-ID: <20221024212144.2852069-3-glider@google.com> Subject: [PATCH 3/5] Kconfig.debug: disable CONFIG_FRAME_WARN for KMSAN by default From: Alexander Potapenko To: glider@google.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Kees Cook , Masahiro Yamada , Nick Desaulniers , linux-kbuild@vger.kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666646525; a=rsa-sha256; cv=none; b=6Xw9amKjHhoNbuvaeI2fhyFBZYNLbtZJjI8fLk/8ystB5rVj8NON3yGbNrf4n7oAdTtvmm BAUKA6Fcpmi7hRpxFWWraXQ3oz+VsFdy/AR5801d1AvhItI8gdCppUcBlwvZX3Qi6+ZxBV VLk62yqxYjOD4z6ZmB7uIydIcaIbHbI= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b="Z2RX/saD"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf15.hostedemail.com: domain of 3_AFXYwYKCH0hmjefshpphmf.dpnmjovy-nnlwbdl.psh@flex--glider.bounces.google.com designates 209.85.208.73 as permitted sender) smtp.mailfrom=3_AFXYwYKCH0hmjefshpphmf.dpnmjovy-nnlwbdl.psh@flex--glider.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666646525; 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=XYIeNtcSMBuwQ4ZUNtMrq5SFnntAuabRdvmK/d2x8js=; b=1avKAUQeUAUPQ9jGHKaEbTCbybvJqgT2rAIuXkTCabL0DUpAwWWieBWiIcmBsmMbk86INS ydNGmk2yPDMeDI+hyfhBImuxUNtGSiRPxUrBImwAuXkf7u5YPXW+F80TzqCMIiIkDqj4WF HpJEez7QihtuQ16it63EY/Z0iVPV28A= X-Rspamd-Queue-Id: AD47EA0002 Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b="Z2RX/saD"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf15.hostedemail.com: domain of 3_AFXYwYKCH0hmjefshpphmf.dpnmjovy-nnlwbdl.psh@flex--glider.bounces.google.com designates 209.85.208.73 as permitted sender) smtp.mailfrom=3_AFXYwYKCH0hmjefshpphmf.dpnmjovy-nnlwbdl.psh@flex--glider.bounces.google.com X-Rspamd-Server: rspam12 X-Rspam-User: X-Stat-Signature: 7dm3res1apr7rpj5ot6pxp9by4jgtfrw X-HE-Tag: 1666646525-893839 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: KMSAN adds a lot of instrumentation to the code, which results in increased stack usage (up to 2048 bytes and more in some cases). It's hard to predict how big the stack frames can be, so we disable the warnings for KMSAN instead. Cc: Andrew Morton Cc: Kees Cook Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: linux-kbuild@vger.kernel.org Link: https://github.com/google/kmsan/issues/89 Signed-off-by: Alexander Potapenko --- lib/Kconfig.debug | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 3fc7abffc7aa2..29280072dc0e4 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -400,8 +400,9 @@ config FRAME_WARN default 1536 if (!64BIT && XTENSA) default 1024 if !64BIT default 2048 if 64BIT + default 0 if KMSAN help - Tell gcc to warn at build time for stack frames larger than this. + Tell the compiler to warn at build time for stack frames larger than this. Setting this too low will cause a lot of warnings. Setting it to 0 disables the warning.