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: <1179452912.2859.521.camel@shinybook.infradead.org>
Date:	Fri, 18 May 2007 09:48:32 +0800
From:	David Woodhouse <dwmw2@...radead.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	torvalds@...ux-foundation.org, acme@...stprotocols.net,
	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] Fix incorrect prototype for ipxrtr_route_packet()

On Thu, 2007-05-17 at 15:27 -0700, Andrew Morton wrote:
> Lovely.  So it was actually generating wrong code on all
> sizeof(size_t)!=sizeof(int) architectures.

I was trying to work out which architectures would actually be affected.
Probably not many. If it's in a register it probably doesn't matter --
the size only matters if you put it on the stack. And it would have to
be a 64-bit architecture, none of which (iirc) are so register-starved
that this particular argument would be on the stack anyway.

So I'm not actually sure it will really generate wrong code on any
architecture we support -- not that this excuses it in any way :)

> If only we could find some way in which all callers of a function as
> well as its definition can see the same declaration? 

Well, building with --combine helps. :)

Admittedly it doesn't necessarily catch _all_ callers -- only those
which we actually compile together. That does cover _most_ of the times
we do crap like this without a prototype in a header file though, I
suspect.

As Geert points out, sparse can warn about non-static functions which
aren't prototyped; if we start getting anal about that, it might help.

-- 
dwmw2

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ