From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CE1BC76188 for ; Fri, 19 Jul 2019 12:23:30 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 206872082E for ; Fri, 19 Jul 2019 12:23:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=brauner.io header.i=@brauner.io header.b="YA6Eggnr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 206872082E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=brauner.io Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45qqsq4KWgzDqwr for ; Fri, 19 Jul 2019 22:23:27 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=brauner.io (client-ip=2a00:1450:4864:20::441; helo=mail-wr1-x441.google.com; envelope-from=christian@brauner.io; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=brauner.io Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=brauner.io header.i=@brauner.io header.b="YA6Eggnr"; dkim-atps=neutral Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45qqqH6XgxzDqjl for ; Fri, 19 Jul 2019 22:21:15 +1000 (AEST) Received: by mail-wr1-x441.google.com with SMTP id p13so32034790wru.10 for ; Fri, 19 Jul 2019 05:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ZSNxINB1eoSUuwzdj5DoTcqLmEl60Bp0Y1Hgn40sFfw=; b=YA6EggnrFQ6Rx4knXWvUwz2U9x+1SCXFlO09KhemP39oSM5WYZgQ2m/kFVHmUdPaiL Bm1Ggw6zh2v63WBxSukl1wDC7kjbGrKz1ZXMbEgZLoli/r4F13x+dHAZ6rE4Pz2qeley 9tPCOG2cMyDnw62NpBr9grkI92uWPyMgpht0Uw2SLvd9Dz2mAO6avNTIp3+tem/noeAR V4om6zfHYpQNS87JMPrVvHsV4E1J0XeN9bBskUB2432vKBEvTC8+7q2OQdTGZ93iZIvI ohhk/qhXg1mByYO2x65TDsZB/H0HOt+SpMEznQE/4/KLLVO6NYvQR0/hZMhvkRJlJ94I XwzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ZSNxINB1eoSUuwzdj5DoTcqLmEl60Bp0Y1Hgn40sFfw=; b=nxM0yToN55SH8m9r62d5Y3MpGa8c5ur+R3hugu4sSePP1cs2qVigE30ulp71zsrGMb 82JRCrfxfnB7bzJfTxltueJmuaAoxPXkkusyh7cXdgiA4/0K5qizq4Fy87wLz0um3qoi GLrrLqWY6heKLT+rOjVZoN/nykCPpT17ErSGJRMNX/9Ov2IYCFHSXNKiHqpkdkiYAnbR fB/QlUJzYrxqDr4pBMoCk6sb6yeRCcSzjGPwv/76XUWljr71rKKpuyJbsiZ9bC6Q2tBK v151i9i517TM7wKCNnbvBtDr5HXb1JgI4efreB+DX/yJgWSsTg7VICBKqo/MG9ZlUJpR H07A== X-Gm-Message-State: APjAAAU5NMRc+BY7aQG4Rtl1OjyDQgk1UGdtWfsc1KuLGJVObXqqeO/o +54fsYrZrJGZ4jLDIDXXPHU= X-Google-Smtp-Source: APXvYqx9gGrYkCwplFu6XW/mRH357ZdxOoELb3Z3UiLqCzSiDwFdDoevEVdtgUgUKpbiqm5tozaFNg== X-Received: by 2002:adf:f851:: with SMTP id d17mr56545224wrq.77.1563538868448; Fri, 19 Jul 2019 05:21:08 -0700 (PDT) Received: from brauner.io (p5097b50e.dip0.t-ipconnect.de. [80.151.181.14]) by smtp.gmail.com with ESMTPSA id r12sm38324623wrt.95.2019.07.19.05.21.05 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 19 Jul 2019 05:21:07 -0700 (PDT) Date: Fri, 19 Jul 2019 14:20:59 +0200 From: Christian Brauner To: Michael Ellerman Subject: Re: [PATCH 1/2] arch: mark syscall number 435 reserved for clone3 Message-ID: <20190719122058.njbtwy2fbd6xrp2d@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> <871rym8egj.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <871rym8egj.fsf@concordia.ellerman.id.au> User-Agent: NeoMutt/20180716 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, arnd@arndb.de, linux-sh@vger.kernel.org, Heiko Carstens , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, Christian Borntraeger , linux-m68k@lists.linux-m68k.org, linux-alpha@vger.kernel.org, sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Vasily Gorbik Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Jul 19, 2019 at 09:13:16PM +1000, Michael Ellerman wrote: > 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 Sounds good. > > > 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. Excellent! Thank you! Christian