From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51D47C433FE for ; Tue, 7 Sep 2021 21:40:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3623360E94 for ; Tue, 7 Sep 2021 21:40:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347294AbhIGVlq (ORCPT ); Tue, 7 Sep 2021 17:41:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:21130 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347288AbhIGVlq (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-fsdevel@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