Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-25 Thread Kees Cook
On Fri, Sep 25, 2020 at 12:15:54PM -0400, Gabriel Krisman Bertazi wrote: > Thomas Gleixner writes: > > > On Wed, Sep 23 2020 at 13:49, Kees Cook wrote: > >> On Wed, Sep 23, 2020 at 04:18:26PM -0400, Gabriel Krisman Bertazi wrote: > >>> Kees Cook writes: > >>> Yes, we can, and I'm happy to

Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-25 Thread Gabriel Krisman Bertazi
Thomas Gleixner writes: > On Wed, Sep 23 2020 at 13:49, Kees Cook wrote: >> On Wed, Sep 23, 2020 at 04:18:26PM -0400, Gabriel Krisman Bertazi wrote: >>> Kees Cook writes: >>> Yes, we can, and I'm happy to follow up with that as part of my TIF >>> clean up work, but can we not block the current

Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-25 Thread Thomas Gleixner
On Wed, Sep 23 2020 at 13:49, Kees Cook wrote: > On Wed, Sep 23, 2020 at 04:18:26PM -0400, Gabriel Krisman Bertazi wrote: >> Kees Cook writes: >> Yes, we can, and I'm happy to follow up with that as part of my TIF >> clean up work, but can we not block the current patchset to be merged >> waiting

Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-24 Thread Peter Zijlstra
On Fri, Sep 11, 2020 at 04:08:45PM -0400, Gabriel Krisman Bertazi wrote: > pet...@infradead.org writes: > > > On Fri, Sep 04, 2020 at 04:31:39PM -0400, Gabriel Krisman Bertazi wrote: > >> +static inline void __set_tsk_syscall_intercept(struct task_struct *tsk, > >> +

Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-23 Thread Kees Cook
On Wed, Sep 23, 2020 at 04:18:26PM -0400, Gabriel Krisman Bertazi wrote: > Kees Cook writes: > > > On Fri, Sep 04, 2020 at 04:31:39PM -0400, Gabriel Krisman Bertazi wrote: > >> Convert TIF_SECCOMP into a generic TI flag for any syscall interception > >> work being done by the kernel. The actual

Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-23 Thread Gabriel Krisman Bertazi
Kees Cook writes: > On Tue, Sep 08, 2020 at 12:59:49AM -0400, Gabriel Krisman Bertazi wrote: >> Christian Brauner writes: >> >> > On Fri, Sep 04, 2020 at 04:31:39PM -0400, Gabriel Krisman Bertazi wrote: >> >> index afe01e232935..3511c98a7849 100644 >> >> --- a/include/linux/sched.h >> >> +++

Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-23 Thread Gabriel Krisman Bertazi
Kees Cook writes: > On Fri, Sep 04, 2020 at 04:31:39PM -0400, Gabriel Krisman Bertazi wrote: >> Convert TIF_SECCOMP into a generic TI flag for any syscall interception >> work being done by the kernel. The actual type of work is exposed by a >> new flag field outside of thread_info. This

Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-22 Thread Kees Cook
On Fri, Sep 04, 2020 at 04:31:39PM -0400, Gabriel Krisman Bertazi wrote: > Convert TIF_SECCOMP into a generic TI flag for any syscall interception > work being done by the kernel. The actual type of work is exposed by a > new flag field outside of thread_info. This ensures that the >

Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-22 Thread Kees Cook
On Tue, Sep 08, 2020 at 12:59:49AM -0400, Gabriel Krisman Bertazi wrote: > Christian Brauner writes: > > > On Fri, Sep 04, 2020 at 04:31:39PM -0400, Gabriel Krisman Bertazi wrote: > >> index afe01e232935..3511c98a7849 100644 > >> --- a/include/linux/sched.h > >> +++ b/include/linux/sched.h > >>

Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-11 Thread Gabriel Krisman Bertazi
pet...@infradead.org writes: > On Fri, Sep 04, 2020 at 04:31:39PM -0400, Gabriel Krisman Bertazi wrote: >> +static inline void __set_tsk_syscall_intercept(struct task_struct *tsk, >> + unsigned int type) >> +{ >> +tsk->syscall_intercept |= type; >> + >> +

Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-11 Thread peterz
On Fri, Sep 04, 2020 at 04:31:39PM -0400, Gabriel Krisman Bertazi wrote: > +static inline void __set_tsk_syscall_intercept(struct task_struct *tsk, > +unsigned int type) > +{ > + tsk->syscall_intercept |= type; > + > + if (tsk->syscall_intercept) > +

Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-07 Thread Gabriel Krisman Bertazi
Christian Brauner writes: > On Fri, Sep 04, 2020 at 04:31:39PM -0400, Gabriel Krisman Bertazi wrote: >> index afe01e232935..3511c98a7849 100644 >> --- a/include/linux/sched.h >> +++ b/include/linux/sched.h >> @@ -959,7 +959,11 @@ struct task_struct { >> kuid_t

Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-07 Thread Christian Brauner
On Fri, Sep 04, 2020 at 04:31:39PM -0400, Gabriel Krisman Bertazi wrote: > Convert TIF_SECCOMP into a generic TI flag for any syscall interception > work being done by the kernel. The actual type of work is exposed by a > new flag field outside of thread_info. This ensures that the >

[PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-04 Thread Gabriel Krisman Bertazi
Convert TIF_SECCOMP into a generic TI flag for any syscall interception work being done by the kernel. The actual type of work is exposed by a new flag field outside of thread_info. This ensures that the syscall_intercept field is only accessed if struct seccomp has to be accessed already, such