public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Dustin Kirkland <dustin.kirkland@us.ibm.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: Linux Audit Discussion <linux-audit@redhat.com>
Subject: Re: [PATCH] Replacement of IPC char* context to sid for improved performance
Date: Fri, 31 Mar 2006 09:16:52 -0600	[thread overview]
Message-ID: <1143818212.18236.6.camel@localhost.localdomain> (raw)
In-Reply-To: <200603310828.13900.sgrubb@redhat.com>

On Fri, 2006-03-31 at 08:28 -0500, Steve Grubb wrote:
> On Friday 31 March 2006 01:11, Dustin Kirkland wrote:
> > Steve, if you could (a) take a close look at this patch and ensure that
> > I'm closely following your model, and (b) build this patch and run
> > similar performance benchmarks, that would be great.  I'm traveling
> > tomorrow and will be out of pocket for the next few days.
> 
> I needed a patch to do this yesterday and created a patch I was going to send 
> out this morning. It is nearly identical to your patch, but I think you 
> eliminated a function that I missed. I'll reconcile the differences and post 
> a patch in a few minutes.
> 
> The only other item left is to find a test case to performance test with.


Here's a very basic one that I've used.  It only hits one ipc call, but
it does trigger the audit hooks in msgsnd

# gcc -o test_msgget test_msgget.c
# auditctl -a exit,always -S ipc
# tail /var/log/audit/audit.log



#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <sys/errno.h>
#include <sys/stat.h>
#include <stdio.h>

int main() {

	int rc = 0;
	int msgid = 0;
	int mode;

	mode = S_IRWXU;
	if( ( msgid = msgget( IPC_PRIVATE, mode ) ) == -1 ) {
		printf("ERROR: Unable to allocate new message queue: errno=%i\n", errno );
		goto EXIT;
	}

	if( ( rc = msgctl( msgid, IPC_RMID, 0 ) ) == -1 ) {
		printf( "Error removing message queue with ID = [%d]: errno = [%i]\n", msgid, errno );
		goto EXIT;
	}

EXIT:
	return rc;
}






--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit

           reply	other threads:[~2006-03-31 15:16 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200603310828.13900.sgrubb@redhat.com>]

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=1143818212.18236.6.camel@localhost.localdomain \
    --to=dustin.kirkland@us.ibm.com \
    --cc=linux-audit@redhat.com \
    --cc=sgrubb@redhat.com \
    /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