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:	Mon, 02 Mar 2009 16:40:45 -0800
From:	Harvey Harrison <harvey.harrison@...il.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Christoph Hellwig <hch@...radead.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Boaz Harrosh <bharrosh@...asas.com>
Subject: Re: [PATCH 1/2] byteorder: add load/store_{endian} API

On Mon, 2009-03-02 at 16:37 -0800, Linus Torvalds wrote:
> 
> On Mon, 2 Mar 2009, Harvey Harrison wrote:
> >
> > Although gcc (4.4) grew support for __builtin_constant_p in static 
> > inlines, older gcc's don't, so we would lose that with essentially all 
> > current compilers.
> 
> We've used __builtin_constant_p in inline functions for a long time.
> 
> Look at kmalloc() in <linux/slab_dev.h>.
> 
> I do agree that it's a "new" feature, but I don't think it's _that_ new. I 
> think it goes back to something like 3.2 rather than 4.4.
> 
> Although I also would not be surprised if this is one of those "gcc 
> version of the day" things, where some versions do it, others don't.
> 
> So it's quite possible that it depends a bit on just how many dead cats 
> you have offered, and whether you ran widdershins or turnwise around the 
> computer when you turned it on.
> 

OK, static inline it is then. Would you be opposed to an API like:

get_le16
put_le16

to match with 
get_unaligned_le16
put_unaligned_le16

And make the existing unaligned helpers typesafe?

Harvey

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