Skip to content

Instantly share code, notes, and snippets.

View MaskRay's full-sized avatar
🏠
Working from home. Need food

Fangrui Song MaskRay

🏠
Working from home. Need food
View GitHub Profile
@MaskRay
MaskRay / iwlwifi-bug.md
Created July 15, 2025 05:02
iwlwifi bug report, Intel Wi-Fi 7 BE200

Intel(R) Wi-Fi 7 BE200 320MHz, kernel warning and freeze

When I run sudo iwctl station wlan0 connect wifiname for the first time during a boot, iwctl would error

No matching method found
Failed to retrieve IWD dbus objects, quitting...
@MaskRay
MaskRay / journalctl-b.log
Last active July 15, 2025 04:47
Eurocom Blitz Ultra 2, Ubuntu 24.04, no system freeze
Jul 14 18:20:35 blitz kernel: Linux version 6.11.0-29-generic (buildd@lcy02-amd64-008) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #29~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jun 26 14:16:59 UTC 2 (Ubuntu 6.11.0-29.29~24.04.1-generic 6.11.11)
Jul 14 18:20:35 blitz kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-6.11.0-29-generic root=UUID=bbe63c72-8360-4612-996c-1f26ef0ef727 ro quiet splash vt.handoff=7
Jul 14 18:20:35 blitz kernel: KERNEL supported cpus:
Jul 14 18:20:35 blitz kernel: Intel GenuineIntel
Jul 14 18:20:35 blitz kernel: AMD AuthenticAMD
Jul 14 18:20:35 blitz kernel: Hygon HygonGenuine
Jul 14 18:20:35 blitz kernel: Centaur CentaurHauls
Jul 14 18:20:35 blitz kernel: zhaoxin Shanghai
Jul 14 18:20:35 blitz kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warning on user-space split_locks
Jul 14 18:20:35 blitz kernel: BIOS-provided physical RAM map:
@MaskRay
MaskRay / journalctl-b.log
Created July 13, 2025 03:39
Eurocom Blitz Ultra 2, no kernel "bad"/"oops" record before freezing
Jul 12 16:53:19 hacking kernel: Linux version 6.15.6-arch1-1 (linux@archlinux) (gcc (GCC) 15.1.1 20250425, GNU ld (GNU Binutils) 2.44.0) #1 SMP PREEMPT_DYNAMIC Thu, 10 Jul 2025 17:10:18 +0000
Jul 12 16:53:19 hacking kernel: Command line: initrd=\intel-ucode.img initrd=\initramfs-linux.img root=UUID=2403f944-7fdf-4185-8119-4f6fd8f7f887 rw intel_idle.max_cstate=2
Jul 12 16:53:19 hacking kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warning on user-space split_locks
Jul 12 16:53:19 hacking kernel: BIOS-provided physical RAM map:
Jul 12 16:53:19 hacking kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
Jul 12 16:53:19 hacking kernel: BIOS-e820: [mem 0x000000000009f000-0x00000000000fffff] reserved
Jul 12 16:53:19 hacking kernel: BIOS-e820: [mem 0x0000000000100000-0x000000005df8afff] usable
Jul 12 16:53:19 hacking kernel: BIOS-e820: [mem 0x000000005df8b000-0x000000005e88afff] reserved
Jul 12 16:53:19 hacking kernel: BIOS-e820: [mem 0x000000005e88b000-0x0000
@MaskRay
MaskRay / journalctl-b.log
Created July 12, 2025 22:41
Eurocom Ultra Blitz 2 freeze 15:25 kernel log, 15:33 freeze
Jul 12 15:12:14 hacking kernel: Linux version 6.15.6-arch1-1 (linux@archlinux) (gcc (GCC) 15.1.1 20250425, GNU ld (GNU Binutils) 2.44.0) #1 SMP PREEMPT_DYNAMIC Thu, 10 Jul 2025 17:10:18 +0000
Jul 12 15:12:14 hacking kernel: Command line: initrd=\intel-ucode.img initrd=\initramfs-linux.img root=UUID=2403f944-7fdf-4185-8119-4f6fd8f7f887 rw intel_idle.max_cstate=2
Jul 12 15:12:14 hacking kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warning on user-space split_locks
Jul 12 15:12:14 hacking kernel: BIOS-provided physical RAM map:
Jul 12 15:12:14 hacking kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
Jul 12 15:12:14 hacking kernel: BIOS-e820: [mem 0x000000000009f000-0x00000000000fffff] reserved
Jul 12 15:12:14 hacking kernel: BIOS-e820: [mem 0x0000000000100000-0x000000005df8afff] usable
Jul 12 15:12:14 hacking kernel: BIOS-e820: [mem 0x000000005df8b000-0x000000005e88afff] reserved
Jul 12 15:12:14 hacking kernel: BIOS-e820: [mem 0x000000005e88b000-0x0000
@MaskRay
MaskRay / journalctl-b.log
Created July 12, 2025 22:39
Eurocom Blitz Ultra 2 freeze
Jul 12 15:34:14 hacking kernel: Linux version 6.15.6-arch1-1 (linux@archlinux) (gcc (GCC) 15.1.1 20250425, GNU ld (GNU Binutils) 2.44.0) #1 SMP PREEMPT_DYNAMIC Thu, 10 Jul 2025 17:10:18 +0000
Jul 12 15:34:14 hacking kernel: Command line: initrd=\intel-ucode.img initrd=\initramfs-linux.img root=UUID=2403f944-7fdf-4185-8119-4f6fd8f7f887 rw intel_idle.max_cstate=2
Jul 12 15:34:14 hacking kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warning on user-space split_locks
Jul 12 15:34:14 hacking kernel: BIOS-provided physical RAM map:
Jul 12 15:34:14 hacking kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
Jul 12 15:34:14 hacking kernel: BIOS-e820: [mem 0x000000000009f000-0x00000000000fffff] reserved
Jul 12 15:34:14 hacking kernel: BIOS-e820: [mem 0x0000000000100000-0x000000005df8afff] usable
Jul 12 15:34:14 hacking kernel: BIOS-e820: [mem 0x000000005df8b000-0x000000005e88afff] reserved
Jul 12 15:34:14 hacking kernel: BIOS-e820: [mem 0x000000005e88b000-0x0000
@MaskRay
MaskRay / journalctl-b.log
Created July 12, 2025 06:42
Eurocom Blitz Ultra 2, Arch Linux, Oops: general protection fault, probably for non-canonical address
Jul 11 21:37:24 hacking kernel: Linux version 6.15.6-arch1-1 (linux@archlinux) (gcc (GCC) 15.1.1 20250425, GNU ld (GNU Binutils) 2.44.0) #1 SMP PREEMPT_DYNAMIC Thu, 10 Jul 2025 17:10:18 +0000
Jul 11 21:37:24 hacking kernel: Command line: initrd=\intel-ucode.img initrd=\initramfs-linux.img root=UUID=2403f944-7fdf-4185-8119-4f6fd8f7f887 rw intel_idle.max_cstate=2
Jul 11 21:37:24 hacking kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warning on user-space split_locks
Jul 11 21:37:24 hacking kernel: BIOS-provided physical RAM map:
Jul 11 21:37:24 hacking kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
Jul 11 21:37:24 hacking kernel: BIOS-e820: [mem 0x000000000009f000-0x00000000000fffff] reserved
Jul 11 21:37:24 hacking kernel: BIOS-e820: [mem 0x0000000000100000-0x000000005df8afff] usable
Jul 11 21:37:24 hacking kernel: BIOS-e820: [mem 0x000000005df8b000-0x000000005e88afff] reserved
Jul 11 21:37:24 hacking kernel: BIOS-e820: [mem 0x000000005e88b000-0x0000
@MaskRay
MaskRay / README.md
Created June 5, 2025 06:21
Debug ld.lld's spurious "address assignment did not converge" error

llvm/llvm-project#113838 "[RISCV] ld.lld: error: relaxation not converged with openssl"

ld.lld @response.txt --noinhibit-exec -o out.30
S=1 ld.lld @response.txt --noinhibit-exec -o out.31
@MaskRay
MaskRay / fix.py
Created November 16, 2024 20:14
lld/ELF: replace log(...) with `Log(ctx) << `
#!/usr/bin/env python
import os, re, sys
from ipdb import set_trace as bp
X = 'log'
Y = 'Log'
def update(lines):
ret = []
s = 0
@MaskRay
MaskRay / arm.log
Last active August 14, 2024 06:50
.macro argument parsing in the Linux kernel
linux/arch/arm/mach-rockchip/sleep.S:20:23: error: too many positional arguments
setmode 0x00000080 | 0x00000040 | 0x00000013, r1 @ set svc, irqs off
^
make[5]: *** [linux/scripts/Makefile.build:362: arch/arm/mach-rockchip/sleep.o] Error 1
make[5]: Target 'arch/arm/mach-rockchip/' not remade because of errors.
make[4]: *** [linux/scripts/Makefile.build:485: arch/arm/mach-rockchip] Error 2
linux/arch/arm/mach-tegra/sleep.S:127:23: error: too many positional arguments
mov32 r2, 0x50040000 + 0x3000
^
linux/arch/arm/mach-tegra/reset-handler.S:95:23: error: too many positional arguments
@MaskRay
MaskRay / fdpic-no-plt.md
Created February 24, 2024 02:47
FDPIC -fno-plt
void f0(void);
void f1(void);
void f2(void);
void g() { f0(); f1(); f2(); }
g:
  push    {r4, lr}
  mov     r4, r9
  bl      f(PLT)
 mov r9, r4