lkml.org 
[lkml]   [2018]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [clang] stack protector and f1f029c7bf
On Thu, May 24, 2018 at 1:26 PM Nick Desaulniers <ndesaulniers@google.com>
wrote:
> On Thu, May 24, 2018 at 11:59 AM <hpa@zytor.com> wrote:
> > Issue 3: Let's face it, reading and writing the flags should be
builtins,
> exactly because it has to do stack operations, which really means the
> compiler should be involved.

> I'm happy to propose that as a feature request to llvm+gcc.

Oh, looks like both clang and gcc have:
__builtin_ia32_readeflags_u64()

https://godbolt.org/g/SwPjhq

Maybe native_save_fl() and native_restore_fl() should be replaced in the
kernel with
__builtin_ia32_readeflags_u64() and __builtin_ia32_writeeflags_u64()?
--
Thanks,
~Nick Desaulniers

\
 
 \ /
  Last update: 2018-05-24 22:53    [W:0.102 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site