Received: by 2002:a17:90a:37e8:0:0:0:0 with SMTP id v95csp381679pjb; Fri, 4 Oct 2019 00:48:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzP8Puz6FwM2Cd+RGlTj5JlPlC9NdeCYhU842DkOiEyV7l5zNDEltMWkmFGzkBSrDEdZu4p X-Received: by 2002:a17:906:3083:: with SMTP id 3mr10954843ejv.259.1570175338953; Fri, 04 Oct 2019 00:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570175338; cv=none; d=google.com; s=arc-20160816; b=mUZE+zipdDjcSoNWw0qnhGFBC6iatv4J8ziwwur0uMddN+Ln6p3Qnl41YRVjvQdhug UDX3z5Uzp+EhvsSlKB8H0jBSbbSQgOY3Ecjz4qBkoBlDEEHOYvCDhUBiUmA5DzyYlhJR u03ubhfqblBp+vlihwy8RJrFNrjTntbkRSOZZVUnAX73FNpmpgsEFRblp3hV5m95SHfA pL6pk4B5ldeyaIcfu4rhIBPK7uKlP61s9333FGJSkRVjoGYgIGw8iZY+2duzMU1beSyr dK3zlEegSo0ali5Tih+Im2mJ10G6X3mn+kpGc45HXQvIDA8ckJpYtPdgaGBAstZFCsFK 4KQA== 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=nUAonWj+crtkdXG/WWKIValoecqHVHH6udCzw0FtFkA=; b=cYxF4wp/4C74cSJVBvxfndvW/mfmjjVNVP1GkANt2iAJrjW/wLxyPvOQSIkYcuOalU rJAMaw5nSftCwNArlvQZ4yJAFJFydH/OBHaknLAmqGTIG3W1CBu9zABbp+rSAh+TkhGF GZQr/6V20knPqFiSffrSUOPleF15SV7kIRjSrbKjvc84A7HMNJXBZkX4O7PeycqQiFyD DTwLdLkHxdh7ehuimb+6AgJnwXoGZx2n1ZHC1ImGpZbAWk5GcFs1p2/OHBwz9gNhwYdC e10++4kNaZhHSH1ObM8IDUmz6n2wA55FeAS695TYInVaTLZPz2wBWusKJHIIXLnyw77A g0cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vLpQ7mt3; 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 y47si2985998edd.236.2019.10.04.00.48.34; Fri, 04 Oct 2019 00:48:58 -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=vLpQ7mt3; 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 S1732757AbfJDBUx (ORCPT + 99 others); Thu, 3 Oct 2019 21:20:53 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46752 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732698AbfJDBUu (ORCPT ); Thu, 3 Oct 2019 21:20:50 -0400 Received: by mail-wr1-f65.google.com with SMTP id o18so4888376wrv.13 for ; Thu, 03 Oct 2019 18:20:49 -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=nUAonWj+crtkdXG/WWKIValoecqHVHH6udCzw0FtFkA=; b=vLpQ7mt3ThQb0VSxXv49DD4KXlBDUNrlQmJp0dM20xHrM7td1QN4D7E3RNX0OHcRlu 8V37WKkj94esobZIItKhQneuIdxzi7hufucFjV0REHpXBKZtK0uGqClaCBwXTNZoZta8 uhJfuyA/alk6gF5CzPBB4KFu04OdtcBs8d098NlgITGIxeclz6dz2LwPgX5243ogjbsG T4/OeqMAzLf6x2kqOcpdLjSAXcVHWmWOt//XIZjfPauEzvjg7RLVIC2hVvfNP5QSxs/j B1j2tc04vGHjdpZvxe9J/ThuInnQB4gkSwxdiOSI+ZCHGPC7tbawnJAZ1dI7O2IiMmbU 46pg== 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=nUAonWj+crtkdXG/WWKIValoecqHVHH6udCzw0FtFkA=; b=W3L6wW+b8cD/XRO0JNbjVH6GOBszZrvOtC3K4/aT45jIv7d1NvPTVox202YAG770k9 8yAit2whaw3aOX5TIa5lQTt9c24z+4/VsXL2SpNfyvlsUE5C/DrDk050cTdopExA6W1d n2LF8rw9ij+AuSFE2rt5HXq9hvXTctzktbc+PQoHCHTCDqbBD96r3eOSuDJAA2fBIBpt 1ikHJFp3rHQ6ZMFKKifxsx35/IKGu62rMjxEeS6NxSS9xC6ZF7IvDP7ROi3nNTv3BtZK kvUWjfMH0bgPsnYUgohyh2FQ4vixMUUY7UIE46auW7leV/HC0Mtomuc/ki3Cv5aLUsei 55HA== X-Gm-Message-State: APjAAAWl49HWQ9dQHyzuXY+hqMf7PzgpMtbltVrrQnF0VE7NXa+ANAJq JL/fpSnNY6ZIjU7zG8ZLtZAT4NB+dANqYQ== X-Received: by 2002:adf:eec5:: with SMTP id a5mr5127263wrp.191.1570152048538; Thu, 03 Oct 2019 18:20:48 -0700 (PDT) Received: from localhost.localdomain ([104.238.174.53]) by smtp.gmail.com with ESMTPSA id a4sm4097404wmm.10.2019.10.03.18.20.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2019 18:20:47 -0700 (PDT) From: Changbin Du To: Andrew Morton Cc: Randy Dunlap , Thomas Gleixner , Masahiro Yamada , linux-kernel@vger.kernel.org, Changbin Du Subject: [RESEND PATCH v3 6/9] hacking: Move SCHED_STACK_END_CHECK after DEBUG_STACK_USAGE Date: Fri, 4 Oct 2019 09:20:07 +0800 Message-Id: <20191004012010.11287-7-changbin.du@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191004012010.11287-1-changbin.du@gmail.com> References: <20191004012010.11287-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 Acked-by: Randy Dunlap Tested-by: Randy Dunlap --- lib/Kconfig.debug | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 389876ee49d8..2cf52b3b5726 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -634,6 +634,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 @@ -987,18 +999,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