Re: [Qemu-devel] [PATCH] zero/NULL fixes.

2008-01-09 Thread Thayne Harbaugh
FAULT and zero/NULL patches that haven't been included. Right now I simply haven't tracked which patches have been incorporated and which ones are pending. Thanks for the interest. > 2007/12/11, Thayne Harbaugh <[EMAIL PROTECTED]>: > > The EFAULT changes use a result of NULL to

[Qemu-devel] PPC linux-user

2007-12-26 Thread Thayne Harbaugh
I'm wondering if there's a known problem with PPC linux-user. It appears that static binaries work, but those that are dynamically linked seem to always fail in the same way: ./ppc-linux-user/c2-qemu-ppc -L /var/chroots/ppc /var/chroots/ppc/bin/ls / Invalid data memory access: 0x662c2008 NIP 4008

[Qemu-devel] [BUG][PATCH] DEBUG_REMAP

2007-12-19 Thread Thayne Harbaugh
This fixes a compile error for a variable that wasn't changed (it was previously renamed to make the variable more descriptive). It also adds "#include " for prototypes of malloc() and free(). Index: qemu/linux-user/qemu.h === --- qem

[Qemu-devel] [BUG][PATCH] check socklen_t values in linux-user

2007-12-17 Thread Thayne Harbaugh
Qemu doesn't check socklen_t values before using them. If a value is provided that is large (say -1) then qemu will merrily use it in alloca() (which will blow the stack). The kernel checks all socklen_t values for < 0 or > MAX_SOCK_ADDR. This patch mimics the kernel behavior - which prevents SE

[Qemu-devel] [BUG][PATCH] setsockopt() errno

2007-12-12 Thread Thayne Harbaugh
linux-user setsockopt() doesn't return the correct errno for certain cases. This fixes errno for unsupported levels. It's similar to the bug in getsockopt(). Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 200

[Qemu-devel] [BUG][PATCH] nanosleep doesn't write remaining time

2007-12-12 Thread Thayne Harbaugh
nanosleep() doesn't write remaining time if there's an error - but it's when return value == -1 and errno == EINTR when the remaining time must be written. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-12

[Qemu-devel] [BUG][PATCH] getsockopt() errno

2007-12-12 Thread Thayne Harbaugh
linux-user getsockopt() doesn't return the correct errnos for certain cases. This fixes errnos for unsupported levels and unsupported SOL_IP option names. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-12

Re: [Qemu-devel] [PATCH] arm eabi TLS

2007-12-12 Thread Thayne Harbaugh
On Thu, 2007-12-13 at 01:21 +, Paul Brook wrote: > > - It would be good to limit the changes in the CPU emulation code to > > handle the TLS. For example, on MIPS, the TLS register must not be > > stored in the CPU state. Same for ARM. > > I disagree. The TLS register is part of the CPU state

[Qemu-devel] [BUG][PATCH] signal termination (48_signal_terminate.patch)

2007-12-12 Thread Thayne Harbaugh
Qemu doesn't exit with the proper code when dieing from an uncaught signal. Exit codes for uncaught signals are -. Unfortunately the kernel filters values from exit() and _exit(). A solution is to actually die from an uncaught signal. This patch detects an uncaught signal, installs the default

[Qemu-devel] [BUG][PATCH] signal translation (48_signal_xlate.ptach)

2007-12-12 Thread Thayne Harbaugh
There are some places where target signals and host signals aren't correctly differentiated. This patch addresses proper signal translation between target and host. * Changes variable names to be more explicit about target and host signals. * Calls target_to_host_signal() and host_to_target_sign

[Qemu-devel] [PATCH] m68k missing get_sp_from_cpustate()

2007-12-12 Thread Thayne Harbaugh
This patch adds the missing get_sp_from_cpustate() for m68k. Index: qemu/linux-user/m68k/target_signal.h === --- qemu.orig/linux-user/m68k/target_signal.h 2007-12-11 10:33:23.0 -0700 +++ qemu/linux-user/m68k/target_signal.h 200

[Qemu-devel] [PATCH] QEMU_STRACE documentation

2007-12-11 Thread Thayne Harbaugh
This patch adds documentation for the QEMU_STRACE environment setting. Index: qemu/qemu-doc.texi === --- qemu.orig/qemu-doc.texi 2007-12-11 19:00:53.0 -0700 +++ qemu/qemu-doc.texi 2007-12-11 19:16:28.0 -0700 @@ -2437,6

[Qemu-devel] [PATCH] futimesat()

2007-12-11 Thread Thayne Harbaugh
This futimesat() patch for linux-user was never applied. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-11-20 21:02:40.0 -0700 +++ qemu/linux-user/syscall.c 2007-11-20 21:03:59.0 -0700 @@ -

[Qemu-devel] [PATCH] arm eabi TLS

2007-12-11 Thread Thayne Harbaugh
I believe Paul Brook did the original patch for arm eabi TLS. The patch has bounced around for a bit but hasn't been applied. We've been using this patch for a while and have tweaked it to be a bit more correct as far as code organization. Please let me know what else should be improved for this

[Qemu-devel] [PATCH] zero/NULL fixes.

2007-12-11 Thread Thayne Harbaugh
The EFAULT changes use a result of NULL to detect a failure from lock*() functions. There are syscalls that accept NULL as a valid argument and now the syscalls return -EFAULT. These patches allow appropriate syscalls to accept NULL. I have put together a regression test harness wrapped around t

[Qemu-devel] [PATCH] print default cpu_model

2007-12-11 Thread Thayne Harbaugh
The linux-user qemu help usage doesn't output the default cpu_model in the usage. This patch is a minimal code change to output the default cpu_model. Index: qemu/linux-user/main.c === --- qemu.orig/linux-user/main.c 2007-12-11 16:14:

[Qemu-devel] [BUG][PATCH] execve processesing NULL args

2007-12-11 Thread Thayne Harbaugh
Here's a patch to avoid processing NULL args in execve. It prevents trying to dereference NULL. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-11-19 20:45:20.0 -0700 +++ qemu/linux-user/syscall.c

[Qemu-devel] Re: [PATCH] 06_efault.5.timespec.patch

2007-11-20 Thread Thayne Harbaugh
This uses __get_user()/__put_user() for copy_{to,from}_user_timespec(). It checks and handles return values. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-11-20 13:21:38.0 -0700 +++ qemu/linux-use

[Qemu-devel] Re: [PATCH] 06_efault.4.patch - timeval

2007-11-20 Thread Thayne Harbaugh
This is the EFAULT for copy_{to,from}_user_timeval(). This updates to use __get_user()/__put_user(), check return values of copy_{to,from}_user_timeval(). Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-11

[Qemu-devel] Re: [PATCH] 06_efault.3.patch - copy_from_user_fdset()

2007-11-20 Thread Thayne Harbaugh
On Tue, 2007-11-20 at 12:08 -0700, Thayne Harbaugh wrote: > This updates target_to_host_fds() to match the copy_from_user() code. > It drops some unused variables, checks and handles return values for > copy_from_user_fdset() and corrects an error where the "n" value was >

[Qemu-devel] Re: [PATCH] 06_efault.3.patch - copy_from_user_fdset()

2007-11-20 Thread Thayne Harbaugh
This updates target_to_host_fds() to match the copy_from_user() code. It drops some unused variables, checks and handles return values for copy_from_user_fdset() and corrects an error where the "n" value was incorrectly multiplied with abi_long instead of used as one greater than the number of desc

[Qemu-devel] [PATCH] additional EFAULT patches

2007-11-20 Thread Thayne Harbaugh
These are some additional EFAULT patches. They improve the code consistency, check return values of copy_{to,from}_user() operations and provide minor fixes.

Re: [Qemu-devel] Re: [PATCH] tget/tput deprecation

2007-11-15 Thread Thayne Harbaugh
On Wed, 2007-11-14 at 09:03 -0700, Thayne Harbaugh wrote: > This patch deprecates tget/tput and replaces them with get_user() and > put_user() which perform proper locking. It also checks return codes > (in most places) and fails with EFAULT where appropriate. This version doesn&#x

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Thayne Harbaugh
On Wed, 2007-11-14 at 14:06 -0700, Warner Losh wrote: > From: Paul Brook <[EMAIL PROTECTED]> > Subject: Re: [Qemu-devel] [PATCH] target_posix_types.h > Date: Wed, 14 Nov 2007 20:39:36 + > > > > This means that time_t had to be tracked down on varying architectures > > > to find the size and t

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Thayne Harbaugh
On Wed, 2007-11-14 at 20:39 +, Paul Brook wrote: > > This means that time_t had to be tracked down on varying architectures > > to find the size and there was an assumption made that time_t is 32 bits > > - which isn't true for all targets. The next problem is that if the > > target is 32 bit

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Thayne Harbaugh
On Wed, 2007-11-14 at 20:14 +0100, Fabrice Bellard wrote: > Thayne Harbaugh wrote: > > On Wed, 2007-11-14 at 19:32 +0100, Fabrice Bellard wrote: > >> Thayne Harbaugh wrote: > >>> This patch, 44_target_posix_types.patch provides target specific posix > >&

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Thayne Harbaugh
On Wed, 2007-11-14 at 20:14 +0100, Fabrice Bellard wrote: > Thayne Harbaugh wrote: > > On Wed, 2007-11-14 at 19:32 +0100, Fabrice Bellard wrote: > >> Thayne Harbaugh wrote: > >>> This patch, 44_target_posix_types.patch provides target specific posix > >&

[Qemu-devel] Build m68k-linux-user on x86_64

2007-11-14 Thread Thayne Harbaugh
m68k-linux-user fails to build on x86_64. It has never built for me in the last six months. It's a dyngen failure. Does anyone have any patches or suggestions as to how I might fix this? thank you. compile output: gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -I. -I.. -I/home/thayne/dev/c2/olmec

Re: [Qemu-devel] Re: [PATCH] tget/tput deprecation

2007-11-14 Thread Thayne Harbaugh
On Wed, 2007-11-14 at 11:21 -0700, Thayne Harbaugh wrote: > On Wed, 2007-11-14 at 09:03 -0700, Thayne Harbaugh wrote: > > This patch deprecates tget/tput and replaces them with get_user() and > > put_user() which perform proper locking. It also checks return codes > > (in m

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Thayne Harbaugh
On Wed, 2007-11-14 at 19:32 +0100, Fabrice Bellard wrote: > Thayne Harbaugh wrote: > > This patch, 44_target_posix_types.patch provides target specific posix > > types. These types improve target structure creation, code similarity > > to kernel code and improve type c

Re: [Qemu-devel] Re: [PATCH] tget/tput deprecation

2007-11-14 Thread Thayne Harbaugh
On Wed, 2007-11-14 at 09:03 -0700, Thayne Harbaugh wrote: > This patch deprecates tget/tput and replaces them with get_user() and > put_user() which perform proper locking. It also checks return codes > (in most places) and fails with EFAULT where appropriate. I just noticed that I mi

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Thayne Harbaugh
On Wed, 2007-11-14 at 17:25 +0100, Jocelyn Mayer wrote: > On Wed, 2007-11-14 at 08:59 -0700, Thayne Harbaugh wrote: > > This patch, 44_target_posix_types.patch provides target specific posix > > types. These types improve target structure creation, code similarity > > to ke

Re: [Qemu-devel] Re: [PATCH] tget/tput deprecation

2007-11-14 Thread Thayne Harbaugh
I didn't mention that this patch depends on the previous 44_target_posix_types.patch. On Wed, 2007-11-14 at 09:03 -0700, Thayne Harbaugh wrote: > This patch deprecates tget/tput and replaces them with get_user() and > put_user() which perform proper locking. It also checks return

[Qemu-devel] Re: [PATCH] tget/tput deprecation

2007-11-14 Thread Thayne Harbaugh
This patch deprecates tget/tput and replaces them with get_user() and put_user() which perform proper locking. It also checks return codes (in most places) and fails with EFAULT where appropriate. Index: qemu/linux-user/elfload.c ===

[Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Thayne Harbaugh
This patch, 44_target_posix_types.patch provides target specific posix types. These types improve target structure creation, code similarity to kernel code and improve type casting for assignment between target and host. Index: qemu/linux-user/alpha/target_posix_types.h ===

Re: [Qemu-devel] [PATCH] Fix TLS support on x86

2007-11-13 Thread Thayne Harbaugh
On Tue, 2007-11-13 at 19:44 +0100, Stefan Weil wrote: > Hi, > > I'd like to test user mode emulation on MIPS host. > > Do you have newer versions of your patches which match > current CVS HEAD? TLS support is still missing there, > so QEMU user mode emulation is not really usable without > worki

Re: [Qemu-devel] RFC: x86_64 Best way to fix 'cast to pointer from integer of different size' problems?

2007-11-12 Thread Thayne Harbaugh
On Wed, 2007-11-07 at 20:18 +0100, Fabrice Bellard wrote: > - Fix page_check_range() so that it handles writes to pages containing > code by calling page_unprotect when necessary (the current code can fail > in this case !). > > - Suppress no longer needed page_unprotect_range() call in syscall.

Re: [Qemu-devel] RFC: x86_64 Best way to fix 'cast to pointer from integer of different size' problems?

2007-11-07 Thread Thayne Harbaugh
On Wed, 2007-11-07 at 20:18 +0100, Fabrice Bellard wrote: > Hi, > > Regarding the user memory access, here is my suggestion which should > minimize the changes: The virtue of making the minimum changes is that there are likely fewer errors. Other than that, it's more important to me to make the

Re: [Qemu-devel] RFC: x86_64 Best way to fix 'cast to pointer from integer of different size' problems?

2007-11-05 Thread Thayne Harbaugh
Here's a better explanation as to why I initially mixed lock_user() and copy_to_user(): On Tue, 2007-11-06 at 01:05 +, Paul Brook wrote: > > access_ok() and lock_user() perform essential functions. lock_user(), > > however, isn't directly comparable to how the kernel operates and should > > t

Re: [Qemu-devel] Re: [PATCH] efault - add data type to put_user()/get_user()

2007-11-05 Thread Thayne Harbaugh
On Mon, 2007-11-05 at 22:42 +0100, Fabrice Bellard wrote: > Thayne Harbaugh wrote: > > On Sat, 2007-11-03 at 20:05 +0100, Fabrice Bellard wrote: > >> I think that using host addresses in __put_user and __get_user is not > >> logical. They should use target addresses a

Re: [Qemu-devel] Re: [PATCH] efault - add data type to put_user()/get_user()

2007-11-05 Thread Thayne Harbaugh
Uhhh, I'm quite uncomfortable now. After sending the emails describing how everything should be done I realized that I had never reworked my base patches. All my higher-level patches are sound, but I never reworked my {get,put}_user() and copy_{to,from}_user() patches to follow the same pattern.

Re: [Qemu-devel] Re: [PATCH] efault - add data type to put_user()/get_user()

2007-11-05 Thread Thayne Harbaugh
arbitrary address > space change (such as a translation as Paul did) so that we can verify > that all the Linux emulation stills works in this case. I'll be testing this way. > Regards, > > Fabrice. > > Thayne Harbaugh wrote: > > On Wed, 2007-10-31 at 16:44 -0600,

Re: [Qemu-devel] RFC: x86_64 Best way to fix 'cast to pointer from integer of different size' problems?

2007-11-05 Thread Thayne Harbaugh
On Sat, 2007-11-03 at 18:52 +0100, Paul Brook wrote: > On Saturday 03 November 2007, TJ wrote: > > I'm building on x86_64 GNU/Linux. There are *lots* of (1053) compiler > > warnings of the class: > > > > warning: cast to pointer from integer of different size > > There are at due to the recent EF

Re: [Qemu-devel] [RFC] linux-user (mostly syscall.c)

2007-11-03 Thread Thayne Harbaugh
On Sat, 2007-11-03 at 20:13 +0100, Fabrice Bellard wrote: > Thayne Harbaugh wrote: > > On Sat, 2007-11-03 at 13:52 +0100, J. Mayer wrote: > >> On Sat, 2007-11-03 at 01:21 +, Thiemo Seufer wrote: > >> [...] > >> But it could be great to group the sys

Re: [Qemu-devel] [RFC] linux-user (mostly syscall.c)

2007-11-03 Thread Thayne Harbaugh
On Sat, 2007-11-03 at 13:52 +0100, J. Mayer wrote: > On Sat, 2007-11-03 at 01:21 +, Thiemo Seufer wrote: > > Thayne Harbaugh wrote: > > > There are several things that I'd like to see addressed in linux-user. > > > Some of these are to fix bugs, some

[Qemu-devel] [RFC] linux-user (mostly syscall.c)

2007-11-02 Thread Thayne Harbaugh
There are several things that I'd like to see addressed in linux-user. Some of these are to fix bugs, some are to make qemu linux-user more like the Linux kernel, some are to make the internal qemu interfaces more consistent. An internal coding practice that is being addressed bit-by-bit is that o

[Qemu-devel] Re: [PATCH] efault - add data type to put_user()/get_user()

2007-11-02 Thread Thayne Harbaugh
On Wed, 2007-10-31 at 16:44 -0600, Thayne Harbaugh wrote: > This patch updates get_user() and put_user() to take a third argument of > data type. get_user() and put_user() use target address which are > target_ulong and don't reflect the data type pointed to in target > me

Re: [Qemu-devel] What happened with NPTL/TLS support?

2007-11-02 Thread Thayne Harbaugh
On Fri, 2007-11-02 at 15:28 +0200, Felipe Contreras wrote: > On 10/22/07, Thayne Harbaugh <[EMAIL PROTECTED]> wrote: > > > > On Sat, 2007-10-20 at 21:34 +0100, Thiemo Seufer wrote: > > > Please submit this patch (and resend what you think was missed). > > &g

Re: [Qemu-devel] [PATCH] strace rework

2007-10-31 Thread Thayne Harbaugh
On Thu, 2007-11-01 at 00:09 +, Thiemo Seufer wrote: > Thayne Harbaugh wrote: > > > > On Sat, 2007-10-27 at 14:26 +0100, Thiemo Seufer wrote: > > > Thayne Harbaugh wrote: > > > > This is a rework of Stuart Anderson's strace patch. I've fixed >

[Qemu-devel] Re: [PATCH] efault

2007-10-31 Thread Thayne Harbaugh
These three efault patches are the basis for another 30 patches which do the following: * Correct compiler warnings. * Add coding consistency. * Detect error cases and handle them properly. * Divide syscall.c to closer resemble the Linux kernel for code partitioning and organization. * Add new fea

[Qemu-devel] Re: [PATCH] efault - add data type to put_user()/get_user()

2007-10-31 Thread Thayne Harbaugh
This patch updates get_user() and put_user() to take a third argument of data type. get_user() and put_user() use target address which are target_ulong and don't reflect the data type pointed to in target memory. Simply casting the target_ulong to a type before passing to get/put_user() is poor b

[Qemu-devel] Re: [PATCH] efault - update __get_user() __put_user()

2007-10-31 Thread Thayne Harbaugh
This patch is a minor update to __get_user() and __put_user() to emphasize that they take host points. Index: qemu/linux-user/qemu.h === --- qemu.orig/linux-user/qemu.h 2007-10-31 11:03:03.0 -0600 +++ qemu/linux-user/qemu.h 200

[Qemu-devel] [PATCH] efault - verify pages are in cache and are read/write

2007-10-31 Thread Thayne Harbaugh
This patch adds the function page_check_range() to verify that pages are in the cache and that they are appropriately readable/writable. It also hooks up access_ok() to page_check_range() so that code patterns are similar to kernel code. When copying data from user space access_ok() is used to ch

Re: [Qemu-devel] qemu-i386 does not start on x86_64 or i686

2007-10-25 Thread Thayne Harbaugh
On Thu, 2007-10-25 at 19:52 -0500, Rob Landley wrote: > On Monday 22 October 2007 8:44:59 am Thayne Harbaugh wrote: > > On Thu, 2007-10-18 at 23:46 +0200, Ronan Keryell wrote: > > > Anybody kind enough to have a look at : > > > http://bugs.debian.org/cgi-b

Re: [Qemu-devel] What happened with NPTL/TLS support?

2007-10-22 Thread Thayne Harbaugh
On Sat, 2007-10-20 at 21:34 +0100, Thiemo Seufer wrote: > Thayne Harbaugh wrote: > > > > On Fri, 2007-10-12 at 18:12 +0300, Felipe Contreras wrote: > > > Hi, > > > > > > When I try to use codesourcery's toolchain arm-2006q3-27 in my Fedor

Re: [Qemu-devel] qemu-i386 does not start on x86_64 or i686

2007-10-22 Thread Thayne Harbaugh
On Thu, 2007-10-18 at 23:46 +0200, Ronan Keryell wrote: > Anybody kind enough to have a look at : > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=446868 > > I've asked some other people and they hit the same issue. > It's not clear to me where the bug is since it happens very early in the > st

Re: [Qemu-devel] [PATCH] syscall_target_errno.patch

2007-10-15 Thread Thayne Harbaugh
On Thu, 2007-10-11 at 14:10 +0200, J. Mayer wrote: > On Wed, 2007-10-10 at 21:38 -0600, Thayne Harbaugh wrote: > > I have noticed that many functions in syscall.c return a *host* errno > > when a *target* errno should be return. At the same time, there are > &

Re: [Qemu-devel] What happened with NPTL/TLS support?

2007-10-12 Thread Thayne Harbaugh
On Fri, 2007-10-12 at 18:12 +0300, Felipe Contreras wrote: > Hi, > > When I try to use codesourcery's toolchain arm-2006q3-27 in my Fedora > 7 box I always have the following issue: > > qemu: Unsupported syscall: 983045 Yep, I've seen that before. > I guess it's a problem of NPTL incompatibili

Re: [Qemu-devel] [PATCH] syscall_target_errno.patch

2007-10-12 Thread Thayne Harbaugh
On Wed, 2007-10-10 at 21:38 -0600, Thayne Harbaugh wrote: > I have noticed that many functions in syscall.c return a *host* errno > when a *target* errno should be return. At the same time, there are > several places in syscall.c:do_syscall() that immediately return an > errno

[Qemu-devel] [PATCH] syscall_target_errno.patch

2007-10-10 Thread Thayne Harbaugh
I appreciate the work that Jocelyn did to correct the types used throughout linux-user/syscall.c. Along those same lines I am working on several patches to eliminate some incorrect constructs that have crept into syscall.c - some of which I have ignorantly propagated in previous patches that I hav

[Qemu-devel] Don't install tools if $(TOOLS) is empty

2007-10-09 Thread Thayne Harbaugh
Install will fail if $(TOOLS) is empty - which happens when only user emulation is built Index: qemu/Makefile === --- qemu.orig/Makefile 2007-10-09 21:31:43.0 -0600 +++ qemu/Makefile 2007-10-09 21:40:05.0 -0600

Re: [Qemu-devel] qemu Makefile.target

2007-10-09 Thread Thayne Harbaugh
On Tue, 2007-10-09 at 11:43 +0200, J. Mayer wrote: > On Mon, 2007-10-08 at 21:33 +0200, Stefan Weil wrote: > > Blue Swirl schrieb: > > > On 6/1/07, Stefan Weil <[EMAIL PROTECTED]> wrote: > > >> Wouldn't it be better to let the compiler create dependency files > > >> which make can read? I posted a

[Qemu-devel] Re: [PATCH] linux-user futimesat() syscall

2007-10-02 Thread Thayne Harbaugh
On Wed, 2007-09-19 at 06:53 -0600, Thayne Harbaugh wrote: > This patch adds the futimesat syscall to linux-user. The previous futimesat() patch that was sent was horribly brain-damaged: it used timespec in a few places that should have used timeval. This is a corrected patch. I'm

[Qemu-devel] [PATCH] mixed types in target_mremap() return incorrect value

2007-10-01 Thread Thayne Harbaugh
There are mixed types (long vs target_ulong) in linux-user/mmap.c:target_mremap() and consequently the wrong value is returned (automatic type casting fails) when the host long is larger than the guest long and -1 is returned for an error condition. Consider the initial lines of target_mremap() wh

Re: [Qemu-devel] [PATCH] getpriority() shouldn't use libc wrapper

2007-10-01 Thread Thayne Harbaugh
On Wed, 2007-09-26 at 14:06 -0600, Thayne Harbaugh wrote: > The linux-user getpriority() syscall goes through the libc wrapper. > This causes a problem because the libc wrapper remaps the return value > from the kernel. This patch calls the kernel getpriority syscall > directly. I di

[Qemu-devel] linux-user mmap() for 32-bit guest on 64-bit host

2007-09-27 Thread Thayne Harbaugh
I've been using the patch posted by Kirill Shutemov (http://www.mail-archive.com/qemu-devel@nongnu.org/msg10893.html) for forcing mmap() addresses on 64-bit hosts to be 32-bit clean. I just discovered a minor problem with the patch: MAP_32BIT is not a valid flag to mremap() and will cause mremap()

Re: [Qemu-devel] qemu linux-user/qemu.h linux-user/signal.c linu...

2007-09-27 Thread Thayne Harbaugh
On Thu, 2007-09-27 at 16:08 +0200, Jocelyn Mayer wrote: > On Thu, 2007-09-27 at 13:57 +, Thiemo Seufer wrote: > > CVSROOT:/sources/qemu > > Module name:qemu > > Changes by: Thiemo Seufer 07/09/27 13:57:58 > > > > Modified files: > > linux-user : qemu.h signal.c syscall

[Qemu-devel] [PATCH] getpriority() shouldn't use libc wrapper

2007-09-26 Thread Thayne Harbaugh
The linux-user getpriority() syscall goes through the libc wrapper. This causes a problem because the libc wrapper remaps the return value from the kernel. This patch calls the kernel getpriority syscall directly. Index: qemu/linux-user/syscall.c ==

Re: [Qemu-devel] [PATCH] linux-user sigaltstack() syscall

2007-09-25 Thread Thayne Harbaugh
On Mon, 2007-09-24 at 23:04 -0600, Thayne Harbaugh wrote: > This patch adds the sigaltstack() syscall for linux-user. The previous patch relied on the EFAULT patch, this newer version does not. It also fixes a few places that used tswap32() that should use __put_user(). Index: qemu/linux-u

[Qemu-devel] [PATCH] linux-user sigaltstack() syscall

2007-09-24 Thread Thayne Harbaugh
This patch adds the sigaltstack() syscall for linux-user. Index: qemu/linux-user/signal.c === --- qemu.orig/linux-user/signal.c 2007-09-24 22:45:48.0 -0600 +++ qemu/linux-user/signal.c 2007-09-24 22:56:18.0 -0600 @@ -26

Re: [Qemu-devel] Updated RFC: linux user problems]]

2007-09-24 Thread Thayne Harbaugh
I've often wondered why there isn't a tswap_target_ulong(). Seems like using tswap32() is asking for trouble.

Re: [Qemu-devel] Re: [PATCH] linux-user utimensat() syscall

2007-09-24 Thread Thayne Harbaugh
On Mon, 2007-09-24 at 13:45 -0600, Thayne Harbaugh wrote: > On Sun, 2007-09-23 at 12:58 -0400, Stuart Anderson wrote: > > On Sun, 23 Sep 2007, Thiemo Seufer wrote: > > > > > Thayne Harbaugh wrote: > > >> This patch adds the utimensat syscall to linux-us

Re: [Qemu-devel] Re: [PATCH] linux-user utimensat() syscall

2007-09-24 Thread Thayne Harbaugh
On Sun, 2007-09-23 at 12:58 -0400, Stuart Anderson wrote: > On Sun, 23 Sep 2007, Thiemo Seufer wrote: > > > Thayne Harbaugh wrote: > >> This patch adds the utimensat syscall to linux-user Oops! > > Doesn't build: > > > > gcc-3.4 -g -Wl,-T,/home/th

[Qemu-devel] Re: [PATCH] linux-user fstatat syscall

2007-09-19 Thread Thayne Harbaugh
This patch adds the fstatat syscall to linux-user. To depends on the previous stat64_put_user patch. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-09-19 06:28:34.0 -0600 +++ qemu/linux-user/sysca

[Qemu-devel] Re: [PATCH] linux-user stat64_put_user function

2007-09-19 Thread Thayne Harbaugh
This patch puts stat64 functionality into a function rather than using gotos for all the locations that copy stat64 buffers to user space. This patch is necessary for following fstatat64 syscall patch. Index: qemu/linux-user/syscall.c

[Qemu-devel] Re: [PATCH] linux-user faccessat() syscall

2007-09-19 Thread Thayne Harbaugh
This patch adds the faccessat syscall to linux-user. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-09-19 06:28:02.0 -0600 +++ qemu/linux-user/syscall.c 2007-09-19 06:28:30.0 -0600 @@ -151,

[Qemu-devel] Re: [PATCH] linux-user fchmodat() syscall

2007-09-19 Thread Thayne Harbaugh
This patch adds the fchmodat syscall to linux-user. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-09-19 06:27:29.0 -0600 +++ qemu/linux-user/syscall.c 2007-09-19 06:28:02.0 -0600 @@ -151,6

[Qemu-devel] Re: [PATCH] linux-user readlinkat() syscall

2007-09-19 Thread Thayne Harbaugh
This patch adds the readlinkat syscall to linux-user. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-09-19 06:26:51.0 -0600 +++ qemu/linux-user/syscall.c 2007-09-19 06:27:29.0 -0600 @@ -160

[Qemu-devel] Re: [PATCH] linux-user symlinkat() syscall

2007-09-19 Thread Thayne Harbaugh
This patch adds the symlinkat syscall to linux-user. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-09-19 06:25:51.0 -0600 +++ qemu/linux-user/syscall.c 2007-09-19 06:26:51.0 -0600 @@ -162,

[Qemu-devel] Re: [PATCH] linux-user linkat() syscall

2007-09-19 Thread Thayne Harbaugh
This patch adds the linkat syscall to linux-user. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-09-19 06:24:47.0 -0600 +++ qemu/linux-user/syscall.c 2007-09-19 06:25:51.0 -0600 @@ -156,6 +

[Qemu-devel] Re: [PATCH] linux-user renameat() syscall

2007-09-19 Thread Thayne Harbaugh
This patch adds the renameat syscall to linux-user. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-09-19 06:23:52.0 -0600 +++ qemu/linux-user/syscall.c 2007-09-19 06:24:47.0 -0600 @@ -159,6

[Qemu-devel] Re: [PATCH] linux-user unlinkat() syscall

2007-09-19 Thread Thayne Harbaugh
This patch adds the unlinkat syscall to linux-user. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-09-19 06:22:58.0 -0600 +++ qemu/linux-user/syscall.c 2007-09-19 06:23:52.0 -0600 @@ -163,6

[Qemu-devel] Re: [PATCH] linux-user fchownat() syscall

2007-09-19 Thread Thayne Harbaugh
This patch adds the fchownat syscall to linux-user. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-09-19 06:21:49.0 -0600 +++ qemu/linux-user/syscall.c 2007-09-19 06:22:58.0 -0600 @@ -151,6

[Qemu-devel] Re: [PATCH] linux-user mknodat() syscall

2007-09-19 Thread Thayne Harbaugh
This patch adds the mknodat syscall to linux-user. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-09-19 06:20:59.0 -0600 +++ qemu/linux-user/syscall.c 2007-09-19 06:21:49.0 -0600 @@ -156,6

[Qemu-devel] Re: [PATCH] linux-user mkdirat() syscall

2007-09-19 Thread Thayne Harbaugh
This patch adds the mkdirat syscall to linux-user. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-09-19 06:19:38.0 -0600 +++ qemu/linux-user/syscall.c 2007-09-19 06:20:59.0 -0600 @@ -155,6

[Qemu-devel] Re: [PATCH] linux-user openat() syscall

2007-09-19 Thread Thayne Harbaugh
This patch adds the openat syscall to linux-user. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-09-19 06:18:58.0 -0600 +++ qemu/linux-user/syscall.c 2007-09-19 06:19:38.0 -0600 @@ -155,6 +

[Qemu-devel] Re: [PATCH] linux-user futimesat() syscall

2007-09-19 Thread Thayne Harbaugh
This patch adds the futimesat syscall to linux-user. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-09-19 06:17:45.0 -0600 +++ qemu/linux-user/syscall.c 2007-09-19 06:18:58.0 -0600 @@ -151

[Qemu-devel] Re: [PATCH] linux-user utimensat() syscall

2007-09-19 Thread Thayne Harbaugh
This patch adds the utimensat syscall to linux-user. Index: qemu/linux-user/syscall.c === --- qemu.orig/linux-user/syscall.c 2007-09-19 06:16:40.0 -0600 +++ qemu/linux-user/syscall.c 2007-09-19 06:17:45.0 -0600 @@ -158,

[Qemu-devel] [PATCH] linux-user *at() syscalls

2007-09-19 Thread Thayne Harbaugh
I have a series of patches to add *at() syscalls to linux-user. The patches have minor inter-dependencies due to adjacent modifications in some files.

Re: [Qemu-devel] Insta-segfault! i386-linux-user

2007-09-18 Thread Thayne Harbaugh
On Tue, 2007-09-18 at 21:11 +0200, Alexander Graf wrote: > On Sep 18, 2007, at 8:25 PM, Thayne Harbaugh wrote: > > > On Tue, 2007-09-18 at 15:53 +0200, Ronald wrote: > >> Thayne Harbaugh schreef: > >>> ./i386-linux-user/qemu-i386 --help > >>

Re: [Qemu-devel] Insta-segfault! i386-linux-user

2007-09-18 Thread Thayne Harbaugh
On Tue, 2007-09-18 at 15:53 +0200, Ronald wrote: > Thayne Harbaugh schreef: > > Has anyone seen an insta-segfault with i386-linux-user qemu? I've > > compiled qemu-0.9.0 as well as qemu-cvs (2007-09-18) with gcc-3.4 and > > -fno-strict-aliasing on an amd64 and I get

[Qemu-devel] Insta-segfault! i386-linux-user

2007-09-18 Thread Thayne Harbaugh
Has anyone seen an insta-segfault with i386-linux-user qemu? I've compiled qemu-0.9.0 as well as qemu-cvs (2007-09-18) with gcc-3.4 and -fno-strict-aliasing on an amd64 and I get this: ./i386-linux-user/qemu-i386 --help Segmentation fault >From GDB: Program received signal SIGSEGV, Segmentation

Re: [Qemu-devel] arm-linux-user infinite SIGSEGV looping

2007-08-25 Thread Thayne Harbaugh
On Fri, 2007-08-24 at 15:16 -0600, Thayne Harbaugh wrote: > I've encountered what appears to be a race condition in arm-linux-user: > sometimes the program qemu is running will hang forever and sometimes it > will complete. After digging about there appears to be at least two >

[Qemu-devel] arm-linux-user infinite SIGSEGV looping

2007-08-24 Thread Thayne Harbaugh
I've encountered what appears to be a race condition in arm-linux-user: sometimes the program qemu is running will hang forever and sometimes it will complete. After digging about there appears to be at least two problems: 1) An initial cause of a SIGSEGV 2) The incorrect handling of the SIGSEGV

Re: [Qemu-devel] re: Nothing happens

2005-06-16 Thread Thayne Harbaugh
On Thu, 2005-06-16 at 17:36 +0100, Paul Brook wrote: > > I first just tried without the SDL-devel libs, but that was the same, > > and the above mentioned thread suggested that SDL may be a cause > > (although I suspect we may be talking of different problems). > > Did you actually do a clean buil