Re: [RFC PATCH 2/9] audit, io_uring, io-wq: add some basic audit support to io_uring

2021-08-25 Thread Paul Moore
On Tue, Aug 24, 2021 at 9:21 PM Richard Guy Briggs wrote: > > On 2021-06-02 13:46, Paul Moore wrote: > > On Wed, Jun 2, 2021 at 1:29 PM Richard Guy Briggs wrote: > > > On 2021-05-21 17:49, Paul Moore wrote: > > > > WARNING - This is a work in progress and should not be merged > > > > anywhere

Re: [RFC PATCH 2/9] audit, io_uring, io-wq: add some basic audit support to io_uring

2021-08-24 Thread Richard Guy Briggs
On 2021-06-02 13:46, Paul Moore wrote: > On Wed, Jun 2, 2021 at 1:29 PM Richard Guy Briggs wrote: > > On 2021-05-21 17:49, Paul Moore wrote: > > > WARNING - This is a work in progress and should not be merged > > > anywhere important. It is almost surely not complete, and while it > > > probably

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-06-03 Thread Paul Moore
On Thu, Jun 3, 2021 at 11:54 AM Jens Axboe wrote: > On 5/28/21 10:02 AM, Paul Moore wrote: > > On Wed, May 26, 2021 at 4:19 PM Paul Moore wrote: > >> ... If we moved the _entry > >> and _exit calls into the individual operation case blocks (quick > >> openat example below) so that only certain

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-06-03 Thread Jens Axboe
On 5/28/21 10:02 AM, Paul Moore wrote: > On Wed, May 26, 2021 at 4:19 PM Paul Moore wrote: >> ... If we moved the _entry >> and _exit calls into the individual operation case blocks (quick >> openat example below) so that only certain operations were able to be >> audited would that be acceptable

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-06-03 Thread Casey Schaufler
On 6/3/2021 3:51 AM, Pavel Begunkov wrote: > On 6/2/21 8:46 PM, Paul Moore wrote: >> On Wed, Jun 2, 2021 at 4:27 AM Pavel Begunkov wrote: >>> On 5/28/21 5:02 PM, Paul Moore wrote: On Wed, May 26, 2021 at 4:19 PM Paul Moore wrote: > ... If we moved the _entry > and _exit calls into

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-06-03 Thread Pavel Begunkov
On 6/2/21 4:46 PM, Richard Guy Briggs wrote: > On 2021-06-02 09:26, Pavel Begunkov wrote: >> On 5/28/21 5:02 PM, Paul Moore wrote: >>> On Wed, May 26, 2021 at 4:19 PM Paul Moore wrote: ... If we moved the _entry and _exit calls into the individual operation case blocks (quick

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-06-03 Thread Pavel Begunkov
On 6/2/21 8:46 PM, Paul Moore wrote: > On Wed, Jun 2, 2021 at 4:27 AM Pavel Begunkov wrote: >> On 5/28/21 5:02 PM, Paul Moore wrote: >>> On Wed, May 26, 2021 at 4:19 PM Paul Moore wrote: ... If we moved the _entry and _exit calls into the individual operation case blocks (quick

Re: [RFC PATCH 2/9] audit, io_uring, io-wq: add some basic audit support to io_uring

2021-06-02 Thread Paul Moore
On Wed, Jun 2, 2021 at 1:29 PM Richard Guy Briggs wrote: > On 2021-05-21 17:49, Paul Moore wrote: > > WARNING - This is a work in progress and should not be merged > > anywhere important. It is almost surely not complete, and while it > > probably compiles it likely hasn't been booted and will

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-06-02 Thread Paul Moore
On Wed, Jun 2, 2021 at 4:27 AM Pavel Begunkov wrote: > On 5/28/21 5:02 PM, Paul Moore wrote: > > On Wed, May 26, 2021 at 4:19 PM Paul Moore wrote: > >> ... If we moved the _entry > >> and _exit calls into the individual operation case blocks (quick > >> openat example below) so that only certain

Re: [RFC PATCH 2/9] audit, io_uring, io-wq: add some basic audit support to io_uring

2021-06-02 Thread Richard Guy Briggs
On 2021-05-21 17:49, Paul Moore wrote: > WARNING - This is a work in progress and should not be merged > anywhere important. It is almost surely not complete, and while it > probably compiles it likely hasn't been booted and will do terrible > things. You have been warned. > > This patch adds

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-06-02 Thread Richard Guy Briggs
On 2021-06-02 09:26, Pavel Begunkov wrote: > On 5/28/21 5:02 PM, Paul Moore wrote: > > On Wed, May 26, 2021 at 4:19 PM Paul Moore wrote: > >> ... If we moved the _entry > >> and _exit calls into the individual operation case blocks (quick > >> openat example below) so that only certain operations

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-06-02 Thread Pavel Begunkov
On 5/28/21 5:02 PM, Paul Moore wrote: > On Wed, May 26, 2021 at 4:19 PM Paul Moore wrote: >> ... If we moved the _entry >> and _exit calls into the individual operation case blocks (quick >> openat example below) so that only certain operations were able to be >> audited would that be acceptable

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-28 Thread Paul Moore
On Wed, May 26, 2021 at 4:19 PM Paul Moore wrote: > ... If we moved the _entry > and _exit calls into the individual operation case blocks (quick > openat example below) so that only certain operations were able to be > audited would that be acceptable assuming the high frequency ops were >

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-27 Thread Richard Guy Briggs
On 2021-05-26 11:22, Jens Axboe wrote: > On 5/26/21 9:49 AM, Richard Guy Briggs wrote: > >> So why is there anything special needed for io_uring (now that the > >> native worker threads are used)? > > > > Because syscall has been bypassed by a memory-mapped work queue. > > I don't follow this

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Paul Moore
On Wed, May 26, 2021 at 3:44 PM Jens Axboe wrote: > On 5/26/21 12:44 PM, Paul Moore wrote: > > On Wed, May 26, 2021 at 2:01 PM Jens Axboe wrote: > >> On 5/26/21 11:54 AM, Jens Axboe wrote: > >>> On 5/26/21 11:31 AM, Jens Axboe wrote: > On 5/26/21 11:15 AM, Jens Axboe wrote: > > On

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Jens Axboe
On 5/26/21 12:44 PM, Paul Moore wrote: > On Wed, May 26, 2021 at 2:01 PM Jens Axboe wrote: >> On 5/26/21 11:54 AM, Jens Axboe wrote: >>> On 5/26/21 11:31 AM, Jens Axboe wrote: On 5/26/21 11:15 AM, Jens Axboe wrote: > On 5/25/21 8:04 PM, Paul Moore wrote: >> On Tue, May 25, 2021 at

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Stefan Metzmacher
Am 26.05.21 um 16:38 schrieb Paul Moore: > On Wed, May 26, 2021 at 6:19 AM Pavel Begunkov wrote: >> On 5/26/21 3:04 AM, Paul Moore wrote: >>> On Tue, May 25, 2021 at 9:11 PM Jens Axboe wrote: On 5/24/21 1:59 PM, Paul Moore wrote: > That said, audit is not for everyone, and we have

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Paul Moore
On Wed, May 26, 2021 at 2:57 PM Pavel Begunkov wrote: > On 5/26/21 7:44 PM, Paul Moore wrote: > > On Wed, May 26, 2021 at 2:01 PM Jens Axboe wrote: > >> On 5/26/21 11:54 AM, Jens Axboe wrote: > >>> On 5/26/21 11:31 AM, Jens Axboe wrote: > On 5/26/21 11:15 AM, Jens Axboe wrote: > > On

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Paul Moore
On Wed, May 26, 2021 at 2:01 PM Jens Axboe wrote: > On 5/26/21 11:54 AM, Jens Axboe wrote: > > On 5/26/21 11:31 AM, Jens Axboe wrote: > >> On 5/26/21 11:15 AM, Jens Axboe wrote: > >>> On 5/25/21 8:04 PM, Paul Moore wrote: > On Tue, May 25, 2021 at 9:11 PM Jens Axboe wrote: > > On

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Paul Moore
On Wed, May 26, 2021 at 1:54 PM Jens Axboe wrote: > On 5/26/21 11:31 AM, Jens Axboe wrote: > > On 5/26/21 11:15 AM, Jens Axboe wrote: > >> On 5/25/21 8:04 PM, Paul Moore wrote: > >>> On Tue, May 25, 2021 at 9:11 PM Jens Axboe wrote: > On 5/24/21 1:59 PM, Paul Moore wrote: > > That said,

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Jens Axboe
On 5/26/21 11:54 AM, Jens Axboe wrote: > On 5/26/21 11:31 AM, Jens Axboe wrote: >> On 5/26/21 11:15 AM, Jens Axboe wrote: >>> On 5/25/21 8:04 PM, Paul Moore wrote: On Tue, May 25, 2021 at 9:11 PM Jens Axboe wrote: > On 5/24/21 1:59 PM, Paul Moore wrote: >> That said, audit is not for

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Jens Axboe
On 5/26/21 11:31 AM, Jens Axboe wrote: > On 5/26/21 11:15 AM, Jens Axboe wrote: >> On 5/25/21 8:04 PM, Paul Moore wrote: >>> On Tue, May 25, 2021 at 9:11 PM Jens Axboe wrote: On 5/24/21 1:59 PM, Paul Moore wrote: > That said, audit is not for everyone, and we have build time and >

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Jens Axboe
On 5/25/21 8:04 PM, Paul Moore wrote: > On Tue, May 25, 2021 at 9:11 PM Jens Axboe wrote: >> On 5/24/21 1:59 PM, Paul Moore wrote: >>> That said, audit is not for everyone, and we have build time and >>> runtime options to help make life easier. Beyond simply disabling >>> audit at compile time

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Jens Axboe
On 5/26/21 11:15 AM, Jens Axboe wrote: > On 5/25/21 8:04 PM, Paul Moore wrote: >> On Tue, May 25, 2021 at 9:11 PM Jens Axboe wrote: >>> On 5/24/21 1:59 PM, Paul Moore wrote: That said, audit is not for everyone, and we have build time and runtime options to help make life easier.

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Jens Axboe
On 5/26/21 9:49 AM, Richard Guy Briggs wrote: >> So why is there anything special needed for io_uring (now that the >> native worker threads are used)? > > Because syscall has been bypassed by a memory-mapped work queue. I don't follow this one at all, that's just the delivery mechanism if you

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Casey Schaufler
On 5/26/2021 8:49 AM, Victor Stewart wrote: >> I'm wondering why it's not enough to have the native auditing just to happen. >> >> E.g. all (I have checked RECVMSG,SENDMSG,SEND and CONNECT) socket related >> io_uring opcodes >> already go via security_socket_{recvmsg,sendmsg,connect}() >> >>

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Victor Stewart
> I'm wondering why it's not enough to have the native auditing just to happen. > > E.g. all (I have checked RECVMSG,SENDMSG,SEND and CONNECT) socket related > io_uring opcodes > already go via security_socket_{recvmsg,sendmsg,connect}() > > IORING_OP_OPENAT* goes via do_filp_open() which is in

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Richard Guy Briggs
On 2021-05-26 17:17, Stefan Metzmacher wrote: > > Am 26.05.21 um 16:38 schrieb Paul Moore: > > On Wed, May 26, 2021 at 6:19 AM Pavel Begunkov > > wrote: > >> On 5/26/21 3:04 AM, Paul Moore wrote: > >>> On Tue, May 25, 2021 at 9:11 PM Jens Axboe wrote: > On 5/24/21 1:59 PM, Paul Moore

Re: [RFC PATCH 2/9] audit, io_uring, io-wq: add some basic audit support to io_uring

2021-05-26 Thread Steve Grubb
On Wednesday, May 26, 2021 10:38:38 AM EDT Paul Moore wrote: > > > We would need to check with the current security requirements (there > > > are distro people on the linux-audit list that keep track of that > > > stuff), The requirements generally care about resource access. File open, connect,

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Paul Moore
On Wed, May 26, 2021 at 6:19 AM Pavel Begunkov wrote: > On 5/26/21 3:04 AM, Paul Moore wrote: > > On Tue, May 25, 2021 at 9:11 PM Jens Axboe wrote: > >> On 5/24/21 1:59 PM, Paul Moore wrote: > >>> That said, audit is not for everyone, and we have build time and > >>> runtime options to help make

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Pavel Begunkov
On 5/26/21 3:04 AM, Paul Moore wrote: > On Tue, May 25, 2021 at 9:11 PM Jens Axboe wrote: >> On 5/24/21 1:59 PM, Paul Moore wrote: >>> That said, audit is not for everyone, and we have build time and >>> runtime options to help make life easier. Beyond simply disabling >>> audit at compile time

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-26 Thread Jens Axboe
On 5/24/21 1:59 PM, Paul Moore wrote: > That said, audit is not for everyone, and we have build time and > runtime options to help make life easier. Beyond simply disabling > audit at compile time a number of Linux distributions effectively > shortcut audit at runtime by adding a "never" rule to

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-25 Thread Paul Moore
On Tue, May 25, 2021 at 9:11 PM Jens Axboe wrote: > On 5/24/21 1:59 PM, Paul Moore wrote: > > That said, audit is not for everyone, and we have build time and > > runtime options to help make life easier. Beyond simply disabling > > audit at compile time a number of Linux distributions

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-25 Thread Paul Moore
On Tue, May 25, 2021 at 4:27 AM Pavel Begunkov wrote: > On 5/24/21 8:59 PM, Paul Moore wrote: > > On Sun, May 23, 2021 at 4:26 PM Pavel Begunkov > > wrote: > >> On 5/22/21 3:36 AM, Paul Moore wrote: > >>> On Fri, May 21, 2021 at 8:22 PM Pavel Begunkov > >>> wrote: > On 5/21/21 10:49 PM,

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-25 Thread Pavel Begunkov
On 5/24/21 8:59 PM, Paul Moore wrote: > On Sun, May 23, 2021 at 4:26 PM Pavel Begunkov wrote: >> On 5/22/21 3:36 AM, Paul Moore wrote: >>> On Fri, May 21, 2021 at 8:22 PM Pavel Begunkov >>> wrote: On 5/21/21 10:49 PM, Paul Moore wrote: >> [...] > > + if (req->opcode <

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-24 Thread Paul Moore
On Sun, May 23, 2021 at 4:26 PM Pavel Begunkov wrote: > On 5/22/21 3:36 AM, Paul Moore wrote: > > On Fri, May 21, 2021 at 8:22 PM Pavel Begunkov > > wrote: > >> On 5/21/21 10:49 PM, Paul Moore wrote: > [...] > >>> > >>> + if (req->opcode < IORING_OP_LAST) > >> > >> always true at this point

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-22 Thread Pavel Begunkov
On 5/21/21 10:49 PM, Paul Moore wrote: > WARNING - This is a work in progress and should not be merged > anywhere important. It is almost surely not complete, and while it > probably compiles it likely hasn't been booted and will do terrible > things. You have been warned. > > This patch adds

Re: [RFC PATCH 2/9] audit,io_uring,io-wq: add some basic audit support to io_uring

2021-05-21 Thread Paul Moore
On Fri, May 21, 2021 at 8:22 PM Pavel Begunkov wrote: > On 5/21/21 10:49 PM, Paul Moore wrote: > > WARNING - This is a work in progress and should not be merged > > anywhere important. It is almost surely not complete, and while it > > probably compiles it likely hasn't been booted and will do

[RFC PATCH 2/9] audit, io_uring, io-wq: add some basic audit support to io_uring

2021-05-21 Thread Paul Moore
WARNING - This is a work in progress and should not be merged anywhere important. It is almost surely not complete, and while it probably compiles it likely hasn't been booted and will do terrible things. You have been warned. This patch adds basic auditing to io_uring operations, regardless of