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: <87o7396fxl.ffs@tglx>
Date: Thu, 24 Oct 2024 10:52:38 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Frederic Weisbecker <frederic@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Anna-Maria Behnsen
 <anna-maria@...utronix.de>, John Stultz <jstultz@...gle.com>, Peter
 Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>, Stephen
 Boyd <sboyd@...nel.org>, Eric Biederman <ebiederm@...ssion.com>, Oleg
 Nesterov <oleg@...hat.com>
Subject: Re: [patch V5 08/26] posix-timers: Make signal delivery consistent

On Mon, Oct 21 2024 at 16:40, Frederic Weisbecker wrote:
> Le Tue, Oct 01, 2024 at 10:42:10AM +0200, Thomas Gleixner a écrit :
>> --- a/kernel/time/posix-timers.c
>> +++ b/kernel/time/posix-timers.c
>> @@ -269,7 +269,10 @@ bool posixtimer_deliver_signal(struct ke
>>  	if (!timr)
>>  		goto out;
>>  
>> -	if (timr->it_interval && timr->it_signal_seq == info->si_sys_private) {
>> +	if (timr->it_signal_seq != info->si_sys_private)
>> +		goto out_unlock;
>> +
>> +	if (timr->it_interval && timr->it_status == POSIX_TIMER_REQUEUE_PENDING) {
>
> Can it be something else than POSIX_TIMER_REQUEUE_PENDING actually?
> And if not, should it be a WARN_ON() ?

Good point. It should not be anything else than pending.

>>  		timr->kclock->timer_rearm(timr);
>>  
>>  		timr->it_status = POSIX_TIMER_ARMED;
>> @@ -281,6 +284,7 @@ bool posixtimer_deliver_signal(struct ke
>>  	}
>>  	ret = true;
>>  
>> +out_unlock:
>>  	unlock_timer(timr, flags);
>>  out:
>>  	spin_lock(&current->sighand->siglock);
>> @@ -293,19 +297,19 @@ bool posixtimer_deliver_signal(struct ke
>>  int posix_timer_queue_signal(struct k_itimer *timr)
>>  {
>>  	enum posix_timer_state state = POSIX_TIMER_DISARMED;
>> -	int ret, si_private = 0;
>>  	enum pid_type type;
>> +	int ret;
>>  
>>  	lockdep_assert_held(&timr->it_lock);
>>  
>>  	if (timr->it_interval) {
>> +		timr->it_signal_seq++;
>
> Is the increment here is still needed then, since it's done
> from del and set?

Probably not. Let me stare at it.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ