From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAA95C433E0 for ; Sun, 24 Jan 2021 18:42:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 537B122C9F for ; Sun, 24 Jan 2021 18:42:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 537B122C9F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Subject:To:From: Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=a2XRiroMWIHWxhIBINVdgUYPDueKP6HLWzAritrUCRI=; b=ALbmRYeZZeVd6/5W7mn/XEa+N eVawaX+N57uTPQiuLwxx1EdOZ0d1Tzd87fkuXFa/Z7h+IVWdRcbFpmkQeVA/vjP5K4we4uKqrtCqN QeFEX3U519rFCzgCjYN/nkTaYYrkwDvCU8yCdrQhZgAG70ckE+JOdVWyamweXZ8ReLRMGi+Kv7mF8 /D3BH7bSPMFtTyTJvietQJfyUXw7ib0DAH5VhcR9KYEkn9ag44yDnMREvsG9vtwqg6iNEVttQBEZZ Tgx+XuQCLmspx+B6XCnfTAbkCGqSfvThKQG8WO0OFt88DicGqM6c/UZWYoiccjncebSS0CwkNtUx8 cx2cJQWkQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l3kKE-0007gp-6p; Sun, 24 Jan 2021 18:41:26 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l3kKC-0007gV-I9 for linux-arm-kernel@lists.infradead.org; Sun, 24 Jan 2021 18:41:25 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 40E8A22C9F; Sun, 24 Jan 2021 18:41:23 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1l3kK9-009lag-3K; Sun, 24 Jan 2021 18:41:21 +0000 Date: Sun, 24 Jan 2021 18:41:19 +0000 Message-ID: <87tur6jhyo.wl-maz@kernel.org> From: Marc Zyngier To: David Brazdil Subject: Re: [PATCH v4 18/21] arm64: Move "nokaslr" over to the early cpufeature infrastructure In-Reply-To: <20210118144636.kysdvnmcdm7it5zp@google.com> References: <20210118094533.2874082-1-maz@kernel.org> <20210118094533.2874082-19-maz@kernel.org> <20210118144636.kysdvnmcdm7it5zp@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: dbrazdil@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, alexandru.elisei@arm.com, ardb@kernel.org, jingzhangos@google.com, pajay@qti.qualcomm.com, psodagud@codeaurora.org, sramana@codeaurora.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210124_134124_677616_FE7FEA08 X-CRM114-Status: GOOD ( 22.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Jing Zhang , kernel-team@android.com, Srinivas Ramana , Suzuki K Poulose , Catalin Marinas , Alexandru Elisei , linux-kernel@vger.kernel.org, Ard Biesheuvel , James Morse , Julien Thierry , Ajay Patil , Prasad Sodagudi , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 18 Jan 2021 14:46:36 +0000, David Brazdil 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 > Acked-by: David Brazdil [...] > > @@ -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