All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Jeff Xu <jeffxu@chromium.org>
Cc: Kees Cook <keescook@chromium.org>,
	srikar@linux.vnet.ibm.com, Ryan Roberts <ryan.roberts@arm.com>,
	"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"glider@google.com" <glider@google.com>,
	Matthew Wilcox <willy@infradead.org>,
	zokeefe@google.com, hughd@google.com, luto@amacapital.net,
	"jmarchan@redhat.com" <jmarchan@redhat.com>,
	"rientjes@google.com" <rientjes@google.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: question on [uprobes] special vma
Date: Fri, 2 Aug 2024 11:00:40 +0200	[thread overview]
Message-ID: <20240802090040.GB12343@redhat.com> (raw)
In-Reply-To: <CABi2SkU9BRUnqf70-nksuMCQ+yyiWjo3fM4XkRkL-NrCZxYAyg@mail.gmail.com>

Hi Jeff,

On 08/01, Jeff Xu wrote:
>
> __create_xol_area() calls  _install_special_mapping() to create a vma
> named [uprobes].
>
> I'm trying to find out the lifetime of this uprobes vma, e.g. when it
> is created, will it ever be unmapped/remapped/changed during the
> lifetime of the process.
>
> If  the uprobes vma remains the same during the lifetime of the
> process,

Yes,

> I can call mseal on it so user space can't change it, i.e.
> blocking munmap/mremap/mprotect/mmap, etc.

I didn't even know about mm/mseal.c...

at first glance do_mseal() just adds VM_SEALED for can_modify_vma().

So it seems that xol_add_vma() can just pass the additional VM_SEALED
flag to _install_special_mapping(), no?

But why it depends on CONFIG_64_BIT?

Oleg.



  reply	other threads:[~2024-08-02  9:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-01 23:38 question on [uprobes] special vma Jeff Xu
2024-08-02  9:00 ` Oleg Nesterov [this message]
2024-08-02 14:59   ` Jeff Xu
2024-08-02 22:21     ` Oleg Nesterov

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=20240802090040.GB12343@redhat.com \
    --to=oleg@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=glider@google.com \
    --cc=hughd@google.com \
    --cc=jeffxu@chromium.org \
    --cc=jmarchan@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=rientjes@google.com \
    --cc=ryan.roberts@arm.com \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=willy@infradead.org \
    --cc=zokeefe@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.