Bug 99277 - CONFIG_STACK_VALIDATION=y causes compilation from source of external drivers to fail
Summary: CONFIG_STACK_VALIDATION=y causes compilation from source of external drivers ...
Status: CLOSED INVALID
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-04 21:17 UTC by tomasjonnes
Modified: 2017-07-24 22:39 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description tomasjonnes 2017-01-04 21:17:39 UTC
After building the linux branch intel-drm-nightly kernel (4.10) with the default values, booting the new kernel and trying to compile an external driver ( tested with several nvidia drivers, rtl8812AU-4.3.22 and bbswitch-0.8 ) from source, the compilation process will try to link the object files before even creating them. This issue is also mentioned here: https://devtalk.nvidia.com/default/topic/926824/linux/364-1-2-5-won-t-compile-against-latest-kernel-git-tree-patches-for-4-6-0-rc3-included-/post/4852927/#4852927 suggesting that it is still present, at least, since intel-drm-nightly kernel 4.6. I remember I experienced this bug since late intel-drm-nightly kernel 4.8.

Right now, the only fix to this issue is to set CONFIG_STACK_VALIDATION=n on the .config file before building the kernel. This solution is also mentioned here: https://devtalk.nvidia.com/default/topic/926824/linux/364-1-2-5-won-t-compile-against-latest-kernel-git-tree-patches-for-4-6-0-rc3-included-/post/4854471/#4854471
Comment 1 Jani Nikula 2017-01-04 21:52:26 UTC
In general, upstream doesn't care all that much about out-of-tree builds failing. We don't build out-of-tree drivers. It doesn't get tested. Things like that will bitrot and break. Upstream might accept patches if you figured it out.

Additionally, we are not even the upstream for CONFIG_STACK_VALIDATION. Not DRM/Intel, nor freedesktop.org.
Comment 2 tomasjonnes 2017-01-04 22:10:15 UTC
Then, any clues about where should I post this bug report?

Thank you
Comment 3 Jani Nikula 2017-01-05 10:18:18 UTC
(In reply to tomasjonnes from comment #2)
> Then, any clues about where should I post this bug report?

The stack validation config option seems to have been added in

commit b9ab5ebb14ec389bd80f66613f1fe3f8f65f2521
Author: Josh Poimboeuf <jpoimboe@redhat.com>
Date:   Sun Feb 28 22:22:42 2016 -0600

    objtool: Add CONFIG_STACK_VALIDATION option

but you'd better git bisect first to see which commit actually caused your problems. Perhaps it was the one above, perhaps it was some other change.

Try reporting to Josh, Cc: linux-kernel@vger.kernel.org.

Good luck.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.