Issue with msgrcv in a 32-bit application and -ve argument
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Fix Released
|
Undecided
|
Tim Gardner | ||
Utopic |
Fix Released
|
Undecided
|
Unassigned | ||
Vivid |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
== Comment: #0 - R. Wilson <email address hidden> - 2014-11-13 08:11:01 ==
---Problem Description---
system call msgrcv() from 32-bit application shows error: msgrcv: No message of desired type
The following upstream commit resolves the issue.
commit e7ca2552369c1df
Author: Mateusz Guzik <email address hidden>
Date: Mon Jan 27 17:07:11 2014 -0800
ipc: fix compat msgrcv with negative msgtyp
Compat function takes msgtyp argument as u32 and passes it down to
do_msgrcv which results in casting to long, thus the sign is lost and we
get a big positive number instead.
Cast the argument to signed type before passing it down.
We now hit the problem on Ubuntu 14_04 and need to know if a similar patch is forthcoming.
---uname output---
Linux ctg-a-il-u1 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Machine Type = VMware guest
---Debugger---
A debugger is not configured
---Steps to Reproduce---
Compile test applications using gcc -m32 -o <name> <name.c>
Run test application testmsgs to send a message to a queue
Run test application testmsgr that *should* retriieve message sent by testmsgs
Observe that testmsgr does not retrieve message
Repeat test, compilling with -m64 instead - applications work as expected
Stack trace output:
no
Oops output:
no
Userspace tool common name: custom application designed to replicate problem
The userspace tool has the following bit modes: 32-bit
System Dump Info:
The system is not configured to capture a system dump.
== Comment: #2 - R. Wilson <email address hidden> - 2014-11-13 08:15:25 ==
Back trace for testmsgr:
(gdb) bt
#0 0xf777c430 in __kernel_vsyscall ()
#1 0xf76a4660 in msgrcv () from /lib32/libc.so.6
#2 0x08048573 in main ()
(gdb)
The msgrcv *should* have returned immediately as the message was placed on the queue by testmsgs
affects: | ubuntu → linux |
affects: | linux → linux (Ubuntu) |
Changed in linux (Ubuntu): | |
status: | New → Incomplete |
status: | Incomplete → Confirmed |
tags: | added: kernel-da-key |
Changed in linux (Ubuntu Utopic): | |
status: | New → Fix Released |
Changed in linux (Ubuntu Vivid): | |
status: | Confirmed → Fix Released |
Changed in linux (Ubuntu Trusty): | |
assignee: | nobody → Tim Gardner (timg-tpi) |
status: | New → In Progress |
Changed in linux (Ubuntu Trusty): | |
status: | In Progress → Fix Committed |
tags: |
added: targetmilestone-inin14042 removed: targetmilestone-inin--- |
Default Comment by Bridge