Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 12 Mar 2016 18:05:09 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Andy Lutomirski <luto@...capital.net>, Rich Felker <dalias@...c.org>,
	Andy Lutomirski <luto@...nel.org>,
	the arch/x86 maintainers <x86@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Borislav Petkov <bp@...en8.de>,
	"musl@...ts.openwall.com" <musl@...ts.openwall.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: Re: [RFC PATCH] x86/vdso/32: Add AT_SYSINFO cancellation
 helpers


* Linus Torvalds <torvalds@...ux-foundation.org> wrote:

> On Fri, Mar 11, 2016 at 11:39 AM, Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
> >
> >  "An implementation may also mark other functions not specified in the
> > standard as cancellation  points"
> 
> .. but that was from the Linux man-page. The open group has
> 
>  "An implementation shall not introduce cancellation points into any
> other functions specified in this volume of POSIX.1-2008"
> 
> So yeah, it looks like there would need to be some way to filter things.
> 
> Oh well.

Is this really a big problem? Signals are asynchronous anyway, so if a C library 
uses signal delivery for cancellation, it has to be ready to get the signal 
delivered in the 'wrong' moment, for the wrong system call. The system call has to 
be restarted in that case - or the interruption result has to be returned.

The _cancellation_ itself will then still be executed during the next suitable 
cancellation point: which will be before doing the next cancellable system call 
(or libc API).

So I think it can still all be made work with SA_SYNCHRONOUS.

It would only be a show stopper if Linux didn't cover all required system calls. 
Covering _more_ system calls is not a problem AFAICS. But I might be missing 
something ...

Thanks,

	Ingo

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.