Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1597258ybi; Wed, 17 Jul 2019 18:25:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqym29cz5lKaMglLY5gdUtUB2WILq3mc/KJJiZ313sFaAmKQwrqe7JUy3vrz40kNf7ZgyuAQ X-Received: by 2002:a17:90a:2768:: with SMTP id o95mr47754602pje.37.1563413135745; Wed, 17 Jul 2019 18:25:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563413135; cv=none; d=google.com; s=arc-20160816; b=ojOkXuB3smo4LWd/eSA1Wzg5QYgpqPDPmh99ATaAQllrlMqt1eF7RaS6K6Urf0qBk5 H6SCfFGjCkr4iO3FQGUqzkDBf6dWHOE1OxDZS+NiZfkn+esRhXwMcz584ZnzX1/sdvml QSeV7Bl0iy9KKTXe8IGs8egbS1IPxLAXtTzrmhfrbYaD3j3NanhJXOI01pGw3+r8dlLF ItizZjSGAB9EaMVW8kduS1O8thBT+I/VvdvQ/1g+uX+Ea8+OnoBEmsTc0/Mc/fgBJgWb 56YvpwgZJ15fwZoBQcs9h7+4BqzjQM+ytHcOymYK0WRG6TCMqq698P2tGPZzHxHrsbV/ aPJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:cc:autocrypt:openpgp:from:references:to:subject :dkim-signature; bh=lbzCvZDGyPKPq8F4BmEKa3ahl7R/ac02jNKU8Fy5zIM=; b=nHs479fV/3GEaJPALokgFlMtOjT1yT8uCBdBgY0O7cuGSXYf6Fw/OeTIj5eKl9YrQ3 BC3X0519JSNnL4PyAWJaJXqPKCCP7LYM6xvpA/aXZRJjKg3l9Z1CyV4ts+88UhoVOoiv TTT4aEiG5uilvLd4CPyLsaMQAJDvmgIUxCYL2Mo7TIllpWkXSg91rDWj+s3hFMFAj7sW +X+YSfkIve3piwpM11n0LsyEj30C7w5UXzgoLt4+CxnJaauas5mWSE+3x3OAWFzzlg+u viOainHXMS7kk0ltUKFZkUnOK6kPmTvEXniMZdr7FMTnlVP4D/wNFR8pnd1RLaJQ6was 7/cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@etsukata-com.20150623.gappssmtp.com header.s=20150623 header.b=NoIcq9Pg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r19si26694147pfh.50.2019.07.17.18.25.18; Wed, 17 Jul 2019 18:25:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@etsukata-com.20150623.gappssmtp.com header.s=20150623 header.b=NoIcq9Pg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387455AbfGRBXZ (ORCPT + 99 others); Wed, 17 Jul 2019 21:23:25 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39298 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727487AbfGRBXY (ORCPT ); Wed, 17 Jul 2019 21:23:24 -0400 Received: by mail-pl1-f193.google.com with SMTP id b7so12953408pls.6 for ; Wed, 17 Jul 2019 18:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=etsukata-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:openpgp:autocrypt:cc:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=lbzCvZDGyPKPq8F4BmEKa3ahl7R/ac02jNKU8Fy5zIM=; b=NoIcq9Pgg0Mfv0npWnMHoeU/qnF5lhl58eJALtFrY84Tu8TfmO9RHdQwTjDDQon+3O IZwynXowSYhjoIWJ7IRb+A3ryQ+8+M91j+jgC/OsuhfefUuU9X4dmBbOeMX8czCgeemB pmIGtVa5MMqEbHHhK87yCZgXSS+j6c9FMHVEMvzlS2heMTLsbGVqwe9ungZesfcOKALG 8fwuZrM+XKAjSzFcalCpC9IlaHU2bQNfe5u+wt4curcf3jzCR8jTsYHKWn+2QDB8ucdr w+AGJufr+djipqAfO2CwGyimGSgtPoD+piJy5F06vXeR0H1a3Kp1geJqYXimsspyCIXI Lv0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt:cc :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=lbzCvZDGyPKPq8F4BmEKa3ahl7R/ac02jNKU8Fy5zIM=; b=Wc7dmJKe5BGMrpLMH7R+s2gAF1tOe3fsBCxyod6/ZMIx9TPsCgdeMSAtbPrFCwZsWH wsPd2ESiqEfQvJk8feHaudmnaszAyxNijktKNbCWJTkTdG040h2scqaa1Nvs/sqEcHtl LydYFiEIvN3uB1K0ziiQnv2hqP/3s6JD7VisVz0bdvHhq2wMTGI5Q0ggTpK1L8gJAFBu PEv5UCAx8dgxnojmhTa5GKtY3s7gwTDbtFALrEIG/28BRDIvUimVvPFC0Y+ZjZ3YeYGp KNwicJnhwELiwteplTsjT0tns001otMgR/UR0jQrImybDc0Z7K8uxwUyRU0HZ7URuYWc gBgQ== X-Gm-Message-State: APjAAAXK6/kXSBUKYBzhFQZ2pxR14/XmabJdKGzuM+zESOPQcG2zY3JJ i4dmlhEW6jqxbEBBfKlVmtU= X-Received: by 2002:a17:902:f301:: with SMTP id gb1mr46176551plb.292.1563413003548; Wed, 17 Jul 2019 18:23:23 -0700 (PDT) Received: from etsukata.local (fs76eecbcd.tkyc008.ap.nuro.jp. [118.238.203.205]) by smtp.gmail.com with ESMTPSA id r6sm17765963pgl.74.2019.07.17.18.23.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jul 2019 18:23:22 -0700 (PDT) Subject: Re: [PATCH] tracing: Fix user stack trace "??" output To: rostedt@goodmis.org, linux-kernel@vger.kernel.org References: <20190630085438.25545-1-devel@etsukata.com> From: Eiichi Tsukata Openpgp: preference=signencrypt Autocrypt: addr=devel@etsukata.com; keydata= mQINBFydxe0BEAC2IUPqvxwzh0TS8DvqmjU+pycCq4xToLnCTy9gfmHd/mJWGykQJ7SXXFg2 bTAp8XcITVEDvhMUc0G4l+RBYkArwkaMHO5iM4a7+Gnn6beV1CL/dk9Wu5gkThgL11bhyKmQ Ub1duuVkX3fN2cRW2DrHsTp+Bxd/pq5rrKAbA/LIFmF4Oipapgr69I5wUeYywpzPFuaVkoZc oLdAscwEvPImSOAAJN0sesBW9sBAH34P+xaW2/Mug5aNUm/K6whApeFV/qz2UuOGjzY4fbYw AjK1ALIK8rdeAPxvp2e1dXrj29YrIZ2DkzdR0Y9O8Lfz1Pp5aQ+pwUQzn2vWA3R45IItVtV5 8v04N/F7rc/1OHFpgFtzgAO2M51XiIPdbSmF/WuWPsdEHWgpVW3H/I8amstfH519Xb/AOKYQ 7a14/3EESVuqXyyfCdTVnBNRRY0qXJ7mA0oParMD8XKMOVLj6Nlvs2Zh2LjNJhUDsssKNBg+ sMKiaeSV8dtcbH2XCc2GDKsYbrIKG3cu5nZl8xjlM3WdtdvqWpuHj6KTYBQgsXngBA7TDZWT /ccYyEQpUdtCqPwV0BPho6pr8Ug6J99b1KyZKd/z3iQNHYYh3Iy08wIfUHEXoFiYhMtbfKtW 21B/27EABXMHYnvekhJkVA9E4sfGlDZypU7hWEoiGnAZLCkr2QARAQABtCNFaWljaGkgVHN1 a2F0YSA8ZGV2ZWxAZXRzdWthdGEuY29tPokCVAQTAQgAPhYhBKeOigYiCR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ouvlILKLcDPNO51R5XKsc1 zxZwI+P1sTpSBI/KtFfphfaN93H3dLiy26D1P8ShFz6IEfTgK4OVWhqCaOe9oTXTwwNzBQ4= Cc: tglx@linutronix.de, peterz@infradead.org, mingo@redhat.com Message-ID: <1789efd4-1108-64e8-a6aa-39ca5d5595dc@etsukata.com> Date: Thu, 18 Jul 2019 10:23:19 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190630085438.25545-1-devel@etsukata.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Steven Would you review the patch? On 2019/06/30 17:54, Eiichi Tsukata wrote: > Commit c5c27a0a5838 ("x86/stacktrace: Remove the pointless ULONG_MAX > marker") removes ULONG_MAX marker from user stack trace entries but > trace_user_stack_print() still uses the marker and it outputs unnecessary > "??". > > For example: > > less-1911 [001] d..2 34.758944: > => <00007f16f2295910> > => ?? > => ?? > => ?? > => ?? > => ?? > => ?? > => ?? > > The user stack trace code zeroes the storage before saving the stack, so if > the trace is shorter than the maximum number of entries it can terminate > the print loop if a zero entry is detected. > > Fixes: 4285f2fcef80 ("tracing: Remove the ULONG_MAX stack trace hackery") > Signed-off-by: Eiichi Tsukata > --- > kernel/trace/trace_output.c | 9 +-------- > 1 file changed, 1 insertion(+), 8 deletions(-) > > diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c > index ba751f993c3b..cab4a5398f1d 100644 > --- a/kernel/trace/trace_output.c > +++ b/kernel/trace/trace_output.c > @@ -1109,17 +1109,10 @@ static enum print_line_t trace_user_stack_print(struct trace_iterator *iter, > for (i = 0; i < FTRACE_STACK_ENTRIES; i++) { > unsigned long ip = field->caller[i]; > > - if (ip == ULONG_MAX || trace_seq_has_overflowed(s)) > + if (!ip || trace_seq_has_overflowed(s)) > break; > > trace_seq_puts(s, " => "); > - > - if (!ip) { > - trace_seq_puts(s, "??"); > - trace_seq_putc(s, '\n'); > - continue; > - } > - > seq_print_user_ip(s, mm, ip, flags); > trace_seq_putc(s, '\n'); > } >