Subject: linux 3.18.20 and patch-3.18.7-vs2.3.7.4.diff
From: Corey Wright <undefined@pobox.com>
Date: Sat, 8 Aug 2015 23:05:58 -0500
Sat, 8 Aug 2015 23:05:58 -0500
patch-3.18.7-vs2.3.7.4.diff fails to apply to linux 3.18.20.

patching file kernel/printk/printk.c
Hunk #2 FAILED at 491.
Hunk #3 succeeded at 1268 with fuzz 2 (offset -3 lines).
Hunk #4 succeeded at 1281 (offset -3 lines).
Hunk #5 succeeded at 1303 (offset -3 lines).
1 out of 5 hunks FAILED -- saving rejects to file kernel/printk/printk.c.rej

upstream changed some code involving CAP_SYSLOG which doesn't directly affect
the linux-vserver patch, but changed the patch's context (adjacent source
code) and confused patch as to where to apply the associated patch hunk, so
much so that patch gave up.

there's also a delta patch [1] that fixes a long-standing 3.18 disk limit
problem. [2]

step-by-step process:
1. apply patch-3.18.7-20-vs2.3.7.4.diff [3] to linux-3.18.20
2. apply attached patch-3.18.7-20-vs2.3.7.4.diff
3. apply linked delta-dlimit-fix03.diff [1]

[1] http://vserver.13thfloor.at/Experimental/delta-dlimit-fix03.diff
[2] http://archives.linux-vserver.org/201508/0002.html
[3] http://vserver.13thfloor.at/Experimental/patch-3.18.7-vs2.3.7.4.diff

corey
--
undefined@pobox.com


upstream commit broke linux-vserver patch hunk context
http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-3.18.y&id=b6839752c823c205e788e3e39307fde48be102c4

diff -urNpd linux-3.18.20-vs2.3.7.4~/kernel/printk/printk.c linux-3.18.20-vs2.3.7.4/kernel/printk/printk.c
--- linux-3.18.20-vs2.3.7.4~/kernel/printk/printk.c	2015-08-08 19:17:45.957222713 -0500
+++ linux-3.18.20-vs2.3.7.4/kernel/printk/printk.c	2015-08-08 19:22:39.439145099 -0500
@@ -491,7 +491,7 @@ static int check_syslog_permissions(int
 		goto ok;
 
 	if (syslog_action_restricted(type)) {
-		if (capable(CAP_SYSLOG))
+		if (vx_capable(CAP_SYSLOG, VXC_SYSLOG))
 			goto ok;
 		/*
 		 * For historical reasons, accept CAP_SYS_ADMIN too, with