Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1581569
| From | Marc MERLIN <marc@merlins.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] objtool: fix CONFIG_STACK_VALIDATION warning for out-of-tree modules |
| Date | 2017-02-15 20:00 +0100 |
| Message-ID | <tbcY2-3Ds-9@gated-at.bofh.it> (permalink) |
| References | <tbcv0-3sf-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Feb 15, 2017 at 12:21:17PM -0600, Josh Poimboeuf wrote:
> When building a CONFIG_STACK_VALIDATION enabled kernel without the
> libelf devel package installed, the Makefile prints a warning:
>
> "Cannot use CONFIG_STACK_VALIDATION, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
>
> But when building an out-of-tree module, the warning doesn't show.
> Instead it tries to use objtool, and the build fails with:
>
> /bin/sh: ./tools/objtool/objtool: No such file or directory
>
> Make sure the warning and the disabling of objtool occur in all cases,
> by moving the CONFIG_STACK_VALIDATION checks outside the 'ifeq
> ($(KBUILD_EXTMOD),)' block in the Makefile.
>
> Reported-by: Marc MERLIN <marc@merlins.org>
> Suggested-by: Jessica Yu <jeyu@redhat.com>
> Fixes: 3b27a0c85d70 ("objtool: Detect and warn if libelf is missing and don't break the build")
> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Tested-By: Marc MERLIN <marc@merlins.org>
saruman:/usr/src/linux-block# dpkg --remove libelf-dev
saruman:/usr/src/linux-block/tools/objtool# make clean
saruman:/usr/src/linux-block# dkms install bbswitch/0.8
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make -j8 KERNELRELEASE=4.10.0-rc7-mm3kb1+ KVERSION=4.10.0-rc7-mm3kb1+...(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.10.0-rc7-mm3kb1+ (x86_64)
saruman:/usr/src/linux-block# patch -p1 -s < objtool.patch
saruman:/usr/src/linux-block# dkms install bbswitch/0.8
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make -j8 KERNELRELEASE=4.10.0-rc7-mm3kb1+ KVERSION=4.10.0-rc7-mm3kb1+...
cleaning build area...
DKMS: build completed.
bbswitch.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.10.0-rc7-mm3kb1+/updates/dkms/
depmod...
DKMS: install completed.
All good, thank you.
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | PGP 1024R/763BE901
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] objtool: fix CONFIG_STACK_VALIDATION warning for out-of-tree modules Josh Poimboeuf <jpoimboe@redhat.com> - 2017-02-15 19:30 +0100 Re: [PATCH] objtool: fix CONFIG_STACK_VALIDATION warning for out-of-tree modules Marc MERLIN <marc@merlins.org> - 2017-02-15 20:00 +0100 Re: [PATCH] objtool: fix CONFIG_STACK_VALIDATION warning for out-of-tree modules Jessica Yu <jeyu@redhat.com> - 2017-02-15 20:00 +0100 [tip:core/urgent] objtool: Fix CONFIG_STACK_VALIDATION=y warning for out-of-tree modules tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2017-02-20 10:50 +0100
csiph-web