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=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 9FA42C4743E for ; Tue, 8 Jun 2021 18:04:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8929261380 for ; Tue, 8 Jun 2021 18:04:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234212AbhFHSGs (ORCPT ); Tue, 8 Jun 2021 14:06:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:46366 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234114AbhFHSGd (ORCPT ); Tue, 8 Jun 2021 14:06:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ECBB16139A; Tue, 8 Jun 2021 18:04:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623175480; bh=X0Sg3u/RIvtZyAZgbKHZGE8qAajKl4+RMMm0lxozkiE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L2v6oteYdGmHBBWDDgojYq/grEiIBcNbDk9a7MVx7YqLpGje0ngyoMZS8/E+yYa39 Hx3qa8tA6ER9OL6C2issSFS2QKSwH2nkyWyLHaaAILCw1BUUY/RhmrJ3P6Nm1M+VU0 WoS7MPq22Vf4drfI5EXY4/SHxOW1d7VI4Acw8S2xvWrIXnR6fpsINdveaNFeV9GXfA Fnfid0fM3wIboUs81t/7FED3HxHzq2UQ1ILuEKnM79ul/jYssktmy/COdve+0GGpAi hFT7qWJ1PO1meY5RrW1wZgUuYQ4GWLpMTm/I4wxlhaU7zPisFosx6LFqr8F2BuQfGy JDCG7488bQ94A== From: Will Deacon To: linux-arm-kernel@lists.infradead.org Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Will Deacon , Catalin Marinas , Marc Zyngier , Greg Kroah-Hartman , Peter Zijlstra , Morten Rasmussen , Qais Yousef , Suren Baghdasaryan , Quentin Perret , Tejun Heo , Johannes Weiner , Ingo Molnar , Juri Lelli , Vincent Guittot , "Rafael J. Wysocki" , Dietmar Eggemann , Daniel Bristot de Oliveira , Valentin Schneider , Mark Rutland , kernel-team@android.com Subject: [PATCH v9 18/20] arm64: Hook up cmdline parameter to allow mismatched 32-bit EL0 Date: Tue, 8 Jun 2021 19:03:11 +0100 Message-Id: <20210608180313.11502-19-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210608180313.11502-1-will@kernel.org> References: <20210608180313.11502-1-will@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Allow systems with mismatched 32-bit support at EL0 to run 32-bit applications based on a new kernel parameter. Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon --- Documentation/admin-guide/kernel-parameters.txt | 8 ++++++++ arch/arm64/kernel/cpufeature.c | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index cb89dbdedc46..a2e453919bb6 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -287,6 +287,14 @@ 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 + and hot-unplug operations may be restricted. + 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 854ade5b1de1..6f4aa006f130 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1298,6 +1298,13 @@ const struct cpumask *system_32bit_el0_cpumask(void) return cpu_possible_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.32.0.rc1.229.g3e70b5a671-goog 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=-17.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,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 ABCA8C47082 for ; Tue, 8 Jun 2021 18:22:16 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7C11561376 for ; Tue, 8 Jun 2021 18:22:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C11561376 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3vxjBtjHOPBjQ8Q6RaJ2sDTIPBOS/KxP1acKTiAwB7Q=; b=ZUzEc1oYsp8Z8Y WnJkrXsVXJmWVYmOdOaE+rUcSHfXFk6BoN4ILyk7p/YvEfk2SVMIo9TWgKlewctl9T9gpeksKeVEs R6XVqtNL5uygHQKK+qssZ0KpmQvv/gQ7d4IrwNkxbymIcvCH8WXxXanfzyMUoNFwmuBdaunKX8NKU rNcrAJMLOn+z+9UTYuq/EXlPmAKw5swzqMHQCOGJcNW3DypwfFqy4Wy5JrXzp+O7LcBnppoVTsXty icvNVWUUy1mBASwl/lgxL8ADgnz4F9K2xGyDPLzm91n2Gqpr/SkpZJxLVrw+Abq9y9okhkuwtpwtI 4xGjBgE9uYBH56JepM6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqgKU-009xOM-8Z; Tue, 08 Jun 2021 18:20:00 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqg5g-009rEN-QP for linux-arm-kernel@lists.infradead.org; Tue, 08 Jun 2021 18:04:42 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id ECBB16139A; Tue, 8 Jun 2021 18:04:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623175480; bh=X0Sg3u/RIvtZyAZgbKHZGE8qAajKl4+RMMm0lxozkiE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L2v6oteYdGmHBBWDDgojYq/grEiIBcNbDk9a7MVx7YqLpGje0ngyoMZS8/E+yYa39 Hx3qa8tA6ER9OL6C2issSFS2QKSwH2nkyWyLHaaAILCw1BUUY/RhmrJ3P6Nm1M+VU0 WoS7MPq22Vf4drfI5EXY4/SHxOW1d7VI4Acw8S2xvWrIXnR6fpsINdveaNFeV9GXfA Fnfid0fM3wIboUs81t/7FED3HxHzq2UQ1ILuEKnM79ul/jYssktmy/COdve+0GGpAi hFT7qWJ1PO1meY5RrW1wZgUuYQ4GWLpMTm/I4wxlhaU7zPisFosx6LFqr8F2BuQfGy JDCG7488bQ94A== From: Will Deacon To: linux-arm-kernel@lists.infradead.org Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Will Deacon , Catalin Marinas , Marc Zyngier , Greg Kroah-Hartman , Peter Zijlstra , Morten Rasmussen , Qais Yousef , Suren Baghdasaryan , Quentin Perret , Tejun Heo , Johannes Weiner , Ingo Molnar , Juri Lelli , Vincent Guittot , "Rafael J. Wysocki" , Dietmar Eggemann , Daniel Bristot de Oliveira , Valentin Schneider , Mark Rutland , kernel-team@android.com Subject: [PATCH v9 18/20] arm64: Hook up cmdline parameter to allow mismatched 32-bit EL0 Date: Tue, 8 Jun 2021 19:03:11 +0100 Message-Id: <20210608180313.11502-19-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210608180313.11502-1-will@kernel.org> References: <20210608180313.11502-1-will@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210608_110440_913816_43D884E4 X-CRM114-Status: GOOD ( 12.42 ) 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 Allow systems with mismatched 32-bit support at EL0 to run 32-bit applications based on a new kernel parameter. Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon --- Documentation/admin-guide/kernel-parameters.txt | 8 ++++++++ arch/arm64/kernel/cpufeature.c | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index cb89dbdedc46..a2e453919bb6 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -287,6 +287,14 @@ 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 + and hot-unplug operations may be restricted. + 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 854ade5b1de1..6f4aa006f130 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1298,6 +1298,13 @@ const struct cpumask *system_32bit_el0_cpumask(void) return cpu_possible_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.32.0.rc1.229.g3e70b5a671-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel