It’s on Arch Linux with stock kernel 5.18.3. It doesn’t matter if driver is loaded after system boot or during boot.
On 510.68.02 everything worked fine.
nvidia-bug-report.sh script never finishes, I attached partial output.
nvidia-bug-report.log.gz (766.7 KB)
Relevant dmesg output:
[ 7755.567880] nvidia 0000:14:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[ 7755.698996] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 515.48.07 Fri May 27 03:18:00 UTC 2022
[ 7755.700096] [drm] [nvidia-drm] [GPU ID 0x00001400] Loading driver
[ 7756.351783] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:14:00.0 on minor 1
[ 7756.362363] nvidia_uvm: module uses symbols from proprietary module nvidia, inheriting taint.
[ 7756.370912] nvidia-uvm: Loaded the UVM driver, major device number 503.
[ 7768.396285] nvidia-modeset: ERROR: GPU:0: Display engine push buffer channel allocation failed: 0x65 (Call timed out [NV_ERR_TIMEOUT])
[ 7768.410230] nvidia-modeset: ERROR: GPU:0: Failed to allocate display engine core DMA push buffer
[ 7784.451875] BUG: kernel NULL pointer dereference, address: 0000000000000070
[ 7784.451880] #PF: supervisor read access in kernel mode
[ 7784.451881] #PF: error_code(0x0000) - not-present page
[ 7784.451882] PGD 0 P4D 0
[ 7784.451884] Oops: 0000 [#1] PREEMPT SMP NOPTI
[ 7784.451886] CPU: 8 PID: 123052 Comm: Xorg Tainted: P W OE 5.18.3-arch1-1 #1 2090c6f1d9d20f39bd14c0acb6fa89ddb994d43f
[ 7784.451889] Hardware name: ASUS System Product Name/ROG CROSSHAIR VIII HERO (WI-FI), BIOS 4201 04/26/2022
[ 7784.451890] RIP: 0010:_nv002521kms+0x18/0x70 [nvidia_modeset]
[ 7784.451913] Code: ff c6 44 24 2f 01 eb af 66 2e 0f 1f 84 00 00 00 00 00 41 54 55 49 89 fc 53 89 d5 41 b8 04 00 00 00 ba 02 01 02 00 48 83 ec 10 <8b> 46 70 8b 3d cf cd 0f 00 48 8d 4c 24 0c 89 ee 89 44 24 0c e8 bf
[ 7784.451915] RSP: 0018:ffffb78162cefc30 EFLAGS: 00010286
[ 7784.451916] RAX: 0000000000000000 RBX: 0000000020020000 RCX: 0000000000006c08
[ 7784.451918] RDX: 0000000000020102 RSI: 0000000000000000 RDI: ffff9f69a0fc7008
[ 7784.451919] RBP: 0000000000010009 R08: 0000000000000004 R09: 00000000fffffffe
[ 7784.451919] R10: 0000000000000000 R11: 0000000000000001 R12: ffff9f69a0fc7008
[ 7784.451921] R13: ffff9f69a0fc70a0 R14: 0000000000000fff R15: 0000000000010008
[ 7784.451922] FS: 00007fafe5f0e100(0000) GS:ffff9f6f2ec00000(0000) knlGS:0000000000000000
[ 7784.451923] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 7784.451924] CR2: 0000000000000070 CR3: 0000000a66862000 CR4: 0000000000350ee0
[ 7784.451926] Call Trace:
[ 7784.451927] <TASK>
[ 7784.451929] _nv002520kms+0xb3/0x150 [nvidia_modeset 658855af3f998e4c93b01ca095c666f654e238c7]
[ 7784.451948] _nv002294kms+0x4da/0x720 [nvidia_modeset 658855af3f998e4c93b01ca095c666f654e238c7]
[ 7784.451967] ? __check_object_size+0x143/0x160
[ 7784.451971] ? _nv000448kms+0xa0/0xa0 [nvidia_modeset 658855af3f998e4c93b01ca095c666f654e238c7]
[ 7784.451987] _nv000633kms+0x34/0x50 [nvidia_modeset 658855af3f998e4c93b01ca095c666f654e238c7]
[ 7784.452003] nvKmsIoctl+0x96/0x1d0 [nvidia_modeset 658855af3f998e4c93b01ca095c666f654e238c7]
[ 7784.452019] nvkms_ioctl+0x118/0x180 [nvidia_modeset 658855af3f998e4c93b01ca095c666f654e238c7]
[ 7784.452036] nvidia_frontend_unlocked_ioctl+0x3c/0x50 [nvidia cdb2ec842bb5797c80be4ec5b9ce9c833bd49f74]
[ 7784.452259] __x64_sys_ioctl+0x91/0xc0
[ 7784.452262] do_syscall_64+0x5f/0x90
[ 7784.452265] ? __x64_sys_ioctl+0x91/0xc0
[ 7784.452267] ? syscall_exit_to_user_mode+0x26/0x50
[ 7784.452268] ? do_syscall_64+0x6b/0x90
[ 7784.452270] ? nvidia_frontend_unlocked_ioctl+0x3c/0x50 [nvidia cdb2ec842bb5797c80be4ec5b9ce9c833bd49f74]
[ 7784.452479] ? __x64_sys_ioctl+0x91/0xc0
[ 7784.452481] ? syscall_exit_to_user_mode+0x26/0x50
[ 7784.452482] ? do_syscall_64+0x6b/0x90
[ 7784.452484] ? do_syscall_64+0x6b/0x90
[ 7784.452485] entry_SYSCALL_64_after_hwframe+0x44/0xae
[ 7784.452487] RIP: 0033:0x7fafe68727af
[ 7784.452489] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 18 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[ 7784.452490] RSP: 002b:00007fffacc80fb0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 7784.452492] RAX: ffffffffffffffda RBX: 00000000c0106d00 RCX: 00007fafe68727af
[ 7784.452493] RDX: 00007fffacc81010 RSI: 00000000c0106d00 RDI: 0000000000000012
[ 7784.452494] RBP: 00007fffacc81010 R08: 00007fffacc805a0 R09: 00007fffacc805bc
[ 7784.452495] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000012
[ 7784.452495] R13: 00007fffacc81060 R14: 0000558a47236530 R15: 00007fafe528e880
[ 7784.452497] </TASK>
[ 7784.452498] Modules linked in: nvidia_uvm(POE) nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) cdc_acm rfcomm snd_seq_dummy snd_hrtimer snd_seq overlay wireguard curve25519_x86_64 libchacha20poly1305 chacha_x86_64 poly1305_x86_64 libcurve25519_generic libchacha ip6_udp_tunnel udp_tunnel bridge stp llc nft_ct nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 cmac algif_hash algif_skcipher nf_tables af_alg nct6775 hwmon_vid nfnetlink bnep lm92 xfs sch_cake iwlmvm snd_hda_codec_realtek intel_rapl_msr vboxnetflt(OE) intel_rapl_common mac80211 snd_hda_codec_generic vboxnetadp(OE) libarc4 ledtrig_audio snd_hda_codec_hdmi snd_hda_intel edac_mce_amd btusb vboxdrv(OE) snd_intel_dspcfg snd_usb_audio btrtl snd_intel_sdw_acpi pkcs8_key_parser btbcm snd_usbmidi_lib iwlwifi snd_hda_codec btintel pktcdvd asus_ec_sensors i2c_dev uvcvideo kvm_amd btmtk snd_rawmidi eeepc_wmi iwlmei snd_hda_core videobuf2_vmalloc videobuf2_memops snd_seq_device bluetooth snd_hwdep videobuf2_v4l2 asus_wmi snd_pcm cfg80211
[ 7784.452531] videobuf2_common kvm sparse_keymap r8169 snd_timer videodev ecdh_generic realtek platform_profile igb sp5100_tco vfat snd joydev mdio_devres rfkill mousedev fat rapl mc video pcspkr wmi_bmof mxm_wmi k10temp i2c_piix4 soundcore crc16 libphy mei dca mac_hid pinctrl_amd acpi_cpufreq dm_multipath kvmfr(OE) ipmi_devintf ipmi_msghandler sg crypto_user fuse lzo_rle zram ip_tables x_tables btrfs blake2b_generic xor raid6_pq libcrc32c crc32c_generic dm_crypt cbc encrypted_keys trusted asn1_encoder tee hid_logitech_hidpp hid_logitech_dj dm_mod amdgpu drm_ttm_helper uas usb_storage ttm usbhid crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel tpm_crb crypto_simd gpu_sched nvme sr_mod cryptd tpm_tis ccp drm_dp_helper xhci_pci tpm_tis_core cdrom nvme_core xhci_pci_renesas tpm wmi rng_core vfio_pci vfio_pci_core irqbypass vfio_virqfd vfio_iommu_type1 vfio tcp_bbr
[ 7784.452571] CR2: 0000000000000070
[ 7784.452573] ---[ end trace 0000000000000000 ]---
[ 7784.452573] RIP: 0010:_nv002521kms+0x18/0x70 [nvidia_modeset]
[ 7784.452592] Code: ff c6 44 24 2f 01 eb af 66 2e 0f 1f 84 00 00 00 00 00 41 54 55 49 89 fc 53 89 d5 41 b8 04 00 00 00 ba 02 01 02 00 48 83 ec 10 <8b> 46 70 8b 3d cf cd 0f 00 48 8d 4c 24 0c 89 ee 89 44 24 0c e8 bf
[ 7784.452593] RSP: 0018:ffffb78162cefc30 EFLAGS: 00010286
[ 7784.452594] RAX: 0000000000000000 RBX: 0000000020020000 RCX: 0000000000006c08
[ 7784.452595] RDX: 0000000000020102 RSI: 0000000000000000 RDI: ffff9f69a0fc7008
[ 7784.452596] RBP: 0000000000010009 R08: 0000000000000004 R09: 00000000fffffffe
[ 7784.452596] R10: 0000000000000000 R11: 0000000000000001 R12: ffff9f69a0fc7008
[ 7784.452597] R13: ffff9f69a0fc70a0 R14: 0000000000000fff R15: 0000000000010008
[ 7784.452598] FS: 00007fafe5f0e100(0000) GS:ffff9f6f2ec00000(0000) knlGS:0000000000000000
[ 7784.452599] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 7784.452600] CR2: 0000000000000070 CR3: 0000000a66862000 CR4: 0000000000350ee0
Maybe you encountered this?
opened 07:12AM - 25 May 22 UTC
bug
NV-Triaged
### NVIDIA Open GPU Kernel Modules Version
515.43.04
### Does this happen with… the proprietary driver (of the same version) as well?
Yes
### Operating System and Version
Arch Linux
### Kernel Release
5.18.0-arch1-1
### Hardware: GPU
RTX 3070 laptop (System 76 Oryx 8)
### Describe the bug
Since upgrading to Kernel 5.18, loading the nvidia driver (Or proprietary one) fails with the same kernel log:
```
[ 5.429675] nvidia-nvlink: Nvlink Core is being initialized, major device number 510
[ 5.429718] traps: Missing ENDBR: _portMemAllocatorAllocNonPagedWrapper+0x0/0x10 [nvidia]
[ 5.429816] ------------[ cut here ]------------
[ 5.429817] kernel BUG at arch/x86/kernel/traps.c:252!
[ 5.429828] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
[ 5.429830] CPU: 9 PID: 948 Comm: modprobe Tainted: G OE 5.18.0-arch1-1 #1 b71a70fe104889aac2f32556bc52f649da2881d2
[ 5.429832] Hardware name: System76 Oryx Pro/Oryx Pro, BIOS 2021-09-23_b9b0e89 09/23/2021
[ 5.429833] RIP: 0010:exc_control_protection+0xc2/0xd0
[ 5.429837] Code: 8b 93 80 00 00 00 be f9 00 00 00 48 c7 c7 d3 ab 66 b5 e8 d1 01 50 ff e9 72 ff ff ff 48 c7 c7 ba ab 66 b5 e8 c7 31 fb ff 0f 0b <0f> 0b 66 66 2e 0f 1f 84 00 00 00 00 00 90 66 0f 1f 00 55 53 48 89
[ 5.429838] RSP: 0018:ffffa9c3413b3bb8 EFLAGS: 00010002
[ 5.429839] RAX: 000000000000004d RBX: ffffa9c3413b3bd8 RCX: 0000000000000027
[ 5.429840] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff9d195fa616a0
[ 5.429841] RBP: 0000000000000003 R08: 0000000000000000 R09: ffffa9c3413b39d8
[ 5.429842] R10: 0000000000000003 R11: ffffffffb5ecaa08 R12: 0000000000000000
[ 5.429842] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[ 5.429843] FS: 00007f0aa9bbe740(0000) GS:ffff9d195fa40000(0000) knlGS:0000000000000000
[ 5.429844] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 5.429845] CR2: 00007f0aa8382000 CR3: 00000001063ce002 CR4: 0000000000f70ee0
[ 5.429846] PKRU: 55555554
[ 5.429847] Call Trace:
[ 5.429848] <TASK>
[ 5.429849] asm_exc_control_protection+0x22/0x30
[ 5.429852] RIP: 0010:_portMemAllocatorAllocNonPagedWrapper+0x0/0x10 [nvidia]
[ 5.429920] Code: 08 48 89 d0 48 89 0f 48 c1 e0 17 48 31 c2 48 89 c8 48 c1 e8 05 48 31 c8 48 31 d0 48 c1 ea 12 48 31 d0 48 89 47 08 01 c8 c3 90 <48> 89 f7 e9 38 0f 00 00 0f 1f 84 00 00 00 00 00 48 89 f7 e9 88 0f
[ 5.429921] RSP: 0018:ffffa9c3413b3c80 EFLAGS: 00010202
[ 5.429922] RAX: ffffffffc1eae5f0 RBX: 0000000000000010 RCX: 0000000000000000
[ 5.429923] RDX: 0000000000000000 RSI: 000000000000002c RDI: ffffffffc20f7b70
[ 5.429923] RBP: ffffa9c3413b3c98 R08: 0000000000000020 R09: ffffffffc20f7bf0
[ 5.429924] R10: ffffffffc20f55d0 R11: 0000000000000000 R12: ffffffffc20f7b70
[ 5.429925] R13: 00007f0aa8382dc0 R14: 000055916224ef30 R15: ffffa9c3413b3e20
[ 5.429926] ? portCryptoPseudoRandomGeneratorGetU32+0x30/0x30 [nvidia 5737a4bc014c2c47af46ebdec30e9ee078e09f14]
[ 5.429991] _portMemAllocatorAlloc+0x2e/0x170 [nvidia 5737a4bc014c2c47af46ebdec30e9ee078e09f14]
[ 5.430054] portCryptoPseudoRandomGeneratorCreate+0x16/0xb0 [nvidia 5737a4bc014c2c47af46ebdec30e9ee078e09f14]
[ 5.430117] portCryptoInitialize+0x2a/0x40 [nvidia 5737a4bc014c2c47af46ebdec30e9ee078e09f14]
[ 5.430182] portInitialize+0x2b/0x40 [nvidia 5737a4bc014c2c47af46ebdec30e9ee078e09f14]
[ 5.430246] coreInitializeRm+0x24/0x90 [nvidia 5737a4bc014c2c47af46ebdec30e9ee078e09f14]
[ 5.430324] RmInitRm+0x9/0x20 [nvidia 5737a4bc014c2c47af46ebdec30e9ee078e09f14]
[ 5.430399] rm_init_rm+0x9/0x10 [nvidia 5737a4bc014c2c47af46ebdec30e9ee078e09f14]
[ 5.430472] nvidia_init_module+0x22e/0x5b0 [nvidia 5737a4bc014c2c47af46ebdec30e9ee078e09f14]
[ 5.430517] ? nvidia_init_module+0x5b0/0x5b0 [nvidia 5737a4bc014c2c47af46ebdec30e9ee078e09f14]
[ 5.430565] nvidia_frontend_init_module+0x50/0x91 [nvidia 5737a4bc014c2c47af46ebdec30e9ee078e09f14]
[ 5.430616] ? nvidia_init_module+0x5b0/0x5b0 [nvidia 5737a4bc014c2c47af46ebdec30e9ee078e09f14]
[ 5.430663] do_one_initcall+0x5a/0x220
[ 5.430667] do_init_module+0x4a/0x240
[ 5.430670] __do_sys_init_module+0x138/0x1b0
[ 5.430672] do_syscall_64+0x5c/0x90
[ 5.430674] ? exc_page_fault+0x74/0x170
[ 5.430676] entry_SYSCALL_64_after_hwframe+0x44/0xae
[ 5.430677] RIP: 0033:0x7f0aa9512c3e
[ 5.430679] Code: 48 8b 0d 5d b1 0e 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 2a b1 0e 00 f7 d8 64 89 01 48
[ 5.430680] RSP: 002b:00007fff39f3cc58 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
[ 5.430681] RAX: ffffffffffffffda RBX: 000055916224ebd0 RCX: 00007f0aa9512c3e
[ 5.430682] RDX: 000055916224ef30 RSI: 00000000008f1db0 RDI: 00007f0aa7a91010
[ 5.430682] RBP: 00007f0aa7a91010 R08: 000055916224eae0 R09: 0000000000000000
[ 5.430683] R10: 0000000000000005 R11: 0000000000000246 R12: 000055916224ef30
[ 5.430684] R13: 000055916224ed00 R14: 000055916224ebd0 R15: 000055916224ef60
[ 5.430685] </TASK>
[ 5.430685] Modules linked in: pcc_cpufreq(-) nvidia(OE+) acpi_cpufreq(-) bnep bridge stp llc btusb btrtl btbcm btintel uvcvideo btmtk videobuf2_vmalloc bluetooth videobuf2_memops videobuf2_v4l2 videobuf2_common ecdh_generic videodev mc snd_sof_pci_intel_tgl snd_sof_intel_hda_common soundwire_intel soundwire_generic_allocation soundwire_cadence snd_hda_codec_realtek snd_sof_intel_hda snd_hda_codec_generic snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_hdac_hda iwlmvm snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi joydev intel_tcc_cooling soundwire_bus mousedev ledtrig_audio mac80211 x86_pkg_temp_thermal intel_powerclamp snd_soc_core coretemp snd_compress ac97_bus kvm_intel libarc4 hid_multitouch snd_hda_codec_hdmi 8250_dw spi_nor mei_pxp snd_pcm_dmaengine mei_hdcp ee1004 mtd i915 iTCO_wdt snd_hda_intel kvm intel_pmc_bxt snd_intel_dspcfg iTCO_vendor_support intel_rapl_msr iwlwifi irqbypass snd_intel_sdw_acpi snd_hda_codec crct10dif_pclmul crc32_pclmul
[ 5.430709] ghash_clmulni_intel snd_hda_core iwlmei vfat aesni_intel processor_thermal_device_pci_legacy processor_thermal_device pmt_telemetry snd_hwdep crypto_simd pmt_class cryptd fat intel_cstate r8169 drm_buddy cfg80211 intel_uncore snd_pcm processor_thermal_rfim realtek psmouse ttm processor_thermal_mbox mei_me snd_timer rfkill pcspkr i2c_i801 mdio_devres processor_thermal_rapl intel_lpss_pci spi_intel_pci intel_rapl_common snd libphy intel_lpss drm_dp_helper spi_intel i2c_smbus soundcore int340x_thermal_zone thunderbolt mei i2c_hid_acpi idma64 intel_gtt intel_vsec intel_soc_dts_iosf i2c_hid intel_hid video intel_scu_pltdrv sparse_keymap system76_acpi mac_hid coreboot_table dm_multipath dm_mod ipmi_devintf ipmi_msghandler crypto_user acpi_call(OE) fuse bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 serio_raw atkbd uas libps2 usb_storage usbhid vivaldi_fmap nvme xhci_pci nvme_core crc32c_intel i8042 xhci_pci_renesas serio
[ 5.430736] ---[ end trace 0000000000000000 ]---
```
### To Reproduce
1. Upgrade to kernel 5.18
2. Reboot
3. Observe nvidia module won't load and check kernel logs for the same error
### Bug Incidence
Always
### nvidia-bug-report.log.gz
[nvidia-bug-report.log.gz](https://github.com/NVIDIA/open-gpu-kernel-modules/files/8768756/nvidia-bug-report.log.gz)
### More Info
Originally I thought this issue was to do with optimus-manager (As I am using a hybrid setup I use that utility to switch between intel and nvidia mode), but after uninstalling optimus manager the same issue occurs
Don’t mind the repo name, happens with both prop and open source kernel driver on 5.18 kernel.
I have AMD CPU, not Intel, so this is not applicable for me.
I am seeing the same crash with 5.18.3 kernel
Trying to get A5500 working under linux which requires 515 as minimum.
I had a similar problem upgrading to my own 5.11.8 kernel. nvidia-installer builds .ko “fine” then a segfault when nvidia.ko is loaded. Infact i wrote on nvidia forum i thought it was a gcc-10.2 issue. I found next ALSA also was loading but not responding… I knew my old modules still loaded in the “new kernel” however.
I consider the matter as a whole unresolved: why would the ACL kernel accept non-acl modules and fail on ACL ones?
That’s right! When I enabled EXT4 with ACL and XATTR both nvidia and alsa stopped working.
I did “make modules” with #undef CONFIG_FS_POSIX_ACL place in core/foo.c and results: offset 0x34 seen in ASM dump (it was byte for bye same as working modules again).
I’m recompiling as I speak with ACL support NOT in the kernel. rh.
I can do that because I compile my whole OS from scratch (totally built linux distribution tbld). Not everyone can turn ACL off - ie ubuntu cannot. but ubuntu isn’t reporting the problem (i assume they have a patch not public in kernel?)
. diff -dwr /tmp/hex1/core/snd.ko /tmp/hex2/core/snd.ko
. 28c28
. < 00001b0 4451 678b 4434 e389 e381 ffff 000f f741
. —
. > 00001b0 4451 678b 4444 e389 e381 ffff 000f f741
. objd sound/core/snd.ko
. 0000000000002a23 <snd_ctl_open>:
. 4503c4503
. < 2a46: 8b 7b 34 mov 0x34(%rbx),%edi
. —
. > 2a46: 8b 7b 44 mov 0x44(%rbx),%edi
sound/core/control.o (objdump is similar to the above)
control.c:
in function:
static int snd_ctl_open(struct inode *inode, struct file *file)
offending line:
card = snd_lookup_minor_data(iminor(inode), SNDRV_DEVICE_TYPE_CONTROL);
/* iminor(inode) = 0x34 or 0x44 as it should , inode->rdev */
include/linux/fs.h
static inline unsigned iminor(const struct inode *inode)
return MINOR(inode->i_rdev);
Remember i said: the old 0x34 modules works both in the ACL and non-ACL booted kernel. While my nvidia is working well now - i am confused.
AVANCED: this is NOT part of any solution, just investigation.
./linux/kdev_t.h:#define MINOR(dev) ((unsigned int) ((dev) & MINORMASK))
./uapi/linux/kdev_t.h:#define MINOR(dev) ((dev) & 0xff)
#define MINORMASK ((1U << MINORBITS) - 1)
#define MINORBITS 20
(i’m still hunting for 1U)
the above, to me, looks “like a hack, but ok” if, and only if, ACL weren’t hacked i above possibly around offset 20 bumping rdev down, BUT IT IS, and SECURITY is not right after (orphans left in-between also). my idea is ACL SECURIY should be at end of inode or even a separate struct so that these things weren’t a problem. perhaps someone knew that. (the fact is there are existing modules that should still work - they should have known that). another fact is .h header often have to use “likely hacks” since kernel headers don’t publish “all and everything”. that’s all opinion.