Received: by 10.213.65.68 with SMTP id h4csp685623imn; Wed, 28 Mar 2018 10:52:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/LDP4zT5Br0TvCh6V5fHqvFB2dOYWxsF5PwiFw8KnblhUuYpkQHmWIvUJdkVG3NDkxbxWZ X-Received: by 10.98.253.17 with SMTP id p17mr3713942pfh.105.1522259552481; Wed, 28 Mar 2018 10:52:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522259552; cv=none; d=google.com; s=arc-20160816; b=CqMwV7DXjtOcvuI65DCjMa3d+yWIeq208cWtL2NBhhsHyvXoXbHlZxlxIPqFIX2c+R pdM1z8pwsgqapEP+HyA+RzKTKrhT0MpDZAJDMwTiPfPgqsiKv7doQvowiaKI/56PFdOG 5tUDZrotzmYqCmBbPdzrz/vX0yP989nYsv4IIpTV1vVZmHgiYfkhuQPz43JgHU5NjHD5 Fup77fJskp0KnqOCWN4OJASN7b694cHWbq94cVgCGS2NkNrRkAM59G4l68vQEh9te5zp SamHPp+TFBp0IFDUag+mNpCABF8HIlqwXQAVI/U8dmvxRtSVq7wdKKosJs1Cg4maKJpr eTkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=hAJUxPo/JONrfOth3hrs/XRjTpAo14XaWfZUwykYBz4=; b=HOc045fKAw+7W7Dz7if3D5dahumOGz17IVfEjCf4PqNt/+UJbVIZ1oFMEpM6Or1T8i KSY58dOhUwnSbqC2l983xKLs6OHhSbB6yFctEcBqN26jJyHunWSdMG0ieYXfZLHGPk2N Q0JaeIo1smhyZ5MPdFsGtr6dLrQ6ddRGB1NYSnRfOHJk7EemRvYfxbLNSmcDjKoB2w6w QcVtybtu92cV5RclmvCM7VCMspehztln4N/uwG1eVJ+UjbtE3/mUfYV/ym/V5+jv9grE mR3j5lDCdxclxe7dhICZ8e9BYTY0oIMf+UpHfxbI3n4qo5uW6IRq4mzZUr9rQtk5zRzz +HAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ZwVxv/EM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bd7-v6si3895192plb.404.2018.03.28.10.52.18; Wed, 28 Mar 2018 10:52:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ZwVxv/EM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752995AbeC1RuF (ORCPT + 99 others); Wed, 28 Mar 2018 13:50:05 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:41776 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752831AbeC1RuC (ORCPT ); Wed, 28 Mar 2018 13:50:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hAJUxPo/JONrfOth3hrs/XRjTpAo14XaWfZUwykYBz4=; b=ZwVxv/EMfw/nQUBearDzwVJyg OyZjWAEwtCclf3TLJclc7eA1kpLSkIVYBJBwnm2QhFEHfkA3vAPmlBdxnVPerAh9I6Ptc2NtwsHhB AhX/WnHZXQxgy/wEwMo2V24IshsKu0sqPKPP9RJ9GH6A+RdfbmfDmu82sSJqBEPBS3GUitsgEjtpI n1VWP98SAISP3nkWY/T1ntgzZO5YZtDo/pMu0dBSLkpVDOlRbcvoeVsRpdXFqdLES1MjLWGBHaqM7 hFOjQu7pAERqOqLypKjDWBOHkoZBkLjFtvj7dWdfo4xv6TpJkD21aeMcxim1/fwcraodiX8Vt9HPr Cf3IuIumg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1f1FCa-0002JI-JJ; Wed, 28 Mar 2018 17:49:36 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1BB5820298BAC; Wed, 28 Mar 2018 19:49:35 +0200 (CEST) Date: Wed, 28 Mar 2018 19:49:35 +0200 From: Peter Zijlstra To: Mathieu Desnoyers Cc: "Paul E. McKenney" , Boqun Feng , Andy Lutomirski , Dave Watson , linux-kernel , linux-api , Paul Turner , Andrew Morton , Russell King , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andrew Hunter , Andi Kleen , Chris Lameter , Ben Maurer , rostedt , Josh Triplett , Linus Torvalds , Catalin Marinas , Will Deacon , Michael Kerrisk , Alexander Viro Subject: Re: [RFC PATCH for 4.17 02/21] rseq: Introduce restartable sequences system call (v12) Message-ID: <20180328174935.GK4082@hirez.programming.kicks-ass.net> References: <20180327160542.28457-1-mathieu.desnoyers@efficios.com> <20180327160542.28457-3-mathieu.desnoyers@efficios.com> <20180328125004.GV4043@hirez.programming.kicks-ass.net> <1523662633.2105.1522248474778.JavaMail.zimbra@efficios.com> <20180328145946.GH4082@hirez.programming.kicks-ass.net> <265889560.1.1522250045589.JavaMail.zimbra@efficios.com> <20180328152814.GI4082@hirez.programming.kicks-ass.net> <533214853.56.1522251426819.JavaMail.zimbra@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <533214853.56.1522251426819.JavaMail.zimbra@efficios.com> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 28, 2018 at 11:37:06AM -0400, Mathieu Desnoyers wrote: > ----- On Mar 28, 2018, at 11:28 AM, Peter Zijlstra peterz@infradead.org wrote: > > > On Wed, Mar 28, 2018 at 11:14:05AM -0400, Mathieu Desnoyers wrote: > > > >> > If at all possible I would make it SIGSEGV when issueing SYSCALL()s from > >> > within an RSEQ. > >> > >> What's the goal there ? rseq critical sections can technically do system calls > >> if they wish. Why prevent this ? > > > > This all started as a way to do 'small' _fast_ per-cpu ops, System calls > > do NOT fit in that pattern. If you're willing to do a system calls the > > cost of atomics is not a problem. > > I'm not arguing that a typical rseq would do a system call. I'm merely > pointing out that if we start putting arbitrary limitations like "SIGSEGV > when a fork or system call is encountered on top of rseq", this will cause > pain in user-space. I don't think disallowing system calls is arbitrary. And I think that is something we really want to enforce, because it's batshit insane to allow. And if we allow now, people _will_ use it and we can't ever take it away again.