From: Andi Kleen <ak@muc.de>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linus <torvalds@transmeta.com>,
anton@samba.org, "David S. Miller" <davem@redhat.com>,
ak@muc.de, davidm@hpl.hp.com, schwidefsky@de.ibm.com,
ralf@gnu.org, matthew@wil.cx
Subject: Re: [PATCH][COMPAT] compat_sys_fcntl{,64} 1/9 Generic part
Date: Fri, 28 Feb 2003 09:08:47 +0100 [thread overview]
Message-ID: <20030228080847.GA29108@averell> (raw)
In-Reply-To: <20030228153349.600b73f7.sfr@canb.auug.org.au>
On Fri, Feb 28, 2003 at 05:33:49AM +0100, Stephen Rothwell wrote:
> +static int get_compat_flock(struct flock *kfl, struct compat_flock *ufl)
> +{
> + if (!access_ok(VERIFY_READ, ufl, sizeof(*ufl)) ||
> + __get_user(kfl->l_type, &ufl->l_type) ||
> + __get_user(kfl->l_whence, &ufl->l_whence) ||
> + __get_user(kfl->l_start, &ufl->l_start) ||
> + __get_user(kfl->l_len, &ufl->l_len) ||
> + __get_user(kfl->l_pid, &ufl->l_pid))
Perhaps there should be really a big fat comment on top of compat.c
that it depends on a hole on __PAGE_OFFSET if the arch allows passing
64bit pointers to the compat functions.
> +
> +asmlinkage long compat_sys_fcntl(unsigned int fd, unsigned int cmd,
> + unsigned long arg)
> +{
> + if ((cmd == F_GETLK64) || (cmd == F_SETLK64) || (cmd == F_SETLKW64))
> + return -EINVAL;
That won't work for IA32 emulation. There are programs that call
old style fcntl() with F_*LK64. Just drop the if here.
> + return compat_sys_fcntl64(fd, cmd, arg);
-Andi
next prev parent reply other threads:[~2003-02-28 7:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-28 4:33 [PATCH][COMPAT] compat_sys_fcntl{,64} 1/9 Generic part Stephen Rothwell
2003-02-28 8:08 ` Andi Kleen [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-02-28 9:50 sfr
2003-02-28 10:36 ` Andi Kleen
2003-03-01 9:12 ` Anton Blanchard
2003-03-04 5:58 Stephen Rothwell
2003-03-10 12:43 Arnd Bergmann
2003-03-11 0:41 Stephen Rothwell
2003-03-11 12:20 Martin Schwidefsky
2003-03-12 4:44 ` Stephen Rothwell
2003-03-12 5:02 ` Linus Torvalds
2003-03-12 5:22 ` Stephen Rothwell
2003-03-12 5:26 ` Linus Torvalds
2003-03-12 5:57 ` Stephen Rothwell
2003-03-12 11:46 ` David S. Miller
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=20030228080847.GA29108@averell \
--to=ak@muc.de \
--cc=anton@samba.org \
--cc=davem@redhat.com \
--cc=davidm@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=ralf@gnu.org \
--cc=schwidefsky@de.ibm.com \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@transmeta.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.