Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2677067rdb; Wed, 15 Nov 2023 07:37:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKBuvbf2WJ06HrhgI2VYuQCr5tbVdgtZCjKjdwEDNcEag3298MYv0ImmJMq0TNvIRH1YUC X-Received: by 2002:a17:90a:404f:b0:283:1da8:3636 with SMTP id k15-20020a17090a404f00b002831da83636mr11917835pjg.23.1700062629636; Wed, 15 Nov 2023 07:37:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700062629; cv=none; d=google.com; s=arc-20160816; b=HQKiMSgChEPyHDUAR9CeOJzLphCAZ0bBYB+9AIgYstFPY8+HrYJE9IClJm6VgLY6f+ Nn+BJ8cylQyWOqDzkAhNtiPZ5mwSQqDgOYRfT0Rnk4Q7MMK0yi4un+hrSsNIctloC/oz 1BEMZtKYaXpAyr7m8PY0bhOfhT1aIRfoaXyQy09kdYx61TcdfQZmRCzcfbAuF4NCPyI8 kbnePIEUknlx6nhlLJbQ1cHuAuAGjZ0zxezmTPuA07xP3+yC6d7ndWTvDkgf6k0tkr/y /XgWamkPPHceKst78aEfT64Gm7sCck8ca2+baJoTZgYOTURfhDbN1ooa9BWrvL2yz9HG RYfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:to:from:date :dkim-signature:dkim-signature; bh=3DXW2C3GNEVWBnq6hYRcSZ/Y+xEDNUpXyZ4rIaBwuvw=; fh=n3CbgvOCw3jLbq4KaIfFUB323FQ5DYPwHBlflnlqXak=; b=bA4U8OZ6wz4M+6QoInrlehZ0uqCOtMkti22/Ey58mq/Hgx9uJ9C/hi9jJ2pwz/0xX2 wFfnCcDvOCKJNvmnAT0YfEZnQcWDrfxSUf3wYPXNRQ7T34ZJf2G2jg5LPtHmJJYiE9Gp yLGgyICVKLwJNzvmWV1OguHNyT11xrorcTVUtMDO6eIOzleh9B+h1JheR3Ko+s2hNrdL ZxVqJiorD0UgIyT1DgPgyrIpCRtrnqcWTNRjTGIcM8CMKRsx3iCyVfuJn99o9dy5KdYH 3lwCxZgKT/0dOpOYazH35db/DPI7mK14OvHb9DxxNDvqD+1L8tg1UYp5nfVAySOb0Q3U VIoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="np/etrMe"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id x88-20020a17090a6c6100b0026b7f68f386si19662pjj.73.2023.11.15.07.37.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 07:37:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="np/etrMe"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id EA80080298B5; Wed, 15 Nov 2023 07:36:59 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231132AbjKOPge (ORCPT + 99 others); Wed, 15 Nov 2023 10:36:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbjKOPgc (ORCPT ); Wed, 15 Nov 2023 10:36:32 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47E86195 for ; Wed, 15 Nov 2023 07:36:26 -0800 (PST) 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 BC442228BD; Wed, 15 Nov 2023 15:36:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1700062584; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3DXW2C3GNEVWBnq6hYRcSZ/Y+xEDNUpXyZ4rIaBwuvw=; b=np/etrMeI8W8tOAQxH2AbdsTB/O38Yvryklly1VrkkLhqkflwCqDqgG6N5x7gDn6i8orZe oYjf9ueY+IeQY/NTk4LTRGlNzpyPMqtluKXs2EvMPxPcQeZS49UAWPRSiVIFxf13a6WzL+ uJlaQ5JJWdwVQVjlOd9tIkFiVOs5j/Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1700062584; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3DXW2C3GNEVWBnq6hYRcSZ/Y+xEDNUpXyZ4rIaBwuvw=; b=62OkW6aQ8Rqjk8+U9KIjzlrGSucY/PFCgpO7zSesLdTs/Ptc+ALf4VtwMdquE4mzobPdwl h7JcrwqPDBeWciDQ== 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 A1E9213587; Wed, 15 Nov 2023 15:36:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id oxmpJXjlVGVDCwAAMHmgww (envelope-from ); Wed, 15 Nov 2023 15:36:24 +0000 Date: Wed, 15 Nov 2023 16:36:24 +0100 From: Andrea della Porta To: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com Subject: Re: [PATCH v2 1/4] arm64: Introduce aarch32_enabled() Message-ID: Mail-Followup-To: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com References: <1dec05cc8f54d0b85acffce69d929f13e6d81313.1698069331.git.andrea.porta@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -5.46 X-Spamd-Result: default: False [-5.46 / 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)[]; NEURAL_HAM_LONG(-3.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-1.86)[94.20%] X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Wed, 15 Nov 2023 07:37:00 -0800 (PST) On 12:56 Tue 24 Oct , Robin Murphy wrote: > On 23/10/2023 3:42 pm, Andrea della Porta wrote: > > Aarch32 bit support on 64bit kernels depends on whether CONFIG_COMPAT > > is selected or not. As it is a compile time option it doesn't > > provide the flexibility to have distributions set their own policy for > > Aarch32 support and give the user the flexibility to override it. > > > > As a first step introduce aarch32_enabled() which abstracts whether 32 > > bit compat is turned on or off. Upcoming patches will implement > > the ability to set Aarch32 compat state at boot time. > > Other than patch #3, which as previously mentioned should be unnecessary if > the kernel correctly never starts an "unsupported" AArch32 process to begin > with, what does this do that simply overriding ID_AA64PFR0_EL1.EL0 via the > existing idreg-override mechanism wouldn't? > > Thanks, > Robin You're right, I guess we can simpluy leverage system_supports_32bit_el0() calling id_aa64pfr0_32bit_el0() and override the el0 nibble from command line, instead of inventing a new kernel parameter. For the sake of simplicity, maybe we can add a new alias in idreg-override, something like 'arm64.no32bit-el0'. Thanks, Andrea