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]
Message-ID: <YmNAni3YH2fWFrSZ@carbon>
Date:   Fri, 22 Apr 2022 16:56:14 -0700
From:   Roman Gushchin <roman.gushchin@...ux.dev>
To:     David Vernet <void@...ifault.com>
Cc:     akpm@...ux-foundation.org, tj@...nel.org,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        cgroups@...r.kernel.org, hannes@...xchg.org, mhocko@...nel.org,
        shakeelb@...gle.com, kernel-team@...com
Subject: Re: [PATCH 5/5] cgroup: Fix racy check in alloc_pagecache_max_30M()
 helper function

On Fri, Apr 22, 2022 at 08:57:29AM -0700, David Vernet wrote:
> alloc_pagecache_max_30M() in the cgroup memcg tests performs a 50MB
> pagecache allocation, which it expects to be capped at 30MB due to the
> calling process having a memory.high setting of 30MB. After the allocation,
> the function contains a check that verifies that MB(29) < memory.current <=
> MB(30). This check can actually fail non-deterministically.
> 
> The testcases that use this function are test_memcg_high() and
> test_memcg_max(), which set memory.min and memory.max to 30MB respectively
> for the cgroup under test. The allocation can slightly exceed this number
> in both cases, and for memory.max, the process performing the allocation
> will not have the OOM killer invoked as it's performing a pagecache
> allocation.  This patchset therefore updates the above check to instead use
> the verify_close() helper function.
> 
> Signed-off-by: David Vernet <void@...ifault.com>

Acked-by: Roman Gushchin <roman.gushchin@...ux.dev>

Thanks, David!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ