Following error appears when compiling 2.6.36-hardened-r9: CC arch/ia64/kernel/asm-offsets.s In file included from include/linux/spinlock.h:86, from include/linux/seqlock.h:29, from include/linux/time.h:8, from include/linux/timex.h:56, from include/linux/sched.h:56, from arch/ia64/kernel/asm-offsets.c:9: /usr/src/linux-2.6.36-hardened-r9/arch/ia64/include/asm/spinlock.h: In function ___ticket_spin_unlock_: /usr/src/linux-2.6.36-hardened-r9/arch/ia64/include/asm/spinlock.h:75: error: assignment of read-only location _*(const volatile short unsigned int *)p_ make[1]: *** [arch/ia64/kernel/asm-offsets.s] Error 1 Reproducible: Always
Same happens for 2.6.32-r35: CC arch/ia64/kernel/asm-offsets.s In file included from include/linux/spinlock.h:88, from include/linux/seqlock.h:29, from include/linux/time.h:8, from include/linux/timex.h:56, from include/linux/sched.h:56, from arch/ia64/kernel/asm-offsets.c:9: /usr/src/linux-2.6.32-hardened-r35/arch/ia64/include/asm/spinlock.h: In function ___ticket_spin_unlock_: /usr/src/linux-2.6.32-hardened-r35/arch/ia64/include/asm/spinlock.h:75: error: assignment of read-only location _*(const volatile short unsigned int *)p_ make[1]: *** [arch/ia64/kernel/asm-offsets.s] Error 1
Sending this upstream. @pipacs, looks like the old ACCESS_ONCE() problem showing up in ia64.
http://bugs.gentoo.org/show_bug.cgi(In reply to comment #2) > Sending this upstream. > > @pipacs, looks like the old ACCESS_ONCE() problem showing up in ia64. yeah, it just needs to be ACCESS_ONCE_RW.
Issue persists in 2.6.32-r38
P.S: Confirming that replacing the macro call ACCESS_ONCE with ACCESS_ONCE_RW on line 75 if spinlock.h makes the kernel compile.
it was fixed in grsec yesterday, wait till hardened-sources updates as well ;).
@Dennis, can you check the latest stable hardened-sources 2.6.32-r42 and 2.6.37-r7
32-r42 works, thanks!