The patch titled Subject: fault-injection: skip stacktrace filtering by default has been added to the -mm mm-nonmm-unstable branch. Its filename is fault-injection-skip-stacktrace-filtering-by-default.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/fault-injection-skip-stacktrace-filtering-by-default.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Wei Yongjun <weiyongjun1@xxxxxxxxxx> Subject: fault-injection: skip stacktrace filtering by default Date: Wed, 17 Aug 2022 08:03:30 +0000 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 changes to quick return from fail_stacktrace() if stacktrace filter is not set. Link: https://lkml.kernel.org/r/20220817080332.1052710-3-weiyongjun1@xxxxxxxxxx Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx> Cc: Akinobu Mita <akinobu.mita@xxxxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Cc: Isabella Basso <isabbasso@xxxxxxxxxx> Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Miguel Ojeda <ojeda@xxxxxxxxxx> Cc: Nathan Chancellor <nathan@xxxxxxxxxx> Cc: Nick Desaulniers <ndesaulniers@xxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/fault-inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/lib/fault-inject.c~fault-injection-skip-stacktrace-filtering-by-default +++ a/lib/fault-inject.c @@ -74,7 +74,7 @@ static bool fail_stacktrace(struct fault 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); _ Patches currently in -mm which might be from weiyongjun1@xxxxxxxxxx are fault-injection-allow-stacktrace-filter-for-x86-64.patch fault-injection-skip-stacktrace-filtering-by-default.patch fault-injection-make-some-stack-filter-attrs-more-readable.patch fault-injection-make-stacktrace-filter-works-as-expected.patch