|
From: | Fabrice Bellard |
Subject: | Re: [Qemu-devel] [PATCH] linux-user sysinfo support & do_sigreturn fix for i386-user |
Date: | Sat, 19 Jun 2004 19:01:30 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 |
François Guimond wrote:
First is the fix to signal handling. When I paid attention to strace's changes in sigprocmask, I realize that masks entering linux-user's signal processing handler would be wrong leaving the handler. Upon further investigation I noticed that the mask was getting written in the sig frame using __put_user but getting restored by simple assignment, so in this case it would result in the wrong value as qemu-i386 was running on a PowerPC with a different endianess than a x86. Looking around in the code I saw the 'generic' do_sigreturn used __get_user properly to retrieve it, so I copied over that bit of code into the x86 do_sigreturn, and it fixed the deadlock problem I was experiencing (which was caused by wrong sigprocmask). Here's the related patch:
The code was buggy, but your patch is still not correct. I tried to make a correction. Try it !
The next problem I was running into was the sysinfo not implemented syscall. The problem would just run in a loop waiting to get a decent result from it, so I had to implement (so far tested by me and two others, all running PowerMac G3s with qemu-i386 as the target).
OK. A small note: it is better now to use __get_user() and __put_user() to access to the target memory.
Fabrice.
[Prev in Thread] | Current Thread | [Next in Thread] |