Skip to contentSkip to conversation

Replacement of IPC char* context to sid for improved performance

PATCH Dustin Kirkland 1 participant 1 message Mar 31, 2006 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 6 lines · Steve Grubb
Quoted 4 lines · Dustin Kirkland

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.

Quoted 6 lines

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
[email protected]
https://www.redhat.com/mailman/listinfo/linux-audit