[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1320675607.2330.0.camel@offworld>
Date: Mon, 07 Nov 2011 15:20:07 +0100
From: Davidlohr Bueso <dave@....org>
To: Lennart Poettering <mzxreary@...inter.de>
Cc: Christoph Hellwig <hch@...radead.org>,
Hugh Dickins <hughd@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
lkml <linux-kernel@...r.kernel.org>, linux-mm@...ck.org,
Kay Sievers <kay.sievers@...y.org>
Subject: Re: [RFC PATCH] tmpfs: support user quotas
On Mon, 2011-11-07 at 12:29 +0100, Lennart Poettering wrote:
> On Mon, 07.11.11 02:31, Christoph Hellwig (hch@...radead.org) wrote:
>
> >
> > On Sun, Nov 06, 2011 at 06:15:01PM -0300, Davidlohr Bueso wrote:
> > > From: Davidlohr Bueso <dave@....org>
> > >
> > > This patch adds a new RLIMIT_TMPFSQUOTA resource limit to restrict an individual user's quota across all mounted tmpfs filesystems.
> > > It's well known that a user can easily fill up commonly used directories (like /tmp, /dev/shm) causing programs to break through DoS.
> >
> > Please jyst implement the normal user/group quota interfaces we use for other
> > filesystem.
>
> Please don't.
>
> tmpfs by its very nature is volatile, which means that we'd have to
> upload the quota data explicitly each time we mount a tmpfs, which means
> we'd have to add quite some userspace infrastructure to make tmpfs work
> with quota. Either every time a tmpfs is mounted we'd have to apply a
> quota for every configured user and every future user to it (which is
> simply not realistic) or on every user logging in we'd have to go
> through all tmpfs mount points and apply a user-specific quota setting
> to it -- which isn't much less ugly and complex. Just using a
> user-specific RLIMIT is much much simpler and beautiful there, and
> requires almost no changes to userspace.
>
> On top of that I think a global quota over all tmpfs is actually
> preferable than a per-tmpfs quota, because what you want to enforce is
> that clients cannot drain the pool that tmpfs is backed from but how
> they distribute their share of that pool on the various tmpfs mounted
> doesn't really matter in order to avoid DoS vulnerabilities.
Right, rlimit approach guarantees a simple way of dealing with users
across all tmpfs instances.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists