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]
Message-ID: <87zf5vjctv.ffs@tglx>
Date: Fri, 30 Jan 2026 17:16:12 +0100
From: Thomas Gleixner <tglx@...nel.org>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, LKML
 <linux-kernel@...r.kernel.org>
Cc: Ihor Solodrai <ihor.solodrai@...ux.dev>, Shrikanth Hegde
 <sshegde@...ux.ibm.com>, Peter Zijlstra <peterz@...radead.org>, Michael
 Jeanson <mjeanson@...icios.com>
Subject: Re: [patch 2/4] sched/mmcid: Protect transition on weakly ordered
 systems

On Fri, Jan 30 2026 at 10:36, Mathieu Desnoyers wrote:
> On 2026-01-29 16:20, Thomas Gleixner wrote:
> [...]
>>   
>> -static void mm_cid_fixup_tasks_to_cpus(void)
>> +static void mm_cid_do_fixup_tasks_to_cpus(struct mm_struct *mm)
>>   {
>> -	struct mm_struct *mm = current->mm;
>>   	struct task_struct *p, *t;
>>   	unsigned int users;
>>   
>> @@ -10590,6 +10598,15 @@ static void mm_cid_fixup_tasks_to_cpus(v
>>   	}
>>   }
>>   
>> +static void mm_cid_fixup_tasks_to_cpus(void)
>> +{
>> +	struct mm_struct *mm = current->mm;
>> +
>> +	mm_cid_do_fixup_tasks_to_cpus(mm);
>> +	/* Clear the transition bit in the mode */
>> +	WRITE_ONCE(mm->mm_cid.mode, MM_CID_ONCPU);
>
> I'm missing something here. Why not just move this write once
> to the end of cid_fixup_tasks_to_cpus ? Why the "do" wrapper
> that has a single caller ?

because do_fixup() has a pile of return points and the wrapper avoids
the otherwise required goto mess.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ