NVIDIA related warning on booting linux 4.14

I am seeing a warning while booting linux 4.14.2

[   43.438583] resource sanity check: requesting [mem 0x000a0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000a0000-0x000bffff window]
[   43.438698] caller _nv001193rm+0x166/0x1c0 [nvidia] mapping multiple BARs
[   43.802318] nvidia-modeset: Allocated GPU:0 (GPU-a432c7bb-af50-7966-be96-385d4d9c5c97) @ PCI:0000:01:00.0

This warning wasn’t there under the previous kernel I was using (4.9 series)

They just changed the message in newer kernels. It has probably always been there due to a buggy bios. The previous message was
Info: mapping multiple BARs. Your kernel is fine.

GPU bios?

Motherboard BIOS.

You may disregard these messages - they are harmless.

I did journalctl | grep BARs. The journal goes back to june. There was no mention of the term ‘BARs’ in the journal till now.

I can confirm this message just occured with kernel 4.14.x, never had this with older versions.

According to this: https://lwn.net/Articles/300667/

(patch) ioremap sanity check to catch mapping requests exceeding the BAR sizes

Go through the iomem resource tree to check if any of the ioremap() requests
span more than any slot in the iomem resource tree and do a WARN_ON() if we hit
this check.

This will raise a red-flag, if some driver is mapping more than what
is needed. And hopefully identify possible corruptions much earlier.

Can someone confirm, this won’t lead to “possible corruptions”?

Thanks in advance
Marcus

I’m a bit puzzled why this message is displayed just now for some people. The change of the message was already in kernel 4.8. Since then not much has changed in regard to ioremap. Just some changes in the e820 code.
Can this cause corruption? Possibly but unlikely and if so, you can’t do anything about it anyway other than wait for a fixed bios from your manufacturer.
Why is this displayed now? Mystery, better asked that on the kernel mailing list.

I filed bug 2017354 about this. From the investigation, I’m pretty sure this message is harmless but we’re fixing it for a future driver release nonetheless.

Is this fixed in 390.12? I’m on 4.9.76 at the moment before the warning started (in 4.14.xx).

No, is not fixed in 390.12.

[Fr Jan 12 10:01:02 2018] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000d0000-0x000d3fff window]
[Fr Jan 12 10:01:02 2018] caller _nv001171rm+0xe3/0x1d0 [nvidia] mapping multiple BARs
[Fr Jan 12 10:01:02 2018] resource sanity check: requesting [mem 0x000e0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000e0000-0x000e3fff window]
[Fr Jan 12 10:01:02 2018] caller _nv029907rm+0x57/0x90 [nvidia] mapping multiple BARs

It’s there on 4.15-rc7 and 390.12.

~
towo:Defiant> inxi -SG
System:    Host: Defiant Kernel: 4.15.0-rc7-siduction-amd64 x86_64 bits: 64 Desktop: Cinnamon 3.4.6
           Distro: siduction 13.2.0 December - xfce - (201312310323)
Graphics:  Card: NVIDIA GP107 [GeForce GTX 1050 Ti]
           Display Server: x11 (X.Org 1.19.5 ) driver: nvidia Resolution: 1920x1080@60.00hz
           OpenGL: renderer: GeForce GTX 1050 Ti/PCIe/SSE2 version: 4.5.0 NVIDIA 390.12

I’m not seeing this message anymore on Linux kernel 4.14.16 and nvidia driver 390.25 which I verified by doing “dmesg | grep BAR”.

Hi Guys

Problem still present with 4.17.4 / 340.107
NVIDIA Corporation GT218 [GeForce 210] (rev a2)

If there is a patch.

[ 9.427688] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000d0000-0x000d3fff window
]
[ 9.427781] caller _nv000788rm+0xe4/0x1c0 [nvidia] mapping multiple BARs
[ 9.437157] resource sanity check: requesting [mem 0x000e0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000e0000-0x000e3fff window
]
[ 9.437246] caller _nv013519rm+0x57/0xa0 [nvidia] mapping multiple BARs

[ 17.483331] ------------[ cut here ]------------
[ 17.483334] Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLAB object ‘nvidia_stack_t’ (offset 11864, size 3)!
[ 17.483342] WARNING: CPU: 1 PID: 456 at mm/usercopy.c:81 usercopy_warn+0x7e/0xa0
[ 17.483343] Modules linked in: uvcvideo aes_x86_64 videobuf2_vmalloc videobuf2_memops algif_skcipher videobuf2_v4l2 joydev intel_rapl x86_pkg_temp_thermal usbmouse videobuf2_common usbkbd videodev intel_powerclamp media usbhid coretemp kvm_intel kvm snd_hda_codec_hdmi irqbypass crct10dif_pclmul crc
32_pclmul crc32c_intel ghash_clmulni_intel cryptd intel_cstate nvidia(PO) wmi_bmof evdev intel_uncore drm ehci_pci snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_timer snd ehci_hcd intel_rapl_perf soundcore lpc_ich mei_me mei xhci_pci xhci_hc
d mfd_core usbcore e1000e ptp pps_core video i2c_i801 thermal ie31200_edac wmi shpchp bridge button fan stp llc sch_fq_codel w83627ehf hwmon_vid
[ 17.483374] CPU: 1 PID: 456 Comm: X Tainted: P O 4.17.4-aufs #1
[ 17.483374] Hardware name: /DH77EB, BIOS EBH7710H.86A.0103.2014.1015.1532 10/15/2014
[ 17.483376] RIP: 0010:usercopy_warn+0x7e/0xa0
[ 17.483377] RSP: 0018:ffffb5dd01fa7bb0 EFLAGS: 00010286
[ 17.483378] RAX: 0000000000000000 RBX: ffff94d987202f98 RCX: 0000000000000006
[ 17.483378] RDX: 0000000000000007 RSI: 0000000000000092 RDI: ffff94d99ec96730
[ 17.483379] RBP: 0000000000000003 R08: 00000000000002e1 R09: 0000000000000004
[ 17.483380] R10: ffffffff88eb3940 R11: 0000000000000001 R12: 0000000000000001
[ 17.483380] R13: ffff94d987202f9b R14: ffff94d987202f98 R15: ffff94d987202fe0
[ 17.483381] FS: 00007f4c677b5680(0000) GS:ffff94d99ec80000(0000) knlGS:0000000000000000
[ 17.483382] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 17.483383] CR2: 00007f4c5e59f160 CR3: 0000000300dca004 CR4: 00000000001606e0
[ 17.483384] Call Trace:
[ 17.483388] __check_object_size+0x9c/0x1a0
[ 17.483463] os_memcpy_to_user+0x21/0x40 [nvidia]
[ 17.483525] _nv001372rm+0xa5/0x260 [nvidia]
[ 17.483588] ? _nv004784rm+0x4eba/0x5500 [nvidia]
[ 17.483648] ? _nv004331rm+0xec/0xf0 [nvidia]
[ 17.483707] ? _nv004326rm+0xca/0x650 [nvidia]
[ 17.483767] ? _nv015126rm+0x576/0x5c0 [nvidia]
[ 17.483827] ? _nv000694rm+0x2e/0x60 [nvidia]
[ 17.483886] ? _nv000789rm+0x5f5/0x8b0 [nvidia]
[ 17.483944] ? rm_ioctl+0x73/0x100 [nvidia]
[ 17.484004] ? nv_check_pci_config_space+0x1691/0x1950 [nvidia]
[ 17.484063] ? nvidia_frontend_ioctl+0x2d/0x60 [nvidia]
[ 17.484122] ? nvidia_frontend_unlocked_ioctl+0x19/0x20 [nvidia]
[ 17.484124] ? do_vfs_ioctl+0xa4/0x630
[ 17.484125] ? ksys_ioctl+0x70/0x80
[ 17.484127] ? __x64_sys_ioctl+0x16/0x20
[ 17.484129] ? do_syscall_64+0x55/0x110
[ 17.484131] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 17.484132] Code: 48 c7 c0 2a 25 e7 88 48 0f 44 c2 41 50 51 41 51 48 89 f9 49 89 f1 4d 89 d8 4c 89 d2 48 89 c6 48 c7 c7 80 25 e7 88 e8 f2 b4 e3 ff <
0f> 0b 48 83 c4 18 c3 48 c7 c6 6c 8b e8 88 49 89 f1 49 89 f3 eb
[ 17.484153] —[ end trace d1adf9f719aa56fd ]—

The message is still there:

4.14.52-gentoo #1 SMP PREEMPT x86_64 Intel® Xeon® CPU E31270 @ 3.40GHz
nvidia 390.87
GT 710

[ 56.934751] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000d0000-0x000d3fff window]
[ 56.934855] caller _nv001169rm+0xe3/0x1d0 [nvidia] mapping multiple BARs

18.04.4 here with 440 drivers…still having it. resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000c0000-0x000dffff window]

Running 5.4.0-42-lowlatency with a GTX 1060 and GTX 1660.

This happens far far too often and kills my session…drops me back to lightdm/restarts X.

I can confirm issue still present with:
Ubuntu 18.04.5 LTS
CUDA Version: 11.0
Driver Version: 450.51.06
GPU GeForce RTX 2080 ti

When I hit this issue, nvidia-smi stops working, that message comes continuously in kernel message logs (dmesg) and can’t access GPU after that.

Once I unplug the GPU (from motherboard) and plug it back and reboot the machine, it starts working and after some time issue is reproduced automatically. If I do only reboot, it doesn’t work.

Is this issue of hardware or the driver/kernel?

Message:
[ 3.588588] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000d0000-0x000d3fff window]
[ 3.588699] caller os_map_kernel_space.part.10+0x6d/0x80 [nvidia] mapping multiple BARs

This error came back (Aug. 20 2020).

My system:

CentOS 8 x64 without GNOME (Just command line)
GeForce GTX 1660 SUPER (6GB)
Driver: NVIDIA-Linux-x86_64-450.66.run
Mother board: TUF B450M-PLUS GAMING

In my case the error is shown when I type command:

nvidia-smi

Error:

[ 59.970061] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000c0000-0x000dffff window]
[ 59.971671] caller _nv000745rm+0x1af/0x200 [nvidia] mapping multiple BARs