Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redundant UACCESS disable warning in drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o #617

Closed
dileks opened this issue Jul 22, 2019 · 24 comments
Labels
[ARCH] x86_64 This bug impacts ARCH=x86_64 [FIXED][LINUX] 5.3 This bug was fixed in Linux 5.3 [TOOL] objtool warning is produced by the kernel's objtool

Comments

@dileks
Copy link
Collaborator

dileks commented Jul 22, 2019

I am seeing this warning since next-20190712 with a prerelease of clang-9.

The same with next-20190722 which includes the objtool fixes and enhancements v2 from Josh.
UPDATE: Linux v5.3-rc1 includes them as well.

This is a known issue and was already reported in [2].

First, I hoped installing the i915 GUC firmware files help to solve the problem as there are two reverts around:

Revert "drm/i915: Update description of i915.enable_guc modparam"
Revert "drm/i915/guc: Turn on GuC/HuC auto mode"

This did not help and I cannot boot on bare metal into graphical mode (but VT-1).

This is what I am seeing when booting on bare metal (Lenovo ThinkPad T470) with Intel HD 620:

[Mon Jul 22 15:21:34 2019] i915 0000:00:02.0: enabling device (0006 -> 0007)
[Mon Jul 22 15:21:34 2019] AES CTR mode by8 optimization enabled
[Mon Jul 22 15:21:34 2019] BUG: kernel NULL pointer dereference, address: 0000000000000000
[Mon Jul 22 15:21:34 2019] #PF: supervisor instruction fetch in kernel mode
[Mon Jul 22 15:21:34 2019] #PF: error_code(0x0010) - not-present page
[Mon Jul 22 15:21:34 2019] PGD 0 P4D 0 
[Mon Jul 22 15:21:34 2019] Oops: 0010 [#1] SMP PTI
[Mon Jul 22 15:21:34 2019] CPU: 2 PID: 146 Comm: systemd-udevd Not tainted 5.2.0-7-amd64-cbl-asmgoto #7~buster+dileks1
[Mon Jul 22 15:21:34 2019] Hardware name: LENOVO 20HDCTO1WW/20HDCTO1WW, BIOS N1QET83W (1.58 ) 04/18/2019
[Mon Jul 22 15:21:34 2019] RIP: 0010:0x0
[Mon Jul 22 15:21:34 2019] Code: Bad RIP value.
[Mon Jul 22 15:21:34 2019] RSP: 0018:ffffb959402ab9e0 EFLAGS: 00010202
[Mon Jul 22 15:21:34 2019] RAX: 0000000000000000 RBX: ffffa044503a6b60 RCX: 00000000000000e6
[Mon Jul 22 15:21:34 2019] RDX: ffffb959402ab9f5 RSI: ffffb959402ab9f0 RDI: ffffa04445183000
[Mon Jul 22 15:21:34 2019] RBP: ffffa044444c0000 R08: ffffa044451830c0 R09: ffffa044525b4a58
[Mon Jul 22 15:21:34 2019] R10: 0000000000000298 R11: 0000000000000298 R12: 0000000000000000
[Mon Jul 22 15:21:34 2019] R13: ffffa044444c7768 R14: 0000000000000010 R15: ffffb959402abe88
[Mon Jul 22 15:21:34 2019] FS:  00007f7ac7054d40(0000) GS:ffffa04452500000(0000) knlGS:0000000000000000
[Mon Jul 22 15:21:34 2019] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[Mon Jul 22 15:21:34 2019] CR2: ffffffffffffffd6 CR3: 00000004450f6002 CR4: 00000000003606e0
[Mon Jul 22 15:21:34 2019] Call Trace:
[Mon Jul 22 15:21:34 2019]  i915_gemfs_init+0xb2/0xe0 [i915] 
[Mon Jul 22 15:21:34 2019]  i915_gem_init_early+0x7b/0x90 [i915]
[Mon Jul 22 15:21:34 2019]  i915_driver_probe+0x34d/0x16f0 [i915] 
[Mon Jul 22 15:21:34 2019]  ? idr_alloc_cyclic+0x5c/0xc0
[Mon Jul 22 15:21:34 2019]  ? __kernfs_new_node+0x16d/0x1d0
[Mon Jul 22 15:21:34 2019]  ? __kernfs_new_node+0x16d/0x1d0
[Mon Jul 22 15:21:34 2019]  ? _cond_resched+0x15/0x30
[Mon Jul 22 15:21:34 2019]  i915_pci_probe+0x54/0x160 [i915]
[Mon Jul 22 15:21:34 2019]  local_pci_probe+0x42/0x80 
[Mon Jul 22 15:21:34 2019]  pci_device_probe+0xfc/0x1b0
[Mon Jul 22 15:21:34 2019]  really_probe+0xef/0x390 
[Mon Jul 22 15:21:34 2019]  driver_probe_device+0xb4/0x100
[Mon Jul 22 15:21:34 2019]  device_driver_attach+0x4f/0x60 
[Mon Jul 22 15:21:34 2019]  __driver_attach+0x86/0x140
[Mon Jul 22 15:21:34 2019]  ? device_driver_attach+0x60/0x60
[Mon Jul 22 15:21:34 2019]  bus_for_each_dev+0x77/0xc0
[Mon Jul 22 15:21:34 2019]  ? klist_add_tail+0x3b/0x70
[Mon Jul 22 15:21:34 2019]  bus_add_driver+0x14a/0x1e0
[Mon Jul 22 15:21:34 2019]  ? 0xffffffffc096b000 
[Mon Jul 22 15:21:34 2019]  driver_register+0x6b/0xb0
[Mon Jul 22 15:21:34 2019]  ? 0xffffffffc096b000
[Mon Jul 22 15:21:34 2019]  do_one_initcall+0x46/0x1f4 
[Mon Jul 22 15:21:34 2019]  ? _cond_resched+0x15/0x30
[Mon Jul 22 15:21:34 2019]  ? kmem_cache_alloc_trace+0x1d9/0x220
[Mon Jul 22 15:21:34 2019]  do_init_module+0x5a/0x220
[Mon Jul 22 15:21:34 2019]  load_module+0x2190/0x23a0
[Mon Jul 22 15:21:34 2019]  ? __do_sys_finit_module+0xa8/0x110
[Mon Jul 22 15:21:34 2019]  __do_sys_finit_module+0xa8/0x110
[Mon Jul 22 15:21:34 2019]  do_syscall_64+0x4e/0x100
[Mon Jul 22 15:21:34 2019]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[Mon Jul 22 15:21:34 2019] RIP: 0033:0x7f7ac783ef59
[Mon Jul 22 15:21:34 2019] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 07 6f 0c 00 f7 d8 64 89 01 48
[Mon Jul 22 15:21:34 2019] RSP: 002b:00007fff5196efa8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[Mon Jul 22 15:21:34 2019] RAX: ffffffffffffffda RBX: 000055bbc4c201a0 RCX: 00007f7ac783ef59
[Mon Jul 22 15:21:34 2019] RDX: 0000000000000000 RSI: 00007f7ac7743cad RDI: 000000000000000e
[Mon Jul 22 15:21:34 2019] RBP: 00007f7ac7743cad R08: 0000000000000000 R09: 0000000000000000
[Mon Jul 22 15:21:34 2019] R10: 000000000000000e R11: 0000000000000246 R12: 0000000000000000
[Mon Jul 22 15:21:34 2019] R13: 000055bbc4c19af0 R14: 0000000000020000 R15: 000055bbc4c201a0
[Mon Jul 22 15:21:34 2019] Modules linked in: aesni_intel aes_x86_64 fjes(-) crypto_simd nvme cryptd glue_helper xhci_pci psmouse i2c_i801 i915(+) xhci_hcd e1000e(+) intel_lpss_pci i2c_algo_bit intel_lpss nvme_core usbcore drm_kms_helper drm thermal wmi video button
[Mon Jul 22 15:21:34 2019] CR2: 0000000000000000
[Mon Jul 22 15:21:34 2019] ---[ end trace 3a08d372b7ebfede ]---
[Mon Jul 22 15:21:34 2019] RIP: 0010:0x0
[Mon Jul 22 15:21:34 2019] Code: Bad RIP value.
[Mon Jul 22 15:21:34 2019] RSP: 0018:ffffb959402ab9e0 EFLAGS: 00010202
[Mon Jul 22 15:21:34 2019] RAX: 0000000000000000 RBX: ffffa044503a6b60 RCX: 00000000000000e6
[Mon Jul 22 15:21:34 2019] RDX: ffffb959402ab9f5 RSI: ffffb959402ab9f0 RDI: ffffa04445183000
[Mon Jul 22 15:21:34 2019] RBP: ffffa044444c0000 R08: ffffa044451830c0 R09: ffffa044525b4a58
[Mon Jul 22 15:21:34 2019] R10: 0000000000000298 R11: 0000000000000298 R12: 0000000000000000
[Mon Jul 22 15:21:34 2019] R13: ffffa044444c7768 R14: 0000000000000010 R15: ffffb959402abe88
[Mon Jul 22 15:21:34 2019] FS:  00007f7ac7054d40(0000) GS:ffffa04452500000(0000) knlGS:0000000000000000
[Mon Jul 22 15:21:34 2019] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[Mon Jul 22 15:21:34 2019] CR2: ffffffffffffffd6 CR3: 00000004450f6002 CR4: 00000000003606e0

Not sure if this is related to above objtool warning or not.

My kernel-config and full dmesg-log are attached.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux.git/log/?h=objtool-many-fixes-v2
[2] https://lore.kernel.org/r/alpine.DEB.2.21.1907182223560.1785@nanos.tec.linutronix.de/

config-5.2.0-7-amd64-cbl-asmgoto.txt
dmesg_5.2.0-7-amd64-cbl-asmgoto.txt

@dileks dileks added [ARCH] x86_64 This bug impacts ARCH=x86_64 [TOOL] objtool warning is produced by the kernel's objtool labels Jul 22, 2019
@dileks
Copy link
Collaborator Author

dileks commented Jul 22, 2019

Here the compressed object file.

i915_gem_execbuffer.o.gz

@dileks
Copy link
Collaborator Author

dileks commented Jul 23, 2019

Pooh, that was with GCC-8 above, so it is unrelated to Clang-9 I guess?
File a bug to intel-gfx mailing-list?

@nickdesaulniers
Copy link
Member

Maybe let @jpoimboe take a look at objtool then if it's reproducible withboth GCC-8 and Clang-9?

@jpoimboe
Copy link

I wasn't able to recreate with GCC 8, did you mean the panic was from GCC 8, or the objtool warning, or both? The attached .o file was generated by Clang. I'll take a look at it.

@dileks
Copy link
Collaborator Author

dileks commented Jul 24, 2019

I totally messed up config and logs alltogether with $COMPILER.

The call-trace is seen with clang-9 and gcc-8 on Debian/buster AMD64.

I have built next-20190723 and the call-trace remains.

Will test the snippet from the ML and report.

@dileks
Copy link
Collaborator Author

dileks commented Jul 24, 2019

@jpoimboe
Your snippet (attached below) did not help (here: clang-9) and I still see the call-trace with i915.

ClangBuiltLinux clang version 9.0.0 (git://github.com/llvm/llvm-project 1e6b12dd3158a554c63d332df6b25f407eed9556) (based on LLVM 9.0.0)

Attached are the object files with and without your patch.

This is with next-20190723 and two patches:

Makefile: lld: tell clang to use lld
init/Kconfig: add config support for detecting linker

BTW, I am linking with LLD.

LLD 9.0.0 (git://github.com/llvm/llvm-project 1e6b12dd3158a554c63d332df6b25f407eed9556) (compatible with GNU linkers)

UPDATE 2019-07-25:
To clarify: I still saw the i915 call-trace but not the i915 objtool warning.

Attachments:
config-5.3.0-rc1-1-amd64-cbl-asmgoto.txt
dmesg_5.3.0-rc1-1-amd64-cbl-asmgoto.txt
dmesg_5.3.0-rc1-1-amd64-cbl-asmgoto_i915-jpoimboe.txt
i915_gem_execbuffer.o.gz
i915_gem_execbuffer_i915-jpoimboe.o.gz
i915-jpoimboe.diff.gz

@dileks
Copy link
Collaborator Author

dileks commented Jul 24, 2019

I am now doing a build with clang-9 and GNU ld (GNU Binutils for Debian) 2.31.1 and will report later.

@dileks
Copy link
Collaborator Author

dileks commented Jul 24, 2019

Patch "objtool: Improve UACCESS coverage" from Peter Z.

[1] https://lore.kernel.org/patchwork/patch/1103984/

@nickdesaulniers
Copy link
Member

@dileks that patch simply improves objtool to catch something not spotted when building w/ GCC (but was caught with a clang build)

This patch from Josh fixes up the i915 code, but is not yet submitted:
https://groups.google.com/d/msg/clang-built-linux/AgCwGpwsMJE/okB5LyVJCAAJ

@nickdesaulniers nickdesaulniers added the [PATCH] Exists There is a patch that fixes this issue label Jul 24, 2019
@dileks
Copy link
Collaborator Author

dileks commented Jul 24, 2019

Hmm, not for me. Let me apply both patches and retest.

@dileks
Copy link
Collaborator Author

dileks commented Jul 24, 2019

BTW, switching to ld.bfd make the ___bpf_prog_run|bpf_prepare_filter call-traces go away.

I will try that snippet from @nathanchance in #282.

[1] #282

@dileks
Copy link
Collaborator Author

dileks commented Jul 24, 2019

I still cannot boot the call-trace for i915 looks different with the 2 patches from @jpoimboe and Peter Z.

This with clang-9 and ld.bfd/buster.

[Wed Jul 24 20:10:56 2019] i915 0000:00:02.0: enabling device (0006 -> 0007)
[Wed Jul 24 20:10:56 2019] BUG: kernel NULL pointer dereference, address: 0000000000000000
[Wed Jul 24 20:10:56 2019] #PF: supervisor instruction fetch in kernel mode
[Wed Jul 24 20:10:56 2019] #PF: error_code(0x0010) - not-present page
[Wed Jul 24 20:10:56 2019] PGD 0 P4D 0 
[Wed Jul 24 20:10:56 2019] Oops: 0010 [#1] SMP PTI
[Wed Jul 24 20:10:56 2019] CPU: 1 PID: 128 Comm: systemd-udevd Not tainted 5.3.0-rc1-2-amd64-cbl-asmgoto #2~buster+dileks1
[Wed Jul 24 20:10:56 2019] Hardware name: LENOVO 20HDCTO1WW/20HDCTO1WW, BIOS N1QET83W (1.58 ) 04/18/2019
[Wed Jul 24 20:10:56 2019] RIP: 0010:0x0
[Wed Jul 24 20:10:56 2019] Code: Bad RIP value.
[Wed Jul 24 20:10:56 2019] RSP: 0018:ffffc10b802d78d0 EFLAGS: 00010202
[Wed Jul 24 20:10:56 2019] RAX: ffffffffb641efb0 RBX: ffff9b710531f060 RCX: 0000000000000110
[Wed Jul 24 20:10:56 2019] RDX: ffffc10b802d78e0 RSI: ffffc10b802d78dc RDI: ffff9b7105afc800
[Wed Jul 24 20:10:56 2019] RBP: ffffc10b802d7910 R08: 00000000ffffff9c R09: ffff9b71125b2698
[Wed Jul 24 20:10:56 2019] R10: 0000000000006698 R11: 0000000000000000 R12: ffff9b7105280830
[Wed Jul 24 20:10:56 2019] R13: ffff9b7105284cb0 R14: ffff9b7105280000 R15: ffff9b7105280000
[Wed Jul 24 20:10:56 2019] FS:  00007f3c5ea11d40(0000) GS:ffff9b7112480000(0000) knlGS:0000000000000000
[Wed Jul 24 20:10:56 2019] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[Wed Jul 24 20:10:56 2019] CR2: ffffffffffffffd6 CR3: 0000000445e06001 CR4: 00000000003606e0
[Wed Jul 24 20:10:56 2019] Call Trace:
[Wed Jul 24 20:10:56 2019]  i915_gemfs_init+0x84/0xd0 [i915]
[Wed Jul 24 20:10:56 2019]  i915_gem_init_early+0x7f/0xa0 [i915]
[Wed Jul 24 20:10:56 2019]  i915_driver_probe+0x223/0x1650 [i915]
[Wed Jul 24 20:10:56 2019]  ? __kernfs_new_node+0x1a0/0x200
[Wed Jul 24 20:10:56 2019]  ? _cond_resched+0x1a/0x50
[Wed Jul 24 20:10:56 2019]  ? mutex_lock+0x12/0x30
[Wed Jul 24 20:10:56 2019]  ? acpi_dev_found+0x5a/0x70
[Wed Jul 24 20:10:56 2019]  i915_pci_probe+0x13e/0x170 [i915]
[Wed Jul 24 20:10:56 2019]  pci_device_probe+0x196/0x240
[Wed Jul 24 20:10:56 2019]  really_probe+0x205/0x6b0
[Wed Jul 24 20:10:56 2019]  driver_probe_device+0x9c/0x130
[Wed Jul 24 20:10:56 2019]  device_driver_attach+0x66/0xa0
[Wed Jul 24 20:10:56 2019]  __driver_attach+0x42/0x1f0
[Wed Jul 24 20:10:56 2019]  ? driver_attach+0x20/0x20
[Wed Jul 24 20:10:56 2019]  bus_for_each_dev+0x93/0xd0
[Wed Jul 24 20:10:56 2019]  bus_add_driver+0x138/0x220
[Wed Jul 24 20:10:56 2019]  ? 0xffffffffc0ac7000
[Wed Jul 24 20:10:56 2019]  driver_register+0x7e/0x110
[Wed Jul 24 20:10:56 2019]  do_one_initcall+0xf9/0x280
[Wed Jul 24 20:10:56 2019]  ? __switch_to_asm+0x34/0x70
[Wed Jul 24 20:10:56 2019]  ? __switch_to_asm+0x40/0x70
[Wed Jul 24 20:10:56 2019]  ? __switch_to_asm+0x34/0x70
[Wed Jul 24 20:10:56 2019]  ? __switch_to_asm+0x40/0x70
[Wed Jul 24 20:10:56 2019]  ? __switch_to_asm+0x34/0x70
[Wed Jul 24 20:10:56 2019]  ? __switch_to_asm+0x40/0x70
[Wed Jul 24 20:10:56 2019]  ? __switch_to_asm+0x34/0x70
[Wed Jul 24 20:10:56 2019]  ? __switch_to_asm+0x40/0x70
[Wed Jul 24 20:10:56 2019]  ? __switch_to_asm+0x34/0x70
[Wed Jul 24 20:10:56 2019]  ? vunmap_page_range+0x1e2/0x2b0
[Wed Jul 24 20:10:56 2019]  ? free_unref_page_commit+0x93/0x170
[Wed Jul 24 20:10:56 2019]  ? _cond_resched+0x1a/0x50
[Wed Jul 24 20:10:56 2019]  ? kmem_cache_alloc_trace+0x3f/0x230
[Wed Jul 24 20:10:56 2019]  do_init_module+0x60/0x230
[Wed Jul 24 20:10:56 2019]  load_module+0x30c0/0x33f0
[Wed Jul 24 20:10:56 2019]  ? kernel_read_file_from_fd+0x46/0x80
[Wed Jul 24 20:10:56 2019]  __se_sys_finit_module+0x102/0x110
[Wed Jul 24 20:10:56 2019]  do_syscall_64+0x59/0x90
[Wed Jul 24 20:10:56 2019]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[Wed Jul 24 20:10:56 2019] RIP: 0033:0x7f3c5f1fbf59
[Wed Jul 24 20:10:56 2019] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 07 6f 0c 00 f7 d8 64 89 01 48
[Wed Jul 24 20:10:56 2019] RSP: 002b:00007ffe0da76eb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[Wed Jul 24 20:10:56 2019] RAX: ffffffffffffffda RBX: 000055765c4f72a0 RCX: 00007f3c5f1fbf59
[Wed Jul 24 20:10:56 2019] RDX: 0000000000000000 RSI: 00007f3c5f100cad RDI: 000000000000000d
[Wed Jul 24 20:10:56 2019] RBP: 00007f3c5f100cad R08: 0000000000000000 R09: 0000000000000000
[Wed Jul 24 20:10:56 2019] R10: 000000000000000d R11: 0000000000000246 R12: 0000000000000000
[Wed Jul 24 20:10:56 2019] R13: 000055765c4f21d0 R14: 0000000000020000 R15: 000055765c4f72a0
[Wed Jul 24 20:10:56 2019] Modules linked in: fjes(-) i915(+) i2c_algo_bit xhci_pci nvme aesni_intel xhci_hcd aes_x86_64 crypto_simd drm_kms_helper cryptd glue_helper i2c_i801 e1000e(+) psmouse nvme_core intel_lpss_pci intel_lpss drm usbcore thermal wmi video button
[Wed Jul 24 20:10:56 2019] CR2: 0000000000000000
[Wed Jul 24 20:10:56 2019] ---[ end trace 67111cfd13c6714c ]---
[Wed Jul 24 20:10:56 2019] RIP: 0010:0x0
[Wed Jul 24 20:10:56 2019] Code: Bad RIP value.
[Wed Jul 24 20:10:56 2019] RSP: 0018:ffffc10b802d78d0 EFLAGS: 00010202
[Wed Jul 24 20:10:56 2019] RAX: ffffffffb641efb0 RBX: ffff9b710531f060 RCX: 0000000000000110
[Wed Jul 24 20:10:56 2019] RDX: ffffc10b802d78e0 RSI: ffffc10b802d78dc RDI: ffff9b7105afc800
[Wed Jul 24 20:10:56 2019] RBP: ffffc10b802d7910 R08: 00000000ffffff9c R09: ffff9b71125b2698
[Wed Jul 24 20:10:56 2019] R10: 0000000000006698 R11: 0000000000000000 R12: ffff9b7105280830
[Wed Jul 24 20:10:56 2019] R13: ffff9b7105284cb0 R14: ffff9b7105280000 R15: ffff9b7105280000
[Wed Jul 24 20:10:56 2019] FS:  00007f3c5ea11d40(0000) GS:ffff9b7112480000(0000) knlGS:0000000000000000
[Wed Jul 24 20:10:56 2019] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[Wed Jul 24 20:10:56 2019] CR2: ffffffffffffffd6 CR3: 0000000445e06001 CR4: 00000000003606e0

I will do a next testing with gcc-8 and ld.bfd from Debian/buster.

dmesg_5.3.0-rc1-2-amd64-cbl-asmgoto_jpoimboe-peterz.txt
config-5.3.0-rc1-2-amd64-cbl-asmgoto.txt

@nathanchance
Copy link
Member

@dileks Looks completely unrelated to compiler:

https://lore.kernel.org/lkml/20190721142930.GA480@tigerII.localdomain/

@dileks
Copy link
Collaborator Author

dileks commented Jul 24, 2019

@nickdesaulniers
Copy link
Member

nickdesaulniers commented Jul 24, 2019

@nickdesaulniers nickdesaulniers added [PATCH] Submitted A patch has been submitted for review and removed [PATCH] Exists There is a patch that fixes this issue labels Jul 24, 2019
@dileks
Copy link
Collaborator Author

dileks commented Jul 25, 2019

The i195 call-trace that I have seen beside the objtool warning is gone.

The snippet from [1] fixed it:

diff --git a/drivers/gpu/drm/i915/gem/i915_gemfs.c b/drivers/gpu/drm/i915/gem/i915_gemfs.c
index 099f3397aada..1f95d9ea319a 100644
--- a/drivers/gpu/drm/i915/gem/i915_gemfs.c
+++ b/drivers/gpu/drm/i915/gem/i915_gemfs.c
@@ -39,6 +39,9 @@ int i915_gemfs_init(struct drm_i915_private *i915)
 		int flags = 0;
 		int err;
 
+		if (!sb->s_op->remount_fs)
+			return -ENODEV;
+
 		err = sb->s_op->remount_fs(sb, &flags, options);
 		if (err) {
 			kern_unmount(gemfs);

There is still the ___bpf_prog_run|bpf_prepare_filter call-trace I see when linking with ld.lld-9.

For this I will open a separate issue.

UPDATE 2019-07-26: See #619.

[1] https://lore.kernel.org/lkml/20190721142930.GA480@tigerII.localdomain/

@dileks
Copy link
Collaborator Author

dileks commented Jul 25, 2019

Updated version of objtool: Improve UACCESS coverage in tip.git#core/urgent.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=core/urgent&id=882a0db9d143e5e8dac54b96e83135bccd1f68d1

@dileks dileks changed the title drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: .altinstr_replacement+0x86: redundant UACCESS disable redundant UACCESS disable warning in drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o Jul 25, 2019
@dileks
Copy link
Collaborator Author

dileks commented Jul 28, 2019

@nathanchance nathanchance added [FIXED][LINUX] 5.3 This bug was fixed in Linux 5.3 and removed [PATCH] Submitted A patch has been submitted for review labels Jul 28, 2019
@nathanchance nathanchance reopened this Jul 28, 2019
@nathanchance
Copy link
Member

Ah wait, there were two parts to this, the actual fix is still pending.

@nathanchance nathanchance removed the [FIXED][LINUX] 5.3 This bug was fixed in Linux 5.3 label Jul 28, 2019
@nathanchance nathanchance added the [PATCH] Submitted A patch has been submitted for review label Jul 28, 2019
@dileks
Copy link
Collaborator Author

dileks commented Aug 5, 2019

Just for the followers of linux-next and i915 boot-problems:
There is now a series from Sergey Senozhatsky "convert i915 to new mount API v2" around.

[1] https://lore.kernel.org/patchwork/project/lkml/list/?series=405247

@dileks
Copy link
Collaborator Author

dileks commented Aug 9, 2019

That is the final accepted fix for the linux-next and i915 boot-problem:

"drm/i915: Stop reconfiguring our shmemfs mountpoint"

[1] https://cgit.freedesktop.org/drm-intel/commit/?h=for-linux-next&id=72e67f04637432f91e4cc5e8e4f7eb4e38461e8e

@dileks
Copy link
Collaborator Author

dileks commented Aug 9, 2019

The 2nd patch reached tip.git#core/urgent:

"drm/i915: Remove redundant user_access_end() from __copy_from_user() error path"

[1] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=core/urgent&id=e6a9522ac3ff59980ea00e070b6b8573aface36a

@nickdesaulniers nickdesaulniers added [PATCH] Accepted A submitted patch has been accepted upstream and removed [PATCH] Submitted A patch has been submitted for review labels Aug 9, 2019
nathanchance pushed a commit that referenced this issue Aug 10, 2019
…error path

Objtool reports:

  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: .altinstr_replacement+0x36: redundant UACCESS disable

__copy_from_user() already does both STAC and CLAC, so the
user_access_end() in its error path adds an extra unnecessary CLAC.

Fixes: 0b2c8f8 ("i915: fix missing user_access_end() in page fault exception case")
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: #617
Link: https://lkml.kernel.org/r/51a4155c5bc2ca847a9cbe85c1c11918bb193141.1564086017.git.jpoimboe@redhat.com
@nathanchance
Copy link
Member

@nathanchance nathanchance added [FIXED][LINUX] 5.3 This bug was fixed in Linux 5.3 and removed [PATCH] Accepted A submitted patch has been accepted upstream labels Aug 11, 2019
evadot pushed a commit to freebsd/drm-kmod that referenced this issue Jun 2, 2020
…error path

Objtool reports:

  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: .altinstr_replacement+0x36: redundant UACCESS disable

__copy_from_user() already does both STAC and CLAC, so the
user_access_end() in its error path adds an extra unnecessary CLAC.

Fixes: 0b2c8f8b6b0c ("i915: fix missing user_access_end() in page fault exception case")
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: ClangBuiltLinux/linux#617
Link: https://lkml.kernel.org/r/51a4155c5bc2ca847a9cbe85c1c11918bb193141.1564086017.git.jpoimboe@redhat.com
evadot pushed a commit to freebsd/drm-kmod that referenced this issue Jun 2, 2020
…error path

Objtool reports:

  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: .altinstr_replacement+0x36: redundant UACCESS disable

__copy_from_user() already does both STAC and CLAC, so the
user_access_end() in its error path adds an extra unnecessary CLAC.

Fixes: 0b2c8f8b6b0c ("i915: fix missing user_access_end() in page fault exception case")
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: ClangBuiltLinux/linux#617
Link: https://lkml.kernel.org/r/51a4155c5bc2ca847a9cbe85c1c11918bb193141.1564086017.git.jpoimboe@redhat.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[ARCH] x86_64 This bug impacts ARCH=x86_64 [FIXED][LINUX] 5.3 This bug was fixed in Linux 5.3 [TOOL] objtool warning is produced by the kernel's objtool
Projects
None yet
Development

No branches or pull requests

4 participants