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:   Fri, 21 Sep 2018 16:45:27 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        linux-renesas-soc@...r.kernel.org, stable@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        Philippe Ombredanne <pombredanne@...b.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kernel/bounds: Provide prototype for foo

On Fri, Sep 21, 2018 at 03:22:33PM +0100, Kieran Bingham wrote:
> kernel/bounds.c is recompiled on every build, and shows the following
> warning when compiling with W=1:

Don't do that, you will get a lot of warnings that really don't make
much sense.  Like this one :)

> 
>   CC      kernel/bounds.s
> linux/kernel/bounds.c:16:6: warning: no previous prototype for ‘foo’ [-Wmissing-prototypes]
>  void foo(void)
>       ^~~
> 
> Provide a prototype to satisfy the compiler.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
> Cc: stable@...r.kernel.org
> 
> ---
> I compile all of my incremental builds with W=1, which allows me to know
> instantly if I add a new compiler warning in code I generate.
> 
> This warning always comes up and seems trivial to clean up.
> ---
>  kernel/bounds.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/bounds.c b/kernel/bounds.c
> index c373e887c066..60136d937800 100644
> --- a/kernel/bounds.c
> +++ b/kernel/bounds.c
> @@ -13,6 +13,8 @@
>  #include <linux/log2.h>
>  #include <linux/spinlock_types.h>
>  
> +void foo(void);
> +
>  void foo(void)

This file is a userspace tool that is used to later generate the
include/generated/bounds.h file.

If you really want to track this down and fix it properly, put the
prototype in the .c file that ends up calling this function.  That's a
fun task to dig through the build system to find :)

good luck!

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ