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]
Message-ID: <87h68u26cj.ffs@tglx>
Date: Tue, 29 Oct 2024 17:59:08 +0100
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 16/26] signal: Replace resched_timer logic

On Tue, Oct 29 2024 at 17:04, Frederic Weisbecker wrote:
> Le Tue, Oct 01, 2024 at 10:42:21AM +0200, Thomas Gleixner a écrit :
>> @@ -604,19 +604,19 @@ static int __dequeue_signal(struct sigpe
>>   */
>>  int dequeue_signal(sigset_t *mask, kernel_siginfo_t *info, enum pid_type *type)
>>  {
>> +	struct sigqueue *timer_sigq = NULL;
>>  	struct task_struct *tsk = current;
>> -	bool resched_timer = false;
>>  	int signr;
>>  
>>  	lockdep_assert_held(&tsk->sighand->siglock);
>>  
>>  again:
>>  	*type = PIDTYPE_PID;
>> -	signr = __dequeue_signal(&tsk->pending, mask, info, &resched_timer);
>> +	signr = __dequeue_signal(&tsk->pending, mask, info, &timer_sigq);
>>  	if (!signr) {
>>  		*type = PIDTYPE_TGID;
>>  		signr = __dequeue_signal(&tsk->signal->shared_pending,
>> -					 mask, info, &resched_timer);
>> +					 mask, info, &timer_sigq);
>>  
>>  		if (unlikely(signr == SIGALRM))
>>  			posixtimer_rearm_itimer(tsk);
>> @@ -642,8 +642,8 @@ int dequeue_signal(sigset_t *mask, kerne
>>  		current->jobctl |= JOBCTL_STOP_DEQUEUED;
>>  	}
>>  
>> -	if (IS_ENABLED(CONFIG_POSIX_TIMERS) && unlikely(resched_timer)) {
>> -		if (!posixtimer_deliver_signal(info))
>> +	if (IS_ENABLED(CONFIG_POSIX_TIMERS) && unlikely(timer_sigq)) {
>> +		if (!posixtimer_deliver_signal(info, timer_sigq))
>>  			goto again;
>
> If the signal has been refused, it goes goto again without clearing
> timer_sigq.

That's right. timer_sigq needs to be set to NULL after again:

Good catch!

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ