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, 25 Jun 2008 15:51:46 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	tgraf@...g.ch
Cc:	kaber@...sh.net, juliusv@...gle.com, netdev@...r.kernel.org,
	vbusam@...gle.com
Subject: Re: Sending big Netlink messages to userspace

From: Thomas Graf <tgraf@...g.ch>
Date: Wed, 25 Jun 2008 12:44:01 +0200

> * Julius Volz <juliusv@...gle.com> 2008-06-24 20:18
> > libnl hides this from the user, but from reading the code it looks
> > like it now has correct a provision for increasing receive buffer size
> > automatically on seeing MSG_TRUNC. However, it doesn't seem to help in
> > my case...
> 
> libnl initializes the buffer size to the size of a page. The value
> can be overwritten by calling nl_set_buffer_size(socket, rx, tx)

And it doesn't need to be any larger than a page.  Actually, the
hard upper bound is 8K.

The kernel will always chop the response up into chunks of that
size or smaller when generating replies to userspace.

Therefore userland need never have a buffer larger than 8K or
sysconf(_SC_PAGESIZE), whichever is smaller.
--
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