Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5440455rwl; Tue, 21 Mar 2023 19:26:25 -0700 (PDT) X-Google-Smtp-Source: AK7set9tJDa/usWMAPTb41qJu0YGiMmJQE8wNsehcfkC0ClNnCFKk1d6vRbHxRP50ce/q+GolYKV X-Received: by 2002:a17:902:cecc:b0:19a:9269:7d1 with SMTP id d12-20020a170902cecc00b0019a926907d1mr3854015plg.4.1679451985520; Tue, 21 Mar 2023 19:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679451985; cv=none; d=google.com; s=arc-20160816; b=d03rt/ei23KWbdIl+ewwED/fk92n0l2g/db6vVfu2enxiV/W1aYVff/A9oE4pekbak kqUZRhPLeXoEa7QEJxjk/aG42N1hj/FJCe3dWNbK8Pmj6VECwuGtEC5kTtkU68XATAXV HbnMf9Gywtlu/eFYwUYEYrHsEVAZSCwxmFPB6cUFFlZQTSqa7VOGaSpBr14crq5aR8Tn ScqWRbNAasDNiLWJSYtmogayayEYOkPCZgFlad94mP/f71dB+zeg51OLFrNKu3ofPW+Q 5k3QsbC1408wE+VKfXa9rGVWYRERw2LcBAMylqUEQulwstC38XJoSpZPVryrlgUeIfHp 1v1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=LoYhF+v3FctdaWwoqqIIS1qqDpKm5L/AMYSClAzsXQw=; b=UX5D0F0q14TgfrPINbKIqTgHJH7E5/bMNtrCCnPBiuzAC62zP7x+Gln/qxA7Bdbdo+ XMcsjAziq3S+SyDsFCCQB+aK2ONx7JNv9GffqTHJGrazT4MbskkR0DJjkymz0Ibbp1F0 zpCbmodfcyOBNmbFP3pO44oB5rUey92fhtg0il0yYDIujWFo4wDOVCvFtQ7w2FhV8wPx Zyk2pMLg0B6sZBBXALLOyIQZ4Ih/MkU9lGGLE0EvLkpLsdLBQ/19mGpE7skba3jPV23G AykOqSp79qcq/I5TDRbcpSljnl6k15XVi/E9qlN+7vJP+BFnl9TlSL1N4nQCmBEXBB7L 5/Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aEviMH7n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jd12-20020a170903260c00b001a194df5a64si14274945plb.397.2023.03.21.19.26.13; Tue, 21 Mar 2023 19:26:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aEviMH7n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbjCVCU3 (ORCPT + 99 others); Tue, 21 Mar 2023 22:20:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbjCVCU1 (ORCPT ); Tue, 21 Mar 2023 22:20:27 -0400 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4DF84DBFA; Tue, 21 Mar 2023 19:20:26 -0700 (PDT) Received: by mail-io1-xd32.google.com with SMTP id f14so7855139iow.5; Tue, 21 Mar 2023 19:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679451626; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=LoYhF+v3FctdaWwoqqIIS1qqDpKm5L/AMYSClAzsXQw=; b=aEviMH7nUPuN7OK3kZYZEZ2e4laI65KPQ814H3yNXG+Rbu5Bc6+C/k6qRJXVxe8VpC ZKnjY1Qw8xcPHoGXqzRjqJlvwi5Cb52rKRLUNyUlyMe8c4HApghxE+woWgvZZ4ZpURsd Z8SvTPJNWfsAsCWyvTh8cHvN89tk397rMLFyykmZ1awvz0sMYVveMM5kapKmech5Q88B MwF5FZY2B/GdPP5v+ptOnd1R6nM7rcWS7CrOUjUxx8IoBxfR472C3uqaPoCUxYgDBVq9 VdSEoYhp4ELoUTL4o7vVLbjIgEFKTUdRmg6UrS13t4l8QkcrG6Ztbe7BS99CVyue5TkA ealQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679451626; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LoYhF+v3FctdaWwoqqIIS1qqDpKm5L/AMYSClAzsXQw=; b=lVzJSXaHm4susmuMKn5LtZ0DKk1PGKaD5zLvxTG4PK4RNvURBuz+YRrsUwYbMV2ABQ WaWNV2ybcXdvrFX8dccKq41FY+HsOBA9WkojVKPvLAmfjwDefYuIu0sWAr743Iekb+tJ 28YNfpOysmIuKm/l6i32CpRgBEYfIkw20I6xhyzOHaogmCHVglR71R/nlkItJso04+U4 HIY8hi6vyYUr3R2YrDBhGgtXsc9q+GLeu4LpmQ8+eYSMuE3V89IZygMsx27NKRgxeuX2 jodTF+8bNYCnyboQnYQQ/6+MzKYDEvBJIQch0sD8sT0oEhdO1YMJ+SnBJMQAxQtVyksS FrYA== X-Gm-Message-State: AO0yUKWhO1eJ6JjC8y+oqmibYetOdntvkWz9NMputMwhpkz9WHs2p/eb 61vSB6M7i05j2T2wfo6PywQne/BIA6Y= X-Received: by 2002:a5e:c605:0:b0:753:13ec:4ba with SMTP id f5-20020a5ec605000000b0075313ec04bamr3527548iok.4.1679451626214; Tue, 21 Mar 2023 19:20:26 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id z18-20020a5e8612000000b0074ce0b89a37sm4083370ioj.1.2023.03.21.19.20.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 19:20:25 -0700 (PDT) Sender: Guenter Roeck Date: Tue, 21 Mar 2023 19:20:24 -0700 From: Guenter Roeck To: Huacai Chen Cc: stable , Xi Ruoyao , Tiezhu Yang , WANG Xuerui , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Subject: Re: [PATCH] LoongArch: Check unwind_error() in arch_stack_walk() Message-ID: References: <1679380154-20308-1-git-send-email-yangtiezhu@loongson.cn> <253a5dfcb7e41e44d15232e1891e7ea9d39dc953.camel@xry111.site> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 22, 2023 at 08:50:07AM +0800, Huacai Chen wrote: > On Tue, Mar 21, 2023 at 10:25 PM Guenter Roeck wrote: > > > > On Tue, Mar 21, 2023 at 08:35:34PM +0800, Xi Ruoyao wrote: > > > On Tue, 2023-03-21 at 14:29 +0800, Tiezhu Yang wrote: > > > > We can see the following messages with CONFIG_PROVE_LOCKING=y on > > > > LoongArch: > > > > > > > > BUG: MAX_STACK_TRACE_ENTRIES too low! > > > > turning off the locking correctness validator. > > > > > > > > This is because stack_trace_save() returns a big value after call > > > > arch_stack_walk(), here is the call trace: > > > > > > > > save_trace() > > > > stack_trace_save() > > > > arch_stack_walk() > > > > stack_trace_consume_entry() > > > > > > > > arch_stack_walk() should return immediately if unwind_next_frame() > > > > failed, no need to do the useless loops to increase the value of > > > > c->len in stack_trace_consume_entry(), then we can fix the above > > > > problem. > > > > > > > > Reported-by: Guenter Roeck > > > > Link: https://lore.kernel.org/all/8a44ad71-68d2-4926-892f-72bfc7a67e2a@roeck-us.net/ > > > > Signed-off-by: Tiezhu Yang > > > > > > The fix makes sense, but I'm asking the same question again (sorry if > > > it's noisy): should we Cc stable@vger.kernel.org and/or make a PR for > > > 6.3? > > > > > > To me a bug fixes should be backported into all stable branches affected > > > by the bug, unless there is some serious difficulty. As 6.3 release > > > will work on launched 3A5000 boards out-of-box, people may want to stop > > > staying on the leading edge and use a LTS/stable release series. We > > > can't just say (or behave like) "we don't backport, please use latest > > > mainline" IMO :). > > > > It is a bug fix, isn't it ? It should be backported to v6.1+. Otherwise, > > if your policy is to not backport bug fixes, I might as well stop testing > > loongarch on all but the most recent kernel branch. Let me know if this is > > what you want. If so, I think you should let all other regression testers > > know that they should only test loongarch on mainline and possibly on > > linux-next. > This is of course a bug fix, but should Tiezhu resend this patch? Or > just replying to this message with CC stable@vger.kernel.org is > enough? > Normally the maintainer, before sending a pull request to Linus, would add "Cc: stable@vger.kernel.org" to the patch. Actually sending the patch to the stable@ mailing list is only necessary if it was applied to the upstream kernel without Cc: stable@ in the commit message. Guenter