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: <A3258B497F1C1441AD36A2E8B45FD62860C334@scsmsx412.amr.corp.intel.com>
Date:	Thu, 26 Jul 2007 14:12:50 -0700
From:	"Agarwal, Lomesh" <lomesh.agarwal@...el.com>
To:	"Manfred Spraul" <manfred@...orfullife.com>,
	"Pavel Machek" <pavel@....cz>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>, <linux-kernel@...r.kernel.org>,
	"Nigel Cunningham" <nigel@...el.suspend2.net>
Subject: RE: which signal is sent to freeze process?

This patch works for me too.

-----Original Message-----
From: Manfred Spraul [mailto:manfred@...orfullife.com] 
Sent: Tuesday, July 24, 2007 11:49 AM
To: Pavel Machek
Cc: Rafael J. Wysocki; linux-kernel@...r.kernel.org; Agarwal, Lomesh;
Nigel Cunningham
Subject: Re: which signal is sent to freeze process?

> Hi!
>
> Can you generate small testcase that demonstrates the problem?
>
> > Then what would be the correct way to handle resume process. The
other
> > way of course is to make all the applications check the errno in
case of
> > failure. But that seems more more problematic then system call
checking.
> > What do you say?
>
> Hmm, does that testcase behave correctly over SIGSTOP/SIGCONT? I'm not
> saying kernel behaves nicely here, but perhaps fixing the apps to
> check errno properly is the right thing to do? :-)
Perhaps the kernel should use ERESTARTNOHAND instead of EINTR?
The current code is more than odd:
- select() and sys_ppoll() both use ERESTARTNOHAND (i.e.: 
the functions do not return to user space with SIGSTOP/SIGCONT or
freezer())

- sys_poll() uses EINTR (i.e.: SIGSTOP/SIGCONT/freezer() return to user
space)

Attached is a patch that switches sys_poll to ERESTARTNOHAND and a poll
test app.
Boot tested with FC6.

What do you think? With ERESTARTNOHAND, poll would only return to user
space if the app has a SIGCONT handler installed.

--
	Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ