Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3501571ybi; Fri, 19 Jul 2019 04:20:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDv0tlCnjO8i7WlIu+3/2CmuulS+vdc5/3KKCn0EVLisH7c9n14O5Akz/0XYi2zTvbzjYf X-Received: by 2002:a17:902:2862:: with SMTP id e89mr56666557plb.258.1563535215799; Fri, 19 Jul 2019 04:20:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563535215; cv=none; d=google.com; s=arc-20160816; b=ceHjSyjJfQB/l7yvE0py56/uzt/BGHj03I9phMCnzFi4il6bPEhfCSD5ok47+FqHG7 MxWtcyruSF+V4QKI70jqdhuDFpH38MEWp7Mw5qQfz5VIAle7g2OwpRKOCUw5zdlGd5kY lxRNp4jucjVvEk3xVidhwvx6w8TJWPGGW1HY4N9eYG9BWBiJqIQlnky/pTCFCUTIq1po ECjNTl4WIBcJFZlnIivAXOIhzauEleSVJpSGrQ0NKg9QDX4P664+HXSKtC1KkhKC+N7L DCd/mH50qap+FuNjGQi1Gdyejd7sto1NTldxiU0ZYfOoE3kJfwLZ9VcRDNS8p057lW3Y gPrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=y7H6DvHXW6blkSNO7I7h4Y4a7EYX3rBOf9zIOqOxSmw=; b=Trw+GAIu1/q/rWOchL7GP//g/YGBpdjvC+w4OE4+3YYaTv8kqJyR1y2Y2+47p4vTn1 5VIdXUYV+w0Hb6iNszjOAhGkrnhYT99nqhYc9zD8H/0N5pz75TjYws5rOaFOa7wFB2KB T6GxinuRs9nFgPZQD25tGlh1g9oBwEBs1HqDsD8O3CplGh6yhjWih69T1Pxr/PtmYbkW Rmi8VXuXWfF3abm5wSA8f+I1wzSI5BAHclGMm5q+NIYvyfbtF0kZ9kdJJwTUGVFyJ3IX yMwHZh6ExfJ6N4+b4JucgtQ/L6TNOw1NfhfcDeH0TgBWGtxvtX5ObqwJoi6hbWHIlBF6 WZTQ== 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 u12si2263497pfh.6.2019.07.19.04.19.57; Fri, 19 Jul 2019 04:20:15 -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 S1727802AbfGSLNZ (ORCPT + 99 others); Fri, 19 Jul 2019 07:13:25 -0400 Received: from ozlabs.org ([203.11.71.1]:56171 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbfGSLNY (ORCPT ); Fri, 19 Jul 2019 07:13:24 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 45qpJt0NJrz9s00; Fri, 19 Jul 2019 21:13:17 +1000 (AEST) From: Michael Ellerman To: Christian Brauner Cc: Christian Borntraeger , linux-kernel@vger.kernel.org, arnd@arndb.de, linux-arch@vger.kernel.org, linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, Vasily Gorbik , Heiko Carstens Subject: Re: [PATCH 1/2] arch: mark syscall number 435 reserved for clone3 In-Reply-To: <20190719102503.tm3ahvkh4rwykmws@brauner.io> References: <20190714192205.27190-1-christian@brauner.io> <20190714192205.27190-2-christian@brauner.io> <20190716130631.tohj4ub54md25dys@brauner.io> <874l3i8h0l.fsf@concordia.ellerman.id.au> <20190719102503.tm3ahvkh4rwykmws@brauner.io> Date: Fri, 19 Jul 2019 21:13:16 +1000 Message-ID: <871rym8egj.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christian Brauner writes: > On Fri, Jul 19, 2019 at 08:18:02PM +1000, Michael Ellerman wrote: >> Christian Brauner writes: >> > On Mon, Jul 15, 2019 at 03:56:04PM +0200, Christian Borntraeger wrote: >> >> I think Vasily already has a clone3 patch for s390x with 435. >> > >> > A quick follow-up on this. Helge and Michael have asked whether there >> > are any tests for clone3. Yes, there will be and I try to have them >> > ready by the end of the this or next week for review. In the meantime I >> > hope the following minimalistic test program that just verifies very >> > very basic functionality (It's not pretty.) will help you test: >> >> Hi Christian, >> >> Thanks for the test. >> >> This actually oopses on powerpc, it hits the BUG_ON in CHECK_FULL_REGS >> in process.c around line 1633: >> >> } else { >> /* user thread */ >> struct pt_regs *regs = current_pt_regs(); >> CHECK_FULL_REGS(regs); >> *childregs = *regs; >> if (usp) >> >> >> So I'll have to dig into how we fix that before we wire up clone3. >> >> Turns out testing is good! :) > > Indeed. I have a test-suite for clone3 in mind and I hope to have it > ready by the end of next week. It's just always the finding the time > part that is annoying. :) I know the feeling! > Thanks for digging into this, Michael! No worries, happy to help where I can. In the intervening five minutes I remembered how we handle this, we just need a little wrapper to save the non-volatile regs: _GLOBAL(ppc_clone3) bl save_nvgprs bl sys_clone3 b .Lsyscall_exit A while back I meant to make it generate those automatically based on a flag in the syscall.tbl but of course haven't got around to it :) So with the above it seems all good: $ ./clone3 ; echo $? Parent process received child's pid 4204 as return value Parent process received child's pidfd 3 Parent process received child's pid 4204 as return argument Child process with pid 4204 0 I'll send a patch to wire it up on Monday. cheers