From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: [PATCH] 2.5.39 s390 (11/26): 31bit emulation.
Date: Mon, 30 Sep 2002 14:55:37 +0200 [thread overview]
Message-ID: <200209301455.37832.schwidefsky@de.ibm.com> (raw)
Fix bug in 31 bit emulation of sys_msgsnd and rename sys32_pread/sys32_pwrite
to sys32_pread64/sys32_pwrite64.
diff -urN linux-2.5.39/arch/s390x/kernel/linux32.c linux-2.5.39-s390/arch/s390x/kernel/linux32.c
--- linux-2.5.39/arch/s390x/kernel/linux32.c Mon Sep 30 13:25:30 2002
+++ linux-2.5.39-s390/arch/s390x/kernel/linux32.c Mon Sep 30 13:32:17 2002
@@ -514,16 +514,15 @@
if (!p)
return -ENOMEM;
+ err = -EINVAL;
if (second > MSGMAX || first < 0 || second < 0)
- return -EINVAL;
+ goto out;
err = -EFAULT;
if (!uptr)
goto out;
-
- err = get_user (p->mtype, &up->mtype);
- err |= __copy_from_user (p->mtext, &up->mtext, second);
- if (err)
+ if (get_user (p->mtype, &up->mtype) ||
+ __copy_from_user (p->mtext, &up->mtext, second))
goto out;
old_fs = get_fs ();
set_fs (KERNEL_DS);
@@ -3997,13 +3996,13 @@
typedef __kernel_ssize_t32 ssize_t32;
-asmlinkage ssize_t32 sys32_pread(unsigned int fd, char *ubuf,
+asmlinkage ssize_t32 sys32_pread64(unsigned int fd, char *ubuf,
__kernel_size_t32 count, u32 poshi, u32 poslo)
{
return sys_pread64(fd, ubuf, count, ((loff_t)AA(poshi) << 32) | AA(poslo));
}
-asmlinkage ssize_t32 sys32_pwrite(unsigned int fd, char *ubuf,
+asmlinkage ssize_t32 sys32_pwrite64(unsigned int fd, char *ubuf,
__kernel_size_t32 count, u32 poshi, u32 poslo)
{
return sys_pwrite64(fd, ubuf, count, ((loff_t)AA(poshi) << 32) | AA(poslo));
diff -urN linux-2.5.39/arch/s390x/kernel/wrapper32.S linux-2.5.39-s390/arch/s390x/kernel/wrapper32.S
--- linux-2.5.39/arch/s390x/kernel/wrapper32.S Mon Sep 30 13:25:30 2002
+++ linux-2.5.39-s390/arch/s390x/kernel/wrapper32.S Mon Sep 30 13:32:17 2002
@@ -872,23 +872,23 @@
#sys32_rt_sigsuspend_wrapper # done in rt_sigsuspend_glue
- .globl sys32_pread_wrapper
-sys32_pread_wrapper:
+ .globl sys32_pread64_wrapper
+sys32_pread64_wrapper:
llgfr %r2,%r2 # unsigned int
llgtr %r3,%r3 # char *
llgfr %r4,%r4 # size_t
llgfr %r5,%r5 # u32
llgfr %r6,%r6 # u32
- jg sys32_pread # branch to system call
+ jg sys32_pread64 # branch to system call
- .globl sys32_pwrite_wrapper
-sys32_pwrite_wrapper:
+ .globl sys32_pwrite64_wrapper
+sys32_pwrite64_wrapper:
llgfr %r2,%r2 # unsigned int
llgtr %r3,%r3 # const char *
llgfr %r4,%r4 # size_t
llgfr %r5,%r5 # u32
llgfr %r6,%r6 # u32
- jg sys32_pwrite # branch to system call
+ jg sys32_pwrite64 # branch to system call
.globl sys32_chown16_wrapper
sys32_chown16_wrapper:
reply other threads:[~2002-09-30 13:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200209301455.37832.schwidefsky@de.ibm.com \
--to=schwidefsky@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®