Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp853051pxk; Thu, 17 Sep 2020 19:07:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwZW+/spIVtq9WDYc8LbCS+G3LsOfRpT0GUSf4iHN1dO1VLUPjjhnwjSFwZDK5REz3vqhm X-Received: by 2002:aa7:de91:: with SMTP id j17mr36526454edv.85.1600394853698; Thu, 17 Sep 2020 19:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600394853; cv=none; d=google.com; s=arc-20160816; b=qMhwUv4qbI6b2Mpr7AqpDGhIYGZBfSMkNQYV2GHWd1MnVpVJh5pa9pK7Z+g0mSvqn2 a5rrXgk4NieJTynlFDsCIHgv4x5tDBdWr6O1Dzehc8tG6tnjIxHsMW1DHCPp9WwZTAwS A5/3AwSV8/lLZYdaYVu/6aFc5pX0sR5FjkpWOSeEPj3PigxErCLLWi3MLh88umGSxYmS NNzO8Guf8u0zn1wJx/nEoMS6EAdjuBa1zBZVWlQhobM/6XpN1l/MIwPHXlcBb/0OTxN2 XxVfT90hqhFEinZVwLjqNZeSXvikvBicrf0+O/ne/ITzENXyGWQaWFT3XC13M0djr5pQ GgsA== 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:date:subject:cc:to:from :dkim-signature; bh=HfOrTjzJP+R04dpwKEwX2KRxOucnqw4OB+jfXdiQF/4=; b=ePiIEbvAO5QqX3ELgzXrWyVxxyhej6wx2FQ7SmRBj9EjSFvwh0WxUE2cmrNB3w3z7A A1pIKDm52Cgw54KA1nFxNhAy7OOmlGPC/RSdYfruuQN1gqA0FRx5/T4tpYKb2neZ63rR a0W3tmnuNfqgA+RvjrpKiRkuuPNFvGCmb6sHZpXquermWI0fv82rmm/ISHYu0pnZjRt2 2n3jN8a5l7NyIhZ6j/VvoFTNi+plBBwiKxaE1yCmmroS+7h10asFHXCwPr2p9K6u0Rpr e32oBOB0oozE+oRnzlWT4Mex0Hn4/kvZ1pkXeSsXpNbX2bqjU+N+IcCc5+BjJTrSwsix l7fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YnhORmxx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a20si1483714edj.252.2020.09.17.19.07.10; Thu, 17 Sep 2020 19:07:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YnhORmxx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727040AbgIRCDU (ORCPT + 99 others); Thu, 17 Sep 2020 22:03:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:49340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727015AbgIRCDR (ORCPT ); Thu, 17 Sep 2020 22:03:17 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2A6782344C; Fri, 18 Sep 2020 02:03:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394596; bh=Y87WWjGl1GuRKGIlBHPhg//1M4aHTBf8DvjsqAWO2Vo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YnhORmxxPYwkMJ9cPRPg8UskuJUH8rzfVz6Kirzq26c7NtcuYcArK0N/J5TMpX6iz w+oObZX0LWbTH8nAHGbTV6Q88GrBIt56zYTJngSsYQ0D39Ef83ERFurRGsqC79QXWs +FFyHg7om/Z1k9DcMipyh7b+tuxThLgkUBqJT66Q= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Josef Bacik , Steven Rostedt , Sasha Levin Subject: [PATCH AUTOSEL 5.4 104/330] tracing: Set kernel_stack's caller size properly Date: Thu, 17 Sep 2020 21:57:24 -0400 Message-Id: <20200918020110.2063155-104-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Josef Bacik [ Upstream commit cbc3b92ce037f5e7536f6db157d185cd8b8f615c ] I noticed when trying to use the trace-cmd python interface that reading the raw buffer wasn't working for kernel_stack events. This is because it uses a stubbed version of __dynamic_array that doesn't do the __data_loc trick and encode the length of the array into the field. Instead it just shows up as a size of 0. So change this to __array and set the len to FTRACE_STACK_ENTRIES since this is what we actually do in practice and matches how user_stack_trace works. Link: http://lkml.kernel.org/r/1411589652-1318-1-git-send-email-jbacik@fb.com Signed-off-by: Josef Bacik [ Pulled from the archeological digging of my INBOX ] Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Sasha Levin --- kernel/trace/trace_entries.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_entries.h b/kernel/trace/trace_entries.h index fc8e97328e540..78c146efb8623 100644 --- a/kernel/trace/trace_entries.h +++ b/kernel/trace/trace_entries.h @@ -174,7 +174,7 @@ FTRACE_ENTRY(kernel_stack, stack_entry, F_STRUCT( __field( int, size ) - __dynamic_array(unsigned long, caller ) + __array( unsigned long, caller, FTRACE_STACK_ENTRIES ) ), F_printk("\t=> %ps\n\t=> %ps\n\t=> %ps\n" -- 2.25.1