Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp282044pxb; Wed, 8 Sep 2021 00:42:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyirgYpOHwVvnAllTsOVdXvhc3+YOImoza6Y1Cak8Qkqoe72S73STMfWW93JmMj2bWN2Es2 X-Received: by 2002:a17:906:7ac5:: with SMTP id k5mr2746216ejo.386.1631086963921; Wed, 08 Sep 2021 00:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631086963; cv=none; d=google.com; s=arc-20160816; b=uhW590+JoCfDPsS4JDfqftpz75bVl6/KBOD95Dv+x4bbYxPH+sTZLtTYn4JQEHdQNe PQTGv8FmY9DR9zRo7PEJxiI/HZRsCDhR98fGI14iIEhgBh0eNTypqvQvdqjrr7T8soPv TR8/uHi503xr+S7pCjWkwmMPUuNGeMHoBLlRU73Cz+el06i0u6PuoKxleosUEQFqoGCl oKg4QQvIFpE1Q2TLxQZcNlHb14UrkH+fiom0flyDrI8v2yrxYXmp8CCzgVagJ5aI3G0d k+FMuSZoqcdVCfwKMZU78MsZBIKpcVrMdJEPrLVelEOiNXEy/eeSSbwabL7jUJb3K4up fPNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RxByYRg2XXqbg48iaJnwshxIX8ARRbQbbWyTDrsMpDg=; b=iFNZOdB0cqlkljtYpvVYW8ei3oNAa8H2vWSVFL2nczd3Geycd/T7OuoL6z+Vu5ytbN KMPZvMYuvbG92Ydkt/6MTY/FcoZ2qumKbBsXJzZzo+gF3wQHjS3CutPnD/JuaWt6zQjj cwXOHxm4GAr37OF+Ro7+9VHqg7pIoZ2pUuP//ijnFxOCpsvmIU81IiFJ0ADEMC+xXBTc nf8EitpdtW5y+bEZD4GsV1X8yd9VHlkSkE8lw3VsjmWXrKO57Eh16wrAB8ZnDWFpWSur +yoNfH93kE0l1QFlJ0nQHf50/1ASkNkE5rgMnbIRt2/V5H62f5MjqiurM3aaLjIlMnt+ flWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=JtC8vxGN; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m9si1383960edc.501.2021.09.08.00.42.20; Wed, 08 Sep 2021 00:42:43 -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=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=JtC8vxGN; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350817AbhIHHin (ORCPT + 99 others); Wed, 8 Sep 2021 03:38:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350520AbhIHHig (ORCPT ); Wed, 8 Sep 2021 03:38:36 -0400 Received: from mail-vk1-xa2f.google.com (mail-vk1-xa2f.google.com [IPv6:2607:f8b0:4864:20::a2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68225C06175F for ; Wed, 8 Sep 2021 00:37:29 -0700 (PDT) Received: by mail-vk1-xa2f.google.com with SMTP id g34so438936vkd.11 for ; Wed, 08 Sep 2021 00:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RxByYRg2XXqbg48iaJnwshxIX8ARRbQbbWyTDrsMpDg=; b=JtC8vxGN7eRYHrK74+0gnNKbyBQ6ygwCoAYMm88H5oYJZgf0QTejxJoGm/EWBYMNI2 u74hLHaovlTxOuAO53GNWUjTNPZS1gCwm0TDI/ZJUB4HeCswQastk9SHPqMEB61BUjNC DierBZIFFkUSg8nBXL8zZskDsijYbJLqKYVig= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RxByYRg2XXqbg48iaJnwshxIX8ARRbQbbWyTDrsMpDg=; b=nijm09rUkETjnXG/XPn71D6qPHu5h2Dn62IrISJHfi0OmJ3eOnwCEz714V0fGB5C/T 4GNE9g/qBcNDjEiw4Zj/64bKbcy11LKw/O3GfyT6pEyT+RzvTN7t2X5XPMoU9dLSArAD GhMsVMTvzlNORmJsqlSStWbi+ZZPDtKLlrGqEViq2FdQbwSi7cCVIt8TXJQ3jADgC/zZ BWoUvmZXSQafSm/p/hybIjBQHOndUmecq81rzrctHtqz5T6yNeb5dNMAmMnlp391iNkR wM62GVIvJ25k1aef3ZDPCIMV/YsMJ2wWKaaN9+C1nANFtq1ZF8oqhq/vnYB/OQNaNB7G wXFQ== X-Gm-Message-State: AOAM533/MRvpxO5EM/yO7I6wBwmZpw0QvvUOIbnzPHE+/TlvgCY50RVs kI0xMaEqpQC2+gt2rrVeEtutm2mZPZFytq4DKT/oMQ== X-Received: by 2002:a1f:a348:: with SMTP id m69mr216744vke.10.1631086648497; Wed, 08 Sep 2021 00:37:28 -0700 (PDT) MIME-Version: 1.0 References: <20210902152228.665959-1-vgoyal@redhat.com> In-Reply-To: From: Miklos Szeredi Date: Wed, 8 Sep 2021 09:37:17 +0200 Message-ID: Subject: Re: [PATCH v3 0/1] Relax restrictions on user.* xattr To: Vivek Goyal Cc: "Dr. David Alan Gilbert" , Andreas Gruenbacher , Alexander Viro , linux-fsdevel , LKML , virtio-fs-list , Daniel J Walsh , Christian Brauner , Casey Schaufler , LSM , SElinux list , "Theodore Ts'o" , Giuseppe Scrivano , "Fields, Bruce" , Stephen Smalley , Dave Chinner , "Eric W. Biederman" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 Sept 2021 at 23:40, Vivek Goyal wrote: > > 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. That's the objective, yes. I think the trick is getting filesystems to store yet another xattr type. Thanks, Miklos