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 4956CC48260 for ; Tue, 6 Feb 2024 01:40:44 +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=zl5BDn4FLcd6kGNBC4EM3vZRRemgRYTfG6upgQL+5W4=; b=KDuxJ1m3h9+wn7 G5SAIeB2zchEFiTY7bpVOWUFD+NcfJ2wnFDOwb7NNNCY13QIOrz7ls4X3xD3pV/UIALCUhAjfSRoF uHa2R5Vl131GbkCfRbwXlWxiXdTWi0iMD4v4ty7Psva47T3QNnLQvdhaD5PnZzC4tPwJ/GXIzRsw0 MHXEbBOuqiRA+sCrJtzBjc/KXalUdEHqF7v4soMXYPeMrE5g5uREmw71jxKdB5xo3+MPIsl8eD8Gq MAb+XDOr3V6Vmkfqi0SZ0v5ykqy1IGdjzvavcVOynl/R6rwIiLun2nAbofa+6PJS69Swwxiy1woxc zthHBdgNxxiYiG594AHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXARn-00000005j03-2Zsl; Tue, 06 Feb 2024 01:40:27 +0000 Received: from smtpbg153.qq.com ([13.245.218.24]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXARj-00000005isi-1xvU for linux-arm-kernel@lists.infradead.org; Tue, 06 Feb 2024 01:40:26 +0000 X-QQ-mid: bizesmtp76t1707183572tof3oqsx X-QQ-Originating-IP: 1y9BJL98O0FWwxi//dUeg6+B3OJEgGSmd4Nc+3lPLWY= Received: from localhost ( [183.209.108.228]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 06 Feb 2024 09:39:30 +0800 (CST) X-QQ-SSF: 01400000000000504000000A0000000 X-QQ-FEAT: LE7C6P2vL8TvFsrGsG3IftlI7o2dwNJmdQOd2+XsdEjwaiwUVfgYswhwZqgYu WTlLhcJkF5rJRGjMJJkeqv4xQM9x3aJlFiscX3jQG418veVYqs6/zncfC1Oiz0EeikHZRR5 tKzFcRU46LA6fCQtvUr7ai+wkFTUdeFyt4UX3OM6KPLgPbvL93V7H9GqhHgg03dCdIiBfnh UfcFxfDa7dw4GGj94cWp6nJftWj6TbbVdN7QJpTx41f6UowxonChfhfgptO6wheMuYl7y0z CK+j0bpTSlXZHFjTz1+XNqCndYCHjlIDbBzl+eO9WF3MQ6+M3fzxW+vcoGRKDMf72oATEwC zYpEfChNHdgNYmvSDPaTlROixForXp7PypGMajo2yAdrpjQmmk+2r4iakwKYA== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 7562001425463095076 Date: Tue, 6 Feb 2024 09:39:30 +0800 From: Dawei Li To: Mark Rutland 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: X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz5a-1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240205_174024_435125_A47F1E85 X-CRM114-Status: GOOD ( 22.18 ) 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 Hi Mark, Thanks for reviewing. On Mon, Feb 05, 2024 at 12:06:18PM +0000, Mark Rutland wrote: > 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? It's just a cleanup patch. > > 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. Thanks for the update! It helps. > > I'm sure that we currently have plenty of other code with a similar (but > undocumented) dependency. Given we've unconditionally selected Totally agreed. > 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. > Thanks, Dawei _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel