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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 12 Feb 2024 16:19:19 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Marcelo Tosatti <mtosatti@...hat.com>, linux-kernel@...r.kernel.org
Cc: Daniel Bristot de Oliveira <bristot@...nel.org>, Juri Lelli
 <juri.lelli@...hat.com>, Valentin Schneider <vschneid@...hat.com>,
 Frederic Weisbecker <frederic@...nel.org>, Leonardo Bras
 <leobras@...hat.com>, Peter Zijlstra <peterz@...radead.org>, Marcelo
 Tosatti <mtosatti@...hat.com>
Subject: Re: [patch 11/12] x86/resctrl: use smp_call_function_single_fail

On Tue, Feb 06 2024 at 15:49, Marcelo Tosatti wrote:
> Convert update_task_closid_rmid from smp_call_function_single
> to smp_call_func_single_fail, which will fail in case
> the target CPU is tagged as block interference CPU.

You fail again to provide a rationale for this change.

What's worse is that you fail to explain why you think that creating
inconistent state is a valid approach.

> Signed-off-by: Marcelo Tosatti <mtosatti@...hat.com>
>
> Index: linux-isolation/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> ===================================================================
> --- linux-isolation.orig/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> +++ linux-isolation/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> @@ -26,6 +26,7 @@
>  #include <linux/slab.h>
>  #include <linux/task_work.h>
>  #include <linux/user_namespace.h>
> +#include <linux/sched/isolation.h>
>  
>  #include <uapi/linux/magic.h>
>  
> @@ -551,12 +552,20 @@ static void _update_task_closid_rmid(voi
>  		resctrl_sched_in(task);
>  }
>  
> -static void update_task_closid_rmid(struct task_struct *t)
> +static int update_task_closid_rmid(struct task_struct *t)
>  {
> -	if (IS_ENABLED(CONFIG_SMP) && task_curr(t))
> -		smp_call_function_single(task_cpu(t), _update_task_closid_rmid, t, 1);
> -	else
> +	int idx, ret = 0;
> +
> +	if (IS_ENABLED(CONFIG_SMP) && task_curr(t)) {
> +		idx = block_interf_srcu_read_lock();
> +		ret = smp_call_function_single_fail(task_cpu(t),
> +						    _update_task_closid_rmid,
> +						    t, 1);
> +		block_interf_srcu_read_unlock(idx);
> +	} else
>  		_update_task_closid_rmid(t);
> +
> +	return ret;

This is invoked _after_ the change has been committed to the in-memory
state so how is failing here correct?

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ