Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5302089ybe; Tue, 10 Sep 2019 01:22:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3+XGsViAutrO6i48RADTg2nEUQdQieTjpTi8mtma6uxn54epfaC8YJJ4KgQj2fU+r7pvQ X-Received: by 2002:a17:906:1f9a:: with SMTP id t26mr23748274ejr.252.1568103747319; Tue, 10 Sep 2019 01:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568103747; cv=none; d=google.com; s=arc-20160816; b=Z80xf3cfxg0xI1dsaW/SMUJU4xDWVux8UqMNY93oZsgPTcbcRHguJNmzwaO8LN3xga HNaCN9nPKZALV11zBQ+hsHdcnjt2lhEnl7unK6258VWwYLjPhwGV3uiZOuicHlyt1wfM At0G3uHjC4Njfi7DRzscRlJA0gjS8/qqsoZRYSyQh9iI//IxncOZMdCWqd7Gik8uj7yO 0CWCYBYfNHTxQxPCyquOhgCL7QWjRji04LYCLcXIRRvP4WALA3j5ldEx7C2LNmymQwHN NAUl1sXnruSZP9vo4OXAfJwnZjzAPm602FbCtyc4ITLMYv3T2+IS71J9fqJuEt4pnd9N 6lDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZjQZhq0VIl7AW/Jucj8979nUOERXvLfdaUdgqq8/W+c=; b=CTW+qsoRx40EXwr4VaayMIBvDdWII/j0NGRpqNw6YQ3if/SVm/AC8+z8y86U8cmQRw 3x93C9EVSsaSenlvj1sBeqvsPU0X5Z6CHBqr2LoEQZixAf68BJwuoYjrupEsd0DQZbXw S5Ych2n1qAZVrlhd5t0E3Tb0djUjYdIxbaDU6KzVfzQFlu4a8g1koPfkzyEGscZ7ruvh lqtW3wC7/ZIdL4bTX1Gl1SRdQpT24JWXSoBXiI4d/OyLTM1AzgzGzryKqcCb3EkOiaPt 3mdNllBqKZbF6Kyo+V8wxca7brEeEj5dEq4DmHSnhLSZEMs1t7jkU5ufQBp8E3sg//VI mS1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jrvL8TG+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c52si11454459eda.132.2019.09.10.01.22.03; Tue, 10 Sep 2019 01:22:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jrvL8TG+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731786AbfIIOS6 (ORCPT + 99 others); Mon, 9 Sep 2019 10:18:58 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:40017 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731355AbfIIOS5 (ORCPT ); Mon, 9 Sep 2019 10:18:57 -0400 Received: by mail-pf1-f193.google.com with SMTP id x127so9247052pfb.7 for ; Mon, 09 Sep 2019 07:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZjQZhq0VIl7AW/Jucj8979nUOERXvLfdaUdgqq8/W+c=; b=jrvL8TG+Hsqq23bsoEmVtN1+bborTEPNq29Taq/GJel3RuiI/nQOY6ZkQMlaHKzkbt OwvKZdeeN6PlfgT8cBwBPHztjkEjUq7PNZSUGNG5PNDuK0qDq+LyW96o0rlsUl0Xn5US Ax39hNB+alEogx41nSc54sQ3XerKcXGTFFNrebIOyC2YRH7hlsA4T7ki/wW2EKT/enmG 2T180VWn8V/etctpF6asezB/nEjQSL4sFgC9x46+eP7V9vZ3hCFYYylAgGRbJN0NctCG Km9zHlrK9w9uO9eywomgIw+gMK7iBc6KIDZCFo9S/vAK5pMjLrKBhCbq9TBmq08c96xt C9bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZjQZhq0VIl7AW/Jucj8979nUOERXvLfdaUdgqq8/W+c=; b=PKLklkL2/54eTcOSsA4YGP8r7ncn4COlAYCWPGwnmhZDpnp80aNOF2dOfOQ+0Xm7hr THK8pRjRNmu7Hh2FEs+Vf8n+uvHfGuiU1c9WbOZebZp5XHFnDG+LS/a38CeIFoUU68by 4tGdm3mlUHKGyqqHA6qfDnzaBUR4lcfGXsTzUneDwDZpWCMyC0PFOlpl6M2zmO52Drt6 Qnt8reLnPdTfKm/InpoJATOC2K0YP2Zz+hnYJJafxEaqdq3axtj83YZvikRyed+82bOE +rZN3JIITpLdzfJ+TyypKkxlo2EEGNSk+TU++9aIdJhw9r1RLtJbOfO9bNRL1IMlbYcK KCkw== X-Gm-Message-State: APjAAAVyFs1lFcNp6mDOymTTAnqEqGKP/1grBzxraTOS1rEAYIKI9XCG iUPPRkwZMjHKM4y1BjLammM= X-Received: by 2002:a62:1658:: with SMTP id 85mr28179645pfw.195.1568038736288; Mon, 09 Sep 2019 07:18:56 -0700 (PDT) Received: from localhost.localdomain ([149.28.153.17]) by smtp.gmail.com with ESMTPSA id w6sm34574695pfw.84.2019.09.09.07.18.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2019 07:18:55 -0700 (PDT) From: Changbin Du To: Andrew Morton , Randy Dunlap Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, Changbin Du Subject: [PATCH v2 3/9] kconfig/hacking: Group kernel data structures debugging together Date: Mon, 9 Sep 2019 22:18:17 +0800 Message-Id: <20190909141823.8638-4-changbin.du@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190909141823.8638-1-changbin.du@gmail.com> References: <20190909141823.8638-1-changbin.du@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Group these similar runtime data structures verification options together. Signed-off-by: Changbin Du --- lib/Kconfig.debug | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index cc4d8e71ae81..92271898b029 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1375,6 +1375,8 @@ config DEBUG_BUGVERBOSE of the BUG call as well as the EIP and oops trace. This aids debugging but costs about 70-100K of memory. +menu "Debug kernel data structures" + config DEBUG_LIST bool "Debug linked list manipulation" depends on DEBUG_KERNEL || BUG_ON_DATA_CORRUPTION @@ -1414,6 +1416,18 @@ config DEBUG_NOTIFIERS This is a relatively cheap check but if you care about maximum performance, say N. +config BUG_ON_DATA_CORRUPTION + bool "Trigger a BUG when data corruption is detected" + select DEBUG_LIST + help + Select this option if the kernel should BUG when it encounters + data corruption in kernel memory structures when they get checked + for validity. + + If unsure, say N. + +endmenu + config DEBUG_CREDENTIALS bool "Debug credential management" depends on DEBUG_KERNEL @@ -2107,16 +2121,6 @@ config MEMTEST memtest=17, mean do 17 test patterns. If you are unsure how to answer this question, answer N. -config BUG_ON_DATA_CORRUPTION - bool "Trigger a BUG when data corruption is detected" - select DEBUG_LIST - help - Select this option if the kernel should BUG when it encounters - data corruption in kernel memory structures when they get checked - for validity. - - If unsure, say N. - source "samples/Kconfig" config ARCH_HAS_DEVMEM_IS_ALLOWED -- 2.20.1