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]
Date:   Thu, 8 Oct 2020 16:27:53 +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 4/6] kernel: add support for TIF_NOTIFY_SIGNAL

On 10/08, Jens Axboe wrote:
>
> On 10/8/20 7:53 AM, Oleg Nesterov wrote:
> >> --- a/kernel/entry/kvm.c
> >> +++ b/kernel/entry/kvm.c
> >> @@ -8,6 +8,9 @@ static int xfer_to_guest_mode_work(struct kvm_vcpu *vcpu, unsigned long ti_work)
> >>  	do {
> >>  		int ret;
> >>
> >> +		if (ti_work & _TIF_NOTIFY_SIGNAL)
> >> +			tracehook_notify_signal();
> >
> > Can't really comment this change, but to me it would be more safe to
> > simply return -EINTR.
> >
> > Or perhaps even better, treat _TIF_NOTIFY_SIGNAL and _TIF_SIGPENDING
> > equally:
> >
> > 	-	if (ti_work & _TIF_SIGPENDING) {
> > 	+	if (ti_work & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) {
> > 			kvm_handle_signal_exit(vcpu);
> > 			return -EINTR;
>
> Not sure I follow your logic here. Why treat it any different than
> NOTIFY_RESUME from this perspective?

Ah, good point, I din't notice that xfer_to_guest_mode_work() handles
TIF_NOTIFY_RESUME.

Thanks, then I think this change is fine.

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ