Fri, 19 Sep 2014 01:07:55 -0500
applying patch-3.10.53-vs2.3.6.8.diff to linux 3.10.55 fails in both patching
and testing/functionality.
the upstream addition of including "linux/hash.h" in "fs/namei.c" [1]
invalidated the patch hunk context.
patching file fs/namei.c
Hunk #1 FAILED at 34.
Hunk #2 succeeded at 267 (offset 1 line).
Hunk #3 succeeded at 473 (offset 1 line).
Hunk #4 succeeded at 1327 (offset 1 line).
Hunk #5 succeeded at 1473 (offset 1 line).
Hunk #6 succeeded at 1506 (offset 1 line).
1 out of 16 hunks FAILED -- saving rejects to file fs/namei.c.rej
[1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-3.10.y&id=d4c96061fddd129778ce8b70fb093aa532f422d0
the upstream change of masking all capabilities above CAP_LAST_CAP (which the
linux-vserver patch does not adjust to account for its own CAP_CONTEXT)
breaks changing/manipulating contexts.
# vserver-info | grep V
Assumed 'SYSINFO' as no other option given; try '--help' for more information.
Versions:
VS-API: ???
VCI: ???
# chcontext --xid 1 -- true
chcontext: vc_new_s_context(): Function not implemented
[2] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-3.10.y&id=76f01555c78e496203105bd29b878db3431a2260
the attached patch accounts for the change in patch hunk context. reverting
the upstream commit accounts for the masking of CAP_CONTEXT.
instructions:
1. acquire linux-3.10.55
2. apply patch-3.10.53-vs2.3.6.8
3. revert upstream git commit 76f0155
a. wget -Nv --content-disposition https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/patch/?id=76f01555c78e496203105bd29b878db3431a2260
b. patch -R <d4281c33c1086d80b2a5e3cd6081752e75795833..76f01555c78e496203105bd29b878db3431a2260.patch
4. apply the attached patch-3.10.53-55-vs2.3.6.8.diff
5. manually fix the Makefile reject (EXTRAVERSION)
i've successfully built the resulting kernel and tested it in virtualbox
against testme.sh and testfs.sh and started-entered-exited-stopped a vserver
guest.
i figure in time herbert will release an updated kernel patch that addresses
the upstream change in capability masking (though i have a few ideas of my
own, but this upstream change is immaterial enough that it's easier to just
revert it for now).
corey
--
undefined@pobox.com
addition of "#include <linux/hash.h>" invalidate patch hunk context
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-3.10.y&id=d4c96061fddd129778ce8b70fb093aa532f422d0
diff -urNpd linux-3.10.55-vs2.3.6.8~/fs/namei.c linux-3.10.55-vs2.3.6.8/fs/namei.c
--- linux-3.10.55-vs2.3.6.8~/fs/namei.c 2014-09-18 12:39:47.000000000 -0500
+++ linux-3.10.55-vs2.3.6.8/fs/namei.c 2014-09-18 12:42:06.000000000 -0500
@@ -35,9 +35,19 @@
#include <linux/fs_struct.h>
#include <linux/posix_acl.h>
#include <linux/hash.h>
+#include <linux/proc_fs.h>
+#include <linux/magic.h>
+#include <linux/vserver/inode.h>
+#include <linux/vs_base.h>
+#include <linux/vs_tag.h>
+#include <linux/vs_cowbl.h>
+#include <linux/vs_device.h>
+#include <linux/vs_context.h>
+#include <linux/pid_namespace.h>
#include <asm/uaccess.h>
#include "internal.h"
+#include "proc/internal.h"
#include "mount.h"
/* [Feb-1997 T. Schoebel-Theuer]