Closed MrDuartePT closed 7 months ago
Hi,
thanks for the report. Could you maybe bisect the patches? I also started a compilation with full lto and llvm 18 rc4 to see if this issue is present.
I'd suspect the bbr3 patch, but lets see.
On Arch we are currently not in rc3, so i can only test it right now in a docker container with our rc repos enabled.
Hi,
thanks for the report. Could you maybe bisect the patches?
I also started a compilation with full lto and llvm 18 rc4 to see if this issue is present.
I'd suspect the bbr3 patch, but lets see.
On Arch we are currently not in rc3, so i can only test it right now in a docker container with our rc repos enabled.
No problem I can update to rc4 I also we tried to bisect the patches.
Reverting the "cachy" patchset does fix the issue. https://github.com/CachyOS/kernel-patches/blob/master/6.7/0004-cachy.patch
Ill try fruther to bisect it.
Here is the branch of the commits in the "cachy" patchset: https://github.com/CachyOS/linux/commits/6.7/cachy/
I maybe suspect, that this comes from -march=xyz, but still on bisecting.
Just to be sure the patch applied by all is only the ones in the main 6.7 folder right? I gonna try to applied everthing execpt Cachy one!
I compiling the kernel without 0004-cachy.patch let see if dosen't fail on LLVM 18-rc3 but it shouldn't
Narrowed it down to these commits:
.rw-r--r-- 17k ptr1337 28 Feb 20:05 0001-Revert-Cachy-Makefile-Move-ARM-and-x86-instruction-s.patch
.rw-r--r-- 25k ptr1337 28 Feb 20:05 0002-Revert-Cachy-Additional-CPU-Optimization-Options.patch
.rw-r--r-- 185k ptr1337 28 Feb 20:05 0003-Revert-Cachy-Add-legion-laptop-v0.0.9.patch
.rw-r--r-- 4,4k ptr1337 28 Feb 20:05 0004-Revert-Cachy-Add-ACS-override-support.patch
.rw-r--r-- 18k ptr1337 28 Feb 20:05 0005-Revert-Cachy-Add-OpenRGB-patches.patch
Narrowed it down to these commits:
.rw-r--r-- 17k ptr1337 28 Feb 20:05 0001-Revert-Cachy-Makefile-Move-ARM-and-x86-instruction-s.patch .rw-r--r-- 25k ptr1337 28 Feb 20:05 0002-Revert-Cachy-Additional-CPU-Optimization-Options.patch .rw-r--r-- 185k ptr1337 28 Feb 20:05 0003-Revert-Cachy-Add-legion-laptop-v0.0.9.patch .rw-r--r-- 4,4k ptr1337 28 Feb 20:05 0004-Revert-Cachy-Add-ACS-override-support.patch .rw-r--r-- 18k ptr1337 28 Feb 20:05 0005-Revert-Cachy-Add-OpenRGB-patches.patch
I dont think legion-laptop is the culprint since the kernel module compile fine in LLVM-18 with LTO
Narrowed it down to these commits:
.rw-r--r-- 17k ptr1337 28 Feb 20:05 0001-Revert-Cachy-Makefile-Move-ARM-and-x86-instruction-s.patch .rw-r--r-- 25k ptr1337 28 Feb 20:05 0002-Revert-Cachy-Additional-CPU-Optimization-Options.patch .rw-r--r-- 185k ptr1337 28 Feb 20:05 0003-Revert-Cachy-Add-legion-laptop-v0.0.9.patch .rw-r--r-- 4,4k ptr1337 28 Feb 20:05 0004-Revert-Cachy-Add-ACS-override-support.patch .rw-r--r-- 18k ptr1337 28 Feb 20:05 0005-Revert-Cachy-Add-OpenRGB-patches.patch
I dont think legion-laptop is the culprint since the kernel module compile fine in LLVM-18 with LTO
Personally I suspect the Additonal CPU Opt and Makefile Patch. Did you change the config to use a different MARCH? Im not sure, how the gentoo ebuild is setuped currently.
You can share that patches to help testing?!
You can share that patches to help testing?!
There you go. I do right now a compilation with the 0001 and 0002 revert. Archive.tar.gz
Narrowed it down to these commits:
.rw-r--r-- 17k ptr1337 28 Feb 20:05 0001-Revert-Cachy-Makefile-Move-ARM-and-x86-instruction-s.patch .rw-r--r-- 25k ptr1337 28 Feb 20:05 0002-Revert-Cachy-Additional-CPU-Optimization-Options.patch .rw-r--r-- 185k ptr1337 28 Feb 20:05 0003-Revert-Cachy-Add-legion-laptop-v0.0.9.patch .rw-r--r-- 4,4k ptr1337 28 Feb 20:05 0004-Revert-Cachy-Add-ACS-override-support.patch .rw-r--r-- 18k ptr1337 28 Feb 20:05 0005-Revert-Cachy-Add-OpenRGB-patches.patch
I dont think legion-laptop is the culprint since the kernel module compile fine in LLVM-18 with LTO
Personally I suspect the Additonal CPU Opt and Makefile Patch. Did you change the config to use a different MARCH? Im not sure, how the gentoo ebuild is setuped currently.
I using march=native for my build, since I have a AMD Ryzen 7 5800H (Zen3) that will be:
-march=znver3 -mno-pku -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=512
I was also specify Amd Zen3 in the CPU optimization in the kernel
@MrDuartePT Does it get apply via KCFLAGS or the Kernel config?
@MrDuartePT Does it get apply via KCFLAGS or the Kernel config?
Yes it gets. And even if dosent when I use your Cachy patch it would get because of CONFIG_MZEN3=y
Ok LD didn't fail without Cachy patch. I gonna try the revert also.
Trying without 0001-Revert-Cachy-Makefile-Move-ARM-and-x86-instruction-s.patch
.rw-r--r-- 17k ptr1337 28 Feb 20:05 0001-Revert-Cachy-Makefile-Move-ARM-and-x86-instruction-s.patch .rw-r--r-- 25k ptr1337 28 Feb 20:05 0002-Revert-Cachy-Additional-CPU-Optimization-Options.patch
.rw-r--r-- 17k ptr1337 28 Feb 20:05 0001-Revert-Cachy-Makefile-Move-ARM-and-x86-instruction-s.patch
.rw-r--r-- 25k ptr1337 28 Feb 20:05 0002-Revert-Cachy-Additional-CPU-Optimization-Options.patch
compiled also, not much left :D
Yup let see with only 0001 reverted, mine is talking a bit a compiling kwin also :D
Yup let see with only 0001 reverted, mine is talking a bit a compiling kwin also :D
At me it will also take a while, the buildserver is compiling now 2x firefox-developer-edition :x
Trying without 0001-Revert-Cachy-Makefile-Move-ARM-and-x86-instruction-s.patch
Only reverting this the linking fail. Lets see only reverting:
.rw-r--r-- 25k ptr1337 28 Feb 20:05 0002-Revert-Cachy-Additional-CPU-Optimization-Options.patch
Trying without 0001-Revert-Cachy-Makefile-Move-ARM-and-x86-instruction-s.patch
Only reverting this the linking fail. Lets see only reverting:
.rw-r--r-- 25k ptr1337 28 Feb 20:05 0002-Revert-Cachy-Additional-CPU-Optimization-Options.patch
I think this is an LLVM issue then. Also were able to reproduce it with only that revert.
@MrDuartePT I will try a compilation with the upstream cpu march patch from graysky, and will come back as soon i know if its also causing that. Otherwise I would suggest to forward this to the lld/llvm developers.
Trying without 0001-Revert-Cachy-Makefile-Move-ARM-and-x86-instruction-s.patch
Only reverting this the linking fail. Lets see only reverting:
.rw-r--r-- 25k ptr1337 28 Feb 20:05 0002-Revert-Cachy-Additional-CPU-Optimization-Options.patch
I think this is an LLVM issue then. Also were able to reproduce it with only that revert.
Well it dosen't seem to have failed on my side with 0002 revert but I gonna retry it with a fresh copy of the kernel to be sure
Alright, it appears to be https://github.com/graysky2/kernel_compiler_patch/blob/master/more-uarches-for-kernel-6.1.79-6.8-rc3.patch , which is the same as https://github.com/CachyOS/linux/commit/6ec793e12dee914d26761bec11cbdb6df4a9ea1e
Ill also write into the Issue from llvm
Trying without 0001-Revert-Cachy-Makefile-Move-ARM-and-x86-instruction-s.patch
Only reverting this the linking fail. Lets see only reverting:
.rw-r--r-- 25k ptr1337 28 Feb 20:05 0002-Revert-Cachy-Additional-CPU-Optimization-Options.patch
I think this is an LLVM issue then. Also were able to reproduce it with only that revert.
Well it dosen't seem to have failed on my side with 0002 revert but I gonna retry it with a fresh copy of the kernel to be sure
Well with 0002 reverted work fine so problematic commit is this one: https://github.com/CachyOS/linux/commit/6ec793e12dee914d26761bec11cbdb6df4a9ea1e
Yes, I have also commented about our findings. Im trying now an additonal compilation with ThinLTO and Clang without LTO, to see if it is also affected.
Ok I can also try later just gonna wait to plasma-desktop to finish compiling
FYI, ThinLTO and no LTO + Clang also fail (+march=znver4). Without LTO it does crash way earlier. Will add Logs from no LTO + Clang to llvm
@MrDuartePT Which CPU March do you set? Zen4?
Just adding KCFLAGS makes it possible to reproduce the issue:
export KCFLAGS=' -march=znver4 -mtune=znver4'
export KCPPFLAGS=' -march=znver4 -mtune=znver4'
upstream issue. Closing here.
Using your latest patches in the latest stable (6.7.6) and 6.7.5 when using ld.lld as the linker. vmzlinux fails:
If you need more info you also have this issue: https://github.com/llvm/llvm-project/issues/82896