Re: [PATCH 1/1] seccomp: Always "goto wait" if the list is empty

2021-04-13 Thread Rodrigo Campos
On Tue, Apr 13, 2021 at 7:54 PM Christian Brauner wrote: > > Fixes: 7cf97b1254550 > > Cc: sta...@vger.kernel.org # 5.9+ > > Signed-off-by: Rodrigo Campos > > --- > > So the agent will see the return value from > wait_for_completion_interruptible() and know that the addfd wasn't > successful and

Re: [PATCH 1/1] seccomp: Always "goto wait" if the list is empty

2021-04-13 Thread Christian Brauner
On Tue, Apr 13, 2021 at 06:01:51PM +0200, Rodrigo Campos wrote: > It is possible for the thread with the seccomp filter attached (target) > to be waken up by an addfd message, but the list be empty. This happens > when the addfd ioctl on the other side (seccomp agent) is interrupted by > a signal

[PATCH 1/1] seccomp: Always "goto wait" if the list is empty

2021-04-13 Thread Rodrigo Campos
It is possible for the thread with the seccomp filter attached (target) to be waken up by an addfd message, but the list be empty. This happens when the addfd ioctl on the other side (seccomp agent) is interrupted by a signal such as SIGURG. In that case, the target erroneously and prematurely