From: Dan Rosenberg <drosenberg@vsecurity.com>
To: Thomas Graf <tgraf@infradead.org>
Cc: "David S. Miller" <davem@davemloft.net>,
Oliver Hartkopp <socketcan@hartkopp.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Urs Thuermann <urs.thuermann@volkswagen.de>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Patrick McHardy <kaber@trash.net>,
James Morris <jmorris@namei.org>,
Remi Denis-Courmont <remi.denis-courmont@nokia.com>,
"Pekka Savola (ipv6)" <pekkas@netcore.fi>,
Sridhar Samudrala <sri@us.ibm.com>,
Vlad Yasevich <vladislav.yasevich@hp.com>,
Tejun Heo <tj@kernel.org>, Eric Dumazet <eric.dumazet@gmail.com>,
Li Zefan <lizf@cn.fujitsu.com>, Joe Perches <joe@perches.com>,
Stephen Hemminger <shemminger@vyatta.com>,
Jamal Hadi Salim <hadi@mojatatu.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Alexey Dobriyan <adobriyan@gmail.com>,
Jiri Pirko <jpirko@redhat.com>,
Johannes Berg <johannes.berg@intel.com>,
Daniel Lezcano <daniel.lezcano@free.fr>,
Pavel Eme
Subject: Re: [PATCH 3/10] Fix leaking of kernel heap addresses in net/
Date: Thu, 11 Nov 2010 20:24:09 -0500 [thread overview]
Message-ID: <1289525049.5167.82.camel@dan> (raw)
In-Reply-To: <20101112012039.GB4683@canuck.infradead.org>
>
> If we really have to do this. At least don't duplicate all this code. Do
> the check in the printf argument:
>
> seq_printf(seq, "%4d: %08X:%04X %08X:%04X"
> ...
> capable(CAP_NET_ADMIN) ? sp : 0,
>
> I would even move the decision whether to expose kernel addresses or not
> to a function so we can change behavior in one place.
I wrote it this way because the format specifier must also be changed,
or the %p output will print "(null)", which cannot be parsed by
userspace programs expecting "(nil)" or 0. I could include another
check inside the format specifier, but that seemed pretty ugly. But
then again, it's ugly either way.
-Dan
next prev parent reply other threads:[~2010-11-12 1:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-12 1:07 [PATCH 3/10] Fix leaking of kernel heap addresses in net/ Dan Rosenberg
2010-11-12 1:20 ` Thomas Graf
2010-11-12 1:24 ` Dan Rosenberg [this message]
2010-11-12 1:44 ` Thomas Graf
2010-11-12 15:11 ` Ben Hutchings
2010-11-12 15:14 ` Dan Rosenberg
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=1289525049.5167.82.camel@dan \
--to=drosenberg@vsecurity.com \
--cc=adobriyan@gmail.com \
--cc=daniel.lezcano@free.fr \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=eric.dumazet@gmail.com \
--cc=hadi@mojatatu.com \
--cc=jmorris@namei.org \
--cc=joe@perches.com \
--cc=johannes.berg@intel.com \
--cc=jpirko@redhat.com \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=lizf@cn.fujitsu.com \
--cc=pekkas@netcore.fi \
--cc=remi.denis-courmont@nokia.com \
--cc=shemminger@vyatta.com \
--cc=socketcan@hartkopp.net \
--cc=sri@us.ibm.com \
--cc=tgraf@infradead.org \
--cc=tj@kernel.org \
--cc=urs.thuermann@volkswagen.de \
--cc=vladislav.yasevich@hp.com \
--cc=yoshfuji@linux-ipv6.org \
/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).