[SRU][I][PATCH 0/1] s390x: prevent unreachable jumps with new gcc
Andrea Righi
andrea.righi at canonical.com
Wed Feb 2 15:00:34 UTC 2022
BugLink: https://bugs.launchpad.net/bugs/1954676
[Impact]
We have experienced a nasty kernel bug in Jammy on s390x, starting with
gcc 11.2.0-10ubuntu1: the object files generated with the new gcc could
contain unreachable jumps causing kernel panics at runtime, because the
kernel can jump to random addresses in memory.
This has been fixed in Jammy by reverting this patch in gcc:
[1] https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2335aa8771acd06b082d3e15d9f21ae0a802afd7
In addition to that recently a kernel fix also landed upstream:
f3b7e73b2c66 ("s390/module: fix loading modules with a lot of relocations")
This fix has been applied to the Jammy kernel already.
We should probably apply this fix to the Impish kernel as well, in case
the same gcc patch lands in Impish.
[Test case]
Build zfs on s390x with a gcc that includes the patch mentioned above
[1], try to insmod zfs.ko and you should experience random kernel
panics.
[Fix]
Apply upstream commit:
f3b7e73b2c66 ("s390/module: fix loading modules with a lot of relocations")
[Regression potential]
This patch affects the code that takes care of loading external kernel
modules (.ko) on s390x, so we may see regressions on s390x when some
kernel modules are loaded. However this change has been applied uptream
and tested extensively on the affected architecture, so regression
potential should be minimal.
More information about the kernel-team
mailing list