Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6402998ybx; Mon, 11 Nov 2019 08:35:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzCKvCg68Ze8XPOXb5z8CqC2CQ0REVggOEFIJIHgqT8CVtC+WNGH38dnraoObO8Vlg8Z4ea X-Received: by 2002:a50:de06:: with SMTP id z6mr27838819edk.279.1573490149030; Mon, 11 Nov 2019 08:35:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573490149; cv=none; d=google.com; s=arc-20160816; b=RI9hS/hK7VrsWEeT8im4nsUZ91/9hoXSR8LCNuxoHpBMCJJ4Kg+BJx6NSlQX8n3KFn Tcfzp/ZEGpZgMx6kAIf5wpv0yjT1c2CViOqU53vsoIt4dDigqqkShrDR9YxmZ7CzQspm mk3LfHbnxpFwlYpITV40Hd4GBQnRiKCaDDtP8P/otC7VNlnY6i16YzCzYxAFE7P+Dpdi sq4b89aZBOqR2v2hCKcagGTNG9UrfBngERW7WkEyBrn3endG0+AhZSJPjEITOPmI2aQs zP0QbJ1E03JsIg51i3RL23BCbMw1Fb0JT0ekB5FKD49woM2TYSonsqH+NGSWDU3hSi8D 2MQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:user-agent:in-reply-to:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LqK12N2BhrocKRvl7cMiEaZz6qD/oH8PM0mBXIIjGWk=; b=xDko2lqXxPBQVELo2ZxtfNdEsxgGXRWCh/Wcb37rkIohNb8msHUqUWVx1Qt3HkCxmL ddQN4S7cfmgqC5qqmCooyj+nAu6CbJS5iH7FA8NLhR/3Nw8WjOG0WQXtGMN575dn+aUa Y7eRiPihW8XW/1d3rKa1whd/iB8WqwLhekOGekHCIITLX2a/M53d6xru8aifEswpXOY9 J72RuMS2cHNrMAL1NpQEp66wl6mfoLv077BMTAkGZJthoTTjWsCTJZ8IeRQrBVsfcS6z OQ1IFJtg1NTef6lOM3XdgwjsTKdST1nptymqq190FBGRVGb9Jds8dix35nRuKzKTE50s TREA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KyWHP9qC; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c36si11125932edb.58.2019.11.11.08.35.25; Mon, 11 Nov 2019 08:35:49 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=KyWHP9qC; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726924AbfKKQcR (ORCPT + 99 others); Mon, 11 Nov 2019 11:32:17 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:49403 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726857AbfKKQcR (ORCPT ); Mon, 11 Nov 2019 11:32:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573489935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LqK12N2BhrocKRvl7cMiEaZz6qD/oH8PM0mBXIIjGWk=; b=KyWHP9qCwp+LoxxT6Ijj3Bz8QmuQYVIRaobpUtkGRZjI++E9mebk/5yyla3KnXTuswwqzP chJRCcxJesKS9aU5A94Xesenv2GvIVT1nw4DixIv0ZBoKbj0HRnXbPynVmrwMSbUma/zoE +j9GEqxGVuF/HiO5+JVPMqr66YMR3s4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-99-s9OhPxAAPJu1OgSJnyNOCw-1; Mon, 11 Nov 2019 11:32:14 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6391DDC59; Mon, 11 Nov 2019 16:32:13 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.43.17.44]) by smtp.corp.redhat.com (Postfix) with SMTP id 524A06106C; Mon, 11 Nov 2019 16:32:11 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Mon, 11 Nov 2019 17:32:13 +0100 (CET) Date: Mon, 11 Nov 2019 17:32:10 +0100 From: Oleg Nesterov To: Christian Brauner Cc: Adrian Reber , Eric Biederman , Pavel Emelyanov , Jann Horn , Dmitry Safonov <0x7f454c46@gmail.com>, linux-kernel@vger.kernel.org, Andrei Vagin , Mike Rapoport , Radostin Stoyanov Subject: Re: [PATCH v7 1/2] fork: extend clone3() to support setting a PID Message-ID: <20191111163209.GB11389@redhat.com> References: <20191111131704.656169-1-areber@redhat.com> <20191111152514.GA11389@redhat.com> <20191111154028.GF514519@dcbz.redhat.com> <20191111161458.fjodxyx566dar6ob@wittgenstein> MIME-Version: 1.0 In-Reply-To: <20191111161458.fjodxyx566dar6ob@wittgenstein> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: s9OhPxAAPJu1OgSJnyNOCw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/11, Christian Brauner wrote: > > On Mon, Nov 11, 2019 at 04:40:28PM +0100, Adrian Reber wrote: > > > note also that this way we can easily allow set_tid[some_level] =3D= =3D 0, we can > > > simply do > > > > > > =09-=09if (xxx < 1 || xxx >=3D pid_max) > > > =09+=09if (xxx < 0 || xxx >=3D pid_max) > > > > > > although I don't think this is really useful. > > > > Yes. I explicitly didn't allow 0 as a PID as I didn't thought it would > > be useful (or maybe even valid). > > How do you express: I don't care about a specific pid in pidns level > , Yes, > Wouldn't that be potentially useful? As I said above, I don't think this is really useful. Just I was thinking out loud. I suggested to cache set_tid[pos] rather than pos because this makes the code simpler, not because this allows this allows to "naturally" handle the case when set_tid[pos] =3D=3D 0. Sorry it it was not clear. Oleg.