netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rongqing Li <rongqing.li@windriver.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <selinux@tycho.nsa.gov>,
	<linux-security-module@vger.kernel.org>, <sds@tycho.nsa.gov>
Subject: Re: [PATCH 6/6] Export the tcp sock's security context to proc.
Date: Tue, 9 Aug 2011 16:54:46 +0800	[thread overview]
Message-ID: <4E40F5D6.5060704@windriver.com> (raw)
In-Reply-To: <20110809.003326.1002501904080430572.davem@davemloft.net>

On 08/09/2011 03:33 PM, David Miller wrote:
> From:<rongqing.li@windriver.com>
> Date: Tue, 9 Aug 2011 15:28:30 +0800
>
>>   	if (v == SEQ_START_TOKEN) {
>>   		seq_printf(seq, "%-*s\n", TMPSZ - 1,
>>   			   "  sl  local_address rem_address   st tx_queue "
>>   			   "rx_queue tr tm->when retrnsmt   uid  timeout "
>> -			   "inode");
>> +			   "inode seclabel");
>>   		goto out;
>>   	}
>
> Unfortunately you cannot change the layout of procfs file output in
> this way.  It has the potential to break programs which are parsing
> this file in userspace already.
>
> The layout hasn't changed in a very long time because it is essentially
> a uservisible ABI.
>
> If you want to export new information you'll have to do it using the
> facility that is extensible, and that's the netlink based socket dumping
> facility implemented in inet_diag.c, tcp_diag.c and friends.
>
> There, you can simply add a new netlink attribute that gets dumped with
> the entry, which will provide the security context.
>
>

Thanks, I see how I should do.
I will continue to develop it and hope get your help.
Thanks.


-- 
Best Reagrds,
Roy | RongQing Li

      reply	other threads:[~2011-08-09  8:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-09  7:28 [v2 PATCH 0/6] Export the sock's security context to proc rongqing.li
2011-08-09  7:28 ` [PATCH 1/6] Security: define security_sk_getsecid rongqing.li
2011-08-09 16:13   ` Casey Schaufler
2011-08-10  0:43     ` Rongqing Li
2011-08-10  0:57       ` Casey Schaufler
2011-08-10  1:24         ` Rongqing Li
2011-08-10  1:35           ` Casey Schaufler
2011-08-10  1:44             ` Rongqing Li
2011-08-10 12:49           ` Stephen Smalley
2011-08-09  7:28 ` [PATCH 2/6] Define the function to write sock's security context to seq_file rongqing.li
2011-08-09  7:28 ` [PATCH 3/6] Export the raw sock's security context to proc rongqing.li
2011-08-09  7:28 ` [PATCH 4/6] Export the udp " rongqing.li
2011-08-09  7:28 ` [PATCH 5/6] Export the unix " rongqing.li
2011-08-09  7:28 ` [PATCH 6/6] Export the tcp " rongqing.li
2011-08-09  7:33   ` David Miller
2011-08-09  8:54     ` Rongqing Li [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=4E40F5D6.5060704@windriver.com \
    --to=rongqing.li@windriver.com \
    --cc=davem@davemloft.net \
    --cc=linux-security-module@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    /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).