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] [day] [month] [year] [list]
Date:   Wed, 3 Feb 2021 00:14:44 +0900
From:   Akinobu Mita <akinobu.mita@...il.com>
To:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fault_inject: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021年2月1日(月) 16:43 Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>:
>
> Fix the following coccicheck warning:
>
> ./lib/fault-inject.c:187:0-23: WARNING: fops_stacktrace_depth should be
> defined with DEFINE_DEBUGFS_ATTRIBUTE.
>
> ./lib/fault-inject.c:169:0-23: WARNING: fops_ul should be defined with
> DEFINE_DEBUGFS_ATTRIBUTE.
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> ---
>  lib/fault-inject.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/lib/fault-inject.c b/lib/fault-inject.c
> index ce12621..cb7ea22 100644
> --- a/lib/fault-inject.c
> +++ b/lib/fault-inject.c
> @@ -166,7 +166,7 @@ static int debugfs_ul_get(void *data, u64 *val)
>         return 0;
>  }
>
> -DEFINE_SIMPLE_ATTRIBUTE(fops_ul, debugfs_ul_get, debugfs_ul_set, "%llu\n");
> +DEFINE_DEBUGFS_ATTRIBUTE(fops_ul, debugfs_ul_get, debugfs_ul_set, "%llu\n");
>
>  static void debugfs_create_ul(const char *name, umode_t mode,
>                               struct dentry *parent, unsigned long *value)

Could you just remove this fops_ul stuff and use debugfs_create_ulong() instead?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ