From patchwork Mon Sep 11 19:59:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 112231 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp4262303qgf; Mon, 11 Sep 2017 13:01:09 -0700 (PDT) X-Google-Smtp-Source: ADKCNb7c9aTT19hoPcecFuevZYirkYgtCj4getRF8lLykl77HGhuJF1Jjey4pyZiHZ8cqRslmQGc X-Received: by 10.98.58.210 with SMTP id v79mr12143411pfj.131.1505160069299; Mon, 11 Sep 2017 13:01:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505160069; cv=none; d=google.com; s=arc-20160816; b=OwCYtjmvZ5f1dA7johAkbpgBptdAnfT9OqcO0kM10yXK+Jtyb/DxM8INFMiwz/SldE YS2bndmg3g+Xn+poJSWzwRF4jUWGWRn73dwLVX8B6jbn5EKq8ZNzWnP29T9bsow5UKT3 XHtnQ0UG7R5flKWJFbNyk7MbMA1NBRHTyDVV38asPxlMMqyRxKlOiochueTBDKQ6u3CJ 2PCs4mcQ4OcQiPg5kl8LHlxN2bfdEpWmqOec0nWhmps0pAcq1YRBSUC9ic7C2KP0vAgs xQIrwgH92yq2H6JQRL3sRI41dVr0k0fvorKjOQoJdh/Up52oWGFQACjhXgYDZghwwZ1z Or5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=TOMHx2ILESEBR0hbetpNR+yCCwcV5VD14/rSszyVxpQ=; b=LdzpL0CKfw1tNSSWph0Kn3VfF5IUl374Yo8q7J9Lsnd1G9AnFml/6DvQDrGAOHVSlG 1NU02SS509GMuL0p4z5FncyhzwZn1cAnzaoFsofEcE9Ui2h3Jda0w2xCXYy3piZDjLqP 3io/Sj+E7BivzcHTd97ajXr7EOEgHjsRUmEVmt45XUAAvmNjnTRA6k++hAEECh86ddW6 bmbeFk9LJBJ67uBEh8aeugGGxqnjFNc3s8J/G7Qt3rF4mRLf3NGOwjOUefkKqEqQ26Z+ zXITCzGgX6Od2ET+GVfj9cRahVNwPYXu0dLpv73VRjAjPp+ehTHO45WX1+ChLlf1Kwtn cPnA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3si7153698plv.478.2017.09.11.13.01.08; Mon, 11 Sep 2017 13:01:09 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751111AbdIKUBG (ORCPT + 26 others); Mon, 11 Sep 2017 16:01:06 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:55234 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750936AbdIKUBF (ORCPT ); Mon, 11 Sep 2017 16:01:05 -0400 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0MKcX1-1dq7h91ocJ-0020SV; Mon, 11 Sep 2017 21:59:52 +0200 From: Arnd Bergmann To: Josh Poimboeuf , Ingo Molnar Cc: Arnd Bergmann , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Kees Cook , linux-kernel@vger.kernel.org Subject: [PATCH] x86/kconfig: hide unwinder menu for KMEMCHECK Date: Mon, 11 Sep 2017 21:59:36 +0200 Message-Id: <20170911195950.3077184-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:s18ZVJSTkIQ5Cp9K+EYTm75FY9FsYXDmwffmHvZqdVT8bSIK83l WvSd0GrxJTpqxHQRZLy+htImG54Sc+vmJoFlf+pnGtqhGUFNz7ysKTUta5T5WZYtXopoqJN oWi2UH3w/njoNYO/fPO7qMtLtwHxY2VAaD7C1iaSmaFiCuk6yziydzuxUoZt1cq4qqHVbIy HXDtaYLzckE3+0jaOaN3g== X-UI-Out-Filterresults: notjunk:1; V01:K0:0nWIbVau9cQ=:LoArFVWO2Jae6n/WP5Vas5 bJF2QgZpTgOScUtyDufPwyRpXbuLWmlGIhlbjxvbpvHSq5u3ZBijnHUC245siXHDtxdl4Vkn9 us9EimW44QRRzwcxWnVjBgWm4pTDbGF3n+H4jQJROMKCi3tcbeOCnMBZMoeiXfRtBlmeXbiWu KhRyD/p0KprnKkXu5LAELpHlxwDYhMqNZ3pzYSUrIoDD3N+Qwoia+u5TlhrlTucm56GDV9EVA Z2jgn535JN//t28JAwDv1/QDdnZr4rOLN0Neg8JvXAwX1gtw55Nj8Bcbg6clpF+/ML92VYvm9 hQGxb7bejJQQIjJtyGIFrAmt6URxiqTpvs2m4S3KsWoH+5ePjNtwe25wAax8PqHhqnzk/upgz +UkIw0NRgvWTeWt/PKPNLEwQIjxJQ06ghXdeY2zA0dMxWanBPc1aDZYKJDE81qerA1B13hRdH 2KG+bKMuV4WBz/Hodi65hUpvpEpXNx/zMn+8I8OKSfpySQnxfldYsWu1haylGb/e8uQ5FLfsr EbFWQ9F+rGzBjyg1D8R1tUXkUQU6JqsfTx1r0tVl/EB/S5IG4TD31LGKMW6u54cUR6+VPMSkr S2y5VHZxmToNx0SW7jM7x2u9KTTmbuMPQvtFnfRrx6kFobm949AUabHfZeGcNme4eLiiSDx4X CIZcA+/9tFH0pka4FEXrFgyuqWenDWSh3qml9xzmrKRG8NCPCtOj4JwIXHlJ2B3fKhZ1vvuVT yNW5vuneRy9Jng/7scQW74ceJvqGP/LIeLHqYw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When KMEMCHECK is enabled, we always build with frame pointers, which is incompatible with ORC_UNWINDER and GUESS_UNWINDER, as Kconfig points out: warning: (FAULT_INJECTION_STACKTRACE_FILTER && LATENCYTOP && KMEMCHECK && LOCKDEP && FRAME_POINTER_UNWINDER) selects FRAME_POINTER which has unmet direct dependencies (DEBUG_KERNEL && (CRIS || M68K || FRV || UML || SUPERH || BLACKFIN || MN10300 || METAG) || ARCH_WANT_FRAME_POINTERS || !ORC_UNWINDER && !GUESS_UNWINDER) This works around it by making those two unwinders depend on !KMEMCHECK. The other three options that enable frame pointers (FAULT_INJECTION_STACKTRACE_FILTER, LATENCYTOP and LOCKDEP) only do that on some architectures but not on x86. It's possible that KMEMCHECK doesn't actually require frame pointers but only requires some unwinder. If that is the case, we should drop the 'select FRAME_POINTER' there. KMEMCHECK is currenly used only on x86. Fixes: 81d387190039 ("x86/kconfig: Consolidate unwinders into multiple choice selection") Signed-off-by: Arnd Bergmann --- arch/x86/Kconfig.debug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index 71a48a30fc84..79f0f563d525 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug @@ -381,7 +381,7 @@ config FRAME_POINTER_UNWINDER config ORC_UNWINDER bool "ORC unwinder" - depends on X86_64 + depends on X86_64 && !KMEMCHECK select STACK_VALIDATION ---help--- This option enables the ORC (Oops Rewind Capability) unwinder for @@ -397,7 +397,7 @@ config ORC_UNWINDER config GUESS_UNWINDER bool "Guess unwinder" - depends on EXPERT + depends on EXPERT && !KMEMCHECK ---help--- This option enables the "guess" unwinder for unwinding kernel stack traces. It scans the stack and reports every kernel text address it