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:   Mon, 16 Sep 2019 19:43:16 +0000
From:   Song Liu <songliubraving@...com>
To:     LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>
CC:     Kernel Team <Kernel-team@...com>, Jie Meng <jmeng@...com>,
        Hechao Li <hechaol@...com>
Subject: Re: [PATCH] perf: rework memory accounting in perf_mmap()

Hi Peter,

> On Sep 4, 2019, at 2:46 PM, Song Liu <songliubraving@...com> wrote:
> 
> perf_mmap() always increases user->locked_vm. As a result, "extra" could
> grow bigger than "user_extra", which doesn't make sense. Here is an
> example case:
> 
> Note: Assume "user_lock_limit" is very small.
> | # of perf_mmap calls |vma->vm_mm->pinned_vm|user->locked_vm|
> | 0                    | 0                   | 0             |
> | 1                    | user_extra          | user_extra    |
> | 2                    | 3 * user_extra      | 2 * user_extra|
> | 3                    | 6 * user_extra      | 3 * user_extra|
> | 4                    | 10 * user_extra     | 4 * user_extra|
> 
> Fix this by maintaining proper user_extra and extra.
> 
> Reported-by: Hechao Li <hechaol@...com>
> Cc: Jie Meng <jmeng@...com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Signed-off-by: Song Liu <songliubraving@...com>

Could you please share your feedbacks/comments on this one?

Thanks,
Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ