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: <a87acfaf-52b5-4234-b928-1b596dd61f31@yandex-team.ru>
Date: Tue, 25 Mar 2025 14:34:03 +0300
From: Maksim Davydov <davydov-max@...dex-team.ru>
To: Ingo Molnar <mingo@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
 den-plotnikov@...dex-team.ru, gpiccoli@...lia.com, mingo@...hat.com,
 bp@...en8.de, dave.hansen@...ux.intel.com, tglx@...utronix.de, hpa@...or.com
Subject: Re: [PATCH] x86/split_lock: simplify reenabling


On 3/25/25 12:25, Ingo Molnar wrote:
> 
> * Maksim Davydov <davydov-max@...dex-team.ru> wrote:
> 
>> sld_setup() is called before setup_per_cpu_areas(), thus it can't be
>> used for this purpose. Another way is to implement independent
>> initcall for the initialization, that's what has been done.
> 
>> + * Per-CPU delayed_work can't be statically initialized properly because
>> + * the struct address is unknown. Thus per-CPU delayed_work structures
>> + * have to be initialized during kernel initialization and after calling
>> + * setup_per_cpu_areas().
>> + */
>> +static int __init setup_split_lock_delayed_work(void)
>> +{
>> +	unsigned int cpu;
>> +
>> +	for_each_possible_cpu(cpu) {
>> +		struct delayed_work *work = per_cpu_ptr(&sl_reenable, cpu);
>> +
>> +		INIT_DELAYED_WORK(work, __split_lock_reenable);
>> +	}
>> +
>> +	return 0;
>> +}
>> +pure_initcall(setup_split_lock_delayed_work);
> 
> Oh, I didn't realize sld_setup() couldn't be used for this - thx for
> the followup!
> 
> 	Ingo

Thanks for reviewing :-)

-- 
Best regards,
Maksim Davydov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ