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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 AA6E4C433EF for ; Wed, 8 Sep 2021 07:37:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8FA7261176 for ; Wed, 8 Sep 2021 07:37:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350526AbhIHHio (ORCPT ); Wed, 8 Sep 2021 03:38:44 -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-Google-Smtp-Source: ABdhPJzIbNRikobIOOunmSW5bp+DYjiJjzAzKNlWichoE9SwXSEqDDtjTORr8+/U3/M9/5256zkNoLf4zkFpLQ7XPiI= 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