kpatch-build: drop klp.arch support in RHEL-8.4#1163
kpatch-build: drop klp.arch support in RHEL-8.4#1163joe-lawrence merged 2 commits intodynup:masterfrom
Conversation
|
Tested as part of this WIP branch for 8.4 integration test rebase: https://github.com/joe-lawrence/kpatch/tree/rhel-8.4-284-no-klp-arch (final 8.4 kernel TBD) |
|
When trying this out, I think I found that kernel_is_rhel() is broken for z-stream kernels. It expects a "." after the el8, like |
|
Also I'm wondering how those tests passed ;-) edit: probably tested with a GA kernel? |
|
Good catch. Previous to this PR, the only callers of which is only working by accident:
However, you were correct to flag this bug since this PR introduces code which finally demonstrates the problem: this will incorrectly return false for z-stream rhel kernels greater than 4.18.0-240.el8. Since none exist yet, this was not tested. To fix this, I can add a prep commit to this PR, how about a relaxed regex like: and if that is too permissive, this would take into account rhel-alt and kernels with non-empty build-ids (like .dt1 or .bz123): |
|
Ah good, glad I misread the severity of the bug :-) The more relaxed regex looks good to me. |
During review of PR dynup#1163, Josh reported: When trying this out, I think I found that kernel_is_rhel() is broken for z-stream kernels. It expects a "." after the el8, like ".el8.", but [rhel-8] z-stream kernels have the minor version appended to the major version like ".el8_3". Tweak the regex pattern in kernel_is_rhel() to account for such z-stream kernel versions. Reported-by: Josh Poimboeuf <[email protected]> Signed-off-by: Joe Lawrence <[email protected]>
57e6780 to
20669a2
Compare
|
Looking at it again this morning, the suggested regex would be equivalent to just removing the trailing dot: Tests for ("kpatch-build: fix kernel_is_rhel() for rhel-8 z-stream kernels"): (Before) (After) |
|
Looks good to me, While we're at it, might as well make kernel_is_rhel() work for .el9 to avoid any subtle future breakage? |
During review of PR dynup#1163, Josh reported: When trying this out, I think I found that kernel_is_rhel() is broken for z-stream kernels. It expects a "." after the el8, like ".el8.", but [rhel-8] z-stream kernels have the minor version appended to the major version like ".el8_3". Tweak the regex pattern in kernel_is_rhel() to account for such z-stream kernel versions. At the same time, add .el9 to the regex in preparation of rhel-9. Reported-by: Josh Poimboeuf <[email protected]> Signed-off-by: Joe Lawrence <[email protected]>
RHEL-8.4 backported the "livepatch,module: Remove .klp.arch and module_disable_ro()" patchset [1], so update kpatch-build accordingly. [1] https://lore.kernel.org/live-patching/[email protected]/T/#t Signed-off-by: Joe Lawrence <[email protected]>
20669a2 to
6d466fa
Compare
|
Added .el9 to the regex |
RHEL-8.4 backported the "livepatch,module: Remove .klp.arch and
module_disable_ro()" patchset [1], so update kpatch-build accordingly.
[1] https://lore.kernel.org/live-patching/[email protected]/T/#t
Signed-off-by: Joe Lawrence [email protected]