Re: [RFC 8/8] bitops: prevent compiler inline decision distortion

2018-05-16 Thread Kees Cook
On Tue, May 15, 2018 at 7:11 AM, Nadav Amit wrote: > There are several places in the kernel in which there is a condition > that is based on whether the input is known to be constant in > compilation time. If it is, there are complex computations, which only > take place during compilation time.

[RFC 8/8] bitops: prevent compiler inline decision distortion

2018-05-15 Thread Nadav Amit
There are several places in the kernel in which there is a condition that is based on whether the input is known to be constant in compilation time. If it is, there are complex computations, which only take place during compilation time. Although this scheme works correctly, when GCC computes the

[RFC 8/8] bitops: prevent compiler inline decision distortion

2018-05-15 Thread Nadav Amit
There are several places in the kernel in which there is a condition that is based on whether the input is known to be constant in compilation time. If it is, there are complex computations, which only take place during compilation time. Although this scheme works correctly, when GCC computes the