From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9590 Path: news.gmane.org!not-for-mail From: Ingo Molnar Newsgroups: gmane.linux.lib.musl.general,gmane.linux.kernel Subject: Re: Re: [RFC PATCH] x86/vdso/32: Add AT_SYSINFO cancellation helpers Date: Sat, 12 Mar 2016 18:05:09 +0100 Message-ID: <20160312170509.GB1108@gmail.com> References: <20160310111646.GA13102@gmail.com> <20160310164104.GM9349@brightrain.aerifal.cx> <20160310180331.GB15940@gmail.com> <20160310232819.GR9349@brightrain.aerifal.cx> <20160311093347.GA17749@gmail.com> <20160311113914.GD29662@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1457802329 26018 80.91.229.3 (12 Mar 2016 17:05:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Mar 2016 17:05:29 +0000 (UTC) Cc: Andy Lutomirski , Rich Felker , Andy Lutomirski , the arch/x86 maintainers , Linux Kernel Mailing List , Borislav Petkov , "musl@lists.openwall.com" , Andrew Morton , Thomas Gleixner , Peter Zijlstra To: Linus Torvalds Original-X-From: musl-return-9603-gllmg-musl=m.gmane.org@lists.openwall.com Sat Mar 12 18:05:27 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aemyk-0008Gc-Id for gllmg-musl@m.gmane.org; Sat, 12 Mar 2016 18:05:26 +0100 Original-Received: (qmail 22159 invoked by uid 550); 12 Mar 2016 17:05:24 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 22138 invoked from network); 12 Mar 2016 17:05:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dq9PeTBqLlL/dK7mSH+BjGTqH+cxWQ/qDOVuAPxf9Ug=; b=FXNsvSg6N3J14/wmx4GZlh88GithxcSyoG96wD1KYPU+kNnbEax21coEmA+D+47KpR xWmkCJJHp971m0ADp4GhME9j1uU1fsGhcC9/W6LwgVcIquE19a4d7vVs8VQN/UeKrgck IefQZd1wBgO521ie/xlQjKF8AHbMINSKWS38E6Re9NDjF+zlb00kZ1nYmgCWesOKF+xb 5gY5EPTW5GHqM8Cc7jzXh0PLu+Dguh7fa9XOCINWQ2FaJYZv+mpJlmVeK2kqpYl9S75O OirQWm0AWrBI8EqnOzNDK3AwWJy/2+LR4BBfczzCyxnPAjRyPU2/25b/EOBNnd8g6nFQ cS4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=dq9PeTBqLlL/dK7mSH+BjGTqH+cxWQ/qDOVuAPxf9Ug=; b=aJtTum5dP0rU+qpB90ukRrph0CgcHu60uiIo5vbVl5k7GS80z2I+Ox7xjnlbjA8MBv t8deP3eRHickWyBajdy7jeYRdn0ZVkdPaz92nKIZJinhyOIb5MvdXUsSKMV5Dlg+ZFyO 8Vs4U+Wf+0MZcVj+nzZCFNLM5PhLjdpH34Z25PzberXaSPsqVBImCWjj4ld7HVnnGg+r 0DbtA/yXJ/ROW7UE4hDw53RIQVBxNySo0w4m8j26aHSLR0p9Trf33FUrgH1uBewc/FMW 9P2rnvzcNZnQ6qXEDiXHxbScOsHGklcSyRRxaaJOHQ8UctKJZaHD++IM8c557iSy1inU d9hA== X-Gm-Message-State: AD7BkJKprFbXO5cu5rDPtzb8QKC8R6YZoxzDv46M3w9XvR41Jp+XGeXyEaK2jeq55xrzeQ== X-Received: by 10.194.60.44 with SMTP id e12mr15585328wjr.137.1457802312290; Sat, 12 Mar 2016 09:05:12 -0800 (PST) Original-Sender: Ingo Molnar Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:9590 gmane.linux.kernel:2175526 Archived-At: * Linus Torvalds wrote: > On Fri, Mar 11, 2016 at 11:39 AM, Linus Torvalds > 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