Received: by 10.213.65.68 with SMTP id h4csp1704137imn; Thu, 29 Mar 2018 09:26:11 -0700 (PDT) X-Google-Smtp-Source: AIpwx487gIcQ/VuLPUxhcsBRPoCgLYiHr9wCh2Kp8Dt85jCe0d9ZyL3nsHz0tDcc0qe55xmt0vN6 X-Received: by 10.99.96.84 with SMTP id u81mr6007440pgb.231.1522340771588; Thu, 29 Mar 2018 09:26:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522340771; cv=none; d=google.com; s=arc-20160816; b=KLsjdx5ACmEycCck4YMyLypfbqYB5eLKs5n/yLKNj1vm50bhb9maPc8hMfDzqohqtE LynLn+ZcOGdcnHXXg5c2xi29YZNBGBE2OHDXMmCxD3UDU1XGVIramiE9hd9ud4C99erD 2zUGiGfRSg49qavkA1dlsxQ1AyERFptdsJTH7U+ZNOxArJSWj2rdWmG/851QFG4QvrZ8 asojEl999rc8T/Z/k7hX9xfi5RXtM0xbOKAb0NiWj5/DTP5FtW9UUujukkjdvh48B0JA zmFpngF54+DlWvwprnTCYq/WNfY0sjWnDsQnmIym4HEtoMHGnBoCLUetkdBCcqXOAjg8 5wpQ== 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=CtxGs4fEPQKR44pnFMfXFpNlKI49Zo2jD72VyAmuZuw=; b=s2dKxLEovwMjLM+Vkpf7s2Vi26ETSPhJmiifsH8SjvdN3xZiPiqWslQlP7K7YfZKiX 2kxlUXu57ehHqQteG5diLSDMHE0ip4BR+5yeWPpelWb7O4udAa01spzpofhjCrd9ODS0 YFCriqT9WJX9wCOEn5o1Kxe2G9tCL/upjRxK76q+74oOaa91Gj+6KGgjU6z72IeAGh6H tCxDz0bqQbjLkU56A1QEVNwk0E18MAAb212bD5junE/DwXV4eeE7YAUfcN5p7AXlicSg q04O78Be4IHLXjfkeXPyzQg96HXoGWnlULAMv+L4ebc8E+6JqGaJHz9woKb2cjX+iAvQ BgsQ== 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 n4si4248067pgt.450.2018.03.29.09.25.56; Thu, 29 Mar 2018 09:26:11 -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 S1752273AbeC2QYt (ORCPT + 99 others); Thu, 29 Mar 2018 12:24:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:56384 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751859AbeC2QYo (ORCPT ); Thu, 29 Mar 2018 12:24:44 -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 4EE8521773; Thu, 29 Mar 2018 16:24:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4EE8521773 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 12:24:39 -0400 From: Steven Rostedt To: Mathieu Desnoyers Cc: Peter Zijlstra , Thomas Gleixner , "Paul E. McKenney" , Boqun Feng , Andy Lutomirski , 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: <20180329122439.4a909c72@gandalf.local.home> In-Reply-To: <544124089.623.1522337940950.JavaMail.zimbra@efficios.com> References: <20180327160542.28457-1-mathieu.desnoyers@efficios.com> <20180328152814.GI4082@hirez.programming.kicks-ass.net> <533214853.56.1522251426819.JavaMail.zimbra@efficios.com> <20180328174935.GK4082@hirez.programming.kicks-ass.net> <181076499.279.1522268382303.JavaMail.zimbra@efficios.com> <87410797.545.1522331641598.JavaMail.zimbra@efficios.com> <20180329142338.GD4043@hirez.programming.kicks-ass.net> <544124089.623.1522337940950.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 11:39:00 -0400 (EDT) Mathieu Desnoyers wrote: > Enforcing SIGSEGV on syscall entry when nested in a rseq critical section > will not be free both in terms of syscall overhead, and in terms of code > maintenance: we'd need to add those checks into entry.S for each architecture > supported, which pretty much doubles the amount of architecture-specific > code we need to implement for rseq. Currently, all we need is to hook in > signal delivery and wire up the system call numbers. Why not have the check on syscall exit? Then we could use the ptrace type mechanism to only go that path when a rseq exists for the program. -- Steve