[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfpegsaRiyamrqqU8MRm+c-scO9Kco+nqxbv=zX3SNEoHeqZA@mail.gmail.com>
Date: Mon, 24 Jul 2017 10:19:07 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: Vivek Goyal <vgoyal@...hat.com>
Cc: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
"linux-unionfs@...r.kernel.org" <linux-unionfs@...r.kernel.org>,
Amir Goldstein <amir73il@...il.com>
Subject: Re: [PATCH v2] ovl: drop CAP_SYS_RESOURCE from saved mounter's credentials
On Tue, Jan 10, 2017 at 8:17 PM, Vivek Goyal <vgoyal@...hat.com> wrote:
> On Tue, Jan 10, 2017 at 09:30:21PM +0300, Konstantin Khlebnikov wrote:
>> If overlay was mounted by root then quota set for upper layer does not work
>> because overlay now always use mounter's credentials for operations.
>> Also overlay might deplete reserved space and inodes in ext4.
>>
>> This patch drops capability SYS_RESOURCE from saved credentials.
>> This affects creation new files, whiteouts, and copy-up operations.
>>
>
> I am not an expert in this area, but I thought previous patch was
> better. I am not sure why overlay internal operations should be
> done without CAP_SYS_RESOURCES when caller has CAP_SYS_RESOURCES. That
> might be counter-intuitive.
>
> If some task is allowed to bypass quota limitations on a file system
> then same should be true when task is working on overlay.
>
> Similary if a task is allowed to use reserved space on filesystem, then same
> task should be allowed to use reserved space on underlying filesystem
> when doing overlay. It should not be overlay's job to prevent that?
>
> May be it is just me....
Well, depends how you look at at it. Overlayfs just uses the
underlying filesystem as storage. So this patch basically asserts
that overlayfs can only use non-reserved space for its storage. I
don't see a problem with and it's the simpler fix, but if real use
cases turn up then this can be revisited.
Thanks,
Miklos
Powered by blists - more mailing lists