Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp11687pxv; Wed, 30 Jun 2021 13:35:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/gzt/mas0IADR20/wgD8TZDjUt/aQKUjNnQx12FvaJnnD1bJtkU7+pXMnbr4YS4m+oC0r X-Received: by 2002:a05:6402:4cb:: with SMTP id n11mr48365337edw.292.1625085335642; Wed, 30 Jun 2021 13:35:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625085335; cv=none; d=google.com; s=arc-20160816; b=yye1TM1O7hvnw2zzozTqxpDC4wZt9H4a8Kxqyz7atMh18hMQ25FJpvbGFFlrWlmk6+ r+GenKWVTn5XV7krEYAq7L2N16N+fiotiAVE1HLbz+aDpngzjgghfZ/d9wWFhHc5IcSk NMODuuL7CHhOspTGClJvEa2tMcUzO0VljmeZAiRCGfLJisyOgTcHnKFxNWY8GGwQtqqr 2/2E/9LtHN6Ej2/ho9+5cyf4gtmwiETLCXJxznnLz7t8ealsTW8dfzgU1HO6r0kVooXe 4nbvg6Zt8SDd32jmQ9RSSzNCjeR14ut4XHgwaPUf8Ztvm6sjP5KmBvwptlRFK04U19Mv mFFw== 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=1BKKapww4d5wegIAyWjvMjJRL130mUGbMRABPEvALVk=; b=f9sIW2ijHino2CO4NqkGz4qSDW6UyuWqf1rZfT5De3CEVdKvs3yVklAXFuUQ2jfGTz MV1Sv/GD4h4vp/ZIxSoIBE2Sy4z9M/KiMf6+b6kFrJNn2RmtS5ftvtCV4hQqMcMeSMts vuWE4e3n5Vn8nUKs0Fiorm2k8R9kXr6uFe8QIQhK6iroUFaBMQQ4TiWtC02JgklFOO2+ eNL9swunfeoxRanOfG/FBZ54Ds4T+m3o/3wrc5nJnPV8VHy+9VAr56vRVovwVGpoSAGP YVDhMfC9OL6M53HITq5NF3k5RtvTPWbgA1DmOVcwkSuwdZD+KCsDm6j9jAKLg4jPJPlm ZsUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Et5T/mL8"; 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 a22si1068906edr.110.2021.06.30.13.35.04; Wed, 30 Jun 2021 13:35:35 -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="Et5T/mL8"; 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 S234292AbhF3Ufh (ORCPT + 99 others); Wed, 30 Jun 2021 16:35:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:42552 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234426AbhF3Ufg (ORCPT ); Wed, 30 Jun 2021 16:35:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625085186; 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=1BKKapww4d5wegIAyWjvMjJRL130mUGbMRABPEvALVk=; b=Et5T/mL8ytpdekf7obTngcnbN7LFbysRQgG0X0OJNxFvTFbR0UEJYm5IxodUnPyPLG45mU h+YNSt62FGc5pfX41nJJMITjeIlrgaQiwRNzbI+Xhz8EnQGDotAOJA0pExpGUeQEf02hs7 gEY9dZ09SRiFW4w6vpKoyD5Jz1kY1yM= 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-316-3HmKpcuZNr2C0JrClYUolw-1; Wed, 30 Jun 2021 16:33:04 -0400 X-MC-Unique: 3HmKpcuZNr2C0JrClYUolw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 51B45100CCC0; Wed, 30 Jun 2021 20:33:03 +0000 (UTC) Received: from horse.redhat.com (ovpn-115-222.rdu2.redhat.com [10.10.115.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7088B10027A5; Wed, 30 Jun 2021 20:32:59 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id 9E1AE22054F; Wed, 30 Jun 2021 16:32:58 -0400 (EDT) Date: Wed, 30 Jun 2021 16:32:58 -0400 From: Vivek Goyal To: Theodore Ts'o Cc: "Dr. David Alan Gilbert" , Daniel Walsh , Casey Schaufler , "Schaufler, Casey" , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "viro@zeniv.linux.org.uk" , "virtio-fs@redhat.com" , "berrange@redhat.com" , linux-security-module , "selinux@vger.kernel.org" Subject: Re: [RFC PATCH 0/1] xattr: Allow user.* xattr on symlink/special files if caller has CAP_SYS_RESOURCE Message-ID: <20210630203258.GE75386@redhat.com> References: <20210629152007.GC5231@redhat.com> <78663f5c-d2fd-747a-48e3-0c5fd8b40332@schaufler-ca.com> <20210629173530.GD5231@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 30, 2021 at 03:59:41PM -0400, Theodore Ts'o wrote: > On Wed, Jun 30, 2021 at 04:01:42PM +0100, Dr. David Alan Gilbert wrote: > > > > Even if you fix symlinks, I don't think it fixes device nodes or > > anything else where the permissions bitmap isn't purely used as the > > permissions on the inode. > > I think we're making a mountain out of a molehill. Again, very few > people are using quota these days. And if you give someone write > access to a 8TB disk, do you really care if they can "steal" 32k worth > of space (which is the maximum size of an xattr, enforced by the VFS). So that should be N * 32K per inode, where N is number of user xattrs one can write on the inode. (user.1, user.2, user.3, .., user.N)? Vivek > > OK, but what about character mode devices? First of all, most users > don't have access to huge number of devices, but let's assume > something absurd. Let's say that a user has write access to *1024* > devices. (My /dev has 233 character mode devices, and I have write > access to well under a dozen.) > > An 8TB disk costs about $200. So how much of the "stolen" quota space > are we talking about, assuming the user has access to 1024 devices, > and the file system actually supports a 32k xattr. > > 32k * 1024 * $200 / 8TB / (1024*1024*1024) = $0.000763 = 0.0763 cents > > A 2TB SSD is less around $180, so even if we calculate the prices > based on SSD space, we're still talking about a quarter of a penny. > > Why are we worrying about this? > > - Ted >