Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1271724rda; Mon, 23 Oct 2023 07:44:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHyCCrMfb5AhzH5OraqAT71zqNedHNywGsMQEOQQRBGqbyqnrzAjy42ZS+D/6eaZrTjKwNh X-Received: by 2002:a05:6a00:248d:b0:6b2:5992:9e89 with SMTP id c13-20020a056a00248d00b006b259929e89mr11920316pfv.9.1698072253568; Mon, 23 Oct 2023 07:44:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698072253; cv=none; d=google.com; s=arc-20160816; b=eovHlBiH+1Fat8IhZPaqoDB9lXIj0cGpe8vYuJDq1Vt6LFf84MMiDUmNDnFbuBuXfl AUwxrZUZMSqN4FzuyZ41Pp3uqEIfSQlKFX5P/9p5vYiv6QEDXev5ahKgcUUQ9WAilj2I GVnXkM7tdjjPDoDtT7vrXOJHiTIM7WfUx3TbPgqxPDUiGL+fR5KJWrYz+2hqICfcGfv9 wpUyIIOK8r5PZV+xVwezZZ7NSXX9KOy3+I7/Fmzuwi/mOB3iflf25FECpTcJ47hJj3z8 G7zLy7OuU8c/leeZQ+ND3jYOnVH/WaIoxET1Wsk7HwKryj3dblHn4ggLq0mqq830rPqK Ms/g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=RTYsroAWljaROpiVAPyNscGJ0JLNhWtas14NGofBG64=; fh=Mt283RDXEoutdgZ0ioYgkrGAUpbBAwJ7lRTaJXIGXS8=; b=m+5bFUUFUAJCTRp1Qf9vmNBWmHSx6YKi1j0jL0wJizMDDozAWdAfFc9fetVzCf86dc jrJPpFjwypccJSuZSfX8i8LiU2BPyb496LCSNQzhOLCczbLT3xj1qdPnQAmtHC2LXLdN eB7lxqSQMSaABzql+aftC5SkmqTXUriHboy3LeYH23pgAJ9jphL+IU6KOz9mdAm2eKiR nXL+Y0zOEq/6ZZIDsBCHgvdrlino7cFRcBeNvrN7J6DtDYZbt5b/DPE9qEaUa7kpMbDr QuG9YOg4rX0qoCUcATJgqidRWalcF2D5FSZLUluIlitG+FV2WNXffMLYd0OIPprPqfxw yIvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=G7aViXm7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id bs124-20020a632882000000b005694a4640afsi6610485pgb.95.2023.10.23.07.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 07:44:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=G7aViXm7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 52C7B80AA24F; Mon, 23 Oct 2023 07:44:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233646AbjJWOoA (ORCPT + 99 others); Mon, 23 Oct 2023 10:44:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233751AbjJWOnp (ORCPT ); Mon, 23 Oct 2023 10:43:45 -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 83C601FCF for ; Mon, 23 Oct 2023 07:42:26 -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 2E1112188D; Mon, 23 Oct 2023 14:42:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1698072145; 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; bh=RTYsroAWljaROpiVAPyNscGJ0JLNhWtas14NGofBG64=; b=G7aViXm79Su4cvNDxWqYhqYC+UISHnBFJqW32gY5/ALtclMStDPw4XdGDbh56qLoHOaAi3 qCoARrOQDg5H9DMh5BEnGIJeOc8/fxbzF5DsUKGDzc/Xi1n+ZRMZQogEpFef06FKaAxRuw 3YNIN/1FEp7FV+mgzOZen1xSBcpZJKI= 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 10F63139C2; Mon, 23 Oct 2023 14:42:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id aADMAVGGNmW5dgAAMHmgww (envelope-from ); Mon, 23 Oct 2023 14:42:25 +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 0/4] arm64: Make Aarch32 compatibility enablement optional at boot Date: Mon, 23 Oct 2023 16:42:19 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out1.suse.de; none X-Spam-Score: 1.30 X-Spamd-Result: default: False [1.30 / 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)[]; 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=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 23 Oct 2023 07:44:09 -0700 (PDT) This is the second attempt of the patch, reviewed as follows: * Reworked subject and description to avoid the term 'emulation' and to address generically 'exceptions' instead of 'syscalls' (mark.rutland) * Moved aarch32_enabled() check inside system_supports_32bit_el0() (mark.rutland) * Renamed AARCH32_EMULATION_DEFAULT_DISABLED to AARCH32_SUPPORT_DEFAULT_DISABLED (mark.rutland) * Fixed a compilation Warning about missing function prototype Closes: https://lore.kernel.org/oe-kbuild-all/202310230423.r2U4Lqr8-lkp@intel.com/ This is just for completeness since other possible solutions have been proposed that could be better suited, see for example: https://lkml.kernel.org/linux-fsdevel/20210916131816.8841-1-will@kernel.org/ and followups. So, this patchset is just for reference, may be useful in the future if some kind of exploit is found to bypass the 32bit process enablement check (letting a process call 32bit syscalls) and nothing better has been proposed meanwhile. Andrea della Porta (4): arm64: Introduce aarch32_enabled() arm64/process: Make loading of 32bit processes depend on aarch32_enabled() arm64/entry-common: Make Aarch32 exceptions' availability depend on aarch32_enabled() arm64: Make Aarch32 support boot time configurable .../admin-guide/kernel-parameters.txt | 7 ++++ arch/arm64/Kconfig | 9 +++++ arch/arm64/include/asm/cpufeature.h | 20 +++++++++-- arch/arm64/include/asm/exception.h | 7 ++++ arch/arm64/kernel/entry-common.c | 33 +++++++++++++++++-- 5 files changed, 71 insertions(+), 5 deletions(-) -- 2.35.3