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 AB599C27C4F for ; Wed, 26 Jun 2024 22:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zKlBxccySqqsID5GHo0Vcov4R3csWa2OiMRwSL+9Z5M=; b=Crlio6ZIfx7jZG4LUSeutSfg40 I8YZ/lVyFw3bAhYpqRhObGIVK4Xeeg3I27OdCXUwav3jJKosk3q3BSh3cXincM8XbYE00lKWYWBuv hrPQOZeTkpFjJ6ls2gT0gl9dUJgKWRdF38BeyysaSNARl9n10PnQXdG+u70rkZSttGki73N2KL2xP IQ42jCmodArWEfGddTurE/0nCR3RhpnQDc1EW5E+HikhjNfsojixrbPjpMKGdLjMw+10gE1iTnS5I MTItb2x2sMJkELj85PWvzGLhoQVgKY3Noffs+8ooaTOMrd0rN8nkoSf66vrGjOBWhDPaWrmVhdxj8 rznRtx8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMbV1-00000008YQX-16UM; Wed, 26 Jun 2024 22:52:23 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMbUp-00000008YOy-3let for linux-arm-kernel@lists.infradead.org; Wed, 26 Jun 2024 22:52:13 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5B95A61D3B; Wed, 26 Jun 2024 22:52:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6EC4C116B1; Wed, 26 Jun 2024 22:52:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719442330; bh=n36cwaofjsJ1Cu4DxMbH84JXTU8lCSdSHnjIFblNErM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UWQIOj+mOT7kzf81cZX3mijSnyGsqata5FMU3DITboFYrcgWegdHQzJymUiLY+9Hi DfBqspgkq18tusQNGRPfQF3pzwDyPD4rNSquTgrT2flCEVw2LAqfFUqjOtoEh3qcO+ fdY8lftVeEm3TZkz5/XqNbFb+Xwl0qLViHm1IgludLMaK4EHDz0meT7gS9QETumreO KkDjLWyFty8ZMjUZPBxU8Q22TlloqmNPQy9Enpp0J5m4WJHBjLsloD/vIvPwSE0gqy qBLt8t5nC7XkZskFh94q3y+Fi3cooOZ4TgI9PLq4PBY3Mg4Ai2NIEuJOrNV1/DcMeW vf9plX2CTpB1A== Date: Wed, 26 Jun 2024 15:52:09 -0700 From: Kees Cook To: Jinjie Ruan Cc: catalin.marinas@arm.com, will@kernel.org, oleg@redhat.com, tglx@linutronix.de, peterz@infradead.org, luto@kernel.org, wad@chromium.org, rostedt@goodmis.org, arnd@arndb.de, ardb@kernel.org, broonie@kernel.org, mark.rutland@arm.com, rick.p.edgecombe@intel.com, leobras@redhat.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 0/3] arm64: entry: Convert to generic entry Message-ID: <202406261550.2AD733291D@keescook> References: <20240625092759.1533875-1-ruanjinjie@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240625092759.1533875-1-ruanjinjie@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240626_155212_180992_50460549 X-CRM114-Status: GOOD ( 13.20 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 25, 2024 at 05:27:56PM +0800, Jinjie Ruan wrote: > Currently, x86, Riscv, Loongarch use the generic entry. Convert arm64 > to use the generic entry infrastructure from kernel/entry/*. The generic > entry makes maintainers' work easier and codes more elegant, which aslo > removed a lot of duplicate code. > > Jinjie Ruan (3): > entry: Add some arch funcs to support arm64 to use generic entry > arm64: Prepare to switch to generic entry > arm64: entry: Convert to generic entry > > arch/arm64/Kconfig | 1 + > arch/arm64/include/asm/entry-common.h | 60 +++++ > arch/arm64/include/asm/ptrace.h | 5 + > arch/arm64/include/asm/stacktrace.h | 5 +- > arch/arm64/include/asm/syscall.h | 6 +- > arch/arm64/include/asm/thread_info.h | 23 +- > arch/arm64/kernel/entry-common.c | 355 ++++++-------------------- > arch/arm64/kernel/ptrace.c | 78 +++--- > arch/arm64/kernel/signal.c | 3 +- > arch/arm64/kernel/syscall.c | 18 +- > include/linux/entry-common.h | 51 ++++ > kernel/entry/common.c | 49 +++- > 12 files changed, 294 insertions(+), 360 deletions(-) > create mode 100644 arch/arm64/include/asm/entry-common.h This is very cool! While the arm64 maintainers need to review it, I at least built and ran tests using the seccomp selftests which tends to be pretty sensitive to corner cases around syscall exit/entry things, and it passed just fine. Tested-by: Kees Cook -- Kees Cook