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:	Wed, 18 Dec 2013 11:01:08 -0800
From:	josh@...htriplett.org
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Rashika Kheria <rashika.kheria@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers: base: Add prototype declaration in memory.c

On Wed, Dec 18, 2013 at 07:34:51AM -0800, Greg Kroah-Hartman wrote:
> On Wed, Dec 18, 2013 at 12:09:53PM +0530, Rashika Kheria wrote:
> > Add the prototype declaration of function memory_block_size_bytes() in
> > memory.c.
> > 
> > This eliminates the following warning in memory.c:
> > drivers/base/memory.c:87:1: warning: no previous prototype for ‘memory_block_size_bytes’ [-Wmissing-prototypes]
> > 
> > Signed-off-by: Rashika Kheria <rashika.kheria@...il.com>
> > Reviewed-by: Josh Triplett <josh@...htriplett.org>
> > ---
> >  drivers/base/memory.c |    1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/base/memory.c b/drivers/base/memory.c
> > index bece691..cfa03de 100644
> > --- a/drivers/base/memory.c
> > +++ b/drivers/base/memory.c
> > @@ -83,6 +83,7 @@ static void memory_block_release(struct device *dev)
> >  	kfree(mem);
> >  }
> >  
> > +unsigned long __weak memory_block_size_bytes(void);
> >  unsigned long __weak memory_block_size_bytes(void)
> 
> If this patch is the "solution" then something else is really wrong
> here, please use your judgement to realize this...

It's a weak symbol provided and consumed within the same file, and then
overridden on a few random architectures.  It isn't currently prototyped
in any header file.  The other potential solution would be to add it to
an appropriate existing header or create a new one.  Any suggestions for
an appropriate existing header to prototype it in instead?

- Josh Triplett
--
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