Attached is a patch against the latest Kconfig.in. Also, attached are
replacement patches for all the patches (except ksize) that have Kconfig
options. These new patches are turned on only if the appropriate Kconfig option 
has been chosen.

-Russell Harmon

P.S. Junjiro, you may want to have a look at the
aufs-no-patch-in-kconfig.patch. It has a few more minor changes that I did
not mention which you may want to consider changing in next monday's
release.

On Nov 26, 2007 2:20 AM, Russell Harmon <[EMAIL PROTECTED]> wrote:

> I noticed that the patches that have kconfig options are completely
> unnecessary.  They can all be implicitly activated. I've attached a
> patch which enables all of them.
>
> I also noticed that you forgot to require AUFS_FAKE_DM = n in config
> AUFS_LHASH_PATCH the Kconfig.
>
> Note that this patch is not all inclusive, it is a patch to the Kconfig
> that was generated for 2.6.24-rc3. It is really just a proof of concept,
> and something to commit to my git repo =).
>
> -Russell Harmon
>
> diff --git a/fs/aufs/Kconfig b/fs/aufs/Kconfig
> index 768005d..52bf124 100644
> --- a/fs/aufs/Kconfig
> +++ b/fs/aufs/Kconfig
> @@ -122,95 +122,37 @@ config AUFS_RR_SQUASHFS
>        'ro.'
>        See detail in aufs.5.
>  config AUFS_SEC_PERM_PATCH
> -       bool "sec_perm-2.6.24.patch was applied or not"
> +       bool
>        depends on AUFS
>        depends on AUFS = m
>        depends on SECURITY
> -       default n
> -       help
> -       If you build aufs as a module and enabled CONFIG_SECURITY,
> -       then you need to apply the patch
> -       'CVS_TREE/aufs/patch/sec_perm-2.6.24.patch' to your kernel
> -       source, and enable this configuration.
> -       The sec_perm-2.6.24.patch exports a kernel function
> -       security_inode_permission() to modules.
> -comment "SECURITY and AUFS_SEC_PERM_PATCH are disabled"
> -       depends on AUFS
> -       depends on SECURITY = n
> -       config AUFS_SPLICE_PATCH
> -       bool "splice.patch for sendfile(2) and splice(2)"
> +       default y
> +config AUFS_SPLICE_PATCH
> +       bool
>        depends on AUFS
> -       default n
> -       help
> -       If you use 'loopback mount' on a fs-image file, or use
> -       splice(2) systemcall in aufs, then you need to apply the patch
> -       CVS_TREE/aufs/patch/splice.patch' to your kernel source, and
> -       enable this configuration.
> -       The splice.patch makes the kernel function do_splice_to/from()
> -       global and exports them to modules.
> +       default y
>  config AUFS_PUT_FILP_PATCH
> -       bool "put_filp.patch for NFS branch"
> +       bool
>        depends on AUFS
>        depends on AUFS = m
>        depends on NFS_FS
> -       default n
> -       help
> -       If you build aufs as a module and use mounted NFS as an aufs
> -       branch filesystem, then you need to apply the patch
> -       'CVS_TREE/aufs/patch/put_filp.patch' to your kernel source,
> -       and enable this configuration.
> -       The put_filp.patch exports a kernel function put_filp() to
> -       modules.
> -comment "NFS_FS and AUFS_PUT_FILP_PATCH are disabled"
> -       depends on AUFS
> -       depends on NFS_FS = n
> +       default y
>  config AUFS_LHASH_PATCH
> -       bool "lhash.patch for NFS branch"
> +       bool
>        depends on AUFS
>        depends on NFS_FS
> -       default n
> -       help
> -       If you use mounted NFS as an aufs branch filesystem, then you
> -       need to apply the patch 'CVS_TREE/aufs/patch/lhash.patch' (or
> -       lhash-2.6.22.patch for linux-2.6.22 and later) to your kernel
> -       source, and enable this configuration.
> -       The patch file makes the kernel function __lookup_hash() global
> -       and exports it to modules.
> -comment "NFS_FS and AUFS_LHASH_PATCH are disabled"
> -       depends on AUFS
> -       depends on NFS_FS = n
> +       depends on AUFS_FAKE_DM = n
> +       default y
>  config AUFS_DENY_WRITE_ACCESS_PATCH
> -       bool "deny_write_access.patch was applied or not"
> +       bool
>        depends on AUFS
>        depends on AUFS = m
> -       default n
> -       help
> -       A security enhancement to deny writing to a running executable
> -       which exists on an aufs branch filesystem and executed through
> -       aufs. If you applied
> -       'CVS_TREE/aufs/patch/deny_write_access.patch' to your kernel
> -       and you are compiling aufs as a module, then enable this
> -       option.
> -       The write_deny_access.patch does nothing but export the
> -       function.
> +       default y
>  config AUFS_SYSFS_GET_DENTRY_PATCH
> -       bool "sysfs_get_dentry.patch for /sys/fs/aufs"
> +       bool
>        depends on AUFS
>        depends on SYSFS
> -       default n
> -       help
> -       This configuration and the patch
> -       'CVS_TREE/aufs/patch/sysfs_get_dentry.patch' is less
> -       important. They are just for telling you that the entries
> -       under /sys/fs/aufs consumes kernel memory for their contents
> -       (filedata). For example, if you have a lot of aufs-es and
> -       their branches and you refers /sys/fs/aufs/brs, then aufs
> -       allocates a memory for filedata and keeps it until something
> -       is written to /sys/fs/aufs/brs.
> -       As long as it keeps the allocated memory, this configuration
> -       sets the file size.
> -       The sysfs_get_dentry.patch makes the kernel function
> -       sysfs_get_dentry() global and exports it to modules.
> +       default y
>  config AUFS_WORKAROUND_FUSE
>        bool "Special handling for FUSE-based filesystem"
>        depends on AUFS && FUSE_FS
> diff --git a/fs/file_table.c b/fs/file_table.c
> index 4952229..2022a04 100644
> --- a/fs/file_table.c
> +++ b/fs/file_table.c
> @@ -313,6 +313,9 @@ void put_filp(struct file *file)
>                file_free(file);
>        }
>  }
> +#ifdef CONFIG_AUFS_PUT_FILP_PATCH
> +EXPORT_SYMBOL(put_filp);
> +#endif
>
>  void file_move(struct file *file, struct list_head *list)
>  {
> diff --git a/fs/namei.c b/fs/namei.c
> index d55cfa9..8297afa 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -1631,8 +1631,13 @@ int __user_path_lookup_open(const char __user
> *name, unsigned int lookup_flags,
>        return err;
>  }
>
> +#ifdef CONFIG_AUFS_LHASH_PATCH
> +struct dentry *__lookup_hash(struct qstr *name,
> +               struct dentry *base, struct nameidata *nd)
> +#else
>  static struct dentry *__lookup_hash(struct qstr *name,
>                struct dentry *base, struct nameidata *nd)
> +#endif
>  {
>        struct dentry *dentry;
>        struct inode *inode;
> @@ -3403,6 +3408,9 @@ EXPORT_SYMBOL(follow_up);
>  EXPORT_SYMBOL(get_write_access); /* binfmt_aout */
>  EXPORT_SYMBOL(getname);
>  EXPORT_SYMBOL(lock_rename);
> +#ifdef CONFIG_AUFS_LHASH_PATCH
> +EXPORT_SYMBOL(__lookup_hash);
> +#endif
>  EXPORT_SYMBOL(lookup_one_len);
>  EXPORT_SYMBOL(page_follow_link_light);
>  EXPORT_SYMBOL(page_put_link);
> @@ -3430,3 +3438,6 @@ EXPORT_SYMBOL(vfs_symlink);
>  EXPORT_SYMBOL(vfs_unlink);
>  EXPORT_SYMBOL(dentry_unhash);
>  EXPORT_SYMBOL(generic_readlink);
> +#ifdef CONFIG_AUFS_DENY_WRITE_ACCESS_PATCH
> +EXPORT_SYMBOL(deny_write_access);
> +#endif
> diff --git a/fs/splice.c b/fs/splice.c
> index 6bdcb61..cdcb4f6 100644
> --- a/fs/splice.c
> +++ b/fs/splice.c
> @@ -893,8 +893,13 @@ EXPORT_SYMBOL(generic_splice_sendpage);
>  /*
>  * Attempt to initiate a splice from pipe to file.
>  */
> +#ifdef CONFIG_AUFS_SPLICE_PATCH
> +long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
> +                          loff_t *ppos, size_t len, unsigned int flags)
> +#else
>  static long do_splice_from(struct pipe_inode_info *pipe, struct file
> *out,
>                           loff_t *ppos, size_t len, unsigned int flags)
> +#endif
>  {
>        int ret;
>
> @@ -914,13 +919,22 @@ static long do_splice_from(struct pipe_inode_info
> *pipe, struct file *out,
>
>        return out->f_op->splice_write(pipe, out, ppos, len, flags);
>  }
> +#ifdef CONFIG_AUFS_SPLICE_PATCH
> +EXPORT_SYMBOL(do_splice_from);
> +#endif
>
>  /*
>  * Attempt to initiate a splice from a file to a pipe.
>  */
> +#ifdef CONFIG_AUFS_SPLICE_PATCH
> +long do_splice_to(struct file *in, loff_t *ppos,
> +                        struct pipe_inode_info *pipe, size_t len,
> +                        unsigned int flags)
> +#else
>  static long do_splice_to(struct file *in, loff_t *ppos,
>                         struct pipe_inode_info *pipe, size_t len,
>                         unsigned int flags)
> +#endif
>  {
>        int ret;
>
> @@ -940,6 +954,9 @@ static long do_splice_to(struct file *in, loff_t
> *ppos,
>
>        return in->f_op->splice_read(in, ppos, pipe, len, flags);
>  }
> +#ifdef CONFIG_AUFS_SPLICE_PATCH
> +EXPORT_SYMBOL(do_splice_to);
> +#endif
>
>  /**
>  * splice_direct_to_actor - splices data directly between two non-pipes
> diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
> index 3371629..87a48c4 100644
> --- a/fs/sysfs/dir.c
> +++ b/fs/sysfs/dir.c
> @@ -121,6 +121,9 @@ struct dentry *sysfs_get_dentry(struct sysfs_dirent
> *sd)
>        }
>        return dentry;
>  }
> +#ifdef CONFIG_AUFS_SYSFS_GET_DENTRY_PATCH
> +EXPORT_SYMBOL(sysfs_get_dentry);
> +#endif
>
>  /**
>  *     sysfs_get_active - get an active reference to sysfs_dirent
> diff --git a/include/linux/namei.h b/include/linux/namei.h
> index bdadbb1..e2c4045 100644
> --- a/include/linux/namei.h
> +++ b/include/linux/namei.h
> @@ -95,6 +95,9 @@ extern struct file *lookup_instantiate_filp(struct
> nameidata *nd, struct dentry
>  extern struct file *nameidata_to_filp(struct nameidata *nd, int flags);
>  extern void release_open_intent(struct nameidata *);
>
> +#ifdef CONFIG_AUFS_LHASH_PATCH
> +struct dentry * __lookup_hash(struct qstr *name, struct dentry * base,
> struct nameidata *nd);
> +#endif
>  extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
>  extern struct dentry *lookup_one_noperm(const char *, struct dentry *);
>
> diff --git a/include/linux/splice.h b/include/linux/splice.h
> index 33e447f..7846e83 100644
> --- a/include/linux/splice.h
> +++ b/include/linux/splice.h
> @@ -70,4 +70,11 @@ extern ssize_t splice_to_pipe(struct pipe_inode_info *,
>  extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc
> *,
>                                      splice_direct_actor *);
>
> +#ifdef CONFIG_AUFS_SPLICE_PATCH
> +extern long do_splice_from(struct pipe_inode_info *pipe, struct file
> *out,
> +                          loff_t *ppos, size_t len, unsigned int flags);
> +extern long do_splice_to(struct file *in, loff_t *ppos,
> +                        struct pipe_inode_info *pipe, size_t len,
> +                        unsigned int flags);
> +#endif
>  #endif
>
>

Attachment: aufs-no-patch-in-kconfig.patch
Description: Binary data

Attachment: deny_write_access.patch
Description: Binary data

Attachment: lhash-2.6.22.patch
Description: Binary data

Attachment: put_flip.patch
Description: Binary data

Attachment: sec_perm-2.6.24.patch
Description: Binary data

Attachment: splice-2.6.23.patch
Description: Binary data

Attachment: sysfs_get_dentry.patch
Description: Binary data

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4

Reply via email to