Thread (54 messages) 54 messages, 4 authors, 2021-01-24

Re: [PATCH v4 18/21] arm64: Move "nokaslr" over to the early cpufeature infrastructure

From: Marc Zyngier <maz@kernel.org>
Date: 2021-01-24 18:42:08
Also in: kvmarm, lkml

On Mon, 18 Jan 2021 14:46:36 +0000,
David Brazdil [off-list ref] wrote:
On Mon, Jan 18, 2021 at 09:45:30AM +0000, Marc Zyngier wrote:
quoted
Given that the early cpufeature infrastructure has borrowed quite
a lot of code from the kaslr implementation, let's reimplement
the matching of the "nokaslr" option with it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <redacted>
[...]
quoted
@@ -126,7 +95,7 @@ u64 __init kaslr_early_init(void)
 	 * Check if 'nokaslr' appears on the command line, and
 	 * return 0 if that is the case.
 	 */
-	if (is_kaslr_disabled_cmdline(fdt)) {
+	if (kaslr_feature_val & kaslr_feature_mask & 0xf) {
nit: Isn't the 0xf redundant here? You don't re-mask for VH either.
Actually, I do. See the two back to back ubfx that extract both the
mask and the feature. The "& 0xf" here serves the same purpose.

Is it redundant? At the moment, quite possibly. But since we have
space for 16 "features", this is an indication that we are only using
the first one. I expect that eventually, we'll use it for other
things.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help