linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: David Abdurachmanov <david.abdurachmanov@gmail.com>
To: Paul Moore <paul@paul-moore.com>
Cc: linux-riscv@lists.infradead.org,
	Palmer Dabbelt <palmer@sifive.com>,
	linux-kernel@vger.kernel.org, aou@eecs.berkeley.edu,
	linux-audit@redhat.com
Subject: Re: [PATCH 0/2] riscv: add audit support
Date: Wed, 7 Nov 2018 11:45:53 +0100	[thread overview]
Message-ID: <CAEn-LTqizbzTkbE3vvdxKsb-cHOWbRStOZaNfNo5sNuC5LhxMQ@mail.gmail.com> (raw)
Message-ID: <20181107104553.gSbvG3NiOjkvz20IyOQSEpbiRu2u30gArud1Zhx6am8@z> (raw)
In-Reply-To: <CAEn-LTqQgQkA1XyihEg0MpADLPQADf3Ej2noUp29UtbcEaf0RA@mail.gmail.com>

On Tue, Nov 6, 2018 at 10:25 PM David Abdurachmanov
<david.abdurachmanov@gmail.com> wrote:
>
> On Tue, Nov 6, 2018 at 9:06 PM Paul Moore <paul@paul-moore.com> wrote:
> >
> > On Mon, Oct 29, 2018 at 6:49 AM David Abdurachmanov
> > <david.abdurachmanov@gmail.com> wrote:
> > > This patchset adds system call audit support on riscv (riscv32 &
> > > riscv64).
> > >
> > > The pachset was prepared on top of v4.19 tag.
> > >
> > > audit-userspace changes were submitted. See:
> > > https://github.com/linux-audit/audit-userspace/pull/73
> > >
> > > Tested the following manually:
> > > - auditctl (checked several different example rules from internet)
> > > - aulast
> > > - aulastlog
> > > - ausearch
> > > - ausyscall
> > > - aureport
> > > - autrace (compared some syscalls to strace: order and return
> > >   value/input arguments seem to be correct)
> > > - /proc/self/loginuid (required by DNF [package manager])
> > >
> > > I looked into audit-testsuite and with some adjustments results are:
> > >
> > > Failed 4/14 test programs. 19/88 subtests failed.
> >
> > I realize that the test suite failures are likely not due to your
> > code, but rather shortcomings in the test suite itself, but I think it
> > is important to resolve these problems before we commit the kernel
> > changes.

I did some extra work this evening (well, after midnight) and I am passing
all bits I would expect to pass.

Test Summary Report
-------------------
syscall_socketcall/test (Wstat: 0 Tests: 3 Failed: 3)
  Failed tests:  1-3
Files=14, Tests=88, 107 wallclock secs ( 1.07 usr  0.38 sys + 58.77
cusr 19.32 csys = 79.54 CPU)
Result: FAIL
Failed 1/14 test programs. 3/88 subtests failed.

The only failing test now is syscall_socketcall, which is not supported on
riscv and others.

From man page:

On a some architectures-for example, x86-64 and ARM—there is no
       socketcall() system call; instead socket(2), accept(2), bind(2), and
       so on really are implemented as separate system calls.

Then I redone syscall_socketcall test to fit new 64-bit arches. It still
mostly checks the same thing, but uses different syscall. Instead of
socketcall(SYS_CONNECT, ..) we check for connect(..). This will not
generate SOCKETCALL record, thus instead check for SYSCALL
record where syscall=connect.

All is here: https://github.com/davidlt/audit-testsuite/commits/riscv64

With that:

Running as   user    root
        with context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
        on   system  Fedora

exec_execve/test ......... ok
exec_name/test ........... ok
file_create/test ......... ok
file_delete/test ......... ok
file_rename/test ......... ok
filter_exclude/test ...... ok
filter_sessionid/test .... ok
login_tty/test ........... ok
lost_reset/test .......... ok
netfilter_pkt/test ....... ok
syscalls_file/test ....... ok
syscall_module/test ...... ok
syscall_socketcall/test .. ok
user_msg/test ............ ok
All tests successful.
Files=14, Tests=88, 123 wallclock secs ( 1.26 usr  0.59 sys + 70.85
cusr 22.60 csys = 95.30 CPU)
Result: PASS

Same audit kernel patch and libaudit, nothing changed here.

Hopefully this allows to move forward as I would love to have
audit & seccomp in the next kernel version (and thus Fedora).

Thanks,
david

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2018-11-07 10:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-29 10:48 [PATCH 0/2] riscv: add audit support David Abdurachmanov
2018-10-29 10:48 ` David Abdurachmanov
2018-10-29 10:48 ` [PATCH 1/2] " David Abdurachmanov
2018-10-29 10:48   ` David Abdurachmanov
2018-11-13  1:52   ` Palmer Dabbelt
2018-11-13  1:52     ` Palmer Dabbelt
2018-11-13 23:34     ` Paul Moore
2018-11-13 23:34       ` Paul Moore
2018-11-14 23:40       ` Palmer Dabbelt
2018-11-14 23:40         ` Palmer Dabbelt
2018-10-29 10:48 ` [PATCH 2/2] riscv: audit: add audit hook in do_syscall_trace_enter/exit() David Abdurachmanov
2018-10-29 10:48   ` David Abdurachmanov
2018-10-29 22:57 ` [PATCH 0/2] riscv: add audit support Paul Moore
2018-10-29 22:57   ` Paul Moore
2018-11-06 20:06 ` Paul Moore
2018-11-06 20:06   ` Paul Moore
2018-11-06 21:25   ` David Abdurachmanov
2018-11-06 21:25     ` David Abdurachmanov
2018-11-07 10:45     ` David Abdurachmanov [this message]
2018-11-07 10:45       ` David Abdurachmanov

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=CAEn-LTqizbzTkbE3vvdxKsb-cHOWbRStOZaNfNo5sNuC5LhxMQ@mail.gmail.com \
    --to=david.abdurachmanov@gmail.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@sifive.com \
    --cc=paul@paul-moore.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;
as well as URLs for NNTP newsgroup(s).