All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul.moore@hp.com>
To: James Morris <jmorris@namei.org>
Cc: netdev@vger.kernel.org, linux-audit@redhat.com,
	"David S. Miller" <davem@davemloft.net>,
	selinux@tycho.nsa.gov
Subject: Re: [PATCH 1/1] NetLabel: add audit support for configuration changes
Date: Thu, 28 Sep 2006 16:04:58 -0400	[thread overview]
Message-ID: <451C2AEA.7050608@hp.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0609281547060.28120@d.namei>

James Morris wrote:
>>+struct audit_buffer *netlbl_audit_start_common(int type, u32 secid)
> 
> 
>>+	if (current->mm) {
>>+		down_read(&current->mm->mmap_sem);
>>+		vma = current->mm->mmap;
>>+		while (vma) {
>>+			if ((vma->vm_flags & VM_EXECUTABLE) &&
>>+			    vma->vm_file) {
>>+				audit_log_d_path(audit_buf,
>>+						 " exe=",
>>+						 vma->vm_file->f_dentry,
>>+						 vma->vm_file->f_vfsmnt);
>>+				break;
>>+			}
>>+			vma = vma->vm_next;
>>+		}
>>+		up_read(&current->mm->mmap_sem);
> 
> 
> 
> Suggestion for the future: I think it'd be wortwhile consolidating this 
> with the code in audit_log_task_info().

Agreed, in fact, as I suspect you have already noticed, this was ripped
right from that function.  It was private to kernel/auditsc.c making it
offlimits, but I would have gladly used it instead; making
audit_log_task_info() public seemed like something that was beyond this
NetLabel specific patch.

> In any case, the patch looks fine to me.
> 
> Acked-by: James Morris <jmorris@namei.org>

Thanks.

-- 
paul moore
linux security @ hp

WARNING: multiple messages have this Message-ID (diff)
From: Paul Moore <paul.moore@hp.com>
To: James Morris <jmorris@namei.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-audit@redhat.com,
	Eric Paris <eparis@redhat.com>,
	selinux@tycho.nsa.gov
Subject: Re: [PATCH 1/1] NetLabel: add audit support for configuration changes
Date: Thu, 28 Sep 2006 16:04:58 -0400	[thread overview]
Message-ID: <451C2AEA.7050608@hp.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0609281547060.28120@d.namei>

James Morris wrote:
>>+struct audit_buffer *netlbl_audit_start_common(int type, u32 secid)
> 
> 
>>+	if (current->mm) {
>>+		down_read(&current->mm->mmap_sem);
>>+		vma = current->mm->mmap;
>>+		while (vma) {
>>+			if ((vma->vm_flags & VM_EXECUTABLE) &&
>>+			    vma->vm_file) {
>>+				audit_log_d_path(audit_buf,
>>+						 " exe=",
>>+						 vma->vm_file->f_dentry,
>>+						 vma->vm_file->f_vfsmnt);
>>+				break;
>>+			}
>>+			vma = vma->vm_next;
>>+		}
>>+		up_read(&current->mm->mmap_sem);
> 
> 
> 
> Suggestion for the future: I think it'd be wortwhile consolidating this 
> with the code in audit_log_task_info().

Agreed, in fact, as I suspect you have already noticed, this was ripped
right from that function.  It was private to kernel/auditsc.c making it
offlimits, but I would have gladly used it instead; making
audit_log_task_info() public seemed like something that was beyond this
NetLabel specific patch.

> In any case, the patch looks fine to me.
> 
> Acked-by: James Morris <jmorris@namei.org>

Thanks.

-- 
paul moore
linux security @ hp

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2006-09-28 20:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060928180326.896170000@hp.com>
2006-09-28 18:03 ` [PATCH 1/1] NetLabel: add audit support for configuration changes paul.moore
2006-09-28 18:03   ` paul.moore
2006-09-28 19:50   ` James Morris
2006-09-28 19:50     ` James Morris
2006-09-28 20:04     ` Paul Moore [this message]
2006-09-28 20:04       ` Paul Moore
2006-09-28 20:10       ` James Morris
2006-09-28 20:10         ` James Morris
2006-09-28 21:25         ` Paul Moore
2006-09-28 21:25           ` Paul Moore
2006-09-28 21:51     ` David Miller
2006-09-29 14:08   ` Steve Grubb
2006-09-29 14:08     ` Steve Grubb
2006-09-29 14:13     ` James Morris
2006-09-29 14:13       ` James Morris
2006-09-29 15:43       ` Paul Moore
2006-09-29 15:43         ` Paul Moore
2006-09-29 18:09     ` Paul Moore
2006-09-29 18:09       ` Paul Moore
2006-09-29 18:35       ` Steve Grubb
2006-09-29 18:35         ` Steve Grubb
2006-09-29 20:28         ` Paul Moore
2006-09-29 20:28           ` Paul Moore
2006-09-29 21:33           ` David Miller

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=451C2AEA.7050608@hp.com \
    --to=paul.moore@hp.com \
    --cc=davem@davemloft.net \
    --cc=jmorris@namei.org \
    --cc=linux-audit@redhat.com \
    --cc=netdev@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.