* [parisc-linux] 2.4.23 semctl_broken -> semctl
@ 2003-12-04 10:27 Joel Soete
2003-12-04 21:03 ` Carlos O'Donell
0 siblings, 1 reply; 2+ messages in thread
From: Joel Soete @ 2003-12-04 10:27 UTC (permalink / raw)
To: parisc-linux
[-- Attachment #1: Type: text/plain, Size: 5240 bytes --]
Hi pa,
This is the last chunk I find interesting (as James and Carlos work iirc):
=========><=========
diff -NaurX dontdiff linux-2.4.23-pa1/arch/parisc/kernel/sys_parisc32.c linux-2.4.23-rc5-pa17/arch/parisc/kernel/sys_parisc32.c
--- linux-2.4.23-pa1/arch/parisc/kernel/sys_parisc32.c 2003-09-22 09:06:22.000000000
+0200
+++ linux-2.4.23-rc5-pa17/arch/parisc/kernel/sys_parisc32.c 2003-11-12 11:01:43.000000000
+0100
@@ -3196,12 +3196,10 @@
return sys_lseek(fd, offset, origin);
}
-asmlinkage long sys32_semctl_broken(int semid, int semnum, int cmd, union
semun arg)
+asmlinkage long sys32_semctl(int semid, int semnum, int cmd, union semun
arg)
{
union semun u;
- cmd &= ~IPC_64; /* should be removed together with the _broken suffix */
-
if (cmd == SETVAL) {
/* Ugh. arg is a union of int,ptr,ptr,ptr, so is 8 bytes.
* The int should be in the first 4, but our argument
diff -NaurX dontdiff linux-2.4.23-pa1/arch/parisc/kernel/sys_parisc.c linux-2.4.23-rc5-pa17/arch/parisc/kernel/sys_parisc.c
--- linux-2.4.23-pa1/arch/parisc/kernel/sys_parisc.c 2001-11-23 22:54:28.000000000
+0100
+++ linux-2.4.23-rc5-pa17/arch/parisc/kernel/sys_parisc.c 2003-11-12 11:01:00.000000000
+0100
@@ -153,106 +153,3 @@
return raddr;
}
-
-/*
- * FIXME, please remove this crap as soon as possible
- *
- * This is here to fix up broken glibc structures,
- * which are already fixed in newer glibcs
- */
-#include <linux/msg.h>
-#include <linux/sem.h>
-#include <linux/shm.h>
-#include "sys32.h"
-
-struct broken_ipc_perm
-{
- key_t key; /* Key. */
- uid_t uid; /* Owner's user ID. */
- gid_t gid; /* Owner's group ID. */
- uid_t cuid; /* Creator's user ID. */
- gid_t cgid; /* Creator's group ID. */
- unsigned short int mode; /* Read/write permission. */
- unsigned short int __pad1;
- unsigned short int seq; /* Sequence number. */
- unsigned short int __pad2;
- unsigned long int __unused1;
- unsigned long int __unused2;
-};
-
-struct broken_shmid64_ds {
- struct broken_ipc_perm shm_perm; /* operation perms */
- size_t shm_segsz; /* size of segment (bytes) */
-#ifndef __LP64__
- unsigned int __pad1;
-#endif
- __kernel_time_t shm_atime; /* last attach time */
-#ifndef __LP64__
- unsigned int __pad2;
-#endif
- __kernel_time_t shm_dtime; /* last detach time */
-#ifndef __LP64__
- unsigned int __pad3;
-#endif
- __kernel_time_t shm_ctime; /* last change time */
- __kernel_pid_t shm_cpid; /* pid of creator */
- __kernel_pid_t shm_lpid; /* pid of last operator */
- unsigned int shm_nattch; /* no. of current attaches */
- unsigned int __unused1;
- unsigned int __unused2;
-};
-
-static void convert_broken_perm (struct broken_ipc_perm *out, struct ipc64_perm
*in)
-{
- out->key = in->key;
- out->uid = in->uid;
- out->gid = in->gid;
- out->cuid = in->cuid;
- out->cgid = in->cgid;
- out->mode = in->mode;
- out->seq = in->seq;
-}
-
-static int copyout_broken_shmid64(struct broken_shmid64_ds *buf, struct
shmid64_ds *sbuf)
-{
- struct broken_shmid64_ds tbuf;
-
- memset(&tbuf, 0, sizeof tbuf);
- convert_broken_perm (&tbuf.shm_perm, &sbuf->shm_perm);
- tbuf.shm_segsz = sbuf->shm_segsz;
- tbuf.shm_atime = sbuf->shm_atime;
- tbuf.shm_dtime = sbuf->shm_dtime;
- tbuf.shm_ctime = sbuf->shm_ctime;
- tbuf.shm_cpid = sbuf->shm_cpid;
- tbuf.shm_lpid = sbuf->shm_lpid;
- tbuf.shm_nattch = sbuf->shm_nattch;
- return copy_to_user(buf, &tbuf, sizeof tbuf);
-}
-
-int sys_msgctl_broken(int msqid, int cmd, struct msqid_ds *buf)
-{
- return sys_msgctl (msqid, cmd & ~IPC_64, buf);
-}
-
-int sys_semctl_broken(int semid, int semnum, int cmd, union semun arg)
-{
- return sys_semctl (semid, semnum, cmd & ~IPC_64, arg);
-}
-
-int sys_shmctl_broken(int shmid, int cmd, struct shmid64_ds *buf)
-{
- struct shmid64_ds sbuf;
- int err;
-
- if (cmd & IPC_64) {
- cmd &= ~IPC_64;
- if (cmd == IPC_STAT || cmd == SHM_STAT) {
- KERNEL_SYSCALL(err, sys_shmctl, shmid, cmd, (struct shmid_ds *)&sbuf);
- if (err == 0)
- err = copyout_broken_shmid64((struct broken_shmid64_ds *)buf, &sbuf);
- return err;
- }
- }
- return sys_shmctl (shmid, cmd, (struct shmid_ds *)buf);
-}
-
diff -NaurX dontdiff linux-2.4.23-pa1/arch/parisc/kernel/syscall.S linux-2.4.23-rc5-pa17/arch/parisc/kernel/syscall.S
--- linux-2.4.23-pa1/arch/parisc/kernel/syscall.S 2003-08-26 07:42:18.000000000
+0200
+++ linux-2.4.23-rc5-pa17/arch/parisc/kernel/syscall.S 2003-11-12 11:03:22.000000000
+0100
@@ -577,15 +577,15 @@
ENTRY_DIFF(recvmsg)
ENTRY_SAME(semop) /* 185 */
ENTRY_SAME(semget)
- ENTRY_DIFF(semctl_broken)
+ ENTRY_DIFF(semctl)
ENTRY_DIFF(msgsnd)
ENTRY_DIFF(msgrcv)
ENTRY_SAME(msgget) /* 190 */
- ENTRY_SAME(msgctl_broken)
+ ENTRY_SAME(msgctl)
ENTRY_SAME(shmat_wrapper)
ENTRY_SAME(shmdt)
ENTRY_SAME(shmget)
- ENTRY_SAME(shmctl_broken) /* 195 */
+ ENTRY_SAME(shmctl) /* 195 */
ENTRY_SAME(ni_syscall) /* streams1 */
ENTRY_SAME(ni_syscall) /* streams2 */
ENTRY_SAME(lstat64)
========><========
hth,
Joel
-------------------------------------------------------------------------
Tiscali ADSL: 12 mois à 29,50 /mois! L'Internet rapide, c'est pour tout
le monde.
http://reg.tiscali.be/default.asp?lg=fr
[-- Attachment #2: arch_parisc_kernel_sys_parisc.c.patch --]
[-- Type: application/octet-stream, Size: 3262 bytes --]
diff -NaurX dontdiff linux-2.4.23-pa1/arch/parisc/kernel/sys_parisc.c linux-2.4.23-rc5-pa17/arch/parisc/kernel/sys_parisc.c
--- linux-2.4.23-pa1/arch/parisc/kernel/sys_parisc.c 2001-11-23 22:54:28.000000000 +0100
+++ linux-2.4.23-rc5-pa17/arch/parisc/kernel/sys_parisc.c 2003-11-12 11:01:00.000000000 +0100
@@ -153,106 +153,3 @@
return raddr;
}
-
-/*
- * FIXME, please remove this crap as soon as possible
- *
- * This is here to fix up broken glibc structures,
- * which are already fixed in newer glibcs
- */
-#include <linux/msg.h>
-#include <linux/sem.h>
-#include <linux/shm.h>
-#include "sys32.h"
-
-struct broken_ipc_perm
-{
- key_t key; /* Key. */
- uid_t uid; /* Owner's user ID. */
- gid_t gid; /* Owner's group ID. */
- uid_t cuid; /* Creator's user ID. */
- gid_t cgid; /* Creator's group ID. */
- unsigned short int mode; /* Read/write permission. */
- unsigned short int __pad1;
- unsigned short int seq; /* Sequence number. */
- unsigned short int __pad2;
- unsigned long int __unused1;
- unsigned long int __unused2;
-};
-
-struct broken_shmid64_ds {
- struct broken_ipc_perm shm_perm; /* operation perms */
- size_t shm_segsz; /* size of segment (bytes) */
-#ifndef __LP64__
- unsigned int __pad1;
-#endif
- __kernel_time_t shm_atime; /* last attach time */
-#ifndef __LP64__
- unsigned int __pad2;
-#endif
- __kernel_time_t shm_dtime; /* last detach time */
-#ifndef __LP64__
- unsigned int __pad3;
-#endif
- __kernel_time_t shm_ctime; /* last change time */
- __kernel_pid_t shm_cpid; /* pid of creator */
- __kernel_pid_t shm_lpid; /* pid of last operator */
- unsigned int shm_nattch; /* no. of current attaches */
- unsigned int __unused1;
- unsigned int __unused2;
-};
-
-static void convert_broken_perm (struct broken_ipc_perm *out, struct ipc64_perm *in)
-{
- out->key = in->key;
- out->uid = in->uid;
- out->gid = in->gid;
- out->cuid = in->cuid;
- out->cgid = in->cgid;
- out->mode = in->mode;
- out->seq = in->seq;
-}
-
-static int copyout_broken_shmid64(struct broken_shmid64_ds *buf, struct shmid64_ds *sbuf)
-{
- struct broken_shmid64_ds tbuf;
-
- memset(&tbuf, 0, sizeof tbuf);
- convert_broken_perm (&tbuf.shm_perm, &sbuf->shm_perm);
- tbuf.shm_segsz = sbuf->shm_segsz;
- tbuf.shm_atime = sbuf->shm_atime;
- tbuf.shm_dtime = sbuf->shm_dtime;
- tbuf.shm_ctime = sbuf->shm_ctime;
- tbuf.shm_cpid = sbuf->shm_cpid;
- tbuf.shm_lpid = sbuf->shm_lpid;
- tbuf.shm_nattch = sbuf->shm_nattch;
- return copy_to_user(buf, &tbuf, sizeof tbuf);
-}
-
-int sys_msgctl_broken(int msqid, int cmd, struct msqid_ds *buf)
-{
- return sys_msgctl (msqid, cmd & ~IPC_64, buf);
-}
-
-int sys_semctl_broken(int semid, int semnum, int cmd, union semun arg)
-{
- return sys_semctl (semid, semnum, cmd & ~IPC_64, arg);
-}
-
-int sys_shmctl_broken(int shmid, int cmd, struct shmid64_ds *buf)
-{
- struct shmid64_ds sbuf;
- int err;
-
- if (cmd & IPC_64) {
- cmd &= ~IPC_64;
- if (cmd == IPC_STAT || cmd == SHM_STAT) {
- KERNEL_SYSCALL(err, sys_shmctl, shmid, cmd, (struct shmid_ds *)&sbuf);
- if (err == 0)
- err = copyout_broken_shmid64((struct broken_shmid64_ds *)buf, &sbuf);
- return err;
- }
- }
- return sys_shmctl (shmid, cmd, (struct shmid_ds *)buf);
-}
-
[-- Attachment #3: arch_parisc_kernel_sys_parisc32.c.patch --]
[-- Type: application/octet-stream, Size: 833 bytes --]
diff -NaurX dontdiff linux-2.4.23-pa1/arch/parisc/kernel/sys_parisc32.c linux-2.4.23-rc5-pa17/arch/parisc/kernel/sys_parisc32.c
--- linux-2.4.23-pa1/arch/parisc/kernel/sys_parisc32.c 2003-09-22 09:06:22.000000000 +0200
+++ linux-2.4.23-rc5-pa17/arch/parisc/kernel/sys_parisc32.c 2003-11-12 11:01:43.000000000 +0100
@@ -3196,12 +3196,10 @@
return sys_lseek(fd, offset, origin);
}
-asmlinkage long sys32_semctl_broken(int semid, int semnum, int cmd, union semun arg)
+asmlinkage long sys32_semctl(int semid, int semnum, int cmd, union semun arg)
{
union semun u;
- cmd &= ~IPC_64; /* should be removed together with the _broken suffix */
-
if (cmd == SETVAL) {
/* Ugh. arg is a union of int,ptr,ptr,ptr, so is 8 bytes.
* The int should be in the first 4, but our argument
[-- Attachment #4: arch_parisc_kernel_syscall.S.patch --]
[-- Type: application/octet-stream, Size: 807 bytes --]
diff -NaurX dontdiff linux-2.4.23-pa1/arch/parisc/kernel/syscall.S linux-2.4.23-rc5-pa17/arch/parisc/kernel/syscall.S
--- linux-2.4.23-pa1/arch/parisc/kernel/syscall.S 2003-08-26 07:42:18.000000000 +0200
+++ linux-2.4.23-rc5-pa17/arch/parisc/kernel/syscall.S 2003-11-12 11:03:22.000000000 +0100
@@ -577,15 +577,15 @@
ENTRY_DIFF(recvmsg)
ENTRY_SAME(semop) /* 185 */
ENTRY_SAME(semget)
- ENTRY_DIFF(semctl_broken)
+ ENTRY_DIFF(semctl)
ENTRY_DIFF(msgsnd)
ENTRY_DIFF(msgrcv)
ENTRY_SAME(msgget) /* 190 */
- ENTRY_SAME(msgctl_broken)
+ ENTRY_SAME(msgctl)
ENTRY_SAME(shmat_wrapper)
ENTRY_SAME(shmdt)
ENTRY_SAME(shmget)
- ENTRY_SAME(shmctl_broken) /* 195 */
+ ENTRY_SAME(shmctl) /* 195 */
ENTRY_SAME(ni_syscall) /* streams1 */
ENTRY_SAME(ni_syscall) /* streams2 */
ENTRY_SAME(lstat64)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [parisc-linux] 2.4.23 semctl_broken -> semctl
2003-12-04 10:27 [parisc-linux] 2.4.23 semctl_broken -> semctl Joel Soete
@ 2003-12-04 21:03 ` Carlos O'Donell
0 siblings, 0 replies; 2+ messages in thread
From: Carlos O'Donell @ 2003-12-04 21:03 UTC (permalink / raw)
To: Joel Soete; +Cc: parisc-linux
On Thu, Dec 04, 2003 at 11:27:08AM +0100, Joel Soete wrote:
> diff -NaurX dontdiff linux-2.4.23-pa1/arch/parisc/kernel/sys_parisc32.c linux-2.4.23-rc5-pa17/arch/parisc/kernel/sys_parisc32.c
Testing.
c.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-12-04 21:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-04 10:27 [parisc-linux] 2.4.23 semctl_broken -> semctl Joel Soete
2003-12-04 21:03 ` Carlos O'Donell
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.