xfs
[Top] [All Lists]

RE: Backup ACLs

To: "Nathan Scott" <nathans@xxxxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: Backup ACLs
From: "Juer Lee" <Juer.Lee@xxxxxxxxxx>
Date: Mon, 30 Jul 2001 11:21:37 +0100
Cc: <linux-xfs@xxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
Thread-index: AcEYjZbf57XlfQqfR6in0nOjrWsB2gATkFkQ
Thread-topic: Backup ACLs

>-----Original Message-----
>From: Nathan Scott [mailto:nathans@xxxxxxxxxxxxxxxxxxxxxxxx]
>Sent: 30 July 2001 01:20
>To: Juer Lee; linux-xfs@xxxxxxxxxxx
>Subject: Re: Backup ACLs
>
>
>hi,
>
>On Jul 29,  4:59pm, Juer Lee wrote:
>> Subject: RE: Backup ACLs
>> 
>> News:
>> 
>> It is my first time to look into the kernel code :(
>> There are some errors when I run 'attr -l juer' --- ' attr_list: Bad
>> address'. It seemed that the error is occured when calling function
>> __user_walk(...)   ( sys_attrctl  --> user_path_walk )
>> 
>> int __user_walk(const char *name, unsigned flags, struct 
>nameidata *nd)
>> {
>>         char *tmp;
>>         int err;
>> 
>>         tmp = getname(name);
>>         err = PTR_ERR(tmp);
>>      
>>         /* Debug */
>>         if( err == -14)
>>      printk("Attr Debug 1: Bad address!\n");         
>>      
>>         if (!IS_ERR(tmp)) {
>>                 err = 0;
>>                 if (path_init(tmp, flags, nd))
>>                         err = path_walk(tmp, nd);
>>      
>>      /* Debug */
>>      if( err == -14)
>>              printk("Attr Debug 1: Bad address!\n");
>
>[side-note: you probably want to use different printk
>strings so that its easier to see which part of the code
>is actually failing].
>
>> 
>>                 putname(tmp);
>>         }
>>         return err;
>> }
>> 
>> I saw the error message "Attr Debug 1:Bad address!" when I ran that
>> command.
>> Did any expert :) meet this similar problem?
>> 
>
>Now that I think back, I remember Thomas came across this
>problem on ppc a while back also, I don't think it was ever
>resolved.  What you've started doing above is probably the
>simplest way to go - I'd suggest keep doing that.  You'll
>need to find the exact point in the code where the kernel
>is deciding to return EFAULT ... from a quick peek, I see
>there's one case in getname() - perhaps thats it.
>
>Once you find the offending line, you'll need to understand
>the conditional statement just prior to EFAULT being set;
>eg. use a few more printks before the condition to see what
>the values of the variables involved are and which part of
>it is evaluating to true (and then, hopefully, why).
>
>cheers.
>
>-- 
>Nathan


Thanks.
I am sure that the EFAULT is returned by __strncpy_from_user in
arch/ppc/lib/string.S.But I am not familiar with PPC asm language, so
.... :( 
I am sure that those structures used when calling sys_attrctl are the
same in userland/kernel on PPC. Actually userland/kernel code are using
same attr_kern.h and attributes.h.

Juer


<Prev in Thread] Current Thread [Next in Thread>