From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Christoph Lameter <clameter@sgi.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
ppc-dev <linuxppc-dev@ozlabs.org>,
paulus@samba.org, ak@suse.de, linux-mm@kvack.org
Subject: Re: [PATCH 2/3] Create compat_sys_migrate_pages
Date: Fri, 27 Oct 2006 10:28:34 +1000 [thread overview]
Message-ID: <20061027102834.5db261af.sfr@canb.auug.org.au> (raw)
In-Reply-To: <Pine.LNX.4.64.0610261158130.2802@schroedinger.engr.sgi.com>
[-- Attachment #1: Type: text/plain, Size: 1272 bytes --]
On Thu, 26 Oct 2006 12:00:30 -0700 (PDT) Christoph Lameter <clameter@sgi.com> wrote:
>
> On Thu, 26 Oct 2006, Stephen Rothwell wrote:
>
> > This is needed on bigendian 64bit architectures. The obvious way to do
> > this (taking the other compat_ routines in this file as examples) is to
> > use compat_alloc_user_space and copy the bitmasks back there, however you
> > cannot call compat_alloc_user_space twice for a single system call and
> > this method saves two copies of the bitmasks.
>
> Well this means also that sys_mbind and sys_set_mempolicy are also
> broken because these functions also use get_nodes().
No they aren't because they have compat routines that convert the bitmaps
before calling the "normal" syscall. They, importantly, only use
compat_alloc_user_space once each.
> Fixing get_nodes() to do the proper thing would fix all of these
> without having to touch sys_migrate_pages or creating a compat_ function
> (which usually is placed in kernel/compat.c)
You need the compat_ version of the syscalls to know if you were called
from a 32bit application in order to know if you may need to fixup the
bitmaps that are passed from/to user mode.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-10-27 0:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-26 3:26 [PATCH 1/3] Constify compat_get_bitmap argument Stephen Rothwell
2006-10-26 3:33 ` [PATCH 2/3] Create compat_sys_migrate_pages Stephen Rothwell
2006-10-26 3:34 ` [PATCH 3/3] [POWERPC] Wire up sys_migrate_pages Stephen Rothwell
2006-10-26 3:57 ` [PATCH 2/3] Create compat_sys_migrate_pages Stephen Rothwell
2006-10-26 23:04 ` Arnd Bergmann
2006-10-26 19:00 ` Christoph Lameter
2006-10-27 0:28 ` Stephen Rothwell [this message]
2006-10-27 13:24 ` Christoph Lameter
2006-10-30 5:29 ` Benjamin Herrenschmidt
2006-10-26 23:03 ` 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=20061027102834.5db261af.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=ak@suse.de \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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