[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+icZUUfmgJPmmjuaVckvdLwWuWOPDAuFFyLq_ZPkc__LZbtSA@mail.gmail.com>
Date: Tue, 22 May 2018 10:04:53 +0200
From: Sedat Dilek <sedat.dilek@...il.com>
To: Nick Desaulniers <nick.desaulniers@...il.com>
Cc: Matthias Kaehlcke <mka@...omium.org>,
lkml <linux-kernel@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
Manoj Gupta <manojgupta@...omium.org>,
AlistairStrachan <astrachan@...gle.com>,
"Steven Rostedt (VMware)" <rostedt@...dmis.org>
Subject: Re: Clang patch stacks for LTS kernels (v4.4 and v4.9) and status update
On Tue, May 22, 2018 at 9:39 AM, Sedat Dilek <sedat.dilek@...il.com> wrote:
> On Sat, May 19, 2018 at 12:54 AM, Nick Desaulniers
> <nick.desaulniers@...il.com> wrote:
>> Sedat,
>> Thanks for the report. We have a fix ready in
>> https://bugs.llvm.org/show_bug.cgi?id=37512. Can you report what
>> version of clang you were using and if earlier versions of clang have
>> this issue?
>> Thanks,
>
> Can you give some advices on how to implement
> "attribute((no_stack_protector))" for Clang?
>
> I looked on how this is done for GCC...
>
> [ include/linux/compiler-gcc.h ]
>
> #if GCC_VERSION >= 40400
> #define __optimize(level) __attribute__((__optimize__(level)))
> #define __nostackprotector __optimize("no-stack-protector")
> #endif /* GCC_VERSION >= 40400 */
>
> [ include/linux/compiler_types.h ]
>
> #ifndef __nostackprotector
> # define __nostackprotector
> #endif
>
> LLVM-bug #37512 says:
>
> "GCC option for this is: attribute((optimize("no-stack-protector")))
> and the equivalent clang syntax would be: attribute((no_stack_protector))"
>
> So, there should be a define in "include/linux/compiler-clang.h" for this?
>
> [ include/linux/compiler-clang.h ]
>
> #define __nostackprotector attribute((no_stack_protector))
>
> Looks that good to you?
>
I am trying with the attached files and...
CONFIG_PARAVIRT=y
CONFIG_CC_STACKPROTECTOR_STRONG=y
- Sedat -
View attachment "0001-compiler-clang.h-Add-__nostackprotector-function-att.patch" of type "text/x-patch" (779 bytes)
View attachment "0002-x86-paravirt-Mark-native_save_fl-with-__nostackprote.patch" of type "text/x-patch" (740 bytes)
Powered by blists - more mailing lists