From: Marc MERLIN <marc@merlins.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org, Jessica Yu <jeyu@redhat.com>,
Michal Marek <mmarek@suse.com>
Subject: Re: [PATCH] objtool: fix CONFIG_STACK_VALIDATION warning for out-of-tree modules
Date: Wed, 15 Feb 2017 10:55:48 -0800 [thread overview]
Message-ID: <20170215185548.zhjunwvzbdjsfsd6@merlins.org> (raw)
In-Reply-To: <b3088ae4a8698143d4851965793c61fec2135b1f.1487182864.git.jpoimboe@redhat.com>
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
next prev parent reply other threads:[~2017-02-15 18:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 18:21 Josh Poimboeuf
2017-02-15 18:55 ` Marc MERLIN [this message]
2017-02-15 18:59 ` Jessica Yu
2017-02-20 9:13 ` [tip:core/urgent] objtool: Fix CONFIG_STACK_VALIDATION=y " tip-bot for Josh Poimboeuf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170215185548.zhjunwvzbdjsfsd6@merlins.org \
--to=marc@merlins.org \
--cc=jeyu@redhat.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mmarek@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome