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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 32865CDB465 for ; Thu, 19 Oct 2023 14:33:08 +0000 (UTC) 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6TJG97xxTrPcRMYW+ZOWBMBJFwm4d+6YhJw6iMQ4uhc=; b=go7/uBi1a2Nqz7 5uEkhilwi2/odINR98zk1Q5o0mrbbGwCDbwFjZo69exq152XT4PC/tc2irqkZCZKPcxn4E5JXL2Up ONnLTe5iLoihbNQyLjnqZTgDwgZDKIxVpbHCnQAFOvdat+5eoj0zpLHYfxDW5BlOncN0We4YyrSoc wit8CPAbLMmXYdnVDOtvZbn30QznRR+/R/GQCR2wZHCVHgQVDNtYuPI0gUdgjlHprvVz/i9Yz/tZ5 k89FMeRzRPURR8NmorA8LPaIkFcdS9rDI+K2mUKDrNaE9O3pnRLawgenuo4YAPFVlSu6LRvfoBs5e 1hkZ8oU73zwF34SEHtgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtU4g-0005IE-06; Thu, 19 Oct 2023 14:32:34 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtU4d-0005HQ-0m for linux-arm-kernel@lists.infradead.org; Thu, 19 Oct 2023 14:32:32 +0000 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 86DE0210EA; Thu, 19 Oct 2023 14:32:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1697725948; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rFw3BFzNgR6Y8k558tesln7UDDifhhF8E5WljQRYxcQ=; b=v/1+7FbsqBDKWQ3FAyisSAjNJeTOrWHvujOxCqm3mJwCttfa2BywKyEl8DRQslHrGC3lCA 97+QPqS0jsZIharafjjHAVLch8nm+Ql0ie93i59BL6d6NibAovvOrGXkT4lgEujlymHDuV aXlBWQ7tkbskew7UjucmCqkgYAlOM6g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1697725948; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rFw3BFzNgR6Y8k558tesln7UDDifhhF8E5WljQRYxcQ=; b=m1xYoHlrTf8kbA7y/12fwXuyP5obCIUUbghMHUbPelnrgIMpWAUgMXWwyuyb7Ka0Vw876q FlHak9+BbY2ER9Ag== 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 6C5B3139C2; Thu, 19 Oct 2023 14:32:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 98VPGPw9MWVBBAAAMHmgww (envelope-from ); Thu, 19 Oct 2023 14:32:28 +0000 Date: Thu, 19 Oct 2023 16:32:27 +0200 From: Andrea della Porta To: Mark Rutland Cc: Andrea della Porta , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, nik.borisov@suse.com Subject: Re: [PATCH 2/4] arm64/process: Make loading of 32bit processes depend on aarch32_enabled() Message-ID: Mail-Followup-To: Mark Rutland , Andrea della Porta , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, nik.borisov@suse.com References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-8.20 / 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]; REPLY(-4.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_SEVEN(0.00)[7]; 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(-0.60)[81.82%] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231019_073231_433874_7184BD4A X-CRM114-Status: GOOD ( 23.12 ) 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 On 15:27 Thu 19 Oct , Mark Rutland wrote: > On Thu, Oct 19, 2023 at 02:38:32PM +0200, Andrea della Porta wrote: > > On 13:52 Wed 18 Oct , Mark Rutland wrote: > > > On Wed, Oct 18, 2023 at 01:13:20PM +0200, Andrea della Porta wrote: > > > > Major aspect of Aarch32 emulation is the ability to load 32bit > > > > processes. > > > > That's currently decided (among others) by compat_elf_check_arch(). > > > > > > > > Make the macro use aarch32_enabled() to decide if Aarch32 compat is > > > > enabled before loading a 32bit process. > > > > > > > > Signed-off-by: Andrea della Porta > > > > > > Why can't you make system_supports_32bit_el0() take the option into account > > > instead? > > > > > > > I may be wrong here, but it seems to me that system_supports_32bit_el0() > > answers teh question "can this system supports compat execution?" rather than > > "do I want this system to run any compat execution?". That's the point of > > aarch32_enabled(), to state whether we want teh system to run A32 code or not, > > regardless of the system supporting it (of course, if the system does not > > support A32 in EL0, this is a no-no, but that's another story). > > That's what the implementation does today, but we're really using it as a "do > we intend for 32-bit EL0 to work?" predicate, and generally the > system_supports_${FEATURE}() helpers are affected by the combination of actual > HW support, kernel config options, *and* kernel command line options. For > example, system_supports_sve() is affected by both CONFIG_ARM64_SVE and the > "arm64.nosve" command line option. > > Thanks, > Mark. Many thanks for the explanation, then inserting aach32_enabled() in system_supports_32bit_el0() is the way to go. Andrea _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel