Received: by 10.213.65.68 with SMTP id h4csp596318imn; Wed, 28 Mar 2018 09:11:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Cncaxx0daHdnhMoHLHNZ3Cap8LZLuXzo0P6jAOAo2adiP8UHCIldf78SnUlAcG/s88sy7 X-Received: by 2002:a17:902:bd05:: with SMTP id p5-v6mr4409233pls.137.1522253469877; Wed, 28 Mar 2018 09:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522253469; cv=none; d=google.com; s=arc-20160816; b=slsONibmHEIajwwsRKpVIEds4zzZx5WlflB2ZQePmFFI00cF+uWnZigZgnMYYds+FJ PSo+02F5VAL/bN6aa3ITNVq1dE+L91W47OlgK40wA5SxhIHTPsZ3uzh+INKwI1PNQiKN 9yadzUSLzcBAz1Oz3XXeLAQ0NafEUsjrldifO1R8luZAI+S14RLlKMssK1p7oKJ0Opye 3YrAcKj99VOMupQbKVpL5iFqVPgqiCPfPDCnLfLDPIhxlx37Thr3vEAIuPonZEtdScss k7DAytg6o7K5Fx4rMoaqHYaVO2aF/UXeChg/fb82cIIpeEk5gpZs1KkyDHnfFvEddtb4 RTqA== 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=vAmp9v2IRofjOyI3vnKDtRSZLN4ZJg677hIKBaeRYac=; b=mACG2QjT94hNdmEqvggkEY4i1XeLRVk54epDJjZBMauWCmTTyZDrFkuwqTisE0nChu I555t7WPQmCW/BonzL3xcryAPMaXoAZLTYF+WnP68uQ7KOFbn5d8awD/iJh/fZI1XjhQ 4tMORcAQeuJM2ILtlL51+ohIh/PSZkWgHl5dgHeeKHn8rFsRLJUjefMUQqZtbr63Z9E4 /lhqGsc/MLq6wBM439i7141Ia9/xa5Jp3sT5qZ9UM0BCLbhl48DMAzEBO/G4CYHk2Wv1 wl4NndJndVOGcmvPjECLgj6JB76/OJXSHnXldW/rhCgJClvamzKLSDewqjGursbw6neX J63Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=YvPO3PM2; 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 t21si2966021pfe.353.2018.03.28.09.10.55; Wed, 28 Mar 2018 09:11:09 -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=merlin.20170209 header.b=YvPO3PM2; 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 S1753999AbeC1P2l (ORCPT + 99 others); Wed, 28 Mar 2018 11:28:41 -0400 Received: from merlin.infradead.org ([205.233.59.134]:56390 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753511AbeC1P2i (ORCPT ); Wed, 28 Mar 2018 11:28:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=vAmp9v2IRofjOyI3vnKDtRSZLN4ZJg677hIKBaeRYac=; b=YvPO3PM27CikbyvEbSss27KZb 9fq+qhD+YrTmIm3XCIEcp7VL54LwED6lQXb4D1/RyyWS8rgBSwD5ZyABQ9JEmENbs97TvfoXuApwE CEfo04ZaicLzdB0VODzZSqUbVWEY3mIp4a6ExVZDzChOOVTskWrODLDcNjtNqLphjDhGgosPqnG9C 1Tdwq8nMvOIaXgFD6VR/sv0sY+72cuhNDj4HnX2Sg7fa3pB5kTDrjaz4akO4UGAgK0I7IM6u3nBQ0 3PCnHgtmnsGpiIL0hxH/lFvbs2cVSSp1N8mwc9sWjfYfu7gnsBnHXCq24Jiz3lDmOiF4NNoGPjQxa HKpspSG9w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1f1Czn-00030c-EZ; Wed, 28 Mar 2018 15:28:15 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 323D520298BAC; Wed, 28 Mar 2018 17:28:14 +0200 (CEST) Date: Wed, 28 Mar 2018 17:28:14 +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: <20180328152814.GI4082@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <265889560.1.1522250045589.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: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. > How would you handle signal handlers that issue system calls while nested > on top of a rseq critical section in the userspace thread ? SIGSEGV on > SYSCALLs will break this case. Have the rseq thing aborted prior to delivering the signal ?