From patchwork Wed Apr 10 10:27:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 1083310 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linutronix.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="R54+Zg5B"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44fLtg0WdWz9s70 for ; Wed, 10 Apr 2019 21:06:03 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Subject:To:From :Date:Message-Id:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: List-Owner; bh=8un2Ah4GPwXA0T7D6gCspNz4h6Q+Iv9VqnKNA4itCRc=; b=R54+Zg5BFg/kwj Db84+I5DU3w4TCRfmXdKRS+ZvnEAp0VdMDfUo0dQ4y5DurBA5k9j0ve+MlNa7HZPiFONoh3vIrKle QLG3xawka5W7sG9jFnUc7dkHnlCR6/TQEQYnsGSJoasOaGbg6cCDcIcZLMNwfTL5NqWlCy6S6oDS5 l9+CBb9qJXVndJ7Gxba4anhgxfiKgkZZnfbP8PS0DdFwHBH0DP2Z6Ukt3DrVgI8VeoyzKqjIi9SjO zUihsUm/B/NTw6YpnB0N44GVoOyfj1Bwp6dcHUt6beF3urfMlcAStOuhpRFruZpM06OqsKpgFzP+s 0v9REpmml3KioHP76djg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEB3B-0002ms-7A; Wed, 10 Apr 2019 11:05:53 +0000 Received: from galois.linutronix.de ([2a01:7a0:2:106d:700::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEB32-0002e7-W9 for linux-um@lists.infradead.org; Wed, 10 Apr 2019 11:05:47 +0000 Received: from localhost ([127.0.0.1] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1hEB2l-00050q-T2; Wed, 10 Apr 2019 13:05:28 +0200 Message-Id: <20190410103643.662853876@linutronix.de> User-Agent: quilt/0.65 Date: Wed, 10 Apr 2019 12:27:55 +0200 From: Thomas Gleixner To: LKML Subject: [RFC patch 01/41] um/stacktrace: Remove the pointless ULONG_MAX marker References: <20190410102754.387743324@linutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190410_040545_178569_9194C626 X-CRM114-Status: UNSURE ( 7.68 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [2a01:7a0:2:106d:700:0:0:1 listed in] [list.dnswl.org] X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Weinberger , x86@kernel.org, linux-um@lists.infradead.org, Steven Rostedt , Alexander Potapenko , Andy Lutomirski , Josh Poimboeuf Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Terminating the last trace entry with ULONG_MAX is a completely pointless exercise and none of the consumers can rely on it because it's inconsistently implemented across architectures. In fact quite some of the callers remove the entry and adjust stack_trace.nr_entries afterwards. Signed-off-by: Thomas Gleixner Cc: Richard Weinberger Cc: linux-um@lists.infradead.org --- arch/um/kernel/stacktrace.c | 2 -- 1 file changed, 2 deletions(-) --- a/arch/um/kernel/stacktrace.c +++ b/arch/um/kernel/stacktrace.c @@ -63,8 +63,6 @@ static const struct stacktrace_ops dump_ static void __save_stack_trace(struct task_struct *tsk, struct stack_trace *trace) { dump_trace(tsk, &dump_ops, trace); - if (trace->nr_entries < trace->max_entries) - trace->entries[trace->nr_entries++] = ULONG_MAX; } void save_stack_trace(struct stack_trace *trace)