lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-b01f6d368d296cac099383a3eb200e135420f885@git.kernel.org>
Date:   Sun, 14 Apr 2019 13:36:11 -0700
From:   tip-bot for Thomas Gleixner <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     jpoimboe@...hat.com, peterz@...radead.org, tglx@...utronix.de,
        linux-kernel@...r.kernel.org, dalias@...c.org, rostedt@...dmis.org,
        luto@...nel.org, mingo@...nel.org, glider@...gle.com,
        ysato@...rs.sourceforge.jp, kuninori.morimoto.gx@...esas.com,
        horms+renesas@...ge.net.au, hpa@...or.com
Subject: [tip:core/stacktrace] sh/stacktrace: Remove the pointless ULONG_MAX
 marker

Commit-ID:  b01f6d368d296cac099383a3eb200e135420f885
Gitweb:     https://git.kernel.org/tip/b01f6d368d296cac099383a3eb200e135420f885
Author:     Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Wed, 10 Apr 2019 12:27:58 +0200
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Sun, 14 Apr 2019 19:58:28 +0200

sh/stacktrace: Remove the pointless ULONG_MAX marker

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 <tglx@...utronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Alexander Potapenko <glider@...gle.com>
Cc: Rich Felker <dalias@...c.org>
Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Cc: linux-sh@...r.kernel.org
Cc: Simon Horman <horms+renesas@...ge.net.au>
Link: https://lkml.kernel.org/r/20190410103643.932464393@linutronix.de

---
 arch/sh/kernel/stacktrace.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c
index f3cb2cccb262..2950b19ad077 100644
--- a/arch/sh/kernel/stacktrace.c
+++ b/arch/sh/kernel/stacktrace.c
@@ -49,8 +49,6 @@ void save_stack_trace(struct stack_trace *trace)
 	unsigned long *sp = (unsigned long *)current_stack_pointer;
 
 	unwind_stack(current, NULL, sp,  &save_stack_ops, trace);
-	if (trace->nr_entries < trace->max_entries)
-		trace->entries[trace->nr_entries++] = ULONG_MAX;
 }
 EXPORT_SYMBOL_GPL(save_stack_trace);
 
@@ -84,7 +82,5 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
 	unsigned long *sp = (unsigned long *)tsk->thread.sp;
 
 	unwind_stack(current, NULL, sp,  &save_stack_ops_nosched, trace);
-	if (trace->nr_entries < trace->max_entries)
-		trace->entries[trace->nr_entries++] = ULONG_MAX;
 }
 EXPORT_SYMBOL_GPL(save_stack_trace_tsk);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ