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 D3A4BC4828D for ; Mon, 5 Feb 2024 12:06:43 +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=11lia0hGbweaJ8NrEMrYPZPhdAqw1+nsUv2SMS0bW3g=; b=21hiwAiFz7fdyX 9H1pJa2aywHkEjgNeZBzigSoZHq0miX6FV+3FJzOcC7XKZl8hq2i9wwKx4TlI6vA/4B9JvZkhsXjn kDVBNsCnBdNUWbhceTjGH5eU9lBkFPdqV6eWRnCNmHOE3/nD6W9SiwH933Uyq8r6PtFXp9EpJAI24 B6ZafkUVwFXnQRcjTyyMrBHfio2z2Uy5/knGCRn6OJ2/WS94OzdQ4VMyN7wI6VtSS1nuzXtetk3mA JvATRwTWU74u2+t/UzjJxvF9ereutDYkRBeoRNIgBtdb2Rm0T06fQxLmT7TkP9piIoUtlSry4ZPQr yZaIuVrBEvCj79gHAF9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rWxk7-000000037Z4-1YD5; Mon, 05 Feb 2024 12:06:31 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rWxk4-000000037X1-05u6 for linux-arm-kernel@lists.infradead.org; Mon, 05 Feb 2024 12:06:29 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BACC71FB; Mon, 5 Feb 2024 04:07:07 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.66.84]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6DD343F762; Mon, 5 Feb 2024 04:06:23 -0800 (PST) Date: Mon, 5 Feb 2024 12:06:18 +0000 From: Mark Rutland To: Dawei Li Cc: catalin.marinas@arm.com, will@kernel.org, mcgrof@kernel.org, jpoimboe@kernel.org, j.granados@samsung.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, set_pte_at@outlook.com Subject: Re: [PATCH] arm64: remove unneeded BUILD_BUG_ON assertion Message-ID: References: <20240202040211.3118918-1-dawei.li@shingroup.cn> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240202040211.3118918-1-dawei.li@shingroup.cn> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240205_040628_161955_A4E072EB X-CRM114-Status: GOOD ( 16.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: , 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 Fri, Feb 02, 2024 at 12:02:11PM +0800, Dawei Li wrote: > Since commit c02433dd6de3 ("arm64: split thread_info from task stack"), > CONFIG_THREAD_INFO_IN_TASK is enabled unconditionally for arm64. So > remove this always-true assertion from arch_dup_task_struct. > > Signed-off-by: Dawei Li > --- > arch/arm64/kernel/process.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c > index 7387b68c745b..4ae31b7af6c3 100644 > --- a/arch/arm64/kernel/process.c > +++ b/arch/arm64/kernel/process.c > @@ -290,9 +290,6 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) > fpsimd_preserve_current_state(); > *dst = *src; > > - /* We rely on the above assignment to initialize dst's thread_flags: */ > - BUILD_BUG_ON(!IS_ENABLED(CONFIG_THREAD_INFO_IN_TASK)); > - Does the above cause any problem today, or is this patch just a cleanup? For the benefit of other reviewers, the assertion and comment were added in commit: 4585fc59c0e8 ("arm64/sve: Fix wrong free for task->thread.sve_state") ... back in 2019, 3 years after commit: c02433dd6de3 ("arm64: split thread_info from task stack") The comment and assertion were a safety-net for backports, since commit 4585fc59c0e8 was a fix which dependend upon the thread_info being contained within task_struct, and couldn't be backported to kernels without CONFIG_THREAD_INFO_IN_TASK. I'm sure that we currently have plenty of other code with a similar (but undocumented) dependency. Given we've unconditionally selected CONFIG_THREAD_INFO_IN_TASK since v4.10, and the oldest longterm stable kernel is v4.19 (with v4.14 having EOL'd last month), I think it makes sense to delete the assertion and comment. So FWIW: Acked-by: Mark Rutland Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel