Re: [RFC][PATCH 01/24] x86/syscall: Add wrapper for invoking syscall function

From: Andy Lutomirski
Date: Mon Nov 09 2020 - 12:25:30 EST


Hi Alexander-

You appear to be infected by corporate malware that has inserted the
string "@aserv0122.oracle.com" to the end of all the email addresses
in your to: list. "luto@xxxxxxxxxx"@aserv0122.oracle.com, for
example, is not me. Can you fix this?


On Mon, Nov 9, 2020 at 3:21 AM Alexandre Chartre
<alexandre.chartre@xxxxxxxxxx> wrote:
>
> Add a wrapper function for invoking a syscall function.

This needs some explanation of why.

>
> Signed-off-by: Alexandre Chartre <alexandre.chartre@xxxxxxxxxx>
> ---
> arch/x86/entry/common.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
> index 870efeec8bda..d222212908ad 100644
> --- a/arch/x86/entry/common.c
> +++ b/arch/x86/entry/common.c
> @@ -35,6 +35,15 @@
> #include <asm/syscall.h>
> #include <asm/irq_stack.h>
>
> +static __always_inline void run_syscall(sys_call_ptr_t sysfunc,
> + struct pt_regs *regs)
> +{
> + if (!sysfunc)
> + return;

What's this for?

> +
> + regs->ax = sysfunc(regs);
> +}
> +