[PATCH] [U/master-next] [SRU] [Config] armhf: disable JUMP_LABEL

Paolo Pisati paolo.pisati at canonical.com
Thu Oct 16 07:41:51 UTC 2014


JUMP_LABEL is a branch optimization technic that
makes certain branch conditions cheaper to execute within the kernel,
(e.g. trace points, scheduler functionality, networking code and KVM).

It works by injecting 'nop' at those branch points, and then rewriting
the correct jump instruction when the branch condition becomes true.

Unfortunately, the code rewriting that JUMP_LABEL does interferes with another
security option called DEBUG_SET_MODULE_RONX that marks text and data section
read-only upon modules loading.

While arch like x86 have grown finer control over module's section protection,
armhf has not, and thus the loading of a module that incurs in the JUMP_LABEL 
rewriting ends up with an oops.

There are some patches that could solve this condition for arm, but those are not
upstream yet and haven't seen broader testing thus i don't feel comfortable in
pulling those in, and i prefer to disable the JUMP_LABEL optimization.

Buglink: https://bugs.launchpad.net/bugs/1378856

Paolo Pisati (1):
  [SRU] [Config] armhf: disable JUMP_LABEL

 debian.master/config/amd64/config.common.amd64     | 1 +
 debian.master/config/arm64/config.common.arm64     | 1 +
 debian.master/config/armhf/config.common.armhf     | 1 +
 debian.master/config/config.common.ubuntu          | 1 -
 debian.master/config/i386/config.common.i386       | 1 +
 debian.master/config/powerpc/config.common.powerpc | 1 +
 debian.master/config/ppc64el/config.common.ppc64el | 1 +
 7 files changed, 6 insertions(+), 1 deletion(-)

-- 
2.1.0





More information about the kernel-team mailing list