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: <20201008132444.GF9995@redhat.com>
Date:   Thu, 8 Oct 2020 15:24:44 +0200
From:   Oleg Nesterov <oleg@...hat.com>
To:     Jens Axboe <axboe@...nel.dk>
Cc:     linux-kernel@...r.kernel.org, io-uring@...r.kernel.org,
        peterz@...radead.org, tglx@...utronix.de
Subject: Re: [PATCH 2/6] kernel: add task_sigpending() helper

On 10/05, Jens Axboe wrote:
>
> @@ -4447,7 +4447,7 @@ SYSCALL_DEFINE0(pause)
>  		__set_current_state(TASK_INTERRUPTIBLE);
>  		schedule();
>  	}
> -	return -ERESTARTNOHAND;
> +	return task_sigpending(current) ? -ERESTARTNOHAND : -ERESTARTSYS;
>  }
>
>  #endif
> @@ -4462,7 +4462,7 @@ static int sigsuspend(sigset_t *set)
>  		schedule();
>  	}
>  	set_restore_sigmask();
> -	return -ERESTARTNOHAND;
> +	return task_sigpending(current) ? -ERESTARTNOHAND : -ERESTARTSYS;
>  }

Both changes are equally wrong. Why do you think sigsuspend() should ever
return -ERESTARTSYS ?

If get_signal() deques a signal, handle_signal() will restart this syscall
if ERESTARTSYS, this is wrong.

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ