Frogging-Family / linux-tkg

linux-tkg custom kernels
GNU General Public License v2.0
1.33k stars 167 forks source link

6.3.6-273-tkg-cfs -- SIDT instruction cannot be used by applications -- Diablo 4 steam #754

Closed ryanmusante closed 1 year ago

ryanmusante commented 1 year ago

Diablo 4 spams dmesg with SIDT message constantly, what is the significance? Can it be addressed?

dmesg:

[Jun 8 20:21] umip: Diablo IV.exe[19947] ip:2002156a sp:3137e8b8: SIDT instruction cannot be used by applications.
[  +0.000004] umip: Diablo IV.exe[19947] ip:2002156a sp:3137e8b8: For now, expensive software emulation returns the result.
[Jun 8 20:28] umip: Diablo IV.exe[19947] ip:2014156a sp:3137e8b8: SIDT instruction cannot be used by applications.
[  +0.000005] umip: Diablo IV.exe[19947] ip:2014156a sp:3137e8b8: For now, expensive software emulation returns the result.

System Info:

~ > neofetch --ascii_distro manjaro_small     
||||||||| ||||   ryan@xmg 
||||||||| ||||   -------- 
||||      ||||   OS: Manjaro Linux x86_64 
|||| |||| ||||   Host: NB01 PC5x_7xHP_HR_HS 
|||| |||| ||||   Kernel: 6.3.6-273-tkg-cfs 
|||| |||| ||||   Uptime: 2 hours, 41 mins 
|||| |||| ||||   Packages: 1452 (pacman) 
                 Shell: zsh 5.9 
                 Resolution: 3840x2160 
                 DE: GNOME 44.2 
                 WM: Mutter 
                 WM Theme: Adwaita 
                 Theme: adw-gtk3-dark [GTK2/3] 
                 Icons: ePapirus-Dark [GTK2/3] 
                 Terminal: kitty 
                 Terminal Font: Hack Regular 12.0 
                 CPU: 11th Gen Intel i7-11800H (16) @ 4.600GHz 
                 GPU: NVIDIA GeForce RTX 3080 Mobile / Max-Q 8GB/16GB 
                 GPU: Intel TigerLake-H GT1 [UHD Graphics] 
                 Memory: 6144MiB / 64083MiB 

Link below has some explanation of SIDT and umip:

> * User-Mode Instruction Prevention is a security feature present in recent
>  * x86 processors that, when enabled, prevents a group of instructions (SGDT,
>  * SIDT, SLDT, SMSW and STR) from being run in user mode by issuing a general
>  * protection fault if the instruction is executed with CPL > 0.

https://elixir.bootlin.com/linux/latest/source/arch/x86/kernel/umip.c

And LWN article: https://lwn.net/Articles/705877/

openglfreak commented 1 year ago

add clearcpuid=514 to the kernel command line

ryanmusante commented 1 year ago

Thanks! That did it!

~ > journalctl -b 0 | grep umip      
Jun 08 21:43:58 xmg kernel: Clearing CPUID bits: umip