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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-30191250c2b3ef772cc6125e1c31ac84123f1d20@git.kernel.org>
Date:   Mon, 29 Apr 2019 11:38:21 -0700
From:   tip-bot for Thomas Gleixner <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     hch@....de, snitzer@...hat.com, linux-kernel@...r.kernel.org,
        rodrigo.vivi@...el.com, joonas.lahtinen@...ux.intel.com,
        glider@...gle.com, dvyukov@...gle.com, airlied@...ux.ie,
        akinobu.mita@...il.com, maarten.lankhorst@...ux.intel.com,
        akpm@...ux-foundation.org, dsterba@...e.com, robin.murphy@....com,
        tglx@...utronix.de, daniel@...ll.ch, mingo@...nel.org,
        m.szyprowski@...sung.com, tom.zanussi@...ux.intel.com,
        catalin.marinas@....com, cl@...ux.com, hpa@...or.com,
        adobriyan@...il.com, mbenes@...e.cz, jpoimboe@...hat.com,
        jthumshirn@...e.de, rientjes@...gle.com,
        jani.nikula@...ux.intel.com, josef@...icpanda.com,
        aryabinin@...tuozzo.com, agk@...hat.com, luto@...nel.org,
        rppt@...ux.vnet.ibm.com, penberg@...nel.org, rostedt@...dmis.org,
        clm@...com
Subject: [tip:core/stacktrace] fault-inject: Simplify stacktrace retrieval

Commit-ID:  30191250c2b3ef772cc6125e1c31ac84123f1d20
Gitweb:     https://git.kernel.org/tip/30191250c2b3ef772cc6125e1c31ac84123f1d20
Author:     Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Thu, 25 Apr 2019 11:45:04 +0200
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Mon, 29 Apr 2019 12:37:50 +0200

fault-inject: Simplify stacktrace retrieval

Replace the indirection through struct stack_trace with an invocation of
the storage array based interface.

Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Akinobu Mita <akinobu.mita@...il.com>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Alexander Potapenko <glider@...gle.com>
Cc: Alexey Dobriyan <adobriyan@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Christoph Lameter <cl@...ux.com>
Cc: Pekka Enberg <penberg@...nel.org>
Cc: linux-mm@...ck.org
Cc: David Rientjes <rientjes@...gle.com>
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: Dmitry Vyukov <dvyukov@...gle.com>
Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>
Cc: kasan-dev@...glegroups.com
Cc: Mike Rapoport <rppt@...ux.vnet.ibm.com>
Cc: Christoph Hellwig <hch@....de>
Cc: iommu@...ts.linux-foundation.org
Cc: Robin Murphy <robin.murphy@....com>
Cc: Marek Szyprowski <m.szyprowski@...sung.com>
Cc: Johannes Thumshirn <jthumshirn@...e.de>
Cc: David Sterba <dsterba@...e.com>
Cc: Chris Mason <clm@...com>
Cc: Josef Bacik <josef@...icpanda.com>
Cc: linux-btrfs@...r.kernel.org
Cc: dm-devel@...hat.com
Cc: Mike Snitzer <snitzer@...hat.com>
Cc: Alasdair Kergon <agk@...hat.com>
Cc: Daniel Vetter <daniel@...ll.ch>
Cc: intel-gfx@...ts.freedesktop.org
Cc: Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
Cc: dri-devel@...ts.freedesktop.org
Cc: David Airlie <airlied@...ux.ie>
Cc: Jani Nikula <jani.nikula@...ux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@...el.com>
Cc: Tom Zanussi <tom.zanussi@...ux.intel.com>
Cc: Miroslav Benes <mbenes@...e.cz>
Cc: linux-arch@...r.kernel.org
Link: https://lkml.kernel.org/r/20190425094802.158306076@linutronix.de

---
 lib/fault-inject.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/lib/fault-inject.c b/lib/fault-inject.c
index cf7b129b0b2b..e26aa4f65eb9 100644
--- a/lib/fault-inject.c
+++ b/lib/fault-inject.c
@@ -65,22 +65,16 @@ static bool fail_task(struct fault_attr *attr, struct task_struct *task)
 
 static bool fail_stacktrace(struct fault_attr *attr)
 {
-	struct stack_trace trace;
 	int depth = attr->stacktrace_depth;
 	unsigned long entries[MAX_STACK_TRACE_DEPTH];
-	int n;
+	int n, nr_entries;
 	bool found = (attr->require_start == 0 && attr->require_end == ULONG_MAX);
 
 	if (depth == 0)
 		return found;
 
-	trace.nr_entries = 0;
-	trace.entries = entries;
-	trace.max_entries = depth;
-	trace.skip = 1;
-
-	save_stack_trace(&trace);
-	for (n = 0; n < trace.nr_entries; n++) {
+	nr_entries = stack_trace_save(entries, depth, 1);
+	for (n = 0; n < nr_entries; n++) {
 		if (attr->reject_start <= entries[n] &&
 			       entries[n] < attr->reject_end)
 			return false;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ