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 = { ^
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.
No, I am not using gold. (I don't think the linker is involved at all -- it's a compilation error)
@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.
Same issue with 4.7.10-r2.
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.
(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.
(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.
(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?)
(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.
(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.
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, ^