From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vasily Averin Subject: Re: [PATCH v3 15/16] memcg: enable accounting for tty-related objects Date: Thu, 22 Apr 2021 16:59:01 +0300 Message-ID: <6e697a1f-936d-5ffe-d29f-e4dcbe099799@virtuozzo.com> References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Content-Type:MIME-Version:Date:Message-ID:From: Subject; bh=RJzqymK4KdLIflkHg7fNUFw31wIE7fLJRZ1fSy+vabc=; b=N8B30dAs7aOqNLVdf Pa0srpVl2C/DUZIitS8DKW0kYyfVEDKhbVoZUwnyMgTE6eqTAucI0+gS+PYci9Bt8ed2mRP6H7RDN mIzWS40A9nXNBXchcDS2WdywUiQLu4jFtZgs2aCnkUUhnDABY/ChQ338ZFkUxDGG4aWO56rQ9uzl8 =; In-Reply-To: Content-Language: en-US List-ID: Content-Type: text/plain; charset="us-ascii" To: Greg Kroah-Hartman , Michal Hocko Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Shakeel Butt , Johannes Weiner , Vladimir Davydov , Roman Gushchin , Jiri Slaby On 4/22/21 2:50 PM, Greg Kroah-Hartman wrote: > On Thu, Apr 22, 2021 at 01:44:59PM +0200, Michal Hocko wrote: >> On Thu 22-04-21 13:23:21, Greg KH wrote: >>> On Thu, Apr 22, 2021 at 01:37:53PM +0300, Vasily Averin wrote: >>>> At each login the user forces the kernel to create a new terminal and >>>> allocate up to ~1Kb memory for the tty-related structures. >>> >>> Does this tiny amount of memory actually matter? >> >> The primary question is whether an untrusted user can trigger an >> unbounded amount of these allocations. > > Can they? They are not bounded by some other resource limit? I'm not ready to provide usecase right now, but on the other hand I do not see any related limits. Let me take time out to dig this question. Thank you, Vasily Averin