lkrg-org / lkrg

Linux Kernel Runtime Guard
https://lkrg.org
Other
403 stars 72 forks source link

CI: arm32 test fails to install/load lkrg.ko #332

Closed solardiz closed 2 months ago

solardiz commented 2 months ago

@vt-alt This has started failing https://github.com/lkrg-org/lkrg/actions/runs/8727807004/job/23946138137

  #11 200.0   LD [M]  /lkrg/lkrg.ko
  #11 200.4 make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-1050-raspi'
  #11 200.4 mkdir -p output
  #11 200.4 cp /lkrg/lkrg.ko output
  #11 200.5 + '[' -e lkrg.ko ']'
  #11 200.5 + '[' -v DESTDIR ']'
  #11 200.5 + install -Dpm 644 lkrg.ko /lib/modules/5.15.0-1050-raspi/extra/lkrg.ko
  #11 200.5 + cp -av ./ /lkrg/
  #11 200.6 cp: './' and '/lkrg/.' are the same file
  #11 200.6 + :
  #11 DONE 201.2s

  #12 [7/7] RUN depmod -a $(cd /lib/modules; ls)
  #12 0.298 depmod: WARNING: could not open modules.order at /lib/modules/5.15.0-102-generic: No such file or directory
  #12 0.302 depmod: WARNING: could not open modules.builtin at /lib/modules/5.15.0-102-generic: No such file or directory
  #12 DONE 0.3s
   + modprobe lkrg
  modprobe: FATAL: Module lkrg not found in directory /lib/modules/5.15.0-1050-raspi
  [   12.991461] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
  [   12.992041] CPU: 0 PID: 1 Comm: run-boot-tests. Not tainted 5.15.0-1050-raspi #53-Ubuntu
vt-alt commented 2 months ago

Looks like linux-headers-generic (linux-headers-5.15.0-102-generic) brings /lib/modules/5.15.0-102-generic which confuses the build script.

vt-alt commented 2 months ago

(Fix is obvious but) I am thinking, how useful is this ARMv7 boot test at all? Maybe it's time to just remove it?

Also, the test imitate real hardware and thus brings linux-firmware which is 267 MB which takes 12 seconds to just download it on GA, and locally here ~7 minutes..

Perhaps, it's more useful to re-enable i386` test (it's not explained in commit message why it's disabled temporary).

vt-alt commented 2 months ago

Also, the test imitate real hardware and thus brings linux-firmware which is 267 MB which takes 12 seconds to just download it on GA, and locally here ~7 minutes..

[About replacing the test kernel, they have linux-virtual-hwe-22.04 (the only) which would not bring linux-firmware but it seems to be 6.5.0-27, which will invalidate 'old kernel testing' goal and requires gcc-12 to build the module for it, thus making replacement not feasible.]

solardiz commented 2 months ago

how useful is this ARMv7 boot test at all? Maybe it's time to just remove it?

As long as we do support this arch and it's not hard to keep this test working, I think we should keep it. I guess it may also just happen to uncover (future) LKRG issues not limited to this arch, just due to it being different than other tests.

Perhaps, it's more useful to re-enable i386` test

If we can, sure, let's re-enable it. But that's separate, unrelated to us keeping this test or not.

seems to be 6.5.0-27, which will invalidate 'old kernel testing' goal

I'm not sure we have that goal here. We could test old kernels on other archs.

Overall, I think for now let's go for the "obvious" fix you mentioned. Thank you, @vt-alt!