Re: [RFC PATCH] x86/Kconfig: Disable KASLR on debug builds

Borislav Petkov
2023-12-01T16:25:00Z

On Fri, Dec 01, 2023 at 09:16:10AM -0700, Nathan Chancellor wrote:
> Right, this is the diff of Fedora's configuration before and after this
> change:

Sorry, but what's the point of a .config which has EXPERT, DEBUG_KERNEL
*and* KASLR enabled?

Debugging the kernel with KASLR enabled is a futile exercise in time
waste. You should either enable KASLR and disable DEBUG_KERNEL or the
opposite. Both make very little sense to me.

Or, if there really is a valid reason for having DEBUG_KERNEL *and*
KASLR enabled, I can probably suggest another option under DEBUG_KERNEL
which says "Do stable virtual addresses" and which disables KASLR. At
least we'll have it explicit.

And the distro configs do get re-checked periodically so "it is already
in the distro config" is not really an argument I'd say.

Thx.

--
Regards/Gruss,
Boris.