Skip to content

Commit d124b44

Browse files
ojedagregkh
authored andcommitted
Compiler Attributes: naked was fixed in gcc 4.6
Commit 9c69520 ("compiler-gcc.h: gcc-4.5 needs noclone and noinline on __naked functions") added noinline and noclone as a workaround for a gcc 4.5 bug, which was resolved in 4.6.0. Since now the minimum gcc supported version is 4.6, we can clean it up. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44290 and https://godbolt.org/z/h6NMIL Fixes: 815f0dd ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") Cc: Rasmus Villemoes <[email protected]> Cc: Eli Friedman <[email protected]> Cc: Christopher Li <[email protected]> Cc: Kees Cook <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: Joe Perches <[email protected]> Cc: Dominique Martinet <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: [email protected] Tested-by: Stefan Agner <[email protected]> Reviewed-by: Stefan Agner <[email protected]> Reviewed-by: Luc Van Oostenryck <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4b92e7f commit d124b44

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

include/linux/compiler-gcc.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,8 @@
8484
* to trace naked functions because then mcount is called without
8585
* stack and frame pointer being set up and there is no chance to
8686
* restore the lr register to the value before mcount was called.
87-
*
88-
* The asm() bodies of naked functions often depend on standard calling
89-
* conventions, therefore they must be noinline and noclone.
90-
*
91-
* GCC 4.[56] currently fail to enforce this, so we must do so ourselves.
92-
* See GCC PR44290.
9387
*/
94-
#define __naked __attribute__((naked)) noinline __noclone notrace
88+
#define __naked __attribute__((naked)) notrace
9589

9690
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
9791

0 commit comments

Comments
 (0)