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]
Date:   Tue, 27 Aug 2019 17:45:41 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Brendan Higgins <brendanhiggins@...gle.com>, shuah@...nel.org,
        pmladek@...e.com, sergey.senozhatsky@...il.com, rostedt@...dmis.org
Cc:     kunit-dev@...glegroups.com, linux-kernel@...r.kernel.org,
        linux-kselftest@...r.kernel.org, frowand.list@...il.com,
        sboyd@...nel.org, Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH v1] printk: add dummy vprintk_emit for when
 CONFIG_PRINTK=n

On 8/27/19 4:48 PM, Brendan Higgins wrote:
> Previously vprintk_emit was only defined when CONFIG_PRINTK=y, this
> caused a build failure in kunit/test.c when CONFIG_PRINTK was not set.
> Add a no-op dummy so that callers don't have to ifdef around this.
> 
> Note: It has been suggested that this go in through the kselftest tree
> along with the KUnit patches, because KUnit depends on this. See the
> second link for the discussion on this.
> 
> Reported-by: Randy Dunlap <rdunlap@...radead.org>
> Link: https://lore.kernel.org/linux-kselftest/0352fae9-564f-4a97-715a-fabe016259df@kernel.org/T/#t
> Link: https://lore.kernel.org/linux-kselftest/ECADFF3FD767C149AD96A924E7EA6EAF977A5D82@USCULXMSG01.am.sony.com/
> Cc: Stephen Rothwell <sfr@...b.auug.org.au>
> Signed-off-by: Brendan Higgins <brendanhiggins@...gle.com>

Acked-by: Randy Dunlap <rdunlap@...radead.org> # build-tested

Thanks.

> ---
>  include/linux/printk.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/include/linux/printk.h b/include/linux/printk.h
> index cefd374c47b1..85b7970615a9 100644
> --- a/include/linux/printk.h
> +++ b/include/linux/printk.h
> @@ -206,6 +206,13 @@ extern void printk_safe_init(void);
>  extern void printk_safe_flush(void);
>  extern void printk_safe_flush_on_panic(void);
>  #else
> +static inline __printf(5, 0)
> +int vprintk_emit(int facility, int level,
> +		 const char *dict, size_t dictlen,
> +		 const char *fmt, va_list args)
> +{
> +	return 0;
> +}
>  static inline __printf(1, 0)
>  int vprintk(const char *s, va_list args)
>  {
> 


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ