lkml.org 
[lkml]   [2018]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v2] Compiler Attributes: don't pollute userspace with macro definitions
    Hi Miguel,

    On Thu, Dec 13, 2018 at 10:59:10PM +0100, Miguel Ojeda wrote:

    > I wonder if we can/should simply move them into the __KERNEL__ &&
    > !__ASSEMBLY__ block that is above, instead. It would be simpler to
    > read, and there aren't apparently dependencies to those outside it
    > that go after the block.

    Yes, this is also more accurate. I will send a v3.

    > I took a look at where the macros were at each "step", and, on one
    > hand, compiler-gcc.h was (and is) included entirely inside it, which
    > is from where most of the macros come originally from. On the other
    > hand, not all do: __must_check (the generic version, not the one in
    > -gcc.h) and noinline_for_stack were defined in __KERNEL__ (only)
    > before commit 815f0ddb346c ("include/linux/compiler*.h: make
    > compiler-*.h mutually exclusive"). But anyway using those two in
    > assembly does not make sense, right?
    >
    > What do you think?

    A simple grep shows no assembly are using those macros. Pretty sure
    it is safe to do it this way.


    Thanks,
    Xiaozhou

    \
     
     \ /
      Last update: 2018-12-14 11:18    [W:3.902 / U:0.440 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site