* [Qemu-devel] [PATCH] Revert "Use the host exit syscall for exiting (Lauro Ramos Venancio)."
@ 2009-03-07 12:20 Felipe Contreras
2009-03-07 13:40 ` Laurent Desnogues
2009-03-07 14:05 ` Paul Brook
0 siblings, 2 replies; 8+ messages in thread
From: Felipe Contreras @ 2009-03-07 12:20 UTC (permalink / raw)
To: qemu-devel; +Cc: Felipe Contreras
This breaks pthread_join on arm-linux-user.
---
linux-user/syscall.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 40eab4e..572fa0a 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -156,7 +156,6 @@ static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, \
}
-#define __NR_sys_exit __NR_exit
#define __NR_sys_uname __NR_uname
#define __NR_sys_faccessat __NR_faccessat
#define __NR_sys_fchmodat __NR_fchmodat
@@ -198,7 +197,6 @@ static int gettid(void) {
return -ENOSYS;
}
#endif
-_syscall1(int,sys_exit,int,status)
_syscall1(int,sys_uname,struct new_utsname *,buf)
#if defined(TARGET_NR_faccessat) && defined(__NR_faccessat)
_syscall4(int,sys_faccessat,int,dirfd,const char *,pathname,int,mode,int,flags)
@@ -3433,7 +3431,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
#endif
gdb_exit(cpu_env, arg1);
/* XXX: should free thread stack and CPU env */
- sys_exit(arg1);
+ _exit(arg1);
ret = 0; /* avoid warning */
break;
case TARGET_NR_read:
--
1.6.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] Revert "Use the host exit syscall for exiting (Lauro Ramos Venancio)."
2009-03-07 12:20 [Qemu-devel] [PATCH] Revert "Use the host exit syscall for exiting (Lauro Ramos Venancio)." Felipe Contreras
@ 2009-03-07 13:40 ` Laurent Desnogues
2009-03-07 14:05 ` Paul Brook
1 sibling, 0 replies; 8+ messages in thread
From: Laurent Desnogues @ 2009-03-07 13:40 UTC (permalink / raw)
To: qemu-devel
On Sat, Mar 7, 2009 at 1:20 PM, Felipe Contreras
<felipe.contreras@gmail.com> wrote:
> This breaks pthread_join on arm-linux-user.
I am not sure the fix is correct. If you run tests/testthread.c you'll
notice the thread2 doesn't print the 20 values it should.
BTW it looks like this test doesn't run on i386 and x86_64: it
ends immediately.
Laurent
> ---
> linux-user/syscall.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 40eab4e..572fa0a 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -156,7 +156,6 @@ static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, \
> }
>
>
> -#define __NR_sys_exit __NR_exit
> #define __NR_sys_uname __NR_uname
> #define __NR_sys_faccessat __NR_faccessat
> #define __NR_sys_fchmodat __NR_fchmodat
> @@ -198,7 +197,6 @@ static int gettid(void) {
> return -ENOSYS;
> }
> #endif
> -_syscall1(int,sys_exit,int,status)
> _syscall1(int,sys_uname,struct new_utsname *,buf)
> #if defined(TARGET_NR_faccessat) && defined(__NR_faccessat)
> _syscall4(int,sys_faccessat,int,dirfd,const char *,pathname,int,mode,int,flags)
> @@ -3433,7 +3431,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
> #endif
> gdb_exit(cpu_env, arg1);
> /* XXX: should free thread stack and CPU env */
> - sys_exit(arg1);
> + _exit(arg1);
> ret = 0; /* avoid warning */
> break;
> case TARGET_NR_read:
> --
> 1.6.2
>
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] Revert "Use the host exit syscall for exiting (Lauro Ramos Venancio)."
2009-03-07 12:20 [Qemu-devel] [PATCH] Revert "Use the host exit syscall for exiting (Lauro Ramos Venancio)." Felipe Contreras
2009-03-07 13:40 ` Laurent Desnogues
@ 2009-03-07 14:05 ` Paul Brook
2009-03-07 16:02 ` Felipe Contreras
1 sibling, 1 reply; 8+ messages in thread
From: Paul Brook @ 2009-03-07 14:05 UTC (permalink / raw)
To: qemu-devel; +Cc: Felipe Contreras
On Saturday 07 March 2009, Felipe Contreras wrote:
> This breaks pthread_join on arm-linux-user.
>..
> /* XXX: should free thread stack and CPU env */
> - sys_exit(arg1);
> + _exit(arg1);
No. You're just reverting an earlier (also incorrect) change.
Paul
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] Revert "Use the host exit syscall for exiting (Lauro Ramos Venancio)."
2009-03-07 14:05 ` Paul Brook
@ 2009-03-07 16:02 ` Felipe Contreras
2009-03-07 16:08 ` Paul Brook
2009-03-07 16:09 ` Laurent Desnogues
0 siblings, 2 replies; 8+ messages in thread
From: Felipe Contreras @ 2009-03-07 16:02 UTC (permalink / raw)
To: Paul Brook; +Cc: qemu-devel
On Sat, Mar 7, 2009 at 4:05 PM, Paul Brook <paul@codesourcery.com> wrote:
> On Saturday 07 March 2009, Felipe Contreras wrote:
>> This breaks pthread_join on arm-linux-user.
>>..
>> /* XXX: should free thread stack and CPU env */
>> - sys_exit(arg1);
>> + _exit(arg1);
>
> No. You're just reverting an earlier (also incorrect) change.
That commit introduced a regression arm-linux-user, I'm just reverting
the change.
What do you propose? Leaving arm-linux-user broken is not good.
--
Felipe Contreras
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] Revert "Use the host exit syscall for exiting (Lauro Ramos Venancio)."
2009-03-07 16:02 ` Felipe Contreras
@ 2009-03-07 16:08 ` Paul Brook
2009-03-07 16:10 ` Felipe Contreras
2009-03-07 16:09 ` Laurent Desnogues
1 sibling, 1 reply; 8+ messages in thread
From: Paul Brook @ 2009-03-07 16:08 UTC (permalink / raw)
To: Felipe Contreras; +Cc: qemu-devel
On Saturday 07 March 2009, Felipe Contreras wrote:
> On Sat, Mar 7, 2009 at 4:05 PM, Paul Brook <paul@codesourcery.com> wrote:
> > On Saturday 07 March 2009, Felipe Contreras wrote:
> >> This breaks pthread_join on arm-linux-user.
> >>..
> >> /* XXX: should free thread stack and CPU env */
> >> - sys_exit(arg1);
> >> + _exit(arg1);
> >
> > No. You're just reverting an earlier (also incorrect) change.
>
> That commit introduced a regression arm-linux-user, I'm just reverting
> the change.
>
> What do you propose? Leaving arm-linux-user broken is not good.
It's broken both after your patch, you're just exchanging one bit of
brokenness for another. The solution is to fix it properly, like I already
did.
Paul
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] Revert "Use the host exit syscall for exiting (Lauro Ramos Venancio)."
2009-03-07 16:02 ` Felipe Contreras
2009-03-07 16:08 ` Paul Brook
@ 2009-03-07 16:09 ` Laurent Desnogues
2009-03-07 16:22 ` Paul Brook
1 sibling, 1 reply; 8+ messages in thread
From: Laurent Desnogues @ 2009-03-07 16:09 UTC (permalink / raw)
To: qemu-devel
On Sat, Mar 7, 2009 at 5:02 PM, Felipe Contreras
<felipe.contreras@gmail.com> wrote:
> On Sat, Mar 7, 2009 at 4:05 PM, Paul Brook <paul@codesourcery.com> wrote:
[...]
>> No. You're just reverting an earlier (also incorrect) change.
>
> That commit introduced a regression arm-linux-user, I'm just reverting
> the change.
>
> What do you propose? Leaving arm-linux-user broken is not good.
Paul's commit 6735 fixes at least testthread for ARM (though it doesn't
fix it from i386 and x86_64).
Laurent
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] Revert "Use the host exit syscall for exiting (Lauro Ramos Venancio)."
2009-03-07 16:08 ` Paul Brook
@ 2009-03-07 16:10 ` Felipe Contreras
0 siblings, 0 replies; 8+ messages in thread
From: Felipe Contreras @ 2009-03-07 16:10 UTC (permalink / raw)
To: Paul Brook; +Cc: qemu-devel
On Sat, Mar 7, 2009 at 6:08 PM, Paul Brook <paul@codesourcery.com> wrote:
> On Saturday 07 March 2009, Felipe Contreras wrote:
>> On Sat, Mar 7, 2009 at 4:05 PM, Paul Brook <paul@codesourcery.com> wrote:
>> > On Saturday 07 March 2009, Felipe Contreras wrote:
>> >> This breaks pthread_join on arm-linux-user.
>> >>..
>> >> /* XXX: should free thread stack and CPU env */
>> >> - sys_exit(arg1);
>> >> + _exit(arg1);
>> >
>> > No. You're just reverting an earlier (also incorrect) change.
>>
>> That commit introduced a regression arm-linux-user, I'm just reverting
>> the change.
>>
>> What do you propose? Leaving arm-linux-user broken is not good.
>
> It's broken both after your patch, you're just exchanging one bit of
> brokenness for another. The solution is to fix it properly, like I already
> did.
Cool, I confirm your patch also fixes the issue.
Thanks.
--
Felipe Contreras
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] Revert "Use the host exit syscall for exiting (Lauro Ramos Venancio)."
2009-03-07 16:09 ` Laurent Desnogues
@ 2009-03-07 16:22 ` Paul Brook
0 siblings, 0 replies; 8+ messages in thread
From: Paul Brook @ 2009-03-07 16:22 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Desnogues
> >> No. You're just reverting an earlier (also incorrect) change.
> >
> > That commit introduced a regression arm-linux-user, I'm just reverting
> > the change.
> >
> > What do you propose? Leaving arm-linux-user broken is not good.
>
> Paul's commit 6735 fixes at least testthread for ARM (though it doesn't
> fix it from i386 and x86_64).
That's because x86/x86-64 doesn't support threads/NPTL at all.
Paul
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-03-07 16:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-07 12:20 [Qemu-devel] [PATCH] Revert "Use the host exit syscall for exiting (Lauro Ramos Venancio)." Felipe Contreras
2009-03-07 13:40 ` Laurent Desnogues
2009-03-07 14:05 ` Paul Brook
2009-03-07 16:02 ` Felipe Contreras
2009-03-07 16:08 ` Paul Brook
2009-03-07 16:10 ` Felipe Contreras
2009-03-07 16:09 ` Laurent Desnogues
2009-03-07 16:22 ` Paul Brook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).