All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linda Knippers <linda.knippers@hp.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: Linux Audit <linux-audit@redhat.com>
Subject: Re: offsets for 64bit IPC mechanisms
Date: Wed, 10 Jan 2007 11:08:34 -0500	[thread overview]
Message-ID: <45A50F82.9020908@hp.com> (raw)
In-Reply-To: <200701101102.04270.sgrubb@redhat.com>

Steve Grubb wrote:
> Hello,
> 
> BZ 221663 was opened to report a problem with some test results. From the 
> bugzilla:
> 
> semctl(id, 0, IPC_RMID);
> Expected argument: a0 = SEMCTL, a1 = id, a2 = 0, a3 = 0 (IPC_RMID)
> Actual arguments seen in the audit log: a0 = SEMCTL, a1 = id, a2 = 0, a3 = 
> 0x100
> 
> msgctl(id, IPC_STAT, &buf)
> Expected argument: a0 = MSGCTL, a1 = id, a2 = 2 (IPC_STAT)
> Actual arguments seen in the audit log: a0 = MSGCTL, a1 = id, a2 = 0x102
> 
> The answer was:
> 
> /*
>  * Version flags for semctl, msgctl, and shmctl commands
>  * These are passed as bitflags or-ed with the actual command
>  */
> #define IPC_OLD 0       /* Old version (no 32-bit UID support on many
>                            architectures) */
> #define IPC_64  0x0100  /* New version (support 32-bit UIDs, bigger
>                            message sizes, etc. */
> 
> Looks like userspace will "or" the value with IPC_64 to indicate the version 
> it supports.
> 
> 
> So the question is, should ausearch report the actual recorded register value, 
> or should it "and" the register with IPC_64 ?

Since we're auditing syscalls, I think audit should report what the
syscall sees.

-- ljk

  reply	other threads:[~2007-01-10 16:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-10 16:02 offsets for 64bit IPC mechanisms Steve Grubb
2007-01-10 16:08 ` Linda Knippers [this message]
2007-01-10 16:13   ` Steve Grubb
2007-01-10 16:21     ` Linda Knippers

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=45A50F82.9020908@hp.com \
    --to=linda.knippers@hp.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 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.