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] [day] [month] [year] [list]
Message-ID: <af1c5ec4-9e4d-a2d9-e70b-1f182e6b5790@loongson.cn>
Date: Mon, 14 Jul 2025 10:36:19 +0800
From: Bibo Mao <maobibo@...ngson.cn>
To: Ard Biesheuvel <ardb@...nel.org>,
 Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc: Feng Tang <feng.tang@...ux.alibaba.com>, linux-rtc@...r.kernel.org,
 linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rtc: efi: Add runtime check for the wakeup service
 capability



On 2025/7/14 上午10:08, Ard Biesheuvel wrote:
> On Fri, 11 Jul 2025 at 18:56, Alexandre Belloni
> <alexandre.belloni@...tlin.com> wrote:
>>
>> On 11/07/2025 11:26:18+1000, Ard Biesheuvel wrote:
>>> On Fri, 11 Jul 2025 at 11:06, Ard Biesheuvel <ardb@...nel.org> wrote:
>>>>
>>>> On Thu, 10 Jul 2025 at 18:41, Feng Tang <feng.tang@...ux.alibaba.com> wrote:
>>>>>
>>>>> The kernel selftest of rtc reported a error on an ARM server which
>>>>> use rtc-efi device:
>>>>>
>>>>>          RUN           rtc.alarm_alm_set ...
>>>>>          rtctest.c:262:alarm_alm_set:Alarm time now set to 17:31:36.
>>>>>          rtctest.c:267:alarm_alm_set:Expected -1 (-1) != rc (-1)
>>>>>          alarm_alm_set: Test terminated by assertion
>>>>>                   FAIL  rtc.alarm_alm_set
>>>>>          not ok 5 rtc.alarm_alm_set
>>>>>
>>>>> The root cause is, the underlying EFI firmware doesn't support wakeup
>>>>> service (get/set alarm), while it doesn't have the EFI RT_PROP table
>>>>> either. As Ard Biesheuvel clarified [1], this breaks the UEFI spec,
>>>>> which requires EFI firmware to provide a 'RT_PROP' table if it doesn't
>>>>> support all runtime services (Section 4.6.2, UEFI spec 2.10).
>>>>>
>>>>> This issue was also reproduced on ARM server from another vendor, which
>>>>> doesn't have RT_PROP table either. This means, in real world, there are
>>>>> quite some platforms having this issue, that it doesn't support wakeup
>>>>> service while not providing a correct RT_PROP table, which makes it
>>>>> wrongly claimed to support it.
>>>>>
>>>>> Add a runtime check for the wakeup service to detect and correct this
>>>>> kind of cases.
>>>>>
>>>>> [1]. https://lore.kernel.org/lkml/CAMj1kXEkzXsjm0dPhzxB+KdtzqADd4NmafKmw2rKw7mAPBrgdA@mail.gmail.com/
>>>>>
>>>>> Signed-off-by: Feng Tang <feng.tang@...ux.alibaba.com>
>>>>> ---
>>>>>   drivers/rtc/rtc-efi.c | 4 +++-
>>>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>>>>
>>>>
>>>> Thanks, I've queued this up now.
>>>>
>>>
>>> Actually, we might just remove the EFI get/set wakeup time
>>> functionality altogether, as it seems rather pointless to me to begin
>>> with.
>>>
>>> I'll send out an RFC shortly.
>>
>> I guess this is going to also solve the issue reported by loongson
>> https://lore.kernel.org/linux-rtc/20250613061747.4117470-1-wangming01@loongson.cn/
>>
>> However, please let me take care of patches in my subsystem...
>>
> 
> Apologies - I've dropped it now.
> 
> But please don't queue this, I'll send out my RFC shortly.
> 
This is similar problem on Loongarch VM when running ltp testcase rtc02, 
I do not know whether the root cause is the same, the runtime service is 
hard to debug.

Hope for RFC version :)

Regards
Bibo Mao


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ