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]
Date:	Wed, 18 Jul 2007 15:34:13 +0200
From:	Johannes Berg <johannes@...solutions.net>
To:	Patrick McHardy <kaber@...sh.net>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	Zhang Rui <rui.zhang@...el.com>, jamal <hadi@...erus.ca>
Subject: Re: [patch 1/3] netlink: allocate group bitmaps dynamically

On Tue, 2007-07-17 at 17:45 +0200, Patrick McHardy wrote:

> > --- wireless-dev.orig/net/netlink/af_netlink.c	2007-07-17 14:05:30.210964463 +0200
> > +++ wireless-dev/net/netlink/af_netlink.c	2007-07-17 14:05:30.720964463 +0200
> > -static int netlink_alloc_groups(struct sock *sk)
> > +static int netlink_realloc_groups(struct sock *sk)
> >  {
> >  	struct netlink_sock *nlk = nlk_sk(sk);
> >  	unsigned int groups;
> > +	unsigned long *new_groups;
> >  	int err = 0;
> >  
> >  	netlink_lock_table();
> 
> 
> This is actually a bug in the current code I think, netlink_lock_table
> is a reader lock.

Looks like, changed to netlink_table_grab()


> > +int netlink_change_ngroups(int unit, unsigned int groups)
> 
> 
> I think it would be more consistent to pass the kernel socket
> instead of the unit.

Alright, changed. Also added kernel doc for the function.

> This might set the group to a value < 32. I don't expect it matters,
> but when I changed to old code to support > 32 groups I enforced
> a minimum of 32 so anything outside the kernel multicasting on them
> would still work (even though its a really stupid idea). So for
> consistency this should probably also use a minimum of 32.

Huh ok. Fixed, and added to documentation.

johannes

Download attachment "signature.asc" of type "application/pgp-signature" (191 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ