[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fdcb510863c801f1f64448e558ee0f8ed20db418.camel@codethink.co.uk>
Date: Wed, 20 Nov 2019 19:13:12 +0000
From: Ben Hutchings <ben.hutchings@...ethink.co.uk>
To: Arnd Bergmann <arnd@...db.de>, y2038@...ts.linaro.org,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [Y2038] [PATCH 3/8] powerpc: fix vdso32 for ppc64le
On Fri, 2019-11-08 at 21:34 +0100, Arnd Bergmann wrote:
> On little-endian 32-bit application running on 64-bit kernels,
> the current vdso would read the wrong half of the xtime seconds
> field. Change it to return the lower half like it does on
> big-endian.
ppc64le doesn't have 32-bit compat so this is only theoretical.
Ben.
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> arch/powerpc/kernel/vdso32/gettimeofday.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S
> index becd9f8767ed..4327665ad86f 100644
> --- a/arch/powerpc/kernel/vdso32/gettimeofday.S
> +++ b/arch/powerpc/kernel/vdso32/gettimeofday.S
> @@ -13,7 +13,7 @@
> #include <asm/unistd.h>
>
> /* Offset for the low 32-bit part of a field of long type */
> -#ifdef CONFIG_PPC64
> +#if defined(CONFIG_PPC64) && defined(CONFIG_CPU_BIG_ENDIAN)
> #define LOPART 4
> #define TSPEC_TV_SEC TSPC64_TV_SEC+LOPART
> #else
--
Ben Hutchings, Software Developer Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United Kingdom
Powered by blists - more mailing lists