On Fri, Nov 08, 2019 at 02:14:27PM +0000, Mark Rutland wrote: > To avoid surprises, I think it'd be best to log that state later, in I was just going to add an initcall in kaslr.c to keep things together. > setup.c. We can also do that consistently, so that the user has a > positive message when KASLR is in use. So long as people are happy announcing it, I didn't add anything since I wasn't clear if this was a deliberate decision to not provide information but I see now it was more likely just the fact that it's running too early to reliably print. > enum kaslr_status { > KASLR_ENABLED, > KASLR_DISABLED, > KASLR_NO_SEED, > }; > enum kaslr_status __ro_after_init kaslr_status; > ... and switch on that in setup.c. Having the enum seems like it spreads the code out for unclear advantage, apart from the logging nothing particularly cares about anything other than the enabled/disabled decision.