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]
Date: Wed, 22 May 2024 17:09:20 +0100
From: Joao Martins <joao.m.martins@...cle.com>
To: Ankur Arora <ankur.a.arora@...cle.com>
Cc: catalin.marinas@....com, will@...nel.org, tglx@...utronix.de,
        mingo@...hat.com, bp@...en8.de, x86@...nel.org, hpa@...or.com,
        pbonzini@...hat.com, wanpengli@...cent.com, vkuznets@...hat.com,
        rafael@...nel.org, daniel.lezcano@...aro.org, peterz@...radead.org,
        arnd@...db.de, lenb@...nel.org, mark.rutland@....com,
        harisokn@...zon.com, boris.ostrovsky@...cle.com,
        konrad.wilk@...cle.com, linux-kernel@...r.kernel.org,
        linux-pm@...r.kernel.org, kvm@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 4/9] cpuidle-haltpoll: define arch_haltpoll_supported()

On 30/04/2024 19:37, Ankur Arora wrote:
> From: Joao Martins <joao.m.martins@...cle.com>
> 
> Right now kvm_para_has_hint(KVM_HINTS_REALTIME) is x86 only. In
> pursuit of making cpuidle-haltpoll architecture independent, define
> arch_haltpoll_supported() which handles the architectural check for
> enabling haltpoll.
> 
> Move the (kvm_para_available() && kvm_para_has_hint(KVM_HINTS_REALTIME))
> check to the x86 specific arch_haltpoll_supported().
> 
> Signed-off-by: Joao Martins <joao.m.martins@...cle.com>
> Signed-off-by: Mihai Carabas <mihai.carabas@...cle.com>
> Signed-off-by: Ankur Arora <ankur.a.arora@...cle.com>
> 
> ---
> Changelog:
> 
>   - s/arch_haltpoll_want/arch_haltpoll_supported/


I am not sure it's correct to call supported() considering that it's supposed to
always supported (via WFE or cpu_relax()) and it's not exactly what it is doing.
The function you were changing is more about whether it's default enabled or
not. So I think the old name in v4 is more appropriate i.e. arch_haltpoll_want()

Alternatively you could have it called arch_haltpoll_default_enabled() though
it's longer/verbose.

Though if you want a true supported() arch helper *I think* you need to make a
bigger change into introducing arch_haltpoll_supported() separate from
arch_haltpoll_want() where the former would ignore the .force=y modparam and
never be able to load if a given feature wasn't present e.g. prevent arm64
haltpoll loading be conditioned to arch_timer_evtstrm_available() being present.
Though I don't think that you want this AIUI

	Joao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ