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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 19 Aug 2022 22:24:10 +0900
From:   Akinobu Mita <akinobu.mita@...il.com>
To:     Wei Yongjun <weiyongjun1@...wei.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Kees Cook <keescook@...omium.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Josh Poimboeuf <jpoimboe@...nel.org>,
        Dan Williams <dan.j.williams@...el.com>,
        Miguel Ojeda <ojeda@...nel.org>,
        Isabella Basso <isabbasso@...eup.net>,
        Vlastimil Babka <vbabka@...e.cz>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/4 -next] fault-injection: make some stack filter attrs
 more readable

2022年8月17日(水) 16:45 Wei Yongjun <weiyongjun1@...wei.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@...wei.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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ