Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1271742rda; Mon, 23 Oct 2023 07:44:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEv2MD2RrfXaByp2m8CW3A/sibZIhuTzcXFvQP7/AVPHh2PPbCGnBzDWLRa+/y6cqBYzjaX X-Received: by 2002:a17:902:b7ca:b0:1ca:8b74:17f2 with SMTP id v10-20020a170902b7ca00b001ca8b7417f2mr6842752plz.6.1698072256452; Mon, 23 Oct 2023 07:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698072256; cv=none; d=google.com; s=arc-20160816; b=N4JMeY0YUYskPFtQIYqc6zbyZvAn2ng+T3qpnygB973XCqYSGSRAcNU5YtawmEigHx qhHkACpLMNjRl1Mq48c7CA9/1uJ7EO+u3LKntkXvDehM4MrtvpJdA/epIs+KwErqEBN8 Z6SwTmXmbvvDJGV8kMTPvh7qapAc6tFBeCZk0PP5DZ7cZtk8c3rkj9EWVxsm65TZrank HmUUjv29RWinqOxjXZVj0n5QHE6utmUGYcdoVTOJXXn3W9xyPWPIJV01FpONZFgUQTvM uRC0emiNp3NoLOotwy4XyW3rscE+0uhLSL7eG1LY+KXhi45l85rPkpcBL1ybWjyfwDi3 e9Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ptLMqv6iaACOOpI3/GceNmmJmtBYsEsFiVZhrERtJcU=; fh=Mt283RDXEoutdgZ0ioYgkrGAUpbBAwJ7lRTaJXIGXS8=; b=atA9N/Ox2cOgcaBEFHRrCOd38eyI46v6cgx8I2uoSqnwvcqG3VBCMmKfjB7qPZL3J0 AG+hUGM5IQSKAHpiRitgtmIg+sEW33KUvXgJkUKNhfsKiP7wmrvItzGXnwFocMZlsr9O dhpBH4LnwyW4goqR6ORH2PqYwQLSqCshHl4MEi9XTWoVeXAow8BjBkFPizkH0dgpFsJn /SkhL+Kbvfvj/H29JVxJeGk00rlQP4R4BO77m4NNby/+QChhmioOpfBpnRtOozi68dG1 7AggOiep3a8gVSB1tt9b+eL7M8dItvp0JeoY4Gfp+Jt6uO80ocaEH+8thmpnUIDMVF6L Ozzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=HpFvhsGR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id u15-20020a170903124f00b001ca87d0eea8si6437254plh.475.2023.10.23.07.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 07:44:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=HpFvhsGR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CC85E8061B4A; Mon, 23 Oct 2023 07:44:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233745AbjJWOoH (ORCPT + 99 others); Mon, 23 Oct 2023 10:44:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233807AbjJWOnq (ORCPT ); Mon, 23 Oct 2023 10:43:46 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C7CA1FD3 for ; Mon, 23 Oct 2023 07:42:28 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9011B2188F; Mon, 23 Oct 2023 14:42:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1698072146; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ptLMqv6iaACOOpI3/GceNmmJmtBYsEsFiVZhrERtJcU=; b=HpFvhsGRqrkWuoKHGLQpCHaNEeX0hCZU8Ns5O630i2hGaSX8F5c1wRpCrav8t6nLksfcoJ 6UwowYxJJBXRuTNz7bgCFJuvAzm8bfwtOP5kEueXj2qutCxLwiu8lLt+JXWoyQv5JNT7nd +UVGsPwwPFbHAXjdujBBcGqmrw6XfvY= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 73BD2139C2; Mon, 23 Oct 2023 14:42:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id WPj+GVKGNmXBdgAAMHmgww (envelope-from ); Mon, 23 Oct 2023 14:42:26 +0000 From: Andrea della Porta To: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: nik.borisov@suse.com, arnd@arndb.de, mark.rutland@arm.com, Andrea della Porta Subject: [PATCH v2 2/4] arm64/process: Make loading of 32bit processes depend on aarch32_enabled() Date: Mon, 23 Oct 2023 16:42:21 +0200 Message-ID: <2d105c9d8184686fe5aadf646bea7f46ec68ff8b.1698069331.git.andrea.porta@suse.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -2.70 X-Spamd-Result: default: False [-2.70 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-3.00)[-1.000]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_SEVEN(0.00)[8]; MID_CONTAINS_FROM(1.00)[]; FORGED_SENDER(0.30)[andrea.porta@suse.com,aporta@suse.de]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.10)[andrea.porta@suse.com,aporta@suse.de]; RCVD_TLS_ALL(0.00)[] X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 23 Oct 2023 07:44:15 -0700 (PDT) Major aspect of Aarch32 support is the ability to load 32bit processes. That's currently decided (among others) by compat_elf_check_arch() and system_supports_32bit_el0(). Make the macro use aarch32_enabled() to decide if Aarch32 compat is enabled before loading a 32bit process. Signed-off-by: Andrea della Porta --- arch/arm64/include/asm/cpufeature.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h index 1180d68daaff..778f2f3b2c7d 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -679,8 +679,9 @@ static inline bool system_supports_32bit_el0(void) { u64 pfr0 = read_sanitised_ftr_reg(SYS_ID_AA64PFR0_EL1); - return static_branch_unlikely(&arm64_mismatched_32bit_el0) || - id_aa64pfr0_32bit_el0(pfr0); + return (static_branch_unlikely(&arm64_mismatched_32bit_el0) || + id_aa64pfr0_32bit_el0(pfr0)) && + aarch32_enabled(); } static inline bool system_supports_4kb_granule(void) -- 2.35.3