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: <e35d22f7-4796-43ae-bc73-7e41497094d6@kernel.org>
Date: Tue, 1 Oct 2024 08:41:55 -0500
From: Mario Limonciello <superm1@...nel.org>
To: Thomas Gleixner <tglx@...utronix.de>, Mateusz Jończyk
 <mat.jonczyk@...pl>, John Stultz <jstultz@...gle.com>
Cc: Stephen Boyd <sboyd@...nel.org>,
 "open list:TIMEKEEPING, CLOCKSOURCE CORE, NTP, ALARMTIMER"
 <linux-kernel@...r.kernel.org>, Mario Limonciello
 <mario.limonciello@....com>,
 Alexandre Belloni <alexandre.belloni@...tlin.com>
Subject: Re: [PATCH RESEND] alarmtimer: Use aie_timer from RTC device instead
 of own timer

On 10/1/2024 03:30, Thomas Gleixner wrote:
> On Mon, Sep 30 2024 at 13:29, Mario Limonciello wrote:
>> It was reported that suspend-then-hibernate stopped working with modern
>> systemd versions on an AMD Cezanne system. The reason for this breakage
>> was because systemd switched to using alarmtimer instead of the wakealarm
>> sysfs file.
>>
>> The wakealarm sysfs file programs the time to the `rtc->aie_timer` member
>> of the RTC, whereas the alarmtimer suspend routine programs it to it's
>> own device.
>>
>> On AMD Cezanne systems rtc_read_alarm() is used to program a secondary
>> timer with the value of the timer. This behavior was introduced by
>> commit 59348401ebed9 ("platform/x86: amd-pmc: Add special handling
>> for timer based S0i3 wakeup").
>>
>> As rtc_read_alarm() uses the `rtc->aie_timer` to report the cached
>> timer no alarm is provided as enabled.
>>
>> To fix this issue, drop the use of a dedicated timer for the alarmtimer
>> and instead use `rtc->aie_timer` in the alarmtimer suspend/resume
>> routines.
> 
> I'm not sure that this is correct. There is a reason why alarmtimer uses
> a dedicated timer 

Do you know what it is?  When I was looking at this problem I wasn't sure.

> and this worked correctly so far.
> 
> I'd rather look at commit 59348401ebed9, which plays games with the RTC.
> 
> Thanks,
> 
>          tglx

The workaround in commit 59348401ebed9 exists because of what appears to 
be a platform bug that is unique to Cezanne systems.  Newer stuff 
(Mendocino, Rembrandt, Phoenix, Strix etc) doesn't need or use it.

I'd love if we could tear it out; but I'm at a loss what else we can do 
from the Linux kernel side.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ