lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 13 Feb 2017 00:07:09 -0800
From:   Marc MERLIN <marc@...lins.org>
To:     linux-kernel@...r.kernel.org, jpoimboe@...hat.com
Subject: Please turn "Cannot use CONFIG_STACK_VALIDATION" into build error

Hi Josh,

I'll start with the story as to why.
i've lost more hours than I care to list, because I was unable to build
the virtualbox kernel driver with newer kernels.
Sadly, it gives no useful debug info outside of
make[1]: *** No rule to make target '/tmp/vbox.0/linux/SUPDrv-linux.o', needed by '/tmp/vbox.0/vboxdrv.o'.  Stop.

It took some pretty deep debugging to finally see this:
     Trying rule prerequisite 'tools/objtool/objtool'.
     Looking for a rule with intermediate file 'tools/objtool/objtool'.
      Avoiding implicit rule recursion.
which look quite inoccuous and don't look as errors at all.
When I filed a bug with the vbox folks, they were unable to find out why
the module refused to build on my kernel, and I was stuck with older
kernels as a result.

Then, I had another module, bbswitch, to turn off the nvidia chip on my
laptop to save battery. That one also failed to build with newer
kernels, but thankfully made it more clear that the problem was related
to tools/objtool/objtool missing.

But why was it missing? No idea...
I trace that down to CONFIG_STACK_VALIDATION which there seems to be no
menu option for, so I manually disable it in .config, rebuild, and it's
automatically re-enabled. Gah.

More hair pulling, and finally I make a typo
saruman:/usr/src/linux-block# make xonfig
Makefile:1044: "Cannot use CONFIG_STACK_VALIDATION, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
scripts/kconfig/conf  --silentoldconfig Kconfig
Makefile:1044: "Cannot use CONFIG_STACK_VALIDATION, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
make: *** No rule to make target 'xonfig'.  Stop.

Sure enough, this was my problem, but I never saw the error message
because I build kernels with 
make-kpkg --revision 1gandalf kernel-image
which does other stuff and hid that warning, which really should have
been a fatal error in my opinion.

Given that 
1) CONFIG_STACK_VALIDATION seems silently auto enabled.
2) without libelf-dev, the kernel will build but will leave a tree
missing objtool, which in turn causes (all?) 3rd party modules to fail
building.
3) and that it's kind of non trivial to find out why if that happens, 

Would you consider making
"Cannot use CONFIG_STACK_VALIDATION, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
a build error as opposed to a warning?
This sure would have saved me countless errors of debugging the wrong
things.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ