-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s390x: fix building with latest Linux kernel #2232
s390x: fix building with latest Linux kernel #2232
Conversation
Building on the latest Linux kernel (6.5-rc1) fails with: In file included from compel/include/uapi/compel/asm/infect-types.h:7, from compel/arch/s390/src/lib/infect.c:12: compel/arch/s390/src/lib/infect.c: In function 'rewind_psw': compel/arch/s390/src/lib/infect.c:157:29: error: 'UL' undeclared (first use in this function) 157 | mask = (psw->mask & PSW_MASK_EA) ? -1UL : (psw->mask & PSW_MASK_BA) ? (1UL << 31) - 1 : (1UL << 24) - 1; | ^~~~~~~~~~~ compel/arch/s390/src/lib/infect.c:157:29: note: each undeclared identifier is reported only once for each function it appears in compel/arch/s390/src/lib/infect.c: In function 'get_ri_cb': compel/arch/s390/src/lib/infect.c:272:25: error: 'UL' undeclared (first use in this function) 272 | if (psw->mask & PSW_MASK_RI) | ^~~~~~~~~~~ compel/arch/s390/src/lib/infect.c: In function 's390_disable_ri_bit': compel/arch/s390/src/lib/infect.c:289:23: error: 'UL' undeclared (first use in this function) 289 | psw->mask &= ~PSW_MASK_RI; | ^~~~~~~~~~~ compel/arch/s390/src/lib/infect.c: In function 'arch_can_dump_task': compel/arch/s390/src/lib/infect.c:523:25: error: 'UL' undeclared (first use in this function) 523 | if (psw->mask & PSW_MASK_RI) { | This is caused by: torvalds/linux@b8af599 This is fixed with this patch. Signed-off-by: Adrian Reber <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While IMO it would be best to add the missing #include <linux/const.h>
to the s390 asm/ptrace.h in the kernel headers themselves, these includes should probably be where #include <asm/ptrace.h>
is stated.
@@ -9,6 +9,7 @@ | |||
#include <errno.h> | |||
#include <elf.h> | |||
#include <compel/plugins/std/syscall-codes.h> | |||
#include <linux/const.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be in compel/arch/s390/src/lib/include/uapi/asm/infect-types.h which contains the #include <asm/ptrace.h>
?
@@ -4,6 +4,7 @@ | |||
#include <sys/user.h> | |||
#include <asm/unistd.h> | |||
#include <sys/uio.h> | |||
#include <linux/const.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't criu/arch/s390/include/asm/restorer.h which contains the #include <asm/ptrace.h>
be a better place for this?
I also reached out to the original authors of that kernel change. |
It seems the kernel fix will make it into rc5. No need to fix it in CRIU then I think. |
Adrian Reber reported the following CRIU build bug after commit b8af599 ("s390/ptrace: make all psw related defines also available for asm"): compel/arch/s390/src/lib/infect.c: In function 'arch_can_dump_task': compel/arch/s390/src/lib/infect.c:523:25: error: 'UL' undeclared (first use in this function) 523 | if (psw->mask & PSW_MASK_RI) { | ^~~~~~~~~~~ Add the missing linux/const.h include to fix this. Reported-by: Adrian Reber <[email protected]> Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2225745 Link: checkpoint-restore/criu#2232 Tested-by: Adrian Reber <[email protected]> Fixes: b8af599 ("s390/ptrace: make all psw related defines also available for asm") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Carstens <[email protected]>
Adrian Reber reported the following CRIU build bug after commit b8af599 ("s390/ptrace: make all psw related defines also available for asm"): compel/arch/s390/src/lib/infect.c: In function 'arch_can_dump_task': compel/arch/s390/src/lib/infect.c:523:25: error: 'UL' undeclared (first use in this function) 523 | if (psw->mask & PSW_MASK_RI) { | ^~~~~~~~~~~ Add the missing linux/const.h include to fix this. Reported-by: Adrian Reber <[email protected]> Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2225745 Link: checkpoint-restore/criu#2232 Tested-by: Adrian Reber <[email protected]> Fixes: b8af599 ("s390/ptrace: make all psw related defines also available for asm") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Carstens <[email protected]>
If the fix has landed in a 6.5 RC then I think this can be closed. |
A friendly reminder that this PR had no activity for 30 days. |
Closed as it was fixed in the kernel. |
Building on the latest Linux kernel (6.5-rc1) fails with:
This is caused by:
torvalds/linux@b8af599
This is fixed with this patch.