Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 352802 - sys-kernel/hardened-sources 2.6.32-r3[58] and 2.6.36-r9 fail to compile on ia64
Summary: sys-kernel/hardened-sources 2.6.32-r3[58] and 2.6.36-r9 fail to compile on ia64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: The Gentoo Linux Hardened Kernel Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-26 10:00 UTC by Dennis Schridde
Modified: 2011-04-21 07:11 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2011-01-26 10:00:04 UTC
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
Comment 1 Dennis Schridde 2011-01-26 10:21:39 UTC
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
Comment 2 Anthony Basile gentoo-dev 2011-02-08 14:58:00 UTC
Sending this upstream.

@pipacs, looks like the old ACCESS_ONCE() problem showing up in ia64.
Comment 3 PaX Team 2011-02-08 15:42:14 UTC
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.
Comment 4 Dennis Schridde 2011-02-28 07:49:22 UTC
Issue persists in 2.6.32-r38
Comment 5 Dennis Schridde 2011-02-28 07:51:06 UTC
P.S: Confirming that replacing the macro call ACCESS_ONCE with ACCESS_ONCE_RW on line 75 if spinlock.h makes the kernel compile.
Comment 6 PaX Team 2011-02-28 09:35:13 UTC
it was fixed in grsec yesterday, wait till hardened-sources updates as well ;).
Comment 7 Anthony Basile gentoo-dev 2011-04-21 00:58:00 UTC
@Dennis, can you check the latest stable hardened-sources 2.6.32-r42 and 2.6.37-r7
Comment 8 Dennis Schridde 2011-04-21 07:11:14 UTC
32-r42 works, thanks!