From: Andrew Morton <akpm@linux-foundation.org>
To: "Arnd Bergmann" <arnd@arndb.de>
Cc: "Gregory Price" <gourry.memverge@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
"Gregory Price" <gregory.price@memverge.com>
Subject: Re: [PATCH] mm/migrate: fix do_pages_move for compat pointers
Date: Tue, 3 Oct 2023 10:17:17 -0700 [thread overview]
Message-ID: <20231003101717.f57af0208431dba6dac0357e@linux-foundation.org> (raw)
In-Reply-To: <f8d621c8-f5eb-4ba6-ab25-d3f782562abd@app.fastmail.com>
On Tue, 03 Oct 2023 19:01:45 +0200 "Arnd Bergmann" <arnd@arndb.de> wrote:
> On Tue, Oct 3, 2023, at 18:57, Arnd Bergmann wrote:
> > On Tue, Oct 3, 2023, at 18:49, Andrew Morton wrote:
> >> On Tue, 3 Oct 2023 10:48:56 -0400 Gregory Price
> >> <gourry.memverge@gmail.com> wrote:
> >>
> >>> do_pages_move does not handle compat pointers for the page list.
> >>> correctly. Add in_compat_syscall check and appropriate get_user
> >>> fetch when iterating the page list.
> >>
> >> What are the userspace visible effects of this change?
> >
> > It makes the syscall in compat mode (32-bit userspace, 64-bit kernel)
> > work the same way as the native 32-bit syscall again, restoring the
> > behavior before my broken commit 5b1b561ba73c ("mm: simplify
> > compat_sys_move_pages").
>
> More specifically, my patch moved the parsing of the 'pages'
> array from the main entry point into do_pages_stat(), which left
> the syscall working correctly for the 'stat' operation (nodes = NULL),
> while the 'move' operation (nodes != NULL) is now missing
> the conversion and interprets 'pages' as an array of 64-bit
> pointers instead of the intended 32-bit userspace pointers.
>
Thanks. So is a cc:stable warranted?
next prev parent reply other threads:[~2023-10-03 17:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-03 14:48 [PATCH] mm/migrate: fix do_pages_move for compat pointers Gregory Price
2023-10-03 14:48 ` [PATCH 2/2] mm/migrate: remove unused mm argument from do_move_pages_to_node Gregory Price
2023-10-03 16:49 ` [PATCH] mm/migrate: fix do_pages_move for compat pointers Andrew Morton
2023-10-03 16:57 ` Arnd Bergmann
2023-10-03 17:01 ` Arnd Bergmann
2023-10-03 17:17 ` Andrew Morton [this message]
2023-10-03 17:36 ` Arnd Bergmann
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=20231003101717.f57af0208431dba6dac0357e@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=gourry.memverge@gmail.com \
--cc=gregory.price@memverge.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 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.