Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1555798
| From | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged |
| Date | 2017-01-10 19:40 +0100 |
| Message-ID | <sY9uV-4ME-13@gated-at.bofh.it> (permalink) |
| References | <sY2Wt-JF-3@gated-at.bofh.it> <sY5Um-2zr-51@gated-at.bofh.it> <sY70b-3cI-29@gated-at.bofh.it> <sY7CO-3Fl-7@gated-at.bofh.it> <sY9bz-4Gp-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 10.01.2017 21:11, Amir Goldstein wrote: > On Tue, Jan 10, 2017 at 6:34 PM, Konstantin Khlebnikov > <khlebnikov@yandex-team.ru> wrote: >> >> On 10.01.2017 18:57, Miklos Szeredi wrote: >>> >>> On Tue, Jan 10, 2017 at 3:46 PM, Vivek Goyal <vgoyal@redhat.com> wrote: >>>> >>>> On Tue, Jan 10, 2017 at 02:26:48PM +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. >>>>> >>>>> This patch adds second copy of credentials without CAP_SYS_RESOURCE and >>>>> use it if current task doesn't have this capability in mounter's user-ns. >>>>> This affects creation new files, whiteouts, and copy-up operations. >>>>> >>>>> Now quota limits are ignored only if both mounter and current task have >>>>> capability CAP_SYS_RESOURCE in root user namespace. >>>> >>>> >>>> This makes sense to me. I too would like quota to take effect for >>>> containers on overlay. >>> >>> >>> At first sight I hated this patch. It breaks the nice concept that >>> underlying filesystems are just storage for the overlay and don't care >>> about caller's privileges (as a block device wouldn't care about >>> caller's privileges when allocating space). >>> >>> However I don't see a good way around this, so... >> >> >> Another solution: just always drop CAP_SYS_RESOURCE from capabilities. >> > > That sounds like a better (and simpler) solution. > > Let overlayfs support mount options noquota|quota (default configurable > from Kconfig and module param) and 'quota' means drop CAP_SYS_RESOURCE. Too complicated for me. Let's drop it unconditionally. See v2 patch. > > >>> Looks like this also has effect on reserving space in ext4, not sure >>> what that entails. >> >> >> Yes, CAP_SYS_RESOURCE allows to use reserved space and inodes. >> > > That's really not good. It's beyond disobeying user quotas, because > file system may get to unrecoverable state when corruption is detected > and already filled the root reserved space. > > Amir. > -- Konstantin
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] ovl: do not ignore disk quota if current task is not privileged Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2017-01-10 12:40 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Vivek Goyal <vgoyal@redhat.com> - 2017-01-10 15:50 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Miklos Szeredi <miklos@szeredi.hu> - 2017-01-10 17:00 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2017-01-10 17:40 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Amir Goldstein <amir73il@gmail.com> - 2017-01-10 19:20 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2017-01-10 19:40 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Vivek Goyal <vgoyal@redhat.com> - 2017-01-10 17:10 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Vivek Goyal <vgoyal@redhat.com> - 2017-01-10 17:40 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2017-01-10 17:50 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2017-01-10 17:40 +0100
[PATCH v2] ovl: drop CAP_SYS_RESOURCE from saved mounter's credentials Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2017-01-10 19:40 +0100
Re: [PATCH v2] ovl: drop CAP_SYS_RESOURCE from saved mounter's credentials Vivek Goyal <vgoyal@redhat.com> - 2017-01-10 20:20 +0100
csiph-web