qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] alpha-linux-user: Fix umount syscall numbers
@ 2013-07-24 19:50 Richard Henderson
  2013-07-24 19:50 ` [Qemu-devel] [PATCH 2/2] mips-linux-user: Adjust names in mips_syscall_args Richard Henderson
  2013-08-17  6:24 ` [Qemu-devel] [PATCH 1/2] alpha-linux-user: Fix umount syscall numbers Richard Henderson
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Henderson @ 2013-07-24 19:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio

It has been pointed out on LKML that the alpha umount syscall numbers
are named wrong, and a patch to rectify that has been posted for 3.11.

Glibc works around this by treating NR_umount as NR_umount2 if
NR_oldumount exists.  That's more complicated than we need in QEMU,
given that we control linux-user/*/syscall_nr.h.

This is the last instance of TARGET_NR_oldumount, so delete that from
the strace.list.

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 linux-user/alpha/syscall_nr.h | 4 ++--
 linux-user/strace.list        | 3 ---
 linux-user/syscall.c          | 2 +-
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/linux-user/alpha/syscall_nr.h b/linux-user/alpha/syscall_nr.h
index ac2b6e2..d52d76e 100644
--- a/linux-user/alpha/syscall_nr.h
+++ b/linux-user/alpha/syscall_nr.h
@@ -20,7 +20,7 @@
 #define TARGET_NR_lseek		 19
 #define TARGET_NR_getxpid		 20
 #define TARGET_NR_osf_mount		 21
-#define TARGET_NR_umount		 22
+#define TARGET_NR_umount2		 22
 #define TARGET_NR_setuid		 23
 #define TARGET_NR_getxuid		 24
 #define TARGET_NR_exec_with_loader	 25	/* not implemented */
@@ -255,7 +255,7 @@
 #define TARGET_NR_sysinfo		318
 #define TARGET_NR__sysctl		319
 /* 320 was sys_idle.  */
-#define TARGET_NR_oldumount		321
+#define TARGET_NR_umount		321
 #define TARGET_NR_swapon		322
 #define TARGET_NR_times		323
 #define TARGET_NR_personality	324
diff --git a/linux-user/strace.list b/linux-user/strace.list
index 08f115d..4f9c364 100644
--- a/linux-user/strace.list
+++ b/linux-user/strace.list
@@ -612,9 +612,6 @@
 #ifdef TARGET_NR_oldstat
 { TARGET_NR_oldstat, "oldstat" , NULL, NULL, NULL },
 #endif
-#ifdef TARGET_NR_oldumount
-{ TARGET_NR_oldumount, "oldumount" , NULL, NULL, NULL },
-#endif
 #ifdef TARGET_NR_olduname
 { TARGET_NR_olduname, "olduname" , NULL, NULL, NULL },
 #endif
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 00a0390..e42c20e 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5719,7 +5719,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
             unlock_user(p, arg1, 0);
         }
         break;
-#ifdef TARGET_NR_umount2 /* not on alpha */
+#ifdef TARGET_NR_umount2
     case TARGET_NR_umount2:
         if (!(p = lock_user_string(arg1)))
             goto efault;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 2/2] mips-linux-user: Adjust names in mips_syscall_args
  2013-07-24 19:50 [Qemu-devel] [PATCH 1/2] alpha-linux-user: Fix umount syscall numbers Richard Henderson
@ 2013-07-24 19:50 ` Richard Henderson
  2013-08-17  6:24 ` [Qemu-devel] [PATCH 1/2] alpha-linux-user: Fix umount syscall numbers Richard Henderson
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2013-07-24 19:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio

The name field of MIPS_SYS isn't actually used; it's just documentation.
But adjust the umount entries to match mips/syscall_nr.h anyway.

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 linux-user/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/linux-user/main.c b/linux-user/main.c
index f6a3aad..450520a 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1813,7 +1813,7 @@ static const uint8_t mips_syscall_args[] = {
 	MIPS_SYS(sys_lseek	, 3)
 	MIPS_SYS(sys_getpid	, 0)	/* 4020 */
 	MIPS_SYS(sys_mount	, 5)
-	MIPS_SYS(sys_oldumount	, 1)
+	MIPS_SYS(sys_umount	, 1)
 	MIPS_SYS(sys_setuid	, 1)
 	MIPS_SYS(sys_getuid	, 0)
 	MIPS_SYS(sys_stime	, 1)	/* 4025 */
@@ -1843,7 +1843,7 @@ static const uint8_t mips_syscall_args[] = {
 	MIPS_SYS(sys_geteuid	, 0)
 	MIPS_SYS(sys_getegid	, 0)	/* 4050 */
 	MIPS_SYS(sys_acct	, 0)
-	MIPS_SYS(sys_umount	, 2)
+	MIPS_SYS(sys_umount2	, 2)
 	MIPS_SYS(sys_ni_syscall	, 0)
 	MIPS_SYS(sys_ioctl	, 3)
 	MIPS_SYS(sys_fcntl	, 3)	/* 4055 */
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] alpha-linux-user: Fix umount syscall numbers
  2013-07-24 19:50 [Qemu-devel] [PATCH 1/2] alpha-linux-user: Fix umount syscall numbers Richard Henderson
  2013-07-24 19:50 ` [Qemu-devel] [PATCH 2/2] mips-linux-user: Adjust names in mips_syscall_args Richard Henderson
@ 2013-08-17  6:24 ` Richard Henderson
  2013-08-26 20:26   ` Richard Henderson
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2013-08-17  6:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio

Ping.

r~


On 07/24/2013 12:50 PM, Richard Henderson wrote:
> It has been pointed out on LKML that the alpha umount syscall numbers
> are named wrong, and a patch to rectify that has been posted for 3.11.
> 
> Glibc works around this by treating NR_umount as NR_umount2 if
> NR_oldumount exists.  That's more complicated than we need in QEMU,
> given that we control linux-user/*/syscall_nr.h.
> 
> This is the last instance of TARGET_NR_oldumount, so delete that from
> the strace.list.
> 
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
>  linux-user/alpha/syscall_nr.h | 4 ++--
>  linux-user/strace.list        | 3 ---
>  linux-user/syscall.c          | 2 +-
>  3 files changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/linux-user/alpha/syscall_nr.h b/linux-user/alpha/syscall_nr.h
> index ac2b6e2..d52d76e 100644
> --- a/linux-user/alpha/syscall_nr.h
> +++ b/linux-user/alpha/syscall_nr.h
> @@ -20,7 +20,7 @@
>  #define TARGET_NR_lseek		 19
>  #define TARGET_NR_getxpid		 20
>  #define TARGET_NR_osf_mount		 21
> -#define TARGET_NR_umount		 22
> +#define TARGET_NR_umount2		 22
>  #define TARGET_NR_setuid		 23
>  #define TARGET_NR_getxuid		 24
>  #define TARGET_NR_exec_with_loader	 25	/* not implemented */
> @@ -255,7 +255,7 @@
>  #define TARGET_NR_sysinfo		318
>  #define TARGET_NR__sysctl		319
>  /* 320 was sys_idle.  */
> -#define TARGET_NR_oldumount		321
> +#define TARGET_NR_umount		321
>  #define TARGET_NR_swapon		322
>  #define TARGET_NR_times		323
>  #define TARGET_NR_personality	324
> diff --git a/linux-user/strace.list b/linux-user/strace.list
> index 08f115d..4f9c364 100644
> --- a/linux-user/strace.list
> +++ b/linux-user/strace.list
> @@ -612,9 +612,6 @@
>  #ifdef TARGET_NR_oldstat
>  { TARGET_NR_oldstat, "oldstat" , NULL, NULL, NULL },
>  #endif
> -#ifdef TARGET_NR_oldumount
> -{ TARGET_NR_oldumount, "oldumount" , NULL, NULL, NULL },
> -#endif
>  #ifdef TARGET_NR_olduname
>  { TARGET_NR_olduname, "olduname" , NULL, NULL, NULL },
>  #endif
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 00a0390..e42c20e 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -5719,7 +5719,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
>              unlock_user(p, arg1, 0);
>          }
>          break;
> -#ifdef TARGET_NR_umount2 /* not on alpha */
> +#ifdef TARGET_NR_umount2
>      case TARGET_NR_umount2:
>          if (!(p = lock_user_string(arg1)))
>              goto efault;
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] alpha-linux-user: Fix umount syscall numbers
  2013-08-17  6:24 ` [Qemu-devel] [PATCH 1/2] alpha-linux-user: Fix umount syscall numbers Richard Henderson
@ 2013-08-26 20:26   ` Richard Henderson
  2013-09-09 14:00     ` Riku Voipio
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2013-08-26 20:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio

Ping.

r~

On 08/16/2013 11:24 PM, Richard Henderson wrote:
> Ping.
> 
> r~
> 
> 
> On 07/24/2013 12:50 PM, Richard Henderson wrote:
>> It has been pointed out on LKML that the alpha umount syscall numbers
>> are named wrong, and a patch to rectify that has been posted for 3.11.
>>
>> Glibc works around this by treating NR_umount as NR_umount2 if
>> NR_oldumount exists.  That's more complicated than we need in QEMU,
>> given that we control linux-user/*/syscall_nr.h.
>>
>> This is the last instance of TARGET_NR_oldumount, so delete that from
>> the strace.list.
>>
>> Signed-off-by: Richard Henderson <rth@twiddle.net>
>> ---
>>  linux-user/alpha/syscall_nr.h | 4 ++--
>>  linux-user/strace.list        | 3 ---
>>  linux-user/syscall.c          | 2 +-
>>  3 files changed, 3 insertions(+), 6 deletions(-)
>>
>> diff --git a/linux-user/alpha/syscall_nr.h b/linux-user/alpha/syscall_nr.h
>> index ac2b6e2..d52d76e 100644
>> --- a/linux-user/alpha/syscall_nr.h
>> +++ b/linux-user/alpha/syscall_nr.h
>> @@ -20,7 +20,7 @@
>>  #define TARGET_NR_lseek		 19
>>  #define TARGET_NR_getxpid		 20
>>  #define TARGET_NR_osf_mount		 21
>> -#define TARGET_NR_umount		 22
>> +#define TARGET_NR_umount2		 22
>>  #define TARGET_NR_setuid		 23
>>  #define TARGET_NR_getxuid		 24
>>  #define TARGET_NR_exec_with_loader	 25	/* not implemented */
>> @@ -255,7 +255,7 @@
>>  #define TARGET_NR_sysinfo		318
>>  #define TARGET_NR__sysctl		319
>>  /* 320 was sys_idle.  */
>> -#define TARGET_NR_oldumount		321
>> +#define TARGET_NR_umount		321
>>  #define TARGET_NR_swapon		322
>>  #define TARGET_NR_times		323
>>  #define TARGET_NR_personality	324
>> diff --git a/linux-user/strace.list b/linux-user/strace.list
>> index 08f115d..4f9c364 100644
>> --- a/linux-user/strace.list
>> +++ b/linux-user/strace.list
>> @@ -612,9 +612,6 @@
>>  #ifdef TARGET_NR_oldstat
>>  { TARGET_NR_oldstat, "oldstat" , NULL, NULL, NULL },
>>  #endif
>> -#ifdef TARGET_NR_oldumount
>> -{ TARGET_NR_oldumount, "oldumount" , NULL, NULL, NULL },
>> -#endif
>>  #ifdef TARGET_NR_olduname
>>  { TARGET_NR_olduname, "olduname" , NULL, NULL, NULL },
>>  #endif
>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
>> index 00a0390..e42c20e 100644
>> --- a/linux-user/syscall.c
>> +++ b/linux-user/syscall.c
>> @@ -5719,7 +5719,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
>>              unlock_user(p, arg1, 0);
>>          }
>>          break;
>> -#ifdef TARGET_NR_umount2 /* not on alpha */
>> +#ifdef TARGET_NR_umount2
>>      case TARGET_NR_umount2:
>>          if (!(p = lock_user_string(arg1)))
>>              goto efault;
>>
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] alpha-linux-user: Fix umount syscall numbers
  2013-08-26 20:26   ` Richard Henderson
@ 2013-09-09 14:00     ` Riku Voipio
  0 siblings, 0 replies; 5+ messages in thread
From: Riku Voipio @ 2013-09-09 14:00 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel

Hi,

On Mon, Aug 26, 2013 at 01:26:11PM -0700, Richard Henderson wrote:
> Ping.

Sorry for the delay, adding it to the next pull request.

Riku

> On 08/16/2013 11:24 PM, Richard Henderson wrote:
> > Ping.
> > 
> > r~
> > 
> > 
> > On 07/24/2013 12:50 PM, Richard Henderson wrote:
> >> It has been pointed out on LKML that the alpha umount syscall numbers
> >> are named wrong, and a patch to rectify that has been posted for 3.11.
> >>
> >> Glibc works around this by treating NR_umount as NR_umount2 if
> >> NR_oldumount exists.  That's more complicated than we need in QEMU,
> >> given that we control linux-user/*/syscall_nr.h.
> >>
> >> This is the last instance of TARGET_NR_oldumount, so delete that from
> >> the strace.list.
> >>
> >> Signed-off-by: Richard Henderson <rth@twiddle.net>
> >> ---
> >>  linux-user/alpha/syscall_nr.h | 4 ++--
> >>  linux-user/strace.list        | 3 ---
> >>  linux-user/syscall.c          | 2 +-
> >>  3 files changed, 3 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/linux-user/alpha/syscall_nr.h b/linux-user/alpha/syscall_nr.h
> >> index ac2b6e2..d52d76e 100644
> >> --- a/linux-user/alpha/syscall_nr.h
> >> +++ b/linux-user/alpha/syscall_nr.h
> >> @@ -20,7 +20,7 @@
> >>  #define TARGET_NR_lseek		 19
> >>  #define TARGET_NR_getxpid		 20
> >>  #define TARGET_NR_osf_mount		 21
> >> -#define TARGET_NR_umount		 22
> >> +#define TARGET_NR_umount2		 22
> >>  #define TARGET_NR_setuid		 23
> >>  #define TARGET_NR_getxuid		 24
> >>  #define TARGET_NR_exec_with_loader	 25	/* not implemented */
> >> @@ -255,7 +255,7 @@
> >>  #define TARGET_NR_sysinfo		318
> >>  #define TARGET_NR__sysctl		319
> >>  /* 320 was sys_idle.  */
> >> -#define TARGET_NR_oldumount		321
> >> +#define TARGET_NR_umount		321
> >>  #define TARGET_NR_swapon		322
> >>  #define TARGET_NR_times		323
> >>  #define TARGET_NR_personality	324
> >> diff --git a/linux-user/strace.list b/linux-user/strace.list
> >> index 08f115d..4f9c364 100644
> >> --- a/linux-user/strace.list
> >> +++ b/linux-user/strace.list
> >> @@ -612,9 +612,6 @@
> >>  #ifdef TARGET_NR_oldstat
> >>  { TARGET_NR_oldstat, "oldstat" , NULL, NULL, NULL },
> >>  #endif
> >> -#ifdef TARGET_NR_oldumount
> >> -{ TARGET_NR_oldumount, "oldumount" , NULL, NULL, NULL },
> >> -#endif
> >>  #ifdef TARGET_NR_olduname
> >>  { TARGET_NR_olduname, "olduname" , NULL, NULL, NULL },
> >>  #endif
> >> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> >> index 00a0390..e42c20e 100644
> >> --- a/linux-user/syscall.c
> >> +++ b/linux-user/syscall.c
> >> @@ -5719,7 +5719,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
> >>              unlock_user(p, arg1, 0);
> >>          }
> >>          break;
> >> -#ifdef TARGET_NR_umount2 /* not on alpha */
> >> +#ifdef TARGET_NR_umount2
> >>      case TARGET_NR_umount2:
> >>          if (!(p = lock_user_string(arg1)))
> >>              goto efault;
> >>
> > 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-09 14:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-24 19:50 [Qemu-devel] [PATCH 1/2] alpha-linux-user: Fix umount syscall numbers Richard Henderson
2013-07-24 19:50 ` [Qemu-devel] [PATCH 2/2] mips-linux-user: Adjust names in mips_syscall_args Richard Henderson
2013-08-17  6:24 ` [Qemu-devel] [PATCH 1/2] alpha-linux-user: Fix umount syscall numbers Richard Henderson
2013-08-26 20:26   ` Richard Henderson
2013-09-09 14:00     ` Riku Voipio

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).