Re: [patch V3 01/13] entry: Provide generic syscall entry functionality

2020-07-27 Thread Andy Lutomirski
On Thu, Jul 16, 2020 at 12:50 PM Thomas Gleixner wrote: > > From: Thomas Gleixner > > On syscall entry certain work needs to be done: > >- Establish state (lockdep, context tracking, tracing) >- Conditional work (ptrace, seccomp, audit...) > > This code is needlessly duplicated and

Re: [patch V3 01/13] entry: Provide generic syscall entry functionality

2020-07-20 Thread Thomas Gleixner
Andy Lutomirski writes: >> On Jul 19, 2020, at 3:17 AM, Thomas Gleixner wrote: >> >> Andy Lutomirski writes: On Sat, Jul 18, 2020 at 7:16 AM Thomas Gleixner wrote: Andy Lutomirski writes: > FWIW, TIF_USER_RETURN_NOTIFY is a bit of an odd duck: it's an > entry/exit word

Re: [patch V3 01/13] entry: Provide generic syscall entry functionality

2020-07-19 Thread Andy Lutomirski
> On Jul 19, 2020, at 3:17 AM, Thomas Gleixner wrote: > > Andy Lutomirski writes: >>> On Sat, Jul 18, 2020 at 7:16 AM Thomas Gleixner wrote: >>> Andy Lutomirski writes: FWIW, TIF_USER_RETURN_NOTIFY is a bit of an odd duck: it's an entry/exit word *and* a context switch word.

Re: [patch V3 01/13] entry: Provide generic syscall entry functionality

2020-07-19 Thread Thomas Gleixner
Andy Lutomirski writes: > On Sat, Jul 18, 2020 at 7:16 AM Thomas Gleixner wrote: >> Andy Lutomirski writes: >> > FWIW, TIF_USER_RETURN_NOTIFY is a bit of an odd duck: it's an >> > entry/exit word *and* a context switch word. The latter is because >> > it's logically a per-cpu flag, not a

Re: [patch V3 01/13] entry: Provide generic syscall entry functionality

2020-07-18 Thread Andy Lutomirski
On Sat, Jul 18, 2020 at 7:16 AM Thomas Gleixner wrote: > > Andy Lutomirski writes: > > On Fri, Jul 17, 2020 at 12:29 PM Thomas Gleixner wrote: > >> The alternative is to play nasty games with TIF_IA32, TIF_ADDR32 and > >> TIF_X32 to free up bits for 32bit and make the flags field 64 bit on 64 >

Re: [patch V3 01/13] entry: Provide generic syscall entry functionality

2020-07-18 Thread Thomas Gleixner
Andy Lutomirski writes: > On Fri, Jul 17, 2020 at 12:29 PM Thomas Gleixner wrote: >> The alternative is to play nasty games with TIF_IA32, TIF_ADDR32 and >> TIF_X32 to free up bits for 32bit and make the flags field 64 bit on 64 >> bit kernels, but I prefer to do the above seperation. > > I'm

Re: [patch V3 01/13] entry: Provide generic syscall entry functionality

2020-07-17 Thread Andy Lutomirski
On Fri, Jul 17, 2020 at 12:29 PM Thomas Gleixner wrote: > > Kees Cook writes: > > On Thu, Jul 16, 2020 at 11:55:59PM +0200, Thomas Gleixner wrote: > >> Kees Cook writes: > >> >> +/* > >> >> + * Define dummy _TIF work flags if not defined by the architecture or > >> >> for > >> >> + * disabled

Re: [patch V3 01/13] entry: Provide generic syscall entry functionality

2020-07-17 Thread Thomas Gleixner
Kees Cook writes: > On Thu, Jul 16, 2020 at 11:55:59PM +0200, Thomas Gleixner wrote: >> Kees Cook writes: >> >> +/* >> >> + * Define dummy _TIF work flags if not defined by the architecture or for >> >> + * disabled functionality. >> >> + */ >> > >> > When I was thinking about this last week I

Re: [patch V3 01/13] entry: Provide generic syscall entry functionality

2020-07-17 Thread Kees Cook
On Thu, Jul 16, 2020 at 11:55:59PM +0200, Thomas Gleixner wrote: > Kees Cook writes: > > On Thu, Jul 16, 2020 at 08:22:09PM +0200, Thomas Gleixner wrote: > >> This code is needlessly duplicated and different in all > >> architectures. > >> > >> Provide a generic version based on the x86

Re: [patch V3 01/13] entry: Provide generic syscall entry functionality

2020-07-16 Thread Thomas Gleixner
Kees Cook writes: > On Thu, Jul 16, 2020 at 08:22:09PM +0200, Thomas Gleixner wrote: >> This code is needlessly duplicated and different in all >> architectures. >> >> Provide a generic version based on the x86 implementation which has all the >> RCU and instrumentation bits right. > > Ahh!

Re: [patch V3 01/13] entry: Provide generic syscall entry functionality

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 08:22:09PM +0200, Thomas Gleixner wrote: > From: Thomas Gleixner > > On syscall entry certain work needs to be done: > >- Establish state (lockdep, context tracking, tracing) >- Conditional work (ptrace, seccomp, audit...) > > This code is needlessly duplicated

[patch V3 01/13] entry: Provide generic syscall entry functionality

2020-07-16 Thread Thomas Gleixner
From: Thomas Gleixner On syscall entry certain work needs to be done: - Establish state (lockdep, context tracking, tracing) - Conditional work (ptrace, seccomp, audit...) This code is needlessly duplicated and different in all architectures. Provide a generic version based on the x86