Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751496AbdH3U2b (ORCPT ); Wed, 30 Aug 2017 16:28:31 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38338 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbdH3U2a (ORCPT ); Wed, 30 Aug 2017 16:28:30 -0400 Date: Wed, 30 Aug 2017 13:28:28 -0700 From: Andrew Morton To: Prakash Gupta Cc: mhocko@suse.com, vbabka@suse.cz, will.deacon@arm.com, catalin.marinas@arm.com, iamjoonsoo.kim@lge.com, rmk+kernel@arm.linux.org.uk, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 1/2] arm64: stacktrace: avoid listing stacktrace functions in stacktrace Message-Id: <20170830132828.0bf9b9bc64f51362a64a6694@linux-foundation.org> In-Reply-To: <1504078343-28754-1-git-send-email-guptap@codeaurora.org> References: <1504078343-28754-1-git-send-email-guptap@codeaurora.org> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 882 Lines: 22 On Wed, 30 Aug 2017 13:02:22 +0530 Prakash Gupta wrote: > The stacktraces always begin as follows: > > [] save_stack_trace_tsk+0x0/0x98 > [] save_stack_trace+0x24/0x28 > ... > > This is because the stack trace code includes the stack frames for itself. > This is incorrect behaviour, and also leads to "skip" doing the wrong thing > (which is the number of stack frames to avoid recording.) > > Perversely, it does the right thing when passed a non-current thread. Fix > this by ensuring that we have a known constant number of frames above the > main stack trace function, and always skip these. > > This was fixed for arch arm by Commit 3683f44c42e9 ("ARM: stacktrace: avoid > listing stacktrace functions in stacktrace") I can take this (with acks, please?) 3683f44c42e9 has a cc:stable but your patch does not. Should it?