Received: by 10.213.65.68 with SMTP id h4csp1828062imn; Thu, 29 Mar 2018 11:47:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx482ndUSATvVrXAcQfb3XrsegAM8JkHkQg9oJmMMNiCP1+Ae0bLC91L6VX1bRtSIOn8jzR1w X-Received: by 2002:a17:902:850c:: with SMTP id bj12-v6mr9690076plb.110.1522349266993; Thu, 29 Mar 2018 11:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522349266; cv=none; d=google.com; s=arc-20160816; b=igbSc7zRJbw1GkhACrwnH/HvnLYDWggykaVGji7tFFeQbGkKgJICbF7jQdIF6XAA6c dHK2jOTffzZkIypYC9cYmIDtgVaAo057lh4BsAK5ro1L1fsUpnkL0hs8sXgvGJyZ2EPV 6lVjO1AIzUjo1jIhDS4TFctxgTrNWtwXFGQxVJIIG/NBVSa8hK9/xBp8zvONvdtR5G+6 TkUKGeFiNa69ieIXtmWPUrHNtICU21zjZZ+16mwipW9ytYf84lLqPFETMoI/Vbg1aP3Q LAyBe1Jb3rQc35nP49Kk02ZOyN1Fo4HUX+qHzxMoQh+loBhznPd2aHvZFwjs3VSI5zM4 C7kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=YSls3IHIc4LAKmFmaXu0zi7tJad5ai6hlFZyvgRbOvg=; b=I3VQ2sb0QvD9JsM1vKAuqx2hb4bpoWyA6uz3J+UMK1dHZACiUMefDqtDnp7FmYr7yV QVhXcO7FY64ZqxZJs0Xxm0YVVZgRGrbtlOlbLH9Au8kJ51mfqRyEo2DeN5e8aZwfMnLC SsHjidKIOKyR8w0qywETH32wWQJYODG6PbAvZaDxRsyDW3CWgNRz7TpetBBB1vcDRAPU h696b5lrLnLz05yM6+C6syxvqJ5kgNyswFohT/ucqxto2/Yc/Q5rY+AzahksxFMp2f7N OfmrPwVoFxtw9Sk1PM2x+Blpey6TdLI9sOadcyPQPs4aI42hZFcaZC3DPptl0u8ESx5y buJA== ARC-Authentication-Results: i=1; mx.google.com; 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 b8-v6si6676147plm.590.2018.03.29.11.47.31; Thu, 29 Mar 2018 11:47:46 -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; 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 S1752086AbeC2SqL (ORCPT + 99 others); Thu, 29 Mar 2018 14:46:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:47672 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751147AbeC2SqK (ORCPT ); Thu, 29 Mar 2018 14:46:10 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5932421777; Thu, 29 Mar 2018 18:46:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5932421777 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Thu, 29 Mar 2018 14:46:05 -0400 From: Steven Rostedt To: Mathieu Desnoyers Cc: Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , "Paul E. McKenney" , Boqun Feng , Dave Watson , linux-kernel , linux-api , Paul Turner , Andrew Morton , Russell King , Ingo Molnar , "H. Peter Anvin" , Andrew Hunter , Andi Kleen , Chris Lameter , Ben Maurer , 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: <20180329144605.599a8f46@gandalf.local.home> In-Reply-To: <1657598086.875.1522348516598.JavaMail.zimbra@efficios.com> References: <20180327160542.28457-1-mathieu.desnoyers@efficios.com> <87410797.545.1522331641598.JavaMail.zimbra@efficios.com> <20180329142338.GD4043@hirez.programming.kicks-ass.net> <544124089.623.1522337940950.JavaMail.zimbra@efficios.com> <20180329122439.4a909c72@gandalf.local.home> <21903915.856.1522346553810.JavaMail.zimbra@efficios.com> <20180329140752.12661138@gandalf.local.home> <1657598086.875.1522348516598.JavaMail.zimbra@efficios.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 29 Mar 2018 14:35:16 -0400 (EDT) Mathieu Desnoyers wrote: > ----- On Mar 29, 2018, at 2:07 PM, rostedt rostedt@goodmis.org wrote: > > > On Thu, 29 Mar 2018 14:02:33 -0400 (EDT) > > Mathieu Desnoyers wrote: > > > >> Currently, anyone using ptrace on a process has pretty much given up all > >> hopes of performance. Processes will use rseq to gain performance, not the > >> opposite, so this deterioration will be unwelcome. > > > > The ptrace path has nothing to do with ptrace anymore, and probably be > > hard to notice the performance hit. You simply set a TIF flag, and on > > exit of the syscall it jumps to a path that checks special cases > > (tracing system calls being one of them). It's called the ptrace path > > because ptrace was the first one to use it (I'm guessing, I haven't > > actually looked at the history). > > Last time I checked, it's not only a jump, it's actually saving/restoring > tons of registers. Did this change recently ? > > I use it for LTTng syscall tracing too. My experience so far is that it's really > terribly slow. I've been waiting on Andy Lutomirski to complete his changes in that > area to look into making this faster for syscall tracepoints. This gives us more incentive to help Andy make it faster ;-) -- Steve > > > > > This is used to add any system call checks that are not done during > > normal operation. And this certainly falls under that category. > > I know it's used for stuff like seccomp too. My guess has always been that security > people care much more about robustness than performance. > > Thanks, > > Mathieu > >