Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp4116926pxb; Tue, 7 Sep 2021 15:27:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsrYqf/LnXiIxPuy3Q0yCvGNpaxeJRSsiWsUBsyXqS3motUdUa6sw1u1QSNCv/IxdsxLLR X-Received: by 2002:a92:7f08:: with SMTP id a8mr357316ild.125.1631053669253; Tue, 07 Sep 2021 15:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631053669; cv=none; d=google.com; s=arc-20160816; b=IfCdS19fjKalkVm+kKzABny7rAZDUJGihaCpffe3VztRPCTdZBx6hmBojiW/Z1KkQc RVCkHnSUY9L8ZknfpbyLzUOIW25FIr9kgbFNjOj441NbcumUgsBiei1uTkW0nozM1hG3 IAigAHOrMH41uXlAvtoozricqoUwnlZEMrfeKc7a1stgZ3f8zbbpdKEryA6t5rV3rx1R wjBP4PDZ4o5Ti27vsMnf8Z7s8O29erlEzSiisxjOjtgnA7954FEl76y7KsqaF0npWqSW Go+Hn3iYm1cdui7mFGSCSnlgg/2ksGNH4T/vBWCEJ1CjRcUBdT6TjGb4Qe3xZap8h8IK ucow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TFUHSqTOgBpyXCJk72fmTEBK22tiTY8OPr/j1HO3TGY=; b=Ps6zWPMOJNaN37QsUG42dpeZF8S8wIf3b3YQpVoJp45gaqupiz3CAwlDfDGurojf2N gIjd87nB2NCFMATb92NdHFgUDtbTGW7CgVV2VTvHGcjUMYus8sVQAZRuwZ2IDNTiU9yE NT6f37m5RG5Ky4r1n3clLjEFTqmdL1QxoFonwIkN+Ne+zGvEUtOPrJsT1Cr9FLf7Aplx RA2qOsHJVI48J1+fe3vqS+f6m4JlAwzjyK2Ful0Y24j1ywYZsivt5LmNIZqPEYgtbFL8 /X4C6NJUIRDtu6I1YVKrgO/5Gt5KX1uupU+nvsljCEbZM9TjC0IY1/Q4cyA5kzK8ghQf 63Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NLFq9iQM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id h5si271289iol.44.2021.09.07.15.27.36; Tue, 07 Sep 2021 15:27:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NLFq9iQM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1347311AbhIGVlq (ORCPT + 99 others); Tue, 7 Sep 2021 17:41:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:24823 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347295AbhIGVlq (ORCPT ); Tue, 7 Sep 2021 17:41:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631050838; 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: in-reply-to:in-reply-to:references:references; bh=TFUHSqTOgBpyXCJk72fmTEBK22tiTY8OPr/j1HO3TGY=; b=NLFq9iQMTwKVrWygZXVAMNeXyK8DHSM927HQNsQbT8V2jxlF3UXN6x/JB3VR/9R/CE/Z1x zus8huocADMgEEVARCI1A68Yn6yiq/nhhdME4rD+IXzV9Mr2aq7cdzjRyy6Z1tHxJYaja3 2rj7yy0iiB6e6zAK9Wf2mxQVDb70pAM= 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-522-cFUE1bGMNm2M9M7pOz2g5Q-1; Tue, 07 Sep 2021 17:40:37 -0400 X-MC-Unique: cFUE1bGMNm2M9M7pOz2g5Q-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DD2EE814244; Tue, 7 Sep 2021 21:40:35 +0000 (UTC) Received: from horse.redhat.com (unknown [10.22.17.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id 551DE6060F; Tue, 7 Sep 2021 21:40:32 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id D2EE2220257; Tue, 7 Sep 2021 17:40:31 -0400 (EDT) Date: Tue, 7 Sep 2021 17:40:31 -0400 From: Vivek Goyal To: Miklos Szeredi Cc: "Dr. David Alan Gilbert" , Andreas Gruenbacher , Alexander Viro , linux-fsdevel , LKML , virtio-fs-list , Daniel J Walsh , Christian Brauner , casey.schaufler@intel.com, LSM , SElinux list , Theodore Ts'o , Giuseppe Scrivano , "Fields, Bruce" , Stephen Smalley , Dave Chinner , "Eric W. Biederman" Subject: Re: [PATCH v3 0/1] Relax restrictions on user.* xattr Message-ID: References: <20210902152228.665959-1-vgoyal@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 06, 2021 at 04:56:44PM +0200, Miklos Szeredi wrote: > On Mon, 6 Sept 2021 at 16:39, Dr. David Alan Gilbert > wrote: > > > IMHO the real problem here is that the user/trusted/system/security > > 'namespaces' are arbitrary hacks rather than a proper namespacing > > mechanism that allows you to create new (nested) namespaces and associate > > permissions with each one. > > Indeed. > > This is what Eric Biederman suggested at some point for supporting > trusted xattrs within a user namespace: > > | For trusted xattrs I think it makes sense in principle. The namespace > | would probably become something like "trusted.". > > Theory sounds simple enough. Anyone interested in looking at the details? So this namespaced trusted.* xattr domain will basically avoid the need to have CAP_SYS_ADMIN in init_user_ns, IIUC. I guess this is better than giving CAP_SYS_ADMIN in init_user_ns. Vivek