• Steven Rostedt's avatar
    Makefile: Mute warning for __builtin_return_address(>0) for tracing only · e8234b0c
    Steven Rostedt authored
    BugLink: http://bugs.launchpad.net/bugs/1629386
    
    commit 377ccbb4 upstream.
    
    With the latest gcc compilers, they give a warning if
    __builtin_return_address() parameter is greater than 0. That is because if
    it is used by a function called by a top level function (or in the case of
    the kernel, by assembly), it can try to access stack frames outside the
    stack and crash the system.
    
    The tracing system uses __builtin_return_address() of up to 2! But it is
    well aware of the dangers that it may have, and has even added precautions
    to protect against it (see the thunk code in arch/x86/entry/thunk*.S)
    
    Linus originally added KBUILD_CFLAGS that would suppress the warning for the
    entire kernel, as simply adding KBUILD_CFLAGS to the tracing directory
    wouldn't work. The tracing directory plays a bit with the CFLAGS and
    requires a little more logic.
    
    This adds that special logic to only suppress the warning for the t...
    e8234b0c
Makefile 54.7 KB