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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 69351C61DF7 for ; Fri, 24 Nov 2023 11:31:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=a6qDLaSJUZv351sLoognBkjakXwP5p3wZRuZ4ieBgTg=; b=jtUuHEu/WGTp6z+f1S5Zwkc4fS yYm64VL9eZJ2kQHzCtwxOyZQRJogJ5ITdAy/8iP3puhfzbi3Ka41vKVfF0QIVvLAkq7RusY3oF7FG V2+y0HL6WYpteJhqWKWNmj2SP3a3A0+RIYdRZTGs0ysgYQ72MJUUPPGwCurz3lqh6YanySJjkg4NY R3gGNY2afN4fiskxSt7d59B9KqDbDesSLlz3xd9jI2Yru4mFI/htpGldrWM7c/7k9VM03gU9xWRGz cRwReNMPxBcNZdB7AmEl5NsyWrznRPz9ehhF0G6ljlfDi2rTCcEsOuj6wi9vfmDYO3HmeNZMke2uS dt5KHB9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r6UPZ-006yWo-1V; Fri, 24 Nov 2023 11:31:53 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r6TJL-006p6j-1q for linux-arm-kernel@bombadil.infradead.org; Fri, 24 Nov 2023 10:21:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Cc:To:From:Subject: Message-ID:References:Mime-Version:In-Reply-To:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=tMMhe0jS9PrUVmoXP4Bu0W8PlaT5U2O4xT0LtFP/pq4=; b=o5feXquH7KkTMvT1mjQl3nvH/U nb1idS98yALtheDd8WTBAXK+MK4z3Uikcnsb7WRUPWmUfADh1D03dHHoJNRz5Zz7znoaagOjzw0Ip Suif1jHkHen89zydawd8BehP3cCuZQeBlTxriTJ4DrdctqDs02ThxwV3Y2v1X+T5JvGtrPmqjZFJB 3T5fVHbiryuUFHiwJG4tvpsenhCAA41wmAzxQBfmsCN1RZjQfid5TSLCCZhtSTOVAbR67PyRjdMIe nJ+T4fWsNv5xe90rGVbr8QpFb6THWjSdJOHNmldByAP8j88O90gE3zpB2dg0Qplx+qCC6shd2g/5H OCSvdOhw==; Received: from mail-wm1-x349.google.com ([2a00:1450:4864:20::349]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r6TJF-00DqUC-2N for linux-arm-kernel@lists.infradead.org; Fri, 24 Nov 2023 10:21:20 +0000 Received: by mail-wm1-x349.google.com with SMTP id 5b1f17b1804b1-40b29868c6eso9188655e9.3 for ; Fri, 24 Nov 2023 02:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1700821275; x=1701426075; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=tMMhe0jS9PrUVmoXP4Bu0W8PlaT5U2O4xT0LtFP/pq4=; b=QyLr8zbRqkdIO6mip8xLRQRi739nwjRj1IONFTJJAaqR1mkWDW6uzbc7m05fP+ifs5 YtjgawgOi/dLhpddrQi0QmE8wbzAgQH8ehr5CF6Q0Uc6B3sjuQZSMS8oLUbZ8+W2ipoz XqTXpDvYVHUrlXrDxenhoa7ir8kNdLvFAZVmyNONEKRqZpeKVUkr37mpRfNMAilfNKAC UN2k5VIr9oD5pM2+5BFuTYs8sp6ojMtw+69fmAechoXeqW2XHRmi8gKkJY3uAj8sImc5 mLu15onkeret6LBXP0J/eMytHTNjdE1zRRvdqJo4Lg4/5OMt/p5S7LjKRgCSRuoYe9Ds J/1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700821275; x=1701426075; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tMMhe0jS9PrUVmoXP4Bu0W8PlaT5U2O4xT0LtFP/pq4=; b=F6HD+Pb8JkQDA2f0VtAOqMZpdGiNISVByCkOWs+/23My686pa2dbseGwyVxaY3DR2p oPcGzoMskvZHeexlaixU2zC9ZXppW+Ie/1eC5y/DKzIgBE1nrUcsxe4lrrR/Yyi+QnTg JlzrYHCzVeyGh/eH1OwE7tS8aTMUU+JMgorQtV6F7hAEGxKylDgi1rPD4Lgu6AWxifEz FKJMA8kvXpZMuk8jIcc06AZ9jL7FmRWZ0C1UhaBNswXyzNo6tg7gazz24hS6iK+0mvSl eRplfXNyx/BZuG3p7TIRpg5YcUJP2UuX1rU/qaD+TkAIxEIujxPMAkPwAJ2X7dcZi3Qq llLw== X-Gm-Message-State: AOJu0Ywj88vht64xjQihDTm4nZgVHtRVBfvUNGsqZlAPoD3tpCUvBb0g xt3LrSC+/X8vvx3/CvBpct8wbnzuheDDBDzBfsCOpJo+7cFhf/0bztbDTIsAKGSHm/UxScOIC5B bVVJZr1T9CvelODMyFsTo/OGkOl6f52uOowbNa0Q5qzCMdXDc9T3hxdWmH/Yr3nUnU9oh7wDcFi E= X-Google-Smtp-Source: AGHT+IEwSBAF2KnDUvM42UZYH38I+JCoDNOHq3GWhSGFOTO22pQa6hbMV0hxSPRCWA61GWd8zknbA4yC X-Received: from palermo.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:118a]) (user=ardb job=sendgmr) by 2002:a05:600c:1d1e:b0:40a:1f3f:be95 with SMTP id l30-20020a05600c1d1e00b0040a1f3fbe95mr46494wms.7.1700821275510; Fri, 24 Nov 2023 02:21:15 -0800 (PST) Date: Fri, 24 Nov 2023 11:19:07 +0100 In-Reply-To: <20231124101840.944737-41-ardb@google.com> Mime-Version: 1.0 References: <20231124101840.944737-41-ardb@google.com> X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-Developer-Signature: v=1; a=openpgp-sha256; l=1576; i=ardb@kernel.org; h=from:subject; bh=JtjBaspfCh1uG8h8kKWYAyrJQ/3eFGtzV80JlrHN+gk=; b=owGbwMvMwCFmkMcZplerG8N4Wi2JITWhYpnTLP1Ic+2XS3sPLW/0lhIV/OheqDB32/K3ayT3F URrvXbqKGVhEONgkBVTZBGY/ffdztMTpWqdZ8nCzGFlAhnCwMUpABPR/8fI0MIux/epMr6Xc8bk tC3290+WfYnTXOMm/XpF4LHTC+dmfWf4XxXE+D9qt5Xws5mKcybH280uWZXMEftVqUL/4+/Z63/ VcgEA X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog Message-ID: <20231124101840.944737-68-ardb@google.com> Subject: [PATCH v5 27/39] arm64/kernel: Move 'nokaslr' parsing out of early idreg code From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: Ard Biesheuvel , Catalin Marinas , Will Deacon , Marc Zyngier , Mark Rutland , Ryan Roberts , Anshuman Khandual , Kees Cook X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231124_102118_102053_D444102E X-CRM114-Status: GOOD ( 12.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 From: Ard Biesheuvel Parsing and ignoring 'nokaslr' can be done from anywhere, except from the code that runs very early and is therefore built with limitations on the kind of relocations it is permitted to use. So move it to a source file that is part of the ordinary kernel build. Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/kaslr.c | 7 +++++++ arch/arm64/kernel/pi/idreg-override.c | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm64/kernel/kaslr.c b/arch/arm64/kernel/kaslr.c index efbeb8356769..1da3e25f9d9e 100644 --- a/arch/arm64/kernel/kaslr.c +++ b/arch/arm64/kernel/kaslr.c @@ -34,3 +34,10 @@ void __init kaslr_init(void) pr_info("KASLR enabled\n"); __kaslr_is_enabled = true; } + +static int __init parse_nokaslr(char *unused) +{ + /* nokaslr param handling is done by early cpufeature code */ + return 0; +} +early_param("nokaslr", parse_nokaslr); diff --git a/arch/arm64/kernel/pi/idreg-override.c b/arch/arm64/kernel/pi/idreg-override.c index bcba0ce71af0..26961e0f94b7 100644 --- a/arch/arm64/kernel/pi/idreg-override.c +++ b/arch/arm64/kernel/pi/idreg-override.c @@ -198,13 +198,6 @@ static const struct { { "nokaslr", "arm64_sw.nokaslr=1" }, }; -static int __init parse_nokaslr(char *unused) -{ - /* nokaslr param handling is done by early cpufeature code */ - return 0; -} -early_param("nokaslr", parse_nokaslr); - static int __init parse_hexdigit(const char *p, u64 *v) { // skip "0x" if it comes next -- 2.43.0.rc1.413.gea7ed67945-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel