* [PATCH] linux: arm: vdso: nullpatch vdso_clock_gettime64 for non-virtual timers
@ 2020-07-16 15:07 ` Alex Bee
0 siblings, 0 replies; 6+ messages in thread
From: Alex Bee @ 2020-07-16 15:07 UTC (permalink / raw)
To: linux-arch
Cc: Alex Bee, linux-arm-kernel, Russell King, Daniel Jordan,
Florian Fainelli, Vlastimil Babka, Vincenzo Frascino
Along with commit commit 74d06efb9c2f ("ARM: 8932/1: Add clock_gettime64
entry point") clock_gettime64 was added for ARM platform to solve the
y2k38 problem on 32-bit platforms. glibc from version 2.31 onwards
started using this vdso-call on ARM platforms.
However it was (probably) forgotten to "nullpatch" this call, when no
reliable timer source is available, for example when
"arm,cpu-registers-not-fw-configured" is defined in devicetree for
"arm,armv7-timer".
This results in erratic time jumps whenever "gettimeofday" gets called,
since the (non-working) vdso-call will be used instead of a syscall.
This patch adds clock_gettime64 to get nullpatched as well. It has been
verified to work and solve this issue on Rockchip RK322x, RK3288 and
RPi4 (32-bit kernel build) platforms.
Signed-off-by: Alex Bee <knaerzche@gmail.com>
---
arch/arm/kernel/vdso.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c
index 6bfdca4769a7..fddd08a6e063 100644
--- a/arch/arm/kernel/vdso.c
+++ b/arch/arm/kernel/vdso.c
@@ -184,6 +184,7 @@ static void __init patch_vdso(void *ehdr)
if (!cntvct_ok) {
vdso_nullpatch_one(&einfo, "__vdso_gettimeofday");
vdso_nullpatch_one(&einfo, "__vdso_clock_gettime");
+ vdso_nullpatch_one(&einfo, "__vdso_clock_gettime64");
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] linux: arm: vdso: nullpatch vdso_clock_gettime64 for non-virtual timers
@ 2020-07-16 15:07 ` Alex Bee
0 siblings, 0 replies; 6+ messages in thread
From: Alex Bee @ 2020-07-16 15:07 UTC (permalink / raw)
To: linux-arch
Cc: Florian Fainelli, Alex Bee, Daniel Jordan, linux-arm-kernel,
Russell King, Vincenzo Frascino, Vlastimil Babka
Along with commit commit 74d06efb9c2f ("ARM: 8932/1: Add clock_gettime64
entry point") clock_gettime64 was added for ARM platform to solve the
y2k38 problem on 32-bit platforms. glibc from version 2.31 onwards
started using this vdso-call on ARM platforms.
However it was (probably) forgotten to "nullpatch" this call, when no
reliable timer source is available, for example when
"arm,cpu-registers-not-fw-configured" is defined in devicetree for
"arm,armv7-timer".
This results in erratic time jumps whenever "gettimeofday" gets called,
since the (non-working) vdso-call will be used instead of a syscall.
This patch adds clock_gettime64 to get nullpatched as well. It has been
verified to work and solve this issue on Rockchip RK322x, RK3288 and
RPi4 (32-bit kernel build) platforms.
Signed-off-by: Alex Bee <knaerzche@gmail.com>
---
arch/arm/kernel/vdso.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c
index 6bfdca4769a7..fddd08a6e063 100644
--- a/arch/arm/kernel/vdso.c
+++ b/arch/arm/kernel/vdso.c
@@ -184,6 +184,7 @@ static void __init patch_vdso(void *ehdr)
if (!cntvct_ok) {
vdso_nullpatch_one(&einfo, "__vdso_gettimeofday");
vdso_nullpatch_one(&einfo, "__vdso_clock_gettime");
+ vdso_nullpatch_one(&einfo, "__vdso_clock_gettime64");
}
}
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] linux: arm: vdso: nullpatch vdso_clock_gettime64 for non-virtual timers
2020-07-16 15:07 ` Alex Bee
@ 2020-07-16 18:46 ` Robin Murphy
-1 siblings, 0 replies; 6+ messages in thread
From: Robin Murphy @ 2020-07-16 18:46 UTC (permalink / raw)
To: Alex Bee, linux-arch
Cc: Florian Fainelli, Daniel Jordan, linux-arm-kernel, Russell King,
Vincenzo Frascino, Vlastimil Babka
Hi Alex,
On 2020-07-16 16:07, Alex Bee wrote:
> Along with commit commit 74d06efb9c2f ("ARM: 8932/1: Add clock_gettime64
> entry point") clock_gettime64 was added for ARM platform to solve the
> y2k38 problem on 32-bit platforms. glibc from version 2.31 onwards
> started using this vdso-call on ARM platforms.
> However it was (probably) forgotten to "nullpatch" this call, when no
> reliable timer source is available, for example when
> "arm,cpu-registers-not-fw-configured" is defined in devicetree for
> "arm,armv7-timer".
> This results in erratic time jumps whenever "gettimeofday" gets called,
> since the (non-working) vdso-call will be used instead of a syscall.
>
> This patch adds clock_gettime64 to get nullpatched as well. It has been
> verified to work and solve this issue on Rockchip RK322x, RK3288 and
> RPi4 (32-bit kernel build) platforms.
FYI, a version of this patch was already submitted, and is just waiting
for Russell to apply it:
https://www.armlinux.org.uk/developer/patches/viewpatch.php?id=8987/1
Robin.
> Signed-off-by: Alex Bee <knaerzche@gmail.com>
> ---
> arch/arm/kernel/vdso.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c
> index 6bfdca4769a7..fddd08a6e063 100644
> --- a/arch/arm/kernel/vdso.c
> +++ b/arch/arm/kernel/vdso.c
> @@ -184,6 +184,7 @@ static void __init patch_vdso(void *ehdr)
> if (!cntvct_ok) {
> vdso_nullpatch_one(&einfo, "__vdso_gettimeofday");
> vdso_nullpatch_one(&einfo, "__vdso_clock_gettime");
> + vdso_nullpatch_one(&einfo, "__vdso_clock_gettime64");
> }
> }
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] linux: arm: vdso: nullpatch vdso_clock_gettime64 for non-virtual timers
@ 2020-07-16 18:46 ` Robin Murphy
0 siblings, 0 replies; 6+ messages in thread
From: Robin Murphy @ 2020-07-16 18:46 UTC (permalink / raw)
To: Alex Bee, linux-arch
Cc: Florian Fainelli, Russell King, Daniel Jordan, linux-arm-kernel,
Vincenzo Frascino, Vlastimil Babka
Hi Alex,
On 2020-07-16 16:07, Alex Bee wrote:
> Along with commit commit 74d06efb9c2f ("ARM: 8932/1: Add clock_gettime64
> entry point") clock_gettime64 was added for ARM platform to solve the
> y2k38 problem on 32-bit platforms. glibc from version 2.31 onwards
> started using this vdso-call on ARM platforms.
> However it was (probably) forgotten to "nullpatch" this call, when no
> reliable timer source is available, for example when
> "arm,cpu-registers-not-fw-configured" is defined in devicetree for
> "arm,armv7-timer".
> This results in erratic time jumps whenever "gettimeofday" gets called,
> since the (non-working) vdso-call will be used instead of a syscall.
>
> This patch adds clock_gettime64 to get nullpatched as well. It has been
> verified to work and solve this issue on Rockchip RK322x, RK3288 and
> RPi4 (32-bit kernel build) platforms.
FYI, a version of this patch was already submitted, and is just waiting
for Russell to apply it:
https://www.armlinux.org.uk/developer/patches/viewpatch.php?id=8987/1
Robin.
> Signed-off-by: Alex Bee <knaerzche@gmail.com>
> ---
> arch/arm/kernel/vdso.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c
> index 6bfdca4769a7..fddd08a6e063 100644
> --- a/arch/arm/kernel/vdso.c
> +++ b/arch/arm/kernel/vdso.c
> @@ -184,6 +184,7 @@ static void __init patch_vdso(void *ehdr)
> if (!cntvct_ok) {
> vdso_nullpatch_one(&einfo, "__vdso_gettimeofday");
> vdso_nullpatch_one(&einfo, "__vdso_clock_gettime");
> + vdso_nullpatch_one(&einfo, "__vdso_clock_gettime64");
> }
> }
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] linux: arm: vdso: nullpatch vdso_clock_gettime64 for non-virtual timers
2020-07-16 18:46 ` Robin Murphy
@ 2020-07-16 23:25 ` Alex Bee
-1 siblings, 0 replies; 6+ messages in thread
From: Alex Bee @ 2020-07-16 23:25 UTC (permalink / raw)
To: Robin Murphy, linux-arch
Cc: Florian Fainelli, Daniel Jordan, linux-arm-kernel, Russell King,
Vincenzo Frascino, Vlastimil Babka
Hi Robin,
Am 16.07.20 um 20:46 schrieb Robin Murphy:
> Hi Alex,
>
> On 2020-07-16 16:07, Alex Bee wrote:
>> Along with commit commit 74d06efb9c2f ("ARM: 8932/1: Add clock_gettime64
>> entry point") clock_gettime64 was added for ARM platform to solve the
>> y2k38 problem on 32-bit platforms. glibc from version 2.31 onwards
>> started using this vdso-call on ARM platforms.
>> However it was (probably) forgotten to "nullpatch" this call, when no
>> reliable timer source is available, for example when
>> "arm,cpu-registers-not-fw-configured" is defined in devicetree for
>> "arm,armv7-timer".
>> This results in erratic time jumps whenever "gettimeofday" gets called,
>> since the (non-working) vdso-call will be used instead of a syscall.
>>
>> This patch adds clock_gettime64 to get nullpatched as well. It has been
>> verified to work and solve this issue on Rockchip RK322x, RK3288 and
>> RPi4 (32-bit kernel build) platforms.
>
> FYI, a version of this patch was already submitted, and is just
> waiting for Russell to apply it:
>
> https://www.armlinux.org.uk/developer/patches/viewpatch.php?id=8987/1
>
> Robin.
OK - couldn't find this before. You can drop my patch than.
>
>> Signed-off-by: Alex Bee <knaerzche@gmail.com>
>> ---
>> arch/arm/kernel/vdso.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c
>> index 6bfdca4769a7..fddd08a6e063 100644
>> --- a/arch/arm/kernel/vdso.c
>> +++ b/arch/arm/kernel/vdso.c
>> @@ -184,6 +184,7 @@ static void __init patch_vdso(void *ehdr)
>> if (!cntvct_ok) {
>> vdso_nullpatch_one(&einfo, "__vdso_gettimeofday");
>> vdso_nullpatch_one(&einfo, "__vdso_clock_gettime");
>> + vdso_nullpatch_one(&einfo, "__vdso_clock_gettime64");
>> }
>> }
>>
Regards,
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] linux: arm: vdso: nullpatch vdso_clock_gettime64 for non-virtual timers
@ 2020-07-16 23:25 ` Alex Bee
0 siblings, 0 replies; 6+ messages in thread
From: Alex Bee @ 2020-07-16 23:25 UTC (permalink / raw)
To: Robin Murphy, linux-arch
Cc: Florian Fainelli, Russell King, Daniel Jordan, linux-arm-kernel,
Vincenzo Frascino, Vlastimil Babka
Hi Robin,
Am 16.07.20 um 20:46 schrieb Robin Murphy:
> Hi Alex,
>
> On 2020-07-16 16:07, Alex Bee wrote:
>> Along with commit commit 74d06efb9c2f ("ARM: 8932/1: Add clock_gettime64
>> entry point") clock_gettime64 was added for ARM platform to solve the
>> y2k38 problem on 32-bit platforms. glibc from version 2.31 onwards
>> started using this vdso-call on ARM platforms.
>> However it was (probably) forgotten to "nullpatch" this call, when no
>> reliable timer source is available, for example when
>> "arm,cpu-registers-not-fw-configured" is defined in devicetree for
>> "arm,armv7-timer".
>> This results in erratic time jumps whenever "gettimeofday" gets called,
>> since the (non-working) vdso-call will be used instead of a syscall.
>>
>> This patch adds clock_gettime64 to get nullpatched as well. It has been
>> verified to work and solve this issue on Rockchip RK322x, RK3288 and
>> RPi4 (32-bit kernel build) platforms.
>
> FYI, a version of this patch was already submitted, and is just
> waiting for Russell to apply it:
>
> https://www.armlinux.org.uk/developer/patches/viewpatch.php?id=8987/1
>
> Robin.
OK - couldn't find this before. You can drop my patch than.
>
>> Signed-off-by: Alex Bee <knaerzche@gmail.com>
>> ---
>> arch/arm/kernel/vdso.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c
>> index 6bfdca4769a7..fddd08a6e063 100644
>> --- a/arch/arm/kernel/vdso.c
>> +++ b/arch/arm/kernel/vdso.c
>> @@ -184,6 +184,7 @@ static void __init patch_vdso(void *ehdr)
>> if (!cntvct_ok) {
>> vdso_nullpatch_one(&einfo, "__vdso_gettimeofday");
>> vdso_nullpatch_one(&einfo, "__vdso_clock_gettime");
>> + vdso_nullpatch_one(&einfo, "__vdso_clock_gettime64");
>> }
>> }
>>
Regards,
Alex
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-07-16 23:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16 15:07 [PATCH] linux: arm: vdso: nullpatch vdso_clock_gettime64 for non-virtual timers Alex Bee
2020-07-16 15:07 ` Alex Bee
2020-07-16 18:46 ` Robin Murphy
2020-07-16 18:46 ` Robin Murphy
2020-07-16 23:25 ` Alex Bee
2020-07-16 23:25 ` Alex Bee
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.