linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Eric B Munson <emunson@akamai.com>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm: do not show ?? for VM_LOCKONFAULT pages
Date: Tue, 6 Dec 2022 22:48:43 +0100	[thread overview]
Message-ID: <8a8f5758-365e-d716-de06-3963d7b7ec43@suse.cz> (raw)
In-Reply-To: <20221205173007.580210-1-Jason@zx2c4.com>

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@akamai.com>
> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Vlastimil Babka <vbabka@suse.cz>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Fixes: de60f5f10c58 ("mm: introduce VM_LOCKONFAULT")
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

Acked-by: Vlastimil Babka <vbabka@suse.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",



      reply	other threads:[~2022-12-06 21:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05 17:30 Jason A. Donenfeld
2022-12-06 21:48 ` Vlastimil Babka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a8f5758-365e-d716-de06-3963d7b7ec43@suse.cz \
    --to=vbabka@suse.cz \
    --cc=Jason@zx2c4.com \
    --cc=akpm@linux-foundation.org \
    --cc=emunson@akamai.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox