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] [day] [month] [year] [list]
Date:   Tue, 6 Dec 2022 22:48:43 +0100
From:   Vlastimil Babka <vbabka@...e.cz>
To:     "Jason A. Donenfeld" <Jason@...c4.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Cc:     Eric B Munson <emunson@...mai.com>,
        "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] mm: do not show ?? for VM_LOCKONFAULT pages

On 12/5/22 18:30, Jason A. Donenfeld wrote:
> When VM_LOCKONFAULT was added, /proc/PID/smaps wasn't hooked up to it,
> so looking at /proc/PID/smaps, it shows '??' instead of something
> intelligable. This can be reached by userspace by simply calling
> `mlock2(..., MLOCK_ONFAULT);`.
> 
> Fix this by adding "lf" to denote VM_LOCKONFAULT.
> 
> Cc: Eric B Munson <emunson@...mai.com>
> Cc: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> Cc: Vlastimil Babka <vbabka@...e.cz>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Fixes: de60f5f10c58 ("mm: introduce VM_LOCKONFAULT")
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>

Acked-by: Vlastimil Babka <vbabka@...e.cz>

> ---
>  fs/proc/task_mmu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index 8a74cdcc9af0..60851e96530b 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -667,6 +667,7 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma)
>  		[ilog2(VM_RAND_READ)]	= "rr",
>  		[ilog2(VM_DONTCOPY)]	= "dc",
>  		[ilog2(VM_DONTEXPAND)]	= "de",
> +		[ilog2(VM_LOCKONFAULT)]	= "lf",
>  		[ilog2(VM_ACCOUNT)]	= "ac",
>  		[ilog2(VM_NORESERVE)]	= "nr",
>  		[ilog2(VM_HUGETLB)]	= "ht",

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ