-
Notifications
You must be signed in to change notification settings - Fork 14
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
Comments
Here the compressed object file. |
Pooh, that was with GCC-8 above, so it is unrelated to Clang-9 I guess? |
Maybe let @jpoimboe take a look at objtool then if it's reproducible withboth GCC-8 and Clang-9? |
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. |
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. |
@jpoimboe
Attached are the object files with and without your patch. This is with next-20190723 and two patches:
BTW, I am linking with LLD.
UPDATE 2019-07-25: Attachments: |
I am now doing a build with |
Patch "objtool: Improve UACCESS coverage" from Peter Z. |
@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: |
Hmm, not for me. Let me apply both patches and retest. |
BTW, switching to ld.bfd make the I will try that snippet from @nathanchance in #282. [1] #282 |
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.
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 |
@dileks Looks completely unrelated to compiler: https://lore.kernel.org/lkml/20190721142930.GA480@tigerII.localdomain/ |
Thanks, I replied to the email of the reporter. [1] https://lore.kernel.org/lkml/CA+icZUXh068m8UFeHDXCKDi0YfL2Z=WoONy7J7DJLqAT1CZ+rQ@mail.gmail.com/ |
Josh posted the series: https://lore.kernel.org/r/cover.1564007838.git.jpoimboe@redhat.com/ |
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 For this I will open a separate issue. UPDATE 2019-07-26: See #619. [1] https://lore.kernel.org/lkml/20190721142930.GA480@tigerII.localdomain/ |
Updated version of |
Ah wait, there were two parts to this, the actual fix is still pending. |
Just for the followers of linux-next and i915 boot-problems: [1] https://lore.kernel.org/patchwork/project/lkml/list/?series=405247 |
That is the final accepted fix for the linux-next and i915 boot-problem: "drm/i915: Stop reconfiguring our shmemfs mountpoint" |
The 2nd patch reached tip.git#core/urgent: "drm/i915: Remove redundant user_access_end() from __copy_from_user() error path" |
…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
Merged into mainline: https://git.kernel.org/linus/e6a9522ac3ff59980ea00e070b6b8573aface36a |
…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
…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
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:
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:
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
The text was updated successfully, but these errors were encountered: