Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5304174ybe; Tue, 10 Sep 2019 01:24:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLm6PAzu/4s6dEy5ecyVwSTeQHOxH9/BMQeVg4Lj4LvECDoIjMSllyFEZiVd+jvU9xi45u X-Received: by 2002:a50:ab58:: with SMTP id t24mr28929377edc.131.1568103895323; Tue, 10 Sep 2019 01:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568103895; cv=none; d=google.com; s=arc-20160816; b=oSn4tELmNP+BYeiCPviUYfXdLjVt0GXsY2l8yXi/m31SIVKxOxrF05dCVbKb66e9y6 2TlXMOx/M7nSKe5Sj8TSxQy+ZpMqQmHgZj2gEVxBheAZSg40RXFvsIj8T/MhskNSMXud EBia98EclpEsT2MqTX4wTFCQwo0NCOhxvZ3bFzmIKp6OYAbovwhLytrlOP3e6IFtHgi0 3s155LzarRBwvgG9rggx5Ndj425RoQxsoqQ8GjMfob6stRId2L+rEZ/l0ED6XmH0Bnsa nXxlRiCBy5p4P6uZWPHaT1VzURnPlVtFJlue47zzvg2yLekh/aZ98/ZI6cOa0dSIGYER wmdQ== 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=TEYRjcH5Sz/FF9nv5mA3EE++spABbNog92UW7fyEu9DnURpGsVsiaUL99cmJBq4I9F 6QVhiPTPnsWvf/ZjaC+Q6tOt1rjZhTPpveosdZYsuHeN9/QVE7kRBAwRPOkIKEvDtoxN 49Rc1nVcv+n2Te4UQWo3mWh1bVoN/QrpsSkgm8dE/V/bYHQHi2AVkt2HtAPNrrqeP+yn ld7RgT2yvS4kZpUo/RX2wRoc6hYF20XY2NqY81c4tg/p8RYA8coCn7Q5kA7Ns4VvO5xJ cV57+QhlA7l0nSfh+aF72z+8vv6IKc8Ia8JdWI5hrrFrmHgyXZyXycYIfk2v6sCd1cxP 60dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SmaWxaOh; 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 d1si2406316ejk.376.2019.09.10.01.24.31; Tue, 10 Sep 2019 01:24:55 -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=SmaWxaOh; 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 S2388000AbfIIOpj (ORCPT + 99 others); Mon, 9 Sep 2019 10:45:39 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:37557 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731713AbfIIOpi (ORCPT ); Mon, 9 Sep 2019 10:45:38 -0400 Received: by mail-pf1-f195.google.com with SMTP id y5so6553053pfo.4 for ; Mon, 09 Sep 2019 07:45:38 -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=SmaWxaOheRds6jY4/n6Jl+EIe/ESld5kZ8OYWOyvgUAt4uuwUIWlN5itBbfeKDRrht OH7s7LPXrkNQDcUDqe7nl1HBmSlG5PZQ3taCTwifaQ9zDbre8FfAeMJwk7qDQKKUL0m1 NvaIm6e8b4y78gK+ocOLPMl6CSpE34hKZPTX0w6wOdMFs0OOyAYWCbFO3k9eYdcZmdMM mkZ6UrKJoFgoDoWCjX/KpQaoJpAbuRXuulL7iAtX8uK4lQlqBHh8usMrEbQs0BnAujWW DyZSh7u0yTAIzKVxERy9UuHo0PoFceya1RdduSjVPBBEnzaD5xM8LNTvBt+3u6W5CF8K aa4A== 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=o1qgrxysr5vniDpYGITp5HoesdXP1FQIvy7zK6mfudOP9wPIPZ3E0Bu1IIF58e+Aqr AgjqSE/neYWTBu7mn8HwFCirVJrbHMfIZ6B/Nny/xVnyYhm8eL8xJFmOJR+Z9bhdouFW uov7wqL5VME2rV1Cu44xS/j5z1w6ujykjF0T5vskhukbMmZ3nTBDRZNPxOUjwxKFAAxY RiNIYik3ZCKSU7Z7sM3L71yp8Q+sJhX4c63oiT1spavuwCJwJAed6zg0FFsVbz2ik5gC zQ1RR1yZzq/QjF6NxEsO+e0chKmf/Z+1W7nSyImYCCTA33VXyyiymwP8ixWUaqi/7Crl V6Nw== X-Gm-Message-State: APjAAAVsZaPKgylERMWHMFJdguYvQTWLgVEsT4ifnEce0PW3l4pRd6e5 eWzQZwQTO8cfFEf24pEQ8CU= X-Received: by 2002:a63:5b23:: with SMTP id p35mr21569791pgb.366.1568040337867; Mon, 09 Sep 2019 07:45:37 -0700 (PDT) Received: from localhost.localdomain ([149.28.153.17]) by smtp.gmail.com with ESMTPSA id t9sm15334693pgj.89.2019.09.09.07.45.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2019 07:45:37 -0700 (PDT) From: Changbin Du To: Andrew Morton , Randy Dunlap Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, Changbin Du Subject: [PATCH v3 6/9] hacking: Move SCHED_STACK_END_CHECK after DEBUG_STACK_USAGE Date: Mon, 9 Sep 2019 22:44:50 +0800 Message-Id: <20190909144453.3520-7-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 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