From e4e6d9b7a3112e38a2e8cc5b3ddac6c23d42a4a1 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Mon, 4 Mar 2019 22:29:25 +0100 Subject: [PATCH] pre-patches: remove 2.6.32 It does no longer compile. Also, it is prone to deadlocks. Anyway, such old kernels are no longer state of the art. --- pre-patches/2.6.32-rhel6-openvz | 182 ---------------- ...0001-mars-minimum-pre-patch-for-mars.patch | 202 ------------------ ...001-mars-necessary-for-in-tree-build.patch | 43 ---- 3 files changed, 427 deletions(-) delete mode 100644 pre-patches/2.6.32-rhel6-openvz delete mode 100644 pre-patches/vanilla-2.6.32/0001-mars-minimum-pre-patch-for-mars.patch delete mode 100644 pre-patches/vanilla-2.6.32/0001-mars-necessary-for-in-tree-build.patch diff --git a/pre-patches/2.6.32-rhel6-openvz b/pre-patches/2.6.32-rhel6-openvz deleted file mode 100644 index 612ae7fe..00000000 --- a/pre-patches/2.6.32-rhel6-openvz +++ /dev/null @@ -1,182 +0,0 @@ -diff -urpN source.rhel6//block/Kconfig source/block/Kconfig ---- source.rhel6//block/Kconfig 2012-11-21 12:24:27.625510977 +0100 -+++ source/block/Kconfig 2012-11-21 16:09:02.796206772 +0100 -@@ -99,6 +99,8 @@ config BLK_DEV_THROTTLING - - See Documentation/cgroups/blkio-controller.txt for more information. - -+source block/mars/kernel/Kconfig -+ - endif # BLOCK - - config BLOCK_COMPAT -diff -urpN source.rhel6//block/Makefile source/block/Makefile ---- source.rhel6//block/Makefile 2012-11-21 12:24:27.625510977 +0100 -+++ source/block/Makefile 2012-11-21 16:09:55.384556249 +0100 -@@ -18,3 +18,6 @@ obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched - - obj-$(CONFIG_BLOCK_COMPAT) += compat_ioctl.o - obj-$(CONFIG_BLK_DEV_INTEGRITY) += blk-integrity.o -+ -+obj-$(CONFIG_MARS) += mars/kernel/ -+ -diff -urpN source.rhel6//fs/aio.c source/fs/aio.c ---- source.rhel6//fs/aio.c 2012-11-21 12:24:35.721563886 +0100 -+++ source/fs/aio.c 2012-11-21 16:13:54.634146459 +0100 -@@ -1304,6 +1304,8 @@ out: - return ret; - } - -+EXPORT_SYMBOL(sys_io_setup); -+ - /* sys_io_destroy: - * Destroy the aio_context specified. May cancel any outstanding - * AIOs and block on completion. Will fail with -ENOSYS if not -@@ -1321,6 +1323,8 @@ SYSCALL_DEFINE1(io_destroy, aio_context_ - return -EINVAL; - } - -+EXPORT_SYMBOL(sys_io_destroy); -+ - static void aio_advance_iovec(struct kiocb *iocb, ssize_t ret) - { - struct iovec *iov = &iocb->ki_iovec[iocb->ki_cur_seg]; -@@ -1927,6 +1931,8 @@ SYSCALL_DEFINE3(io_submit, aio_context_t - return do_io_submit(ctx_id, nr, iocbpp, 0); - } - -+EXPORT_SYMBOL(sys_io_submit); -+ - /* lookup_kiocb - * Finds a given iocb for cancellation. - */ -@@ -2006,6 +2012,8 @@ SYSCALL_DEFINE3(io_cancel, aio_context_t - return ret; - } - -+EXPORT_SYMBOL(sys_io_cancel); -+ - /* io_getevents: - * Attempts to read at least min_nr events and up to nr events from - * the completion queue for the aio_context specified by ctx_id. May -@@ -2036,3 +2044,5 @@ SYSCALL_DEFINE5(io_getevents, aio_contex - asmlinkage_protect(5, ret, ctx_id, min_nr, nr, events, timeout); - return ret; - } -+ -+EXPORT_SYMBOL(sys_io_getevents); -diff -urpN source.rhel6//fs/open.c source/fs/open.c ---- source.rhel6//fs/open.c 2012-11-21 12:24:38.097579412 +0100 -+++ source/fs/open.c 2012-11-21 16:16:34.083206503 +0100 -@@ -611,6 +611,8 @@ out: - return error; - } - -+EXPORT_SYMBOL(sys_lchown); -+ - SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group) - { - struct file * file; -diff -urpN source.rhel6//fs/utimes.c source/fs/utimes.c ---- source.rhel6//fs/utimes.c 2012-11-21 12:24:38.249580405 +0100 -+++ source/fs/utimes.c 2012-11-21 16:20:22.144720576 +0100 -@@ -1,3 +1,4 @@ -+#include - #include - #include - #include -@@ -184,6 +185,8 @@ out: - return error; - } - -+EXPORT_SYMBOL(do_utimes); -+ - SYSCALL_DEFINE4(utimensat, int, dfd, char __user *, filename, - struct timespec __user *, utimes, int, flags) - { -diff -urpN source.rhel6//include/linux/major.h source/include/linux/major.h ---- source.rhel6//include/linux/major.h 2012-11-21 12:24:38.717583463 +0100 -+++ source/include/linux/major.h 2012-11-21 16:21:14.865066525 +0100 -@@ -146,6 +146,7 @@ - #define UNIX98_PTY_SLAVE_MAJOR (UNIX98_PTY_MASTER_MAJOR+UNIX98_PTY_MAJOR_COUNT) - - #define DRBD_MAJOR 147 -+#define MARS_MAJOR 148 - #define RTF_MAJOR 150 - #define RAW_MAJOR 162 - -diff -urpN source.rhel6//include/linux/sched.h source/include/linux/sched.h ---- source.rhel6//include/linux/sched.h 2012-11-21 12:24:38.953585006 +0100 -+++ source/include/linux/sched.h 2012-11-21 16:22:31.845571806 +0100 -@@ -1532,6 +1532,9 @@ struct task_struct { - /* mutex deadlock detection */ - struct mutex_waiter *blocked_on; - #endif -+#ifdef CONFIG_DEBUG_SPINLOCK -+ atomic_t lock_count; -+#endif - #ifdef CONFIG_TRACE_IRQFLAGS - unsigned int irq_events; - int hardirqs_enabled; -diff -urpN source.rhel6//lib/debug_locks.c source/lib/debug_locks.c ---- source.rhel6//lib/debug_locks.c 2012-11-21 12:24:39.849590860 +0100 -+++ source/lib/debug_locks.c 2012-11-21 16:24:06.234191565 +0100 -@@ -44,3 +44,5 @@ int debug_locks_off(void) - } - return 0; - } -+ -+EXPORT_SYMBOL(debug_locks_off); -diff -urpN source.rhel6//mm/init-mm.c source/mm/init-mm.c ---- source.rhel6//mm/init-mm.c 2012-11-21 12:24:39.929591383 +0100 -+++ source/mm/init-mm.c 2012-11-21 16:25:35.382777139 +0100 -@@ -5,6 +5,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -18,5 +19,10 @@ struct mm_struct init_mm = { - .page_table_lock = __SPIN_LOCK_UNLOCKED(init_mm.page_table_lock), - .mmlist = LIST_HEAD_INIT(init_mm.mmlist), - .cpu_vm_mask = CPU_MASK_ALL, -+#ifdef CONFIG_AIO -+ .ioctx_lock = __SPIN_LOCK_UNLOCKED(init_mm.ioctx_lock), -+ .ioctx_list = HLIST_HEAD_INIT, -+ .get_unmapped_area = arch_get_unmapped_area, -+#endif - }; - EXPORT_SYMBOL(init_mm); -diff -urpN source.rhel6//mm/mmu_context.c source/mm/mmu_context.c ---- source.rhel6//mm/mmu_context.c 2012-11-21 12:24:39.969591645 +0100 -+++ source/mm/mmu_context.c 2012-11-21 16:26:42.839220361 +0100 -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - - #include - -diff -urpN source.rhel6//mm/page_alloc.c source/mm/page_alloc.c ---- source.rhel6//mm/page_alloc.c 2012-11-21 12:24:39.985591749 +0100 -+++ source/mm/page_alloc.c 2012-11-21 16:29:13.160208474 +0100 -@@ -168,6 +168,7 @@ static char * const zone_names[MAX_NR_ZO - * tuned according to the amount of memory in the system. - */ - int min_free_kbytes = 1024; -+EXPORT_SYMBOL(min_free_kbytes); - - /* - * Extra memory for the system to try freeing between the min and -@@ -5125,6 +5126,8 @@ void setup_per_zone_wmarks(void) - calculate_totalreserve_pages(); - } - -+EXPORT_SYMBOL(setup_per_zone_wmarks); -+ - /* - * The inactive anon list should be small enough that the VM never has to - * do too much work, but large enough that each inactive page has a chance diff --git a/pre-patches/vanilla-2.6.32/0001-mars-minimum-pre-patch-for-mars.patch b/pre-patches/vanilla-2.6.32/0001-mars-minimum-pre-patch-for-mars.patch deleted file mode 100644 index 06229cf5..00000000 --- a/pre-patches/vanilla-2.6.32/0001-mars-minimum-pre-patch-for-mars.patch +++ /dev/null @@ -1,202 +0,0 @@ -From 2fefc2b162e6b0d5b9270e16bcf7f79611713302 Mon Sep 17 00:00:00 2001 -From: Thomas Schoebel-Theuer -Date: Wed, 26 Jun 2013 14:45:07 +0200 -Subject: [PATCH] mars: minimum pre-patch for mars - -Mostly introduces missing EXPORT_SYMBOL(). ---- - fs/aio.c | 5 +++++ - fs/namei.c | 5 +++++ - fs/open.c | 2 ++ - fs/utimes.c | 2 ++ - include/linux/major.h | 1 + - kernel/fork.c | 1 + - mm/mmu_context.c | 3 +++ - mm/page_alloc.c | 2 ++ - mm/swap_state.c | 1 + - 9 files changed, 22 insertions(+) - -diff --git a/fs/aio.c b/fs/aio.c -index 5030dc6..de5b507 100644 ---- a/fs/aio.c -+++ b/fs/aio.c -@@ -1267,6 +1267,7 @@ SYSCALL_DEFINE2(io_setup, unsigned, nr_events, aio_context_t __user *, ctxp) - out: - return ret; - } -+EXPORT_SYMBOL(sys_io_setup); - - /* sys_io_destroy: - * Destroy the aio_context specified. May cancel any outstanding -@@ -1284,6 +1285,7 @@ SYSCALL_DEFINE1(io_destroy, aio_context_t, ctx) - pr_debug("EINVAL: io_destroy: invalid context id\n"); - return -EINVAL; - } -+EXPORT_SYMBOL(sys_io_destroy); - - static void aio_advance_iovec(struct kiocb *iocb, ssize_t ret) - { -@@ -1675,6 +1677,7 @@ SYSCALL_DEFINE3(io_submit, aio_context_t, ctx_id, long, nr, - put_ioctx(ctx); - return i ? i : ret; - } -+EXPORT_SYMBOL(sys_io_submit); - - /* lookup_kiocb - * Finds a given iocb for cancellation. -@@ -1754,6 +1757,7 @@ SYSCALL_DEFINE3(io_cancel, aio_context_t, ctx_id, struct iocb __user *, iocb, - - return ret; - } -+EXPORT_SYMBOL(sys_io_cancel); - - /* io_getevents: - * Attempts to read at least min_nr events and up to nr events from -@@ -1785,3 +1789,4 @@ SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id, - asmlinkage_protect(5, ret, ctx_id, min_nr, nr, events, timeout); - return ret; - } -+EXPORT_SYMBOL(sys_io_getevents); -diff --git a/fs/namei.c b/fs/namei.c -index 6551acb..c76d8e6 100644 ---- a/fs/namei.c -+++ b/fs/namei.c -@@ -2983,12 +2983,17 @@ EXPORT_SYMBOL(vfs_create); - EXPORT_SYMBOL(vfs_follow_link); - EXPORT_SYMBOL(vfs_link); - EXPORT_SYMBOL(vfs_mkdir); -+EXPORT_SYMBOL(sys_mkdir); - EXPORT_SYMBOL(vfs_mknod); - EXPORT_SYMBOL(generic_permission); - EXPORT_SYMBOL(vfs_readlink); - EXPORT_SYMBOL(vfs_rename); -+EXPORT_SYMBOL(sys_rename); - EXPORT_SYMBOL(vfs_rmdir); -+EXPORT_SYMBOL(sys_rmdir); - EXPORT_SYMBOL(vfs_symlink); -+EXPORT_SYMBOL(sys_symlink); - EXPORT_SYMBOL(vfs_unlink); -+EXPORT_SYMBOL(sys_unlink); - EXPORT_SYMBOL(dentry_unhash); - EXPORT_SYMBOL(generic_readlink); -diff --git a/fs/open.c b/fs/open.c -index 4f01e06..00bdef5 100644 ---- a/fs/open.c -+++ b/fs/open.c -@@ -707,6 +707,7 @@ out_release: - out: - return error; - } -+EXPORT_SYMBOL(sys_chmod); - - SYSCALL_DEFINE5(fchownat, int, dfd, const char __user *, filename, uid_t, user, - gid_t, group, int, flag) -@@ -751,6 +752,7 @@ out_release: - out: - return error; - } -+EXPORT_SYMBOL(sys_lchown); - - SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group) - { -diff --git a/fs/utimes.c b/fs/utimes.c -index e4c75db..a33c116 100644 ---- a/fs/utimes.c -+++ b/fs/utimes.c -@@ -1,3 +1,4 @@ -+#include - #include - #include - #include -@@ -169,6 +170,7 @@ long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags - out: - return error; - } -+EXPORT_SYMBOL(do_utimes); - - SYSCALL_DEFINE4(utimensat, int, dfd, char __user *, filename, - struct timespec __user *, utimes, int, flags) -diff --git a/include/linux/major.h b/include/linux/major.h -index 6a8ca98..faf6692 100644 ---- a/include/linux/major.h -+++ b/include/linux/major.h -@@ -146,6 +146,7 @@ - #define UNIX98_PTY_SLAVE_MAJOR (UNIX98_PTY_MASTER_MAJOR+UNIX98_PTY_MAJOR_COUNT) - - #define DRBD_MAJOR 147 -+#define MARS_MAJOR 148 - #define RTF_MAJOR 150 - #define RAW_MAJOR 162 - -diff --git a/kernel/fork.c b/kernel/fork.c -index c28f804..1256c1b 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -169,6 +169,7 @@ void __put_task_struct(struct task_struct *tsk) - if (!profile_handoff_task(tsk)) - free_task(tsk); - } -+EXPORT_SYMBOL(__put_task_struct); - - /* - * macro override instead of weak attribute alias, to workaround -diff --git a/mm/mmu_context.c b/mm/mmu_context.c -index ded9081..addb2e3 100644 ---- a/mm/mmu_context.c -+++ b/mm/mmu_context.c -@@ -6,6 +6,7 @@ - #include - #include - #include -+#include - - #include - -@@ -37,6 +38,7 @@ void use_mm(struct mm_struct *mm) - if (active_mm != mm) - mmdrop(active_mm); - } -+EXPORT_SYMBOL(use_mm); - - /* - * unuse_mm -@@ -56,3 +58,4 @@ void unuse_mm(struct mm_struct *mm) - enter_lazy_tlb(mm, tsk); - task_unlock(tsk); - } -+EXPORT_SYMBOL(unuse_mm); -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 3ecab7e..9774425 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -122,6 +122,7 @@ static char * const zone_names[MAX_NR_ZONES] = { - }; - - int min_free_kbytes = 1024; -+EXPORT_SYMBOL(min_free_kbytes); - - static unsigned long __meminitdata nr_kernel_pages; - static unsigned long __meminitdata nr_all_pages; -@@ -4645,6 +4646,7 @@ void setup_per_zone_wmarks(void) - /* update totalreserve_pages */ - calculate_totalreserve_pages(); - } -+EXPORT_SYMBOL(setup_per_zone_wmarks); - - /* - * The inactive anon list should be small enough that the VM never has to -diff --git a/mm/swap_state.c b/mm/swap_state.c -index 6d1daeb..8f2038a 100644 ---- a/mm/swap_state.c -+++ b/mm/swap_state.c -@@ -46,6 +46,7 @@ struct address_space swapper_space = { - .i_mmap_nonlinear = LIST_HEAD_INIT(swapper_space.i_mmap_nonlinear), - .backing_dev_info = &swap_backing_dev_info, - }; -+EXPORT_SYMBOL(swapper_space); - - #define INC_CACHE_INFO(x) do { swap_cache_info.x++; } while (0) - --- -2.9.2 - diff --git a/pre-patches/vanilla-2.6.32/0001-mars-necessary-for-in-tree-build.patch b/pre-patches/vanilla-2.6.32/0001-mars-necessary-for-in-tree-build.patch deleted file mode 100644 index 648ec327..00000000 --- a/pre-patches/vanilla-2.6.32/0001-mars-necessary-for-in-tree-build.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 4ee63a106bd45d77babad896cac80195218921ae Mon Sep 17 00:00:00 2001 -From: Thomas Schoebel-Theuer -Date: Wed, 26 Jun 2013 14:46:41 +0200 -Subject: [PATCH] mars: necessary for in-tree build - -This patch should not go upstream (as long as the MARS source is -out-of-tree), because the kernel will no longer build without -MARS sources present in block/mars/ . - -Use this for in-tree builds of the out-of-tree MARS sourcecode, -i.e. cd block/ && git clone https://github.com/schoebel/mars ---- - block/Kconfig | 2 ++ - block/Makefile | 2 ++ - 2 files changed, 4 insertions(+) - -diff --git a/block/Kconfig b/block/Kconfig -index 9be0b56..d046af5 100644 ---- a/block/Kconfig -+++ b/block/Kconfig -@@ -77,6 +77,8 @@ config BLK_DEV_INTEGRITY - T10/SCSI Data Integrity Field or the T13/ATA External Path - Protection. If in doubt, say N. - -+source block/mars/kernel/Kconfig -+ - endif # BLOCK - - config BLOCK_COMPAT -diff --git a/block/Makefile b/block/Makefile -index ba74ca6..71cdf53 100644 ---- a/block/Makefile -+++ b/block/Makefile -@@ -15,3 +15,5 @@ obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched.o - - obj-$(CONFIG_BLOCK_COMPAT) += compat_ioctl.o - obj-$(CONFIG_BLK_DEV_INTEGRITY) += blk-integrity.o -+ -+obj-$(CONFIG_MARS) += mars/kernel/ -\ No newline at end of file --- -1.8.1.4 -