From: David Miller <davem@davemloft.net>
To: lorenzo@google.com
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com,
dsa@cumulusnetworks.com, ek@google.com
Subject: Re: [PATCH net-next v3] net: inet: diag: expose the socket mark to privileged processes.
Date: Thu, 08 Sep 2016 17:57:03 -0700 (PDT) [thread overview]
Message-ID: <20160908.175703.1354122300312111500.davem@davemloft.net> (raw)
In-Reply-To: <CAKD1Yr3p+ZcVbawRW98LCVEW763UYCj4tfHYxadk+dSuxfEy1A@mail.gmail.com>
From: Lorenzo Colitti <lorenzo@google.com>
Date: Fri, 9 Sep 2016 09:48:27 +0900
> On Fri, Sep 9, 2016 at 8:13 AM, David Miller <davem@davemloft.net> wrote:
>>> This adds the capability for a process that has CAP_NET_ADMIN on
>>> a socket to see the socket mark in socket dumps.
>>
>> Applied, but the argument list of inet_sk_diag_fill is starting to get out
>> of control.
>
> I think a lot of the parameters it takes are just a couple of pointer
> lookups away from in_skb. I assumed it did not take in_skb directly
> for performance reasons: this way the calling functions can calculate
> many of these arguments just once per dump instead of once per socket.
> But thinking about it some more the cost of those pointer lookups is
> negligible compared to the cost of iterating over the hashtables,
> marshalling the attributes, etc.
>
> I'll see if I can send something out to pass in in_skb instead.
The other option is to have a "struct foo_info" object on the callers
stack that holds all of these values, then pass a pointer to the foo_info
to inet_sk_diag_fill.
next prev parent reply other threads:[~2016-09-09 0:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 15:42 [PATCH net-next v3] net: inet: diag: expose the socket mark to privileged processes Lorenzo Colitti
2016-09-08 23:13 ` David Miller
2016-09-09 0:48 ` Lorenzo Colitti
2016-09-09 0:57 ` David Miller [this message]
2016-09-09 5:23 ` Lorenzo Colitti
2016-09-14 4:00 ` Lorenzo Colitti
2016-09-14 4:19 ` David Ahern
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=20160908.175703.1354122300312111500.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dsa@cumulusnetworks.com \
--cc=ek@google.com \
--cc=eric.dumazet@gmail.com \
--cc=lorenzo@google.com \
--cc=netdev@vger.kernel.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).