Re: [clang] stack protector and f1f029c7bf
From: Alistair Strachan
Date: Fri May 25 2018 - 07:00:47 EST
(Resent plain text)
On Thu, May 24, 2018 at 11:24 AM Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
wrote:
> On Thu, May 24, 2018 at 11:20 AM <hpa@xxxxxxxxx> wrote:
> > A stack canary on an *inlined* function? That's bound to break things
> elsewhere too sooner or later.
> But it's *not* inlined by GCC or Clang.
FWIW, GCC can also insert a stack guard in an out-of-lined inline function,
it just doesn't for this one. The -fstack-protector and
-fstack-protector-strong flags are heuristic and the heuristic does not
match between gcc and clang for this function. It is working on GCC purely
by chance.
> While the function is marked `static inline`, it's not in
> arch/x86/kernel/paravirt.o due to:
> arch/x86/kernel/paravirt.c:326
> 325 __visible struct pv_irq_ops pv_irq_ops = {
> 326 .save_fl = __PV_IS_CALLEE_SAVE(native_save_fl),
> see comparison of disassembly attached in:
> https://bugs.llvm.org/attachment.cgi?id=20338
> --
> Thanks,
> ~Nick Desaulniers