Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2759266rdb; Mon, 5 Feb 2024 17:40:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHReZjsN3nT3TMLj2TFRfM+qEtUKXdiDYcFhkTJ9pFbKIKKUV8bJx4OTu/xBuQbvo6Ob5TT X-Received: by 2002:ac2:4daf:0:b0:511:5ec0:34dc with SMTP id h15-20020ac24daf000000b005115ec034dcmr124886lfe.17.1707183652744; Mon, 05 Feb 2024 17:40:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707183652; cv=pass; d=google.com; s=arc-20160816; b=uPRPK2BDlMBaK7eDrJ90CN5lT2m6hkqQFWqCjUjKpYjkisSzhYFLBJDWKc87t+Cxav hlmqXGqpsgQvHQySaRH865OxjHOn7b7xakF1hDsTtcDfuGh5beFTsMaiGyat68l65eOM AgUqv8Sf0DM53E1PQF2HsVssH+Kd1kQ/OXHpM0GfVHbdtM/Z6AyVX2ia2g8MQYHd64eB 1ycYINhTlLIrxtQu7APBSu7Ldmc0X+3jkJvV2HRdqaJWVw3uZKR8CenXALXNMf7BlIVD tjtbSiGQnNZyN6vBvaSxgQL4d344VjajuP3Ahiw5H9NzqdcRLYhv//IP8m9NLtFHk8Gl ow9A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=uTa3dtSm53aolUV3o3T2PqbsAu/7OWaWZakj7GHwI6E=; fh=1bc2qVP2nOSUF1ASHavZYPDn5oLiaQhnWUzGPtHe5qE=; b=G/2CS/k4/eZVF/KD8OA3DC98OloQIWMsDuR2Zc9R41bmowx6E/YOSA3FWZRIukgGB+ xuxPwf+dMexEDqXQ6ZO/r6PQRYCZ1C7rhpjUs15ygzjLFRTIJasmIeExwHNu1gWcyfpL JV0wChgRq40hRaRpynDTf1hoRfOK1SYaaMBX0g5o6IXUH2UlFixdfWkPhnruFXPmRMaz wlsNFyUZ21CeZ3oRo/rCdfHQzQkFJrsz/GpDDaYMLzCbC7WHOCpb4MWbF1WxKDoVXAfD PQrjWUBoUhQhfXQ60/MELDdXGuZ9zyWKixku72WZO+8N8KX0JZQUxMKJfGKm11I0R9MI mNcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-54162-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn X-Forwarded-Encrypted: i=1; AJvYcCVKVvVTmt35oKmYBO/JotBQrq8dtyaHeNGiA1OTkUEIySnXrtvcZ6Tzs97WeABsCZbmXNDCqWFlTyiW9Ll8iQ0x4yD6NdfcLlA/C9ZtyQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h18-20020a1709062dd200b00a376d1b9a97si432922eji.552.2024.02.05.17.40.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 17:40:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54162-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-54162-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 776C61F258A5 for ; Tue, 6 Feb 2024 01:40:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6CEAD15A7; Tue, 6 Feb 2024 01:40:45 +0000 (UTC) Received: from smtpbgsg1.qq.com (smtpbgsg1.qq.com [54.254.200.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5CDC1362 for ; Tue, 6 Feb 2024 01:40:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.254.200.92 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707183644; cv=none; b=h1GT1Z6klS2Xt2jiP/i3YKYja0uzMHj515Fe6yEjmA2miR+Lvav3MmozKbe1MpyrOZNP2UE0Euwp9/cZnKtG2w1sF4maLIwkFtHtm5KpQYEGhQvOzbsnxNoLAdj8+BDv8Ipkv19pXE+T+10At3FSNPmmSKjgklSZyyZ6BkWJ+NA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707183644; c=relaxed/simple; bh=JrPtZvkgBSvWGyUTBYm/grVlwhb04efI8CTULbYVyHc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=i6Ssf81bTUkTEmE/KKCy0xi6bg8q1/HWX8zc87U1UKdwzcRLAk1DaJNFfmf3T0NEmPt/PXtSHj1lrUuWbuPJ45L0B+oosuyJerDbxW5xl1PVvzOJxnY6HVdlwmx6/UehmzHn3JScUIt2CfdbngDQTlbJyugMfqwHYueIbWLJOSw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn; spf=pass smtp.mailfrom=shingroup.cn; arc=none smtp.client-ip=54.254.200.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shingroup.cn 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz5a-1 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