From: "David S. Miller" <davem@davemloft.net>
To: Thomas Graf <tgraf@suug.ch>
Cc: kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com
Subject: Re: [PATCH] NETLINK: Use SKB_MAXORDER to calculate NLMSG_GOODSIZE
Date: Sun, 6 Feb 2005 22:25:22 -0800 [thread overview]
Message-ID: <20050206222522.21492f5c.davem@davemloft.net> (raw)
In-Reply-To: <20050128230327.GV31837@postel.suug.ch>
On Sat, 29 Jan 2005 00:03:27 +0100
Thomas Graf <tgraf@suug.ch> wrote:
> NLMSG_GOODSIZE specifies a good default size for the skb tailroom
> used in netlink messages when the size is unknown at the time of
> the allocation.
>
> The current value doesn't make much sense anymore because
> skb_shared_info isn't taken into account which means that
> depending on the architecture NLMSG_GOOSIZE can exceed PAGE_SIZE
> resulting in a waste of almost a complete page.
>
> Using SKB_MAXORDER solves this potential leak at the cost of
> slightly smaller but safer sizes for some architectures.
Applied, to 2.4.x and 2.6.x, thanks Thomas.
This issue comes up again and again. In the most recent
discussion I remember partaking in, I was trying to get it
so that all the code paths would calculate the size they
actually needed. Most, if not all, are able to do so.
prev parent reply other threads:[~2005-02-07 6:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-28 23:03 [PATCH] NETLINK: Use SKB_MAXORDER to calculate NLMSG_GOODSIZE Thomas Graf
2005-01-28 23:22 ` Herbert Xu
2005-01-28 23:40 ` Thomas Graf
2005-02-07 6:27 ` David S. Miller
2005-01-28 23:48 ` Alexey Kuznetsov
2005-01-29 0:21 ` Thomas Graf
2005-01-29 0:27 ` Thomas Graf
2005-02-07 6:32 ` David S. Miller
2005-02-07 13:28 ` Thomas Graf
2005-02-07 14:27 ` [PATCH] NET: Fix calculation for collapsed skb size Thomas Graf
2005-02-09 4:54 ` David S. Miller
2005-01-29 18:40 ` [PATCH] NETLINK: Use SKB_MAXORDER to calculate NLMSG_GOODSIZE Alexey Kuznetsov
2005-01-29 12:47 ` Thomas Graf
2005-02-06 18:54 ` Thomas Graf
2005-02-06 21:08 ` David S. Miller
2005-02-07 6:25 ` David S. Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050206222522.21492f5c.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@oss.sgi.com \
--cc=tgraf@suug.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).