lkml.org 
[lkml]   [2004]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 2.6.9-rc1-mm3] [m32r] Modify sys_ipc() to remove useless iBCS2 support code
From
Hi, 

From: Christoph Hellwig <hch@infradead.org>
Date: Fri, 3 Sep 2004 10:54:23 +0100
> On Fri, Sep 03, 2004 at 01:48:11AM -0700, Andrew Morton wrote:
> >
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc1/2.6.9-rc1-mm3/
> >
> > - Added the m32r architecture. Haven't looked at it yet.
>
> More comments.
Thank you for your sending comments.

> - please don't implement ancient backward-compat syscalls in a new
> port (that's why we made those conditional on __ARCH_WANT_* in unistd.h,
> but see also old_ in your arch code and the totally useless iBCS2
> hack in the sysv ipc code)
> - your probably want to run all this code through sparse and fix warnings
>

The useless iBCS2 supporting code is removed.

However, according to old_ syscalls, I would like to keep backward-
compatibility for a while, due to some old deb packages and
executables for m32r.
I'm struggling to rebuild and replace old packages to new ones.
http://debian.linux-m32r.org/


Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>

sys_m32r.c | 25 ++++++++++---------------
1 files changed, 10 insertions(+), 15 deletions(-)


--- linux-2.6.9-rc1-mm3.orig/arch/m32r/kernel/sys_m32r.c 2004-09-03 20:46:13.000000000 +0900
+++ linux-2.6.9-rc1-mm3/arch/m32r/kernel/sys_m32r.c 2004-09-06 18:48:33.000000000 +0900
@@ -227,21 +227,16 @@ asmlinkage int sys_ipc(uint call, int fi
case MSGCTL:
return sys_msgctl (first, second,
(struct msqid_ds __user *) ptr);
- case SHMAT:
- switch (version) {
- default: {
- ulong raddr;
- ret = do_shmat (first, (char __user *) ptr,
- second, &raddr);
- if (ret)
- return ret;
- return put_user (raddr, (ulong __user *) third);
- }
- case 1: /* iBCS2 emulator entry point */
- if (!segment_eq(get_fs(), get_ds()))
- return -EINVAL;
- return do_shmat (first, (char __user *) ptr,
- second, (ulong *) third);
+ case SHMAT: {
+ ulong raddr;
+
+ if ((ret = verify_area(VERIFY_WRITE, (ulong __user *) third,
+ sizeof(ulong))))
+ return ret;
+ ret = do_shmat (first, (char __user *) ptr, second, &raddr);
+ if (ret)
+ return ret;
+ return put_user (raddr, (ulong __user *) third);
}
case SHMDT:
return sys_shmdt ((char __user *)ptr);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.181 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site