From patchwork Mon Nov 13 16:50:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 118816 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2014219qgn; Mon, 13 Nov 2017 08:52:13 -0800 (PST) X-Google-Smtp-Source: AGs4zMYg928uVO3LUF6QyECG9PBFkgBBbH/zyZZiVlhN2paICODwOFnaF5L7YSyfUmJ79qK+BQmW X-Received: by 10.98.36.199 with SMTP id k68mr8515451pfk.236.1510591933033; Mon, 13 Nov 2017 08:52:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510591933; cv=none; d=google.com; s=arc-20160816; b=x4tPP5jx4u1+Zr++U2lMGUAV0ArURJoGpIUAXXHRG7V9EQAxPTY3j8WGoPleKUnpxG ZyvzFTza9/EHJhSkILntoC9M+Ibws9q0ksY5DDifb9bic34qjByR5Q1eMRkuQ2YWshTz jtx568K0INywXnoxi0OkkE7C1/f3Gwtt4NJEB0uZY6KeS+yAyrVsZ+VgKki9OYWJLDHR kRhM4nYIUstlqAydKpoSmbHTZYNzReOtFvsxA2J77CwWZa16iHZ/FKmlbhPaKcCATjEK +9s1PM76tAHne/IoUrVg6tX7Z/VoJ+/5zcNkT/bP5eP+FlDNeuEAhMuVGORDAA/gvYqw D1Rw== 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=aTiAPuKSIfYqdgBor6vs0MTPVZop7nard4ZLloIhaBc=; b=Ipyj5ea8eLp+7Es5Nw1itzUI8/2B4IndXLrJlSWVzijvwA0lhwrZloCbNtoHnx8xYQ P5pgAydiYTMqZW/YdMA54amtYbFFCEYFH3jTNotgG6zhVs135ENUC9VGUhBOs8co1OMB xUWmLPEVlEk5ZrJ1WHKOC5w8Hh59IJ/59ubPqgv9HY8QkLhDP5iTUU8XlIlG4mX+0ZR5 iJmlUSdeFnJpWx+xSL8IJk5SQj7XckWZWJdc6ahGW7Tf5BDr094CYd6oQqBPzEwjegK4 O5LgU//BWXlk0gF64E4cllR8WdEF7kGbLXKWpTSTkWOa3gLTcP1c+G6n+3U7FNSoomG/ ZHsg== 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 g17si13114017plo.107.2017.11.13.08.52.12; Mon, 13 Nov 2017 08:52:13 -0800 (PST) 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 S1753942AbdKMQwK (ORCPT + 27 others); Mon, 13 Nov 2017 11:52:10 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:50040 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753869AbdKMQwJ (ORCPT ); Mon, 13 Nov 2017 11:52:09 -0500 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0LxryC-1fJE1D07K0-015Hb3; Mon, 13 Nov 2017 17:51:59 +0100 From: Arnd Bergmann To: Linus Torvalds Cc: Arnd Bergmann , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Andrew Morton , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] kallsyms: fix building without printk Date: Mon, 13 Nov 2017 17:50:59 +0100 Message-Id: <20171113165146.2287420-1-arnd@arndb.de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T0e919SMtKxWChCurmg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building kallsyms fails without CONFIG_PRINTK due to a missing declaration: kernel/kallsyms.c: In function 'kallsyms_show_value': kernel/kallsyms.c:670:10: error: 'kptr_restrict' undeclared (first use in this function); did you mean 'keyring_restrict'? This moves the declaration outside of the #ifdef guard, the definition is already available without CONFIG_PRINTK. Fixes: c0f3ea158939 ("stop using '%pK' for /proc/kallsyms pointer values") Signed-off-by: Arnd Bergmann --- include/linux/printk.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.9.0 Reviewed-by: Sergey Senozhatsky diff --git a/include/linux/printk.h b/include/linux/printk.h index fbb75cac9028..e9b603ee9953 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -187,7 +187,6 @@ extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, extern int printk_delay_msec; extern int dmesg_restrict; -extern int kptr_restrict; extern int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void __user *buf, @@ -278,6 +277,8 @@ static inline void printk_safe_flush_on_panic(void) } #endif +extern int kptr_restrict; + extern asmlinkage void dump_stack(void) __cold; #ifndef pr_fmt