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: <20240724102217.GBZqDV2cd_wADGLJoR@fat_crate.local>
Date: Wed, 24 Jul 2024 12:22:17 +0200
From: Borislav Petkov <bp@...en8.de>
To: Frederic Weisbecker <frederic@...nel.org>,
	Narasimhan V <Narasimhan.V@....com>
Cc: linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org,
	Anna-Maria Behnsen <anna-maria@...utronix.de>,
	Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org
Subject: Re: [tip: timers/urgent] timers/migration: Move hierarchy setup into
 cpuhotplug prepare callback

On Mon, Jul 22, 2024 at 03:16:20PM +0200, Frederic Weisbecker wrote:
> diff --git a/kernel/time/timer_migration.c b/kernel/time/timer_migration.c
> index fae04950487f..8d57f7686bb0 100644
> --- a/kernel/time/timer_migration.c
> +++ b/kernel/time/timer_migration.c
> @@ -1673,6 +1673,15 @@ static int tmigr_setup_groups(unsigned int cpu, unsigned int node)
>  
>  		lvllist = &tmigr_level_list[top];
>  		if (group->num_children == 1 && list_is_singular(lvllist)) {
> +			/*
> +			 * The target CPU must never do the prepare work, except
> +			 * on early boot when the boot CPU is the target. Otherwise
> +			 * it may spuriously activate the old top level group inside
> +			 * the new one (nevertheless whether old top level group is
> +			 * active or not) and/or release an uninitialized childmask.
> +			 */
> +			WARN_ON_ONCE(cpu == raw_smp_processor_id());
> +
>  			lvllist = &tmigr_level_list[top - 1];
>  			list_for_each_entry(child, lvllist, list) {
>  				if (child->parent)
> @@ -1705,14 +1714,6 @@ static int tmigr_cpu_prepare(unsigned int cpu)
>  	struct tmigr_cpu *tmc = per_cpu_ptr(&tmigr_cpu, cpu);
>  	int ret = 0;
>  
> -	/*
> -	 * The target CPU must never do the prepare work. Otherwise it may
> -	 * spuriously activate the old top level group inside the new one
> -	 * (nevertheless whether old top level group is active or not) and/or
> -	 * release an uninitialized childmask.
> -	 */
> -	WARN_ON_ONCE(cpu == raw_smp_processor_id());
> -
>  	/* Not first online attempt? */
>  	if (tmc->tmgroup)
>  		return ret;

That fixes the issue as confirmed by Narasimhan.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ