Skip to content
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

kernel 6.6.4 gives kernel panic #32

Closed
peabee opened this issue Dec 4, 2023 · 14 comments
Closed

kernel 6.6.4 gives kernel panic #32

peabee opened this issue Dec 4, 2023 · 14 comments

Comments

@peabee
Copy link

peabee commented Dec 4, 2023

kernel 6.6.3 was OK
kernel 6.6.4 32-bit and 64-bit builds give kernel panic
same system, same kernel booted with overlayfs, via punionfs=overlay boot switch, does not panic

IMG_20231204_070635

Screenshot

@peabee peabee changed the title kernel 6.6.4 32-bit gives kernel panic kernel 6.6.4 gives kernel panic Dec 4, 2023
@sfjro
Copy link
Owner

sfjro commented Dec 4, 2023 via email

@peabee
Copy link
Author

peabee commented Dec 4, 2023

CONFIG_FRAME_POINTER=y
CONFIG_HAVE_RELIABLE_STACKTRACE is not set
CONFIG_STACKTRACE=y

@sfjro
Copy link
Owner

sfjro commented Dec 4, 2023 via email

@peabee
Copy link
Author

peabee commented Dec 4, 2023

Hi JRO

I did boot with overlayfs instead of aufs (everything else identical) and the boot worked with no panic.....

Both 32-bit & 64-bit 6.6.4 kernels panic when aufs is active.

A comment from Porteus user Beny says:
Post#1942 by [beny] » 04 Dec 2023, 18:11
hi blaze the 6.6.4 kernel also with the kernel builder fail to add the devices to union, operation not permitted, but the build task is ok just for the record.

@roadie2
Copy link

roadie2 commented Dec 5, 2023

JRO,
The error I get is that directories can't be created in /mnt. The error is "makedir ........operation not permitted" It almost seems to be a permissions issue. I built a kernel using the kernel diff patch and 6.6 source files. I don't get a kernel panic, but I'm using a different initrd than peebee.

As mentioned, there are no errors with patching or compiling the kernel. As you said, most of the kernel diff file concerns drivers and I don't see what may be causing it, though I'm far from skilled in this.

@sfjro
Copy link
Owner

sfjro commented Dec 5, 2023 via email

@roadie2
Copy link

roadie2 commented Dec 6, 2023

JRO,

Apologies, the error I posted wasn't accurate, the error is :
mkdir: can't create directory '/union/' : Operation not permitted
I was not able to completely disable LSM in the kernel config, so resorted to having only apparmor. I've also tried variations of lsm= on the cmdline. It made no difference and repeated attempts with other options have not helped. Running ls -a shows that directory union is not present, yet running mkdir union gives an error that it already exists.

@fulalas
Copy link

fulalas commented Dec 6, 2023

I can confirm this issue. It seems the system fails to create /union for AUFS.

@sfjro
Copy link
Owner

sfjro commented Dec 6, 2023 via email

@roadie2
Copy link

roadie2 commented Dec 7, 2023

JRO,
It appears that the issue is caused by /fs/stat.c
The kernel-v6.6.4 is now booting well for me. I rather crudely replaced the stat.c file with one from kernel-v6.6.3 and it compiled without errors and is now booting.

Linux porteus.example.net 6.6.4-porteus #1 SMP Thu Dec 7 13:31:46 PST 2023 x86_64 AMD A10-9620P RADEON R5, 10 COMPUTE CORES 4C+6G AuthenticAMD GNU/Linux

quiet BOOT_IMAGE=/boot/syslinux/vmlinuz-6.6.4 from=/dev/sda2/porteus-xfce4-5.01 noauto mitigations=off norootcopy initrd=/boot/syslinux/initrd-5.01.zst

The relevant section begins at line 42299 of the 6.6.4.diff:

Removal of the " | AT_GETATTR_NOSEC" and "if (WARN_ON_ONCE(query_flags & AT_GETATTR_NOSEC))
return -EPERM; allows the kernel to boot.

@sfjro
Copy link
Owner

sfjro commented Dec 7, 2023 via email

@peabee
Copy link
Author

peabee commented Dec 8, 2023

Well done @roadie2 - confirmed 6.6.4 built with reverted fs/stat.c boots correctly.
Thanks a lot.
Will test aufs-6.6.4 when it appears - thanks @sfjro

@peabee peabee closed this as completed Dec 8, 2023
sfjro added a commit to sfjro/aufs-linux that referenced this issue Feb 11, 2024
Aufs simply follows the change in mainline,
	8a924db 2023-11-18 fs: Pass AT_GETATTR_NOSEC flag to getattr interface function

On github, roadie2 found the cause of some issues.

See-also: sfjro/aufs-standalone#32
See-also: sfjro/aufs-standalone#33
Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
sfjro added a commit to sfjro/aufs-linux that referenced this issue Feb 11, 2024
Aufs simply follows the change in mainline,
	8a924db 2023-11-18 fs: Pass AT_GETATTR_NOSEC flag to getattr interface function

On github, roadie2 found the cause of some issues.

See-also: sfjro/aufs-standalone#32
See-also: sfjro/aufs-standalone#33
Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
(cherry picked from commit aeafb3b)
@sfjro
Copy link
Owner

sfjro commented Feb 11, 2024 via email

@peabee
Copy link
Author

peabee commented Feb 12, 2024

Many thanks @sfjro - greatly appreciated ;-))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants