Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3061814imm; Sun, 1 Jul 2018 11:20:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKISmnAya2B2rf6+O+T04FWot7e/qF9zdTWjpKYdUniJ1rv1e/Ymdc+edDAIkqSmELMqA/mK X-Received: by 2002:a17:902:8341:: with SMTP id z1-v6mr23118750pln.40.1530469236157; Sun, 01 Jul 2018 11:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530469236; cv=none; d=google.com; s=arc-20160816; b=Sa2zmA0i1GcUlCE1j3IsUeN7oMzJYzTYdklCyjh7UySsDUMo06aVlL+6dEvLQ0MLd/ 7qMcYHoTTufdcCSqxmMWXSWXEiBG8Y7xwNmkGhauT7QE44ehxBxQ2EVGWVbD4JKd4SGl nlH3UwBh05NotMqXdGQfEfehKovTZrb/pQ+WyAPgFFGbN1A/X6ZiVONWEzgHh+N4TWCI F9wVXwsgZ17OtebT00YPEHSE+xVdwKuR11fgcHaVqXc5cgQJN76jfFfqyD7TEbYRpTdi RrFHRvtOLashlu95jxfsPv5P03tnt7fRzd3xXJTfjoBMTccHh43CxEWxd9QmwsgJtcee EKYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=SOZCf0TeY7hKD4bSB1DX/u1jqmYI2jPngEox4v4GaV4=; b=fB8HDuLDtQ3jvblARd9A7h4LrbIHoBHSofTRJZIrkz0TpNlCgAeTBwPeMtmVTgP/SD 1N8mBw7bXzJojv3sAvriwdpbyhbIdw248NfC7g7KaAf9cfC7vtXf4Pm5tazyXb0XMKal 6FkZ9SEWAx0oSZk+OO84SU4pLcFa0ZGv43iV2vU/+1GwCJC2PauBBuR0Z3JRxw/jDqMS U/RFNdae1YRwSMYKP3jgkJDphXy71XUUhcCszzUZMCa+UfJR+lgbRQPvoNgauz+TtN3U si6PyxiESwq6gWpq2H7k+r0AVwTnUiNgVEUAEBBbj9SgARqfsrqzdW8WudX7iwr3AbtG WO3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5-v6si13699021plr.56.2018.07.01.11.20.22; Sun, 01 Jul 2018 11:20:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933962AbeGASTL (ORCPT + 99 others); Sun, 1 Jul 2018 14:19:11 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33690 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965202AbeGAQZc (ORCPT ); Sun, 1 Jul 2018 12:25:32 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B912EAEF; Sun, 1 Jul 2018 16:25:31 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wei Xu , Sudeep Holla , Will Deacon , Catalin Marinas Subject: [PATCH 4.9 031/101] arm64: kpti: Use early_param for kpti= command-line option Date: Sun, 1 Jul 2018 18:21:17 +0200 Message-Id: <20180701160758.404235963@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160757.138608453@linuxfoundation.org> References: <20180701160757.138608453@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Will Deacon commit b5b7dd647f2d21b93f734ce890671cd908e69b0a upstream. We inspect __kpti_forced early on as part of the cpufeature enable callback which remaps the swapper page table using non-global entries. Ensure that __kpti_forced has been updated to reflect the kpti= command-line option before we start using it. Fixes: ea1e3de85e94 ("arm64: entry: Add fake CPU feature for unmapping the kernel at EL0") Cc: # 4.16.x- Reported-by: Wei Xu Tested-by: Sudeep Holla Tested-by: Wei Xu Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -826,7 +826,7 @@ static int __init parse_kpti(char *str) __kpti_forced = enabled ? 1 : -1; return 0; } -__setup("kpti=", parse_kpti); +early_param("kpti", parse_kpti); #endif /* CONFIG_UNMAP_KERNEL_AT_EL0 */ static const struct arm64_cpu_capabilities arm64_features[] = {