Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

Cannot patch hardened kernel with reiser4 patch !!! check:)

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
geloo
n00b
n00b
Posts: 33
Joined: Sat Mar 29, 2008 11:26 am

Cannot patch hardened kernel with reiser4 patch !!! check:)

  • Quote

Post by geloo » Thu Feb 10, 2011 7:11 pm

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: Select all

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: Select all

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: Select all

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
Top
kernelOfTruth
Watchman
Watchman
User avatar
Posts: 6111
Joined: Tue Dec 20, 2005 10:34 pm
Location: Vienna, Austria; Germany; hello world :)
Contact:
Contact kernelOfTruth
Website

  • Quote

Post by kernelOfTruth » Thu Feb 10, 2011 7:30 pm

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-fo ... scCD-4.9.0
https://github.com/kernelOfTruth/pulsea ... zer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Top
geloo
n00b
n00b
Posts: 33
Joined: Sat Mar 29, 2008 11:26 am

  • Quote

Post by geloo » Fri Feb 11, 2011 7:50 am

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 ?
Top
geloo
n00b
n00b
Posts: 33
Joined: Sat Mar 29, 2008 11:26 am

  • Quote

Post by geloo » Fri Feb 11, 2011 12:45 pm

this is reject code:

Code: Select all

***************
*** 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: Select all

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
Top
hirakendu
Guru
Guru
Posts: 386
Joined: Wed Jan 24, 2007 5:54 pm
Location: san diego
Contact:
Contact hirakendu
Website

  • Quote

Post by hirakendu » Sun Feb 13, 2011 8:08 pm

Try adding the "const" keyword to those function pointers, i.e.,

Code: Select all

    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.
[topic=563717]Helium Sources[/topic] || [topic=580369] Gentoo Minimal Livecd [/topic]
Top
Post Reply

5 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy