Re: [Qemu-devel] RFC: [0/11] EFAULT patch

2007-09-19 Thread Stuart Anderson
On Wed, 19 Sep 2007, J. Mayer wrote: The idea is great but there seem to be a problem in those patches: you directly cast syscall arguments, which are (or should be) target_ulong to pointers in the host environment. You should to use the g2h / h2g macros to get the pointer in the host memory

Re: [Qemu-devel] RFC: [0/11] EFAULT patch

2007-09-19 Thread Paul Brook
On Wednesday 19 September 2007, Stuart Anderson wrote: On Wed, 19 Sep 2007, J. Mayer wrote: The idea is great but there seem to be a problem in those patches: you directly cast syscall arguments, which are (or should be) target_ulong to pointers in the host environment. You should to use

Re: [Qemu-devel] RFC: [0/11] EFAULT patch

2007-09-19 Thread Stuart Anderson
On Wed, 19 Sep 2007, J. Mayer wrote: Then, the changes you've done, changing long arguments (which should be target_long to be correct, you can take a look at the last patch I sent on the list) to pointers, for example in function prototypes, are incorrect. I just went, and looked at the

Re: [Qemu-devel] RFC: [0/11] EFAULT patch

2007-09-19 Thread J. Mayer
On Wed, 2007-09-19 at 15:00 -0400, Stuart Anderson wrote: On Wed, 19 Sep 2007, J. Mayer wrote: Then, the changes you've done, changing long arguments (which should be target_long to be correct, you can take a look at the last patch I sent on the list) to pointers, for example in function

Re: [Qemu-devel] RFC: [0/11] EFAULT patch

2007-09-19 Thread Paul Brook
On Wednesday 19 September 2007, Stuart Anderson wrote: On Wed, 19 Sep 2007, J. Mayer wrote: Then, the changes you've done, changing long arguments (which should be target_long to be correct, you can take a look at the last patch I sent on the list) to pointers, for example in function

Re: [Qemu-devel] RFC: [0/11] EFAULT patch

2007-09-19 Thread Stuart Anderson
On Wed, 19 Sep 2007, Paul Brook wrote: No. We're doing more than most 32-64 syscall thunks. To a first approximation the syscall thunks can bindly zero extend all values. In qemu we need to know whether something is a pointer or a value. Isn't that was the code in do_syscall() does? or am I

[Qemu-devel] RFC: [0/11] EFAULT patch

2007-09-18 Thread Stuart Anderson
Following this message, are the 11 parts of the patch that implements EFAULT detection in the linux-user mode. Hopefully, this reflects what was discussed following the first RFC of this patch. Also, hopefully, it is easier to digest in smaller pieces like this. In short, the (un)lock_user*()

Re: [Qemu-devel] RFC: [0/11] EFAULT patch

2007-09-18 Thread J. Mayer
On Tue, 2007-09-18 at 20:59 -0400, Stuart Anderson wrote: Following this message, are the 11 parts of the patch that implements EFAULT detection in the linux-user mode. Hopefully, this reflects what was discussed following the first RFC of this patch. Also, hopefully, it is easier to digest in