* Re: [Linux-ia64] libc umount and umount2 can't both be right
2003-05-13 20:06 [Linux-ia64] libc umount and umount2 can't both be right MONTGOMERY,BOB (HP-FtCollins,ex1)
@ 2003-05-13 23:24 ` Ian Wienand
2003-05-14 8:31 ` Andreas Schwab
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Ian Wienand @ 2003-05-13 23:24 UTC (permalink / raw)
To: linux-ia64
[originally cc: libc-alpha but screwed up the cc line so it was rejected here]
>On Tue, May 13, 2003 at 04:06:41PM -0400, MONTGOMERY,BOB (HP-FtCollins,ex1) wrote:
> In libc, umount and umount2 are the same code. They both use
> syscall number 1044 without introducing a call layer.
looks like a typo in libc to me
-i
ianw@gelato.unsw.edu.au
http://www.gelato.unsw.edu.au
--- libc/sysdeps/unix/sysv/linux/ia64/syscalls.list.old 2003-05-14 09:10:04.000000000 +1000
+++ libc/sysdeps/unix/sysv/linux/ia64/syscalls.list 2003-05-14 09:09:40.000000000 +1000
@@ -1,6 +1,6 @@
# File name Caller Syscall name # args Strong name Weak names
-umount2 - umount 2 __umount2 umount2
+umount2 - umount2 2 __umount2 umount2
# Whee! 64-bit systems naturally implement llseek.
llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Linux-ia64] libc umount and umount2 can't both be right
2003-05-13 20:06 [Linux-ia64] libc umount and umount2 can't both be right MONTGOMERY,BOB (HP-FtCollins,ex1)
2003-05-13 23:24 ` Ian Wienand
@ 2003-05-14 8:31 ` Andreas Schwab
2003-05-14 11:37 ` Ian Wienand
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2003-05-14 8:31 UTC (permalink / raw)
To: linux-ia64
Ian Wienand <ianw@gelato.unsw.edu.au> writes:
|> [originally cc: libc-alpha but screwed up the cc line so it was rejected here]
|>
|> >On Tue, May 13, 2003 at 04:06:41PM -0400, MONTGOMERY,BOB (HP-FtCollins,ex1) wrote:
|> > In libc, umount and umount2 are the same code. They both use
|> > syscall number 1044 without introducing a call layer.
|>
|> looks like a typo in libc to me
|>
|> -i
|> ianw@gelato.unsw.edu.au
|> http://www.gelato.unsw.edu.au
|>
|> --- libc/sysdeps/unix/sysv/linux/ia64/syscalls.list.old 2003-05-14 09:10:04.000000000 +1000
|> +++ libc/sysdeps/unix/sysv/linux/ia64/syscalls.list 2003-05-14 09:09:40.000000000 +1000
|> @@ -1,6 +1,6 @@
|> # File name Caller Syscall name # args Strong name Weak names
|>
|> -umount2 - umount 2 __umount2 umount2
|> +umount2 - umount2 2 __umount2 umount2
Except there is no umount2 syscall on ia64.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Linux-ia64] libc umount and umount2 can't both be right
2003-05-13 20:06 [Linux-ia64] libc umount and umount2 can't both be right MONTGOMERY,BOB (HP-FtCollins,ex1)
2003-05-13 23:24 ` Ian Wienand
2003-05-14 8:31 ` Andreas Schwab
@ 2003-05-14 11:37 ` Ian Wienand
2003-05-14 14:43 ` Andreas Schwab
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Ian Wienand @ 2003-05-14 11:37 UTC (permalink / raw)
To: linux-ia64
> Except there is no umount2 syscall on ia64.
yep sorry didn't read the email properly and jumped to an assumption.
appologies.
-i
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Linux-ia64] libc umount and umount2 can't both be right
2003-05-13 20:06 [Linux-ia64] libc umount and umount2 can't both be right MONTGOMERY,BOB (HP-FtCollins,ex1)
` (2 preceding siblings ...)
2003-05-14 11:37 ` Ian Wienand
@ 2003-05-14 14:43 ` Andreas Schwab
2003-05-14 15:47 ` MONTGOMERY,BOB (HP-FtCollins,ex1)
2003-05-15 0:26 ` Ulrich Drepper
5 siblings, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2003-05-14 14:43 UTC (permalink / raw)
To: linux-ia64
"MONTGOMERY,BOB (HP-FtCollins,ex1)" <bob.montgomery@hp.com> writes:
|> The problem: On IA64, the implementation of umount(2) in glibc
|> and of sys_umount in the kernel results in the kernel performing
|> umounts with essentially random flag words.
[ SYS_umount is actually umount2 on ia64 ]
Here is a patch:
2003-05-14 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/ia64/umount.c: New file.
--- /dev/null 2003-03-21 07:28:43.000000000 +0100
+++ sysdeps/unix/sysv/linux/ia64/umount.c 2003-05-14 14:33:40.000000000 +0200
@@ -0,0 +1,31 @@
+/* umount system call for Linux/ia64.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/mount.h>
+#include <errno.h>
+
+#include <sysdep.h>
+#include <bp-checks.h>
+
+/* Unmount a filesystem. */
+int
+umount (const char *special_file)
+{
+ return INLINE_SYSCALL (umount, 2, CHECK_STRING (special_file), 0);
+}
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 7+ messages in thread* RE: [Linux-ia64] libc umount and umount2 can't both be right
2003-05-13 20:06 [Linux-ia64] libc umount and umount2 can't both be right MONTGOMERY,BOB (HP-FtCollins,ex1)
` (3 preceding siblings ...)
2003-05-14 14:43 ` Andreas Schwab
@ 2003-05-14 15:47 ` MONTGOMERY,BOB (HP-FtCollins,ex1)
2003-05-15 0:26 ` Ulrich Drepper
5 siblings, 0 replies; 7+ messages in thread
From: MONTGOMERY,BOB (HP-FtCollins,ex1) @ 2003-05-14 15:47 UTC (permalink / raw)
To: linux-ia64
> > In libc, umount and umount2 are the same code. They both use
> > syscall number 1044 without introducing a call layer.
>
> looks like a typo in libc to me
>
> -i
> ianw@gelato.unsw.edu.au
> http://www.gelato.unsw.edu.au
I don't think it was a typo.
The problem is that 2.4 IA64 kernels don't have a umount2
entry point. They have a single entry point to provide
functionality for both umount and umount2 in the library.
Since the single kernel entry point expects two parameters,
the library needs to supply the second parameter (0) in the
case of umount, where the user only supplies the first
one.
Bob Montgomery, HP
>
> --- libc/sysdeps/unix/sysv/linux/ia64/syscalls.list.old
> 2003-05-14 09:10:04.000000000 +1000
> +++ libc/sysdeps/unix/sysv/linux/ia64/syscalls.list
> 2003-05-14 09:09:40.000000000 +1000
> @@ -1,6 +1,6 @@
> # File name Caller Syscall name # args Strong name
> Weak names
>
> -umount2 - umount 2
> __umount2 umount2
> +umount2 - umount2 2
> __umount2 umount2
>
> # Whee! 64-bit systems naturally implement llseek.
> llseek EXTRA lseek C:3 __libc_lseek
> __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Linux-ia64] libc umount and umount2 can't both be right
2003-05-13 20:06 [Linux-ia64] libc umount and umount2 can't both be right MONTGOMERY,BOB (HP-FtCollins,ex1)
` (4 preceding siblings ...)
2003-05-14 15:47 ` MONTGOMERY,BOB (HP-FtCollins,ex1)
@ 2003-05-15 0:26 ` Ulrich Drepper
5 siblings, 0 replies; 7+ messages in thread
From: Ulrich Drepper @ 2003-05-15 0:26 UTC (permalink / raw)
To: linux-ia64
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andreas Schwab wrote:
> [ SYS_umount is actually umount2 on ia64 ]
Indeed. This is the right patch, I've applied it. Thanks,
- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+wt7F2ijCOnn/RHQRAk3CAKCtCGqcjD3nhWuJenbeKKfWRWnHFACfdT/D
XdI87pwOvJw8IdGtnhQ0mhY=M4/U
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 7+ messages in thread