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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 29 Mar 2016 20:35:38 +0200
From:	Denys Vlasenko <dvlasenk@...hat.com>
To:	Josh Boyer <jwboyer@...oraproject.org>
CC:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Thomas Graf <tgraf@...g.ch>,
	Peter Zijlstra <peterz@...radead.org>,
	David Rientjes <rientjes@...gle.com>,
	Arnd Bergmann <arnd@...db.de>, Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] compiler.h: Provide __always_inline to userspace headers
 too

On 03/29/2016 08:23 PM, Josh Boyer wrote:
> On Tue, Mar 29, 2016 at 2:14 PM, Denys Vlasenko <dvlasenk@...hat.com> wrote:
>> Recent change to uapi/linux/swab.h needs this.
>>
>> Signed-off-by: Denys Vlasenko <dvlasenk@...hat.com>
>> CC: Josh Boyer <jwboyer@...oraproject.org>
>> CC: Thomas Graf <tgraf@...g.ch>
>> CC: Peter Zijlstra <peterz@...radead.org>
>> CC: David Rientjes <rientjes@...gle.com>
>> CC: Arnd Bergmann <arnd@...db.de>
>> CC: Ingo Molnar <mingo@...nel.org>
>> CC: Andrew Morton <akpm@...ux-foundation.org>
>> CC: Linus Torvalds <torvalds@...ux-foundation.org>
>> CC: linux-kernel@...r.kernel.org
>> ---
>>  include/linux/compiler.h | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/linux/compiler.h b/include/linux/compiler.h
>> index b5ff988..2cb6ba4 100644
>> --- a/include/linux/compiler.h
>> +++ b/include/linux/compiler.h
>> @@ -397,12 +397,12 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
>>   */
>>  #define noinline_for_stack noinline
>>
>> +#endif /* __KERNEL__ */
>> +
>>  #ifndef __always_inline
>>  #define __always_inline inline
>>  #endif
>>
>> -#endif /* __KERNEL__ */
>> -
> 
> Did you test this by installing the headers with 'make
> headers-install' and trying to build something with the newly
> installed headers?  As I said in my other email, I don't see how
> changes to this particular file are reflected in anything that gets
> installed in /usr/include by the uapi mechanism.

You're right, #include <linux/compiler.h> gets erased in the installed headers:

headers_install.sh
...
        sed -r \
                -e 's/([ \t(])(__user|__force|__iomem)[ \t]/\1/g' \
                -e 's/__attribute_const__([ \t]|$)/\1/g' \
                -e 's@...nclude <linux/compiler.h>@@' \
...

Need another location for this fix. How about uapi/linux/stddef.h ?
Currently it has just one line:

#include <linux/compiler.h>

(which gets dutifully yanked off by the install script, leaving empty file...)
Can we place

#ifndef __always_inline
#define __always_inline inline
#endif

here?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ