From patchwork Wed Jul 18 17:35:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Luck X-Patchwork-Id: 1212691 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 1FCF53FD4F for ; Wed, 18 Jul 2012 17:58:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753451Ab2GRR6V (ORCPT ); Wed, 18 Jul 2012 13:58:21 -0400 Received: from mga02.intel.com ([134.134.136.20]:6688 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751530Ab2GRR6V (ORCPT ); Wed, 18 Jul 2012 13:58:21 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 18 Jul 2012 10:58:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.67,351,1309762800"; d="scan'208";a="173819843" Received: from agluck-desk.sc.intel.com (HELO agluck-desktop.sc.intel.com) ([10.3.52.68]) by orsmga002.jf.intel.com with SMTP; 18 Jul 2012 10:58:20 -0700 Message-Id: <4a613b26cc402fb3ed8130cd07a37e76f4c133ef.1342634029.git.tony.luck@intel.com> From: Tony Luck Date: Wed, 18 Jul 2012 10:35:05 -0700 Subject: [PATCH] debug: Do not permit CONFIG_DEBUG_STACK_USAGE=y on IA64 or PARISC To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , "James E.J. Bottomley" , Helge Deller , linux-parisc@vger.kernel.org, linux-ia64@vger.kernel.org, Fengguang Wu Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org The stack_not_used() function in assumes that stacks grow downwards. This is not true on IA64 or PARISC, so this function would walk off in the wrong direction and into the weeds. Found on IA64 because of a compilation failure with recursive dependencies on IA64_TASKSIZE and IA64_THREAD_INFO_SIZE. Fixing the code is possible, but should be combined with other infrastructure additions to set up the "canary" at the end of the stack. Reported-by: Fengguang Wu (failed allmodconfig build) Signed-off-by: Tony Luck --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index ff5bdee..4a18650 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -714,7 +714,7 @@ config STACKTRACE config DEBUG_STACK_USAGE bool "Stack utilization instrumentation" - depends on DEBUG_KERNEL + depends on DEBUG_KERNEL && !IA64 && !PARISC help Enables the display of the minimum amount of free stack which each task has ever had available in the sysrq-T and sysrq-P debug output.