Commit 01999074 authored by Wei Yongjun's avatar Wei Yongjun Committed by Andrew Morton

fault-injection: make some stack filter attrs more readable

Attributes of stack filter are show as unsigned decimal, such as
'require-start', 'require-end'.  This patch change to show them as
unsigned hexadecimal for more readable.

Before:
  $ echo 0xffffffffc0257000 > /sys/kernel/debug/failslab/require-start
  $ cat /sys/kernel/debug/failslab/require-start
  18446744072638263296

After:
  $ echo 0xffffffffc0257000 > /sys/kernel/debug/failslab/require-start
  $ cat /sys/kernel/debug/failslab/require-start
  0xffffffffc0257000

[wangyufen@huawei.com: use debugfs_create_xul() instead of debugfs_create_xl()]
  Link: https://lkml.kernel.org/r/1664331299-4976-1-git-send-email-wangyufen@huawei.com
Link: https://lkml.kernel.org/r/20220817080332.1052710-4-weiyongjun1@huawei.comSigned-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarWang Yufen <wangyufen@huawei.com>
Reviewed-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Isabella Basso <isabbasso@riseup.net>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 4acb9e51
...@@ -226,10 +226,10 @@ struct dentry *fault_create_debugfs_attr(const char *name, ...@@ -226,10 +226,10 @@ struct dentry *fault_create_debugfs_attr(const char *name,
#ifdef CONFIG_FAULT_INJECTION_STACKTRACE_FILTER #ifdef CONFIG_FAULT_INJECTION_STACKTRACE_FILTER
debugfs_create_stacktrace_depth("stacktrace-depth", mode, dir, debugfs_create_stacktrace_depth("stacktrace-depth", mode, dir,
&attr->stacktrace_depth); &attr->stacktrace_depth);
debugfs_create_ul("require-start", mode, dir, &attr->require_start); debugfs_create_xul("require-start", mode, dir, &attr->require_start);
debugfs_create_ul("require-end", mode, dir, &attr->require_end); debugfs_create_xul("require-end", mode, dir, &attr->require_end);
debugfs_create_ul("reject-start", mode, dir, &attr->reject_start); debugfs_create_xul("reject-start", mode, dir, &attr->reject_start);
debugfs_create_ul("reject-end", mode, dir, &attr->reject_end); debugfs_create_xul("reject-end", mode, dir, &attr->reject_end);
#endif /* CONFIG_FAULT_INJECTION_STACKTRACE_FILTER */ #endif /* CONFIG_FAULT_INJECTION_STACKTRACE_FILTER */
attr->dname = dget(dir); attr->dname = dget(dir);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment