Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 599320 - sys-kernel/hardened-sources-4.7.10 doesn't compile
Summary: sys-kernel/hardened-sources-4.7.10 doesn't compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-09 16:57 UTC by Matt Turner
Modified: 2016-12-21 11:39 UTC (History)
5 users (show)

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


Attachments
config (hardened-config,97.81 KB, text/plain)
2016-11-09 16:57 UTC, Matt Turner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Turner gentoo-dev 2016-11-09 16:57:07 UTC
Created attachment 452818 [details]
config

CC      kernel/trace/trace_printk.o
kernel/trace/trace_printk.c:194:23: error: constified variable ‘module_trace_bprintk_format_nb’ placed into writable section ".init.data"
 struct notifier_block module_trace_bprintk_format_nb = {
                       ^
Comment 1 Michael Orlitzky gentoo-dev 2016-11-09 18:52:28 UTC
Are you using the gold linker by any chance? I'm pretty sure I hit this, but I was rushing to patch everything so I didn't think too hard about it. Probably I tried setting /bin/sh back to bash and ld back to ld.bfd before anything else.
Comment 2 Matt Turner gentoo-dev 2016-11-09 22:29:57 UTC
No, I am not using gold. (I don't think the linker is involved at all -- it's a compilation error)
Comment 3 Anthony Basile gentoo-dev 2016-11-10 00:28:35 UTC
@pageexec  The current stable version is =sys-kernel/hardened-sources-4.7.10 which uses patch set grsecurity-3.1-4.7.10-201610222037.  Do you know if this issue was fixed in any latter patchset?

@mattst88, while upstream looks at this, you can try =sys-kernel/hardened-sources-4.7.10-r2 which has some fixes. I don't see this particular issue addressed, but I might be missing something.  I'm going to be adding =sys-kernel/hardened-sources-4.8.6 soon which you can also test.
Comment 4 Matt Turner gentoo-dev 2016-11-10 01:01:47 UTC
Same issue with 4.7.10-r2.
Comment 5 PaX Team 2016-11-10 16:22:30 UTC
this is because the variable in question is marked with __initdata_or_module, just remove it and it should work. i'll fix this for 4.8 only as we moved on from 4.7 already.
Comment 6 Anthony Basile gentoo-dev 2016-11-12 00:22:46 UTC
(In reply to PaX Team from comment #5)
> this is because the variable in question is marked with
> __initdata_or_module, just remove it and it should work. i'll fix this for
> 4.8 only as we moved on from 4.7 already.

okay i've pushed =sys-kernel/hardened-sources-4.8.7 which has grsecurity-3.1-4.8.7-201611102210.  this should fix the problem.

@mattst88 can you confirm it fixes the issue.
Comment 7 PaX Team 2016-11-12 11:40:02 UTC
(In reply to Anthony Basile from comment #6)
> okay i've pushed =sys-kernel/hardened-sources-4.8.7 which has
> grsecurity-3.1-4.8.7-201611102210.  this should fix the problem.
> 
> @mattst88 can you confirm it fixes the issue.
that version doesn't have yet the fix, the next one will.
Comment 8 Matt Turner gentoo-dev 2016-11-23 21:41:26 UTC
(In reply to Anthony Basile from comment #6)
> (In reply to PaX Team from comment #5)
> > this is because the variable in question is marked with
> > __initdata_or_module, just remove it and it should work. i'll fix this for
> > 4.8 only as we moved on from 4.7 already.
> 
> okay i've pushed =sys-kernel/hardened-sources-4.8.7 which has
> grsecurity-3.1-4.8.7-201611102210.  this should fix the problem.
> 
> @mattst88 can you confirm it fixes the issue.

No. Still occurs with 4.8.9. (Are you not build testing these?)
Comment 9 PaX Team 2016-11-23 22:39:21 UTC
(In reply to Matt Turner from comment #8)
> No. Still occurs with 4.8.9. (Are you not build testing these?)
i fixed it in PaX (you can check it ;) but spender has yet to take it.
Comment 10 Anthony Basile gentoo-dev 2016-11-25 13:12:31 UTC
(In reply to Matt Turner from comment #8)
> (In reply to Anthony Basile from comment #6)
> > (In reply to PaX Team from comment #5)
> > > this is because the variable in question is marked with
> > > __initdata_or_module, just remove it and it should work. i'll fix this for
> > > 4.8 only as we moved on from 4.7 already.
> > 
> > okay i've pushed =sys-kernel/hardened-sources-4.8.7 which has
> > grsecurity-3.1-4.8.7-201611102210.  this should fix the problem.
> > 
> > @mattst88 can you confirm it fixes the issue.
> 
> No. Still occurs with 4.8.9. (Are you not build testing these?)

i just added hardened-sources-4.8.10.  can you test that.  as per pipacs' comments, it should be fixed there.
Comment 11 Matt Turner gentoo-dev 2016-11-25 22:11:28 UTC
Yes, it now compiles and warns:

kernel/trace/trace_printk.c:176:1: warning: ‘module_trace_bprintk_format_notify’ defined but not used [-Wunused-function]
 module_trace_bprintk_format_notify(struct notifier_block *self,
 ^