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: <20250226113008.GA8995@redhat.com>
Date: Wed, 26 Feb 2025 12:30:09 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Andrii Nakryiko <andrii@...nel.org>
Cc: linux-trace-kernel@...r.kernel.org, peterz@...radead.org,
	mingo@...nel.org, bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
	jolsa@...nel.org, kernel-team@...a.com,
	Breno Leitao <leitao@...ian.org>
Subject: Re: [PATCH perf/core] uprobes: remove too strict lockdep_assert()
 condition in hprobe_expire()

On 02/25, Andrii Nakryiko wrote:
>
> --- a/kernel/events/uprobes.c
> +++ b/kernel/events/uprobes.c
> @@ -762,10 +762,14 @@ static struct uprobe *hprobe_expire(struct hprobe *hprobe, bool get)
>  	enum hprobe_state hstate;
>
>  	/*
> -	 * return_instance's hprobe is protected by RCU.
> -	 * Underlying uprobe is itself protected from reuse by SRCU.
> +	 * Caller should guarantee that return_instance is not going to be
> +	 * freed from under us. This can be achieved either through holding
> +	 * rcu_read_lock() or by owning return_instance in the first place.
> +	 *
> +	 * Underlying uprobe is itself protected from reuse by SRCU, so ensure
> +	 * SRCU lock is held properly.
>  	 */
> -	lockdep_assert(rcu_read_lock_held() && srcu_read_lock_held(&uretprobes_srcu));
> +	lockdep_assert(srcu_read_lock_held(&uretprobes_srcu));

Reviewed-by: Oleg Nesterov <oleg@...hat.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ