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: <87tt8phw61.ffs@tglx>
Date: Thu, 20 Feb 2025 09:12:22 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Eric Dumazet <edumazet@...gle.com>, Anna-Maria Behnsen
 <anna-maria@...utronix.de>, Frederic Weisbecker <frederic@...nel.org>
Cc: linux-kernel <linux-kernel@...r.kernel.org>, Benjamin Segall
 <bsegall@...gle.com>, Eric Dumazet <eric.dumazet@...il.com>, Eric Dumazet
 <edumazet@...gle.com>
Subject: Re: [PATCH V2 2/4] posix-timers: Initialise timer->it_id in
 posix_timer_add()

On Wed, Feb 19 2025 at 12:55, Eric Dumazet wrote:
> A timer is visible only when both timer->signal and timer->i_id
> are set to their final values.
>
> We can initialize timer->it_id sooner.

This changelog tells nothing. What is this fixing, why is it required to
initialize this sooner?

We can... We also can not ... Aside of that please write changelogs in
imperative mood as Documentation asks for.

> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> ---
>  kernel/time/posix-timers.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
> index 204a351a2fd3..1f73ea955756 100644
> --- a/kernel/time/posix-timers.c
> +++ b/kernel/time/posix-timers.c
> @@ -114,6 +114,7 @@ static int posix_timer_add(struct k_itimer *timer)
>  
>  		spin_lock(&hash_lock);
>  		if (!__posix_timers_find(head, sig, id)) {
> +			timer->it_id = (timer_t)id;
>  			hlist_add_head_rcu(&timer->t_hash, head);
>  			spin_unlock(&hash_lock);
>  			return id;
> @@ -407,8 +408,7 @@ static int do_timer_create(clockid_t which_clock, struct sigevent *event,
>  
>  	/*
>  	 * Add the timer to the hash table. The timer is not yet valid
> -	 * because new_timer::it_signal is still NULL. The timer id is also
> -	 * not yet visible to user space.

Even with this change the timer ID is not yet visible to user space
because it has not yet been copied back ....

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ