[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/5] x86_64: add 64-bit syscall entry point
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 5/5] x86_64: add 64-bit syscall entry point |
Date: |
Tue, 28 Feb 2023 14:34:54 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Luca Dariz, le mar. 28 févr. 2023 14:25:59 +0100, a ecrit:
> Il 27/02/23 23:02, Samuel Thibault ha scritto:
> > > +#if defined(__x86_64__) && ! defined(USER32)
> > > +#define kernel_trap(trap_name,trap_number,number_args) \
> > > +ENTRY(trap_name) \
> > > + movq $ trap_number,%rax; \
> >
> > > + movq %rcx,%r10; \
> >
> > What is that for?
>
> The syscall instruction automatically stores RIP in RCX, but RCX is also the
> place for the 4th arg passed to a function, so we need another register to
> store it. In this case R10 is the only non-callee-preserved register
> remaining.
Ah, right, I noticed that later in the patch, and didn't think it was
explaining this instruction :)
Thanks,
Samuel
- Re: [PATCH 4/5] x86_64: fix user trap during syscall with an invalid user stack, (continued)
- [PATCH 3/5] fix port name copyin, Luca Dariz, 2023/02/27
- [PATCH 1/5] x86_64: allow compilation if ! USER32, Luca Dariz, 2023/02/27
- [PATCH 2/5] fix copyin/outmsg header for ! USER32, Luca Dariz, 2023/02/27
- [PATCH 5/5] x86_64: add 64-bit syscall entry point, Luca Dariz, 2023/02/27
- Re: [PATCH 5/5] x86_64: add 64-bit syscall entry point, Samuel Thibault, 2023/02/27
- Re: [PATCH 5/5] x86_64: add 64-bit syscall entry point, Luca Dariz, 2023/02/28
- Re: [PATCH 5/5] x86_64: add 64-bit syscall entry point,
Samuel Thibault <=
- Re: [PATCH 5/5] x86_64: add 64-bit syscall entry point, Sergey Bugaev, 2023/02/28
- Re: [PATCH 5/5] x86_64: add 64-bit syscall entry point, Samuel Thibault, 2023/02/28
- Re: [PATCH 5/5] x86_64: add 64-bit syscall entry point, Sergey Bugaev, 2023/02/28
- Re: [PATCH 5/5] x86_64: add 64-bit syscall entry point, Samuel Thibault, 2023/02/28
- Re: [PATCH 5/5] x86_64: add 64-bit syscall entry point, Sergey Bugaev, 2023/02/28
Re: [PATCH 5/5] x86_64: add 64-bit syscall entry point, Sergey Bugaev, 2023/02/28