From: Baoquan He <bhe@redhat.com>
To: Uladzislau Rezki <urezki@gmail.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Kees Cook <keescook@chromium.org>,
linux-mm@kvack.org, Zorro Lang <zlang@redhat.com>,
linux-xfs@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH 1/3] usercopy: Handle vm_map_ram() areas
Date: Mon, 13 Jun 2022 19:52:20 +0800 [thread overview]
Message-ID: <Yqck9GUI8B7mUx4N@MiWiFi-R3L-srv> (raw)
In-Reply-To: <YqcKw4AxxvEWtLmS@pc638.lan>
On 06/13/22 at 12:00pm, Uladzislau Rezki wrote:
> > vmalloc does not allocate a vm_struct for vm_map_ram() areas. That causes
> > us to deny usercopies from those areas. This affects XFS which uses
> > vm_map_ram() for its directories.
> >
> > Fix this by calling find_vmap_area() instead of find_vm_area().
> >
> > Fixes: 0aef499f3172 ("mm/usercopy: Detect vmalloc overruns")
> > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> > ---
> > include/linux/vmalloc.h | 1 +
> > mm/usercopy.c | 8 +++++---
> > mm/vmalloc.c | 2 +-
> > 3 files changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
> > index b159c2789961..096d48aa3437 100644
> > --- a/include/linux/vmalloc.h
> > +++ b/include/linux/vmalloc.h
> > @@ -215,6 +215,7 @@ extern struct vm_struct *__get_vm_area_caller(unsigned long size,
> > void free_vm_area(struct vm_struct *area);
> > extern struct vm_struct *remove_vm_area(const void *addr);
> > extern struct vm_struct *find_vm_area(const void *addr);
> > +struct vmap_area *find_vmap_area(unsigned long addr);
> Make it "extern" since it becomes globally visible?
extern is not suggested any more to add for function declaration in
header file, and removing it doesn't impact thing.
>
> --
> Uladzislau Rezki
>
next prev parent reply other threads:[~2022-06-13 14:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-12 21:32 [PATCH 0/3] Fixes for usercopy Matthew Wilcox (Oracle)
2022-06-12 21:32 ` [PATCH 1/3] usercopy: Handle vm_map_ram() areas Matthew Wilcox (Oracle)
2022-06-13 10:00 ` Uladzislau Rezki
2022-06-13 11:52 ` Baoquan He [this message]
2022-06-13 12:56 ` Uladzislau Rezki
2022-06-13 16:23 ` Kees Cook
2022-06-13 16:44 ` Matthew Wilcox
2022-06-13 17:02 ` Uladzislau Rezki
2022-06-13 17:04 ` Kees Cook
2022-06-12 21:32 ` [PATCH 2/3] usercopy: Cast pointer to an integer once Matthew Wilcox (Oracle)
2022-06-13 9:51 ` Uladzislau Rezki
2022-06-13 16:20 ` Kees Cook
2022-06-13 16:27 ` Uladzislau Rezki
2022-06-12 21:32 ` [PATCH 3/3] usercopy: Make usercopy resilient against ridiculously large copies Matthew Wilcox (Oracle)
2022-06-13 9:57 ` Uladzislau Rezki
2022-06-13 8:04 ` [PATCH 0/3] Fixes for usercopy Zorro Lang
2022-06-13 16:25 ` Kees Cook
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=Yqck9GUI8B7mUx4N@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=urezki@gmail.com \
--cc=willy@infradead.org \
--cc=zlang@redhat.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.