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]
Message-ID: <20181210102157.6fa8fd8b@cakuba.netronome.com>
Date:   Mon, 10 Dec 2018 10:21:57 -0800
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Yangtao Li <tiny.windzz@...il.com>
Cc:     davem@...emloft.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bpf: convert to DEFINE_SHOW_ATTRIBUTE

On Mon, 10 Dec 2018 11:03:27 -0500, Yangtao Li wrote:
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@...il.com>

Acked-by: Jakub Kicinski <jakub.kicinski@...ronome.com>

Please post v2 with the subject prefix set to "netdevsim:" rather than
"bpf:".

>  drivers/net/netdevsim/bpf.c | 16 ++--------------
>  1 file changed, 2 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/net/netdevsim/bpf.c b/drivers/net/netdevsim/bpf.c
> index cb3518474f0e..14b4d9774708 100644
> --- a/drivers/net/netdevsim/bpf.c
> +++ b/drivers/net/netdevsim/bpf.c
> @@ -48,7 +48,7 @@ struct nsim_bpf_bound_map {
>  	struct list_head l;
>  };
>  
> -static int nsim_debugfs_bpf_string_read(struct seq_file *file, void *data)
> +static int nsim_bpf_string_show(struct seq_file *file, void *data)
>  {
>  	const char **str = file->private;
>  
> @@ -57,19 +57,7 @@ static int nsim_debugfs_bpf_string_read(struct seq_file *file, void *data)
>  
>  	return 0;
>  }
> -
> -static int nsim_debugfs_bpf_string_open(struct inode *inode, struct file *f)
> -{
> -	return single_open(f, nsim_debugfs_bpf_string_read, inode->i_private);
> -}
> -
> -static const struct file_operations nsim_bpf_string_fops = {
> -	.owner = THIS_MODULE,
> -	.open = nsim_debugfs_bpf_string_open,
> -	.release = single_release,
> -	.read = seq_read,
> -	.llseek = seq_lseek
> -};
> +DEFINE_SHOW_ATTRIBUTE(nsim_bpf_string);
>  
>  static int
>  nsim_bpf_verify_insn(struct bpf_verifier_env *env, int insn_idx, int prev_insn)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ