Re: [RFC v3 08/19] arch: um: add shim to trap to allow installing a fault catcher for tests

2018-12-03 Thread Brendan Higgins
On Mon, Dec 3, 2018 at 3:46 PM Luis Chamberlain wrote: > > On Mon, Dec 03, 2018 at 03:34:57PM -0800, Brendan Higgins wrote: > > On Thu, Nov 29, 2018 at 7:34 PM Luis Chamberlain wrote: > > > > > > On Wed, Nov 28, 2018 at 11:36:25AM -0800, Brendan Higgins wrote: > > > > diff --git

Re: [RFC v3 08/19] arch: um: add shim to trap to allow installing a fault catcher for tests

2018-12-03 Thread Luis Chamberlain
On Mon, Dec 03, 2018 at 03:34:57PM -0800, Brendan Higgins wrote: > On Thu, Nov 29, 2018 at 7:34 PM Luis Chamberlain wrote: > > > > On Wed, Nov 28, 2018 at 11:36:25AM -0800, Brendan Higgins wrote: > > > diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c > > > index

Re: [RFC v3 08/19] arch: um: add shim to trap to allow installing a fault catcher for tests

2018-12-03 Thread Brendan Higgins
On Thu, Nov 29, 2018 at 7:41 PM Luis Chamberlain wrote: > > On Wed, Nov 28, 2018 at 11:36:25AM -0800, Brendan Higgins wrote: > > +static void segv_run_catcher(jmp_buf *catcher, void *fault_addr) > > +{ > > + current->thread.fault_addr = fault_addr; > > + UML_LONGJMP(catcher, 1); > > +} >

Re: [RFC v3 08/19] arch: um: add shim to trap to allow installing a fault catcher for tests

2018-12-03 Thread Brendan Higgins
On Thu, Nov 29, 2018 at 7:34 PM Luis Chamberlain wrote: > > On Wed, Nov 28, 2018 at 11:36:25AM -0800, Brendan Higgins wrote: > > diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c > > index cced829460427..bf90e678b3d71 100644 > > --- a/arch/um/kernel/trap.c > > +++ b/arch/um/kernel/trap.c

Re: [RFC v3 08/19] arch: um: add shim to trap to allow installing a fault catcher for tests

2018-11-29 Thread Luis Chamberlain
On Wed, Nov 28, 2018 at 11:36:25AM -0800, Brendan Higgins wrote: > +static void segv_run_catcher(jmp_buf *catcher, void *fault_addr) > +{ > + current->thread.fault_addr = fault_addr; > + UML_LONGJMP(catcher, 1); > +} Some documentation about what this does exactly would be appreciated.

Re: [RFC v3 08/19] arch: um: add shim to trap to allow installing a fault catcher for tests

2018-11-29 Thread Luis Chamberlain
On Wed, Nov 28, 2018 at 11:36:25AM -0800, Brendan Higgins wrote: > diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c > index cced829460427..bf90e678b3d71 100644 > --- a/arch/um/kernel/trap.c > +++ b/arch/um/kernel/trap.c > @@ -201,6 +201,12 @@ void segv_handler(int sig, struct siginfo

[RFC v3 08/19] arch: um: add shim to trap to allow installing a fault catcher for tests

2018-11-28 Thread Brendan Higgins
Add context to current thread that allows a test to specify that it wants to skip the normal checks to run an installed fault catcher. Signed-off-by: Brendan Higgins --- arch/um/include/asm/processor-generic.h | 4 +++- arch/um/kernel/trap.c | 15 +++ 2 files