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: <87y2gfg18p.fsf@nanos.tec.linutronix.de>
Date:   Tue, 26 Jan 2021 16:35:18 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Mickaël Salaün <mic@...ikod.net>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Miroslav Lichvar <mlichvar@...hat.com>,
        John Stultz <john.stultz@...aro.org>,
        Prarit Bhargava <prarit@...hat.com>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        linux-rtc@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>
Subject: Re: [patch 1/8] rtc: mc146818: Prevent reading garbage - bug

On Tue, Jan 26 2021 at 15:17, Mickaël Salaün wrote:
> Thanks for the fix! It boots now with a new message:
> rtc_cmos rtc_cmos: not accessible
>>  	spin_lock_irqsave(&rtc_lock, flags);
>> +	/* Ensure that the RTC is accessible. Bit 0-6 must be 0! */
>> +	if (WARN_ON_ONCE((CMOS_READ(RTC_VALID) & 0x7f) != 0)) {
>> +		spin_unlock_irqrestore(&rtc_lock, flags);
>> +		memset(time, 0xff, sizeof(time));
>
> This should be: sizeof(*time)

Of course ....

>> +		return 0;
>> +	}
>> +
>>  	/*
>>  	 * Check whether there is an update in progress during which the
>>  	 * readout is unspecified. The maximum update time is ~2ms. Poll
>> 
>
> Tested-by: Mickaël Salaün <mic@...ux.microsoft.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ