]> Git Repo - linux.git/commit
compiler-gcc.h: gcc-4.5 needs noclone and noinline on __naked functions
authorMikael Pettersson <[email protected]>
Tue, 29 Jun 2010 22:05:25 +0000 (15:05 -0700)
committerLinus Torvalds <[email protected]>
Tue, 29 Jun 2010 22:29:31 +0000 (15:29 -0700)
commit9c695203a7ddbe49dba5f22f4c941d24f47475df
tree0dcfa624ecb7c5810f7062fe950bf3f0de2e55b2
parent2952095c6b2eefd068dda0dee6317cf95155a304
compiler-gcc.h: gcc-4.5 needs noclone and noinline on __naked functions

A __naked function is defined in C but with a body completely implemented
by asm(), including any prologue and epilogue.  These asm() bodies expect
standard calling conventions for parameter passing.  Older GCCs implement
that correctly, but 4.[56] currently do not, see GCC PR44290.  In the
Linux kernel this breaks ARM, causing most arch/arm/mm/copypage-*.c
modules to get miscompiled, resulting in kernel crashes during bootup.

Part of the kernel fix is to augment the __naked function attribute to
also imply noinline and noclone.  This patch implements that, and has been
verified to fix boot failures with gcc-4.5 compiled 2.6.34 and 2.6.35-rc1
kernels.  The patch is a no-op with older GCCs.

Signed-off-by: Mikael Pettersson <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
Cc: Russell King <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/compiler-gcc.h
include/linux/compiler-gcc4.h
This page took 0.056222 seconds and 4 git commands to generate.