Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp640728ybh; Sat, 3 Aug 2019 06:48:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyH7fqRNY51BEqFhR+gOcWPcaY6zliagRHnBM57BpH5EorWF64+KeppI/2pBo5AAb9J1vtw X-Received: by 2002:a17:90a:25c8:: with SMTP id k66mr9388691pje.129.1564840129601; Sat, 03 Aug 2019 06:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564840129; cv=none; d=google.com; s=arc-20160816; b=FKTsjMB/OXn8FOlvWOBC3HPAmXP6DM0pgCwR+leSbqKOUicUPtUsYE8CXNUY+BWLWE SE0S50gh612BlI8aN2ILfzXOTu2LsQ8yoBF3aDRZU2O+fXRfWodFQTSm/nBvCrTnyODd sUxIDZgYXkVOh8TxBB+/U4SZrXsCGLyDr6YstnAxHlCzxBm12OzgFrfsU0hV9KWZb2Wh WmMhQJuASzVbSXyv0kkmCTYEXolv5GcAJwtNcplvSGdt2rs3AVt7zNsHG5vTexznlNzO rp0Eejznobrqyqlj62MkWHhRi7MyVsqzqDjMktW47OMHKmCfTHMpLRmJkuxaFz0RYG6k N/Yg== 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:from:date; bh=4S2cDqcI3O41v8iH5mujWH6T2LtJgWzIiSZcOEoG2BY=; b=bihI4fofgDC/T6jOsOUhQwpXer1AbD8bBYQr/SCjPOvcZFsWfwZohWiD2ppq981TO5 TzTGh8961Ex179YQrC7AzWHKz84EL/E7+Y6hVAVr++OiGxtnpM7EC8SpU9c6TytAWJYv giEM6GA4XYEuWCrfOqgOVN8jQbXIOb00ceuO9v+DTSIdAKPTmAKQqMew3SxkZtRfCYQt +Urbg027iUnBq+7AeTrUbJTLqB71qvtu0p2u20lO8EjqeStN/7stolLJqZpD2N2oNIEz CWdo2q5c7uOJ0i6MtVfasrDBIrTGGBq4j8EczHkK2FziSVyUK3lqBNSO/11pB2A3tiEl i0eg== 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; dmarc=fail (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 d4si38599177pgc.75.2019.08.03.06.48.33; Sat, 03 Aug 2019 06:48:49 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392229AbfHBNqP (ORCPT + 99 others); Fri, 2 Aug 2019 09:46:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49442 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726340AbfHBNqO (ORCPT ); Fri, 2 Aug 2019 09:46:14 -0400 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 mx1.redhat.com (Postfix) with ESMTPS id 969EC3087958; Fri, 2 Aug 2019 13:46:14 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.43.17.136]) by smtp.corp.redhat.com (Postfix) with SMTP id AA17F60BF4; Fri, 2 Aug 2019 13:46:12 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Fri, 2 Aug 2019 15:46:14 +0200 (CEST) Date: Fri, 2 Aug 2019 15:46:11 +0200 From: Oleg Nesterov To: Adrian Reber Cc: 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: <20190802134611.GF20111@redhat.com> References: <20190731161223.2928-1-areber@redhat.com> <20190731174135.GA30225@redhat.com> <20190802072511.GD18263@dcbz.redhat.com> <20190802124738.GC20111@redhat.com> <20190802132419.GD20111@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190802132419.GD20111@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 02 Aug 2019 13:46:14 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/02, Oleg Nesterov wrote: > > So Adrian, sorry for confusion, I think your patch is fine. Yes... but do we really need the new CLONE_SET_TID ? set_tid == 0 has no effect, can't we simply check kargs->set_tid != 0 before ns_capable() ? and to remind, I still think alloc_pid() should use idr_is_empty(), but I won't insist. Oleg.