EXEC_RODATA test is cherry on the cake as there is no explicit requirement for not being able to execute rodata at first place:
Caption of CONFIG_STRICT_KERNEL_RWX is "Make kernel text and rodata read-only", which doesn't mean we want rodata to be no-exec, allthough the detailed help text evoques it.
powerpc is really are reluctant to implement no-exec on rodata as it would either require bigger alignment between sections or would require the use of regular pages instead of block mapping, so we'd have to choose between wasted memory or degraded performance.
I don't mind adding arch-specific XFAILs, but I considering it a failure: data should not be executable. It's simply a detail of the architecture that this trade-off was chosen.
EXEC_RODATA
test is cherry on the cake as there is no explicit requirement for not being able to executerodata
at first place:Caption of
CONFIG_STRICT_KERNEL_RWX
is"Make kernel text and rodata read-only"
, which doesn't mean we wantrodata
to be no-exec, allthough the detailed help text evoques it.powerpc is really are reluctant to implement no-exec on
rodata
as it would either require bigger alignment between sections or would require the use of regular pages instead of block mapping, so we'd have to choose between wasted memory or degraded performance.See https://github.com/linuxppc/linux/commit/d924cc3feda9c2bea8164930899f367ce249cbbf and https://github.com/linuxppc/linux/commit/a0591b60eef965f7f5255ad4696bbba9af4b43d0
EXEC_RODATA
lkdtm test sayslkdtm: FAIL: func returned
Should we reportWARN
instead ofFAIL
?