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] [day] [month] [year] [list]
Date:	Sun, 20 May 2007 12:29:38 +0100
From:	David Woodhouse <dwmw2@...radead.org>
To:	Segher Boessenkool <segher@...nel.crashing.org>
Cc:	Matthieu CASTET <castet.matthieu@...e.fr>,
	"John Anthony Kazos Jr." <jakj@...-k-j.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ubi: kill homegrown endian macros

On Sat, 2007-05-19 at 14:24 +0200, Segher Boessenkool wrote:
> >> It's not the compiler who decides -- struct layout is
> >> dictated by the ABI you're compiling for.
> >
> > This is true in the case of externally-visible stuff. I think the
> > compiler is permitted to violate the ABI for purely unit-internal 
> > things
> > if it makes sense though, isn't it?
> 
> Sure.  It isn't "violating the ABI" in that case though,
> to be perfectly clear.

Of course. It's not conforming to the ABI because there's no need to.

> > The rule stands -- empirical testing of what the compiler will do isn't
> > usually the right answer.
> 
> It is *never* the right answer.  You should always write
> your code so that it will do the right thing no matter
> what the compiler decides to do to it.

Well, there's sometimes some benefit in _also_ checking that the output
of the compiler matches your expectations. :)

-- 
dwmw2

-
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