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 30C29C433FE for ; Wed, 8 Sep 2021 07:37:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1314261168 for ; Wed, 8 Sep 2021 07:37:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350809AbhIHHin (ORCPT ); Wed, 8 Sep 2021 03:38:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350563AbhIHHig (ORCPT ); Wed, 8 Sep 2021 03:38:36 -0400 Received: from mail-vk1-xa2e.google.com (mail-vk1-xa2e.google.com [IPv6:2607:f8b0:4864:20::a2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6858AC0613C1 for ; Wed, 8 Sep 2021 00:37:29 -0700 (PDT) Received: by mail-vk1-xa2e.google.com with SMTP id t19so450123vkk.2 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=x8u+JuJT35iOlU8oqE8+1RJYkm+bR2ZaclRmj71e3Fhx1QNLBtp05hhJJ0lBb8nk/b XCFNComgWrCeP/nMk3py+Ye50s327VXvcf/FweZRyCeA+xzx8lc1GWrddpzBP46YMeVL SK9D1xv/o6mCSKl7oTmXcBf+27oGCMjo74JaiHOzQAe98INVIZYWSgA/8psge+FZDVcB maCZ/65qjdXZJE2RiMiPsZUBofzbHlUrAX6hMpu62ng4snQYHnwjb1d73T2DFaH4OM6Y oKRQ9nQC0l3urZOXhIsfp6mS6cy51rAGo0AQLehUYIy2dhqiM35IDrwm6JfXZ4HOu6zW nmXw== X-Gm-Message-State: AOAM5328MkRTeb8j+0LG/h28t/Wa+YnVXNnZlicZu3tkMUOaICFeUNGU Wwmev9c/rcU9/NTJezsVSpMU8pSP+BvFaqZJXrFvnQ== 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: 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