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]
Message-Id: <20130526.003715.728961070406338721.davem@davemloft.net>
Date:	Sun, 26 May 2013 00:37:15 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	jiri@...nulli.us
Cc:	netdev@...r.kernel.org, edumazet@...gle.com,
	alexander.h.duyck@...el.com, xiyou.wangcong@...il.com
Subject: Re: [patch net-next] net: add netnotifier event for upper device
 change

From: Jiri Pirko <jiri@...nulli.us>
Date: Sun, 26 May 2013 09:10:39 +0200

> Sun, May 26, 2013 at 08:14:13AM CEST, davem@...emloft.net wrote:
>>If someone is looking for a useful project, switching networking over to
>>a more typed notifier system would be a worthwhile improvement.
>>
>>It's hard to right now to communicate what changed beyond "action X
>>happened to this object, you have to check to see exactly how it
>>changed"
> 
> Hmm. Do you have something particular in mind? My first thought was
> passing some union instead of NETDEV_* numbers.

Part of the problem is that notifiers are untyped.

So you can say "NETDEV_* means struct foo" but nothing in the C
typing system will enforce this, so errors are inevitable.

Perhaps one level of encapsulation will help:

static inline call_netdevice_feat_change(struct net_device *dev,
					 netdev_features_t old,
					 netdev_features_t new)
{
	struct netdevice_feat_change_info info;

	info.dev = dev;
	info.old = old;
	info.new = new;
	call_netdevice_notifiers(NETDEV_FEAT_CHANGE, &info);
}

>>This came up recently with the IFF_NOARP stuff.
> 
> Can you point me to the discussion?

It's in this patchwork thread:

http://patchwork.ozlabs.org/patch/245256/
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ