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: <72ab3ef1-fcd7-4003-8393-e64159625125@rivosinc.com>
Date: Wed, 29 Oct 2025 16:35:14 +0100
From: Clément Léger <cleger@...osinc.com>
To: Himanshu Chauhan <hchauhan@...tanamicro.com>
Cc: Paul Walmsley <paul.walmsley@...ive.com>,
 Palmer Dabbelt <palmer@...belt.com>, linux-riscv@...ts.infradead.org,
 linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 Anup Patel <apatel@...tanamicro.com>, Xu Lu <luxu.kernel@...edance.com>,
 Atish Patra <atishp@...shpatra.org>, Björn Töpel
 <bjorn@...osinc.com>, Yunhui Cui <cuiyunhui@...edance.com>,
 Conor Dooley <conor.dooley@...rochip.com>
Subject: Re: [PATCH v7 3/5] drivers: firmware: add riscv SSE support



On 10/27/25 13:35, Himanshu Chauhan wrote:
>> +static int sse_pm_notifier(struct notifier_block *nb, unsigned long action,
>> +                          void *data)
>> +{
>> +       WARN_ON_ONCE(preemptible());
>> +
>> +       switch (action) {
>> +       case CPU_PM_ENTER:
>> +               sse_events_mask();
>> +               break;
>> +       case CPU_PM_EXIT:
>> +       case CPU_PM_ENTER_FAILED:
>> +               sse_events_unmask();
>> +               break;
>> +       default:
>> +               return NOTIFY_DONE;
>> +       }
>> +
>> +       return NOTIFY_OK;
>> +}
>> +
>> +static struct notifier_block sse_pm_nb = {
>> +       .notifier_call = sse_pm_notifier,
>> +};
>> +
>> +/*
>> + * Mask all CPUs and unregister all events on panic, reboot or kexec.
>> + */
>> +static int sse_reboot_notifier(struct notifier_block *nb, unsigned long action,
>> +                              void *data)
>> +{
>> +       cpuhp_remove_state(sse_hp_state);
>> +       sse_reset();
> Is this sse_reset required?
> I was running the poweroff command. The CPU teardown function is
> called and events are disabled & unregistered as part of it.
> when sse_reset is called, it again tries to call disable & unregister
> events for all cpus (nolock version). So I see errors from SBI that
> event is in invalid state. Commenting out sse_reset() wo

Hi Himanshu,

Yeah that is useless. I think it was there before you add PM support and
wasn't removed then. I'll remove it.

Thanks,

Clément


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ