* [PATCH 0/2] syscall.2: Minor register name fixes for arm/arm64
@ 2020-05-05 15:24 Dave Martin
2020-05-05 15:24 ` [PATCH 1/2] syscall.2: arm: Use real register names for arm/OABI Dave Martin
2020-05-05 15:24 ` [PATCH 2/2] syscall.2: arm64: Fix syscall number register size Dave Martin
0 siblings, 2 replies; 11+ messages in thread
From: Dave Martin @ 2020-05-05 15:24 UTC (permalink / raw)
To: Michael Kerrisk
Cc: Russell King, Catalin Marinas, Will Deacon, linux-man, linux-arm-kernel
There are a few inconsistencies in the way registers are named when
describing the arm and arm64 syscall interfaces.
While fairly harmless, it's probably worth fixing them.
Dave Martin (2):
syscall.2: arm: Use real register names for arm/OABI
syscall.2: arm64: Fix syscall number register size
man2/syscall.2 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/2] syscall.2: arm: Use real register names for arm/OABI
2020-05-05 15:24 [PATCH 0/2] syscall.2: Minor register name fixes for arm/arm64 Dave Martin
@ 2020-05-05 15:24 ` Dave Martin
2020-05-05 15:26 ` Russell King - ARM Linux admin
2020-05-06 10:05 ` Michael Kerrisk (man-pages)
2020-05-05 15:24 ` [PATCH 2/2] syscall.2: arm64: Fix syscall number register size Dave Martin
1 sibling, 2 replies; 11+ messages in thread
From: Dave Martin @ 2020-05-05 15:24 UTC (permalink / raw)
To: Michael Kerrisk
Cc: Russell King, Catalin Marinas, Will Deacon, linux-man, linux-arm-kernel
The arm OABI syscall interface is currently documented in terms of
register name aliases defined by the ARM Procedure Call Standard
(APCS). However, these don't make sense in the context of a binary
interface that doesn't comply (or need to comply) with APCS.
Use the real architectural register names instead.
The names a1-a4, v1... are just aliases for r0-r3, r4... anyway, so
the interface is just the same regardless of which set of names is
used.
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
---
man2/syscall.2 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man2/syscall.2 b/man2/syscall.2
index f2b277b..53ab40e 100644
--- a/man2/syscall.2
+++ b/man2/syscall.2
@@ -201,7 +201,7 @@ Arch/ABI Instruction System Ret Ret Error Notes
_
alpha callsys v0 v0 a4 a3 1, 6
arc trap0 r8 r0 - -
-arm/OABI swi NR - a1 - - 2
+arm/OABI swi NR - r0 - - 2
arm/EABI swi 0x0 r7 r0 r1 -
arm64 svc #0 x8 x0 x1 -
blackfin excpt 0x0 P0 R0 - -
@@ -332,7 +332,7 @@ Arch/ABI arg1 arg2 arg3 arg4 arg5 arg6 arg7 Notes
_
alpha a0 a1 a2 a3 a4 a5 -
arc r0 r1 r2 r3 r4 r5 -
-arm/OABI a1 a2 a3 a4 v1 v2 v3
+arm/OABI r0 r1 r2 r3 r4 r5 r6
arm/EABI r0 r1 r2 r3 r4 r5 r6
arm64 x0 x1 x2 x3 x4 x5 -
blackfin R0 R1 R2 R3 R4 R5 -
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/2] syscall.2: arm64: Fix syscall number register size
2020-05-05 15:24 [PATCH 0/2] syscall.2: Minor register name fixes for arm/arm64 Dave Martin
2020-05-05 15:24 ` [PATCH 1/2] syscall.2: arm: Use real register names for arm/OABI Dave Martin
@ 2020-05-05 15:24 ` Dave Martin
2020-05-05 15:54 ` Will Deacon
2020-05-06 10:16 ` Michael Kerrisk (man-pages)
1 sibling, 2 replies; 11+ messages in thread
From: Dave Martin @ 2020-05-05 15:24 UTC (permalink / raw)
To: Michael Kerrisk
Cc: Russell King, Catalin Marinas, Will Deacon, linux-man, linux-arm-kernel
arm64 is currently documented as receiving the syscall number in
x8.
While this is the correct register, the syscall number is a 32-bit
integer. Bits [63:32] are ignored by the kernel.
So it is more correct to say "w8".
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
---
man2/syscall.2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man2/syscall.2 b/man2/syscall.2
index 53ab40e..d724651 100644
--- a/man2/syscall.2
+++ b/man2/syscall.2
@@ -203,7 +203,7 @@ alpha callsys v0 v0 a4 a3 1, 6
arc trap0 r8 r0 - -
arm/OABI swi NR - r0 - - 2
arm/EABI swi 0x0 r7 r0 r1 -
-arm64 svc #0 x8 x0 x1 -
+arm64 svc #0 w8 x0 x1 -
blackfin excpt 0x0 P0 R0 - -
i386 int $0x80 eax eax edx -
ia64 break 0x100000 r15 r8 r9 r10 1, 6
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] syscall.2: arm: Use real register names for arm/OABI
2020-05-05 15:24 ` [PATCH 1/2] syscall.2: arm: Use real register names for arm/OABI Dave Martin
@ 2020-05-05 15:26 ` Russell King - ARM Linux admin
2020-05-05 15:53 ` Dave Martin
2020-05-06 10:05 ` Michael Kerrisk (man-pages)
1 sibling, 1 reply; 11+ messages in thread
From: Russell King - ARM Linux admin @ 2020-05-05 15:26 UTC (permalink / raw)
To: Dave Martin
Cc: Michael Kerrisk, Catalin Marinas, Will Deacon, linux-man,
linux-arm-kernel
On Tue, May 05, 2020 at 04:24:39PM +0100, Dave Martin wrote:
> The arm OABI syscall interface is currently documented in terms of
> register name aliases defined by the ARM Procedure Call Standard
> (APCS). However, these don't make sense in the context of a binary
> interface that doesn't comply (or need to comply) with APCS.
>
> Use the real architectural register names instead.
>
> The names a1-a4, v1... are just aliases for r0-r3, r4... anyway, so
> the interface is just the same regardless of which set of names is
> used.
>
> Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Thanks Dave,
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
> ---
> man2/syscall.2 | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/man2/syscall.2 b/man2/syscall.2
> index f2b277b..53ab40e 100644
> --- a/man2/syscall.2
> +++ b/man2/syscall.2
> @@ -201,7 +201,7 @@ Arch/ABI Instruction System Ret Ret Error Notes
> _
> alpha callsys v0 v0 a4 a3 1, 6
> arc trap0 r8 r0 - -
> -arm/OABI swi NR - a1 - - 2
> +arm/OABI swi NR - r0 - - 2
> arm/EABI swi 0x0 r7 r0 r1 -
> arm64 svc #0 x8 x0 x1 -
> blackfin excpt 0x0 P0 R0 - -
> @@ -332,7 +332,7 @@ Arch/ABI arg1 arg2 arg3 arg4 arg5 arg6 arg7 Notes
> _
> alpha a0 a1 a2 a3 a4 a5 -
> arc r0 r1 r2 r3 r4 r5 -
> -arm/OABI a1 a2 a3 a4 v1 v2 v3
> +arm/OABI r0 r1 r2 r3 r4 r5 r6
> arm/EABI r0 r1 r2 r3 r4 r5 r6
> arm64 x0 x1 x2 x3 x4 x5 -
> blackfin R0 R1 R2 R3 R4 R5 -
> --
> 2.1.4
>
>
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] syscall.2: arm: Use real register names for arm/OABI
2020-05-05 15:26 ` Russell King - ARM Linux admin
@ 2020-05-05 15:53 ` Dave Martin
0 siblings, 0 replies; 11+ messages in thread
From: Dave Martin @ 2020-05-05 15:53 UTC (permalink / raw)
To: Russell King - ARM Linux admin
Cc: Michael Kerrisk, Catalin Marinas, Will Deacon, linux-man,
linux-arm-kernel
On Tue, May 05, 2020 at 04:26:58PM +0100, Russell King - ARM Linux admin wrote:
> On Tue, May 05, 2020 at 04:24:39PM +0100, Dave Martin wrote:
> > The arm OABI syscall interface is currently documented in terms of
> > register name aliases defined by the ARM Procedure Call Standard
> > (APCS). However, these don't make sense in the context of a binary
> > interface that doesn't comply (or need to comply) with APCS.
> >
> > Use the real architectural register names instead.
> >
> > The names a1-a4, v1... are just aliases for r0-r3, r4... anyway, so
> > the interface is just the same regardless of which set of names is
> > used.
> >
> > Signed-off-by: Dave Martin <Dave.Martin@arm.com>
>
> Thanks Dave,
>
> Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Thanks!
---Dave
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] syscall.2: arm64: Fix syscall number register size
2020-05-05 15:24 ` [PATCH 2/2] syscall.2: arm64: Fix syscall number register size Dave Martin
@ 2020-05-05 15:54 ` Will Deacon
2020-05-05 16:06 ` Dave Martin
2020-05-06 10:16 ` Michael Kerrisk (man-pages)
1 sibling, 1 reply; 11+ messages in thread
From: Will Deacon @ 2020-05-05 15:54 UTC (permalink / raw)
To: Dave Martin
Cc: Michael Kerrisk, Russell King, Catalin Marinas, linux-man,
linux-arm-kernel
On Tue, May 05, 2020 at 04:24:40PM +0100, Dave Martin wrote:
> arm64 is currently documented as receiving the syscall number in
> x8.
>
> While this is the correct register, the syscall number is a 32-bit
> integer. Bits [63:32] are ignored by the kernel.
>
> So it is more correct to say "w8".
>
> Signed-off-by: Dave Martin <Dave.Martin@arm.com>
> ---
> man2/syscall.2 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man2/syscall.2 b/man2/syscall.2
> index 53ab40e..d724651 100644
> --- a/man2/syscall.2
> +++ b/man2/syscall.2
> @@ -203,7 +203,7 @@ alpha callsys v0 v0 a4 a3 1, 6
> arc trap0 r8 r0 - -
> arm/OABI swi NR - r0 - - 2
> arm/EABI swi 0x0 r7 r0 r1 -
> -arm64 svc #0 x8 x0 x1 -
> +arm64 svc #0 w8 x0 x1 -
Acked-by: Will Deacon <will@kernel.org>
Will
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] syscall.2: arm64: Fix syscall number register size
2020-05-05 15:54 ` Will Deacon
@ 2020-05-05 16:06 ` Dave Martin
0 siblings, 0 replies; 11+ messages in thread
From: Dave Martin @ 2020-05-05 16:06 UTC (permalink / raw)
To: Will Deacon
Cc: Michael Kerrisk, Russell King, Catalin Marinas, linux-man,
linux-arm-kernel
On Tue, May 05, 2020 at 04:54:57PM +0100, Will Deacon wrote:
> On Tue, May 05, 2020 at 04:24:40PM +0100, Dave Martin wrote:
> > arm64 is currently documented as receiving the syscall number in
> > x8.
> >
> > While this is the correct register, the syscall number is a 32-bit
> > integer. Bits [63:32] are ignored by the kernel.
> >
> > So it is more correct to say "w8".
> >
> > Signed-off-by: Dave Martin <Dave.Martin@arm.com>
> > ---
> > man2/syscall.2 | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/man2/syscall.2 b/man2/syscall.2
> > index 53ab40e..d724651 100644
> > --- a/man2/syscall.2
> > +++ b/man2/syscall.2
> > @@ -203,7 +203,7 @@ alpha callsys v0 v0 a4 a3 1, 6
> > arc trap0 r8 r0 - -
> > arm/OABI swi NR - r0 - - 2
> > arm/EABI swi 0x0 r7 r0 r1 -
> > -arm64 svc #0 x8 x0 x1 -
> > +arm64 svc #0 w8 x0 x1 -
>
> Acked-by: Will Deacon <will@kernel.org>
Thanks!
---Dave
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] syscall.2: arm: Use real register names for arm/OABI
2020-05-05 15:24 ` [PATCH 1/2] syscall.2: arm: Use real register names for arm/OABI Dave Martin
2020-05-05 15:26 ` Russell King - ARM Linux admin
@ 2020-05-06 10:05 ` Michael Kerrisk (man-pages)
2020-05-06 10:34 ` Dave Martin
1 sibling, 1 reply; 11+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-05-06 10:05 UTC (permalink / raw)
To: Dave Martin
Cc: mtk.manpages, Russell King, Catalin Marinas, Will Deacon,
linux-man, linux-arm-kernel
On 5/5/20 5:24 PM, Dave Martin wrote:
> The arm OABI syscall interface is currently documented in terms of
> register name aliases defined by the ARM Procedure Call Standard
> (APCS). However, these don't make sense in the context of a binary
> interface that doesn't comply (or need to comply) with APCS.
>
> Use the real architectural register names instead.
>
> The names a1-a4, v1... are just aliases for r0-r3, r4... anyway, so
> the interface is just the same regardless of which set of names is
> used.
>
> Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Thanks, Dave. Patch applied, with Russell's Acked-by added.
Cheers,
Michael
> ---
> man2/syscall.2 | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/man2/syscall.2 b/man2/syscall.2
> index f2b277b..53ab40e 100644
> --- a/man2/syscall.2
> +++ b/man2/syscall.2
> @@ -201,7 +201,7 @@ Arch/ABI Instruction System Ret Ret Error Notes
> _
> alpha callsys v0 v0 a4 a3 1, 6
> arc trap0 r8 r0 - -
> -arm/OABI swi NR - a1 - - 2
> +arm/OABI swi NR - r0 - - 2
> arm/EABI swi 0x0 r7 r0 r1 -
> arm64 svc #0 x8 x0 x1 -
> blackfin excpt 0x0 P0 R0 - -
> @@ -332,7 +332,7 @@ Arch/ABI arg1 arg2 arg3 arg4 arg5 arg6 arg7 Notes
> _
> alpha a0 a1 a2 a3 a4 a5 -
> arc r0 r1 r2 r3 r4 r5 -
> -arm/OABI a1 a2 a3 a4 v1 v2 v3
> +arm/OABI r0 r1 r2 r3 r4 r5 r6
> arm/EABI r0 r1 r2 r3 r4 r5 r6
> arm64 x0 x1 x2 x3 x4 x5 -
> blackfin R0 R1 R2 R3 R4 R5 -
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] syscall.2: arm64: Fix syscall number register size
2020-05-05 15:24 ` [PATCH 2/2] syscall.2: arm64: Fix syscall number register size Dave Martin
2020-05-05 15:54 ` Will Deacon
@ 2020-05-06 10:16 ` Michael Kerrisk (man-pages)
2020-05-06 10:35 ` Dave Martin
1 sibling, 1 reply; 11+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-05-06 10:16 UTC (permalink / raw)
To: Dave Martin
Cc: mtk.manpages, Russell King, Catalin Marinas, Will Deacon,
linux-man, linux-arm-kernel
On 5/5/20 5:24 PM, Dave Martin wrote:
> arm64 is currently documented as receiving the syscall number in
> x8.
>
> While this is the correct register, the syscall number is a 32-bit
> integer. Bits [63:32] are ignored by the kernel.
>
> So it is more correct to say "w8".
Thanks, Dave. Patch applied, with Will's Acked-by.
Cheers,
Michael
> Signed-off-by: Dave Martin <Dave.Martin@arm.com>
> ---
> man2/syscall.2 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man2/syscall.2 b/man2/syscall.2
> index 53ab40e..d724651 100644
> --- a/man2/syscall.2
> +++ b/man2/syscall.2
> @@ -203,7 +203,7 @@ alpha callsys v0 v0 a4 a3 1, 6
> arc trap0 r8 r0 - -
> arm/OABI swi NR - r0 - - 2
> arm/EABI swi 0x0 r7 r0 r1 -
> -arm64 svc #0 x8 x0 x1 -
> +arm64 svc #0 w8 x0 x1 -
> blackfin excpt 0x0 P0 R0 - -
> i386 int $0x80 eax eax edx -
> ia64 break 0x100000 r15 r8 r9 r10 1, 6
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] syscall.2: arm: Use real register names for arm/OABI
2020-05-06 10:05 ` Michael Kerrisk (man-pages)
@ 2020-05-06 10:34 ` Dave Martin
0 siblings, 0 replies; 11+ messages in thread
From: Dave Martin @ 2020-05-06 10:34 UTC (permalink / raw)
To: Michael Kerrisk (man-pages)
Cc: Russell King, Catalin Marinas, Will Deacon, linux-man, linux-arm-kernel
On Wed, May 06, 2020 at 12:05:00PM +0200, Michael Kerrisk (man-pages) wrote:
> On 5/5/20 5:24 PM, Dave Martin wrote:
> > The arm OABI syscall interface is currently documented in terms of
> > register name aliases defined by the ARM Procedure Call Standard
> > (APCS). However, these don't make sense in the context of a binary
> > interface that doesn't comply (or need to comply) with APCS.
> >
> > Use the real architectural register names instead.
> >
> > The names a1-a4, v1... are just aliases for r0-r3, r4... anyway, so
> > the interface is just the same regardless of which set of names is
> > used.
> >
> > Signed-off-by: Dave Martin <Dave.Martin@arm.com>
>
> Thanks, Dave. Patch applied, with Russell's Acked-by added.
>
> Cheers,
>
> Michael
Thanks!
---Dave
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] syscall.2: arm64: Fix syscall number register size
2020-05-06 10:16 ` Michael Kerrisk (man-pages)
@ 2020-05-06 10:35 ` Dave Martin
0 siblings, 0 replies; 11+ messages in thread
From: Dave Martin @ 2020-05-06 10:35 UTC (permalink / raw)
To: Michael Kerrisk (man-pages)
Cc: Russell King, Catalin Marinas, Will Deacon, linux-man, linux-arm-kernel
On Wed, May 06, 2020 at 12:16:07PM +0200, Michael Kerrisk (man-pages) wrote:
> On 5/5/20 5:24 PM, Dave Martin wrote:
> > arm64 is currently documented as receiving the syscall number in
> > x8.
> >
> > While this is the correct register, the syscall number is a 32-bit
> > integer. Bits [63:32] are ignored by the kernel.
> >
> > So it is more correct to say "w8".
>
> Thanks, Dave. Patch applied, with Will's Acked-by.
>
> Cheers,
>
> Michael
Thanks!
---Dave
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-05-06 10:35 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 15:24 [PATCH 0/2] syscall.2: Minor register name fixes for arm/arm64 Dave Martin
2020-05-05 15:24 ` [PATCH 1/2] syscall.2: arm: Use real register names for arm/OABI Dave Martin
2020-05-05 15:26 ` Russell King - ARM Linux admin
2020-05-05 15:53 ` Dave Martin
2020-05-06 10:05 ` Michael Kerrisk (man-pages)
2020-05-06 10:34 ` Dave Martin
2020-05-05 15:24 ` [PATCH 2/2] syscall.2: arm64: Fix syscall number register size Dave Martin
2020-05-05 15:54 ` Will Deacon
2020-05-05 16:06 ` Dave Martin
2020-05-06 10:16 ` Michael Kerrisk (man-pages)
2020-05-06 10:35 ` Dave Martin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).