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]
Message-ID: <87efh3hndq.fsf@igel.home>
Date:   Mon, 18 Jun 2018 22:04:49 +0200
From:   Andreas Schwab <schwab@...ux-m68k.org>
To:     Mathieu Malaterre <malat@...ian.org>
Cc:     Arnd Bergmann <arnd@...db.de>, Paul Mackerras <paulus@...ba.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        Geert Uytterhoeven <geert@...ux-m68k.org>, funaho@...ai.org,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        gerg@...ux-m68k.org, linux-m68k@...ts.linux-m68k.org,
        linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
        LKML <linux-kernel@...r.kernel.org>, y2038@...ts.linaro.org,
        Meelis Roos <mroos@...ux.ee>,
        Alexandre Belloni <alexandre.belloni@...e-electrons.com>
Subject: Re: [PATCH 1/3] powerpc: mac: fix rtc read functions

On Jun 18 2018, Mathieu Malaterre <malat@...ian.org> wrote:

> Sadly, trying again today does not work anymore. Adding some printk
> just before WARN_ON:
>
> +printk(KERN_ERR " rtc DBG pmu_get_time1: %lld %d %lld \n", now,
> RTC_OFFSET, now - RTC_OFFSET );
> +printk(KERN_ERR " rtc DBG pmu_get_time2: %x %x %x %x %d \n",
> req.reply[0], req.reply[1], req.reply[2], req.reply[3] ,
> req.reply_len);
>
> leads to:
>
> [    0.000000]  rtc DBG pmu_get_time1: 14096662 2082844800 -2068748138
> [    0.000000]  rtc DBG pmu_get_time2: 0 d7 19 16 4

A good value would have 0xd7 in the first byte.  The problem is that
pmu_set_rtc_time is also broken, and leads to an invalid time value
stored in the RTC.  Since pmu_request is a varargs function passing
values of type time64_t without casting won't work.

You need to reset your RTC before you can continue.

I think the right fix is to change nowtime in pmu_set_rtc_time and
cuda_set_rtc_time back to unsigned int (or to u32).

Andreas.

-- 
Andreas Schwab, schwab@...ux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ