All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: Tyler Hicks <tyhicks@canonical.com>,
	linux-audit@redhat.com, Eric Paris <eparis@redhat.com>,
	Kees Cook <keescook@chromium.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Will Drewry <wad@chromium.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] seccomp: Audit SECCOMP_RET_ERRNO actions with errno values
Date: Mon, 2 Jan 2017 17:55:16 -0500	[thread overview]
Message-ID: <CAHC9VhTCa5H3emntVbPMhbyVtbDngyKcTjOTjQCPUE3g8_b0ng@mail.gmail.com> (raw)
In-Reply-To: <1540151.sullFKCz8n@x2>

On Mon, Jan 2, 2017 at 1:49 PM, Steve Grubb <sgrubb@redhat.com> wrote:
> On Monday, January 2, 2017 5:42:47 PM EST Tyler Hicks wrote:
>> On 2017-01-02 12:20:53, Steve Grubb wrote:
>> > On Monday, January 2, 2017 4:53:10 PM EST Tyler Hicks wrote:

...

>> Thanks for having a look at the field name I was using. Although I
>> prefer "errno" over "exit" in terms of clarity, I agree that it makes
>> sense to be consistent with the field names across record types. "exit"
>> works for me.

FWIW, we have a nice (searchable due to GitHub CSV magic) audit field
database at the link below.  I will admit that it may be a bit crusty
in places, but we are making a new effort to keep it updated, if you
notice anything wrong, send email and/or a PR.

* https://github.com/linux-audit/audit-documentation/blob/master/specs/fields/field-dictionary.csv

>> > http://people.redhat.com/sgrubb/files/auformat.tar.gz
>> >
>> > $ ausearch --start today --just-one -m syscall -sv no --raw | ./auformat
>> > "%EXIT\n"
>> >
>> > Also, I am working to normalize all the records. That mean every event
>> > record of the same type has the same fields, in the same order, with the
>> > same representation. I would think "exit" could be added to the current
>> > record after syscall so that its ordered similarly to a syscall record.
>>
>> This patch goes against your normalization efforts in more ways than
>> just the placement of the "exit" field. If the action is
>> SECCOMP_RET_KILL, a "sig" field is present but if the action is
>> SECCOMP_RET_ERRNO, the "sig" field will not be present but the "errno"
>> field will be present. This happens all within the AUDIT_SECCOMP record
>> type. How would you suggest normalizing AUDIT_SECCOMP records for
>> different seccomp return actions?
>
> Typically when the layout has to change, we just give it a new record type.

I'm going to be very loathe to accept any new record types that *only*
reorder fields; if you need to add a new field, simply add it to the
end of the record.  From my perspective new record types are really
only an option if we need to remove a field that is bogus/confusing or
some other similar case that is not easily solved.  New record types
are a last resort.

-- 
paul moore
www.paul-moore.com

  reply	other threads:[~2017-01-02 22:55 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-02 16:53 [PATCH 0/2] Begin auditing SECCOMP_RET_ERRNO return actions Tyler Hicks
2017-01-02 16:53 ` [PATCH 1/2] seccomp: Allow for auditing functionality specific to " Tyler Hicks
2017-01-02 16:53 ` [PATCH 2/2] seccomp: Audit SECCOMP_RET_ERRNO actions with errno values Tyler Hicks
2017-01-02 17:20   ` Steve Grubb
2017-01-02 17:20     ` Steve Grubb
2017-01-02 17:42     ` Tyler Hicks
2017-01-02 17:42       ` Tyler Hicks
2017-01-02 18:49       ` Steve Grubb
2017-01-02 18:49         ` Steve Grubb
2017-01-02 22:55         ` Paul Moore [this message]
2017-01-02 22:47 ` [PATCH 0/2] Begin auditing SECCOMP_RET_ERRNO return actions Paul Moore
2017-01-03  5:56   ` Andy Lutomirski
2017-01-03 19:31     ` Paul Moore
2017-01-03 13:31   ` Tyler Hicks
2017-01-03 13:31     ` Tyler Hicks
2017-01-03 19:42     ` Paul Moore
2017-01-03 19:42       ` Paul Moore
2017-01-03 20:44       ` Kees Cook
2017-01-03 20:44         ` Kees Cook
2017-01-03 20:53         ` Steve Grubb
2017-01-03 20:54         ` Paul Moore
2017-01-03 20:54           ` Paul Moore
2017-01-03 21:03           ` Kees Cook
2017-01-03 21:03             ` Kees Cook
2017-01-03 21:13             ` Paul Moore
2017-01-03 21:13               ` Paul Moore
2017-01-03 21:21               ` Kees Cook
2017-01-03 21:31                 ` Paul Moore
2017-01-03 21:44                   ` Kees Cook
2017-01-03 21:44                     ` Kees Cook
2017-01-04  1:58                     ` Tyler Hicks
2017-01-04  1:58                       ` Tyler Hicks
2017-01-04  4:43                       ` Richard Guy Briggs
2017-01-04  4:43                         ` Richard Guy Briggs
2017-01-04  6:31                         ` Kees Cook
2017-01-04  2:04       ` Tyler Hicks
2017-01-03  5:57 ` Andy Lutomirski
2017-01-03 13:53   ` Tyler Hicks

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=CAHC9VhTCa5H3emntVbPMhbyVtbDngyKcTjOTjQCPUE3g8_b0ng@mail.gmail.com \
    --to=paul@paul-moore.com \
    --cc=eparis@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=sgrubb@redhat.com \
    --cc=tyhicks@canonical.com \
    --cc=wad@chromium.org \
    /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.