All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Cc: Richard Du <duxiong@gmail.com>
Subject: Re: How to define audit rule for one bit *not* set for a syscall argument?
Date: Wed, 08 Mar 2023 17:22:03 -0500	[thread overview]
Message-ID: <12326100.O9o76ZdvQC@x2> (raw)
In-Reply-To: <CAH2vwOt3yCNhcLc+7QWvRAvSoNmtCJDpC4m41_sno7u_Rmf88A@mail.gmail.com>

Hello,

On Wednesday, March 8, 2023 8:46:57 AM EST Richard Du wrote:
> I'm trying to define an audit rule with auditctl for clone() syscall, and I
> would expect that the a0 of clone() syscall (i.e. the clone_flags
> argument) without the CLONE_THREAD flag bit being set.
> 
> int clone(int (*fn)(void *), void *stack, int flags, void *arg, ...
>                  /* pid_t *parent_tid, void *tls, pid_t *child_tid */ );
> 
> From man page of auditctl, -F option build a rule file: name, operation,
> value.
> -F [n=v | n!=v | n<v | n>v | n<=v | n>=v | n&v | n&=v]
> 
> I can understand that, the n&v (Audit_bitmask) means any bit of a bitmast
> is set, and the n&=v (Audit_bittest) means all bits of a bitmask are set.
> 
> While my question is, how to build a rule which means "none of bit of a
> bitmask is set", i.e. ( ! n&=v ). If the current audit comparator dosen't
> support this, can we add the support in furture?

The comparator does not support this. This is a corner case in which this is 
the first time someone ever needed it.

-Steve


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


  reply	other threads:[~2023-03-08 22:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08 13:46 How to define audit rule for one bit *not* set for a syscall argument? Richard Du
2023-03-08 22:22 ` Steve Grubb [this message]
2023-03-09  2:07   ` Richard Du

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=12326100.O9o76ZdvQC@x2 \
    --to=sgrubb@redhat.com \
    --cc=duxiong@gmail.com \
    --cc=linux-audit@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.