Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4827144imm; Fri, 18 May 2018 11:18:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqUGSM92++8PaKgk4vHIAHLsZJIPvHxrYwboK5TIb6aFl0Qajn2HX0Yl9sA/lsMjxQs3Q62 X-Received: by 2002:a65:4b49:: with SMTP id k9-v6mr8191006pgt.369.1526667535956; Fri, 18 May 2018 11:18:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526667535; cv=none; d=google.com; s=arc-20160816; b=uDhKo0xvbZq+GjCxky0Fv9SisSQwf83EjmFoe9RsHKF4wIQBDpZREonuT8JF3FzqmM fXFgLYRlrW3aOxHuv61i2XKSEwOdzbLqptlSBP0JGBEpAu3EIS92wyDSO+FM0P5lIpKa /wowXsg9Wn3FpqLWdifanoYiOOdLxJr3nbczuKYA84BS85GcgSkiADxMvE9nraGCPgc2 Sbkw9oOSN1X1paKJQrBQhx3Ip3g2QGswE6wsKvXY+2mOl8/964k4gwhLckhKr+z21ZH5 BtKluQzbHAziaioE+bZXNiUxWwyv80tu3thu+xtZ7SYP5jw2WmxghZZ5ZnyquE7P+abB 72tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter :arc-authentication-results; bh=csBx8bHcyFxYfbSpkvlXmAfpDxuqrk4p2lNIyba7Qwg=; b=QNfTv4MtpFhdTQ066r1bWUBMrQ2tdC0o6MqJaKHkFjMdww4liTyZwAPGVLT8e7H8dO rICZ25o+xP63jCaGtkZEkVszgL8XLVT+vncTFfBmsJKlyWBrBvF/KinwP9t5HMeXnEWF tSKtdYKgW+g3DJQfE1l7CFtCEeU9dD23OEUQAZcGO7sQBbhJ7IAX0klxqj7W77ofxmWD 8HaM6Vhxnc+Ky6jBtA5DuHU/jWVcQZmWtGF09xHr8N/28lZ2VCmQjmnv/Y2ERxg15/SA WXglWlsKW9EkQHmzwXq5zT+LjUohw2TrIlY6lnESKMGvc4GZg/iQ8FHLOPaMAHRuWR/6 oJsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=Wf2XlopA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2-v6si4777424pgc.588.2018.05.18.11.18.41; Fri, 18 May 2018 11:18:55 -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=pass header.i=@efficios.com header.s=default header.b=Wf2XlopA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751750AbeERSRV (ORCPT + 99 others); Fri, 18 May 2018 14:17:21 -0400 Received: from mail.efficios.com ([167.114.142.138]:44342 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751049AbeERSRT (ORCPT ); Fri, 18 May 2018 14:17:19 -0400 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 9A1491C196C; Fri, 18 May 2018 14:17:18 -0400 (EDT) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id yBvgfqhdQ1eW; Fri, 18 May 2018 14:17:17 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id A7A6A1C1969; Fri, 18 May 2018 14:17:17 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com A7A6A1C1969 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1526667437; bh=csBx8bHcyFxYfbSpkvlXmAfpDxuqrk4p2lNIyba7Qwg=; h=Date:From:To:Message-ID:MIME-Version; b=Wf2XlopAeK3A5UFXk3dyz7V/jYXNToAhdFkcSaIIEk6TTrJ4p1zQhhSsdheY4o/pn BkswVbIB3l0QJrdIiPnatdLW0TNjkD4Pq+xMN1NjhXD/4ncw41EInqTYWme3J+D/wm FR0UrrcisuU/3ELUyNES5hSs2L7FVxYPqpbyBJyiL4Z+T2KJRiON1cLvFppW6NhGtp bfeIz/+eJxt4+5Sn22sJ5QalpYUYqc6X/sCQ238YVxid8Y5RrIyiA5ii28id9uoHzL uAnyhAwuQ2i3Ls0a5Zh7Zq1EbZa4EJd8ygDroHNtlzEx7ghV0NrbxPcYPVsxbzWe3z anqYwc/ifs0vA== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id AzDM7mIiDqcJ; Fri, 18 May 2018 14:17:17 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id 8A19D1C1962; Fri, 18 May 2018 14:17:17 -0400 (EDT) Date: Fri, 18 May 2018 14:17:17 -0400 (EDT) From: Mathieu Desnoyers To: Boqun Feng Cc: Will Deacon , Peter Zijlstra , "Paul E. McKenney" , 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 , Michael Kerrisk , Joel Fernandes , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev Message-ID: <418003803.516.1526667437396.JavaMail.zimbra@efficios.com> In-Reply-To: <1526601043.1338308.1376191416.0444B8C5@webmail.messagingengine.com> References: <20180430224433.17407-1-mathieu.desnoyers@efficios.com> <20180430224433.17407-8-mathieu.desnoyers@efficios.com> <20180516161837.GI12198@hirez.programming.kicks-ass.net> <112970629.1913.1526501596485.JavaMail.zimbra@efficios.com> <20180517011949.GA1121@tardis> <277374719.2144.1526570889798.JavaMail.zimbra@efficios.com> <1526601043.1338308.1376191416.0444B8C5@webmail.messagingengine.com> Subject: Re: [PATCH 07/14] powerpc: Add support for restartable sequences MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.142.138] X-Mailer: Zimbra 8.8.8_GA_2026 (ZimbraWebClient - FF52 (Linux)/8.8.8_GA_2031) Thread-Topic: powerpc: Add support for restartable sequences Thread-Index: 1A7RFRrmRo3xEcnLH0Co3AU++l91gQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On May 17, 2018, at 7:50 PM, Boqun Feng boqun.feng@gmail.com wrote: [...] >> > I think you're right. So we have to introduce callsite to rseq_syscall() >> > in syscall path, something like: >> > >> > diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S >> > index 51695608c68b..a25734a96640 100644 >> > --- a/arch/powerpc/kernel/entry_64.S >> > +++ b/arch/powerpc/kernel/entry_64.S >> > @@ -222,6 +222,9 @@ system_call_exit: >> > mtmsrd r11,1 >> > #endif /* CONFIG_PPC_BOOK3E */ >> > >> > + addi r3,r1,STACK_FRAME_OVERHEAD >> > + bl rseq_syscall >> > + >> > ld r9,TI_FLAGS(r12) >> > li r11,-MAX_ERRNO >> > andi. >> > r0,r9,(_TIF_SYSCALL_DOTRACE|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK) >> > By the way, I think this is not the right spot to call rseq_syscall, because interrupts are disabled. I think we should move this hunk right after system_call_exit. Would you like to implement and test an updated patch adding those calls for ppc 32 and 64 ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com