lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 28 Oct 2017 19:39:00 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     Amir Goldstein <amir73il@...il.com>
Cc:     Yang Shi <yang.s@...baba-inc.com>, Jan Kara <jack@...e.cz>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        linux-mm@...ck.org, linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] fs: fsnotify: account fsnotify metadata to kmemcg

On Sat, Oct 28, 2017 at 05:19:36PM +0300, Amir Goldstein wrote:
> <suggest rephrase>
> Due to the current design of kmemcg, the memcg of the process who does the
> allocation gets the accounting, so event allocations get accounted for
> the memcg of
> the event producer process, even though the misbehaving process is the listener.
> The event allocations won't be freed if the producer exits, only if
> the listener exists.
> Nevertheless, it is still better to account event allocations to memcg
> of producer
> process and not to root memcg, because heuristically producer is many
> time in the
> same memcg as the listener. For example, this is the case with listeners inside
> containers that listen on events for files or mounts that are private
> to the container.
> <\suggest rephrase>

Well, if we're nitpicking ...

Due to the current design of kmemcg, the event allocation is accounted to
the memcg of the process producing the event, even though the misbehaving
process is the listener.  The event allocations won't be freed if the
producer exits, only if the listener exits.  Nevertheless, it is still
better to account event allocations to the producer's memcg than the
root memcg, because the producer is frequently in the same memcg as
the listener.  For example, this is the case with listeners inside
containers that listen to events for files or mounts that are private
to the container.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ