s390x: add stack-protector-loc unit test#57
Merged
Conversation
|
Looks fine. Thanks! |
Add object files for fs/proc/meminfo.o compiled with GCC's global stack
protector recording options (-mstack-protector-guard=global
-mstack-protector-guard-record). These generate a __stack_protector_loc
section whose relocations must be regenerated when a patched function's
layout changes. Without the fix, kpatch-build fails:
ERROR: changed section .rela__stack_protector_loc not selected for inclusion
ERROR: fs/proc/meminfo.o: 1 unsupported section change(s)
Unit test objects created with gcc version 16.1.1 20260515 (Red Hat
16.1.1-2) (GCC), upstream kernel v7.0 with a Fedora 44-ish kernel
config, and this kpatch:
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
index a458f1e11..c6fe0db41 100644
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -41,6 +41,8 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
unsigned long sreclaimable, sunreclaim;
int lru;
+ pr_info("kpatch test");
+
si_meminfo(&i);
si_swapinfo(&i);
committed = vm_memory_committed();
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
24beeca to
c06b36b
Compare
Contributor
Author
|
v2:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add object files for fs/proc/meminfo.o compiled with GCC's global stack protector recording options (-mstack-protector-guard=global -mstack-protector-guard-record). These generate a __stack_protector_loc section whose relocations must be regenerated when a patched function's layout changes. Without the fix, kpatch-build fails:
ERROR: changed section .rela__stack_protector_loc not selected for inclusion
ERROR: fs/proc/meminfo.o: 1 unsupported section change(s)
Unit test objects created gcc version 16.1.1 20260515 (Red Hat 16.1.1-2) (GCC), upstream kernel v7.0 with a Fedora 44-ish kernel config, and this kpatch:
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c index a458f1e11..c6fe0db41 100644
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -41,6 +41,8 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
unsigned long sreclaimable, sunreclaim;
int lru;
si_meminfo(&i); si_swapinfo(&i); committed = vm_memory_committed();