[PATCH] uml: fix sysemu test at startup
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Bodo Stroesser <bodo.stroesser@fujitsu-siemens.com> Jeff Dike <jdike@addtoit.com> Currently, the test for the SYSEMU support on the host is completely wrong, as Bodo noticed. We should change the syscall result (inserting the host pid) and check if it is received correctly by the guest. What we actually do, without this patch, is to overwrite the syscall number. This went unnoticed because we only check that the getpid() syscall from the child does not return its pid. We don't check that it returns the correct value. Also, override the result portably, using the PT_SYSCALL_RET_OFFSET macro which abstract away the host stack frame layout (took from Jeff Dike code). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment