Re: [PATCH 08/18] arm64: convert raw syscall invocation to C

2018-05-15 Thread Mark Rutland
On Tue, May 15, 2018 at 12:01:58PM +0200, Dominik Brodowski wrote: > On Tue, May 15, 2018 at 09:22:23AM +0100, Mark Rutland wrote: > > On Mon, May 14, 2018 at 10:24:45PM +0200, Dominik Brodowski wrote: > > > On Mon, May 14, 2018 at 12:41:10PM +0100, Mark Rutland wrote: > > > > I agree it would be n

Re: [PATCH 08/18] arm64: convert raw syscall invocation to C

2018-05-15 Thread Dominik Brodowski
On Tue, May 15, 2018 at 09:22:23AM +0100, Mark Rutland wrote: > On Mon, May 14, 2018 at 10:24:45PM +0200, Dominik Brodowski wrote: > > On Mon, May 14, 2018 at 12:41:10PM +0100, Mark Rutland wrote: > > > I agree it would be nicer if it had a wrapper that took a pt_regs, even > > > if it does nothing

Re: [PATCH 08/18] arm64: convert raw syscall invocation to C

2018-05-15 Thread Mark Rutland
On Mon, May 14, 2018 at 10:24:45PM +0200, Dominik Brodowski wrote: > On Mon, May 14, 2018 at 12:41:10PM +0100, Mark Rutland wrote: > > I agree it would be nicer if it had a wrapper that took a pt_regs, even > > if it does nothing with it. > > > > We can't use SYSCALL_DEFINE0() due to the fault inj

Re: [PATCH 08/18] arm64: convert raw syscall invocation to C

2018-05-15 Thread Mark Rutland
On Mon, May 14, 2018 at 08:00:29PM +0200, Dominik Brodowski wrote: > > +static void __invoke_syscall(struct pt_regs *regs, syscall_fn_t syscall_fn) > > +{ > > + regs->regs[0] = syscall_fn(regs->regs[0], regs->regs[1], > > + regs->regs[2], regs->regs[3], > > +

Re: [PATCH 08/18] arm64: convert raw syscall invocation to C

2018-05-14 Thread Dominik Brodowski
On Mon, May 14, 2018 at 12:41:10PM +0100, Mark Rutland wrote: > I agree it would be nicer if it had a wrapper that took a pt_regs, even > if it does nothing with it. > > We can't use SYSCALL_DEFINE0() due to the fault injection muck, we'd > need a ksys_ni_syscall() for our traps.c logic, and addin

Re: [PATCH 08/18] arm64: convert raw syscall invocation to C

2018-05-14 Thread Dominik Brodowski
> +static void __invoke_syscall(struct pt_regs *regs, syscall_fn_t syscall_fn) > +{ > + regs->regs[0] = syscall_fn(regs->regs[0], regs->regs[1], > +regs->regs[2], regs->regs[3], > +regs->regs[4], regs->regs[5]); > +} Any specific

Re: [PATCH 08/18] arm64: convert raw syscall invocation to C

2018-05-14 Thread Dave Martin
On Mon, May 14, 2018 at 12:41:10PM +0100, Mark Rutland wrote: > On Mon, May 14, 2018 at 12:07:18PM +0100, Dave Martin wrote: > > On Mon, May 14, 2018 at 10:46:30AM +0100, Mark Rutland wrote: > > > As a first step towards invoking syscalls with a pt_regs argument, > > > convert the raw syscall invoc

Re: [PATCH 08/18] arm64: convert raw syscall invocation to C

2018-05-14 Thread Mark Rutland
On Mon, May 14, 2018 at 12:07:18PM +0100, Dave Martin wrote: > On Mon, May 14, 2018 at 10:46:30AM +0100, Mark Rutland wrote: > > As a first step towards invoking syscalls with a pt_regs argument, > > convert the raw syscall invocation logic to C. We end up with a bit more > > register shuffling, bu

Re: [PATCH 08/18] arm64: convert raw syscall invocation to C

2018-05-14 Thread Dave Martin
On Mon, May 14, 2018 at 10:46:30AM +0100, Mark Rutland wrote: > As a first step towards invoking syscalls with a pt_regs argument, > convert the raw syscall invocation logic to C. We end up with a bit more > register shuffling, but the unified invocation logic means we can unify > the tracing paths