From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Petr Mladek <pmladek@suse.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] kallsyms: fix building without printk
Date: Tue, 14 Nov 2017 10:28:59 +0900 [thread overview]
Message-ID: <20171114012859.GA7328@jagdpanzerIV> (raw)
In-Reply-To: <20171113165146.2287420-1-arnd@arndb.de>
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 <arnd@arndb.de>
ah, I see what happened. was confused at first, because we
do !PRINTK build tests.
FWIW,
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
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
>
prev parent reply other threads:[~2017-11-14 1:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 16:50 [PATCH 1/2] kallsyms: fix building without printk Arnd Bergmann
2017-11-13 16:51 ` [PATCH 2/2] /proc/module: fix building without kallsyms Arnd Bergmann
2017-11-14 1:28 ` Sergey Senozhatsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171114012859.GA7328@jagdpanzerIV \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox