Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3817411ybi; Mon, 29 Jul 2019 13:12:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYTsUnj5PhGR5XCTtN+SE5J1WQ9pzad76A6AjwDOmk33hy3utxWgxBAHgyQJh+CCM4M05j X-Received: by 2002:a17:902:4b:: with SMTP id 69mr111120859pla.89.1564431146828; Mon, 29 Jul 2019 13:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564431146; cv=none; d=google.com; s=arc-20160816; b=Ot30iWoGv2Aj/Y1swLqiFwR63eIgq+cn8DRxXLoTrwVDITmUoZd7RqC+VEuDRRIgnm nOQnLpNRq8RNI+7P/pEPJdJqnk1k2rlY7sO2IYyiz01niIqhoi2XMDp+8vjp9FBZfarZ OnHA15sbBuAcny5HSolEEYDfywgNhUxwzdRB7fkQoPkGF+OsKvXAPGmv6X2/rJ4aUwJW 3UF2k+R2YJF3VTatT1Cn3HuNrvynrYPJOTqg24bfjKMOPUZk1n88wgrB+LojL3Rw8s8e FqEpLBWXCw8g5cIMm3yCjIQSyD65hElxhOlG2uxVnmfOMFzpGZ/fWZ2tCB7P8zWoObG6 LBWA== 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:dkim-signature; bh=LLxn7C9aC5wuodbKHEOV6mkYITys5cF1PQfnyuR0FjI=; b=c3cj029bsJyx4EU3k6G6giV2zYfyt9cB1Hs997qedkpPcrjnrYCM4GWWO2BYT39o6r o7+bVf1E4/Vl/8LeW8/ScekN41AIY7lq7muVWVSMBjd8rwLivapK8ttuwWVyp++v1Sxz nz0AewD90RkJ3rHZjXi0QQwShrImkFHe+VRLr9jBkFsoXfgDf24/cngtuMH7aB+o/Bb2 aHLIBmQAHsEV7M+VdYRSWhAu4jn2DAXwQtwRu0v+f0ZWbT9YadLZSOvRRQiG9yl7zSS3 rTJeA1Lpu7dee8Po9iU4NlAXfCJwq1mbLYa+YaPHb0SiNwlAmi3G12bKB/bDR8wwbNHt l8pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=JPljb8ZT; 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 s14si29947172pgj.347.2019.07.29.13.12.12; Mon, 29 Jul 2019 13:12:26 -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=JPljb8ZT; 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 S1727067AbfG2Td6 (ORCPT + 99 others); Mon, 29 Jul 2019 15:33:58 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:36358 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387892AbfG2Tdx (ORCPT ); Mon, 29 Jul 2019 15:33:53 -0400 Received: by mail-io1-f65.google.com with SMTP id o9so19054806iom.3 for ; Mon, 29 Jul 2019 12:33:52 -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=LLxn7C9aC5wuodbKHEOV6mkYITys5cF1PQfnyuR0FjI=; b=JPljb8ZTyaVb8h4Bz4OJBKZhLNaT6av3N0ZgV0E/ky43qADdbSBt98vbCOUKbI11pC HEizJCNey/IubUXtKezPS1EbSH6NSZEr9kV+Zb8Xpyocg45dThxNyvtslPdnYTjx5v4k zldwju6QUAX2SYTda4ERbi5mbE5KsBp11LgqP8NXIFFMpPVgsWFZlcYsa8jHahiQGifh TWwX/HdoXNkdTW1xXfarPSShdWEsf7w5nMmwno4aMZVtLU2AnGWpj8j7YmvMvqefG9mi bptkFuW6yivA6aevgFjxNhKICMDih547P/5zPm3pRtrJZ1nr49vWlKHQ2c0tbeZpUNMg BmYA== 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=LLxn7C9aC5wuodbKHEOV6mkYITys5cF1PQfnyuR0FjI=; b=Vc/Pya5kpx16bkQa2MK6seryodGYQCAvhKD6ywVOpgpqWyecsj8fRrPirxpF5Cwghn f3/sFSi4zaeewDukrsbgKatmQ4NBwQ8p1uB3FcQMXNv5XFSbB2y+rRLEwqqHDERwL9V6 cuiqomEQm1JpUSXKMP3nLOaPMc4dYhPf4oo0CuGBdw/4RiPHI8U23YeDsKpu1EvCdAOU hcIhv6a1S/283dQbYQVb5TqqN6M6VgJPW3pWL2Vx23NyZq+/m6D30oFxh7ZWWyT1GSsW hGe6Z4B8kD1YXSokyRIMmMEYITPGFCCJJX+VvUkiErDkpB/22scfDTR7k6E2ggcqO7EI lvqQ== X-Gm-Message-State: APjAAAVj0JCzM3jLGVdKiedkChkGTFfGnz89T3vhw/YU9KjET4sZsuE4 VtjY99eNm7+XF5inp7lq9sY= X-Received: by 2002:a02:cb4b:: with SMTP id k11mr114182524jap.109.1564428832072; Mon, 29 Jul 2019 12:33:52 -0700 (PDT) Received: from brauner.io ([162.223.5.124]) by smtp.gmail.com with ESMTPSA id h8sm56813084ioq.61.2019.07.29.12.33.50 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 12:33:51 -0700 (PDT) Date: Mon, 29 Jul 2019 21:33:50 +0200 From: Christian Brauner To: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Adrian Reber , Eric Biederman , Pavel Emelianov , Jann Horn , open list , Oleg Nesterov , Andrei Vagin , Mike Rapoport , Radostin Stoyanov Subject: Re: [PATCH 1/2] fork: extend clone3() to support CLONE_SET_TID Message-ID: <20190729193349.d5b6aivfx7w4plwq@brauner.io> References: <20190729163355.4530-1-areber@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 29, 2019 at 08:17:58PM +0100, Dmitry Safonov wrote: > On Mon, 29 Jul 2019 at 20:12, Dmitry Safonov <0x7f454c46@gmail.com> wrote: > > > > On Mon, 29 Jul 2019 at 17:52, Adrian Reber wrote: > > [..] > > > --- a/include/uapi/linux/sched.h > > > +++ b/include/uapi/linux/sched.h > > > @@ -32,6 +32,7 @@ > > > #define CLONE_NEWPID 0x20000000 /* New pid namespace */ > > > #define CLONE_NEWNET 0x40000000 /* New network namespace */ > > > #define CLONE_IO 0x80000000 /* Clone io context */ > > > +#define CLONE_SET_TID 0x100000000ULL /* set if the desired TID is set in set_tid */ > > > > > > /* > > > * Arguments for the clone3 syscall > > > @@ -45,6 +46,7 @@ struct clone_args { > > > __aligned_u64 stack; > > > __aligned_u64 stack_size; > > > __aligned_u64 tls; > > > + __aligned_u64 set_tid; > > > }; > > > > > > > I don't see a change to > > : if (unlikely(size < sizeof(struct clone_args))) > > : return -EINVAL; > > > > That seems backwards-incompatible, but I may miss some part.. > > On the other hand, clone3() was merged in v5.3 window, so probably, > it doesn't matter. It would matter. Even if this were to be accepted and preferred over the existing /proc/sys/kernel/ns_last_pid interface the earliest point in time I'd consider this for would be 5.4. So I think this would need to be changed. :) Christian