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 CC2C8C3064D for ; Thu, 27 Jun 2024 06:59:31 +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:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:CC:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XHcIu5GGHgcbeSru6awhs0VgTUSyTiwrccLVRPcsd5E=; b=FcYxQBI+5r2KVdhWan3OkSBnNp 5UqtE6JnVP9fCphFi8HtRxErhRkv3TB0WU+/3nfN6drqllISeA4ErNmiwkj7LpbJgAlmmu3o1E6Tx QjlViZw2WKLxnG+WFAk/UBGJRFaZ4PbSiuzQBMXiNyQFfUfz7ikbaskN1Ycy52Jg2s9UzP2z/Z2I+ 8dzNH0srwA3FF41Q0dcTFyxZMUVs0jdDm7fKnkR8U+cVrIuOAar1IJCW8vj3M/pON1zG9cvuxvgAO sp2QK5bK0zbd0hhHAv6EJHG/0PiW19c29bkTY2cFX2IsmgGwt69LGNFRG6fACXykBPRQmJu0P6+M4 u6sLnCpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMj6F-00000009SJN-3Xnd; Thu, 27 Jun 2024 06:59:19 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMj61-00000009SAF-2UZS for linux-arm-kernel@lists.infradead.org; Thu, 27 Jun 2024 06:59:11 +0000 Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4W8qBS70Jxzdf8j; Thu, 27 Jun 2024 14:57:20 +0800 (CST) Received: from kwepemi100008.china.huawei.com (unknown [7.221.188.57]) by mail.maildlp.com (Postfix) with ESMTPS id 41D0E14040D; Thu, 27 Jun 2024 14:58:55 +0800 (CST) Received: from [10.67.109.254] (10.67.109.254) by kwepemi100008.china.huawei.com (7.221.188.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 27 Jun 2024 14:58:54 +0800 Message-ID: <319b42b3-271f-2e29-0171-a6f1a8b090d9@huawei.com> Date: Thu, 27 Jun 2024 14:58:53 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH 0/3] arm64: entry: Convert to generic entry Content-Language: en-US To: Kees Cook CC: , , , , , , , , , , , , , , , References: <20240625092759.1533875-1-ruanjinjie@huawei.com> <202406261550.2AD733291D@keescook> From: Jinjie Ruan In-Reply-To: <202406261550.2AD733291D@keescook> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.109.254] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi100008.china.huawei.com (7.221.188.57) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240626_235905_861100_FEDFA085 X-CRM114-Status: GOOD ( 11.03 ) 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 2024/6/27 6:52, Kees Cook wrote: > 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. Kees, thank you for helping to test the code. > > Tested-by: Kees Cook >