On Mar 15, 2011, at 11:53 AM, [1]aufs-users-requ...@lists.sourceforge.net
   wrote:

   From: [2]sf...@users.sourceforge.net

   Date: February 28, 2011 5:41:23 PM HST

   To: Palatinux <[3]fortressli...@gmail.com>

   Cc: [4]aufs-users@lists.sourceforge.net

   Subject: Re: Bug report + solution

     Hello Palatinux,
     Palatinux:

     I've found a possible bug in the lastest version. Bug report and solution

     are found here:

     [5]http://zen-kernel.org/issues/52

     For some older kernels, this is not a correct solution.
     It is a known problem when you apply both of grsec and aufs.
     If you read this post and its thread, you will find the correct
     solution.
     [6]http://www.mail-archive.com/aufs-users@lists.sourceforge.net/msg03190.h
     tml

   This is the patch I'm using in my personal build tree to revert

   the part of the grsecurity patch that conflicts with aufs.

   It was developed for

   2.6.32.28 vanilla kernel + grsecurity-2.2.1-2.6.32.28-201102121148.patch

   but it works with newer kernels and patches including

   2.6.32.32 vanilla kernel + grsecurity-2.2.1-2.6.32.32-201103122250.patch

   --- linux-2.6.32.28/include/linux/fs.h-grsec 2011-02-19 02:04:30.000000000
   -1000
   +++ linux-2.6.32.28/include/linux/fs.h 2011-02-19 02:05:55.000000000 -1000
   @@ -573,41 +573,41 @@
     unsigned long, unsigned long);

    struct address_space_operations {
   - int (* const writepage)(struct page *page, struct writeback_control *wbc);
   - int (* const readpage)(struct file *, struct page *);
   - void (* const sync_page)(struct page *);
   + int (* writepage)(struct page *page, struct writeback_control *wbc);
   + int (* readpage)(struct file *, struct page *);
   + void (* sync_page)(struct page *);

     /* Write back some dirty pages from this mapping. */
   - int (* const writepages)(struct address_space *, struct writeback_control
   *);
   + int (* writepages)(struct address_space *, struct writeback_control *);

     /* Set a page dirty.  Return true if this dirtied it */
   - int (* const set_page_dirty)(struct page *page);
   + int (* set_page_dirty)(struct page *page);

   - int (* const readpages)(struct file *filp, struct address_space *mapping,
   + int (* readpages)(struct file *filp, struct address_space *mapping,
     struct list_head *pages, unsigned nr_pages);

   - int (* const write_begin)(struct file *, struct address_space *mapping,
   + int (* write_begin)(struct file *, struct address_space *mapping,
     loff_t pos, unsigned len, unsigned flags,
     struct page **pagep, void **fsdata);
   - int (* const write_end)(struct file *, struct address_space *mapping,
   + int (* write_end)(struct file *, struct address_space *mapping,
     loff_t pos, unsigned len, unsigned copied,
     struct page *page, void *fsdata);

     /* Unfortunately this kludge is needed for FIBMAP. Don't use it */
   - sector_t (* const bmap)(struct address_space *, sector_t);
   - void (* const invalidatepage) (struct page *, unsigned long);
   - int (* const releasepage) (struct page *, gfp_t);
   - ssize_t (* const direct_IO)(int, struct kiocb *, const struct iovec *iov,
   + sector_t (* bmap)(struct address_space *, sector_t);
   + void (* invalidatepage) (struct page *, unsigned long);
   + int (* releasepage) (struct page *, gfp_t);
   + ssize_t (* direct_IO)(int, struct kiocb *, const struct iovec *iov,
     loff_t offset, unsigned long nr_segs);
   - int (* const get_xip_mem)(struct address_space *, pgoff_t, int,
   + int (* get_xip_mem)(struct address_space *, pgoff_t, int,
     void **, unsigned long *);
     /* migrate the contents of a page to the specified target */
   - int (* const migratepage) (struct address_space *,
   + int (* migratepage) (struct address_space *,
     struct page *, struct page *);
   - int (* const launder_page) (struct page *);
   - int (* const is_partially_uptodate) (struct page *, read_descriptor_t *,
   + int (* launder_page) (struct page *);
   + int (* is_partially_uptodate) (struct page *, read_descriptor_t *,
     unsigned long);
   - int (* const error_remove_page)(struct address_space *, struct page *);
   + int (* error_remove_page)(struct address_space *, struct page *);
    };

    /*

References

   1. mailto:aufs-users-requ...@lists.sourceforge.net
   2. mailto:sf...@users.sourceforge.net
   3. mailto:fortressli...@gmail.com
   4. mailto:aufs-users@lists.sourceforge.net
   5. http://zen-kernel.org/issues/52
   6. http://www.mail-archive.com/aufs-users@lists.sourceforge.net/msg03190.html
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d

Reply via email to