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: <43F901BD926A4E43B106BF17856F0755018E321C21@orsmsx508.amr.corp.intel.com>
Date:	Wed, 18 May 2011 15:35:58 -0700
From:	"Rose, Gregory V" <gregory.v.rose@...el.com>
To:	David Miller <davem@...emloft.net>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"bhutchings@...arflare.com" <bhutchings@...arflare.com>,
	"eric.dumazet@...il.com" <eric.dumazet@...il.com>
Subject: RE: [RFC V4 PATCH] rtnetlink: Compute and store minimum ifinfo dump
 size

> -----Original Message-----
> From: David Miller [mailto:davem@...emloft.net]
> Sent: Wednesday, May 18, 2011 3:09 PM
> To: Rose, Gregory V
> Cc: netdev@...r.kernel.org; bhutchings@...arflare.com;
> eric.dumazet@...il.com
> Subject: Re: [RFC V4 PATCH] rtnetlink: Compute and store minimum ifinfo
> dump size
> 
> From: Greg Rose <gregory.v.rose@...el.com>
> Date: Wed, 18 May 2011 08:54:11 -0700
> 
> > The message size allocated for rtnl info dumps was limited to a single
> > page.  This is not enough for additional interface info available with
> > devices that support SR-IOV.  Calculate the amount of data required so
> > the dump can allocate enough data to satisfy the request.
> >
> > V2 added the calcit function to the rtnl_register calls so that
> > dump functions could get the minimum dump allocation size if they
> > needed to.
> >
> > V3 leverages the fact that the netdev register function ends up
> > calling if_nlmsg_size.  We collect the minimum dump allocation size
> > there and keep it in a module static variable so that the calcit
> > function doesn't have to search for the device on every info dump.
> >
> > V4 fixes the title.
> >
> > Signed-off-by: Greg Rose <gregory.v.rose@...el.com>
> 
> This only works if someone does a plain GETLINK request on the largest
> space requiring device before the dump request happens.

It looked to me like rtmsg_ifinfo is called when each device is registered through register_netdevice() and rtmsg_ifinfo in turn calls the if_nlmsg_size function returning the ifinfo dump size for each device.  In my testing it looked like the proper maximum size was being set after I loaded the drivers for the SR-IOV capable devices.

Perhaps I missed something?  Is register_netdevice not always called before a device is used?

- Greg

--
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