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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11421C83F11 for ; Sat, 26 Aug 2023 15:53:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229468AbjHZPw7 (ORCPT ); Sat, 26 Aug 2023 11:52:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229776AbjHZPww (ORCPT ); Sat, 26 Aug 2023 11:52:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F91CE0; Sat, 26 Aug 2023 08:52:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B067A6115B; Sat, 26 Aug 2023 15:52:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90DBBC433C7; Sat, 26 Aug 2023 15:52:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1693065169; bh=2r8AAy315jPDAk6JZfqisWgUEpomjvCHrtYpBhKJg9U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TcA6V2gNWh9+JQmN0+h1Y8pYPQWGKzgnrkG/K50I2fw2YWdxdMpYo0iSRY2otMDZO hYXs3EiZCin1Rh6mce9Jo7W38MgLE86SJIYTCKCftd1i55FXhpOe+ra88Pnccln4Ct s3KuOKSo4iXmjjBIEBdbOhfAz89kJ88KgcpjFzxs= Date: Sat, 26 Aug 2023 17:52:45 +0200 From: Greg KH To: Huacai Chen Cc: Huacai Chen , loongarch@lists.linux.dev, Xuefeng Li , Guo Ren , Xuerui Wang , Jiaxun Yang , linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn, stable@vger.kernel.org Subject: Re: [PATCH V2] LoongArch: Ensure FP/SIMD registers in the core dump file is up to date Message-ID: <2023082611-tactical-embark-d99a@gregkh> References: <20230826142341.4107728-1-chenhuacai@loongson.cn> <2023082618-mocha-reactor-1dbe@gregkh> <2023082609-coerce-capricorn-a69f@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Sat, Aug 26, 2023 at 11:47:24PM +0800, Huacai Chen wrote: > On Sat, Aug 26, 2023 at 11:43 PM Greg KH wrote: > > > > On Sat, Aug 26, 2023 at 11:35:31PM +0800, Huacai Chen wrote: > > > On Sat, Aug 26, 2023 at 11:22 PM Greg KH wrote: > > > > > > > > On Sat, Aug 26, 2023 at 10:23:41PM +0800, Huacai Chen wrote: > > > > > This is a port of commit 379eb01c21795edb4c ("riscv: Ensure the value > > > > > of FP registers in the core dump file is up to date"). > > > > > > > > > > The values of FP/SIMD registers in the core dump file come from the > > > > > thread.fpu. However, kernel saves the FP/SIMD registers only before > > > > > scheduling out the process. If no process switch happens during the > > > > > exception handling, kernel will not have a chance to save the latest > > > > > values of FP/SIMD registers. So it may cause their values in the core > > > > > dump file incorrect. To solve this problem, force fpr_get()/simd_get() > > > > > to save the FP/SIMD registers into the thread.fpu if the target task > > > > > equals the current task. > > > > > > > > > > Cc: stable@vger.kernel.org > > > > > Signed-off-by: Huacai Chen > > > > > --- > > > > > V2: Rename get_fpu_regs() to save_fpu_regs(). > > > > > > > > What stable tree(s) is this for? > > > For 5.19+, but before 6.4 we should remove the call site in simd_get() > > > because that function doesn't exist. > > > > But this commit is already in the following released kernels: > > 5.10.62 5.13.14 5.14 > Do you means commit 379eb01c21795edb4c ("riscv: Ensure the value of FP > registers in the core dump file is up to date")? That is a reference > commit, not a Fixes tag. This patch is for LoongArch and LoongArch > only exists after 5.19. Ah, ok, that wasn't obvious sorry. I thought this was something you wanted backported to the stable kernel trees based on the comment in the first few lines of the change. I'll leave this alone then, thanks! greg k-h