]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel-vserver-fixes.patch
- 4.9.267
[packages/kernel.git] / kernel-vserver-fixes.patch
index b4dd940f6d1c980cc1c8e8dc46984ce0917ba2e1..3d6ca5d93e0a5009417529be328c856c385926a0 100644 (file)
@@ -1,62 +1,80 @@
-Missing header for routes patch, caused vs2.3 route.h mixing
---- a/net/ipv4/netfilter/nf_nat_core.c~        2008-01-24 23:58:37.000000000 +0100
-+++ a/net/ipv4/netfilter/nf_nat_core.c 2008-03-30 21:00:19.349593833 +0200
-@@ -15,6 +15,7 @@
- #include <net/checksum.h>
- #include <net/icmp.h>
- #include <net/ip.h>
-+#include <net/route.h>
- #include <net/tcp.h>  /* For tcp_prot in getorigdst */
- #include <linux/icmp.h>
- #include <linux/udp.h>
---- linux-2.6.31/arch/x86/kernel/process_32.c~ 2009-09-16 08:32:03.000000000 +0200
-+++ linux-2.6.31/arch/x86/kernel/process_32.c  2009-09-17 21:57:42.546921657 +0200
-@@ -148,8 +148,8 @@
-       board = dmi_get_system_info(DMI_PRODUCT_NAME);
-       if (!board)
-               board = "";
--      printk("Pid: %d, comm: %s %s (%s %.*s) %s\n",
--                      task_pid_nr(current), current->comm,
-+      printk("Pid: %d, comm: %s xid: #%u %s (%s %.*s) %s\n",
-+                      task_pid_nr(current), current->comm, current->xid,
-                       print_tainted(), init_utsname()->release,
-                       (int)strcspn(init_utsname()->version, " "),
-                       init_utsname()->version, board);
---- linux-2.6.31/arch/x86/kernel/process_64.c~ 2009-09-16 08:32:03.000000000 +0200
-+++ linux-2.6.31/arch/x86/kernel/process_64.c  2009-09-17 21:57:55.742127534 +0200
-@@ -172,8 +172,8 @@
-       board = dmi_get_system_info(DMI_PRODUCT_NAME);
-       if (!board)
-               board = "";
--      printk(KERN_INFO "Pid: %d, comm: %.20s %s %s %.*s %s\n",
--              current->pid, current->comm, print_tainted(),
-+      printk(KERN_INFO "Pid: %d, comm: %.20s xid: #%u %s %s %.*s %s\n",
-+              current->pid, current->comm, current->xid, print_tainted(),
-               init_utsname()->release,
-               (int)strcspn(init_utsname()->version, " "),
-               init_utsname()->version, board);
---- linux-2.6.31/arch/x86/kernel/dumpstack.c~  2009-09-16 08:32:02.000000000 +0200
-+++ linux-2.6.31/arch/x86/kernel/dumpstack.c   2009-09-17 21:58:13.778791960 +0200
-@@ -180,8 +180,8 @@
-               get_bp(bp);
- #endif
--      printk("Pid: %d, comm: %.20s %s %s %.*s\n",
--              current->pid, current->comm, print_tainted(),
-+      printk("Pid: %d, comm: %.20s xid: #%u %s %s %.*s\n",
-+              current->pid, current->comm, current->xid, print_tainted(),
-               init_utsname()->release,
-               (int)strcspn(init_utsname()->version, " "),
-               init_utsname()->version);
---- linux-2.6.32/drivers/infiniband/hw/ipath/ipath_user_pages.c~       2009-12-04 23:09:58.438777066 +0100
-+++ linux-2.6.32/drivers/infiniband/hw/ipath/ipath_user_pages.c        2009-12-04 23:12:42.808693591 +0100
-@@ -34,7 +34,7 @@
- #include <linux/mm.h>
- #include <linux/device.h>
- #include <linux/sched.h>
--// #include <linux/vs_memory.h>
-+#include <linux/vs_memory.h>
- #include "ipath_kernel.h"
+--- linux-3.3/fs/proc/base.c~  2012-03-19 21:44:42.000000000 +0100
++++ linux-3.3/fs/proc/base.c   2012-03-21 12:25:28.051092423 +0100
+@@ -568,6 +568,8 @@
+                                struct task_struct *task,
+                                int hide_pid_min)
+ {
++      if (vx_check(0, VS_WATCH_P))
++              return true;
+       if (pid->hide_pid < hide_pid_min)
+               return true;
+       if (in_group_p(pid->pid_gid))
+
+
 
+diff -NurpP --minimal linux-4.9.217-vs2.3.9.12/fs/proc/array.c linux-4.9.217-vs2.3.9.13/fs/proc/array.c
+--- linux-4.9.217-vs2.3.9.12/fs/proc/array.c   2019-10-05 14:58:45.660307716 +0000
++++ linux-4.9.217-vs2.3.9.13/fs/proc/array.c   2020-04-19 00:54:52.163080084 +0000
+@@ -567,17 +567,6 @@ static int do_task_stat(struct seq_file
+       /* convert nsec -> ticks */
+       start_time = nsec_to_clock_t(task->real_start_time);
+-      /* fixup start time for virt uptime */
+-      if (vx_flags(VXF_VIRT_UPTIME, 0)) {
+-              unsigned long long bias =
+-                      current->vx_info->cvirt.bias_clock;
+-
+-              if (start_time > bias)
+-                      start_time -= bias;
+-              else
+-                      start_time = 0;
+-      }
+-
+       seq_printf(m, "%d (%s) %c", pid_nr_ns(pid, ns), tcomm, state);
+       seq_put_decimal_ll(m, " ", ppid);
+       seq_put_decimal_ll(m, " ", pgid);
+diff -NurpP --minimal linux-4.9.217-vs2.3.9.12/fs/proc/uptime.c linux-4.9.217-vs2.3.9.13/fs/proc/uptime.c
+--- linux-4.9.217-vs2.3.9.12/fs/proc/uptime.c  2019-10-13 16:02:19.324763467 +0000
++++ linux-4.9.217-vs2.3.9.13/fs/proc/uptime.c  2020-04-18 23:42:47.412036999 +0000
+@@ -23,6 +23,9 @@ static int uptime_proc_show(struct seq_f
+       idle.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem);
+       idle.tv_nsec = rem;
++      if (vx_flags(VXF_VIRT_UPTIME, 0))
++              vx_vsi_uptime(&uptime, &idle);
++
+       seq_printf(m, "%lu.%02lu %lu.%02lu\n",
+                       (unsigned long) uptime.tv_sec,
+                       (uptime.tv_nsec / (NSEC_PER_SEC / 100)),
+diff -NurpP --minimal linux-4.9.217-vs2.3.9.12/include/linux/vserver/cvirt.h linux-4.9.217-vs2.3.9.13/include/linux/vserver/cvirt.h
+--- linux-4.9.217-vs2.3.9.12/include/linux/vserver/cvirt.h     2019-10-13 16:04:08.203030205 +0000
++++ linux-4.9.217-vs2.3.9.13/include/linux/vserver/cvirt.h     2020-04-19 00:30:46.735970074 +0000
+@@ -5,6 +5,9 @@ struct vx_info;
+ void vx_update_load(struct vx_info *);
++struct timespec;
++
++void vx_vsi_uptime(struct timespec *, struct timespec *);
+ int vx_do_syslog(int, char __user *, int);
+diff -NurpP --minimal linux-4.9.217-vs2.3.9.12/kernel/time/timekeeping.c linux-4.9.217-vs2.3.9.13/kernel/time/timekeeping.c
+--- linux-4.9.217-vs2.3.9.12/kernel/time/timekeeping.c 2019-12-25 15:09:47.185439847 +0000
++++ linux-4.9.217-vs2.3.9.13/kernel/time/timekeeping.c 2020-04-19 00:55:09.072812292 +0000
+@@ -770,15 +770,6 @@ ktime_t ktime_get_with_offset(enum tk_of
+       } while (read_seqcount_retry(&tk_core.seq, seq));
+-#ifdef CONFIG_VSERVER_VTIME
+-      if ((offs == TK_OFFS_BOOT) &&
+-              vx_flags(VXF_VIRT_UPTIME, 0) &&
+-              !vx_check(0, VS_ADMIN|VS_WATCH)) {
+-              struct vx_info *vxi = current_vx_info();
+-              ktime_t bias_uptime = timespec64_to_ktime(vxi->cvirt.bias_uptime);
+-              base = ktime_sub(base, bias_uptime);
+-      }
+-#endif
+       return ktime_add_ns(base, nsecs);
+ }
This page took 0.276913 seconds and 4 git commands to generate.