From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752650AbdKNB3H (ORCPT ); Mon, 13 Nov 2017 20:29:07 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:49923 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751191AbdKNB3F (ORCPT ); Mon, 13 Nov 2017 20:29:05 -0500 X-Google-Smtp-Source: AGs4zMa6UHZLxWhkFp2qubFeCJxAL/pTm9IOHgCm+fXwrldmU3BGmFEE5stptrSWGlGxwsyJSmrMZg== Date: Tue, 14 Nov 2017 10:28:59 +0900 From: Sergey Senozhatsky To: Arnd Bergmann Cc: Linus Torvalds , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] kallsyms: fix building without printk Message-ID: <20171114012859.GA7328@jagdpanzerIV> References: <20171113165146.2287420-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171113165146.2287420-1-arnd@arndb.de> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (11/13/17 17:50), Arnd Bergmann wrote: > 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 ah, I see what happened. was confused at first, because we do !PRINTK build tests. FWIW, Reviewed-by: Sergey Senozhatsky thanks. -ss > --- > include/linux/printk.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > 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 > -- > 2.9.0 >