[PATCH v3] Add security.* XATTR support for the UBIFS

Subodh Nijsure subodh.nijsure at gmail.com
Thu Apr 12 09:10:32 EDT 2012


On Thu, Apr 12, 2012 at 12:11 AM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> On Wed, 2012-04-11 at 14:28 -0700, subodh.nijsure at gmail.com wrote:
>> +#ifdef CONFIG_UBIFS_FS_XATTR
>> +
>> +     err = ubifs_init_security(dir, inode, &dentry->d_name);
>> +     if (err) {
>> +             ubifs_err("cannot initialize extended attribute, error %d",
>> +                       err);
>> +             goto out_cancel;
>> +     }
>> +
>> +#endif
>
> Suboodh,
>
> would you please first create a preparational patch which removes
> the CONFIG_UBIFS_FS_XATTR completely and makes xattr support to be
> always present.
>
> And then you could add the security stuff on top of this without the
> #ifdef churn.
>
> Thanks!

I will do that.

In general modification will be to move all the  real code within
#ifdef CONFIG_UBIFS_FS_XATTR/#endif to fs/ubifs/xattr.c, without ifdef
of course.
And for cases where its not defined within #ifndef
CONFIG_UBIFS_FS_XATTR/#endif, provide inline static implementation of
functions that always return "success", where required, in ubifs.h

-Subodh



More information about the linux-mtd mailing list