Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5303727ybe; Tue, 10 Sep 2019 01:24:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRcNfQqDz7O/B91zs5h8/+ANNpRt+bDO5+d0Es/vuUu5mvl01p16zL5ss61Upm4IKgsa92 X-Received: by 2002:a17:906:d78d:: with SMTP id pj13mr23771990ejb.62.1568103869930; Tue, 10 Sep 2019 01:24:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568103869; cv=none; d=google.com; s=arc-20160816; b=DpStMRBiSt0xrLt07Qb5T8rEoo3MQSaJ95GxaeiejdlukhMFF07Zj+XFc6wGmSVE78 inDn5RMrUcEBctbiNQBZVMJm+/E8xfe1AEPIRHyfn7QOlthpHmBZybbSgsZcuRcFwvbJ k+sPPqZB+qruWTxsxIR2x38FONO0QaZFNiYRlw5PRxbZmShxPtO9DDJngDF48Mw87GXk FKiEbWs7SHSt03lmBDmfBnXtAI0uppTFD+kGej5LN1byciIuTtcT9xiDhKJGeokOejVb 7ZDoPsK2tVpKX9uFrQbTl87EOYifDtwrPqsFEtNwsQNd718pWNMKJbWkvPU3a0VMelT5 ogiA== 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=T6S4pLEPc0cAY4crAwxJN2QYyRDE5e7mlJmKGfcaowp1GuyjRNFXIrzI/u6h5ZMcZI eLBwxQxsYZFmpD+BuT6gURU2gEvX8WN5Y1HC+WhPCwmvaLE1gYd2FXXzy78yeeDOHmVj 2qjGcWyuKly1JVG0H4B/vwWhzNtsiwBSHrZ/H0bx4zewwRBfiFtC7+Aa8vneanni6B2N grOv8bTJT/DkULW+oo7PEFofOPEQT6uKNMij8LaIflU9fWm48yAA9rw7g8HejOEbX3oc BF50g3UL7kdAmOL9FBbxtM0348bGieA+cRdkdROw6/fIH3S86AMl+ngLrTyyHW67Cz6+ SvVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UyeNYVIF; 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 k12si7968658edi.145.2019.09.10.01.24.05; Tue, 10 Sep 2019 01:24:29 -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=UyeNYVIF; 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 S2387715AbfIIOpZ (ORCPT + 99 others); Mon, 9 Sep 2019 10:45:25 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:42591 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727191AbfIIOpX (ORCPT ); Mon, 9 Sep 2019 10:45:23 -0400 Received: by mail-pf1-f196.google.com with SMTP id w22so9291780pfi.9 for ; Mon, 09 Sep 2019 07:45:23 -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=UyeNYVIFpnr/2cmDTnQsMbB3xwTEnmqg5DcFQkl6hx8l4IRBW1en9NJuNHUhsZUkj6 gcfdBnw3gvRiQmj2RhjAlleYeyqBMfLK7neNwKe4L3IyAAy/hQnngFNZES79mlVYsq3G iQ1Tk2Z8MWk/nzHtEYtE/9THg7xmG9g6Cb/FiPizZfk5Ef3jEYMHFVEpo4Uqj1zniNpn Yi94loYZgNQ8/oF5/a3QGfrR1G0l0QxrlJo3K+l4RROQrSxZBUljJN1TX7S/FeHutREQ Scx4F7N6P/kD84P5QeV99NIyu7owaC4eUee6+XjMudA5FFEBxnEsLdhGSG7JAAq2JSeR ntdw== 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=F026ORrOdXhP6uI/vlK423hfLlmtmZc8Y21qFjfydXTcbMykyEF+XdJfXScPHeedo7 6TDGMZy3o7m9WGSjscfELZ06QUbfo4jdhx1Ed5ifrHoP/v5NQF9SQjRpt1A67Nw/m/ul XAvvDZ4WqsI3CurDzG2UbQ6KY56kfXl0Y9ZYhBZzzDEK3tEJ8gyyxaKgm/mhBDhsIBhq 6p5vIfbSrktWP60hb/Cv3Llr9+pMPmMLe0DEXosx6wZZLn/Jj/HlRTQDSgdnw9N75c35 rRm3HQHcDFOQfi2htU03I3VOnisfoS3vyKXjH88Q/9mqoN4FYtSyBLuJGJUYUswCo5mS KWvA== X-Gm-Message-State: APjAAAXSir0m4sf8YjCUClX1TRSTtGn2PJVDs9btITHzRi0YJIqeOmoN 9khsRC19LsZYbRGir//Ypx0= X-Received: by 2002:a62:4d41:: with SMTP id a62mr28156597pfb.155.1568040323219; Mon, 09 Sep 2019 07:45:23 -0700 (PDT) Received: from localhost.localdomain ([149.28.153.17]) by smtp.gmail.com with ESMTPSA id t9sm15334693pgj.89.2019.09.09.07.45.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2019 07:45:22 -0700 (PDT) From: Changbin Du To: Andrew Morton , Randy Dunlap Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, Changbin Du Subject: [PATCH v3 3/9] hacking: Group kernel data structures debugging together Date: Mon, 9 Sep 2019 22:44:47 +0800 Message-Id: <20190909144453.3520-4-changbin.du@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190909144453.3520-1-changbin.du@gmail.com> References: <20190909144453.3520-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