Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1810128pxb; Sat, 23 Jan 2021 06:22:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqbz6k+DsHpkmM4f/i82oK7WFhEJyp9NhvnE2K9rAs6zhDc/OcxsowJQNrAhe+sFsvP/6r X-Received: by 2002:a17:906:a445:: with SMTP id cb5mr668961ejb.0.1611411728262; Sat, 23 Jan 2021 06:22:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611411728; cv=none; d=google.com; s=arc-20160816; b=iVgdfTrlyg2vXsaen3MiGtw6d9dHw/shTsyMnh+VvwXG4R+smwzcwA2dBS/Mfwv/Qj 6uzhPGHJqZa5liPGtU/Xz32d3XyxzDnH47OTr7OGl7PAi74Y7Zt+VfuJhLDlrhonEkF3 R7FfA4wfXPFewtm3VbZMY4bFM2OA8Jfw5qOe0I70zNcdLOonZC56uKpxfIl6niuG/gRo Ciu2cWYdnVRlX/GxI0nPeUEa5psH7Zr0uiAUrh3UkJPIM/e1m9A7pZkurRqDKk8zbYDV yeM5Ei6Uc1S2c8/I1Idlg2yJJ542r51IVjqHTL2x+CWRCdpgqlorCdm5KTivDjxqxcZn Hbeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=houlPda56vF3J2BGbbdS66qr57e2qh+Xfz+1DluwA8g=; b=WowUinHpTEjD92jWObGLrfjyEBieYDO4/6yyyi9X8UdblaWUn5p4stcqYbLIoMSiS4 Bq+R0aZ5bznuWfrRFWnvnoJeNwNheQ/5WDyyttX9PQNZ53Bxy+b6wMo4GCDnVnXKL5zA Ki+Mx14nfoeiWt2SPhoAqqONd0rCLtoXo5ENJ/53SD4GUWrrpscRJ4PBqBTJT41cyS7M z0g1FuPtiYPSZiioXUWsNB/wVakjd78Cl+cdfnmceGadJYicNV82SaCF7MnhN9WYz2Gk sGrf7vTeN8ZltPAP4+jFD0JoveCFfuK+K79iX9URp4xq8Rz+iJo1ttzbKpLew0dyXvnk msVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r12si5057482edp.3.2021.01.23.06.21.44; Sat, 23 Jan 2021 06:22:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725943AbhAWOUk (ORCPT + 99 others); Sat, 23 Jan 2021 09:20:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:34752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725798AbhAWOUj (ORCPT ); Sat, 23 Jan 2021 09:20:39 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DA3F722D5A; Sat, 23 Jan 2021 14:19:55 +0000 (UTC) Date: Sat, 23 Jan 2021 14:19:53 +0000 From: Catalin Marinas To: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, Will Deacon , Mark Rutland , David Brazdil , Alexandru Elisei , Ard Biesheuvel , Jing Zhang , Ajay Patil , Prasad Sodagudi , Srinivas Ramana , James Morse , Julien Thierry , Suzuki K Poulose , kernel-team@android.com Subject: Re: [PATCH v4 18/21] arm64: Move "nokaslr" over to the early cpufeature infrastructure Message-ID: References: <20210118094533.2874082-1-maz@kernel.org> <20210118094533.2874082-19-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210118094533.2874082-19-maz@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > arch/arm64/kernel/idreg-override.c | 17 ++++++++++++++ > arch/arm64/kernel/kaslr.c | 37 +++--------------------------- > 2 files changed, 20 insertions(+), 34 deletions(-) > > diff --git a/arch/arm64/kernel/idreg-override.c b/arch/arm64/kernel/idreg-override.c > index 1db54878b2c4..143fe7b8e3ce 100644 > --- a/arch/arm64/kernel/idreg-override.c > +++ b/arch/arm64/kernel/idreg-override.c > @@ -33,8 +33,24 @@ static const struct reg_desc mmfr1 __initdata = { > }, > }; > > +extern u64 kaslr_feature_val; > +extern u64 kaslr_feature_mask; > + > +static const struct reg_desc kaslr __initdata = { > + .name = "kaslr", We might as well rename this ftr_override or something more generic as we no longer describe registers here. Otherwise: Acked-by: Catalin Marinas