Message ID | cover.1698069331.git.andrea.porta@suse.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1345010vqx; Mon, 23 Oct 2023 07:44:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGhQ8Q+LnF4fZogx+CELqYh+NvcXT/qe09+FRM6KhjRYBP6q6sIinJN/kGERCgy1VnZlIsX X-Received: by 2002:a05:6a21:66c7:b0:16b:d137:de59 with SMTP id ze7-20020a056a2166c700b0016bd137de59mr9375255pzb.28.1698072255172; Mon, 23 Oct 2023 07:44:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698072255; cv=none; d=google.com; s=arc-20160816; b=uJZ/CcOnZOC2rpbB6hOa6ARBxz/RId3IEIJ4yANbCiMpaW/PI4e6WfGj+UH7onoj4k FVPM/LPeOb5xWU1/fBHzDo78I5Wt5DUXN0cwNjjty5aTIFSmPjZS7FLC6BzOvv6OYL0z U8IQfLL64vLQO2EujVnYVObQhRiXYsfOKYhEDnInd5ELPa5kBWg+xYfXILtqIJWgcf2W QL818UF+aURtipig2XK/cjN+D3cowYM6eOFWVG6zU1GJSUTeynn3t7hGqVrKPf3qCJWc R0854OooBFThKTyzogd8yVBb5v9tkgh/xctS3/xDRDzaliAJemVXr6ef/uXqCgR5CvQn XhqA== 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 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id az1-20020a056a02004100b005704979833csi6667502pgb.855.2023.10.23.07.44.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 07:44:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; 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 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 66D20805B201; Mon, 23 Oct 2023 07:44:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233662AbjJWOoA (ORCPT <rfc822;aposhian.dev@gmail.com> + 27 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <linux-kernel@vger.kernel.org>; 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 <aporta@suse.de>); Mon, 23 Oct 2023 14:42:25 +0000 From: Andrea della Porta <andrea.porta@suse.com> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, 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 <andrea.porta@suse.com> Subject: [PATCH v2 0/4] arm64: Make Aarch32 compatibility enablement optional at boot Date: Mon, 23 Oct 2023 16:42:19 +0200 Message-ID: <cover.1698069331.git.andrea.porta@suse.com> 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 agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 23 Oct 2023 07:44:11 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780557812945477158 X-GMAIL-MSGID: 1780557812945477158 |
Series |
arm64: Make Aarch32 compatibility enablement optional at boot
|
|
Message
Andrea della Porta
Oct. 23, 2023, 2:42 p.m. UTC
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(-)