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
|