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]
Date:   Mon, 12 Dec 2022 10:11:14 +0800
From:   Wang Yufen <wangyufen@...wei.com>
To:     <akinobu.mita@...il.com>, <akpm@...ux-foundation.org>,
        <nathan@...nel.org>, <peterz@...radead.org>,
        <keescook@...omium.org>, <ndesaulniers@...gle.com>,
        <jpoimboe@...nel.org>, <dan.j.williams@...el.com>,
        <ojeda@...nel.org>, <isabbasso@...eup.net>, <vbabka@...e.cz>,
        <linux@...musvillemoes.dk>
CC:     <linux-kernel@...r.kernel.org>, <weiyongjun1@...wei.com>
Subject: [PATCH -next v2 2/4] fault-injection: skip stacktrace filtering by default

From: Wei Yongjun <weiyongjun1@...wei.com>

If FAULT_INJECTION_STACKTRACE_FILTER is enabled, the depth is default
to 32. This means fail_stacktrace() will iter each entry's stacktrace,
even if filter is not configured.

This patch change to quick return from fail_stacktrace() if stacktrace
filter is not set.

Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
 lib/fault-inject.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fault-inject.c b/lib/fault-inject.c
index 1421818..fecc4d8 100644
--- a/lib/fault-inject.c
+++ b/lib/fault-inject.c
@@ -71,7 +71,7 @@ static bool fail_stacktrace(struct fault_attr *attr)
 	int n, nr_entries;
 	bool found = (attr->require_start == 0 && attr->require_end == ULONG_MAX);
 
-	if (depth == 0)
+	if (depth == 0 || (found && !attr->reject_start && !attr->reject_end))
 		return found;
 
 	nr_entries = stack_trace_save(entries, depth, 1);
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ