checkpoint-restore / criu

Checkpoint/Restore tool
criu.org
Other
2.86k stars 576 forks source link

s390x: fix building with latest Linux kernel #2232

Closed adrianreber closed 12 months ago

adrianreber commented 1 year ago

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:

https://github.com/torvalds/linux/commit/b8af5999779d1225c82fcc960223625b279f5f0d

This is fixed with this patch.

adrianreber commented 1 year ago

I also reached out to the original authors of that kernel change.

adrianreber commented 1 year ago

https://lore.kernel.org/all/20230731183926.330932-1-hca@linux.ibm.com/

adrianreber commented 1 year ago

It seems the kernel fix will make it into rc5. No need to fix it in CRIU then I think.

yselkowitz commented 1 year ago

If the fix has landed in a 6.5 RC then I think this can be closed.

github-actions[bot] commented 1 year ago

A friendly reminder that this PR had no activity for 30 days.

adrianreber commented 12 months ago

Closed as it was fixed in the kernel.