[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YP+36aMegQBja/aC@dhcp22.suse.cz>
Date: Tue, 27 Jul 2021 09:38:17 +0200
From: Michal Hocko <mhocko@...e.com>
To: "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc: Al Viro <viro@...iv.linux.org.uk>,
Qualys Security Advisory <qsa@...lys.com>,
Eric Sandeen <sandeen@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: Make kvmalloc refuse to allocate more than 2GB
On Wed 21-07-21 19:41:31, Matthew Wilcox wrote:
> It's generally dangerous to allocate such large quantities of memory
> within the kernel owing to our propensity to use 'int' to represent
> a length. If somebody really needs it, we can add a kvmalloc_large()
> later, but let's default to "You can't allocate that much memory".
I do agree that limiting kvmalloc allocation size is a reasonable thing
to do but I do not really see why we should remove the check from
seq_buf_alloc. Implicitly relying on kvmalloc to workaround a bug that
was in seq_buf code seems like a step backwards to me.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists