Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot patch hardened kernel with reiser4 patch !!! check:)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
geloo
n00b
n00b


Joined: 29 Mar 2008
Posts: 33

PostPosted: Thu Feb 10, 2011 7:11 pm    Post subject: Cannot patch hardened kernel with reiser4 patch !!! check:) Reply with quote

Hello,

could somebody please help me with patching and kernel compile?

1)
I am tried to patch hardened gentoo kernel 2.6.37 with reiser4 patch but getting uncompleted patch with error, below:

Code:
patching file include/linux/fs.h
Hunk #1 succeeded at 527 (offset 5 lines).
Hunk #2 FAILED at 1611.
Hunk #3 succeeded at 2144 (offset 5 lines).
Hunk #4 succeeded at 2214 (offset 5 lines).
1 out of 4 hunks FAILED -- saving rejects to file include/linux/fs.h.rej
patching file include/linux/mm.h
Hunk #1 succeeded at 880 with fuzz 1 (offset 7 lines).
patching file include/linux/sched.h
Hunk #1 succeeded at 1786 (offset 75 lines).
patching file include/linux/writeback.h
patching file mm/backing-dev.c
patching file mm/filemap.c
patching file mm/page-writeback.c



I have found new options with reiser4 in kernel tree.. seems like fine. But unfortunately, durring make command, i get an error:

Code:
fs/fs-writeback.o in function writeback_inodes.wb
etc

I have tried to patch other kernels, .36, .34, .32 but same problem here.
Maybe this is a problem with hardened kernel, such problem i have not before, when i am using common kernel.

2) And one additional question: i got hardened stage, all okey here. So question is: can i use not hardened kernel and manualy make changes here in order to allow this kernel work in hardened system ? I mean, what difference between common and hardened kernel ? only in some options? or there is something specify :)

thank you for any answer


Full patch log:
Code:
patching file Documentation/Changes
patching file Documentation/filesystems/reiser4.txt
patching file fs/fs-writeback.c
patching file fs/inode.c
patching file fs/Kconfig
patching file fs/Makefile
patching file fs/read_write.c
patching file fs/reiser4/as_ops.c
patching file fs/reiser4/block_alloc.c
patching file fs/reiser4/block_alloc.h
patching file fs/reiser4/blocknrset.c
patching file fs/reiser4/carry.c
patching file fs/reiser4/carry.h
patching file fs/reiser4/carry_ops.c
patching file fs/reiser4/carry_ops.h
patching file fs/reiser4/context.c
patching file fs/reiser4/context.h
patching file fs/reiser4/coord.c
patching file fs/reiser4/coord.h
patching file fs/reiser4/debug.c
patching file fs/reiser4/debug.h
patching file fs/reiser4/dformat.h
patching file fs/reiser4/dscale.c
patching file fs/reiser4/dscale.h
patching file fs/reiser4/entd.c
patching file fs/reiser4/entd.h
patching file fs/reiser4/eottl.c
patching file fs/reiser4/estimate.c
patching file fs/reiser4/export_ops.c
patching file fs/reiser4/flush.c
patching file fs/reiser4/flush.h
patching file fs/reiser4/flush_queue.c
patching file fs/reiser4/forward.h
patching file fs/reiser4/fsdata.c
patching file fs/reiser4/fsdata.h
patching file fs/reiser4/init_super.c
patching file fs/reiser4/inode.c
patching file fs/reiser4/inode.h
patching file fs/reiser4/ioctl.h
patching file fs/reiser4/jnode.c
patching file fs/reiser4/jnode.h
patching file fs/reiser4/kassign.c
patching file fs/reiser4/kassign.h
patching file fs/reiser4/Kconfig
patching file fs/reiser4/key.c
patching file fs/reiser4/key.h
patching file fs/reiser4/ktxnmgrd.c
patching file fs/reiser4/ktxnmgrd.h
patching file fs/reiser4/lock.c
patching file fs/reiser4/lock.h
patching file fs/reiser4/Makefile
patching file fs/reiser4/oid.c
patching file fs/reiser4/page_cache.c
patching file fs/reiser4/page_cache.h
patching file fs/reiser4/plugin/cluster.c
patching file fs/reiser4/plugin/cluster.h
patching file fs/reiser4/plugin/compress/compress.c
patching file fs/reiser4/plugin/compress/compress.h
patching file fs/reiser4/plugin/compress/compress_mode.c
patching file fs/reiser4/plugin/compress/Makefile
patching file fs/reiser4/plugin/crypto/cipher.c
patching file fs/reiser4/plugin/crypto/cipher.h
patching file fs/reiser4/plugin/crypto/digest.c
patching file fs/reiser4/plugin/dir/dir.h
patching file fs/reiser4/plugin/dir/hashed_dir.c
patching file fs/reiser4/plugin/dir/Makefile
patching file fs/reiser4/plugin/dir/seekable_dir.c
patching file fs/reiser4/plugin/dir_plugin_common.c
patching file fs/reiser4/plugin/disk_format/disk_format40.c
patching file fs/reiser4/plugin/disk_format/disk_format40.h
patching file fs/reiser4/plugin/disk_format/disk_format.c
patching file fs/reiser4/plugin/disk_format/disk_format.h
patching file fs/reiser4/plugin/disk_format/Makefile
patching file fs/reiser4/plugin/fibration.c
patching file fs/reiser4/plugin/fibration.h
patching file fs/reiser4/plugin/file/cryptcompress.c
patching file fs/reiser4/plugin/file/cryptcompress.h
patching file fs/reiser4/plugin/file/file.c
patching file fs/reiser4/plugin/file/file_conversion.c
patching file fs/reiser4/plugin/file/file.h
patching file fs/reiser4/plugin/file/Makefile
patching file fs/reiser4/plugin/file/symfile.c
patching file fs/reiser4/plugin/file/symlink.c
patching file fs/reiser4/plugin/file/tail_conversion.c
patching file fs/reiser4/plugin/file_ops.c
patching file fs/reiser4/plugin/file_ops_readdir.c
patching file fs/reiser4/plugin/file_plugin_common.c
patching file fs/reiser4/plugin/hash.c
patching file fs/reiser4/plugin/inode_ops.c
patching file fs/reiser4/plugin/inode_ops_rename.c
patching file fs/reiser4/plugin/item/acl.h
patching file fs/reiser4/plugin/item/blackbox.c
patching file fs/reiser4/plugin/item/blackbox.h
patching file fs/reiser4/plugin/item/cde.c
patching file fs/reiser4/plugin/item/cde.h
patching file fs/reiser4/plugin/item/ctail.c
patching file fs/reiser4/plugin/item/ctail.h
patching file fs/reiser4/plugin/item/extent.c
patching file fs/reiser4/plugin/item/extent_file_ops.c
patching file fs/reiser4/plugin/item/extent_flush_ops.c
patching file fs/reiser4/plugin/item/extent.h
patching file fs/reiser4/plugin/item/extent_item_ops.c
patching file fs/reiser4/plugin/item/internal.c
patching file fs/reiser4/plugin/item/internal.h
patching file fs/reiser4/plugin/item/item.c
patching file fs/reiser4/plugin/item/item.h
patching file fs/reiser4/plugin/item/Makefile
patching file fs/reiser4/plugin/item/sde.c
patching file fs/reiser4/plugin/item/sde.h
patching file fs/reiser4/plugin/item/static_stat.c
patching file fs/reiser4/plugin/item/static_stat.h
patching file fs/reiser4/plugin/item/tail.c
patching file fs/reiser4/plugin/item/tail.h
patching file fs/reiser4/plugin/Makefile
patching file fs/reiser4/plugin/node/Makefile
patching file fs/reiser4/plugin/node/node40.c
patching file fs/reiser4/plugin/node/node40.h
patching file fs/reiser4/plugin/node/node.c
patching file fs/reiser4/plugin/node/node.h
patching file fs/reiser4/plugin/object.c
patching file fs/reiser4/plugin/object.h
patching file fs/reiser4/plugin/plugin.c
patching file fs/reiser4/plugin/plugin.h
patching file fs/reiser4/plugin/plugin_header.h
patching file fs/reiser4/plugin/plugin_set.c
patching file fs/reiser4/plugin/plugin_set.h
patching file fs/reiser4/plugin/security/Makefile
patching file fs/reiser4/plugin/security/perm.c
patching file fs/reiser4/plugin/security/perm.h
patching file fs/reiser4/plugin/space/bitmap.c
patching file fs/reiser4/plugin/space/bitmap.h
patching file fs/reiser4/plugin/space/Makefile
patching file fs/reiser4/plugin/space/space_allocator.h
patching file fs/reiser4/plugin/tail_policy.c
patching file fs/reiser4/pool.c
patching file fs/reiser4/pool.h
patching file fs/reiser4/readahead.c
patching file fs/reiser4/readahead.h
patching file fs/reiser4/README
patching file fs/reiser4/reiser4.h
patching file fs/reiser4/safe_link.c
patching file fs/reiser4/safe_link.h
patching file fs/reiser4/seal.c
patching file fs/reiser4/seal.h
patching file fs/reiser4/search.c
patching file fs/reiser4/status_flags.c
patching file fs/reiser4/status_flags.h
patching file fs/reiser4/super.c
patching file fs/reiser4/super.h
patching file fs/reiser4/super_ops.c
patching file fs/reiser4/tap.c
patching file fs/reiser4/tap.h
patching file fs/reiser4/tree.c
patching file fs/reiser4/tree.h
patching file fs/reiser4/tree_mod.c
patching file fs/reiser4/tree_mod.h
patching file fs/reiser4/tree_walk.c
patching file fs/reiser4/tree_walk.h
patching file fs/reiser4/txnmgr.c
patching file fs/reiser4/txnmgr.h
patching file fs/reiser4/type_safe_hash.h
patching file fs/reiser4/vfs_ops.c
patching file fs/reiser4/vfs_ops.h
patching file fs/reiser4/wander.c
patching file fs/reiser4/wander.h
patching file fs/reiser4/writeout.h
patching file fs/reiser4/znode.c
patching file fs/reiser4/znode.h
patching file include/linux/fs.h
Hunk #1 succeeded at 527 (offset 5 lines).
Hunk #2 FAILED at 1611.
Hunk #3 succeeded at 2144 (offset 5 lines).
Hunk #4 succeeded at 2214 (offset 5 lines).
1 out of 4 hunks FAILED -- saving rejects to file include/linux/fs.h.rej
patching file include/linux/mm.h
Hunk #1 succeeded at 880 with fuzz 1 (offset 7 lines).
patching file include/linux/sched.h
Hunk #1 succeeded at 1786 (offset 75 lines).
patching file include/linux/writeback.h
patching file mm/backing-dev.c
patching file mm/filemap.c
patching file mm/page-writeback.c
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6111
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Thu Feb 10, 2011 7:30 pm    Post subject: Reply with quote

Quote:
Hunk #2 FAILED at 1611.
Hunk #3 succeeded at 2144 (offset 5 lines).
Hunk #4 succeeded at 2214 (offset 5 lines).
1 out of 4 hunks FAILED -- saving rejects to file include/linux/fs.h.rej


you need to merge those rejects into the include/linux/fs.h

file :idea:
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
geloo
n00b
n00b


Joined: 29 Mar 2008
Posts: 33

PostPosted: Fri Feb 11, 2011 7:50 am    Post subject: Reply with quote

thank you
could you please help me with this:)? how can i merge it into this fs.h file and what exatly i have to merge into it ?
Back to top
View user's profile Send private message
geloo
n00b
n00b


Joined: 29 Mar 2008
Posts: 33

PostPosted: Fri Feb 11, 2011 12:45 pm    Post subject: Reply with quote

this is reject code:

Code:
***************
*** 1610,1616 ****
     int (*statfs) (struct dentry *, struct kstatfs *);
     int (*remount_fs) (struct super_block *, int *, char *);
     void (*umount_begin) (struct super_block *);
-
     int (*show_options)(struct seq_file *, struct vfsmount *);
     int (*show_stats)(struct seq_file *, struct vfsmount *);
  #ifdef CONFIG_QUOTA
--- 1611,1622 ----
     int (*statfs) (struct dentry *, struct kstatfs *);
     int (*remount_fs) (struct super_block *, int *, char *);
     void (*umount_begin) (struct super_block *);
+    int (*writeback_inodes)(struct super_block *sb,
+             struct bdi_writeback *wb,
+             struct writeback_control *wbc,
+             bool only_this_sb);
+    void (*sync_inodes) (struct super_block *sb,
+             struct writeback_control *wbc);
     int (*show_options)(struct seq_file *, struct vfsmount *);
     int (*show_stats)(struct seq_file *, struct vfsmount *);
  #ifdef CONFIG_QUOTA



this is a part of original fs.h file where i have inserted it:

Code:
struct super_operations {
      struct inode *(* const alloc_inode)(struct super_block *sb);
   void (* const destroy_inode)(struct inode *);

      void (* const dirty_inode) (struct inode *);
   int (* const write_inode) (struct inode *, struct writeback_control *wbc);
   int (* const drop_inode) (struct inode *);
   void (* const evict_inode) (struct inode *);
   void (* const put_super) (struct super_block *);
   void (* const write_super) (struct super_block *);
   int (* const sync_fs)(struct super_block *sb, int wait);
   int (* const freeze_fs) (struct super_block *);
   int (* const unfreeze_fs) (struct super_block *);
   int (* const statfs) (struct dentry *, struct kstatfs *);
   int (* const remount_fs) (struct super_block *, int *, char *);
   void (* const umount_begin) (struct super_block *);



    int (*writeback_inodes)(struct super_block *sb,
             struct bdi_writeback *wb,
             struct writeback_control *wbc,
             bool only_this_sb);
    void (*sync_inodes) (struct super_block *sb,
             struct writeback_control *wbc);



 
   int (* const show_options)(struct seq_file *, struct vfsmount *);
   int (* const show_stats)(struct seq_file *, struct vfsmount *);
#ifdef CONFIG_QUOTA
   ssize_t (* const quota_read)(struct super_block *, int, char *, size_t, loff_t);
   ssize_t (* const quota_write)(struct super_block *, int, const char *, size_t, loff_t);
#endif
   int (* const bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
};



but kernel still canot compile with error.

When and what excatly i have to inserte?

thank you
Back to top
View user's profile Send private message
hirakendu
Guru
Guru


Joined: 24 Jan 2007
Posts: 386
Location: san diego

PostPosted: Sun Feb 13, 2011 8:08 pm    Post subject: Reply with quote

Try adding the "const" keyword to those function pointers, i.e.,
Code:
    int (* const writeback_inodes) (struct super_block *sb,
             struct bdi_writeback *wb,
             struct writeback_control *wbc,
             bool only_this_sb);
    void (* const sync_inodes) (struct super_block *sb,
             struct writeback_control *wbc);
, and also please post the exact error (not the entire log, just starting from the one line before where the actual error happens).

In my opinion, it won't be easy overall. (Most probably it will complain that the function definitions are incompatible.)

Also, not that I am discouraging anyone to use Reiser4 (and this is no fud), but using a fairly untested (and non-mainstream) filesystem while trying to secure your entire system is a bit of fail. I also wouldn't suggest to use Brtfs at this stage for such purposes, and probably stick to ext3, or if needed (for e.g., I need ssd trim support), ext4.
_________________
Helium Sources || Gentoo Minimal Livecd
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum