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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220310211301.477e323c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Thu, 10 Mar 2022 21:13:01 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Petr Machata <petrm@...dia.com>
Cc:     <netdev@...r.kernel.org>, "David S. Miller" <davem@...emloft.net>,
        Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net-next 1/3] netdevsim: Introduce support for L3
 offload xstats

On Thu, 10 Mar 2022 17:12:22 +0100 Petr Machata wrote:
> +static ssize_t nsim_dev_hwstats_l3_enable_write(struct file *file,
> +						const char __user *data,
> +						size_t count, loff_t *ppos)
> +{
> +	return nsim_dev_hwstats_do_write(file, data, count, ppos,
> +					 NSIM_DEV_HWSTATS_DO_ENABLE,
> +					 NETDEV_OFFLOAD_XSTATS_TYPE_L3);
> +}

I think you could avoid having the three wrappers if you kept 
separate fops and added a switch to the write function keying 
on debugfs_real_fops().

With that:

Acked-by: Jakub Kicinski <kuba@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ