lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Nov 2019 15:28:03 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Ben Hutchings <ben.hutchings@...ethink.co.uk>
Cc:     y2038 Mailman List <y2038@...ts.linaro.org>,
        Ralf Baechle <ralf@...ux-mips.org>,
        Paul Burton <paul.burton@...s.com>,
        James Hogan <jhogan@...nel.org>,
        "James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
        Helge Deller <deller@....de>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        "David S. Miller" <davem@...emloft.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Parisc List <linux-parisc@...r.kernel.org>,
        linux-mips@...r.kernel.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        sparclinux <sparclinux@...r.kernel.org>,
        linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [Y2038] [PATCH 08/23] y2038: ipc: remove __kernel_time_t
 reference from headers

On Wed, Nov 20, 2019 at 11:49 PM Ben Hutchings
<ben.hutchings@...ethink.co.uk> wrote:
>
> On Fri, 2019-11-08 at 22:07 +0100, Arnd Bergmann wrote:
> [...]
> > --- a/arch/x86/include/uapi/asm/sembuf.h
> > +++ b/arch/x86/include/uapi/asm/sembuf.h
> > @@ -21,9 +21,9 @@ struct semid64_ds {
> >       unsigned long   sem_ctime;      /* last change time */
> >       unsigned long   sem_ctime_high;
> >  #else
> > -     __kernel_time_t sem_otime;      /* last semop time */
> > +     long            sem_otime;      /* last semop time */
> >       __kernel_ulong_t __unused1;
> > -     __kernel_time_t sem_ctime;      /* last change time */
> > +     long            sem_ctime;      /* last change time */
> >       __kernel_ulong_t __unused2;
> >  #endif
> >       __kernel_ulong_t sem_nsems;     /* no. of semaphores in array */
> [...]
>
> We need to use __kernel_long_t here to do the right thing on x32.

Good catch, thanks for the review!

I applied the patch below now on top.

       Arnd

commit c7ebd8a1c1825c3197732ea692cf3dde34a644f5 (HEAD)
Author: Arnd Bergmann <arnd@...db.de>
Date:   Thu Nov 21 15:25:04 2019 +0100

    y2038: ipc: fix x32 ABI breakage

    The correct type on x32 is 64-bit wide, same as for the other struct
    members around it, so use  __kernel_long_t in place of the original
    __kernel_time_t here, corresponding to the rest of the structure.

    Fixes: caf5e32d4ea7 ("y2038: ipc: remove __kernel_time_t reference
from headers")
    Reported-by: Ben Hutchings <ben.hutchings@...ethink.co.uk>
    Signed-off-by: Arnd Bergmann <arnd@...db.de>

diff --git a/arch/x86/include/uapi/asm/sembuf.h
b/arch/x86/include/uapi/asm/sembuf.h
index 7c1b156695ba..20cab43c4b15 100644
--- a/arch/x86/include/uapi/asm/sembuf.h
+++ b/arch/x86/include/uapi/asm/sembuf.h
@@ -21,9 +21,9 @@ struct semid64_ds {
        unsigned long   sem_ctime;      /* last change time */
        unsigned long   sem_ctime_high;
 #else
-       long            sem_otime;      /* last semop time */
+       __kernel_long_t sem_otime;      /* last semop time */
        __kernel_ulong_t __unused1;
-       long            sem_ctime;      /* last change time */
+       __kenrel_long_t sem_ctime;      /* last change time */
        __kernel_ulong_t __unused2;
 #endif
        __kernel_ulong_t sem_nsems;     /* no. of semaphores in array */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ