Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5963244ybe; Tue, 10 Sep 2019 11:24:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwxM9Rgxav5LmXOYasauK1jA4Qg1tDBqj9/oY2TTKkys9IkjKIb7rdCkh/9n9Q0L/Pd5G0 X-Received: by 2002:a50:e806:: with SMTP id e6mr31486236edn.162.1568139875152; Tue, 10 Sep 2019 11:24:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568139875; cv=none; d=google.com; s=arc-20160816; b=eloziXDUR0GDMiI+agDe4tMkvGS6G7re9tw/4VlLADuXXkd4BrGgPWus8upWS1GfsD xdKVlcuSsiBzznbIpVlEXdCd4vWILCVPBPOBkm7As2BDgvuFbK31oGMjmyYd9pFjXhY7 ZG1Cr/NZ0MLPv6sxfS+7fEsEDu84sg6a9G3QzvZKYw/7CyrC/X337ewpkS9CfRa/PDdk faFuXtO9vxaUZ+HI4hz1GJj9SQlHpwE5Q4PSrz8/uYBLVE8uwArhQf/96W6r0wNOL2mG FsyPf5HrIEw0dNlHOFY8y7OLrklopKCDjAbRlHknZ0/XfXzO3rHAVZkGmsTg9GesFEiP f3ng== 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=xkCN1rfxn0GvijT8v/3iWlL1If0T/0iY7m3TA87+hZk=; b=sU0OgA8LoHSLxd5KPUeS4HVnJXqM79Md2o79f6RFCd8rLBqepAkwa7+2zWGdQPtHf6 AUtsk8IdQakTAaGeYYXUqJICx4DSDUAkmALH/e8y9X9OYUhZmiaA6KFV8man7WCxiqUN ZMRrwZ2Wrpt4GYWz24hY8cyajf7OV+kAMk7bQQkx25XmsnAcprNCz9utSntv4Hk2LD17 XNaNe+wTcNl+1wqk46zZ8MRu6REW4zLUd/uqhM5JS5/RPUhvZdK2jvaTYH3HplwD/rvB PmBn91QgePWzBhEL9jaU/mCcQIENKs0ppO4Jy0fnImoqsszS5IZSOtw765TRdXeN2Bl/ R6yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="k/fb9APg"; 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 f43si12640289edf.422.2019.09.10.11.24.10; Tue, 10 Sep 2019 11:24:35 -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="k/fb9APg"; 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 S2387685AbfIIOTL (ORCPT + 99 others); Mon, 9 Sep 2019 10:19:11 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:40041 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726174AbfIIOTL (ORCPT ); Mon, 9 Sep 2019 10:19:11 -0400 Received: by mail-pf1-f196.google.com with SMTP id x127so9247484pfb.7 for ; Mon, 09 Sep 2019 07:19:11 -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=xkCN1rfxn0GvijT8v/3iWlL1If0T/0iY7m3TA87+hZk=; b=k/fb9APgpNF1Cxfqmh6BG7jswGs90KCYKKa3l7MODvWzCC0i29w1nUl3zwPBlLo8qh I2lgN7se0yAOU0wswPN9BFJPGh9u2rHuYuoC2gjD5l+fJtjurI9DSD5I6KqO4h/H+TMY ywoxb/VqxJyGzSQBksBAeOzeDCMOmaA+BInJH/HFcFM+9Mf88l385O/ae+A1MMCMbLVV S4EfLxmK1M2C5J8h6qutUZYoxGGgWlUlosouGx1gIDklzWs3iOfFZBSqVEd5YQpHFItq mhSahs5L0wVqdLiJXwcz8RVytuXxgrTnaedGk1vERFDkee33dBFJRN5k216rQk6JnUpi 1e0Q== 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=xkCN1rfxn0GvijT8v/3iWlL1If0T/0iY7m3TA87+hZk=; b=mtnIcDQeqZlGHuic+XKyrQzJD8w6Ts4Y1BHjiFnXEBScoEx+06J2S8CRZmP0uUEPi2 CI9ZKQFrYYMLb95cCo7p21FlEESvB6VnyioyKlW7IoiIxJSeh42jNrDUe4fSP72jA+wr t6phBMtLUp22MuE5CcQ8CG6wUfbCuMpJJULFsYMq3u5TaDjyggHV6JCuxV7uKGh2bjhS /wJP6oGw6kkXZSxY5wSJBAFki/BVjDYjOOX+43RB7+Hk5pLJr8KzQjujHxxsenPYxm2y LVv6f9SjM43TJmiQbDOYt2DLso2BVw08hrSnO0p7DHsOIu4wYB83xgGyWyXqNIu+uFwB Fv0Q== X-Gm-Message-State: APjAAAVEjh9RH4rghxEplYDMD4KmOFm7oK0fF0RAcDaame/2K/BrMgfS K67/0KjKnxgMky8uloecfgI= X-Received: by 2002:a63:b10f:: with SMTP id r15mr21647735pgf.230.1568038750771; Mon, 09 Sep 2019 07:19:10 -0700 (PDT) Received: from localhost.localdomain ([149.28.153.17]) by smtp.gmail.com with ESMTPSA id w6sm34574695pfw.84.2019.09.09.07.19.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2019 07:19:10 -0700 (PDT) From: Changbin Du To: Andrew Morton , Randy Dunlap Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, Changbin Du Subject: [PATCH v2 6/9] kconfig/hacking: Move SCHED_STACK_END_CHECK after DEBUG_STACK_USAGE Date: Mon, 9 Sep 2019 22:18:20 +0800 Message-Id: <20190909141823.8638-7-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 They are both memory debug options to debug kernel stack issues. Signed-off-by: Changbin Du --- lib/Kconfig.debug | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 1385e17122a1..ce545bb80ea2 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -652,6 +652,18 @@ config DEBUG_STACK_USAGE This option will slow down process creation somewhat. +config SCHED_STACK_END_CHECK + bool "Detect stack corruption on calls to schedule()" + depends on DEBUG_KERNEL + default n + help + This option checks for a stack overrun on calls to schedule(). + If the stack end location is found to be over written always panic as + the content of the corrupted region can no longer be trusted. + This is to ensure no erroneous behaviour occurs which could result in + data corruption or a sporadic crash at a later stage once the region + is examined. The runtime overhead introduced is minimal. + config DEBUG_VM bool "Debug VM" depends on DEBUG_KERNEL @@ -1005,18 +1017,6 @@ config SCHEDSTATS application, you can say N to avoid the very slight overhead this adds. -config SCHED_STACK_END_CHECK - bool "Detect stack corruption on calls to schedule()" - depends on DEBUG_KERNEL - default n - help - This option checks for a stack overrun on calls to schedule(). - If the stack end location is found to be over written always panic as - the content of the corrupted region can no longer be trusted. - This is to ensure no erroneous behaviour occurs which could result in - data corruption or a sporadic crash at a later stage once the region - is examined. The runtime overhead introduced is minimal. - config DEBUG_TIMEKEEPING bool "Enable extra timekeeping sanity checking" help -- 2.20.1