Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3346479rwb; Sun, 20 Nov 2022 12:08:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf6eZDv7fhqjhWyxA/lEjs5rUuS6QGjJOx5lf7Oo01Y3BWV51GYW+LW6OMeH7ujZtHzhm5M5 X-Received: by 2002:a17:902:f7cc:b0:17b:4ace:b67f with SMTP id h12-20020a170902f7cc00b0017b4aceb67fmr9178998plw.12.1668974933810; Sun, 20 Nov 2022 12:08:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668974933; cv=none; d=google.com; s=arc-20160816; b=F3/3tcOotolZvMPaYcw8bWfF1cbHrwHgNqOKDhd/cQP+6IpybPiI2U5jTc5cRsPux2 e9/Jbliig2EVfez4GLVoIjJ59g0JlY1GLa7DCQU1r8ic39RQhutMpTeTsEHtnTxorIiX 4oKQJPdKH+uIyVncGVn00VGjT/xILOJDIG1A6NADcMXWjUmZ9tfRqHpZWh9UkGRjFb4A 4zYTEdEhVWWI8bkrX1kSAl4WpUoZi3kYBIpRCfLxoWa6LbkG1+SU3oYFDowjYGGaqdxv PCzf7azAZ92ZOgBPELncbnwkA8Yg6UwEJefr9cQ6MmAOtbdXge3Lvbf1MWjXr/AnA8zM W3BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=2xISlzEVbN5wEDB9FWuLKjMTLtcnV6EX4/u+P151gx8=; b=sDbyOkoThnl7KK6HFwsgsrMisUsyOIaFp0QKl7FXJfqPe5jWVsziznk14RQDXWqd8f zsdfx9jFaP+R2lZqNdqc34+5LNBC9C2z883CdkNadnrpRC7xK6RRK6PIQ+zP8QzJ/Bof A7oSNEUUPHZFY6fuKG8dCHZSRLgK3iF3Wzmr3OjNYJEYIL+MNHGrrmON67ojlNIfRUas jqCpWP85LsrL4lxd3oGfchzSlsXNcNWH/UbNnRaK5wyeNTXjxXCiz6b3FF++ypwoHYIn z91xOkr5/Ax20lXm2vclhjyaobh4RIRNwUChOlUiKhcVvMPTkEuH76ztjyrgxQGX9sSi jHJQ== ARC-Authentication-Results: i=1; mx.google.com; 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 q16-20020a17090aa01000b00215e3cdaa32si8368065pjp.131.2022.11.20.12.08.26; Sun, 20 Nov 2022 12:08:53 -0800 (PST) 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; 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 S229846AbiKTTum (ORCPT + 91 others); Sun, 20 Nov 2022 14:50:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbiKTTud (ORCPT ); Sun, 20 Nov 2022 14:50:33 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E95912FC34 for ; Sun, 20 Nov 2022 11:50:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8EE5760D14 for ; Sun, 20 Nov 2022 19:50:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A714C433B5; Sun, 20 Nov 2022 19:49:59 +0000 (UTC) Date: Sun, 20 Nov 2022 14:49:56 -0500 From: Steven Rostedt To: Yang Jihong Cc: , Subject: Re: [PATCH] tracing: Fix infinite loop in tracing_read_pipe on overflowed print_trace_line Message-ID: <20221120144956.30bb1725@rorschach.local.home> In-Reply-To: <188a48b7-f426-6348-086e-22e56bb07206@huawei.com> References: <20221114022946.66255-1-yangjihong1@huawei.com> <20221117164003.6e655615@gandalf.local.home> <188a48b7-f426-6348-086e-22e56bb07206@huawei.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Fri, 18 Nov 2022 18:21:12 +0800 Yang Jihong wrote: > > That way we can see the broken trace event and not just silently drop it. > > > Ok, will change in next version.(Because iter->seq.seq.len may be > smaller than strlen(dots), direct subtraction here may not be appropriate.) We should only need to do this if the len is maxed out. Hmm, len is only updated if it did actually copy it. Perhaps we could just add: trace_seq_puts(&iter->seq, "[LINE TOO BIG]\n"); And perhaps that will work? Anyway, what is triggering this? -- Steve