* [PATCH] arm64: compat: Fix syscall number of compat_clock_getres
@ 2020-03-19 14:11 Vincenzo Frascino
2020-03-19 15:39 ` Nick Desaulniers
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Vincenzo Frascino @ 2020-03-19 14:11 UTC (permalink / raw)
To: linux-arm-kernel, clang-built-linux, linux-kernel
Cc: Vincenzo Frascino, Catalin Marinas, Will Deacon, stable
The syscall number of compat_clock_getres was erroneously set to 247
instead of 264. This causes the vDSO fallback of clock_getres to land
on the wrong syscall.
Address the issue fixing the syscall number of compat_clock_getres.
Fixes: 53c489e1dfeb6 ("arm64: compat: Add missing syscall numbers")
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
arch/arm64/include/asm/unistd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h
index 1dd22da1c3a9..803039d504de 100644
--- a/arch/arm64/include/asm/unistd.h
+++ b/arch/arm64/include/asm/unistd.h
@@ -25,8 +25,8 @@
#define __NR_compat_gettimeofday 78
#define __NR_compat_sigreturn 119
#define __NR_compat_rt_sigreturn 173
-#define __NR_compat_clock_getres 247
#define __NR_compat_clock_gettime 263
+#define __NR_compat_clock_getres 264
#define __NR_compat_clock_gettime64 403
#define __NR_compat_clock_getres_time64 406
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: compat: Fix syscall number of compat_clock_getres
2020-03-19 14:11 [PATCH] arm64: compat: Fix syscall number of compat_clock_getres Vincenzo Frascino
@ 2020-03-19 15:39 ` Nick Desaulniers
2020-03-19 17:03 ` Vincenzo Frascino
2020-03-19 18:12 ` Catalin Marinas
2020-03-19 18:42 ` Will Deacon
2 siblings, 1 reply; 7+ messages in thread
From: Nick Desaulniers @ 2020-03-19 15:39 UTC (permalink / raw)
To: Vincenzo Frascino
Cc: Linux ARM, clang-built-linux, LKML, Catalin Marinas, Will Deacon,
# 3.4.x
On Thu, Mar 19, 2020 at 7:11 AM Vincenzo Frascino
<vincenzo.frascino@arm.com> wrote:
>
> The syscall number of compat_clock_getres was erroneously set to 247
> instead of 264. This causes the vDSO fallback of clock_getres to land
> on the wrong syscall.
>
> Address the issue fixing the syscall number of compat_clock_getres.
>
> Fixes: 53c489e1dfeb6 ("arm64: compat: Add missing syscall numbers")
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
> arch/arm64/include/asm/unistd.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h
> index 1dd22da1c3a9..803039d504de 100644
> --- a/arch/arm64/include/asm/unistd.h
> +++ b/arch/arm64/include/asm/unistd.h
> @@ -25,8 +25,8 @@
> #define __NR_compat_gettimeofday 78
> #define __NR_compat_sigreturn 119
> #define __NR_compat_rt_sigreturn 173
> -#define __NR_compat_clock_getres 247
> #define __NR_compat_clock_gettime 263
> +#define __NR_compat_clock_getres 264
This seems to match up with the glibc sources:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/arm/arch-syscall.h;h=c6554a8a6a6e7fe3359f1272f619c3da7c90629b;hb=HEAD#l27
Here's bionic's headers for good measure:
https://android.googlesource.com/platform/bionic/+/refs/heads/master/libc/kernel/uapi/asm-arm/asm/unistd-common.h#240
I assume the _compat_ prefixes are the aarch32 syscall numbers?
Otherwise here's the list for aarch64:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/aarch64/arch-syscall.h;h=c8471947b9c209be6add1e528f892f1a6c54f966;hb=HEAD
Looks like 247 was __NR_io_cancel; that's a subtle bug I'm glad was noticed!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> #define __NR_compat_clock_gettime64 403
> #define __NR_compat_clock_getres_time64 406
>
> --
> 2.25.1
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200319141138.19343-1-vincenzo.frascino%40arm.com.
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: compat: Fix syscall number of compat_clock_getres
2020-03-19 15:39 ` Nick Desaulniers
@ 2020-03-19 17:03 ` Vincenzo Frascino
0 siblings, 0 replies; 7+ messages in thread
From: Vincenzo Frascino @ 2020-03-19 17:03 UTC (permalink / raw)
To: Nick Desaulniers
Cc: Linux ARM, clang-built-linux, LKML, Catalin Marinas, Will Deacon,
# 3.4.x
Hi Nick,
On 3/19/20 3:39 PM, Nick Desaulniers wrote:
> On Thu, Mar 19, 2020 at 7:11 AM Vincenzo Frascino
> <vincenzo.frascino@arm.com> wrote:
[...]
>
> This seems to match up with the glibc sources:
> https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/arm/arch-syscall.h;h=c6554a8a6a6e7fe3359f1272f619c3da7c90629b;hb=HEAD#l27
> Here's bionic's headers for good measure:
> https://android.googlesource.com/platform/bionic/+/refs/heads/master/libc/kernel/uapi/asm-arm/asm/unistd-common.h#240
>
> I assume the _compat_ prefixes are the aarch32 syscall numbers?
> Otherwise here's the list for aarch64:
> https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/aarch64/arch-syscall.h;h=c8471947b9c209be6add1e528f892f1a6c54f966;hb=HEAD
>
> Looks like 247 was __NR_io_cancel; that's a subtle bug I'm glad was noticed!
>
Yes, very subtle, I agree!
Thank you for the information provided.
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
>
>> #define __NR_compat_clock_gettime64 403
>> #define __NR_compat_clock_getres_time64 406
>>
>> --
>> 2.25.1
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200319141138.19343-1-vincenzo.frascino%40arm.com.
>
>
>
--
Regards,
Vincenzo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: compat: Fix syscall number of compat_clock_getres
2020-03-19 14:11 [PATCH] arm64: compat: Fix syscall number of compat_clock_getres Vincenzo Frascino
2020-03-19 15:39 ` Nick Desaulniers
@ 2020-03-19 18:12 ` Catalin Marinas
2020-03-19 18:52 ` Will Deacon
2020-03-20 12:30 ` Vincenzo Frascino
2020-03-19 18:42 ` Will Deacon
2 siblings, 2 replies; 7+ messages in thread
From: Catalin Marinas @ 2020-03-19 18:12 UTC (permalink / raw)
To: Vincenzo Frascino
Cc: linux-arm-kernel, clang-built-linux, linux-kernel, Will Deacon, stable
On Thu, Mar 19, 2020 at 02:11:38PM +0000, Vincenzo Frascino wrote:
> The syscall number of compat_clock_getres was erroneously set to 247
> instead of 264. This causes the vDSO fallback of clock_getres to land
> on the wrong syscall.
>
> Address the issue fixing the syscall number of compat_clock_getres.
>
> Fixes: 53c489e1dfeb6 ("arm64: compat: Add missing syscall numbers")
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
Will left ARM about 8 months ago IIRC ;).
> Cc: stable@vger.kernel.org
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
I think Will could take this as a fix.
Thanks,
Catalin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: compat: Fix syscall number of compat_clock_getres
2020-03-19 14:11 [PATCH] arm64: compat: Fix syscall number of compat_clock_getres Vincenzo Frascino
2020-03-19 15:39 ` Nick Desaulniers
2020-03-19 18:12 ` Catalin Marinas
@ 2020-03-19 18:42 ` Will Deacon
2 siblings, 0 replies; 7+ messages in thread
From: Will Deacon @ 2020-03-19 18:42 UTC (permalink / raw)
To: Vincenzo Frascino
Cc: linux-arm-kernel, clang-built-linux, linux-kernel,
Catalin Marinas, Will Deacon, stable
On Thu, Mar 19, 2020 at 02:11:38PM +0000, Vincenzo Frascino wrote:
> The syscall number of compat_clock_getres was erroneously set to 247
> instead of 264. This causes the vDSO fallback of clock_getres to land
> on the wrong syscall.
>
> Address the issue fixing the syscall number of compat_clock_getres.
>
> Fixes: 53c489e1dfeb6 ("arm64: compat: Add missing syscall numbers")
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
> arch/arm64/include/asm/unistd.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h
> index 1dd22da1c3a9..803039d504de 100644
> --- a/arch/arm64/include/asm/unistd.h
> +++ b/arch/arm64/include/asm/unistd.h
> @@ -25,8 +25,8 @@
> #define __NR_compat_gettimeofday 78
> #define __NR_compat_sigreturn 119
> #define __NR_compat_rt_sigreturn 173
> -#define __NR_compat_clock_getres 247
> #define __NR_compat_clock_gettime 263
> +#define __NR_compat_clock_getres 264
> #define __NR_compat_clock_gettime64 403
> #define __NR_compat_clock_getres_time64 406
Ha, what a howler. I'll queue this one as a fix.
Will
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: compat: Fix syscall number of compat_clock_getres
2020-03-19 18:12 ` Catalin Marinas
@ 2020-03-19 18:52 ` Will Deacon
2020-03-20 12:30 ` Vincenzo Frascino
1 sibling, 0 replies; 7+ messages in thread
From: Will Deacon @ 2020-03-19 18:52 UTC (permalink / raw)
To: Catalin Marinas
Cc: Vincenzo Frascino, linux-arm-kernel, clang-built-linux,
linux-kernel, stable
On Thu, Mar 19, 2020 at 06:12:03PM +0000, Catalin Marinas wrote:
> On Thu, Mar 19, 2020 at 02:11:38PM +0000, Vincenzo Frascino wrote:
> > The syscall number of compat_clock_getres was erroneously set to 247
> > instead of 264. This causes the vDSO fallback of clock_getres to land
> > on the wrong syscall.
> >
> > Address the issue fixing the syscall number of compat_clock_getres.
> >
> > Fixes: 53c489e1dfeb6 ("arm64: compat: Add missing syscall numbers")
> > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: Will Deacon <will.deacon@arm.com>
>
> Will left ARM about 8 months ago IIRC ;).
Haha, well I certainly tried to!
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
>
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
>
> I think Will could take this as a fix.
For sure, I'm queuing it now.
Will
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: compat: Fix syscall number of compat_clock_getres
2020-03-19 18:12 ` Catalin Marinas
2020-03-19 18:52 ` Will Deacon
@ 2020-03-20 12:30 ` Vincenzo Frascino
1 sibling, 0 replies; 7+ messages in thread
From: Vincenzo Frascino @ 2020-03-20 12:30 UTC (permalink / raw)
To: Catalin Marinas
Cc: linux-arm-kernel, clang-built-linux, linux-kernel, Will Deacon, stable
On 3/19/20 6:12 PM, Catalin Marinas wrote:
> On Thu, Mar 19, 2020 at 02:11:38PM +0000, Vincenzo Frascino wrote:
>> The syscall number of compat_clock_getres was erroneously set to 247
>> instead of 264. This causes the vDSO fallback of clock_getres to land
>> on the wrong syscall.
>>
>> Address the issue fixing the syscall number of compat_clock_getres.
>>
>> Fixes: 53c489e1dfeb6 ("arm64: compat: Add missing syscall numbers")
>> Cc: Catalin Marinas <catalin.marinas@arm.com>
>> Cc: Will Deacon <will.deacon@arm.com>
>
> Will left ARM about 8 months ago IIRC ;).
>
Nice ;) I typed it manually, it came by "instinct" I guess ;) Sorry Will!
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
>
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
>
> I think Will could take this as a fix.
>
> Thanks,
>
> Catalin
>
--
Regards,
Vincenzo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-03-20 12:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 14:11 [PATCH] arm64: compat: Fix syscall number of compat_clock_getres Vincenzo Frascino
2020-03-19 15:39 ` Nick Desaulniers
2020-03-19 17:03 ` Vincenzo Frascino
2020-03-19 18:12 ` Catalin Marinas
2020-03-19 18:52 ` Will Deacon
2020-03-20 12:30 ` Vincenzo Frascino
2020-03-19 18:42 ` Will Deacon
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).