Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Invalid opcode on boot , kernel upgrade from 6.1.x to 6.6.x
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
kioto
n00b
n00b


Joined: 29 Mar 2024
Posts: 3

PostPosted: Fri Mar 29, 2024 5:32 pm    Post subject: Invalid opcode on boot , kernel upgrade from 6.1.x to 6.6.x Reply with quote

kernel with enabled Thinlto and CFI

emerge --info http://0x0.st/XzzS.txt

config-6.1.74 - https://0x0.st/Xzzq.1.74 - boot and works
config-6.6.21 - https://0x0.st/Xzzb.6.21 - no boot , invalid opcode

syslog boot gentoo-kernel-6.6.21 (Invalid opcode)
Code:

Mar 29 18:28:51 gentoo kernel: LoadPin: kernel-module pinned obj="/lib/modules/6.6.21/kernel/drivers/platform/x86/wmi.ko" pid=624 cmdline="(udev-worker)"
Mar 29 18:28:51 gentoo kernel: r8169 0000:04:00.0 enp4s0: renamed from eth0
Mar 29 18:28:51 gentoo kernel: it87: Found IT8718F chip at 0x290, revision 4
Mar 29 18:28:51 gentoo kernel: it87: Beeping is supported
Mar 29 18:28:51 gentoo kernel: [drm] radeon kernel modesetting enabled.
Mar 29 18:28:51 gentoo kernel: radeon 0000:01:00.0: vgaarb: deactivate vga console
Mar 29 18:28:51 gentoo kernel: Console: switching to colour dummy device 80x25
Mar 29 18:28:51 gentoo kernel: [drm] initializing kernel modesetting (RV730 0x1002:0x9498 0x174B:0x9498 0x00).
Mar 29 18:28:51 gentoo kernel: ATOM BIOS:
Mar 29 18:28:51 gentoo kernel: radeon 0000:01:00.0: VRAM: 512M 0x0000000000000000 - 0x000000001FFFFFFF (512M used)
Mar 29 18:28:51 gentoo kernel: radeon 0000:01:00.0: GTT: 1024M 0x0000000020000000 - 0x000000005FFFFFFF
Mar 29 18:28:51 gentoo kernel: [drm] Detected VRAM RAM=512M, BAR=256M
Mar 29 18:28:51 gentoo kernel: [drm] RAM width 64bits DDR
Mar 29 18:28:51 gentoo kernel: [drm] radeon: 512M of VRAM memory ready
Mar 29 18:28:51 gentoo kernel: [drm] radeon: 1024M of GTT memory ready.
Mar 29 18:28:51 gentoo kernel: [drm] Loading RV730 Microcode
Mar 29 18:28:51 gentoo kernel: Loading firmware: radeon/RV730_pfp.bin
Mar 29 18:28:51 gentoo kernel: Loading firmware: radeon/RV730_me.bin
Mar 29 18:28:51 gentoo kernel: Loading firmware: radeon/R700_rlc.bin
Mar 29 18:28:51 gentoo kernel: Loading firmware: radeon/RV730_smc.bin
Mar 29 18:28:51 gentoo kernel: [drm] Internal thermal controller with fan control
Mar 29 18:28:51 gentoo kernel: invalid opcode: 0000 [#1] PREEMPT SMP PTI
Mar 29 18:28:51 gentoo kernel: CPU: 0 PID: 624 Comm: (udev-worker) Tainted: G          I        6.6.21 #1
Mar 29 18:28:51 gentoo kernel: Hardware name: Gigabyte Technology Co., Ltd. P35-DS3L/P35-DS3L, BIOS F9 06/19/2009
Mar 29 18:28:51 gentoo kernel: RIP: 0010:0xffffffffc02dca7b
Mar 29 18:28:51 gentoo kernel: Code: 02 7c 09 48 8b 7c 37 08 83 4f 28 01 48 8b bb 98 1e 00 00 83 7c 37 40 02 7c ca 48 8b 7c 37 38 83 4f 28 01 eb bf e8 85 7c 70 e3 <67> 0f b9 40 12 48 c7 c7 3f e1 3e c0 e8 84 6f 19 e3 48 c7 c7 dc 5e
Mar 29 18:28:51 gentoo kernel: RSP: 0018:ffffb970c0aa7938 EFLAGS: 00010202
Mar 29 18:28:51 gentoo kernel: RAX: ffffa2a6411dfb01 RBX: ffffa2a68d83c000 RCX: c9bb98fcde1df200
Mar 29 18:28:51 gentoo kernel: RDX: ffffa2a6411dfb40 RSI: ffffa2a6411dfb40 RDI: 0000000000000000
Mar 29 18:28:51 gentoo kernel: RBP: 0000000000000008 R08: 000000000000c350 R09: 0000000000000000
Mar 29 18:28:51 gentoo kernel: R10: ffffa2a6411dfb40 R11: 0000000000000004 R12: ffffa2a70244ae14
Mar 29 18:28:51 gentoo kernel: R13: 0000000000000000 R14: ffffa2a70244ae14 R15: 0000000000000000
Mar 29 18:28:51 gentoo kernel: FS:  00007f5020154c40(0000) GS:ffffa2a757c00000(0000) knlGS:0000000000000000
Mar 29 18:28:51 gentoo kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Mar 29 18:28:51 gentoo kernel: CR2: 00007f9f0f96ac50 CR3: 00000002149a2000 CR4: 00000000000406f0
Mar 29 18:28:51 gentoo kernel: Call Trace:
Mar 29 18:28:51 gentoo kernel:  <TASK>
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa307b96f
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa307ba6f
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa3079bfc
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffc02dca7b
Mar 29 18:28:51 gentoo last message buffered 1 times
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa3079a04
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffc02dca7b
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa39e0aa8
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa3a0125a
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffc02dca7b
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffc02dbd14
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa367ae14
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa367c8de
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffc0329159
Mar 29 18:28:51 gentoo kernel:  0xffffffffc033c89e
Mar 29 18:28:51 gentoo kernel:  0xffffffffc0332c19
Mar 29 18:28:51 gentoo kernel:  0xffffffffc02d538a
Mar 29 18:28:51 gentoo kernel:  0xffffffffc02d6fc9
Mar 29 18:28:51 gentoo kernel:  0xffffffffa360e990
Mar 29 18:28:51 gentoo kernel:  0xffffffffc02d317a
Mar 29 18:28:51 gentoo kernel:  0xffffffffa34c1c37
Mar 29 18:28:51 gentoo kernel:  0xffffffffa3665ef2
Mar 29 18:28:51 gentoo kernel:  0xffffffffa3664fe7
Mar 29 18:28:51 gentoo kernel:  0xffffffffa3665bed
Mar 29 18:28:51 gentoo kernel:  0xffffffffa3665213
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa36650f0
Mar 29 18:28:51 gentoo kernel:  0xffffffffa3661b72
Mar 29 18:28:51 gentoo kernel:  0xffffffffa3662534
Mar 29 18:28:51 gentoo kernel:  0xffffffffa3666af2
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffc02b3010
Mar 29 18:28:51 gentoo kernel:  0xffffffffa3054049
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa324fc2b
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa32d0e91
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa314cf39
Mar 29 18:28:51 gentoo kernel:  0xffffffffa31503b5
Mar 29 18:28:51 gentoo kernel:  0xffffffffa314cf39
Mar 29 18:28:51 gentoo kernel:  0xffffffffa39e0899
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa39e4a22
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa3283179
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa39e08a8
Mar 29 18:28:51 gentoo last message buffered 1 times
Mar 29 18:28:51 gentoo kernel:  ? 0xffffffffa30ccf27
Mar 29 18:28:51 gentoo kernel:  0xffffffffa3a000ea
Mar 29 18:28:51 gentoo kernel: RIP: 0033:0x00007f50203815fd
Mar 29 18:28:51 gentoo kernel: Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 03 88 0c 00 f7 d8 64 89 01 48
Mar 29 18:28:51 gentoo kernel: RSP: 002b:00007ffe7a231068 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
Mar 29 18:28:51 gentoo kernel: RAX: ffffffffffffffda RBX: 000055c8f36c7270 RCX: 00007f50203815fd
Mar 29 18:28:51 gentoo kernel: RDX: 0000000000000000 RSI: 00007f5020466667 RDI: 0000000000000013
Mar 29 18:28:51 gentoo kernel: RBP: 000055c8f36c3c40 R08: 0000000000000001 R09: 0000000000000000
Mar 29 18:28:51 gentoo kernel: R10: 0000000000000050 R11: 0000000000000246 R12: 0000000000020000
Mar 29 18:28:51 gentoo kernel: R13: 00000000fffffffe R14: 000055c8f36c9990 R15: 00007f5020466667
Mar 29 18:28:51 gentoo kernel:  </TASK>
Mar 29 18:28:51 gentoo kernel: Modules linked in: radeon(+) drm_suballoc_helper drm_ttm_helper sha512_ssse3 it87 ttm sha256_ssse3 hwmon_vid i2c_algo_bit sha1_ssse3 drm_display_helper cec video wmi
Mar 29 18:28:51 gentoo kernel: ---[ end trace 0000000000000000 ]---


loading from module_blacklist=radeon

package.env
Code:
sys-kernel/gentoo-kernel llvm-kernel


cat /etc/portage/env/llvm-kernel
Code:
LLVM=1 LLVM_IAS=1 CC=clang CXX=clang++ LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar HOSTLD=ld.lld OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump


lsmod from gentoo-kernel-bin-6.6.21 - http://0x0.st/Xzzv.txt

similar bug
https://bugs.gentoo.org/show_bug.cgi?id=925909

Sorry for bad english
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22657

PostPosted: Fri Mar 29, 2024 6:24 pm    Post subject: Reply with quote

Welcome to the Gentoo forums.

If you build the same configuration for v6.6.21, but disable ThinLTO and disable CFI, does the error appear? This would help to rule out a compiler bug.

The disassembled code looks quite simple, so I think that it is strange that this would fail.
Code:
   0:   48 3d 01 f0 ff ff       cmpq   $0xfffffffffffff001,%rax
   6:   73 01                   jae    9 <a+0x9>
   8:   c3                      retq
Back to top
View user's profile Send private message
kioto
n00b
n00b


Joined: 29 Mar 2024
Posts: 3

PostPosted: Sat Mar 30, 2024 12:35 pm    Post subject: Reply with quote

Hu wrote:
but disable ThinLTO and disable CFI, does the error appear? This would help to rule out a compiler bug.

rebuilt the kernel with
Code:
CONFIG_LTO_NONE=y
# CONFIG_LTO_CLANG_THIN is not set
# CONFIG_CFI_CLANG is not set

also invalid opcode

note that the kernel is loading from module_blacklist=radeon

also new enabled values in the kernel 6.6.21 compared to 6.1.74 (maybe some of this has an effect)
Code:
CONFIG_CACHESTAT_SYSCALL=y
CONFIG_FB_DEVICE=y
CONFIG_HID_SUPPORT=y
CONFIG_I2C_HID=y
CONFIG_LEGACY_TIOCSTI is not set
CONFIG_RANDOM_KMALLOC_CACHES=y
CONFIG_X86_USER_SHADOW_STACK=y
CONFIG_DEBUG_PREEMPT is not set
CONFIG_DRM_ACCEL is not set
CONFIG_SLUB_TINY is not set

according to recommendations
https://forums.gentoo.org/viewtopic-t-1112778.html

P.S.
Please help, I haven’t been able to solve this problem for two months now, I’ve rebuilt the kernel several times since 6.6.13, including from gentoo-sources code and using GCC (even monolithic).
Kernel 6.6 is loaded only if the Radeon module is blacklisted.
Back to top
View user's profile Send private message
kioto
n00b
n00b


Joined: 29 Mar 2024
Posts: 3

PostPosted: Tue Apr 02, 2024 11:46 am    Post subject: Reply with quote

Looks like I found a bug
https://gitlab.freedesktop.org/drm/amd/-/issues/3235
https://bugs.gentoo.org/925861
for now built the kernel 6.1.81 - everything is working
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum