i may be making grave assumptions or omitting crucial details in any of the information i give. please bear with and correct me, i'm way out of my comfort zone but trying to learn as i can.
i'm trying to build a 3.18.1 kernel patched with gresecurity for armv5t. it's reliably failing to build for me at
- Code: Select all
In file included from include/linux/atomic.h:4:0,
from include/linux/spinlock.h:408,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/sched.h:19,
from arch/arm/kernel/asm-offsets.c:14:
./arch/arm/include/asm/atomic.h: In function ‘atomic_cmpxchg_unchecked’:
./arch/arm/include/asm/atomic.h:267:2: warning: passing argument 1 of ‘atomic_cmpxchg’ from incompatible pointer type [enabled by default]
return atomic_cmpxchg(v, old, new);
^
./arch/arm/include/asm/atomic.h:251:19: note: expected ‘struct atomic_t *’ but argument is of type ‘struct atomic_unchecked_t *’
static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
^
./arch/arm/include/asm/atomic.h: In function ‘atomic_inc_unchecked’:
./arch/arm/include/asm/atomic.h:304:2: error: implicit declaration of function ‘atomic_add_unchecked’ [-Werror=implicit-function-declaration]
atomic_add_unchecked(1, v);
^
./arch/arm/include/asm/atomic.h: In function ‘atomic_dec_unchecked’:
./arch/arm/include/asm/atomic.h:309:2: error: implicit declaration of function ‘atomic_sub_unchecked’ [-Werror=implicit-function-declaration]
atomic_sub_unchecked(1, v);
^
./arch/arm/include/asm/atomic.h: In function ‘atomic_inc_and_test_unchecked’:
./arch/arm/include/asm/atomic.h:315:2: error: implicit declaration of function ‘atomic_add_return_unchecked’ [-Werror=implicit-function-declaration]
return atomic_add_return_unchecked(1, v) == 0;
^
Kbuild:81: recipe for target 'arch/arm/kernel/asm-offsets.s' failed
make[2]: *** [arch/arm/kernel/asm-offsets.s] Error 1
Makefile:1052: recipe for target 'prepare0' failed
make[1]: *** [prepare0] Error 2
in arch/arm/include/asm/atomic.h i can see where the definitions of ATOMIC_OP and ATOMIC_OP_RETURN were patched to create both the atomic_${op} and atomic_${op}_unchecked. for __LINUX_ARM_ARCH__ < 6, the definitions (which are just below) aren't patched to create the _unchecked functions.
before I go about trying to hack at this myself and set things on fire, any pointers or am i missing anything obvious? i didnt think anything in my .config would be relevant (REFCOUNT isn't even selectable for this arch) but i can post that or whatever else may help.
thanks again!