Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 668010 - sys-kernel/spl[debug]: cannot build on linux>=4.14 due to CONFIG_CHECK=FRAME_POINTER
Summary: sys-kernel/spl[debug]: cannot build on linux>=4.14 due to CONFIG_CHECK=FRAME_...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Richard Yao (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-08 01:07 UTC by unixway.drive+bugs.gentoo
Modified: 2021-03-01 11:05 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description unixway.drive+bugs.gentoo 2018-10-08 01:07:37 UTC
I spent quite some time trying to figure out how to turn CONFIG_FRAME_POINTER on only to discover that not only it is not user-selectable since 2.6.29 [1], it is no longer used on x86 and x86_64 since 4.14 [2].

[1] https://github.com/torvalds/linux/commit/da4276b8299a6544dc41ac2485d3ffca5811b3fb
[2] https://github.com/torvalds/linux/commit/b0c79f49c343cda8954b3322984c32f258ca4ccb
Comment 1 Georgy Yakovlev archtester gentoo-dev 2018-10-15 05:04:41 UTC
snip from 
 arch/x86/Kconfig.debug


config FRAME_POINTER
	depends on !ORC_UNWINDER && !GUESS_UNWINDER
	bool


looks like you need FRAME_POINTER_UNWINDER=y, it will enable what you are looking for allowing spl debug constraint in the ebuild to be satisfied.
it is still used, but indirectly, and it's possible to enable it, i just did that on 4.18.14 with no problems at all.

reaper /usr/src/linux-4.18.14-gentoo # cat .config | grep FRAME_POINTER
CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_FRAME_POINTER=y << this
CONFIG_UNWINDER_FRAME_POINTER=y << this actually sets ^^



@ryao was playing working on debug stuff in zfs ebuilds, not sure is frame pointer unwinder is a hard requirement for a debugging build of spl or it'll work with other unwinders.

I can build spl with CONFIG_UNWINDER_ORC=y and FRAME_POINTER=n  just fine, but haven't checked if it actually works or produces reliable stack traces.

but probably @ryao wanted to have a reliable stack traces for debugging builds and that's why he set the ebuild to require kernel to be configured with frame pointers.


citing kernel explanation:
FRAME_POINTER_UNWINDER
This option enables the frame pointer unwinder for unwinding kernel stack traces.

The unwinder itself is fast and it uses less RAM than the ORC unwinder, but the kernel text size will grow by ~3% and the kernel's overall performance will degrade by roughly 5-10%.

This option is recommended if you want to use the livepatch consistency model, as this is currently the only way to get a reliable stack trace (HAVE_RELIABLE_STACKTRACE).


anyway, I'll leave it up to @ryao
Comment 2 unixway.drive+bugs.gentoo 2018-10-16 14:02:42 UTC
> arch/x86/Kconfig.debug

Aw shoot, turns out menuconfig's search interface is showing me definitions from the wrong file (lib/Kconfig.debug) all along, and it's 'depends on' in it that threw me off. Thanks for pointing me to the unwinder option!

I'll leave this report open so that @ryao can evaluate whether it makes sense to allow kernels with ORC_UNWINDER (although I don't see how one can compose CONFIG_CHECK to check for either ORC or FRAME_POINTER).
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-01 11:05:25 UTC
We removed sys-kernel/spl some time ago.