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: <20170110100901.GB1827@nanopsycho>
Date:   Tue, 10 Jan 2017 11:09:01 +0100
From:   Jiri Pirko <jiri@...nulli.us>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        vivien.didelot@...oirfairelinux.com, andrew@...n.ch,
        marcelo.leitner@...il.com
Subject: Re: [PATCH net-next v2 1/4] net: switchdev: Prepare for deferred
 functions modifying objects

Mon, Jan 09, 2017 at 09:45:20PM CET, f.fainelli@...il.com wrote:
>In preparation for adding support for deferred dump operations, allow
>specifying a deferred function whose signature allows read/write
>objects.
>
>Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
>---
> net/switchdev/switchdev.c | 21 ++++++++++++++++-----
> 1 file changed, 16 insertions(+), 5 deletions(-)
>
>diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
>index 017801f9dbaa..3d70ad02c617 100644
>--- a/net/switchdev/switchdev.c
>+++ b/net/switchdev/switchdev.c
>@@ -100,11 +100,14 @@ static DEFINE_SPINLOCK(deferred_lock);
> 
> typedef void switchdev_deferred_func_t(struct net_device *dev,
> 				       const void *data);
>+typedef void switchdev_deferred_func_rw_t(struct net_device *dev,
>+					  void *data);
> 
> struct switchdev_deferred_item {
> 	struct list_head list;
> 	struct net_device *dev;
> 	switchdev_deferred_func_t *func;
>+	switchdev_deferred_func_rw_t *func_rw;

I'm missing why you need to have 2 funcs here. Why you just can't re-use
func?


> 	unsigned long data[0];
> };

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ