Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp296903ybh; Fri, 2 Aug 2019 23:33:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDbpf0asJsVpvDz1m84qBe9kokl7NqvbQqNcS+X3EQTFty0zQVFKqNmngBHsxlCtvE/q4Q X-Received: by 2002:a17:902:8547:: with SMTP id d7mr137121198plo.171.1564814011807; Fri, 02 Aug 2019 23:33:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564814011; cv=none; d=google.com; s=arc-20160816; b=KV2nDLzlNswh7mHLprUyXsY/H6FlubzckdE07m5DPOUx+xIgZOu+Sx8xEf+ILxF/nQ mcWMdWTP0yCYT+0AaHUJUE0jEOo2ax8XeYomW3zVYmuA35PnDcEoR3YXw1dF1Hpgq4lm SZW3J/qDQiSwuguWF5dqINCZOf08ZU0wdhhH8roKtkHp+avV26yqAGbFzrcNJJBvoKGY dJRpAhQmuiIS8w8y0GgQO2RYewq2k4B2U5yxUZVezG9fwOfYu52lSdqzsQQLgmqyESN+ h7rHWFQR4O8GNld6bC+KZQO5h1lGSH87LGSLaQM0ejn3HHUxL08j4MNjDO5IzdKCR6ei Mmjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=IycbSoYk5b7V8lkB9aLkTECX3VyEXPgVPC8ebdeRhy0=; b=TfuFOc8D4tqDZSp4lXvfCxB6j7++n6MzoSOU1ErQv8d79dFJJ6vgVUsV48ia6jDvWH qraNcPscZGC+JVsrXxD5YwqW3VY2tIi9RfWQrgblPUgGFzoChdfImkn4V2YGhoXMejAQ cfmqatio7xyhCRdzwy9G4KgkSJ2Daw/uh15xQ2voEKZq0k+VozOU1LZAGI8Ka4F0aLyA t92snEjbof1kZRG7x/CriIwhcQZBX+O/HQDqlnXsHGRiqDFDd24/XdQpqjJ6X57kBceA LrWEGKFZklPGQ/o4B6KTDsYr7x0+F7Ev9vr9LX1eg/C9Yv5XEzP9kFtBaQM4I380Tt9W E59g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=O9OEH6Bj; 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 v7si44171083pfb.132.2019.08.02.23.33.15; Fri, 02 Aug 2019 23:33:31 -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=@brauner.io header.s=google header.b=O9OEH6Bj; 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 S2404033AbfHBNCi (ORCPT + 99 others); Fri, 2 Aug 2019 09:02:38 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:35083 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389446AbfHBNCh (ORCPT ); Fri, 2 Aug 2019 09:02:37 -0400 Received: by mail-io1-f65.google.com with SMTP id m24so152014770ioo.2 for ; Fri, 02 Aug 2019 06:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=IycbSoYk5b7V8lkB9aLkTECX3VyEXPgVPC8ebdeRhy0=; b=O9OEH6Bj8CYMK7KM0KFs9tyA/P2LHpHF145h8wg5UV6I+lz/xNUlahcLEl3i29vheB XlslpLIaML9ispCXTHDW9rbYCVW5/B0a2gzhW96VOI4ROcUsSlV1QFKWoEU6eQFIrfMR KrU2iSbjlkzoDypAzcBkgMjJ3IEso02pgaeLTOuRfHWSqmEm7LN8py9NtPf53nzPDnV0 UYFbSnXpX1U9cDRRxqh7g7LTzfnnDZUP8dCoveEoEdWp5+lGHEDkWkCmqrKzsSwwTEKQ oryhwelZaPoP9hDjYI3FGtTdMSnIndCb2OdAPGmHhOWS1fA/FIajP/p5JlEMM5JNVRRK TZsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=IycbSoYk5b7V8lkB9aLkTECX3VyEXPgVPC8ebdeRhy0=; b=nR64wZjY+P0Uj8zSJjPhqzKbXSe88xpSHuhTx299qXFnz5wdT7I/7TxRVLIM35PRXn J0dtOshHDEwhP9xS47jWomtzw3pMIoF2FQAxQw1o7184o1PuX/aDy4dsaBqbEYqlt+k0 RBCRDNU/RGIE8TL6Tithuh3nWL85OzHfZQnDLEMlwURNeeRcLGU8bgWITS66Hbfkqm+X ke1Yej6sq5n6aqel1/Ui/F1zlLkBNBPj6Qt2wyjFJGJZ5T9MUf+VuZNd0Hsl+FrTAnGV rrsc7IMGIvp8g+rtM7XOF4bTD5sTGEwypKvuIHTlZYHtXHrLBBV0j4HeuPFIRXaicHMY +JPw== X-Gm-Message-State: APjAAAWdmfhNFKPB/7iOSmY2367Zcj0paOLp5ApFabM4DYA47g2adS5S YF5f+Ci3WxG3ODlUv2ljDpo= X-Received: by 2002:a5d:8890:: with SMTP id d16mr76293890ioo.274.1564750956954; Fri, 02 Aug 2019 06:02:36 -0700 (PDT) Received: from brauner.io ([162.223.5.78]) by smtp.gmail.com with ESMTPSA id u17sm66939463iob.57.2019.08.02.06.02.35 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 02 Aug 2019 06:02:36 -0700 (PDT) From: Christian Brauner X-Google-Original-From: Christian Brauner Date: Fri, 2 Aug 2019 15:02:35 +0200 To: Oleg Nesterov Cc: Adrian Reber , Christian Brauner , Eric Biederman , Pavel Emelianov , Jann Horn , Dmitry Safonov <0x7f454c46@gmail.com>, linux-kernel@vger.kernel.org, Andrei Vagin , Mike Rapoport , Radostin Stoyanov Subject: Re: [PATCH v2 1/2] fork: extend clone3() to support CLONE_SET_TID Message-ID: <20190802130214.l6vporvni7nnbnif@brauner.io> References: <20190731161223.2928-1-areber@redhat.com> <20190731174135.GA30225@redhat.com> <20190802072511.GD18263@dcbz.redhat.com> <20190802124738.GC20111@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190802124738.GC20111@redhat.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 02, 2019 at 02:47:38PM +0200, Oleg Nesterov wrote: > On 08/02, Adrian Reber wrote: > > > > On Wed, Jul 31, 2019 at 07:41:36PM +0200, Oleg Nesterov wrote: > > > But the main question is how it can really help if ns->level > 0, unlikely > > > CRIU will ever need to clone the process with the same pid_nr == set_tid > > > in the ns->parent chain. > > > > Not sure I understand what you mean. For CRIU only the PID in the PID > > namespace is relevant. > > If it runs "inside" this namespace. But in this case alloc_pid() should > use nr == set_tid only once in the main loop, when i == ns->level. > > It doesn't need to have the same pid_nr in the parent pid namespace. > > And in fact we should not allow criu (or anything else) to control the child's > pid_nr in the parent(s) namespace. This should definitely not be possible! > > Right? > > > > So may be kernel_clone_args->set_tid should be pid_t __user *set_tid_array? > > > Or I missed something ? > > > > Not sure why and how an array would be needed. Could you give me some > > more details why you think this is needed. > > IIURC, criu can restore the process tree along with nested pid namespaces. Hm, I'm not a fan of this array approach... > > how can this patch help in this case? > > But again, perhaps I missed something. I forgot everything about criu. > > Oleg. >