linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Kees Cook <keescook@chromium.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Miguel Ojeda <ojeda@kernel.org>,
	Isabella Basso <isabbasso@riseup.net>,
	Vlastimil Babka <vbabka@suse.cz>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4 -next] fault-injection: make some stack filter attrs more readable
Date: Fri, 19 Aug 2022 22:24:10 +0900	[thread overview]
Message-ID: <CAC5umyhZrUsOCDbWPznRpuaDwScHf7yKA5m8X8jwVztm6B+meA@mail.gmail.com> (raw)
In-Reply-To: <20220817080332.1052710-4-weiyongjun1@huawei.com>

2022年8月17日(水) 16:45 Wei Yongjun <weiyongjun1@huawei.com>:
>
> 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
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  lib/fault-inject.c | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/lib/fault-inject.c b/lib/fault-inject.c
> index 515fc5aaf032..deca05e7c9b3 100644
> --- a/lib/fault-inject.c
> +++ b/lib/fault-inject.c
> @@ -179,6 +179,14 @@ static void debugfs_create_ul(const char *name, umode_t mode,
>
>  #ifdef CONFIG_FAULT_INJECTION_STACKTRACE_FILTER
>
> +DEFINE_SIMPLE_ATTRIBUTE(fops_xl, debugfs_ul_get, debugfs_ul_set, "0x%llx\n");
> +
> +static void debugfs_create_xl(const char *name, umode_t mode,
> +                             struct dentry *parent, unsigned long *value)
> +{
> +       debugfs_create_file(name, mode, parent, value, &fops_xl);
> +}

How about using an existing `debugfs_create_xul()` instead of defining
a local helper function?

  reply	other threads:[~2022-08-19 13:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17  8:03 [PATCH 0/4 -next] fault-injection: make stacktrace filter works with others Wei Yongjun
2022-08-17  8:03 ` [PATCH 1/4 -next] fault-injection: allow stacktrace filter for x86-64 Wei Yongjun
2022-08-17  8:03 ` [PATCH 2/4 -next] fault-injection: skip stacktrace filtering by default Wei Yongjun
2022-08-17  8:03 ` [PATCH 3/4 -next] fault-injection: make some stack filter attrs more readable Wei Yongjun
2022-08-19 13:24   ` Akinobu Mita [this message]
2022-10-03 21:17     ` Andrew Morton
2022-08-17  8:03 ` [PATCH 4/4 -next] fault-injection: make stacktrace filter works as expected Wei Yongjun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAC5umyhZrUsOCDbWPznRpuaDwScHf7yKA5m8X8jwVztm6B+meA@mail.gmail.com \
    --to=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=isabbasso@riseup.net \
    --cc=jpoimboe@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=vbabka@suse.cz \
    --cc=weiyongjun1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).