Linux Kernel contains only C code?

Jeffrey Walton noloader at gmail.com
Mon Jan 29 13:00:10 EST 2018


On Mon, Jan 29, 2018 at 12:33 PM, Greg KH <greg at kroah.com> wrote:
> On Mon, Jan 29, 2018 at 12:16:19PM -0500, Jeffrey Walton wrote:
>> ...
>> It would be nice if they moved away from UB and implementation defined
>> behvior, but sometimes the political problems are heavier than the
>> technical solutions.
>
> What do you mean by this?  What "UB" does the kernel rely on that
> prevents compilers from properly building it?  We do have some pretty
> strict requirements in the kernel for a compiler, but anything "odd" is
> usually just a bug and we are always willing to take patches to fix
> them.

https://groups.google.com/forum/#!topic/linux.kernel/-VzG6FWZiy8 and
https://www.spinics.net/lists/linux-crypto/msg19466.html .

I found the first one from 2013 amusing:

  JW >> According to Section 5.8, "Shift Operators" of
  JW >> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf:
  JW >>  "The operands shall be of integral or enumeration type ...
  CL > The kernel doesn't try to be fully standard conformant.

The second one from 2016 was disappointing. It suggested a standards
compliant rotate that was constant time for the linux-crypto folks.
That was rejected by some:

  PA >> So you are actually saying outright that we should sacrifice *actual*
  PA >> portability in favor of *theoretical* portability?  What kind of
  PA >> twilight zone did we just step into?!

Its kind of like I said... the political problems are harder than the
technical solutions.

Jeff



More information about the Kernelnewbies mailing list