Andrew Gildfind <ajag@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Couple of observations first:
> - xfs_attr always calls the attr_* and therefore the system call with
> a path, rather than a file descriptor.
> - xfs_attr is always called with ATTR_DONT_FOLLOW - that is it never follows
> symlinks
> The code looks like:
> asmlinkage long sys_attrctl(attr_obj_t obj, int type,
> attr_op_t *ops, int count)
...
> Which means that on the way in (and we know that at least its hitting the
> syscall), it will always take the ATTR_TYPE_LPATH case.
> I've had another look at your QA results (ppc.15-11-2000) they give the
> following:
> QA output created by 020
> *** list non-existant file
> *** print attributes
> attr_list: Bad address
> Could not list attributes for <TESTFILE>
> !!! error return
> *** list non-xfs file (in /proc)
> *** print attributes
> attr_list: Bad address
> ...
> The first test checks the non-existent file case, which means that we
> should come into the syscall, walk the path and die immediately with
> an ENOENT, ie. we should never get into XFS code at all.
> The fact that we are getting a bad address even in this case suggests to
> me that there maybe something weird happening because the path comes
> out of an attr_obj_t structure - are we sure that those structures are
> the same size in userland/kernel on PPC?
looks like (i hope this test is correct)
ppc:/usr/src/xfs/linux # gdb fs/xfs/xfs.o
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "ppc-suse-linux"...
(gdb) print sizeof(attr_obj_t)
$1 = 4
(gdb) quit
ppc:/usr/src/xfs/linux # gdb ../cmd/xfs/db/xfs_db
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "ppc-suse-linux"...
(gdb) print sizeof(attr_obj_t)
$1 = 4
(gdb)
> So... can you whack in another printk just after the switch and check whether
> the path lookup ever works - if it does I'm back in stumped-land, if not
> we have our culprit..
ok - here is the result:
Start mounting filesystem: ide0(3,8)
Ending clean XFS mount for filesystem: ide0(3,8)
ATTR_TYPE_PATH
ATTR_TYPE_PATH
ATTR_TYPE_PATH
ATTR_TYPE_PATH
ATTR_TYPE_PATH
ATTR_TYPE_PATH
ATTR_TYPE_PATH
ATTR_TYPE_PATH
ATTR_TYPE_PATH
ATTR_TYPE_PATH
ATTR_TYPE_PATH
ATTR_TYPE_PATH
ATTR_TYPE_PATH
Start mounting filesystem: ide0(3,8)
Ending clean XFS mount for filesystem: ide0(3,8)
so any new ideas?
t
--
thomas.graichen@xxxxxxxxxxxxxx
technical director innominate AG
clustering & security the linux architects
tel: +49-30-308806-13 fax: -77 http://www.innominate.com
|