Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4722497ybc; Fri, 15 Nov 2019 09:04:04 -0800 (PST) X-Google-Smtp-Source: APXvYqzYqZ7WX6+594sBsvZ7l5XhvWc0XtuWG7IFPfn0S8ss2iR75i9tYM6Z3PraDBCRsGrVi3dO X-Received: by 2002:a19:6756:: with SMTP id e22mr12487890lfj.148.1573837444373; Fri, 15 Nov 2019 09:04:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573837444; cv=none; d=google.com; s=arc-20160816; b=n+2RaRNbg5lCqP0vp3pkSMlHf7p0DQ84+ycyRwYM+JWsiejLqrRD1trnhD6iJWuyzU ZzwdACr7QukQbqJxAjOLr6r2ccIcPT6J4T/ZvW52JWuEIDSTR3X14YRqvZnpUZG+yptX +IobaRhWFeXlrv6Wx32q3dB24ndfW409I37h7C6JSGN1N+jd4J6nBnByBLnEZMkXcNrX 61j5xd1J8L/1MBt0E0gCMwY3DMljrwCTEyB46yZnYy9bZAD03FtrengSkTpI7tKkw0Dw EbZR5vrfmmBnJcC930cWgRhWi+tbY/OOPVVVEtlT5PL+pqJYIwy4sLsCesD1oLeFaaLE +kYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature; bh=/2Ncf9XpoSg49t52uYQ/CLx1FaV03Rgw+InMqXFWtNU=; b=aE9q8m4K9e+rsOCaclH/6tMgNZfhm+yNhduuqNEU9Ga4DuuG8ladP7QUVF3QCKhxlI dmTpJmjtrkIy4PtkoltJCGJTnRlrqTl8mUUfB53tlS1FKfKQkG5dP7gztfI3JhU1i0Dd hkinsgWxLMs+cp43h2/Uw/XChalhk7o2ZB3Sa2gbO9cPb9RCbG6EVKKnP6fupOszi9nV 3u2w5s6ly2Z7SUn6Ii5BIqFTvY2udv7v2nvvElCSyUNo0mxXAq+wX12bjnqEJM6uuAGW L4dnNSwxcu5gQkXV2BsdyJCJF8vieXSMaPC38FSvnfNXenOUUXSn30cHYkgbpth2qVRO ueJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JwazyEje; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si7492322edn.202.2019.11.15.09.03.37; Fri, 15 Nov 2019 09:04:04 -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=@gmail.com header.s=20161025 header.b=JwazyEje; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727607AbfKORCZ (ORCPT + 99 others); Fri, 15 Nov 2019 12:02:25 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:33407 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727540AbfKORCZ (ORCPT ); Fri, 15 Nov 2019 12:02:25 -0500 Received: by mail-pf1-f194.google.com with SMTP id c184so6975996pfb.0 for ; Fri, 15 Nov 2019 09:02:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/2Ncf9XpoSg49t52uYQ/CLx1FaV03Rgw+InMqXFWtNU=; b=JwazyEjer+frxvk77JvsvZxqIm+ScQuw0ZBmLzoG1ANpnvFgoZgKGc+LyjxUHWoKDv 6X3ucoraCBNHhmlS/aW2YaXzxsqI7luGSYOkBXqHQA7S6aRER7BkFYKXi6Qng9Yw1/zO 0lKfJqL0h2MhiWB3dlqXNfuncuYQKBjKi0ErfT5z4nlCOuVTEAqwyUplv4H4lZFV9VV6 dorFwFNcIkbBh63cxexV51omwXlYFYK7KgMXm/dmY8fHf+Omu06ecVmLxBHOW/H+yAze lEZMMaxeutW2wZTkZ4kVzdnvK16sL7qkddAp59U0pWdEE6xFqNm9CNnDp67F49k6owQ9 WBow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/2Ncf9XpoSg49t52uYQ/CLx1FaV03Rgw+InMqXFWtNU=; b=mCA3hUf9oIXX5K35XPNOY6r8MyUSGUF1B2UOlgnCx1eQW7E4w+6YKKk/Z/v2WNGq4P RS7xcVS8lsQSQGDTlzGb8Di1b1iQd6od/n6q+jmNPsrXu7garOG3A74joTGSJZp1/urs CeMMHGL82WyoOeA268O/U7tMbf+DI9Fr1oK9aD5ywNzrlklZq+yiDSoZ0xmpwhwV0ywq GUIwdcCXLJPZFZF8CwURTcWgVHHy0B6AJ3hthtSP4feLg98i9WmFx02TNEuCenmLP93O G9wZLX4M/NAOu3cIAoo1bEXiFglch5D7MEftChfoTwrtqYp0wR3hOxhmIZutf4o5YDmP BxPQ== X-Gm-Message-State: APjAAAURP0ENxLZp2C/Z5KffyWShBtlnEuYLdFIeXvLtKdcpkyWxCBko n52//c/+NEE9TRhR+lxDMyGvzpTO4dY= X-Received: by 2002:aa7:918e:: with SMTP id x14mr17805599pfa.12.1573837344909; Fri, 15 Nov 2019 09:02:24 -0800 (PST) Received: from [10.83.36.153] ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id r22sm13014264pfg.54.2019.11.15.09.02.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Nov 2019 09:02:24 -0800 (PST) Subject: Re: [PATCH v11 1/2] fork: extend clone3() to support setting a PID From: Dmitry Safonov <0x7f454c46@gmail.com> To: Adrian Reber , Christian Brauner , Eric Biederman , Pavel Emelyanov , Jann Horn , Oleg Nesterov , Andrei Vagin , Rasmus Villemoes Cc: linux-kernel@vger.kernel.org, Mike Rapoport , Radostin Stoyanov References: <20191115123621.142252-1-areber@redhat.com> Message-ID: <446bbd86-1cbb-fcec-92b2-69a9f996c78e@gmail.com> Date: Fri, 15 Nov 2019 17:02:13 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/15/19 4:54 PM, Dmitry Safonov wrote: > [..] >> + size_t set_tid_size; >> + __aligned_u64 set_tid_size; > > [..] >> + .set_tid_size = args.set_tid_size, > > Is sizeof(size_t) == 32 on native 32-bit platforms? > Maybe `args.set_tid_size` should be checked? Nevermind, I missed that + if (unlikely(args.set_tid_size > MAX_PID_NS_LEVEL)) + return -EINVAL; is checked for `args' - it should be good enough. Thanks, Dmitry