Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4088999imj; Tue, 19 Feb 2019 15:13:59 -0800 (PST) X-Google-Smtp-Source: AHgI3IbbXapCGX5Buo0cFGU6N5Mu+VPNjqGKTiBbfp4C53qFXjZrHGyyJJqN957ae34YGJXbskBx X-Received: by 2002:a17:902:ea8c:: with SMTP id cv12mr9798970plb.123.1550618039691; Tue, 19 Feb 2019 15:13:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550618039; cv=none; d=google.com; s=arc-20160816; b=wCH5HSZ3r7Rry7hAiAZf+tWpg1MA+xz9SGBQ7LA5/DPVIh5pjuaX+XK3hYpCEossVd rqKx6SXbJc685todvoB80HfkDvjzc6oJ+12LXbElha1rUC6qdftNFHdogPrAnHJ43Vtz pL+MCx7eVgyVKpB/2040E524NqfZblADrFibTF6iJiGXM2RRJNw/7I88qwRK4R/ArGYT Q1X85xY5GHIhPsajuyBRZV7Uc0hisx8HtkU6O9/tPi/inuotv57IxcIF+PsHGPUGysNR nW10hIJmWqUFTUDtIrsYsFpZ9zBEOsEh9+Cx0kFPpoJwE4A41lhaCBVr7RpQJ/sTVhsS YI6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization; bh=0wdbE28Ke5Ryx0qN7x3XnrDHzIymkcHPBtK1nB5immk=; b=OwfoPQJXtzC3CHbRdp0SuKnKd7fNdYt6iYNzTdCaBRjzbTkhnVm93HuS0M8SpDhm7o WsJA2vUfWShmZMOBoj3CTPuZUrzKWWsQl5CwyH+CWV4paDiSqwOuShmAdGyDBJ+v+Old AjlFM/FN+jr67lO/oteSZtnCgrpvZxBd5VqfpK9KrQFMa+eh7dgzSSGmkLD8Ihe3N5u8 CzKZJQD2j1OYseMPX2tTrKF2ivSwhjvveTVIoqBhx2c7AtcNNYVUXTSPnZycONfqDMmx u671wUgYQOCjt05UpFP2/Vkuq7cHpf2mZJg2KTR9PZDx9cmUQUKib5CqSlvqqS/nZ3oY AxJw== 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 cs11si6994657plb.248.2019.02.19.15.13.43; Tue, 19 Feb 2019 15:13:59 -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; 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 S1729585AbfBSXNW (ORCPT + 99 others); Tue, 19 Feb 2019 18:13:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40435 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727091AbfBSXNV (ORCPT ); Tue, 19 Feb 2019 18:13:21 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5D41981127; Tue, 19 Feb 2019 23:13:21 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-121-129.rdu2.redhat.com [10.10.121.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id D99181001E7D; Tue, 19 Feb 2019 23:13:16 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <87h8czvhsq.fsf@xmission.com> References: <87h8czvhsq.fsf@xmission.com> <155024683432.21651.14153938339749694146.stgit@warthog.procyon.org.uk> <155024685321.21651.1504201877881622756.stgit@warthog.procyon.org.uk> To: ebiederm@xmission.com (Eric W. Biederman) Cc: dhowells@redhat.com, keyrings@vger.kernel.org, trond.myklebust@hammerspace.com, sfrench@samba.org, linux-security-module@vger.kernel.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, rgb@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20057.1550617996.1@warthog.procyon.org.uk> Date: Tue, 19 Feb 2019 23:13:16 +0000 Message-ID: <20058.1550617996@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 19 Feb 2019 23:13:21 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Eric W. Biederman wrote: > > + c->id = atomic64_inc_return(&container_id_counter); > > This id is not in a namespace, and it doesn't have enough bits > of entropy to be globally unique. Not that 64bit is enough > to have a chance at being globablly unique. It's in a container, so it doesn't need to be in a namespace. The intended purpose is for annotating audit messages. Globally unique wasn't particularly in mind. It could be turned into, say, a uuid, so that isn't really a problem at this point. You are right, though, it really should be globally unique as best possible - even the one in init_container should be. Ideally, it would look the same inside the root container as any subcontainer. David