Fix IPC decoding on alpha and arm
* ipc.c (indirect_ipccall): Return 0 on ALPHA and ARM EABI. (sys_shmat): Use indirect_ipccall for proper return value decoding.
This commit is contained in:
20
ipc.c
20
ipc.c
@ -178,10 +178,10 @@ indirect_ipccall(struct tcb *tcp)
|
|||||||
#if defined IA64
|
#if defined IA64
|
||||||
return tcp->scno < 1024; /* ia32 emulation syscalls are low */
|
return tcp->scno < 1024; /* ia32 emulation syscalls are low */
|
||||||
#endif
|
#endif
|
||||||
#if !defined MIPS && !defined HPPA
|
#if defined(ALPHA) || defined(MIPS) || defined(HPPA) || defined(__ARM_EABI__)
|
||||||
return 1;
|
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sys_msgctl(struct tcb *tcp)
|
int sys_msgctl(struct tcb *tcp)
|
||||||
@ -404,8 +404,6 @@ int sys_shmctl(struct tcb *tcp)
|
|||||||
|
|
||||||
int sys_shmat(struct tcb *tcp)
|
int sys_shmat(struct tcb *tcp)
|
||||||
{
|
{
|
||||||
unsigned long raddr;
|
|
||||||
|
|
||||||
if (exiting(tcp)) {
|
if (exiting(tcp)) {
|
||||||
tprintf("%lu", tcp->u_arg[0]);
|
tprintf("%lu", tcp->u_arg[0]);
|
||||||
if (indirect_ipccall(tcp)) {
|
if (indirect_ipccall(tcp)) {
|
||||||
@ -419,12 +417,12 @@ int sys_shmat(struct tcb *tcp)
|
|||||||
}
|
}
|
||||||
if (syserror(tcp))
|
if (syserror(tcp))
|
||||||
return 0;
|
return 0;
|
||||||
/* HPPA does not use an IPC multiplexer on Linux. */
|
if (indirect_ipccall(tcp)) {
|
||||||
#if !defined(HPPA)
|
unsigned long raddr;
|
||||||
if (umove(tcp, tcp->u_arg[2], &raddr) < 0)
|
if (umove(tcp, tcp->u_arg[2], &raddr) < 0)
|
||||||
return RVAL_NONE;
|
return RVAL_NONE;
|
||||||
tcp->u_rval = raddr;
|
tcp->u_rval = raddr;
|
||||||
#endif
|
}
|
||||||
return RVAL_HEX;
|
return RVAL_HEX;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user