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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 18 Jan 2021 14:46:36 +0000,
David Brazdil <dbrazdil@xxxxxxxxxx> wrote:
> 
> On Mon, Jan 18, 2021 at 09:45:30AM +0000, Marc Zyngier wrote:
> > 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@xxxxxxxxxx>
> Acked-by: David Brazdil <dbrazdil@xxxxxxxxxx>

[...]

> > @@ -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.
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux