socket type mapping wrong for mips app-level emulation

Bug #1075272 reported by Bugdal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

linux-user/syscall.c's do_socket function contains socket type remapping to work around the nonsensically-permuted MIPS socket types. However, it fails to account for the SOCK_NONBLOCK and SOCK_CLOEXEC flags that may be or'd onto the type. Thus, a call from the application such as:

socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)

will fail to have the type permutation performed, and will be passed to the system as:

socket(AF_INET, SOCK_DGRAM, IPPROTO_TCP)

resulting in EPROTONOSUPPORT.

To fix this, the flag bits should be masked off of the type before the permutation. They also need remapping themselves (since MIPS uses different values for these flags bits).

Revision history for this message
Peter Maydell (pmaydell) wrote :

This should be fixed in QEMU 1.6.

Changed in qemu:
status: New → Fix Committed
Peter Maydell (pmaydell)
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.