lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150121125820.GA8244@dhcp128.suse.cz>
Date:	Wed, 21 Jan 2015 13:58:20 +0100
From:	Petr Mladek <pmladek@...e.cz>
To:	Pranith Kumar <bobby.prani@...il.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"Steven Rostedt (Red Hat)" <rostedt@...dmis.org>,
	Joe Perches <joe@...ches.com>,
	John Stultz <john.stultz@...aro.org>,
	Dan Streetman <ddstreet@...e.org>,
	Simon Kågström 
	<simon.kagstrom@...insight.net>, Borislav Petkov <bp@...e.de>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	open list <linux-kernel@...r.kernel.org>,
	Michael Ellerman <mpe@...erman.id.au>
Subject: Re: [PATCH 1/2] printk: Add dummy routine for when CONFIG_PRINTK=n

On Tue 2015-01-20 18:51:49, Pranith Kumar wrote:
> There are missing dummy routines for log_buf_addr_get() and log_buf_len_get()
> for when CONFIG_PRINTK is not set causing build failures.
> 
> This patch adds these dummy routines at the appropriate location.
> 
> Signed-off-by: Pranith Kumar <bobby.prani@...il.com>
> CC: Michael Ellerman <mpe@...erman.id.au>
> ---
>  include/linux/printk.h | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/printk.h b/include/linux/printk.h
> index aeb9d7f..f52f02b 100644
> --- a/include/linux/printk.h
> +++ b/include/linux/printk.h
> @@ -10,9 +10,6 @@
>  extern const char linux_banner[];
>  extern const char linux_proc_banner[];
>  
> -extern char *log_buf_addr_get(void);
> -extern u32 log_buf_len_get(void);
> -
>  static inline int printk_get_level(const char *buffer)
>  {
>  	if (buffer[0] == KERN_SOH_ASCII && buffer[1]) {
> @@ -168,6 +165,8 @@ void __init setup_log_buf(int early);
>  void dump_stack_set_arch_desc(const char *fmt, ...);
>  void dump_stack_print_info(const char *log_lvl);
>  void show_regs_print_info(const char *log_lvl);
> +char *log_buf_addr_get(void);
> +u32 log_buf_len_get(void);
>  #else
>  static inline __printf(1, 0)
>  int vprintk(const char *s, va_list args)
> @@ -217,6 +216,16 @@ static inline void dump_stack_print_info(const char *log_lvl)
>  static inline void show_regs_print_info(const char *log_lvl)
>  {
>  }
> +
> +static inline char *log_buf_addr_get(void)
> +{
> +	return NULL;
> +}
> +
> +static linline u32 log_buf_len_get(void)
          ^
	  typo: linline -> inline

Otherwise, it looks fine to me.

Well, If you send v2, I would move this above log_buf_kexec_setup() in
both #ifdef branches. So that all four log_buf()-related functions
declared/defined together.

Best Regards,
Petr

> +{
> +	return 0;
> +}
>  #endif
>  
>  extern asmlinkage void dump_stack(void) __cold;
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ