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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 19 Aug 2015 22:59:19 -0700
From:	Scott Feldman <sfeldma@...il.com>
To:	"Jason A. Donenfeld" <Jason@...c4.com>
Cc:	Netdev <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Exporting obscene amounts of data in rtnl_link_ops->fill_info()

On Wed, Aug 19, 2015 at 5:47 PM, Jason A. Donenfeld <Jason@...c4.com> wrote:
> Hi guys,
>
> I have a new link driver that registers a rtnl_link_ops. For many
> things, the rtnl interfaces are perfectly suited: I can use netlink in
> userspace to check out packet counts, adjust interface parameters, and
> all sorts of things. There is even the "fill_info" function exporting
> interface-specific types of data to userspace through the standard
> netlink interfaces. I'm glad this is here, because it's exactly what I
> want.
>
> Problem: sometimes I want to export a *lot* of data to userspace. When
> this happens, even if I make the netlink socket receive buffer really
> huge, this code path is still reached in rtnetlink.c:
>
>                         err = rtnl_fill_ifinfo(skb, dev, RTM_NEWLINK,
>                                                NETLINK_CB(cb->skb).portid,
>                                                cb->nlh->nlmsg_seq, 0,
>                                                NLM_F_MULTI,
>                                                ext_filter_mask);
>                         /* If we ran out of room on the first message,
>                          * we're in trouble
>                          */
>                         WARN_ON((err == -EMSGSIZE) && (skb->len == 0));
>
> That is -- it tries to fill the skb (for sending it back to
> userspace), but doesn't have enough room, so it returns -EMSGSIZE.
> That seems like reasonable behavior, but it doesn't really help me
> obtain my goal. I'd like to send quite a bit of data back to userspace
> for a network interface, and I'd like to do it using the standard
> netlink APIs. Is this possible?



What kind of data are you sending up?  Maybe there is an alternate interface.
--
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