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: <20241022130134.baf9e1f140b2664dba15d410@kernel.org>
Date: Tue, 22 Oct 2024 13:01:34 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Liao Chang <liaochang1@...wei.com>
Cc: <oleg@...hat.com>, <peterz@...radead.org>, <mingo@...hat.com>,
 <acme@...nel.org>, <namhyung@...nel.org>, <mark.rutland@....com>,
 <alexander.shishkin@...ux.intel.com>, <jolsa@...nel.org>,
 <irogers@...gle.com>, <adrian.hunter@...el.com>,
 <kan.liang@...ux.intel.com>, <linux-kernel@...r.kernel.org>,
 <linux-trace-kernel@...r.kernel.org>, <linux-perf-users@...r.kernel.org>,
 <bpf@...r.kernel.org>
Subject: Re: [PATCH v3 1/2] uprobes: Remove redundant spinlock in
 uprobe_deny_signal()

On Thu, 15 Aug 2024 01:46:28 +0000
Liao Chang <liaochang1@...wei.com> wrote:

> Since clearing a bit in thread_info is an atomic operation, the spinlock
> is redundant and can be removed, reducing lock contention is good for
> performance.
> 

Looks good to me.

Acked-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>

Thanks!

> Acked-by: Oleg Nesterov <oleg@...hat.com>
> Signed-off-by: Liao Chang <liaochang1@...wei.com>
> ---
>  kernel/events/uprobes.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
> index 73cc47708679..76a51a1f51e2 100644
> --- a/kernel/events/uprobes.c
> +++ b/kernel/events/uprobes.c
> @@ -1979,9 +1979,7 @@ bool uprobe_deny_signal(void)
>  	WARN_ON_ONCE(utask->state != UTASK_SSTEP);
>  
>  	if (task_sigpending(t)) {
> -		spin_lock_irq(&t->sighand->siglock);
>  		clear_tsk_thread_flag(t, TIF_SIGPENDING);
> -		spin_unlock_irq(&t->sighand->siglock);
>  
>  		if (__fatal_signal_pending(t) || arch_uprobe_xol_was_trapped(t)) {
>  			utask->state = UTASK_SSTEP_TRAPPED;
> -- 
> 2.34.1
> 
> 


-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ