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=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 17F9FC388F7 for ; Fri, 13 Nov 2020 09:39:14 +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 99B6822263 for ; Fri, 13 Nov 2020 09:39:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="0u7lKZWG"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="p8ja5dED" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 99B6822263 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:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2s+cCWfAbc2B+0I0S/wd9PaIFxUv1/dxa7BIVraNEJ0=; b=0u7lKZWGWS0qQm8KWgPSJR0YY KZQBxtwW4li/4CD1x6gRsCJLt8DfgcTmlIj/bNyvG3px+Ycxbeb1Wj7up3g8nDM2nniDtpHbSlfow aQXW5UKg98QKwXXTtG+eG/o0laVAG1gnK6H08q/U2dfzanKuZe2nx8Pa7cUDgJ+gkQSq1ZlhEXMlf Z2qoiGA58rEGZ0QHWeP//Jst24UeHSDLsQM6feOLSAvaNmppdgfkvbDqOccuvUEgyMs/WzCQUBdkt LO41FBzq2iVDi9id0t+4uvoxLrBQYjZhxeChwGi8kiOSkUkETATZ7p5h8AxvkGZdWKV7vripLtwhX bK7/zNX7g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdVXa-0002eG-4J; Fri, 13 Nov 2020 09:38:46 +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 1kdVWp-0002KU-6c for linux-arm-kernel@lists.infradead.org; Fri, 13 Nov 2020 09:38:00 +0000 Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 004842224D; Fri, 13 Nov 2020 09:37:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605260278; bh=pyZT5qD+AOrZwx9wlgWYY4ZAqPT58rRrfL1buWsPYnk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p8ja5dEDu9Kq7iP/mbreuLWq0Wx/NeTfzBLjKvZ38pEgbJ7azo8Y+RJkmt4SAONGk wHrU3XGPofiwF3qgrGDYRLz7pTvW7ZFSfVTswv9J1ewexzAlE2e+JxrwoO32YOo2Mc eltkDvXDQalZXOCA1/o3/Z2bnrV7Yqmqdj35zPm4= From: Will Deacon To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 06/14] arm64: Hook up cmdline parameter to allow mismatched 32-bit EL0 Date: Fri, 13 Nov 2020 09:37:11 +0000 Message-Id: <20201113093720.21106-7-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201113093720.21106-1-will@kernel.org> References: <20201113093720.21106-1-will@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201113_043759_450002_0AE5C6A8 X-CRM114-Status: GOOD ( 15.33 ) 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: linux-arch@vger.kernel.org, Marc Zyngier , kernel-team@android.com, Vincent Guittot , Juri Lelli , Quentin Perret , Peter Zijlstra , Catalin Marinas , Johannes Weiner , linux-kernel@vger.kernel.org, Qais Yousef , Suren Baghdasaryan , Ingo Molnar , Li Zefan , Greg Kroah-Hartman , Tejun Heo , Will Deacon , Morten Rasmussen 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 Allow systems with mismatched 32-bit support at EL0 to run 32-bit applications based on a new kernel parameter. Signed-off-by: Will Deacon --- Documentation/admin-guide/kernel-parameters.txt | 7 +++++++ arch/arm64/kernel/cpufeature.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 526d65d8573a..f20188c44d83 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -289,6 +289,13 @@ do not want to use tracing_snapshot_alloc() as it needs to be done where GFP_KERNEL allocations are allowed. + allow_mismatched_32bit_el0 [ARM64] + Allow execve() of 32-bit applications and setting of the + PER_LINUX32 personality on systems where only a strict + subset of the CPUs support 32-bit EL0. When this + parameter is present, the set of CPUs supporting 32-bit + EL0 is indicated by /sys/devices/system/cpu/aarch32_el0. + amd_iommu= [HW,X86-64] Pass parameters to the AMD IOMMU driver in the system. Possible values are: diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index a7a9b7bffc49..dfded018af44 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1273,6 +1273,13 @@ const struct cpumask *system_32bit_el0_cpumask(void) return cpu_present_mask; } +static int __init parse_32bit_el0_param(char *str) +{ + allow_mismatched_32bit_el0 = true; + return 0; +} +early_param("allow_mismatched_32bit_el0", parse_32bit_el0_param); + static ssize_t aarch32_el0_show(struct device *dev, struct device_attribute *attr, char *buf) { -- 2.29.2.299.gdc1121823c-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel