Patchwork [1/5] sysvipc: Fix compat msgctl

login
register
mail settings
Submitter Adhemerval Zanella Netto
Date May 16, 2019, 3:12 p.m.
Message ID <20190516151249.19029-1-adhemerval.zanella@linaro.org>
Download mbox | patch
Permalink /patch/32711/
State New
Headers show

Comments

Adhemerval Zanella Netto - May 16, 2019, 3:12 p.m.
The __IPC64 flags is meant to be used to enable the new sysv struct
format when the architectures supports it (ARCH_WANT_IPC_PARSE_VERSION
config flag on Linux kernel).

This currently issue only affects alpha.

	* sysdeps/unix/sysv/linux/msgctl.c (__old_msgctl): Remove __IPC_64
	usage.
---
 sysdeps/unix/sysv/linux/msgctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Florian Weimer - May 16, 2019, 3:36 p.m.
* Adhemerval Zanella:

> The __IPC64 flags is meant to be used to enable the new sysv struct
> format when the architectures supports it (ARCH_WANT_IPC_PARSE_VERSION
> config flag on Linux kernel).

Doesn't this need a bug number (with a description of the impact in the
bug, if possible).

Thanks,
Florian
Adhemerval Zanella Netto - May 16, 2019, 7:06 p.m.
On 16/05/2019 12:36, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> The __IPC64 flags is meant to be used to enable the new sysv struct
>> format when the architectures supports it (ARCH_WANT_IPC_PARSE_VERSION
>> config flag on Linux kernel).
> 
> Doesn't this need a bug number (with a description of the impact in the
> bug, if possible).
> 
> Thanks,
> Florian
> 

I have opened https://sourceware.org/bugzilla/show_bug.cgi?id=24570 and
also updated locally it fixes it.

Patch

diff --git a/sysdeps/unix/sysv/linux/msgctl.c b/sysdeps/unix/sysv/linux/msgctl.c
index e4f78adda1..2d49567686 100644
--- a/sysdeps/unix/sysv/linux/msgctl.c
+++ b/sysdeps/unix/sysv/linux/msgctl.c
@@ -62,7 +62,7 @@  attribute_compat_text_section
 __old_msgctl (int msqid, int cmd, struct __old_msqid_ds *buf)
 {
 #ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
-  return INLINE_SYSCALL_CALL (msgctl, msqid, cmd | __IPC_64, buf);
+  return INLINE_SYSCALL_CALL (msgctl, msqid, cmd, buf);
 #else
   return INLINE_SYSCALL_CALL (ipc, IPCOP_msgctl, msqid, cmd, 0, buf);
 #endif