]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel-vserver-2.3.patch
- up to 4.4.223
[packages/kernel.git] / kernel-vserver-2.3.patch
index 375accecbc48ce789d3247524ba25df0f3befce9..40e2b7907787de83f656450e4e4cbbf2b3752f78 100644 (file)
@@ -1,164 +1,6 @@
-diff -NurpP --minimal linux-4.4.116/Documentation/vserver/debug.txt linux-4.4.116-vs2.3.9.7/Documentation/vserver/debug.txt
---- linux-4.4.116/Documentation/vserver/debug.txt      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/Documentation/vserver/debug.txt    2018-01-09 16:36:20.000000000 +0000
-@@ -0,0 +1,154 @@
-+
-+debug_cvirt:
-+
-+ 2   4        "vx_map_tgid: %p/%llx: %d -> %d"
-+      "vx_rmap_tgid: %p/%llx: %d -> %d"
-+
-+debug_dlim:
-+
-+ 0   1        "ALLOC (%p,#%d)%c inode (%d)"
-+      "FREE  (%p,#%d)%c inode"
-+ 1   2        "ALLOC (%p,#%d)%c %lld bytes (%d)"
-+      "FREE  (%p,#%d)%c %lld bytes"
-+ 2   4        "ADJUST: %lld,%lld on %ld,%ld [mult=%d]"
-+ 3   8        "ext3_has_free_blocks(%p): %lu<%lu+1, %c, %u!=%u r=%d"
-+      "ext3_has_free_blocks(%p): free=%lu, root=%lu"
-+      "rcu_free_dl_info(%p)"
-+ 4  10        "alloc_dl_info(%p,%d) = %p"
-+      "dealloc_dl_info(%p)"
-+      "get_dl_info(%p[#%d.%d])"
-+      "put_dl_info(%p[#%d.%d])"
-+ 5  20        "alloc_dl_info(%p,%d)*"
-+ 6  40        "__hash_dl_info: %p[#%d]"
-+      "__unhash_dl_info: %p[#%d]"
-+ 7  80        "locate_dl_info(%p,#%d) = %p"
-+
-+debug_misc:
-+
-+ 0   1        "destroy_dqhash: %p [#0x%08x] c=%d"
-+      "new_dqhash: %p [#0x%08x]"
-+      "vroot[%d]_clr_dev: dev=%p[%lu,%d:%d]"
-+      "vroot[%d]_get_real_bdev: dev=%p[%lu,%d:%d]"
-+      "vroot[%d]_set_dev: dev=%p[%lu,%d:%d]"
-+      "vroot_get_real_bdev not set"
-+ 1   2        "cow_break_link(?%s?)"
-+      "temp copy ?%s?"
-+ 2   4        "dentry_open(new): %p"
-+      "dentry_open(old): %p"
-+      "lookup_create(new): %p"
-+      "old path ?%s?"
-+      "path_lookup(old): %d"
-+      "vfs_create(new): %d"
-+      "vfs_rename: %d"
-+      "vfs_sendfile: %d"
-+ 3   8        "fput(new_file=%p[#%d])"
-+      "fput(old_file=%p[#%d])"
-+ 4  10        "vx_info_kill(%p[#%d],%d,%d) = %d"
-+      "vx_info_kill(%p[#%d],%d,%d)*"
-+ 5  20        "vs_reboot(%p[#%d],%d)"
-+ 6  40        "dropping task %p[#%u,%u] for %p[#%u,%u]"
-+
-+debug_net:
-+
-+ 2   4        "nx_addr_conflict(%p,%p) %d.%d,%d.%d"
-+ 3   8        "inet_bind(%p) %d.%d.%d.%d, %d.%d.%d.%d, %d.%d.%d.%d"
-+      "inet_bind(%p)* %p,%p;%lx %d.%d.%d.%d"
-+ 4  10        "ip_route_connect(%p) %p,%p;%lx"
-+ 5  20        "__addr_in_socket(%p,%d.%d.%d.%d) %p:%d.%d.%d.%d %p;%lx"
-+ 6  40        "sk,egf: %p [#%d] (from %d)"
-+      "sk,egn: %p [#%d] (from %d)"
-+      "sk,req: %p [#%d] (from %d)"
-+      "sk: %p [#%d] (from %d)"
-+      "tw: %p [#%d] (from %d)"
-+ 7  80        "__sock_recvmsg: %p[%p,%p,%p;%d]:%d/%d"
-+      "__sock_sendmsg: %p[%p,%p,%p;%d]:%d/%d"
-+
-+debug_nid:
-+
-+ 0   1        "__lookup_nx_info(#%u): %p[#%u]"
-+      "alloc_nx_info(%d) = %p"
-+      "create_nx_info(%d) (dynamic rejected)"
-+      "create_nx_info(%d) = %p (already there)"
-+      "create_nx_info(%d) = %p (new)"
-+      "dealloc_nx_info(%p)"
-+ 1   2        "alloc_nx_info(%d)*"
-+      "create_nx_info(%d)*"
-+ 2   4        "get_nx_info(%p[#%d.%d])"
-+      "put_nx_info(%p[#%d.%d])"
-+ 3   8        "claim_nx_info(%p[#%d.%d.%d]) %p"
-+      "clr_nx_info(%p[#%d.%d])"
-+      "init_nx_info(%p[#%d.%d])"
-+      "release_nx_info(%p[#%d.%d.%d]) %p"
-+      "set_nx_info(%p[#%d.%d])"
-+ 4  10        "__hash_nx_info: %p[#%d]"
-+      "__nx_dynamic_id: [#%d]"
-+      "__unhash_nx_info: %p[#%d.%d.%d]"
-+ 5  20        "moved task %p into nxi:%p[#%d]"
-+      "nx_migrate_task(%p,%p[#%d.%d.%d])"
-+      "task_get_nx_info(%p)"
-+ 6  40        "nx_clear_persistent(%p[#%d])"
-+
-+debug_quota:
-+
-+ 0   1        "quota_sync_dqh(%p,%d) discard inode %p"
-+ 1   2        "quota_sync_dqh(%p,%d)"
-+      "sync_dquots(%p,%d)"
-+      "sync_dquots_dqh(%p,%d)"
-+ 3   8        "do_quotactl(%p,%d,cmd=%d,id=%d,%p)"
-+
-+debug_switch:
-+
-+ 0   1        "vc: VCMD_%02d_%d[%d], %d,%p [%d,%d,%x,%x]"
-+ 1   2        "vc: VCMD_%02d_%d[%d] = %08lx(%ld) [%d,%d]"
-+ 4  10        "%s: (%s %s) returned %s with %d"
-+
-+debug_tag:
-+
-+ 7  80        "dx_parse_tag(?%s?): %d:#%d"
-+      "dx_propagate_tag(%p[#%lu.%d]): %d,%d"
-+
-+debug_xid:
-+
-+ 0   1        "__lookup_vx_info(#%u): %p[#%u]"
-+      "alloc_vx_info(%d) = %p"
-+      "alloc_vx_info(%d)*"
-+      "create_vx_info(%d) (dynamic rejected)"
-+      "create_vx_info(%d) = %p (already there)"
-+      "create_vx_info(%d) = %p (new)"
-+      "dealloc_vx_info(%p)"
-+      "loc_vx_info(%d) = %p (found)"
-+      "loc_vx_info(%d) = %p (new)"
-+      "loc_vx_info(%d) = %p (not available)"
-+ 1   2        "create_vx_info(%d)*"
-+      "loc_vx_info(%d)*"
-+ 2   4        "get_vx_info(%p[#%d.%d])"
-+      "put_vx_info(%p[#%d.%d])"
-+ 3   8        "claim_vx_info(%p[#%d.%d.%d]) %p"
-+      "clr_vx_info(%p[#%d.%d])"
-+      "init_vx_info(%p[#%d.%d])"
-+      "release_vx_info(%p[#%d.%d.%d]) %p"
-+      "set_vx_info(%p[#%d.%d])"
-+ 4  10        "__hash_vx_info: %p[#%d]"
-+      "__unhash_vx_info: %p[#%d.%d.%d]"
-+      "__vx_dynamic_id: [#%d]"
-+ 5  20        "enter_vx_info(%p[#%d],%p) %p[#%d,%p]"
-+      "leave_vx_info(%p[#%d,%p]) %p[#%d,%p]"
-+      "moved task %p into vxi:%p[#%d]"
-+      "task_get_vx_info(%p)"
-+      "vx_migrate_task(%p,%p[#%d.%d])"
-+ 6  40        "vx_clear_persistent(%p[#%d])"
-+      "vx_exit_init(%p[#%d],%p[#%d,%d,%d])"
-+      "vx_set_init(%p[#%d],%p[#%d,%d,%d])"
-+      "vx_set_persistent(%p[#%d])"
-+      "vx_set_reaper(%p[#%d],%p[#%d,%d])"
-+ 7  80        "vx_child_reaper(%p[#%u,%u]) = %p[#%u,%u]"
-+
-+
-+debug_limit:
-+
-+ n 2^n        "vx_acc_cres[%5d,%s,%2d]: %5d%s"
-+      "vx_cres_avail[%5d,%s,%2d]: %5ld > %5d + %5d"
-+
-+ m 2^m        "vx_acc_page[%5d,%s,%2d]: %5d%s"
-+      "vx_acc_pages[%5d,%s,%2d]: %5d += %5d"
-+      "vx_pages_avail[%5d,%s,%2d]: %5ld > %5d + %5d"
-diff -NurpP --minimal linux-4.4.116/arch/alpha/Kconfig linux-4.4.116-vs2.3.9.7/arch/alpha/Kconfig
---- linux-4.4.116/arch/alpha/Kconfig   2016-07-05 04:11:34.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/alpha/Kconfig 2018-01-09 16:36:20.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/alpha/Kconfig linux-4.4.197-vs2.3.9.8/arch/alpha/Kconfig
+--- linux-4.4.197/arch/alpha/Kconfig   2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/alpha/Kconfig 2018-10-20 04:57:21.000000000 +0000
 @@ -745,6 +745,8 @@ config DUMMY_CONSOLE
        depends on VGA_HOSE
        default y
 @@ -745,6 +745,8 @@ config DUMMY_CONSOLE
        depends on VGA_HOSE
        default y
@@ -168,9 +10,9 @@ diff -NurpP --minimal linux-4.4.116/arch/alpha/Kconfig linux-4.4.116-vs2.3.9.7/a
  source "security/Kconfig"
  
  source "crypto/Kconfig"
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-4.4.116/arch/alpha/kernel/systbls.S linux-4.4.116-vs2.3.9.7/arch/alpha/kernel/systbls.S
---- linux-4.4.116/arch/alpha/kernel/systbls.S  2015-07-06 20:41:36.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/alpha/kernel/systbls.S        2018-01-09 16:36:20.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/alpha/kernel/systbls.S linux-4.4.197-vs2.3.9.8/arch/alpha/kernel/systbls.S
+--- linux-4.4.197/arch/alpha/kernel/systbls.S  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/alpha/kernel/systbls.S        2018-10-20 04:57:21.000000000 +0000
 @@ -446,7 +446,7 @@ sys_call_table:
        .quad sys_stat64                        /* 425 */
        .quad sys_lstat64
 @@ -446,7 +446,7 @@ sys_call_table:
        .quad sys_stat64                        /* 425 */
        .quad sys_lstat64
@@ -180,9 +22,9 @@ diff -NurpP --minimal linux-4.4.116/arch/alpha/kernel/systbls.S linux-4.4.116-vs
        .quad sys_ni_syscall                    /* sys_mbind */
        .quad sys_ni_syscall                    /* sys_get_mempolicy */
        .quad sys_ni_syscall                    /* sys_set_mempolicy */
        .quad sys_ni_syscall                    /* sys_mbind */
        .quad sys_ni_syscall                    /* sys_get_mempolicy */
        .quad sys_ni_syscall                    /* sys_set_mempolicy */
-diff -NurpP --minimal linux-4.4.116/arch/alpha/kernel/traps.c linux-4.4.116-vs2.3.9.7/arch/alpha/kernel/traps.c
---- linux-4.4.116/arch/alpha/kernel/traps.c    2015-07-06 20:41:36.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/alpha/kernel/traps.c  2018-01-09 16:36:20.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/alpha/kernel/traps.c linux-4.4.197-vs2.3.9.8/arch/alpha/kernel/traps.c
+--- linux-4.4.197/arch/alpha/kernel/traps.c    2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/alpha/kernel/traps.c  2018-10-20 04:57:21.000000000 +0000
 @@ -174,7 +174,8 @@ die_if_kernel(char * str, struct pt_regs
  #ifdef CONFIG_SMP
        printk("CPU %d ", hard_smp_processor_id());
 @@ -174,7 +174,8 @@ die_if_kernel(char * str, struct pt_regs
  #ifdef CONFIG_SMP
        printk("CPU %d ", hard_smp_processor_id());
@@ -193,10 +35,10 @@ diff -NurpP --minimal linux-4.4.116/arch/alpha/kernel/traps.c linux-4.4.116-vs2.
        dik_show_regs(regs, r9_15);
        add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
        dik_show_trace((unsigned long *)(regs+1));
        dik_show_regs(regs, r9_15);
        add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
        dik_show_trace((unsigned long *)(regs+1));
-diff -NurpP --minimal linux-4.4.116/arch/arm/Kconfig linux-4.4.116-vs2.3.9.7/arch/arm/Kconfig
---- linux-4.4.116/arch/arm/Kconfig     2016-07-05 04:14:23.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/arm/Kconfig   2018-01-09 16:36:20.000000000 +0000
-@@ -2159,6 +2159,8 @@ source "fs/Kconfig"
+diff -NurpP --minimal linux-4.4.197/arch/arm/Kconfig linux-4.4.197-vs2.3.9.8/arch/arm/Kconfig
+--- linux-4.4.197/arch/arm/Kconfig     2019-10-22 12:33:36.159591972 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/arm/Kconfig   2019-10-05 14:35:09.563172476 +0000
+@@ -2160,6 +2160,8 @@ source "fs/Kconfig"
  
  source "arch/arm/Kconfig.debug"
  
  
  source "arch/arm/Kconfig.debug"
  
@@ -205,9 +47,9 @@ diff -NurpP --minimal linux-4.4.116/arch/arm/Kconfig linux-4.4.116-vs2.3.9.7/arc
  source "security/Kconfig"
  
  source "crypto/Kconfig"
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-4.4.116/arch/arm/kernel/calls.S linux-4.4.116-vs2.3.9.7/arch/arm/kernel/calls.S
---- linux-4.4.116/arch/arm/kernel/calls.S      2016-07-05 04:14:26.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/arm/kernel/calls.S    2018-01-09 16:36:20.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/arm/kernel/calls.S linux-4.4.197-vs2.3.9.8/arch/arm/kernel/calls.S
+--- linux-4.4.197/arch/arm/kernel/calls.S      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/arm/kernel/calls.S    2018-10-20 04:57:21.000000000 +0000
 @@ -322,7 +322,7 @@
  /* 310 */     CALL(sys_request_key)
                CALL(sys_keyctl)
 @@ -322,7 +322,7 @@
  /* 310 */     CALL(sys_request_key)
                CALL(sys_keyctl)
@@ -217,10 +59,10 @@ diff -NurpP --minimal linux-4.4.116/arch/arm/kernel/calls.S linux-4.4.116-vs2.3.
                CALL(sys_ioprio_set)
  /* 315 */     CALL(sys_ioprio_get)
                CALL(sys_inotify_init)
                CALL(sys_ioprio_set)
  /* 315 */     CALL(sys_ioprio_get)
                CALL(sys_inotify_init)
-diff -NurpP --minimal linux-4.4.116/arch/arm/kernel/traps.c linux-4.4.116-vs2.3.9.7/arch/arm/kernel/traps.c
---- linux-4.4.116/arch/arm/kernel/traps.c      2018-02-22 21:18:48.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/arm/kernel/traps.c    2018-01-09 16:36:20.000000000 +0000
-@@ -258,8 +258,8 @@ static int __die(const char *str, int er
+diff -NurpP --minimal linux-4.4.197/arch/arm/kernel/traps.c linux-4.4.197-vs2.3.9.8/arch/arm/kernel/traps.c
+--- linux-4.4.197/arch/arm/kernel/traps.c      2019-10-22 12:33:37.079577261 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/arm/kernel/traps.c    2018-10-20 04:57:21.000000000 +0000
+@@ -259,8 +259,8 @@ static int __die(const char *str, int er
  
        print_modules();
        __show_regs(regs);
  
        print_modules();
        __show_regs(regs);
@@ -231,9 +73,9 @@ diff -NurpP --minimal linux-4.4.116/arch/arm/kernel/traps.c linux-4.4.116-vs2.3.
  
        if (!user_mode(regs) || in_interrupt()) {
                dump_mem(KERN_EMERG, "Stack: ", regs->ARM_sp,
  
        if (!user_mode(regs) || in_interrupt()) {
                dump_mem(KERN_EMERG, "Stack: ", regs->ARM_sp,
-diff -NurpP --minimal linux-4.4.116/arch/cris/Kconfig linux-4.4.116-vs2.3.9.7/arch/cris/Kconfig
---- linux-4.4.116/arch/cris/Kconfig    2016-07-05 04:14:27.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/cris/Kconfig  2018-01-09 16:36:20.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/cris/Kconfig linux-4.4.197-vs2.3.9.8/arch/cris/Kconfig
+--- linux-4.4.197/arch/cris/Kconfig    2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/cris/Kconfig  2018-10-20 04:57:21.000000000 +0000
 @@ -581,6 +581,8 @@ source "fs/Kconfig"
  
  source "arch/cris/Kconfig.debug"
 @@ -581,6 +581,8 @@ source "fs/Kconfig"
  
  source "arch/cris/Kconfig.debug"
@@ -243,9 +85,9 @@ diff -NurpP --minimal linux-4.4.116/arch/cris/Kconfig linux-4.4.116-vs2.3.9.7/ar
  source "security/Kconfig"
  
  source "crypto/Kconfig"
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-4.4.116/arch/ia64/Kconfig linux-4.4.116-vs2.3.9.7/arch/ia64/Kconfig
---- linux-4.4.116/arch/ia64/Kconfig    2016-07-05 04:11:39.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/ia64/Kconfig  2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/ia64/Kconfig linux-4.4.197-vs2.3.9.8/arch/ia64/Kconfig
+--- linux-4.4.197/arch/ia64/Kconfig    2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/ia64/Kconfig  2018-10-20 04:57:21.000000000 +0000
 @@ -606,6 +606,8 @@ source "fs/Kconfig"
  
  source "arch/ia64/Kconfig.debug"
 @@ -606,6 +606,8 @@ source "fs/Kconfig"
  
  source "arch/ia64/Kconfig.debug"
@@ -255,9 +97,9 @@ diff -NurpP --minimal linux-4.4.116/arch/ia64/Kconfig linux-4.4.116-vs2.3.9.7/ar
  source "security/Kconfig"
  
  source "crypto/Kconfig"
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-4.4.116/arch/ia64/kernel/entry.S linux-4.4.116-vs2.3.9.7/arch/ia64/kernel/entry.S
---- linux-4.4.116/arch/ia64/kernel/entry.S     2016-07-05 04:14:27.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/ia64/kernel/entry.S   2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/ia64/kernel/entry.S linux-4.4.197-vs2.3.9.8/arch/ia64/kernel/entry.S
+--- linux-4.4.197/arch/ia64/kernel/entry.S     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/ia64/kernel/entry.S   2018-10-20 04:57:21.000000000 +0000
 @@ -1694,7 +1694,7 @@ sys_call_table:
        data8 sys_mq_notify
        data8 sys_mq_getsetattr
 @@ -1694,7 +1694,7 @@ sys_call_table:
        data8 sys_mq_notify
        data8 sys_mq_getsetattr
@@ -267,9 +109,9 @@ diff -NurpP --minimal linux-4.4.116/arch/ia64/kernel/entry.S linux-4.4.116-vs2.3
        data8 sys_waitid                        // 1270
        data8 sys_add_key
        data8 sys_request_key
        data8 sys_waitid                        // 1270
        data8 sys_add_key
        data8 sys_request_key
-diff -NurpP --minimal linux-4.4.116/arch/ia64/kernel/ptrace.c linux-4.4.116-vs2.3.9.7/arch/ia64/kernel/ptrace.c
---- linux-4.4.116/arch/ia64/kernel/ptrace.c    2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/ia64/kernel/ptrace.c  2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/ia64/kernel/ptrace.c linux-4.4.197-vs2.3.9.8/arch/ia64/kernel/ptrace.c
+--- linux-4.4.197/arch/ia64/kernel/ptrace.c    2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/ia64/kernel/ptrace.c  2018-10-20 04:57:21.000000000 +0000
 @@ -21,6 +21,7 @@
  #include <linux/regset.h>
  #include <linux/elf.h>
 @@ -21,6 +21,7 @@
  #include <linux/regset.h>
  #include <linux/elf.h>
@@ -278,9 +120,9 @@ diff -NurpP --minimal linux-4.4.116/arch/ia64/kernel/ptrace.c linux-4.4.116-vs2.
  
  #include <asm/pgtable.h>
  #include <asm/processor.h>
  
  #include <asm/pgtable.h>
  #include <asm/processor.h>
-diff -NurpP --minimal linux-4.4.116/arch/ia64/kernel/traps.c linux-4.4.116-vs2.3.9.7/arch/ia64/kernel/traps.c
---- linux-4.4.116/arch/ia64/kernel/traps.c     2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/ia64/kernel/traps.c   2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/ia64/kernel/traps.c linux-4.4.197-vs2.3.9.8/arch/ia64/kernel/traps.c
+--- linux-4.4.197/arch/ia64/kernel/traps.c     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/ia64/kernel/traps.c   2018-10-20 04:57:21.000000000 +0000
 @@ -60,8 +60,9 @@ die (const char *str, struct pt_regs *re
        put_cpu();
  
 @@ -60,8 +60,9 @@ die (const char *str, struct pt_regs *re
        put_cpu();
  
@@ -305,9 +147,9 @@ diff -NurpP --minimal linux-4.4.116/arch/ia64/kernel/traps.c linux-4.4.116-vs2.3
                        }
                }
        }
                        }
                }
        }
-diff -NurpP --minimal linux-4.4.116/arch/m32r/kernel/traps.c linux-4.4.116-vs2.3.9.7/arch/m32r/kernel/traps.c
---- linux-4.4.116/arch/m32r/kernel/traps.c     2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/m32r/kernel/traps.c   2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/m32r/kernel/traps.c linux-4.4.197-vs2.3.9.8/arch/m32r/kernel/traps.c
+--- linux-4.4.197/arch/m32r/kernel/traps.c     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/m32r/kernel/traps.c   2018-10-20 04:57:21.000000000 +0000
 @@ -184,8 +184,9 @@ static void show_registers(struct pt_reg
        } else {
                printk("SPI: %08lx\n", sp);
 @@ -184,8 +184,9 @@ static void show_registers(struct pt_reg
        } else {
                printk("SPI: %08lx\n", sp);
@@ -320,9 +162,9 @@ diff -NurpP --minimal linux-4.4.116/arch/m32r/kernel/traps.c linux-4.4.116-vs2.3
  
        /*
         * When in-kernel, we also print out the stack and code at the
  
        /*
         * When in-kernel, we also print out the stack and code at the
-diff -NurpP --minimal linux-4.4.116/arch/m68k/Kconfig linux-4.4.116-vs2.3.9.7/arch/m68k/Kconfig
---- linux-4.4.116/arch/m68k/Kconfig    2016-07-05 04:11:39.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/m68k/Kconfig  2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/m68k/Kconfig linux-4.4.197-vs2.3.9.8/arch/m68k/Kconfig
+--- linux-4.4.197/arch/m68k/Kconfig    2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/m68k/Kconfig  2018-10-20 04:57:21.000000000 +0000
 @@ -164,6 +164,8 @@ source "fs/Kconfig"
  
  source "arch/m68k/Kconfig.debug"
 @@ -164,6 +164,8 @@ source "fs/Kconfig"
  
  source "arch/m68k/Kconfig.debug"
@@ -332,10 +174,10 @@ diff -NurpP --minimal linux-4.4.116/arch/m68k/Kconfig linux-4.4.116-vs2.3.9.7/ar
  source "security/Kconfig"
  
  source "crypto/Kconfig"
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-4.4.116/arch/mips/Kconfig linux-4.4.116-vs2.3.9.7/arch/mips/Kconfig
---- linux-4.4.116/arch/mips/Kconfig    2018-02-22 21:18:55.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/mips/Kconfig  2018-01-09 16:36:21.000000000 +0000
-@@ -3026,6 +3026,8 @@ source "fs/Kconfig"
+diff -NurpP --minimal linux-4.4.197/arch/mips/Kconfig linux-4.4.197-vs2.3.9.8/arch/mips/Kconfig
+--- linux-4.4.197/arch/mips/Kconfig    2019-10-22 12:33:39.449539373 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/mips/Kconfig  2019-10-05 14:35:11.293145033 +0000
+@@ -3028,6 +3028,8 @@ source "fs/Kconfig"
  
  source "arch/mips/Kconfig.debug"
  
  
  source "arch/mips/Kconfig.debug"
  
@@ -344,9 +186,9 @@ diff -NurpP --minimal linux-4.4.116/arch/mips/Kconfig linux-4.4.116-vs2.3.9.7/ar
  source "security/Kconfig"
  
  source "crypto/Kconfig"
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-4.4.116/arch/mips/kernel/ptrace.c linux-4.4.116-vs2.3.9.7/arch/mips/kernel/ptrace.c
---- linux-4.4.116/arch/mips/kernel/ptrace.c    2018-02-22 21:18:56.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/mips/kernel/ptrace.c  2018-01-25 00:25:00.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/mips/kernel/ptrace.c linux-4.4.197-vs2.3.9.8/arch/mips/kernel/ptrace.c
+--- linux-4.4.197/arch/mips/kernel/ptrace.c    2019-10-22 12:33:40.109528821 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/mips/kernel/ptrace.c  2019-02-22 08:20:24.721111089 +0000
 @@ -30,6 +30,7 @@
  #include <linux/audit.h>
  #include <linux/seccomp.h>
 @@ -30,6 +30,7 @@
  #include <linux/audit.h>
  #include <linux/seccomp.h>
@@ -355,7 +197,7 @@ diff -NurpP --minimal linux-4.4.116/arch/mips/kernel/ptrace.c linux-4.4.116-vs2.
  
  #include <asm/byteorder.h>
  #include <asm/cpu.h>
  
  #include <asm/byteorder.h>
  #include <asm/cpu.h>
-@@ -787,6 +788,9 @@ long arch_ptrace(struct task_struct *chi
+@@ -800,6 +801,9 @@ long arch_ptrace(struct task_struct *chi
        void __user *datavp = (void __user *) data;
        unsigned long __user *datalp = (void __user *) data;
  
        void __user *datavp = (void __user *) data;
        unsigned long __user *datalp = (void __user *) data;
  
@@ -365,9 +207,9 @@ diff -NurpP --minimal linux-4.4.116/arch/mips/kernel/ptrace.c linux-4.4.116-vs2.
        switch (request) {
        /* when I and D space are separate, these will need to be fixed. */
        case PTRACE_PEEKTEXT: /* read word at location addr. */
        switch (request) {
        /* when I and D space are separate, these will need to be fixed. */
        case PTRACE_PEEKTEXT: /* read word at location addr. */
-diff -NurpP --minimal linux-4.4.116/arch/mips/kernel/scall32-o32.S linux-4.4.116-vs2.3.9.7/arch/mips/kernel/scall32-o32.S
---- linux-4.4.116/arch/mips/kernel/scall32-o32.S       2018-02-22 21:18:56.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/mips/kernel/scall32-o32.S     2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/mips/kernel/scall32-o32.S linux-4.4.197-vs2.3.9.8/arch/mips/kernel/scall32-o32.S
+--- linux-4.4.197/arch/mips/kernel/scall32-o32.S       2019-10-22 12:33:40.109528821 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/mips/kernel/scall32-o32.S     2018-10-20 04:57:21.000000000 +0000
 @@ -512,7 +512,7 @@ EXPORT(sys_call_table)
        PTR     sys_mq_timedreceive
        PTR     sys_mq_notify                   /* 4275 */
 @@ -512,7 +512,7 @@ EXPORT(sys_call_table)
        PTR     sys_mq_timedreceive
        PTR     sys_mq_notify                   /* 4275 */
@@ -377,9 +219,9 @@ diff -NurpP --minimal linux-4.4.116/arch/mips/kernel/scall32-o32.S linux-4.4.116
        PTR     sys_waitid
        PTR     sys_ni_syscall                  /* available, was setaltroot */
        PTR     sys_add_key                     /* 4280 */
        PTR     sys_waitid
        PTR     sys_ni_syscall                  /* available, was setaltroot */
        PTR     sys_add_key                     /* 4280 */
-diff -NurpP --minimal linux-4.4.116/arch/mips/kernel/scall64-64.S linux-4.4.116-vs2.3.9.7/arch/mips/kernel/scall64-64.S
---- linux-4.4.116/arch/mips/kernel/scall64-64.S        2018-02-22 21:18:56.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/mips/kernel/scall64-64.S      2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/mips/kernel/scall64-64.S linux-4.4.197-vs2.3.9.8/arch/mips/kernel/scall64-64.S
+--- linux-4.4.197/arch/mips/kernel/scall64-64.S        2019-10-22 12:33:40.109528821 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/mips/kernel/scall64-64.S      2018-10-20 04:57:21.000000000 +0000
 @@ -349,7 +349,7 @@ EXPORT(sys_call_table)
        PTR     sys_mq_timedreceive
        PTR     sys_mq_notify
 @@ -349,7 +349,7 @@ EXPORT(sys_call_table)
        PTR     sys_mq_timedreceive
        PTR     sys_mq_notify
@@ -389,9 +231,9 @@ diff -NurpP --minimal linux-4.4.116/arch/mips/kernel/scall64-64.S linux-4.4.116-
        PTR     sys_waitid
        PTR     sys_ni_syscall                  /* available, was setaltroot */
        PTR     sys_add_key
        PTR     sys_waitid
        PTR     sys_ni_syscall                  /* available, was setaltroot */
        PTR     sys_add_key
-diff -NurpP --minimal linux-4.4.116/arch/mips/kernel/scall64-n32.S linux-4.4.116-vs2.3.9.7/arch/mips/kernel/scall64-n32.S
---- linux-4.4.116/arch/mips/kernel/scall64-n32.S       2018-02-22 21:18:56.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/mips/kernel/scall64-n32.S     2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/mips/kernel/scall64-n32.S linux-4.4.197-vs2.3.9.8/arch/mips/kernel/scall64-n32.S
+--- linux-4.4.197/arch/mips/kernel/scall64-n32.S       2019-10-22 12:33:40.129528501 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/mips/kernel/scall64-n32.S     2018-10-20 04:57:21.000000000 +0000
 @@ -339,7 +339,7 @@ EXPORT(sysn32_call_table)
        PTR     compat_sys_mq_timedreceive
        PTR     compat_sys_mq_notify
 @@ -339,7 +339,7 @@ EXPORT(sysn32_call_table)
        PTR     compat_sys_mq_timedreceive
        PTR     compat_sys_mq_notify
@@ -401,9 +243,9 @@ diff -NurpP --minimal linux-4.4.116/arch/mips/kernel/scall64-n32.S linux-4.4.116
        PTR     compat_sys_waitid
        PTR     sys_ni_syscall                  /* available, was setaltroot */
        PTR     sys_add_key
        PTR     compat_sys_waitid
        PTR     sys_ni_syscall                  /* available, was setaltroot */
        PTR     sys_add_key
-diff -NurpP --minimal linux-4.4.116/arch/mips/kernel/scall64-o32.S linux-4.4.116-vs2.3.9.7/arch/mips/kernel/scall64-o32.S
---- linux-4.4.116/arch/mips/kernel/scall64-o32.S       2018-02-22 21:18:56.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/mips/kernel/scall64-o32.S     2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/mips/kernel/scall64-o32.S linux-4.4.197-vs2.3.9.8/arch/mips/kernel/scall64-o32.S
+--- linux-4.4.197/arch/mips/kernel/scall64-o32.S       2019-10-22 12:33:40.129528501 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/mips/kernel/scall64-o32.S     2019-10-05 14:35:11.423142972 +0000
 @@ -495,7 +495,7 @@ EXPORT(sys32_call_table)
        PTR     compat_sys_mq_timedreceive
        PTR     compat_sys_mq_notify            /* 4275 */
 @@ -495,7 +495,7 @@ EXPORT(sys32_call_table)
        PTR     compat_sys_mq_timedreceive
        PTR     compat_sys_mq_notify            /* 4275 */
@@ -413,10 +255,10 @@ diff -NurpP --minimal linux-4.4.116/arch/mips/kernel/scall64-o32.S linux-4.4.116
        PTR     compat_sys_waitid
        PTR     sys_ni_syscall                  /* available, was setaltroot */
        PTR     sys_add_key                     /* 4280 */
        PTR     compat_sys_waitid
        PTR     sys_ni_syscall                  /* available, was setaltroot */
        PTR     sys_add_key                     /* 4280 */
-diff -NurpP --minimal linux-4.4.116/arch/mips/kernel/traps.c linux-4.4.116-vs2.3.9.7/arch/mips/kernel/traps.c
---- linux-4.4.116/arch/mips/kernel/traps.c     2018-02-22 21:18:56.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/mips/kernel/traps.c   2018-01-09 16:36:21.000000000 +0000
-@@ -353,9 +353,10 @@ void show_registers(struct pt_regs *regs
+diff -NurpP --minimal linux-4.4.197/arch/mips/kernel/traps.c linux-4.4.197-vs2.3.9.8/arch/mips/kernel/traps.c
+--- linux-4.4.197/arch/mips/kernel/traps.c     2019-10-22 12:33:40.129528501 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/mips/kernel/traps.c   2019-02-22 08:20:24.761110407 +0000
+@@ -354,9 +354,10 @@ void show_registers(struct pt_regs *regs
  
        __show_regs(regs);
        print_modules();
  
        __show_regs(regs);
        print_modules();
@@ -430,9 +272,9 @@ diff -NurpP --minimal linux-4.4.116/arch/mips/kernel/traps.c linux-4.4.116-vs2.3
        if (cpu_has_userlocal) {
                unsigned long tls;
  
        if (cpu_has_userlocal) {
                unsigned long tls;
  
-diff -NurpP --minimal linux-4.4.116/arch/parisc/Kconfig linux-4.4.116-vs2.3.9.7/arch/parisc/Kconfig
---- linux-4.4.116/arch/parisc/Kconfig  2016-07-05 04:14:29.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/parisc/Kconfig        2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/parisc/Kconfig linux-4.4.197-vs2.3.9.8/arch/parisc/Kconfig
+--- linux-4.4.197/arch/parisc/Kconfig  2019-10-22 12:33:40.439523543 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/parisc/Kconfig        2018-10-20 05:50:17.000000000 +0000
 @@ -341,6 +341,8 @@ config SECCOMP
  
          If unsure, say Y. Only embedded should say N here.
 @@ -341,6 +341,8 @@ config SECCOMP
  
          If unsure, say Y. Only embedded should say N here.
@@ -442,9 +284,9 @@ diff -NurpP --minimal linux-4.4.116/arch/parisc/Kconfig linux-4.4.116-vs2.3.9.7/
  source "security/Kconfig"
  
  source "crypto/Kconfig"
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-4.4.116/arch/parisc/kernel/syscall_table.S linux-4.4.116-vs2.3.9.7/arch/parisc/kernel/syscall_table.S
---- linux-4.4.116/arch/parisc/kernel/syscall_table.S   2018-02-22 21:18:58.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/parisc/kernel/syscall_table.S 2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/parisc/kernel/syscall_table.S linux-4.4.197-vs2.3.9.8/arch/parisc/kernel/syscall_table.S
+--- linux-4.4.197/arch/parisc/kernel/syscall_table.S   2019-10-22 12:33:40.519522264 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/parisc/kernel/syscall_table.S 2018-10-20 04:57:21.000000000 +0000
 @@ -358,7 +358,7 @@
        ENTRY_COMP(mbind)               /* 260 */
        ENTRY_COMP(get_mempolicy)
 @@ -358,7 +358,7 @@
        ENTRY_COMP(mbind)               /* 260 */
        ENTRY_COMP(get_mempolicy)
@@ -454,9 +296,9 @@ diff -NurpP --minimal linux-4.4.116/arch/parisc/kernel/syscall_table.S linux-4.4
        ENTRY_SAME(add_key)
        ENTRY_SAME(request_key)         /* 265 */
        ENTRY_COMP(keyctl)
        ENTRY_SAME(add_key)
        ENTRY_SAME(request_key)         /* 265 */
        ENTRY_COMP(keyctl)
-diff -NurpP --minimal linux-4.4.116/arch/parisc/kernel/traps.c linux-4.4.116-vs2.3.9.7/arch/parisc/kernel/traps.c
---- linux-4.4.116/arch/parisc/kernel/traps.c   2018-02-22 21:18:58.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/parisc/kernel/traps.c 2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/parisc/kernel/traps.c linux-4.4.197-vs2.3.9.8/arch/parisc/kernel/traps.c
+--- linux-4.4.197/arch/parisc/kernel/traps.c   2019-10-22 12:33:40.519522264 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/parisc/kernel/traps.c 2019-02-22 08:20:24.921107689 +0000
 @@ -235,8 +235,9 @@ void die_if_kernel(char *str, struct pt_
                        return; /* STFU */
  
 @@ -235,8 +235,9 @@ void die_if_kernel(char *str, struct pt_
                        return; /* STFU */
  
@@ -480,21 +322,9 @@ diff -NurpP --minimal linux-4.4.116/arch/parisc/kernel/traps.c linux-4.4.116-vs2
  
        /* Wot's wrong wif bein' racy? */
        if (current->thread.flags & PARISC_KERNEL_DEATH) {
  
        /* Wot's wrong wif bein' racy? */
        if (current->thread.flags & PARISC_KERNEL_DEATH) {
-diff -NurpP --minimal linux-4.4.116/arch/powerpc/Kconfig linux-4.4.116-vs2.3.9.7/arch/powerpc/Kconfig
---- linux-4.4.116/arch/powerpc/Kconfig 2018-02-22 21:18:58.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/powerpc/Kconfig       2018-02-22 21:30:19.000000000 +0000
-@@ -1081,6 +1081,8 @@ source "lib/Kconfig"
- source "arch/powerpc/Kconfig.debug"
-+source "kernel/vserver/Kconfig"
-+
- source "security/Kconfig"
- source "crypto/Kconfig"
-diff -NurpP --minimal linux-4.4.116/arch/powerpc/include/uapi/asm/unistd.h linux-4.4.116-vs2.3.9.7/arch/powerpc/include/uapi/asm/unistd.h
---- linux-4.4.116/arch/powerpc/include/uapi/asm/unistd.h       2016-07-05 04:14:29.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/powerpc/include/uapi/asm/unistd.h     2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/powerpc/include/uapi/asm/unistd.h linux-4.4.197-vs2.3.9.8/arch/powerpc/include/uapi/asm/unistd.h
+--- linux-4.4.197/arch/powerpc/include/uapi/asm/unistd.h       2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/powerpc/include/uapi/asm/unistd.h     2018-10-20 04:57:21.000000000 +0000
 @@ -275,7 +275,7 @@
  #endif
  #define __NR_rtas             255
 @@ -275,7 +275,7 @@
  #endif
  #define __NR_rtas             255
@@ -504,9 +334,21 @@ diff -NurpP --minimal linux-4.4.116/arch/powerpc/include/uapi/asm/unistd.h linux
  #define __NR_migrate_pages    258
  #define __NR_mbind            259
  #define __NR_get_mempolicy    260
  #define __NR_migrate_pages    258
  #define __NR_mbind            259
  #define __NR_get_mempolicy    260
-diff -NurpP --minimal linux-4.4.116/arch/powerpc/kernel/traps.c linux-4.4.116-vs2.3.9.7/arch/powerpc/kernel/traps.c
---- linux-4.4.116/arch/powerpc/kernel/traps.c  2018-02-22 21:19:02.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/powerpc/kernel/traps.c        2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/powerpc/Kconfig linux-4.4.197-vs2.3.9.8/arch/powerpc/Kconfig
+--- linux-4.4.197/arch/powerpc/Kconfig 2019-10-22 12:33:40.549521785 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/powerpc/Kconfig       2019-10-05 14:35:12.013133612 +0000
+@@ -1086,6 +1086,8 @@ source "lib/Kconfig"
+ source "arch/powerpc/Kconfig.debug"
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-4.4.197/arch/powerpc/kernel/traps.c linux-4.4.197-vs2.3.9.8/arch/powerpc/kernel/traps.c
+--- linux-4.4.197/arch/powerpc/kernel/traps.c  2019-10-22 12:33:40.869516670 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/powerpc/kernel/traps.c        2018-10-20 04:57:21.000000000 +0000
 @@ -1315,8 +1315,9 @@ void nonrecoverable_exception(struct pt_
  
  void trace_syscall(struct pt_regs *regs)
 @@ -1315,8 +1315,9 @@ void nonrecoverable_exception(struct pt_
  
  void trace_syscall(struct pt_regs *regs)
@@ -519,21 +361,9 @@ diff -NurpP --minimal linux-4.4.116/arch/powerpc/kernel/traps.c linux-4.4.116-vs
               regs->ccr&0x10000000?"Error=":"", regs->gpr[3], print_tainted());
  }
  
               regs->ccr&0x10000000?"Error=":"", regs->gpr[3], print_tainted());
  }
  
-diff -NurpP --minimal linux-4.4.116/arch/s390/Kconfig linux-4.4.116-vs2.3.9.7/arch/s390/Kconfig
---- linux-4.4.116/arch/s390/Kconfig    2018-02-22 21:19:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/s390/Kconfig  2018-02-10 15:16:50.000000000 +0000
-@@ -730,6 +730,8 @@ source "fs/Kconfig"
- source "arch/s390/Kconfig.debug"
-+source "kernel/vserver/Kconfig"
-+
- source "security/Kconfig"
- source "crypto/Kconfig"
-diff -NurpP --minimal linux-4.4.116/arch/s390/include/asm/tlb.h linux-4.4.116-vs2.3.9.7/arch/s390/include/asm/tlb.h
---- linux-4.4.116/arch/s390/include/asm/tlb.h  2015-07-06 20:41:37.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/s390/include/asm/tlb.h        2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/s390/include/asm/tlb.h linux-4.4.197-vs2.3.9.8/arch/s390/include/asm/tlb.h
+--- linux-4.4.197/arch/s390/include/asm/tlb.h  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/s390/include/asm/tlb.h        2018-10-20 04:57:21.000000000 +0000
 @@ -24,6 +24,7 @@
  #include <linux/mm.h>
  #include <linux/pagemap.h>
 @@ -24,6 +24,7 @@
  #include <linux/mm.h>
  #include <linux/pagemap.h>
@@ -542,9 +372,9 @@ diff -NurpP --minimal linux-4.4.116/arch/s390/include/asm/tlb.h linux-4.4.116-vs
  #include <asm/processor.h>
  #include <asm/pgalloc.h>
  #include <asm/tlbflush.h>
  #include <asm/processor.h>
  #include <asm/pgalloc.h>
  #include <asm/tlbflush.h>
-diff -NurpP --minimal linux-4.4.116/arch/s390/include/uapi/asm/unistd.h linux-4.4.116-vs2.3.9.7/arch/s390/include/uapi/asm/unistd.h
---- linux-4.4.116/arch/s390/include/uapi/asm/unistd.h  2016-07-05 04:14:30.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/s390/include/uapi/asm/unistd.h        2018-01-09 16:48:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/s390/include/uapi/asm/unistd.h linux-4.4.197-vs2.3.9.8/arch/s390/include/uapi/asm/unistd.h
+--- linux-4.4.197/arch/s390/include/uapi/asm/unistd.h  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/s390/include/uapi/asm/unistd.h        2018-10-20 04:57:21.000000000 +0000
 @@ -200,7 +200,7 @@
  #define __NR_clock_gettime    260
  #define __NR_clock_getres     261
 @@ -200,7 +200,7 @@
  #define __NR_clock_gettime    260
  #define __NR_clock_getres     261
@@ -554,9 +384,21 @@ diff -NurpP --minimal linux-4.4.116/arch/s390/include/uapi/asm/unistd.h linux-4.
  #define __NR_statfs64         265
  #define __NR_fstatfs64                266
  #define __NR_remap_file_pages 267
  #define __NR_statfs64         265
  #define __NR_fstatfs64                266
  #define __NR_remap_file_pages 267
-diff -NurpP --minimal linux-4.4.116/arch/s390/kernel/ptrace.c linux-4.4.116-vs2.3.9.7/arch/s390/kernel/ptrace.c
---- linux-4.4.116/arch/s390/kernel/ptrace.c    2018-02-22 21:19:04.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/s390/kernel/ptrace.c  2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/s390/Kconfig linux-4.4.197-vs2.3.9.8/arch/s390/Kconfig
+--- linux-4.4.197/arch/s390/Kconfig    2019-10-22 12:33:41.279510116 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/s390/Kconfig  2018-10-20 04:57:21.000000000 +0000
+@@ -776,6 +776,8 @@ source "fs/Kconfig"
+ source "arch/s390/Kconfig.debug"
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-4.4.197/arch/s390/kernel/ptrace.c linux-4.4.197-vs2.3.9.8/arch/s390/kernel/ptrace.c
+--- linux-4.4.197/arch/s390/kernel/ptrace.c    2019-10-22 12:33:41.379508517 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/s390/kernel/ptrace.c  2018-10-20 04:57:21.000000000 +0000
 @@ -21,6 +21,7 @@
  #include <linux/tracehook.h>
  #include <linux/seccomp.h>
 @@ -21,6 +21,7 @@
  #include <linux/tracehook.h>
  #include <linux/seccomp.h>
@@ -565,9 +407,9 @@ diff -NurpP --minimal linux-4.4.116/arch/s390/kernel/ptrace.c linux-4.4.116-vs2.
  #include <trace/syscall.h>
  #include <asm/segment.h>
  #include <asm/page.h>
  #include <trace/syscall.h>
  #include <asm/segment.h>
  #include <asm/page.h>
-diff -NurpP --minimal linux-4.4.116/arch/s390/kernel/syscalls.S linux-4.4.116-vs2.3.9.7/arch/s390/kernel/syscalls.S
---- linux-4.4.116/arch/s390/kernel/syscalls.S  2018-02-22 21:19:04.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/s390/kernel/syscalls.S        2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/s390/kernel/syscalls.S linux-4.4.197-vs2.3.9.8/arch/s390/kernel/syscalls.S
+--- linux-4.4.197/arch/s390/kernel/syscalls.S  2019-10-22 12:33:41.379508517 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/s390/kernel/syscalls.S        2018-10-20 04:57:21.000000000 +0000
 @@ -271,7 +271,7 @@ SYSCALL(sys_clock_settime,compat_sys_clo
  SYSCALL(sys_clock_gettime,compat_sys_clock_gettime)   /* 260 */
  SYSCALL(sys_clock_getres,compat_sys_clock_getres)
 @@ -271,7 +271,7 @@ SYSCALL(sys_clock_settime,compat_sys_clo
  SYSCALL(sys_clock_gettime,compat_sys_clock_gettime)   /* 260 */
  SYSCALL(sys_clock_getres,compat_sys_clock_getres)
@@ -577,9 +419,9 @@ diff -NurpP --minimal linux-4.4.116/arch/s390/kernel/syscalls.S linux-4.4.116-vs
  SYSCALL(sys_ni_syscall,compat_sys_s390_fadvise64_64)
  SYSCALL(sys_statfs64,compat_sys_statfs64)
  SYSCALL(sys_fstatfs64,compat_sys_fstatfs64)
  SYSCALL(sys_ni_syscall,compat_sys_s390_fadvise64_64)
  SYSCALL(sys_statfs64,compat_sys_statfs64)
  SYSCALL(sys_fstatfs64,compat_sys_fstatfs64)
-diff -NurpP --minimal linux-4.4.116/arch/sh/Kconfig linux-4.4.116-vs2.3.9.7/arch/sh/Kconfig
---- linux-4.4.116/arch/sh/Kconfig      2016-07-05 04:11:46.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/sh/Kconfig    2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/sh/Kconfig linux-4.4.197-vs2.3.9.8/arch/sh/Kconfig
+--- linux-4.4.197/arch/sh/Kconfig      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/sh/Kconfig    2018-10-20 04:57:21.000000000 +0000
 @@ -883,6 +883,8 @@ source "fs/Kconfig"
  
  source "arch/sh/Kconfig.debug"
 @@ -883,6 +883,8 @@ source "fs/Kconfig"
  
  source "arch/sh/Kconfig.debug"
@@ -589,9 +431,9 @@ diff -NurpP --minimal linux-4.4.116/arch/sh/Kconfig linux-4.4.116-vs2.3.9.7/arch
  source "security/Kconfig"
  
  source "crypto/Kconfig"
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-4.4.116/arch/sh/kernel/irq.c linux-4.4.116-vs2.3.9.7/arch/sh/kernel/irq.c
---- linux-4.4.116/arch/sh/kernel/irq.c 2016-07-05 04:11:46.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/sh/kernel/irq.c       2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/sh/kernel/irq.c linux-4.4.197-vs2.3.9.8/arch/sh/kernel/irq.c
+--- linux-4.4.197/arch/sh/kernel/irq.c 2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/sh/kernel/irq.c       2018-10-20 04:57:21.000000000 +0000
 @@ -14,6 +14,7 @@
  #include <linux/ftrace.h>
  #include <linux/delay.h>
 @@ -14,6 +14,7 @@
  #include <linux/ftrace.h>
  #include <linux/delay.h>
@@ -600,21 +442,9 @@ diff -NurpP --minimal linux-4.4.116/arch/sh/kernel/irq.c linux-4.4.116-vs2.3.9.7
  #include <asm/processor.h>
  #include <asm/machvec.h>
  #include <asm/uaccess.h>
  #include <asm/processor.h>
  #include <asm/machvec.h>
  #include <asm/uaccess.h>
-diff -NurpP --minimal linux-4.4.116/arch/sparc/Kconfig linux-4.4.116-vs2.3.9.7/arch/sparc/Kconfig
---- linux-4.4.116/arch/sparc/Kconfig   2018-02-22 21:19:04.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/sparc/Kconfig 2018-01-09 16:36:21.000000000 +0000
-@@ -561,6 +561,8 @@ source "fs/Kconfig"
- source "arch/sparc/Kconfig.debug"
-+source "kernel/vserver/Kconfig"
-+
- source "security/Kconfig"
- source "crypto/Kconfig"
-diff -NurpP --minimal linux-4.4.116/arch/sparc/include/uapi/asm/unistd.h linux-4.4.116-vs2.3.9.7/arch/sparc/include/uapi/asm/unistd.h
---- linux-4.4.116/arch/sparc/include/uapi/asm/unistd.h 2016-07-05 04:14:33.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/sparc/include/uapi/asm/unistd.h       2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/sparc/include/uapi/asm/unistd.h linux-4.4.197-vs2.3.9.8/arch/sparc/include/uapi/asm/unistd.h
+--- linux-4.4.197/arch/sparc/include/uapi/asm/unistd.h 2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/sparc/include/uapi/asm/unistd.h       2018-10-20 04:57:21.000000000 +0000
 @@ -332,7 +332,7 @@
  #define __NR_timer_getoverrun 264
  #define __NR_timer_delete     265
 @@ -332,7 +332,7 @@
  #define __NR_timer_getoverrun 264
  #define __NR_timer_delete     265
@@ -624,9 +454,21 @@ diff -NurpP --minimal linux-4.4.116/arch/sparc/include/uapi/asm/unistd.h linux-4
  #define __NR_io_setup         268
  #define __NR_io_destroy               269
  #define __NR_io_submit                270
  #define __NR_io_setup         268
  #define __NR_io_destroy               269
  #define __NR_io_submit                270
-diff -NurpP --minimal linux-4.4.116/arch/sparc/kernel/systbls_32.S linux-4.4.116-vs2.3.9.7/arch/sparc/kernel/systbls_32.S
---- linux-4.4.116/arch/sparc/kernel/systbls_32.S       2016-07-05 04:14:33.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/sparc/kernel/systbls_32.S     2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/sparc/Kconfig linux-4.4.197-vs2.3.9.8/arch/sparc/Kconfig
+--- linux-4.4.197/arch/sparc/Kconfig   2019-10-22 12:33:41.589505158 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/sparc/Kconfig 2018-10-20 04:57:21.000000000 +0000
+@@ -561,6 +561,8 @@ source "fs/Kconfig"
+ source "arch/sparc/Kconfig.debug"
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-4.4.197/arch/sparc/kernel/systbls_32.S linux-4.4.197-vs2.3.9.8/arch/sparc/kernel/systbls_32.S
+--- linux-4.4.197/arch/sparc/kernel/systbls_32.S       2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/sparc/kernel/systbls_32.S     2018-10-20 04:57:21.000000000 +0000
 @@ -70,7 +70,7 @@ sys_call_table:
  /*250*/       .long sys_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_ni_syscall
  /*255*/       .long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
 @@ -70,7 +70,7 @@ sys_call_table:
  /*250*/       .long sys_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_ni_syscall
  /*255*/       .long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
@@ -636,9 +478,9 @@ diff -NurpP --minimal linux-4.4.116/arch/sparc/kernel/systbls_32.S linux-4.4.116
  /*270*/       .long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink
  /*275*/       .long sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid
  /*280*/       .long sys_tee, sys_add_key, sys_request_key, sys_keyctl, sys_openat
  /*270*/       .long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink
  /*275*/       .long sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid
  /*280*/       .long sys_tee, sys_add_key, sys_request_key, sys_keyctl, sys_openat
-diff -NurpP --minimal linux-4.4.116/arch/sparc/kernel/systbls_64.S linux-4.4.116-vs2.3.9.7/arch/sparc/kernel/systbls_64.S
---- linux-4.4.116/arch/sparc/kernel/systbls_64.S       2016-07-05 04:14:33.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/sparc/kernel/systbls_64.S     2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/sparc/kernel/systbls_64.S linux-4.4.197-vs2.3.9.8/arch/sparc/kernel/systbls_64.S
+--- linux-4.4.197/arch/sparc/kernel/systbls_64.S       2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/sparc/kernel/systbls_64.S     2018-10-20 04:57:21.000000000 +0000
 @@ -71,7 +71,7 @@ sys_call_table32:
  /*250*/       .word sys_mremap, compat_sys_sysctl, sys_getsid, sys_fdatasync, sys_nis_syscall
        .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep
 @@ -71,7 +71,7 @@ sys_call_table32:
  /*250*/       .word sys_mremap, compat_sys_sysctl, sys_getsid, sys_fdatasync, sys_nis_syscall
        .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep
@@ -657,9 +499,9 @@ diff -NurpP --minimal linux-4.4.116/arch/sparc/kernel/systbls_64.S linux-4.4.116
  /*270*/       .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink
        .word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid
  /*280*/       .word sys_tee, sys_add_key, sys_request_key, sys_keyctl, sys_openat
  /*270*/       .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink
        .word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid
  /*280*/       .word sys_tee, sys_add_key, sys_request_key, sys_keyctl, sys_openat
-diff -NurpP --minimal linux-4.4.116/arch/um/Kconfig.rest linux-4.4.116-vs2.3.9.7/arch/um/Kconfig.rest
---- linux-4.4.116/arch/um/Kconfig.rest 2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/um/Kconfig.rest       2018-01-09 16:36:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/um/Kconfig.rest linux-4.4.197-vs2.3.9.8/arch/um/Kconfig.rest
+--- linux-4.4.197/arch/um/Kconfig.rest 2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/um/Kconfig.rest       2018-10-20 04:57:21.000000000 +0000
 @@ -12,6 +12,8 @@ source "arch/um/Kconfig.net"
  
  source "fs/Kconfig"
 @@ -12,6 +12,8 @@ source "arch/um/Kconfig.net"
  
  source "fs/Kconfig"
@@ -669,21 +511,9 @@ diff -NurpP --minimal linux-4.4.116/arch/um/Kconfig.rest linux-4.4.116-vs2.3.9.7
  source "security/Kconfig"
  
  source "crypto/Kconfig"
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-4.4.116/arch/x86/Kconfig linux-4.4.116-vs2.3.9.7/arch/x86/Kconfig
---- linux-4.4.116/arch/x86/Kconfig     2018-02-22 21:19:06.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/x86/Kconfig   2018-02-10 15:16:50.000000000 +0000
-@@ -2687,6 +2687,8 @@ source "fs/Kconfig"
- source "arch/x86/Kconfig.debug"
-+source "kernel/vserver/Kconfig"
-+
- source "security/Kconfig"
- source "crypto/Kconfig"
-diff -NurpP --minimal linux-4.4.116/arch/x86/entry/syscalls/syscall_32.tbl linux-4.4.116-vs2.3.9.7/arch/x86/entry/syscalls/syscall_32.tbl
---- linux-4.4.116/arch/x86/entry/syscalls/syscall_32.tbl       2018-02-22 21:19:07.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/x86/entry/syscalls/syscall_32.tbl     2018-01-10 01:51:14.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/x86/entry/syscalls/syscall_32.tbl linux-4.4.197-vs2.3.9.8/arch/x86/entry/syscalls/syscall_32.tbl
+--- linux-4.4.197/arch/x86/entry/syscalls/syscall_32.tbl       2019-10-22 12:33:43.129480539 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/x86/entry/syscalls/syscall_32.tbl     2018-10-20 04:57:21.000000000 +0000
 @@ -279,7 +279,7 @@
  270   i386    tgkill                  sys_tgkill
  271   i386    utimes                  sys_utimes                      compat_sys_utimes
 @@ -279,7 +279,7 @@
  270   i386    tgkill                  sys_tgkill
  271   i386    utimes                  sys_utimes                      compat_sys_utimes
@@ -693,9 +523,9 @@ diff -NurpP --minimal linux-4.4.116/arch/x86/entry/syscalls/syscall_32.tbl linux
  274   i386    mbind                   sys_mbind
  275   i386    get_mempolicy           sys_get_mempolicy               compat_sys_get_mempolicy
  276   i386    set_mempolicy           sys_set_mempolicy
  274   i386    mbind                   sys_mbind
  275   i386    get_mempolicy           sys_get_mempolicy               compat_sys_get_mempolicy
  276   i386    set_mempolicy           sys_set_mempolicy
-diff -NurpP --minimal linux-4.4.116/arch/x86/entry/syscalls/syscall_64.tbl linux-4.4.116-vs2.3.9.7/arch/x86/entry/syscalls/syscall_64.tbl
---- linux-4.4.116/arch/x86/entry/syscalls/syscall_64.tbl       2016-07-05 04:14:33.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/arch/x86/entry/syscalls/syscall_64.tbl     2018-01-10 01:51:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/x86/entry/syscalls/syscall_64.tbl linux-4.4.197-vs2.3.9.8/arch/x86/entry/syscalls/syscall_64.tbl
+--- linux-4.4.197/arch/x86/entry/syscalls/syscall_64.tbl       2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/x86/entry/syscalls/syscall_64.tbl     2018-10-20 04:57:21.000000000 +0000
 @@ -242,7 +242,7 @@
  233   common  epoll_ctl               sys_epoll_ctl
  234   common  tgkill                  sys_tgkill
 @@ -242,7 +242,7 @@
  233   common  epoll_ctl               sys_epoll_ctl
  234   common  tgkill                  sys_tgkill
@@ -705,9 +535,21 @@ diff -NurpP --minimal linux-4.4.116/arch/x86/entry/syscalls/syscall_64.tbl linux
  237   common  mbind                   sys_mbind
  238   common  set_mempolicy           sys_set_mempolicy
  239   common  get_mempolicy           sys_get_mempolicy
  237   common  mbind                   sys_mbind
  238   common  set_mempolicy           sys_set_mempolicy
  239   common  get_mempolicy           sys_get_mempolicy
-diff -NurpP --minimal linux-4.4.116/block/ioprio.c linux-4.4.116-vs2.3.9.7/block/ioprio.c
---- linux-4.4.116/block/ioprio.c       2018-02-22 21:19:12.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/block/ioprio.c     2018-01-09 16:36:23.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/arch/x86/Kconfig linux-4.4.197-vs2.3.9.8/arch/x86/Kconfig
+--- linux-4.4.197/arch/x86/Kconfig     2019-10-22 12:33:42.989482775 +0000
++++ linux-4.4.197-vs2.3.9.8/arch/x86/Kconfig   2019-10-05 14:35:14.203098872 +0000
+@@ -2680,6 +2680,8 @@ source "fs/Kconfig"
+ source "arch/x86/Kconfig.debug"
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-4.4.197/block/ioprio.c linux-4.4.197-vs2.3.9.8/block/ioprio.c
+--- linux-4.4.197/block/ioprio.c       2019-10-22 12:33:45.859436891 +0000
++++ linux-4.4.197-vs2.3.9.8/block/ioprio.c     2018-10-20 04:57:21.000000000 +0000
 @@ -28,6 +28,7 @@
  #include <linux/syscalls.h>
  #include <linux/security.h>
 @@ -28,6 +28,7 @@
  #include <linux/syscalls.h>
  #include <linux/security.h>
@@ -734,54 +576,201 @@ diff -NurpP --minimal linux-4.4.116/block/ioprio.c linux-4.4.116-vs2.3.9.7/block
                                tmpio = get_task_ioprio(p);
                                if (tmpio < 0)
                                        continue;
                                tmpio = get_task_ioprio(p);
                                if (tmpio < 0)
                                        continue;
-diff -NurpP --minimal linux-4.4.116/drivers/block/Kconfig linux-4.4.116-vs2.3.9.7/drivers/block/Kconfig
---- linux-4.4.116/drivers/block/Kconfig        2016-07-05 04:14:35.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/drivers/block/Kconfig      2018-01-09 16:36:23.000000000 +0000
-@@ -283,6 +283,13 @@ config BLK_DEV_CRYPTOLOOP
- source "drivers/block/drbd/Kconfig"
-+config BLK_DEV_VROOT
-+      tristate "Virtual Root device support"
-+      depends on QUOTACTL
-+      ---help---
-+        Saying Y here will allow you to use quota/fs ioctls on a shared
-+        partition within a virtual server without compromising security.
+diff -NurpP --minimal linux-4.4.197/Documentation/vserver/debug.txt linux-4.4.197-vs2.3.9.8/Documentation/vserver/debug.txt
+--- linux-4.4.197/Documentation/vserver/debug.txt      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/Documentation/vserver/debug.txt    2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,154 @@
 +
 +
- config BLK_DEV_NBD
-       tristate "Network block device support"
-       depends on NET
-diff -NurpP --minimal linux-4.4.116/drivers/block/Makefile linux-4.4.116-vs2.3.9.7/drivers/block/Makefile
---- linux-4.4.116/drivers/block/Makefile       2016-07-05 04:14:35.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/drivers/block/Makefile     2018-01-09 16:36:23.000000000 +0000
-@@ -32,6 +32,7 @@ obj-$(CONFIG_VIRTIO_BLK)     += virtio_blk.o
- obj-$(CONFIG_BLK_DEV_SX8)     += sx8.o
- obj-$(CONFIG_BLK_DEV_HD)      += hd.o
-+obj-$(CONFIG_BLK_DEV_VROOT)   += vroot.o
- obj-$(CONFIG_XEN_BLKDEV_FRONTEND)     += xen-blkfront.o
- obj-$(CONFIG_XEN_BLKDEV_BACKEND)      += xen-blkback/
-diff -NurpP --minimal linux-4.4.116/drivers/block/loop.c linux-4.4.116-vs2.3.9.7/drivers/block/loop.c
---- linux-4.4.116/drivers/block/loop.c 2018-02-22 21:19:16.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/drivers/block/loop.c       2018-02-10 15:16:50.000000000 +0000
-@@ -76,6 +76,7 @@
- #include <linux/miscdevice.h>
- #include <linux/falloc.h>
- #include <linux/uio.h>
-+#include <linux/vs_context.h>
- #include "loop.h"
- #include <asm/uaccess.h>
-@@ -935,6 +936,7 @@ static int loop_set_fd(struct loop_devic
-       lo->lo_blocksize = lo_blocksize;
-       lo->lo_device = bdev;
-       lo->lo_flags = lo_flags;
-+      lo->lo_xid = vx_current_xid();
-       lo->lo_backing_file = file;
++debug_cvirt:
++
++ 2   4        "vx_map_tgid: %p/%llx: %d -> %d"
++      "vx_rmap_tgid: %p/%llx: %d -> %d"
++
++debug_dlim:
++
++ 0   1        "ALLOC (%p,#%d)%c inode (%d)"
++      "FREE  (%p,#%d)%c inode"
++ 1   2        "ALLOC (%p,#%d)%c %lld bytes (%d)"
++      "FREE  (%p,#%d)%c %lld bytes"
++ 2   4        "ADJUST: %lld,%lld on %ld,%ld [mult=%d]"
++ 3   8        "ext3_has_free_blocks(%p): %lu<%lu+1, %c, %u!=%u r=%d"
++      "ext3_has_free_blocks(%p): free=%lu, root=%lu"
++      "rcu_free_dl_info(%p)"
++ 4  10        "alloc_dl_info(%p,%d) = %p"
++      "dealloc_dl_info(%p)"
++      "get_dl_info(%p[#%d.%d])"
++      "put_dl_info(%p[#%d.%d])"
++ 5  20        "alloc_dl_info(%p,%d)*"
++ 6  40        "__hash_dl_info: %p[#%d]"
++      "__unhash_dl_info: %p[#%d]"
++ 7  80        "locate_dl_info(%p,#%d) = %p"
++
++debug_misc:
++
++ 0   1        "destroy_dqhash: %p [#0x%08x] c=%d"
++      "new_dqhash: %p [#0x%08x]"
++      "vroot[%d]_clr_dev: dev=%p[%lu,%d:%d]"
++      "vroot[%d]_get_real_bdev: dev=%p[%lu,%d:%d]"
++      "vroot[%d]_set_dev: dev=%p[%lu,%d:%d]"
++      "vroot_get_real_bdev not set"
++ 1   2        "cow_break_link(?%s?)"
++      "temp copy ?%s?"
++ 2   4        "dentry_open(new): %p"
++      "dentry_open(old): %p"
++      "lookup_create(new): %p"
++      "old path ?%s?"
++      "path_lookup(old): %d"
++      "vfs_create(new): %d"
++      "vfs_rename: %d"
++      "vfs_sendfile: %d"
++ 3   8        "fput(new_file=%p[#%d])"
++      "fput(old_file=%p[#%d])"
++ 4  10        "vx_info_kill(%p[#%d],%d,%d) = %d"
++      "vx_info_kill(%p[#%d],%d,%d)*"
++ 5  20        "vs_reboot(%p[#%d],%d)"
++ 6  40        "dropping task %p[#%u,%u] for %p[#%u,%u]"
++
++debug_net:
++
++ 2   4        "nx_addr_conflict(%p,%p) %d.%d,%d.%d"
++ 3   8        "inet_bind(%p) %d.%d.%d.%d, %d.%d.%d.%d, %d.%d.%d.%d"
++      "inet_bind(%p)* %p,%p;%lx %d.%d.%d.%d"
++ 4  10        "ip_route_connect(%p) %p,%p;%lx"
++ 5  20        "__addr_in_socket(%p,%d.%d.%d.%d) %p:%d.%d.%d.%d %p;%lx"
++ 6  40        "sk,egf: %p [#%d] (from %d)"
++      "sk,egn: %p [#%d] (from %d)"
++      "sk,req: %p [#%d] (from %d)"
++      "sk: %p [#%d] (from %d)"
++      "tw: %p [#%d] (from %d)"
++ 7  80        "__sock_recvmsg: %p[%p,%p,%p;%d]:%d/%d"
++      "__sock_sendmsg: %p[%p,%p,%p;%d]:%d/%d"
++
++debug_nid:
++
++ 0   1        "__lookup_nx_info(#%u): %p[#%u]"
++      "alloc_nx_info(%d) = %p"
++      "create_nx_info(%d) (dynamic rejected)"
++      "create_nx_info(%d) = %p (already there)"
++      "create_nx_info(%d) = %p (new)"
++      "dealloc_nx_info(%p)"
++ 1   2        "alloc_nx_info(%d)*"
++      "create_nx_info(%d)*"
++ 2   4        "get_nx_info(%p[#%d.%d])"
++      "put_nx_info(%p[#%d.%d])"
++ 3   8        "claim_nx_info(%p[#%d.%d.%d]) %p"
++      "clr_nx_info(%p[#%d.%d])"
++      "init_nx_info(%p[#%d.%d])"
++      "release_nx_info(%p[#%d.%d.%d]) %p"
++      "set_nx_info(%p[#%d.%d])"
++ 4  10        "__hash_nx_info: %p[#%d]"
++      "__nx_dynamic_id: [#%d]"
++      "__unhash_nx_info: %p[#%d.%d.%d]"
++ 5  20        "moved task %p into nxi:%p[#%d]"
++      "nx_migrate_task(%p,%p[#%d.%d.%d])"
++      "task_get_nx_info(%p)"
++ 6  40        "nx_clear_persistent(%p[#%d])"
++
++debug_quota:
++
++ 0   1        "quota_sync_dqh(%p,%d) discard inode %p"
++ 1   2        "quota_sync_dqh(%p,%d)"
++      "sync_dquots(%p,%d)"
++      "sync_dquots_dqh(%p,%d)"
++ 3   8        "do_quotactl(%p,%d,cmd=%d,id=%d,%p)"
++
++debug_switch:
++
++ 0   1        "vc: VCMD_%02d_%d[%d], %d,%p [%d,%d,%x,%x]"
++ 1   2        "vc: VCMD_%02d_%d[%d] = %08lx(%ld) [%d,%d]"
++ 4  10        "%s: (%s %s) returned %s with %d"
++
++debug_tag:
++
++ 7  80        "dx_parse_tag(?%s?): %d:#%d"
++      "dx_propagate_tag(%p[#%lu.%d]): %d,%d"
++
++debug_xid:
++
++ 0   1        "__lookup_vx_info(#%u): %p[#%u]"
++      "alloc_vx_info(%d) = %p"
++      "alloc_vx_info(%d)*"
++      "create_vx_info(%d) (dynamic rejected)"
++      "create_vx_info(%d) = %p (already there)"
++      "create_vx_info(%d) = %p (new)"
++      "dealloc_vx_info(%p)"
++      "loc_vx_info(%d) = %p (found)"
++      "loc_vx_info(%d) = %p (new)"
++      "loc_vx_info(%d) = %p (not available)"
++ 1   2        "create_vx_info(%d)*"
++      "loc_vx_info(%d)*"
++ 2   4        "get_vx_info(%p[#%d.%d])"
++      "put_vx_info(%p[#%d.%d])"
++ 3   8        "claim_vx_info(%p[#%d.%d.%d]) %p"
++      "clr_vx_info(%p[#%d.%d])"
++      "init_vx_info(%p[#%d.%d])"
++      "release_vx_info(%p[#%d.%d.%d]) %p"
++      "set_vx_info(%p[#%d.%d])"
++ 4  10        "__hash_vx_info: %p[#%d]"
++      "__unhash_vx_info: %p[#%d.%d.%d]"
++      "__vx_dynamic_id: [#%d]"
++ 5  20        "enter_vx_info(%p[#%d],%p) %p[#%d,%p]"
++      "leave_vx_info(%p[#%d,%p]) %p[#%d,%p]"
++      "moved task %p into vxi:%p[#%d]"
++      "task_get_vx_info(%p)"
++      "vx_migrate_task(%p,%p[#%d.%d])"
++ 6  40        "vx_clear_persistent(%p[#%d])"
++      "vx_exit_init(%p[#%d],%p[#%d,%d,%d])"
++      "vx_set_init(%p[#%d],%p[#%d,%d,%d])"
++      "vx_set_persistent(%p[#%d])"
++      "vx_set_reaper(%p[#%d],%p[#%d,%d])"
++ 7  80        "vx_child_reaper(%p[#%u,%u]) = %p[#%u,%u]"
++
++
++debug_limit:
++
++ n 2^n        "vx_acc_cres[%5d,%s,%2d]: %5d%s"
++      "vx_cres_avail[%5d,%s,%2d]: %5ld > %5d + %5d"
++
++ m 2^m        "vx_acc_page[%5d,%s,%2d]: %5d%s"
++      "vx_acc_pages[%5d,%s,%2d]: %5d += %5d"
++      "vx_pages_avail[%5d,%s,%2d]: %5ld > %5d + %5d"
+diff -NurpP --minimal linux-4.4.197/drivers/block/Kconfig linux-4.4.197-vs2.3.9.8/drivers/block/Kconfig
+--- linux-4.4.197/drivers/block/Kconfig        2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/drivers/block/Kconfig      2018-10-20 04:57:21.000000000 +0000
+@@ -283,6 +283,13 @@ config BLK_DEV_CRYPTOLOOP
+ source "drivers/block/drbd/Kconfig"
++config BLK_DEV_VROOT
++      tristate "Virtual Root device support"
++      depends on QUOTACTL
++      ---help---
++        Saying Y here will allow you to use quota/fs ioctls on a shared
++        partition within a virtual server without compromising security.
++
+ config BLK_DEV_NBD
+       tristate "Network block device support"
+       depends on NET
+diff -NurpP --minimal linux-4.4.197/drivers/block/loop.c linux-4.4.197-vs2.3.9.8/drivers/block/loop.c
+--- linux-4.4.197/drivers/block/loop.c 2019-10-22 12:33:47.979402997 +0000
++++ linux-4.4.197-vs2.3.9.8/drivers/block/loop.c       2019-10-05 14:35:16.743058580 +0000
+@@ -76,6 +76,7 @@
+ #include <linux/miscdevice.h>
+ #include <linux/falloc.h>
+ #include <linux/uio.h>
++#include <linux/vs_context.h>
+ #include "loop.h"
+ #include <asm/uaccess.h>
+@@ -947,6 +948,7 @@ static int loop_set_fd(struct loop_devic
+       lo->lo_blocksize = lo_blocksize;
+       lo->lo_device = bdev;
+       lo->lo_flags = lo_flags;
++      lo->lo_xid = vx_current_xid();
+       lo->lo_backing_file = file;
        lo->transfer = NULL;
        lo->ioctl = NULL;
        lo->transfer = NULL;
        lo->ioctl = NULL;
-@@ -1055,6 +1057,7 @@ static int loop_clr_fd(struct loop_devic
+@@ -1067,6 +1069,7 @@ static int loop_clr_fd(struct loop_devic
        lo->lo_offset = 0;
        lo->lo_sizelimit = 0;
        lo->lo_encrypt_key_size = 0;
        lo->lo_offset = 0;
        lo->lo_sizelimit = 0;
        lo->lo_encrypt_key_size = 0;
@@ -789,7 +778,7 @@ diff -NurpP --minimal linux-4.4.116/drivers/block/loop.c linux-4.4.116-vs2.3.9.7
        memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE);
        memset(lo->lo_crypt_name, 0, LO_NAME_SIZE);
        memset(lo->lo_file_name, 0, LO_NAME_SIZE);
        memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE);
        memset(lo->lo_crypt_name, 0, LO_NAME_SIZE);
        memset(lo->lo_file_name, 0, LO_NAME_SIZE);
-@@ -1101,7 +1104,7 @@ loop_set_status(struct loop_device *lo,
+@@ -1113,7 +1116,7 @@ loop_set_status(struct loop_device *lo,
  
        if (lo->lo_encrypt_key_size &&
            !uid_eq(lo->lo_key_owner, uid) &&
  
        if (lo->lo_encrypt_key_size &&
            !uid_eq(lo->lo_key_owner, uid) &&
@@ -798,7 +787,7 @@ diff -NurpP --minimal linux-4.4.116/drivers/block/loop.c linux-4.4.116-vs2.3.9.7
                return -EPERM;
        if (lo->lo_state != Lo_bound)
                return -ENXIO;
                return -EPERM;
        if (lo->lo_state != Lo_bound)
                return -ENXIO;
-@@ -1202,7 +1205,8 @@ loop_get_status(struct loop_device *lo,
+@@ -1218,7 +1221,8 @@ loop_get_status(struct loop_device *lo,
        memcpy(info->lo_crypt_name, lo->lo_crypt_name, LO_NAME_SIZE);
        info->lo_encrypt_type =
                lo->lo_encryption ? lo->lo_encryption->number : 0;
        memcpy(info->lo_crypt_name, lo->lo_crypt_name, LO_NAME_SIZE);
        info->lo_encrypt_type =
                lo->lo_encryption ? lo->lo_encryption->number : 0;
@@ -808,7 +797,7 @@ diff -NurpP --minimal linux-4.4.116/drivers/block/loop.c linux-4.4.116-vs2.3.9.7
                info->lo_encrypt_key_size = lo->lo_encrypt_key_size;
                memcpy(info->lo_encrypt_key, lo->lo_encrypt_key,
                       lo->lo_encrypt_key_size);
                info->lo_encrypt_key_size = lo->lo_encrypt_key_size;
                memcpy(info->lo_encrypt_key, lo->lo_encrypt_key,
                       lo->lo_encrypt_key_size);
-@@ -1563,6 +1567,11 @@ static int lo_open(struct block_device *
+@@ -1579,6 +1583,11 @@ static int lo_open(struct block_device *
                goto out;
        }
  
                goto out;
        }
  
@@ -820,9 +809,9 @@ diff -NurpP --minimal linux-4.4.116/drivers/block/loop.c linux-4.4.116-vs2.3.9.7
        atomic_inc(&lo->lo_refcnt);
  out:
        mutex_unlock(&loop_index_mutex);
        atomic_inc(&lo->lo_refcnt);
  out:
        mutex_unlock(&loop_index_mutex);
-diff -NurpP --minimal linux-4.4.116/drivers/block/loop.h linux-4.4.116-vs2.3.9.7/drivers/block/loop.h
---- linux-4.4.116/drivers/block/loop.h 2016-07-05 04:14:35.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/drivers/block/loop.h       2018-01-09 16:36:23.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/drivers/block/loop.h linux-4.4.197-vs2.3.9.8/drivers/block/loop.h
+--- linux-4.4.197/drivers/block/loop.h 2019-10-22 12:33:47.979402997 +0000
++++ linux-4.4.197-vs2.3.9.8/drivers/block/loop.h       2019-10-05 14:35:16.753058421 +0000
 @@ -43,6 +43,7 @@ struct loop_device {
        struct loop_func_table *lo_encryption;
        __u32           lo_init[2];
 @@ -43,6 +43,7 @@ struct loop_device {
        struct loop_func_table *lo_encryption;
        __u32           lo_init[2];
@@ -831,9 +820,20 @@ diff -NurpP --minimal linux-4.4.116/drivers/block/loop.h linux-4.4.116-vs2.3.9.7
        int             (*ioctl)(struct loop_device *, int cmd, 
                                 unsigned long arg); 
  
        int             (*ioctl)(struct loop_device *, int cmd, 
                                 unsigned long arg); 
  
-diff -NurpP --minimal linux-4.4.116/drivers/block/vroot.c linux-4.4.116-vs2.3.9.7/drivers/block/vroot.c
---- linux-4.4.116/drivers/block/vroot.c        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/drivers/block/vroot.c      2018-01-11 07:37:22.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/drivers/block/Makefile linux-4.4.197-vs2.3.9.8/drivers/block/Makefile
+--- linux-4.4.197/drivers/block/Makefile       2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/drivers/block/Makefile     2018-10-20 04:57:21.000000000 +0000
+@@ -32,6 +32,7 @@ obj-$(CONFIG_VIRTIO_BLK)     += virtio_blk.o
+ obj-$(CONFIG_BLK_DEV_SX8)     += sx8.o
+ obj-$(CONFIG_BLK_DEV_HD)      += hd.o
++obj-$(CONFIG_BLK_DEV_VROOT)   += vroot.o
+ obj-$(CONFIG_XEN_BLKDEV_FRONTEND)     += xen-blkfront.o
+ obj-$(CONFIG_XEN_BLKDEV_BACKEND)      += xen-blkback/
+diff -NurpP --minimal linux-4.4.197/drivers/block/vroot.c linux-4.4.197-vs2.3.9.8/drivers/block/vroot.c
+--- linux-4.4.197/drivers/block/vroot.c        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/drivers/block/vroot.c      2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,291 @@
 +/*
 + *  linux/drivers/block/vroot.c
 @@ -0,0 +1,291 @@
 +/*
 + *  linux/drivers/block/vroot.c
@@ -1126,10 +1126,10 @@ diff -NurpP --minimal linux-4.4.116/drivers/block/vroot.c linux-4.4.116-vs2.3.9.
 +
 +#endif
 +
 +
 +#endif
 +
-diff -NurpP --minimal linux-4.4.116/drivers/infiniband/core/addr.c linux-4.4.116-vs2.3.9.7/drivers/infiniband/core/addr.c
---- linux-4.4.116/drivers/infiniband/core/addr.c       2018-02-22 21:19:25.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/drivers/infiniband/core/addr.c     2018-01-09 16:49:06.000000000 +0000
-@@ -283,7 +283,7 @@ static int addr6_resolve(struct sockaddr
+diff -NurpP --minimal linux-4.4.197/drivers/infiniband/core/addr.c linux-4.4.197-vs2.3.9.8/drivers/infiniband/core/addr.c
+--- linux-4.4.197/drivers/infiniband/core/addr.c       2019-10-22 12:33:58.339237367 +0000
++++ linux-4.4.197-vs2.3.9.8/drivers/infiniband/core/addr.c     2019-10-05 14:35:19.353017176 +0000
+@@ -299,7 +299,7 @@ static int addr6_resolve(struct sockaddr
  
        if (ipv6_addr_any(&fl6.saddr)) {
                ret = ipv6_dev_get_saddr(addr->net, ip6_dst_idev(dst)->dev,
  
        if (ipv6_addr_any(&fl6.saddr)) {
                ret = ipv6_dev_get_saddr(addr->net, ip6_dst_idev(dst)->dev,
@@ -1138,129 +1138,41 @@ diff -NurpP --minimal linux-4.4.116/drivers/infiniband/core/addr.c linux-4.4.116
                if (ret)
                        goto put;
  
                if (ret)
                        goto put;
  
-diff -NurpP --minimal linux-4.4.116/drivers/md/dm-ioctl.c linux-4.4.116-vs2.3.9.7/drivers/md/dm-ioctl.c
---- linux-4.4.116/drivers/md/dm-ioctl.c        2018-02-22 21:19:28.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/drivers/md/dm-ioctl.c      2018-01-09 16:36:23.000000000 +0000
-@@ -16,6 +16,7 @@
- #include <linux/dm-ioctl.h>
- #include <linux/hdreg.h>
- #include <linux/compat.h>
-+#include <linux/vs_context.h>
- #include <asm/uaccess.h>
+diff -NurpP --minimal linux-4.4.197/drivers/md/dm.c linux-4.4.197-vs2.3.9.8/drivers/md/dm.c
+--- linux-4.4.197/drivers/md/dm.c      2019-10-22 12:33:59.859213069 +0000
++++ linux-4.4.197-vs2.3.9.8/drivers/md/dm.c    2018-10-20 04:57:21.000000000 +0000
+@@ -25,6 +25,7 @@
+ #include <linux/elevator.h> /* for rq_end_sector() */
+ #include <linux/blk-mq.h>
+ #include <linux/pr.h>
++#include <linux/vs_base.h>
  
  
-@@ -114,7 +115,8 @@ static struct hash_cell *__get_name_cell
-       unsigned int h = hash_str(str);
+ #include <trace/events/block.h>
  
  
-       list_for_each_entry (hc, _name_buckets + h, name_list)
--              if (!strcmp(hc->name, str)) {
-+              if (vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT) &&
-+                      !strcmp(hc->name, str)) {
-                       dm_get(hc->md);
-                       return hc;
-               }
-@@ -128,7 +130,8 @@ static struct hash_cell *__get_uuid_cell
-       unsigned int h = hash_str(str);
+@@ -144,6 +145,7 @@ struct mapped_device {
+       struct mutex suspend_lock;
+       atomic_t holders;
+       atomic_t open_count;
++      vxid_t xid;
  
  
-       list_for_each_entry (hc, _uuid_buckets + h, uuid_list)
--              if (!strcmp(hc->uuid, str)) {
-+              if (vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT) &&
-+                      !strcmp(hc->uuid, str)) {
-                       dm_get(hc->md);
-                       return hc;
-               }
-@@ -139,13 +142,15 @@ static struct hash_cell *__get_uuid_cell
- static struct hash_cell *__get_dev_cell(uint64_t dev)
+       /*
+        * The current mapping.
+@@ -445,6 +447,7 @@ int dm_deleting_md(struct mapped_device
+ static int dm_blk_open(struct block_device *bdev, fmode_t mode)
  {
        struct mapped_device *md;
  {
        struct mapped_device *md;
--      struct hash_cell *hc;
-+      struct hash_cell *hc = NULL;
++      int ret = -ENXIO;
  
  
-       md = dm_get_md(huge_decode_dev(dev));
-       if (!md)
-               return NULL;
+       spin_lock(&_minor_lock);
  
  
--      hc = dm_get_mdptr(md);
-+      if (vx_check(dm_get_xid(md), VS_WATCH_P | VS_IDENT))
-+              hc = dm_get_mdptr(md);
-+
-       if (!hc) {
-               dm_put(md);
-               return NULL;
-@@ -467,6 +472,9 @@ typedef int (*ioctl_fn)(struct dm_ioctl
+@@ -453,17 +456,19 @@ static int dm_blk_open(struct block_devi
+               goto out;
  
  
- static int remove_all(struct dm_ioctl *param, size_t param_size)
- {
-+      if (!vx_check(0, VS_ADMIN))
-+              return -EPERM;
-+
-       dm_hash_remove_all(true, !!(param->flags & DM_DEFERRED_REMOVE), false);
-       param->data_size = 0;
-       return 0;
-@@ -514,6 +522,8 @@ static int list_devices(struct dm_ioctl
-        */
-       for (i = 0; i < NUM_BUCKETS; i++) {
-               list_for_each_entry (hc, _name_buckets + i, name_list) {
-+                      if (!vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT))
-+                              continue;
-                       needed += sizeof(struct dm_name_list);
-                       needed += strlen(hc->name) + 1;
-                       needed += ALIGN_MASK;
-@@ -537,6 +547,8 @@ static int list_devices(struct dm_ioctl
-        */
-       for (i = 0; i < NUM_BUCKETS; i++) {
-               list_for_each_entry (hc, _name_buckets + i, name_list) {
-+                      if (!vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT))
-+                              continue;
-                       if (old_nl)
-                               old_nl->next = (uint32_t) ((void *) nl -
-                                                          (void *) old_nl);
-@@ -1801,8 +1813,8 @@ static int ctl_ioctl(uint command, struc
-       size_t input_param_size;
-       struct dm_ioctl param_kernel;
--      /* only root can play with this */
--      if (!capable(CAP_SYS_ADMIN))
-+      /* only root and certain contexts can play with this */
-+      if (!vx_capable(CAP_SYS_ADMIN, VXC_ADMIN_MAPPER))
-               return -EACCES;
-       if (_IOC_TYPE(command) != DM_IOCTL)
-diff -NurpP --minimal linux-4.4.116/drivers/md/dm.c linux-4.4.116-vs2.3.9.7/drivers/md/dm.c
---- linux-4.4.116/drivers/md/dm.c      2018-02-22 21:19:28.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/drivers/md/dm.c    2018-01-09 16:49:30.000000000 +0000
-@@ -25,6 +25,7 @@
- #include <linux/elevator.h> /* for rq_end_sector() */
- #include <linux/blk-mq.h>
- #include <linux/pr.h>
-+#include <linux/vs_base.h>
- #include <trace/events/block.h>
-@@ -144,6 +145,7 @@ struct mapped_device {
-       struct mutex suspend_lock;
-       atomic_t holders;
-       atomic_t open_count;
-+      vxid_t xid;
-       /*
-        * The current mapping.
-@@ -445,6 +447,7 @@ int dm_deleting_md(struct mapped_device
- static int dm_blk_open(struct block_device *bdev, fmode_t mode)
- {
-       struct mapped_device *md;
-+      int ret = -ENXIO;
-       spin_lock(&_minor_lock);
-@@ -453,17 +456,19 @@ static int dm_blk_open(struct block_devi
-               goto out;
-       if (test_bit(DMF_FREEING, &md->flags) ||
--          dm_deleting_md(md)) {
--              md = NULL;
-+          dm_deleting_md(md))
-+              goto out;
+       if (test_bit(DMF_FREEING, &md->flags) ||
+-          dm_deleting_md(md)) {
+-              md = NULL;
++          dm_deleting_md(md))
++              goto out;
 +
 +      ret = -EACCES;
 +      if (!vx_check(md->xid, VS_IDENT|VS_HOSTID))
 +
 +      ret = -EACCES;
 +      if (!vx_check(md->xid, VS_IDENT|VS_HOSTID))
@@ -1293,7 +1205,7 @@ diff -NurpP --minimal linux-4.4.116/drivers/md/dm.c linux-4.4.116-vs2.3.9.7/driv
  /*-----------------------------------------------------------------
   * CRUD START:
   *   A more elegant soln is in the works that uses the queue
  /*-----------------------------------------------------------------
   * CRUD START:
   *   A more elegant soln is in the works that uses the queue
-@@ -2380,6 +2393,7 @@ static struct mapped_device *alloc_dev(i
+@@ -2381,6 +2394,7 @@ static struct mapped_device *alloc_dev(i
        INIT_LIST_HEAD(&md->table_devices);
        spin_lock_init(&md->uevent_lock);
  
        INIT_LIST_HEAD(&md->table_devices);
        spin_lock_init(&md->uevent_lock);
  
@@ -1301,9 +1213,9 @@ diff -NurpP --minimal linux-4.4.116/drivers/md/dm.c linux-4.4.116-vs2.3.9.7/driv
        md->queue = blk_alloc_queue(GFP_KERNEL);
        if (!md->queue)
                goto bad;
        md->queue = blk_alloc_queue(GFP_KERNEL);
        if (!md->queue)
                goto bad;
-diff -NurpP --minimal linux-4.4.116/drivers/md/dm.h linux-4.4.116-vs2.3.9.7/drivers/md/dm.h
---- linux-4.4.116/drivers/md/dm.h      2016-07-05 04:12:06.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/drivers/md/dm.h    2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/drivers/md/dm.h linux-4.4.197-vs2.3.9.8/drivers/md/dm.h
+--- linux-4.4.197/drivers/md/dm.h      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/drivers/md/dm.h    2018-10-20 04:57:21.000000000 +0000
 @@ -52,6 +52,8 @@ struct dm_dev_internal {
  struct dm_table;
  struct dm_md_mempools;
 @@ -52,6 +52,8 @@ struct dm_dev_internal {
  struct dm_table;
  struct dm_md_mempools;
@@ -1313,9 +1225,97 @@ diff -NurpP --minimal linux-4.4.116/drivers/md/dm.h linux-4.4.116-vs2.3.9.7/driv
  /*-----------------------------------------------------------------
   * Internal table functions.
   *---------------------------------------------------------------*/
  /*-----------------------------------------------------------------
   * Internal table functions.
   *---------------------------------------------------------------*/
-diff -NurpP --minimal linux-4.4.116/drivers/net/tun.c linux-4.4.116-vs2.3.9.7/drivers/net/tun.c
---- linux-4.4.116/drivers/net/tun.c    2018-02-22 21:19:36.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/drivers/net/tun.c  2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/drivers/md/dm-ioctl.c linux-4.4.197-vs2.3.9.8/drivers/md/dm-ioctl.c
+--- linux-4.4.197/drivers/md/dm-ioctl.c        2019-10-22 12:33:59.539218184 +0000
++++ linux-4.4.197-vs2.3.9.8/drivers/md/dm-ioctl.c      2019-02-22 08:20:28.131053160 +0000
+@@ -16,6 +16,7 @@
+ #include <linux/dm-ioctl.h>
+ #include <linux/hdreg.h>
+ #include <linux/compat.h>
++#include <linux/vs_context.h>
+ #include <asm/uaccess.h>
+@@ -114,7 +115,8 @@ static struct hash_cell *__get_name_cell
+       unsigned int h = hash_str(str);
+       list_for_each_entry (hc, _name_buckets + h, name_list)
+-              if (!strcmp(hc->name, str)) {
++              if (vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT) &&
++                      !strcmp(hc->name, str)) {
+                       dm_get(hc->md);
+                       return hc;
+               }
+@@ -128,7 +130,8 @@ static struct hash_cell *__get_uuid_cell
+       unsigned int h = hash_str(str);
+       list_for_each_entry (hc, _uuid_buckets + h, uuid_list)
+-              if (!strcmp(hc->uuid, str)) {
++              if (vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT) &&
++                      !strcmp(hc->uuid, str)) {
+                       dm_get(hc->md);
+                       return hc;
+               }
+@@ -139,13 +142,15 @@ static struct hash_cell *__get_uuid_cell
+ static struct hash_cell *__get_dev_cell(uint64_t dev)
+ {
+       struct mapped_device *md;
+-      struct hash_cell *hc;
++      struct hash_cell *hc = NULL;
+       md = dm_get_md(huge_decode_dev(dev));
+       if (!md)
+               return NULL;
+-      hc = dm_get_mdptr(md);
++      if (vx_check(dm_get_xid(md), VS_WATCH_P | VS_IDENT))
++              hc = dm_get_mdptr(md);
++
+       if (!hc) {
+               dm_put(md);
+               return NULL;
+@@ -467,6 +472,9 @@ typedef int (*ioctl_fn)(struct dm_ioctl
+ static int remove_all(struct dm_ioctl *param, size_t param_size)
+ {
++      if (!vx_check(0, VS_ADMIN))
++              return -EPERM;
++
+       dm_hash_remove_all(true, !!(param->flags & DM_DEFERRED_REMOVE), false);
+       param->data_size = 0;
+       return 0;
+@@ -514,6 +522,8 @@ static int list_devices(struct dm_ioctl
+        */
+       for (i = 0; i < NUM_BUCKETS; i++) {
+               list_for_each_entry (hc, _name_buckets + i, name_list) {
++                      if (!vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT))
++                              continue;
+                       needed += sizeof(struct dm_name_list);
+                       needed += strlen(hc->name) + 1;
+                       needed += ALIGN_MASK;
+@@ -537,6 +547,8 @@ static int list_devices(struct dm_ioctl
+        */
+       for (i = 0; i < NUM_BUCKETS; i++) {
+               list_for_each_entry (hc, _name_buckets + i, name_list) {
++                      if (!vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT))
++                              continue;
+                       if (old_nl)
+                               old_nl->next = (uint32_t) ((void *) nl -
+                                                          (void *) old_nl);
+@@ -1795,8 +1807,8 @@ static int ctl_ioctl(uint command, struc
+       size_t input_param_size;
+       struct dm_ioctl param_kernel;
+-      /* only root can play with this */
+-      if (!capable(CAP_SYS_ADMIN))
++      /* only root and certain contexts can play with this */
++      if (!vx_capable(CAP_SYS_ADMIN, VXC_ADMIN_MAPPER))
+               return -EACCES;
+       if (_IOC_TYPE(command) != DM_IOCTL)
+diff -NurpP --minimal linux-4.4.197/drivers/net/tun.c linux-4.4.197-vs2.3.9.8/drivers/net/tun.c
+--- linux-4.4.197/drivers/net/tun.c    2019-10-22 12:34:11.439027933 +0000
++++ linux-4.4.197-vs2.3.9.8/drivers/net/tun.c  2019-10-05 14:35:25.262923426 +0000
 @@ -65,6 +65,7 @@
  #include <linux/nsproxy.h>
  #include <linux/virtio_net.h>
 @@ -65,6 +65,7 @@
  #include <linux/nsproxy.h>
  #include <linux/virtio_net.h>
@@ -1340,7 +1340,7 @@ diff -NurpP --minimal linux-4.4.116/drivers/net/tun.c linux-4.4.116-vs2.3.9.7/dr
  }
  
  static void tun_set_real_num_queues(struct tun_struct *tun)
  }
  
  static void tun_set_real_num_queues(struct tun_struct *tun)
-@@ -1463,6 +1466,7 @@ static void tun_setup(struct net_device
+@@ -1465,6 +1468,7 @@ static void tun_setup(struct net_device
  
        tun->owner = INVALID_UID;
        tun->group = INVALID_GID;
  
        tun->owner = INVALID_UID;
        tun->group = INVALID_GID;
@@ -1348,7 +1348,7 @@ diff -NurpP --minimal linux-4.4.116/drivers/net/tun.c linux-4.4.116-vs2.3.9.7/dr
  
        dev->ethtool_ops = &tun_ethtool_ops;
        dev->destructor = tun_free_netdev;
  
        dev->ethtool_ops = &tun_ethtool_ops;
        dev->destructor = tun_free_netdev;
-@@ -1657,7 +1661,7 @@ static int tun_set_iff(struct net *net,
+@@ -1661,7 +1665,7 @@ static int tun_set_iff(struct net *net,
                int queues = ifr->ifr_flags & IFF_MULTI_QUEUE ?
                             MAX_TAP_QUEUES : 1;
  
                int queues = ifr->ifr_flags & IFF_MULTI_QUEUE ?
                             MAX_TAP_QUEUES : 1;
  
@@ -1357,7 +1357,7 @@ diff -NurpP --minimal linux-4.4.116/drivers/net/tun.c linux-4.4.116-vs2.3.9.7/dr
                        return -EPERM;
                err = security_tun_dev_create();
                if (err < 0)
                        return -EPERM;
                err = security_tun_dev_create();
                if (err < 0)
-@@ -2010,6 +2014,16 @@ static long __tun_chr_ioctl(struct file
+@@ -2018,6 +2022,16 @@ static long __tun_chr_ioctl(struct file
                          from_kgid(&init_user_ns, tun->group));
                break;
  
                          from_kgid(&init_user_ns, tun->group));
                break;
  
@@ -1374,10 +1374,10 @@ diff -NurpP --minimal linux-4.4.116/drivers/net/tun.c linux-4.4.116-vs2.3.9.7/dr
        case TUNSETLINK:
                /* Only allow setting the type when the interface is down */
                if (tun->dev->flags & IFF_UP) {
        case TUNSETLINK:
                /* Only allow setting the type when the interface is down */
                if (tun->dev->flags & IFF_UP) {
-diff -NurpP --minimal linux-4.4.116/drivers/scsi/cxgbi/libcxgbi.c linux-4.4.116-vs2.3.9.7/drivers/scsi/cxgbi/libcxgbi.c
---- linux-4.4.116/drivers/scsi/cxgbi/libcxgbi.c        2015-10-29 09:21:24.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/drivers/scsi/cxgbi/libcxgbi.c      2018-01-09 16:36:24.000000000 +0000
-@@ -768,7 +768,8 @@ static struct cxgbi_sock *cxgbi_check_ro
+diff -NurpP --minimal linux-4.4.197/drivers/scsi/cxgbi/libcxgbi.c linux-4.4.197-vs2.3.9.8/drivers/scsi/cxgbi/libcxgbi.c
+--- linux-4.4.197/drivers/scsi/cxgbi/libcxgbi.c        2019-10-22 12:34:17.668928331 +0000
++++ linux-4.4.197-vs2.3.9.8/drivers/scsi/cxgbi/libcxgbi.c      2019-10-05 14:35:27.572886782 +0000
+@@ -772,7 +772,8 @@ static struct cxgbi_sock *cxgbi_check_ro
                struct inet6_dev *idev = ip6_dst_idev((struct dst_entry *)rt);
  
                err = ipv6_dev_get_saddr(&init_net, idev ? idev->dev : NULL,
                struct inet6_dev *idev = ip6_dst_idev((struct dst_entry *)rt);
  
                err = ipv6_dev_get_saddr(&init_net, idev ? idev->dev : NULL,
@@ -1387,9 +1387,9 @@ diff -NurpP --minimal linux-4.4.116/drivers/scsi/cxgbi/libcxgbi.c linux-4.4.116-
                if (err) {
                        pr_info("failed to get source address to reach %pI6\n",
                                &daddr6->sin6_addr);
                if (err) {
                        pr_info("failed to get source address to reach %pI6\n",
                                &daddr6->sin6_addr);
-diff -NurpP --minimal linux-4.4.116/drivers/tty/sysrq.c linux-4.4.116-vs2.3.9.7/drivers/tty/sysrq.c
---- linux-4.4.116/drivers/tty/sysrq.c  2018-02-22 21:19:46.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/drivers/tty/sysrq.c        2018-01-25 00:25:02.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/drivers/tty/sysrq.c linux-4.4.197-vs2.3.9.8/drivers/tty/sysrq.c
+--- linux-4.4.197/drivers/tty/sysrq.c  2019-10-22 12:34:22.888844914 +0000
++++ linux-4.4.197-vs2.3.9.8/drivers/tty/sysrq.c        2018-10-20 04:57:21.000000000 +0000
 @@ -47,6 +47,7 @@
  #include <linux/syscalls.h>
  #include <linux/of.h>
 @@ -47,6 +47,7 @@
  #include <linux/syscalls.h>
  #include <linux/of.h>
@@ -1441,9 +1441,9 @@ diff -NurpP --minimal linux-4.4.116/drivers/tty/sysrq.c linux-4.4.116-vs2.3.9.7/
        else
                retval = -1;
        return retval;
        else
                retval = -1;
        return retval;
-diff -NurpP --minimal linux-4.4.116/drivers/tty/tty_io.c linux-4.4.116-vs2.3.9.7/drivers/tty/tty_io.c
---- linux-4.4.116/drivers/tty/tty_io.c 2018-02-22 21:19:46.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/drivers/tty/tty_io.c       2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/drivers/tty/tty_io.c linux-4.4.197-vs2.3.9.8/drivers/tty/tty_io.c
+--- linux-4.4.197/drivers/tty/tty_io.c 2019-10-22 12:34:22.888844914 +0000
++++ linux-4.4.197-vs2.3.9.8/drivers/tty/tty_io.c       2019-10-05 14:35:30.532839829 +0000
 @@ -104,6 +104,7 @@
  
  #include <linux/kmod.h>
 @@ -104,6 +104,7 @@
  
  #include <linux/kmod.h>
@@ -1452,7 +1452,7 @@ diff -NurpP --minimal linux-4.4.116/drivers/tty/tty_io.c linux-4.4.116-vs2.3.9.7
  
  #undef TTY_DEBUG_HANGUP
  #ifdef TTY_DEBUG_HANGUP
  
  #undef TTY_DEBUG_HANGUP
  #ifdef TTY_DEBUG_HANGUP
-@@ -2280,7 +2281,8 @@ static int tiocsti(struct tty_struct *tt
+@@ -2293,7 +2294,8 @@ static int tiocsti(struct tty_struct *tt
        char ch, mbz = 0;
        struct tty_ldisc *ld;
  
        char ch, mbz = 0;
        struct tty_ldisc *ld;
  
@@ -1462,7 +1462,7 @@ diff -NurpP --minimal linux-4.4.116/drivers/tty/tty_io.c linux-4.4.116-vs2.3.9.7
                return -EPERM;
        if (get_user(ch, p))
                return -EFAULT;
                return -EPERM;
        if (get_user(ch, p))
                return -EFAULT;
-@@ -2593,6 +2595,7 @@ static int tiocspgrp(struct tty_struct *
+@@ -2607,6 +2609,7 @@ static int tiocspgrp(struct tty_struct *
                return -ENOTTY;
        if (get_user(pgrp_nr, p))
                return -EFAULT;
                return -ENOTTY;
        if (get_user(pgrp_nr, p))
                return -EFAULT;
@@ -1470,9 +1470,9 @@ diff -NurpP --minimal linux-4.4.116/drivers/tty/tty_io.c linux-4.4.116-vs2.3.9.7
        if (pgrp_nr < 0)
                return -EINVAL;
        rcu_read_lock();
        if (pgrp_nr < 0)
                return -EINVAL;
        rcu_read_lock();
-diff -NurpP --minimal linux-4.4.116/fs/attr.c linux-4.4.116-vs2.3.9.7/fs/attr.c
---- linux-4.4.116/fs/attr.c    2018-02-22 21:19:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/attr.c  2018-01-09 17:27:12.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/attr.c linux-4.4.197-vs2.3.9.8/fs/attr.c
+--- linux-4.4.197/fs/attr.c    2019-10-22 12:34:30.078730021 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/attr.c  2018-10-20 04:57:21.000000000 +0000
 @@ -15,6 +15,9 @@
  #include <linux/security.h>
  #include <linux/evm.h>
 @@ -15,6 +15,9 @@
  #include <linux/security.h>
  #include <linux/evm.h>
@@ -1513,9 +1513,9 @@ diff -NurpP --minimal linux-4.4.116/fs/attr.c linux-4.4.116-vs2.3.9.7/fs/attr.c
                if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
                        return -EPERM;
        }
                if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
                        return -EPERM;
        }
-diff -NurpP --minimal linux-4.4.116/fs/block_dev.c linux-4.4.116-vs2.3.9.7/fs/block_dev.c
---- linux-4.4.116/fs/block_dev.c       2018-02-22 21:19:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/block_dev.c     2018-01-09 17:16:29.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/block_dev.c linux-4.4.197-vs2.3.9.8/fs/block_dev.c
+--- linux-4.4.197/fs/block_dev.c       2019-10-22 12:34:30.558722354 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/block_dev.c     2018-10-20 04:57:21.000000000 +0000
 @@ -29,6 +29,7 @@
  #include <linux/log2.h>
  #include <linux/cleancache.h>
 @@ -29,6 +29,7 @@
  #include <linux/log2.h>
  #include <linux/cleancache.h>
@@ -1553,10 +1553,10 @@ diff -NurpP --minimal linux-4.4.116/fs/block_dev.c linux-4.4.116-vs2.3.9.7/fs/bl
        if (bdev) {
                spin_lock(&bdev_lock);
                if (!inode->i_bdev) {
        if (bdev) {
                spin_lock(&bdev_lock);
                if (!inode->i_bdev) {
-diff -NurpP --minimal linux-4.4.116/fs/btrfs/ctree.h linux-4.4.116-vs2.3.9.7/fs/btrfs/ctree.h
---- linux-4.4.116/fs/btrfs/ctree.h     2018-02-22 21:19:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/btrfs/ctree.h   2018-01-09 16:36:24.000000000 +0000
-@@ -731,11 +731,14 @@ struct btrfs_inode_item {
+diff -NurpP --minimal linux-4.4.197/fs/btrfs/ctree.h linux-4.4.197-vs2.3.9.8/fs/btrfs/ctree.h
+--- linux-4.4.197/fs/btrfs/ctree.h     2019-10-22 12:34:30.658720753 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/btrfs/ctree.h   2019-02-22 08:20:32.700975524 +0000
+@@ -732,11 +732,14 @@ struct btrfs_inode_item {
        /* modification sequence number for NFS */
        __le64 sequence;
  
        /* modification sequence number for NFS */
        __le64 sequence;
  
@@ -1572,7 +1572,7 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/ctree.h linux-4.4.116-vs2.3.9.7/fs/
        struct btrfs_timespec atime;
        struct btrfs_timespec ctime;
        struct btrfs_timespec mtime;
        struct btrfs_timespec atime;
        struct btrfs_timespec ctime;
        struct btrfs_timespec mtime;
-@@ -2189,6 +2192,8 @@ struct btrfs_ioctl_defrag_range_args {
+@@ -2191,6 +2194,8 @@ struct btrfs_ioctl_defrag_range_args {
  #define BTRFS_DEFAULT_COMMIT_INTERVAL (30)
  #define BTRFS_DEFAULT_MAX_INLINE      (8192)
  
  #define BTRFS_DEFAULT_COMMIT_INTERVAL (30)
  #define BTRFS_DEFAULT_MAX_INLINE      (8192)
  
@@ -1581,7 +1581,7 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/ctree.h linux-4.4.116-vs2.3.9.7/fs/
  #define btrfs_clear_opt(o, opt)               ((o) &= ~BTRFS_MOUNT_##opt)
  #define btrfs_set_opt(o, opt)         ((o) |= BTRFS_MOUNT_##opt)
  #define btrfs_raw_test_opt(o, opt)    ((o) & BTRFS_MOUNT_##opt)
  #define btrfs_clear_opt(o, opt)               ((o) &= ~BTRFS_MOUNT_##opt)
  #define btrfs_set_opt(o, opt)         ((o) |= BTRFS_MOUNT_##opt)
  #define btrfs_raw_test_opt(o, opt)    ((o) & BTRFS_MOUNT_##opt)
-@@ -2528,6 +2533,7 @@ BTRFS_SETGET_FUNCS(inode_block_group, st
+@@ -2533,6 +2538,7 @@ BTRFS_SETGET_FUNCS(inode_block_group, st
  BTRFS_SETGET_FUNCS(inode_nlink, struct btrfs_inode_item, nlink, 32);
  BTRFS_SETGET_FUNCS(inode_uid, struct btrfs_inode_item, uid, 32);
  BTRFS_SETGET_FUNCS(inode_gid, struct btrfs_inode_item, gid, 32);
  BTRFS_SETGET_FUNCS(inode_nlink, struct btrfs_inode_item, nlink, 32);
  BTRFS_SETGET_FUNCS(inode_uid, struct btrfs_inode_item, uid, 32);
  BTRFS_SETGET_FUNCS(inode_gid, struct btrfs_inode_item, gid, 32);
@@ -1589,7 +1589,7 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/ctree.h linux-4.4.116-vs2.3.9.7/fs/
  BTRFS_SETGET_FUNCS(inode_mode, struct btrfs_inode_item, mode, 32);
  BTRFS_SETGET_FUNCS(inode_rdev, struct btrfs_inode_item, rdev, 64);
  BTRFS_SETGET_FUNCS(inode_flags, struct btrfs_inode_item, flags, 64);
  BTRFS_SETGET_FUNCS(inode_mode, struct btrfs_inode_item, mode, 32);
  BTRFS_SETGET_FUNCS(inode_rdev, struct btrfs_inode_item, rdev, 64);
  BTRFS_SETGET_FUNCS(inode_flags, struct btrfs_inode_item, flags, 64);
-@@ -2575,6 +2581,10 @@ BTRFS_SETGET_FUNCS(extent_flags, struct
+@@ -2580,6 +2586,10 @@ BTRFS_SETGET_FUNCS(extent_flags, struct
  
  BTRFS_SETGET_FUNCS(extent_refs_v0, struct btrfs_extent_item_v0, refs, 32);
  
  
  BTRFS_SETGET_FUNCS(extent_refs_v0, struct btrfs_extent_item_v0, refs, 32);
  
@@ -1600,7 +1600,7 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/ctree.h linux-4.4.116-vs2.3.9.7/fs/
  
  BTRFS_SETGET_FUNCS(tree_block_level, struct btrfs_tree_block_info, level, 8);
  
  
  BTRFS_SETGET_FUNCS(tree_block_level, struct btrfs_tree_block_info, level, 8);
  
-@@ -4022,6 +4032,7 @@ long btrfs_ioctl(struct file *file, unsi
+@@ -4043,6 +4053,7 @@ long btrfs_ioctl(struct file *file, unsi
  void btrfs_update_iflags(struct inode *inode);
  void btrfs_inherit_iflags(struct inode *inode, struct inode *dir);
  int btrfs_is_empty_uuid(u8 *uuid);
  void btrfs_update_iflags(struct inode *inode);
  void btrfs_inherit_iflags(struct inode *inode, struct inode *dir);
  int btrfs_is_empty_uuid(u8 *uuid);
@@ -1608,10 +1608,10 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/ctree.h linux-4.4.116-vs2.3.9.7/fs/
  int btrfs_defrag_file(struct inode *inode, struct file *file,
                      struct btrfs_ioctl_defrag_range_args *range,
                      u64 newer_than, unsigned long max_pages);
  int btrfs_defrag_file(struct inode *inode, struct file *file,
                      struct btrfs_ioctl_defrag_range_args *range,
                      u64 newer_than, unsigned long max_pages);
-diff -NurpP --minimal linux-4.4.116/fs/btrfs/disk-io.c linux-4.4.116-vs2.3.9.7/fs/btrfs/disk-io.c
---- linux-4.4.116/fs/btrfs/disk-io.c   2018-02-22 21:19:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/btrfs/disk-io.c 2018-01-09 16:36:24.000000000 +0000
-@@ -2736,6 +2736,9 @@ int open_ctree(struct super_block *sb,
+diff -NurpP --minimal linux-4.4.197/fs/btrfs/disk-io.c linux-4.4.197-vs2.3.9.8/fs/btrfs/disk-io.c
+--- linux-4.4.197/fs/btrfs/disk-io.c   2019-10-22 12:34:30.668720596 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/btrfs/disk-io.c 2019-02-22 08:20:32.700975524 +0000
+@@ -2667,6 +2667,9 @@ int open_ctree(struct super_block *sb,
                goto fail_alloc;
        }
  
                goto fail_alloc;
        }
  
@@ -1621,9 +1621,9 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/disk-io.c linux-4.4.116-vs2.3.9.7/f
        features = btrfs_super_incompat_flags(disk_super) &
                ~BTRFS_FEATURE_INCOMPAT_SUPP;
        if (features) {
        features = btrfs_super_incompat_flags(disk_super) &
                ~BTRFS_FEATURE_INCOMPAT_SUPP;
        if (features) {
-diff -NurpP --minimal linux-4.4.116/fs/btrfs/inode.c linux-4.4.116-vs2.3.9.7/fs/btrfs/inode.c
---- linux-4.4.116/fs/btrfs/inode.c     2018-02-22 21:19:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/btrfs/inode.c   2018-02-22 21:30:19.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/btrfs/inode.c linux-4.4.197-vs2.3.9.8/fs/btrfs/inode.c
+--- linux-4.4.197/fs/btrfs/inode.c     2019-10-22 12:34:30.728719635 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/btrfs/inode.c   2019-02-22 08:20:32.720975184 +0000
 @@ -43,6 +43,7 @@
  #include <linux/blkdev.h>
  #include <linux/posix_acl_xattr.h>
 @@ -43,6 +43,7 @@
  #include <linux/blkdev.h>
  #include <linux/posix_acl_xattr.h>
@@ -1632,7 +1632,7 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/inode.c linux-4.4.116-vs2.3.9.7/fs/
  #include "ctree.h"
  #include "disk-io.h"
  #include "transaction.h"
  #include "ctree.h"
  #include "disk-io.h"
  #include "transaction.h"
-@@ -3619,6 +3620,9 @@ static void btrfs_read_locked_inode(stru
+@@ -3650,6 +3651,9 @@ static void btrfs_read_locked_inode(stru
        unsigned long ptr;
        int maybe_acls;
        u32 rdev;
        unsigned long ptr;
        int maybe_acls;
        u32 rdev;
@@ -1642,7 +1642,7 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/inode.c linux-4.4.116-vs2.3.9.7/fs/
        int ret;
        bool filled = false;
        int first_xattr_slot;
        int ret;
        bool filled = false;
        int first_xattr_slot;
-@@ -3646,8 +3650,14 @@ static void btrfs_read_locked_inode(stru
+@@ -3677,8 +3681,14 @@ static void btrfs_read_locked_inode(stru
                                    struct btrfs_inode_item);
        inode->i_mode = btrfs_inode_mode(leaf, inode_item);
        set_nlink(inode, btrfs_inode_nlink(leaf, inode_item));
                                    struct btrfs_inode_item);
        inode->i_mode = btrfs_inode_mode(leaf, inode_item);
        set_nlink(inode, btrfs_inode_nlink(leaf, inode_item));
@@ -1659,7 +1659,7 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/inode.c linux-4.4.116-vs2.3.9.7/fs/
        btrfs_i_size_write(inode, btrfs_inode_size(leaf, inode_item));
  
        inode->i_atime.tv_sec = btrfs_timespec_sec(leaf, &inode_item->atime);
        btrfs_i_size_write(inode, btrfs_inode_size(leaf, inode_item));
  
        inode->i_atime.tv_sec = btrfs_timespec_sec(leaf, &inode_item->atime);
-@@ -3803,11 +3813,18 @@ static void fill_inode_item(struct btrfs
+@@ -3834,11 +3844,18 @@ static void fill_inode_item(struct btrfs
                            struct inode *inode)
  {
        struct btrfs_map_token token;
                            struct inode *inode)
  {
        struct btrfs_map_token token;
@@ -1680,7 +1680,7 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/inode.c linux-4.4.116-vs2.3.9.7/fs/
        btrfs_set_token_inode_size(leaf, item, BTRFS_I(inode)->disk_i_size,
                                   &token);
        btrfs_set_token_inode_mode(leaf, item, inode->i_mode, &token);
        btrfs_set_token_inode_size(leaf, item, BTRFS_I(inode)->disk_i_size,
                                   &token);
        btrfs_set_token_inode_mode(leaf, item, inode->i_mode, &token);
-@@ -10070,6 +10087,7 @@ static const struct inode_operations btr
+@@ -10093,6 +10110,7 @@ static const struct inode_operations btr
        .listxattr      = btrfs_listxattr,
        .removexattr    = btrfs_removexattr,
        .permission     = btrfs_permission,
        .listxattr      = btrfs_listxattr,
        .removexattr    = btrfs_removexattr,
        .permission     = btrfs_permission,
@@ -1688,7 +1688,7 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/inode.c linux-4.4.116-vs2.3.9.7/fs/
        .get_acl        = btrfs_get_acl,
        .set_acl        = btrfs_set_acl,
        .update_time    = btrfs_update_time,
        .get_acl        = btrfs_get_acl,
        .set_acl        = btrfs_set_acl,
        .update_time    = btrfs_update_time,
-@@ -10078,6 +10096,7 @@ static const struct inode_operations btr
+@@ -10101,6 +10119,7 @@ static const struct inode_operations btr
  static const struct inode_operations btrfs_dir_ro_inode_operations = {
        .lookup         = btrfs_lookup,
        .permission     = btrfs_permission,
  static const struct inode_operations btrfs_dir_ro_inode_operations = {
        .lookup         = btrfs_lookup,
        .permission     = btrfs_permission,
@@ -1696,7 +1696,7 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/inode.c linux-4.4.116-vs2.3.9.7/fs/
        .get_acl        = btrfs_get_acl,
        .set_acl        = btrfs_set_acl,
        .update_time    = btrfs_update_time,
        .get_acl        = btrfs_get_acl,
        .set_acl        = btrfs_set_acl,
        .update_time    = btrfs_update_time,
-@@ -10148,6 +10167,7 @@ static const struct inode_operations btr
+@@ -10171,6 +10190,7 @@ static const struct inode_operations btr
        .removexattr    = btrfs_removexattr,
        .permission     = btrfs_permission,
        .fiemap         = btrfs_fiemap,
        .removexattr    = btrfs_removexattr,
        .permission     = btrfs_permission,
        .fiemap         = btrfs_fiemap,
@@ -1704,9 +1704,9 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/inode.c linux-4.4.116-vs2.3.9.7/fs/
        .get_acl        = btrfs_get_acl,
        .set_acl        = btrfs_set_acl,
        .update_time    = btrfs_update_time,
        .get_acl        = btrfs_get_acl,
        .set_acl        = btrfs_set_acl,
        .update_time    = btrfs_update_time,
-diff -NurpP --minimal linux-4.4.116/fs/btrfs/ioctl.c linux-4.4.116-vs2.3.9.7/fs/btrfs/ioctl.c
---- linux-4.4.116/fs/btrfs/ioctl.c     2018-02-22 21:19:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/btrfs/ioctl.c   2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/btrfs/ioctl.c linux-4.4.197-vs2.3.9.8/fs/btrfs/ioctl.c
+--- linux-4.4.197/fs/btrfs/ioctl.c     2019-10-22 12:34:30.728719635 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/btrfs/ioctl.c   2019-02-22 08:20:32.720975184 +0000
 @@ -108,10 +108,13 @@ static unsigned int btrfs_flags_to_ioctl
  {
        unsigned int iflags = 0;
 @@ -108,10 +108,13 @@ static unsigned int btrfs_flags_to_ioctl
  {
        unsigned int iflags = 0;
@@ -1885,9 +1885,9 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/ioctl.c linux-4.4.116-vs2.3.9.7/fs/
        if (flags & FS_APPEND_FL)
                ip->flags |= BTRFS_INODE_APPEND;
        else
        if (flags & FS_APPEND_FL)
                ip->flags |= BTRFS_INODE_APPEND;
        else
-diff -NurpP --minimal linux-4.4.116/fs/btrfs/super.c linux-4.4.116-vs2.3.9.7/fs/btrfs/super.c
---- linux-4.4.116/fs/btrfs/super.c     2018-02-22 21:19:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/btrfs/super.c   2018-01-09 17:25:27.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/btrfs/super.c linux-4.4.197-vs2.3.9.8/fs/btrfs/super.c
+--- linux-4.4.197/fs/btrfs/super.c     2019-10-22 12:34:30.738719477 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/btrfs/super.c   2019-02-22 08:20:32.730975015 +0000
 @@ -306,7 +306,7 @@ enum {
  #ifdef CONFIG_BTRFS_DEBUG
        Opt_fragment_data, Opt_fragment_metadata, Opt_fragment_all,
 @@ -306,7 +306,7 @@ enum {
  #ifdef CONFIG_BTRFS_DEBUG
        Opt_fragment_data, Opt_fragment_metadata, Opt_fragment_all,
@@ -1943,9 +1943,9 @@ diff -NurpP --minimal linux-4.4.116/fs/btrfs/super.c linux-4.4.116-vs2.3.9.7/fs/
        if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
                goto out;
  
        if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
                goto out;
  
-diff -NurpP --minimal linux-4.4.116/fs/char_dev.c linux-4.4.116-vs2.3.9.7/fs/char_dev.c
---- linux-4.4.116/fs/char_dev.c        2016-07-05 04:12:30.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/char_dev.c      2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/char_dev.c linux-4.4.197-vs2.3.9.8/fs/char_dev.c
+--- linux-4.4.197/fs/char_dev.c        2019-10-22 12:34:30.948716122 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/char_dev.c      2019-10-05 14:35:32.892802392 +0000
 @@ -21,6 +21,8 @@
  #include <linux/mutex.h>
  #include <linux/backing-dev.h>
 @@ -21,6 +21,8 @@
  #include <linux/mutex.h>
  #include <linux/backing-dev.h>
@@ -1955,7 +1955,7 @@ diff -NurpP --minimal linux-4.4.116/fs/char_dev.c linux-4.4.116-vs2.3.9.7/fs/cha
  
  #include "internal.h"
  
  
  #include "internal.h"
  
-@@ -350,14 +352,21 @@ static int chrdev_open(struct inode *ino
+@@ -356,14 +358,21 @@ static int chrdev_open(struct inode *ino
        struct cdev *p;
        struct cdev *new = NULL;
        int ret = 0;
        struct cdev *p;
        struct cdev *new = NULL;
        int ret = 0;
@@ -1978,9 +1978,9 @@ diff -NurpP --minimal linux-4.4.116/fs/char_dev.c linux-4.4.116-vs2.3.9.7/fs/cha
                if (!kobj)
                        return -ENXIO;
                new = container_of(kobj, struct cdev, kobj);
                if (!kobj)
                        return -ENXIO;
                new = container_of(kobj, struct cdev, kobj);
-diff -NurpP --minimal linux-4.4.116/fs/dcache.c linux-4.4.116-vs2.3.9.7/fs/dcache.c
---- linux-4.4.116/fs/dcache.c  2018-02-22 21:19:51.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/dcache.c        2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/dcache.c linux-4.4.197-vs2.3.9.8/fs/dcache.c
+--- linux-4.4.197/fs/dcache.c  2019-10-22 12:34:31.358709568 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/dcache.c        2019-10-05 14:35:33.302795887 +0000
 @@ -39,6 +39,7 @@
  #include <linux/ratelimit.h>
  #include <linux/list_lru.h>
 @@ -39,6 +39,7 @@
  #include <linux/ratelimit.h>
  #include <linux/list_lru.h>
@@ -1989,7 +1989,7 @@ diff -NurpP --minimal linux-4.4.116/fs/dcache.c linux-4.4.116-vs2.3.9.7/fs/dcach
  
  #include "internal.h"
  #include "mount.h"
  
  #include "internal.h"
  #include "mount.h"
-@@ -677,6 +678,7 @@ static inline bool fast_dput(struct dent
+@@ -683,6 +684,7 @@ static inline bool fast_dput(struct dent
                spin_lock(&dentry->d_lock);
                if (dentry->d_lockref.count > 1) {
                        dentry->d_lockref.count--;
                spin_lock(&dentry->d_lock);
                if (dentry->d_lockref.count > 1) {
                        dentry->d_lockref.count--;
@@ -1997,7 +1997,7 @@ diff -NurpP --minimal linux-4.4.116/fs/dcache.c linux-4.4.116-vs2.3.9.7/fs/dcach
                        spin_unlock(&dentry->d_lock);
                        return 1;
                }
                        spin_unlock(&dentry->d_lock);
                        return 1;
                }
-@@ -806,6 +808,7 @@ repeat:
+@@ -812,6 +814,7 @@ repeat:
        dentry_lru_add(dentry);
  
        dentry->d_lockref.count--;
        dentry_lru_add(dentry);
  
        dentry->d_lockref.count--;
@@ -2005,7 +2005,7 @@ diff -NurpP --minimal linux-4.4.116/fs/dcache.c linux-4.4.116-vs2.3.9.7/fs/dcach
        spin_unlock(&dentry->d_lock);
        return;
  
        spin_unlock(&dentry->d_lock);
        return;
  
-@@ -823,6 +826,7 @@ EXPORT_SYMBOL(dput);
+@@ -829,6 +832,7 @@ EXPORT_SYMBOL(dput);
  static inline void __dget_dlock(struct dentry *dentry)
  {
        dentry->d_lockref.count++;
  static inline void __dget_dlock(struct dentry *dentry)
  {
        dentry->d_lockref.count++;
@@ -2013,7 +2013,7 @@ diff -NurpP --minimal linux-4.4.116/fs/dcache.c linux-4.4.116-vs2.3.9.7/fs/dcach
  }
  
  static inline void __dget(struct dentry *dentry)
  }
  
  static inline void __dget(struct dentry *dentry)
-@@ -835,6 +839,8 @@ struct dentry *dget_parent(struct dentry
+@@ -841,6 +845,8 @@ struct dentry *dget_parent(struct dentry
        int gotref;
        struct dentry *ret;
  
        int gotref;
        struct dentry *ret;
  
@@ -2022,7 +2022,7 @@ diff -NurpP --minimal linux-4.4.116/fs/dcache.c linux-4.4.116-vs2.3.9.7/fs/dcach
        /*
         * Do optimistic parent lookup without any
         * locking.
        /*
         * Do optimistic parent lookup without any
         * locking.
-@@ -865,6 +871,7 @@ repeat:
+@@ -871,6 +877,7 @@ repeat:
        rcu_read_unlock();
        BUG_ON(!ret->d_lockref.count);
        ret->d_lockref.count++;
        rcu_read_unlock();
        BUG_ON(!ret->d_lockref.count);
        ret->d_lockref.count++;
@@ -2030,7 +2030,7 @@ diff -NurpP --minimal linux-4.4.116/fs/dcache.c linux-4.4.116-vs2.3.9.7/fs/dcach
        spin_unlock(&ret->d_lock);
        return ret;
  }
        spin_unlock(&ret->d_lock);
        return ret;
  }
-@@ -1019,6 +1026,7 @@ static void shrink_dentry_list(struct li
+@@ -1025,6 +1032,7 @@ static void shrink_dentry_list(struct li
                        parent = lock_parent(dentry);
                        if (dentry->d_lockref.count != 1) {
                                dentry->d_lockref.count--;
                        parent = lock_parent(dentry);
                        if (dentry->d_lockref.count != 1) {
                                dentry->d_lockref.count--;
@@ -2056,7 +2056,7 @@ diff -NurpP --minimal linux-4.4.116/fs/dcache.c linux-4.4.116-vs2.3.9.7/fs/dcach
        spin_lock_init(&dentry->d_lock);
        seqcount_init(&dentry->d_seq);
        dentry->d_inode = NULL;
        spin_lock_init(&dentry->d_lock);
        seqcount_init(&dentry->d_seq);
        dentry->d_inode = NULL;
-@@ -2355,6 +2367,7 @@ struct dentry *__d_lookup(const struct d
+@@ -2379,6 +2391,7 @@ struct dentry *__d_lookup(const struct d
                }
  
                dentry->d_lockref.count++;
                }
  
                dentry->d_lockref.count++;
@@ -2064,7 +2064,7 @@ diff -NurpP --minimal linux-4.4.116/fs/dcache.c linux-4.4.116-vs2.3.9.7/fs/dcach
                found = dentry;
                spin_unlock(&dentry->d_lock);
                break;
                found = dentry;
                spin_unlock(&dentry->d_lock);
                break;
-@@ -3371,6 +3384,7 @@ static enum d_walk_ret d_genocide_kill(v
+@@ -3395,6 +3408,7 @@ static enum d_walk_ret d_genocide_kill(v
                if (!(dentry->d_flags & DCACHE_GENOCIDE)) {
                        dentry->d_flags |= DCACHE_GENOCIDE;
                        dentry->d_lockref.count--;
                if (!(dentry->d_flags & DCACHE_GENOCIDE)) {
                        dentry->d_flags |= DCACHE_GENOCIDE;
                        dentry->d_lockref.count--;
@@ -2072,9 +2072,9 @@ diff -NurpP --minimal linux-4.4.116/fs/dcache.c linux-4.4.116-vs2.3.9.7/fs/dcach
                }
        }
        return D_WALK_CONTINUE;
                }
        }
        return D_WALK_CONTINUE;
-diff -NurpP --minimal linux-4.4.116/fs/devpts/inode.c linux-4.4.116-vs2.3.9.7/fs/devpts/inode.c
---- linux-4.4.116/fs/devpts/inode.c    2018-02-22 21:19:51.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/devpts/inode.c  2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/devpts/inode.c linux-4.4.197-vs2.3.9.8/fs/devpts/inode.c
+--- linux-4.4.197/fs/devpts/inode.c    2019-10-22 12:34:31.418708612 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/devpts/inode.c  2018-10-20 04:57:21.000000000 +0000
 @@ -27,6 +27,7 @@
  #include <linux/parser.h>
  #include <linux/fsnotify.h>
 @@ -27,6 +27,7 @@
  #include <linux/parser.h>
  #include <linux/fsnotify.h>
@@ -2162,9 +2162,9 @@ diff -NurpP --minimal linux-4.4.116/fs/devpts/inode.c linux-4.4.116-vs2.3.9.7/fs
        inode->i_private = priv;
  
        sprintf(s, "%d", index);
        inode->i_private = priv;
  
        sprintf(s, "%d", index);
-diff -NurpP --minimal linux-4.4.116/fs/ext2/balloc.c linux-4.4.116-vs2.3.9.7/fs/ext2/balloc.c
---- linux-4.4.116/fs/ext2/balloc.c     2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext2/balloc.c   2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ext2/balloc.c linux-4.4.197-vs2.3.9.8/fs/ext2/balloc.c
+--- linux-4.4.197/fs/ext2/balloc.c     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext2/balloc.c   2018-10-20 04:57:21.000000000 +0000
 @@ -693,7 +693,6 @@ ext2_try_to_allocate(struct super_block
                        start = 0;
                end = EXT2_BLOCKS_PER_GROUP(sb);
 @@ -693,7 +693,6 @@ ext2_try_to_allocate(struct super_block
                        start = 0;
                end = EXT2_BLOCKS_PER_GROUP(sb);
@@ -2173,9 +2173,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/balloc.c linux-4.4.116-vs2.3.9.7/fs/
        BUG_ON(start > EXT2_BLOCKS_PER_GROUP(sb));
  
  repeat:
        BUG_ON(start > EXT2_BLOCKS_PER_GROUP(sb));
  
  repeat:
-diff -NurpP --minimal linux-4.4.116/fs/ext2/ext2.h linux-4.4.116-vs2.3.9.7/fs/ext2/ext2.h
---- linux-4.4.116/fs/ext2/ext2.h       2016-07-05 04:15:07.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext2/ext2.h     2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ext2/ext2.h linux-4.4.197-vs2.3.9.8/fs/ext2/ext2.h
+--- linux-4.4.197/fs/ext2/ext2.h       2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext2/ext2.h     2018-10-20 04:57:21.000000000 +0000
 @@ -244,8 +244,12 @@ struct ext2_group_desc
  #define EXT2_NOTAIL_FL                        FS_NOTAIL_FL    /* file tail should not be merged */
  #define EXT2_DIRSYNC_FL                       FS_DIRSYNC_FL   /* dirsync behaviour (directories only) */
 @@ -244,8 +244,12 @@ struct ext2_group_desc
  #define EXT2_NOTAIL_FL                        FS_NOTAIL_FL    /* file tail should not be merged */
  #define EXT2_DIRSYNC_FL                       FS_DIRSYNC_FL   /* dirsync behaviour (directories only) */
@@ -2223,18 +2223,18 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/ext2.h linux-4.4.116-vs2.3.9.7/fs/ex
  
  /* ioctl.c */
  extern long ext2_ioctl(struct file *, unsigned int, unsigned long);
  
  /* ioctl.c */
  extern long ext2_ioctl(struct file *, unsigned int, unsigned long);
-diff -NurpP --minimal linux-4.4.116/fs/ext2/file.c linux-4.4.116-vs2.3.9.7/fs/ext2/file.c
---- linux-4.4.116/fs/ext2/file.c       2016-07-05 04:15:07.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext2/file.c     2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ext2/file.c linux-4.4.197-vs2.3.9.8/fs/ext2/file.c
+--- linux-4.4.197/fs/ext2/file.c       2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext2/file.c     2018-10-20 04:57:21.000000000 +0000
 @@ -202,4 +202,5 @@ const struct inode_operations ext2_file_
        .get_acl        = ext2_get_acl,
        .set_acl        = ext2_set_acl,
        .fiemap         = ext2_fiemap,
 +      .sync_flags     = ext2_sync_flags,
  };
 @@ -202,4 +202,5 @@ const struct inode_operations ext2_file_
        .get_acl        = ext2_get_acl,
        .set_acl        = ext2_set_acl,
        .fiemap         = ext2_fiemap,
 +      .sync_flags     = ext2_sync_flags,
  };
-diff -NurpP --minimal linux-4.4.116/fs/ext2/ialloc.c linux-4.4.116-vs2.3.9.7/fs/ext2/ialloc.c
---- linux-4.4.116/fs/ext2/ialloc.c     2016-07-05 04:12:30.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext2/ialloc.c   2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ext2/ialloc.c linux-4.4.197-vs2.3.9.8/fs/ext2/ialloc.c
+--- linux-4.4.197/fs/ext2/ialloc.c     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext2/ialloc.c   2018-10-20 04:57:21.000000000 +0000
 @@ -17,6 +17,7 @@
  #include <linux/backing-dev.h>
  #include <linux/buffer_head.h>
 @@ -17,6 +17,7 @@
  #include <linux/backing-dev.h>
  #include <linux/buffer_head.h>
@@ -2251,9 +2251,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/ialloc.c linux-4.4.116-vs2.3.9.7/fs/
        } else
                inode_init_owner(inode, dir, mode);
  
        } else
                inode_init_owner(inode, dir, mode);
  
-diff -NurpP --minimal linux-4.4.116/fs/ext2/inode.c linux-4.4.116-vs2.3.9.7/fs/ext2/inode.c
---- linux-4.4.116/fs/ext2/inode.c      2016-07-05 04:15:07.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext2/inode.c    2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ext2/inode.c linux-4.4.197-vs2.3.9.8/fs/ext2/inode.c
+--- linux-4.4.197/fs/ext2/inode.c      2019-10-22 12:34:31.748703336 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext2/inode.c    2018-10-20 04:57:21.000000000 +0000
 @@ -33,6 +33,7 @@
  #include <linux/fiemap.h>
  #include <linux/namei.h>
 @@ -33,6 +33,7 @@
  #include <linux/fiemap.h>
  #include <linux/namei.h>
@@ -2262,16 +2262,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/inode.c linux-4.4.116-vs2.3.9.7/fs/e
  #include "ext2.h"
  #include "acl.h"
  #include "xattr.h"
  #include "ext2.h"
  #include "acl.h"
  #include "xattr.h"
-@@ -1188,7 +1189,7 @@ static void ext2_truncate_blocks(struct
-               return;
-       if (ext2_inode_is_fast_symlink(inode))
-               return;
--      if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
-+      if (IS_APPEND(inode) || IS_IXORUNLINK(inode))
-               return;
-       dax_sem_down_write(EXT2_I(inode));
-@@ -1284,39 +1285,62 @@ void ext2_set_inode_flags(struct inode *
+@@ -1274,39 +1275,62 @@ void ext2_set_inode_flags(struct inode *
  {
        unsigned int flags = EXT2_I(inode)->i_flags;
  
  {
        unsigned int flags = EXT2_I(inode)->i_flags;
  
@@ -2342,7 +2333,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/inode.c linux-4.4.116-vs2.3.9.7/fs/e
  }
  
  struct inode *ext2_iget (struct super_block *sb, unsigned long ino)
  }
  
  struct inode *ext2_iget (struct super_block *sb, unsigned long ino)
-@@ -1352,8 +1376,10 @@ struct inode *ext2_iget (struct super_bl
+@@ -1342,8 +1366,10 @@ struct inode *ext2_iget (struct super_bl
                i_uid |= le16_to_cpu(raw_inode->i_uid_high) << 16;
                i_gid |= le16_to_cpu(raw_inode->i_gid_high) << 16;
        }
                i_uid |= le16_to_cpu(raw_inode->i_uid_high) << 16;
                i_gid |= le16_to_cpu(raw_inode->i_gid_high) << 16;
        }
@@ -2355,7 +2346,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/inode.c linux-4.4.116-vs2.3.9.7/fs/e
        set_nlink(inode, le16_to_cpu(raw_inode->i_links_count));
        inode->i_size = le32_to_cpu(raw_inode->i_size);
        inode->i_atime.tv_sec = (signed)le32_to_cpu(raw_inode->i_atime);
        set_nlink(inode, le16_to_cpu(raw_inode->i_links_count));
        inode->i_size = le32_to_cpu(raw_inode->i_size);
        inode->i_atime.tv_sec = (signed)le32_to_cpu(raw_inode->i_atime);
-@@ -1449,8 +1475,10 @@ static int __ext2_write_inode(struct ino
+@@ -1439,8 +1465,10 @@ static int __ext2_write_inode(struct ino
        struct ext2_inode_info *ei = EXT2_I(inode);
        struct super_block *sb = inode->i_sb;
        ino_t ino = inode->i_ino;
        struct ext2_inode_info *ei = EXT2_I(inode);
        struct super_block *sb = inode->i_sb;
        ino_t ino = inode->i_ino;
@@ -2368,7 +2359,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/inode.c linux-4.4.116-vs2.3.9.7/fs/e
        struct buffer_head * bh;
        struct ext2_inode * raw_inode = ext2_get_inode(sb, ino, &bh);
        int n;
        struct buffer_head * bh;
        struct ext2_inode * raw_inode = ext2_get_inode(sb, ino, &bh);
        int n;
-@@ -1486,6 +1514,9 @@ static int __ext2_write_inode(struct ino
+@@ -1476,6 +1504,9 @@ static int __ext2_write_inode(struct ino
                raw_inode->i_uid_high = 0;
                raw_inode->i_gid_high = 0;
        }
                raw_inode->i_uid_high = 0;
                raw_inode->i_gid_high = 0;
        }
@@ -2378,7 +2369,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/inode.c linux-4.4.116-vs2.3.9.7/fs/e
        raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
        raw_inode->i_size = cpu_to_le32(inode->i_size);
        raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec);
        raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
        raw_inode->i_size = cpu_to_le32(inode->i_size);
        raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec);
-@@ -1569,7 +1600,8 @@ int ext2_setattr(struct dentry *dentry,
+@@ -1559,7 +1590,8 @@ int ext2_setattr(struct dentry *dentry,
                        return error;
        }
        if ((iattr->ia_valid & ATTR_UID && !uid_eq(iattr->ia_uid, inode->i_uid)) ||
                        return error;
        }
        if ((iattr->ia_valid & ATTR_UID && !uid_eq(iattr->ia_uid, inode->i_uid)) ||
@@ -2388,9 +2379,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/inode.c linux-4.4.116-vs2.3.9.7/fs/e
                error = dquot_transfer(inode, iattr);
                if (error)
                        return error;
                error = dquot_transfer(inode, iattr);
                if (error)
                        return error;
-diff -NurpP --minimal linux-4.4.116/fs/ext2/ioctl.c linux-4.4.116-vs2.3.9.7/fs/ext2/ioctl.c
---- linux-4.4.116/fs/ext2/ioctl.c      2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext2/ioctl.c    2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ext2/ioctl.c linux-4.4.197-vs2.3.9.8/fs/ext2/ioctl.c
+--- linux-4.4.197/fs/ext2/ioctl.c      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext2/ioctl.c    2018-10-20 04:57:21.000000000 +0000
 @@ -17,6 +17,16 @@
  #include <asm/uaccess.h>
  
 @@ -17,6 +17,16 @@
  #include <asm/uaccess.h>
  
@@ -2440,9 +2431,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/ioctl.c linux-4.4.116-vs2.3.9.7/fs/e
                flags |= oldflags & ~EXT2_FL_USER_MODIFIABLE;
                ei->i_flags = flags;
  
                flags |= oldflags & ~EXT2_FL_USER_MODIFIABLE;
                ei->i_flags = flags;
  
-diff -NurpP --minimal linux-4.4.116/fs/ext2/namei.c linux-4.4.116-vs2.3.9.7/fs/ext2/namei.c
---- linux-4.4.116/fs/ext2/namei.c      2016-07-05 04:15:07.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext2/namei.c    2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ext2/namei.c linux-4.4.197-vs2.3.9.8/fs/ext2/namei.c
+--- linux-4.4.197/fs/ext2/namei.c      2019-10-22 12:34:31.748703336 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext2/namei.c    2018-10-20 04:57:21.000000000 +0000
 @@ -32,6 +32,7 @@
  
  #include <linux/pagemap.h>
 @@ -32,6 +32,7 @@
  
  #include <linux/pagemap.h>
@@ -2451,7 +2442,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/namei.c linux-4.4.116-vs2.3.9.7/fs/e
  #include "ext2.h"
  #include "xattr.h"
  #include "acl.h"
  #include "ext2.h"
  #include "xattr.h"
  #include "acl.h"
-@@ -72,6 +73,7 @@ static struct dentry *ext2_lookup(struct
+@@ -71,6 +72,7 @@ static struct dentry *ext2_lookup(struct
                                        (unsigned long) ino);
                        return ERR_PTR(-EIO);
                }
                                        (unsigned long) ino);
                        return ERR_PTR(-EIO);
                }
@@ -2459,7 +2450,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/namei.c linux-4.4.116-vs2.3.9.7/fs/e
        }
        return d_splice_alias(inode, dentry);
  }
        }
        return d_splice_alias(inode, dentry);
  }
-@@ -446,6 +448,7 @@ const struct inode_operations ext2_speci
+@@ -444,6 +446,7 @@ const struct inode_operations ext2_speci
        .removexattr    = generic_removexattr,
  #endif
        .setattr        = ext2_setattr,
        .removexattr    = generic_removexattr,
  #endif
        .setattr        = ext2_setattr,
@@ -2467,9 +2458,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/namei.c linux-4.4.116-vs2.3.9.7/fs/e
        .get_acl        = ext2_get_acl,
        .set_acl        = ext2_set_acl,
  };
        .get_acl        = ext2_get_acl,
        .set_acl        = ext2_set_acl,
  };
-diff -NurpP --minimal linux-4.4.116/fs/ext2/super.c linux-4.4.116-vs2.3.9.7/fs/ext2/super.c
---- linux-4.4.116/fs/ext2/super.c      2016-07-05 04:15:07.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext2/super.c    2018-01-09 16:36:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ext2/super.c linux-4.4.197-vs2.3.9.8/fs/ext2/super.c
+--- linux-4.4.197/fs/ext2/super.c      2019-10-22 12:34:31.748703336 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext2/super.c    2019-10-05 14:35:33.502792714 +0000
 @@ -408,7 +408,8 @@ enum {
        Opt_err_ro, Opt_nouid32, Opt_nocheck, Opt_debug,
        Opt_oldalloc, Opt_orlov, Opt_nobh, Opt_user_xattr, Opt_nouser_xattr,
 @@ -408,7 +408,8 @@ enum {
        Opt_err_ro, Opt_nouid32, Opt_nocheck, Opt_debug,
        Opt_oldalloc, Opt_orlov, Opt_nobh, Opt_user_xattr, Opt_nouser_xattr,
@@ -2511,7 +2502,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/super.c linux-4.4.116-vs2.3.9.7/fs/e
                case Opt_nocheck:
                        clear_opt (sbi->s_mount_opt, CHECK);
                        break;
                case Opt_nocheck:
                        clear_opt (sbi->s_mount_opt, CHECK);
                        break;
-@@ -884,6 +902,8 @@ static int ext2_fill_super(struct super_
+@@ -895,6 +913,8 @@ static int ext2_fill_super(struct super_
        if (!parse_options((char *) data, sb))
                goto failed_mount;
  
        if (!parse_options((char *) data, sb))
                goto failed_mount;
  
@@ -2520,7 +2511,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/super.c linux-4.4.116-vs2.3.9.7/fs/e
        sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
                ((EXT2_SB(sb)->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ?
                 MS_POSIXACL : 0);
        sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
                ((EXT2_SB(sb)->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ?
                 MS_POSIXACL : 0);
-@@ -1294,6 +1314,14 @@ static int ext2_remount (struct super_bl
+@@ -1305,6 +1325,14 @@ static int ext2_remount (struct super_bl
                err = -EINVAL;
                goto restore_opts;
        }
                err = -EINVAL;
                goto restore_opts;
        }
@@ -2535,9 +2526,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ext2/super.c linux-4.4.116-vs2.3.9.7/fs/e
  
        sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
                ((sbi->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0);
  
        sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
                ((sbi->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0);
-diff -NurpP --minimal linux-4.4.116/fs/ext4/ext4.h linux-4.4.116-vs2.3.9.7/fs/ext4/ext4.h
---- linux-4.4.116/fs/ext4/ext4.h       2018-02-22 21:19:51.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext4/ext4.h     2018-01-09 17:33:10.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ext4/ext4.h linux-4.4.197-vs2.3.9.8/fs/ext4/ext4.h
+--- linux-4.4.197/fs/ext4/ext4.h       2019-10-22 12:34:31.838701898 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext4/ext4.h     2019-02-22 08:20:33.340964652 +0000
 @@ -375,8 +375,11 @@ struct flex_groups {
  #define EXT4_EXTENTS_FL                       0x00080000 /* Inode uses extents */
  #define EXT4_EA_INODE_FL              0x00200000 /* Inode used for large EA */
 @@ -375,8 +375,11 @@ struct flex_groups {
  #define EXT4_EXTENTS_FL                       0x00080000 /* Inode uses extents */
  #define EXT4_EA_INODE_FL              0x00200000 /* Inode used for large EA */
@@ -2575,7 +2566,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/ext4.h linux-4.4.116-vs2.3.9.7/fs/ex
  #define EXT4_MOUNT_QUOTA              0x80000 /* Some quota option set */
  #define EXT4_MOUNT_USRQUOTA           0x100000 /* "old" user quota */
  #define EXT4_MOUNT_GRPQUOTA           0x200000 /* "old" group quota */
  #define EXT4_MOUNT_QUOTA              0x80000 /* Some quota option set */
  #define EXT4_MOUNT_USRQUOTA           0x100000 /* "old" user quota */
  #define EXT4_MOUNT_GRPQUOTA           0x200000 /* "old" group quota */
-@@ -2501,6 +2506,7 @@ extern int ext4_punch_hole(struct inode
+@@ -2496,6 +2501,7 @@ extern int ext4_punch_hole(struct inode
  extern int ext4_truncate_restart_trans(handle_t *, struct inode *, int nblocks);
  extern void ext4_set_inode_flags(struct inode *);
  extern void ext4_get_inode_flags(struct ext4_inode_info *);
  extern int ext4_truncate_restart_trans(handle_t *, struct inode *, int nblocks);
  extern void ext4_set_inode_flags(struct inode *);
  extern void ext4_get_inode_flags(struct ext4_inode_info *);
@@ -2583,9 +2574,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/ext4.h linux-4.4.116-vs2.3.9.7/fs/ex
  extern int ext4_alloc_da_blocks(struct inode *inode);
  extern void ext4_set_aops(struct inode *inode);
  extern int ext4_writepage_trans_blocks(struct inode *);
  extern int ext4_alloc_da_blocks(struct inode *inode);
  extern void ext4_set_aops(struct inode *inode);
  extern int ext4_writepage_trans_blocks(struct inode *);
-diff -NurpP --minimal linux-4.4.116/fs/ext4/file.c linux-4.4.116-vs2.3.9.7/fs/ext4/file.c
---- linux-4.4.116/fs/ext4/file.c       2018-02-22 21:19:51.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext4/file.c     2018-01-09 16:36:31.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ext4/file.c linux-4.4.197-vs2.3.9.8/fs/ext4/file.c
+--- linux-4.4.197/fs/ext4/file.c       2019-10-22 12:34:31.848701739 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext4/file.c     2019-10-05 14:35:33.542792081 +0000
 @@ -749,5 +749,6 @@ const struct inode_operations ext4_file_
        .get_acl        = ext4_get_acl,
        .set_acl        = ext4_set_acl,
 @@ -749,5 +749,6 @@ const struct inode_operations ext4_file_
        .get_acl        = ext4_get_acl,
        .set_acl        = ext4_set_acl,
@@ -2593,9 +2584,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/file.c linux-4.4.116-vs2.3.9.7/fs/ex
 +      .sync_flags     = ext4_sync_flags,
  };
  
 +      .sync_flags     = ext4_sync_flags,
  };
  
-diff -NurpP --minimal linux-4.4.116/fs/ext4/ialloc.c linux-4.4.116-vs2.3.9.7/fs/ext4/ialloc.c
---- linux-4.4.116/fs/ext4/ialloc.c     2018-02-22 21:19:51.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext4/ialloc.c   2018-01-09 16:36:31.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ext4/ialloc.c linux-4.4.197-vs2.3.9.8/fs/ext4/ialloc.c
+--- linux-4.4.197/fs/ext4/ialloc.c     2019-10-22 12:34:31.848701739 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext4/ialloc.c   2018-10-20 05:50:20.000000000 +0000
 @@ -21,6 +21,7 @@
  #include <linux/random.h>
  #include <linux/bitops.h>
 @@ -21,6 +21,7 @@
  #include <linux/random.h>
  #include <linux/bitops.h>
@@ -2604,7 +2595,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/ialloc.c linux-4.4.116-vs2.3.9.7/fs/
  #include <asm/byteorder.h>
  
  #include "ext4.h"
  #include <asm/byteorder.h>
  
  #include "ext4.h"
-@@ -799,6 +800,7 @@ struct inode *__ext4_new_inode(handle_t
+@@ -777,6 +778,7 @@ struct inode *__ext4_new_inode(handle_t
                inode->i_mode = mode;
                inode->i_uid = current_fsuid();
                inode->i_gid = dir->i_gid;
                inode->i_mode = mode;
                inode->i_uid = current_fsuid();
                inode->i_gid = dir->i_gid;
@@ -2612,9 +2603,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/ialloc.c linux-4.4.116-vs2.3.9.7/fs/
        } else
                inode_init_owner(inode, dir, mode);
        err = dquot_initialize(inode);
        } else
                inode_init_owner(inode, dir, mode);
        err = dquot_initialize(inode);
-diff -NurpP --minimal linux-4.4.116/fs/ext4/inode.c linux-4.4.116-vs2.3.9.7/fs/ext4/inode.c
---- linux-4.4.116/fs/ext4/inode.c      2018-02-22 21:19:51.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext4/inode.c    2018-02-22 21:30:19.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ext4/inode.c linux-4.4.197-vs2.3.9.8/fs/ext4/inode.c
+--- linux-4.4.197/fs/ext4/inode.c      2019-10-22 12:34:31.858701581 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext4/inode.c    2019-10-05 14:35:33.602791127 +0000
 @@ -37,6 +37,7 @@
  #include <linux/printk.h>
  #include <linux/slab.h>
 @@ -37,6 +37,7 @@
  #include <linux/printk.h>
  #include <linux/slab.h>
@@ -2623,7 +2614,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/inode.c linux-4.4.116-vs2.3.9.7/fs/e
  
  #include "ext4_jbd2.h"
  #include "xattr.h"
  
  #include "ext4_jbd2.h"
  #include "xattr.h"
-@@ -4128,12 +4129,15 @@ void ext4_set_inode_flags(struct inode *
+@@ -4138,12 +4139,15 @@ void ext4_set_inode_flags(struct inode *
        unsigned int flags = EXT4_I(inode)->i_flags;
        unsigned int new_fl = 0;
  
        unsigned int flags = EXT4_I(inode)->i_flags;
        unsigned int new_fl = 0;
  
@@ -2641,7 +2632,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/inode.c linux-4.4.116-vs2.3.9.7/fs/e
        if (flags & EXT4_NOATIME_FL)
                new_fl |= S_NOATIME;
        if (flags & EXT4_DIRSYNC_FL)
        if (flags & EXT4_NOATIME_FL)
                new_fl |= S_NOATIME;
        if (flags & EXT4_DIRSYNC_FL)
-@@ -4141,31 +4145,52 @@ void ext4_set_inode_flags(struct inode *
+@@ -4151,31 +4155,52 @@ void ext4_set_inode_flags(struct inode *
        if (test_opt(inode->i_sb, DAX))
                new_fl |= S_DAX;
        inode_set_flags(inode, new_fl,
        if (test_opt(inode->i_sb, DAX))
                new_fl |= S_DAX;
        inode_set_flags(inode, new_fl,
@@ -2699,7 +2690,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/inode.c linux-4.4.116-vs2.3.9.7/fs/e
        } while (cmpxchg(&ei->i_flags, old_fl, new_fl) != old_fl);
  }
  
        } while (cmpxchg(&ei->i_flags, old_fl, new_fl) != old_fl);
  }
  
-@@ -4269,8 +4294,10 @@ struct inode *ext4_iget(struct super_blo
+@@ -4285,8 +4310,10 @@ struct inode *ext4_iget(struct super_blo
                i_uid |= le16_to_cpu(raw_inode->i_uid_high) << 16;
                i_gid |= le16_to_cpu(raw_inode->i_gid_high) << 16;
        }
                i_uid |= le16_to_cpu(raw_inode->i_uid_high) << 16;
                i_gid |= le16_to_cpu(raw_inode->i_gid_high) << 16;
        }
@@ -2712,7 +2703,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/inode.c linux-4.4.116-vs2.3.9.7/fs/e
        set_nlink(inode, le16_to_cpu(raw_inode->i_links_count));
  
        ext4_clear_state_flags(ei);     /* Only relevant on 32-bit archs */
        set_nlink(inode, le16_to_cpu(raw_inode->i_links_count));
  
        ext4_clear_state_flags(ei);     /* Only relevant on 32-bit archs */
-@@ -4584,8 +4611,10 @@ static int ext4_do_update_inode(handle_t
+@@ -4600,8 +4627,10 @@ static int ext4_do_update_inode(handle_t
  
        ext4_get_inode_flags(ei);
        raw_inode->i_mode = cpu_to_le16(inode->i_mode);
  
        ext4_get_inode_flags(ei);
        raw_inode->i_mode = cpu_to_le16(inode->i_mode);
@@ -2725,7 +2716,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/inode.c linux-4.4.116-vs2.3.9.7/fs/e
        if (!(test_opt(inode->i_sb, NO_UID32))) {
                raw_inode->i_uid_low = cpu_to_le16(low_16_bits(i_uid));
                raw_inode->i_gid_low = cpu_to_le16(low_16_bits(i_gid));
        if (!(test_opt(inode->i_sb, NO_UID32))) {
                raw_inode->i_uid_low = cpu_to_le16(low_16_bits(i_uid));
                raw_inode->i_gid_low = cpu_to_le16(low_16_bits(i_gid));
-@@ -4608,6 +4637,9 @@ static int ext4_do_update_inode(handle_t
+@@ -4624,6 +4653,9 @@ static int ext4_do_update_inode(handle_t
                raw_inode->i_uid_high = 0;
                raw_inode->i_gid_high = 0;
        }
                raw_inode->i_uid_high = 0;
                raw_inode->i_gid_high = 0;
        }
@@ -2735,7 +2726,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/inode.c linux-4.4.116-vs2.3.9.7/fs/e
        raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
  
        EXT4_INODE_SET_XTIME(i_ctime, inode, raw_inode);
        raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
  
        EXT4_INODE_SET_XTIME(i_ctime, inode, raw_inode);
-@@ -4853,7 +4885,8 @@ int ext4_setattr(struct dentry *dentry,
+@@ -4869,7 +4901,8 @@ int ext4_setattr(struct dentry *dentry,
                        return error;
        }
        if ((ia_valid & ATTR_UID && !uid_eq(attr->ia_uid, inode->i_uid)) ||
                        return error;
        }
        if ((ia_valid & ATTR_UID && !uid_eq(attr->ia_uid, inode->i_uid)) ||
@@ -2745,7 +2736,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/inode.c linux-4.4.116-vs2.3.9.7/fs/e
                handle_t *handle;
  
                /* (user+group)*(old+new) structure, inode write (sb,
                handle_t *handle;
  
                /* (user+group)*(old+new) structure, inode write (sb,
-@@ -4876,6 +4909,8 @@ int ext4_setattr(struct dentry *dentry,
+@@ -4892,6 +4925,8 @@ int ext4_setattr(struct dentry *dentry,
                        inode->i_uid = attr->ia_uid;
                if (attr->ia_valid & ATTR_GID)
                        inode->i_gid = attr->ia_gid;
                        inode->i_uid = attr->ia_uid;
                if (attr->ia_valid & ATTR_GID)
                        inode->i_gid = attr->ia_gid;
@@ -2754,9 +2745,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/inode.c linux-4.4.116-vs2.3.9.7/fs/e
                error = ext4_mark_inode_dirty(handle, inode);
                ext4_journal_stop(handle);
        }
                error = ext4_mark_inode_dirty(handle, inode);
                ext4_journal_stop(handle);
        }
-diff -NurpP --minimal linux-4.4.116/fs/ext4/ioctl.c linux-4.4.116-vs2.3.9.7/fs/ext4/ioctl.c
---- linux-4.4.116/fs/ext4/ioctl.c      2018-02-22 21:19:51.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext4/ioctl.c    2018-01-09 16:36:31.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ext4/ioctl.c linux-4.4.197-vs2.3.9.8/fs/ext4/ioctl.c
+--- linux-4.4.197/fs/ext4/ioctl.c      2019-10-22 12:34:31.858701581 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext4/ioctl.c    2019-10-05 14:35:33.662790177 +0000
 @@ -14,6 +14,7 @@
  #include <linux/mount.h>
  #include <linux/file.h>
 @@ -14,6 +14,7 @@
  #include <linux/mount.h>
  #include <linux/file.h>
@@ -2822,9 +2813,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/ioctl.c linux-4.4.116-vs2.3.9.7/fs/e
                        if (!capable(CAP_LINUX_IMMUTABLE))
                                goto flags_out;
                }
                        if (!capable(CAP_LINUX_IMMUTABLE))
                                goto flags_out;
                }
-diff -NurpP --minimal linux-4.4.116/fs/ext4/namei.c linux-4.4.116-vs2.3.9.7/fs/ext4/namei.c
---- linux-4.4.116/fs/ext4/namei.c      2018-02-22 21:19:51.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext4/namei.c    2018-02-22 21:30:19.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ext4/namei.c linux-4.4.197-vs2.3.9.8/fs/ext4/namei.c
+--- linux-4.4.197/fs/ext4/namei.c      2019-10-22 12:34:31.868701419 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext4/namei.c    2019-02-22 08:20:33.380963972 +0000
 @@ -33,6 +33,7 @@
  #include <linux/quotaops.h>
  #include <linux/buffer_head.h>
 @@ -33,6 +33,7 @@
  #include <linux/quotaops.h>
  #include <linux/buffer_head.h>
@@ -2833,7 +2824,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/namei.c linux-4.4.116-vs2.3.9.7/fs/e
  #include "ext4.h"
  #include "ext4_jbd2.h"
  
  #include "ext4.h"
  #include "ext4_jbd2.h"
  
-@@ -1444,6 +1445,7 @@ restart:
+@@ -1446,6 +1447,7 @@ restart:
                                        ll_rw_block(READ | REQ_META | REQ_PRIO,
                                                    1, &bh);
                        }
                                        ll_rw_block(READ | REQ_META | REQ_PRIO,
                                                    1, &bh);
                        }
@@ -2841,7 +2832,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/namei.c linux-4.4.116-vs2.3.9.7/fs/e
                }
                if ((bh = bh_use[ra_ptr++]) == NULL)
                        goto next;
                }
                if ((bh = bh_use[ra_ptr++]) == NULL)
                        goto next;
-@@ -3882,6 +3884,7 @@ const struct inode_operations ext4_dir_i
+@@ -3884,6 +3886,7 @@ const struct inode_operations ext4_dir_i
        .get_acl        = ext4_get_acl,
        .set_acl        = ext4_set_acl,
        .fiemap         = ext4_fiemap,
        .get_acl        = ext4_get_acl,
        .set_acl        = ext4_set_acl,
        .fiemap         = ext4_fiemap,
@@ -2849,10 +2840,10 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/namei.c linux-4.4.116-vs2.3.9.7/fs/e
  };
  
  const struct inode_operations ext4_special_inode_operations = {
  };
  
  const struct inode_operations ext4_special_inode_operations = {
-diff -NurpP --minimal linux-4.4.116/fs/ext4/super.c linux-4.4.116-vs2.3.9.7/fs/ext4/super.c
---- linux-4.4.116/fs/ext4/super.c      2018-02-22 21:19:51.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ext4/super.c    2018-01-09 16:36:32.000000000 +0000
-@@ -1165,6 +1165,7 @@ enum {
+diff -NurpP --minimal linux-4.4.197/fs/ext4/super.c linux-4.4.197-vs2.3.9.8/fs/ext4/super.c
+--- linux-4.4.197/fs/ext4/super.c      2019-10-22 12:34:31.868701419 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ext4/super.c    2019-10-05 14:35:33.702789543 +0000
+@@ -1177,6 +1177,7 @@ enum {
        Opt_dioread_nolock, Opt_dioread_lock,
        Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable,
        Opt_max_dir_size_kb, Opt_nojournal_checksum,
        Opt_dioread_nolock, Opt_dioread_lock,
        Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable,
        Opt_max_dir_size_kb, Opt_nojournal_checksum,
@@ -2860,7 +2851,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/super.c linux-4.4.116-vs2.3.9.7/fs/e
  };
  
  static const match_table_t tokens = {
  };
  
  static const match_table_t tokens = {
-@@ -1250,6 +1251,9 @@ static const match_table_t tokens = {
+@@ -1262,6 +1263,9 @@ static const match_table_t tokens = {
        {Opt_removed, "reservation"},   /* mount option from ext2/3 */
        {Opt_removed, "noreservation"}, /* mount option from ext2/3 */
        {Opt_removed, "journal=%u"},    /* mount option from ext2/3 */
        {Opt_removed, "reservation"},   /* mount option from ext2/3 */
        {Opt_removed, "noreservation"}, /* mount option from ext2/3 */
        {Opt_removed, "journal=%u"},    /* mount option from ext2/3 */
@@ -2870,7 +2861,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/super.c linux-4.4.116-vs2.3.9.7/fs/e
        {Opt_err, NULL},
  };
  
        {Opt_err, NULL},
  };
  
-@@ -1492,6 +1496,20 @@ static int handle_mount_opt(struct super
+@@ -1504,6 +1508,20 @@ static int handle_mount_opt(struct super
        case Opt_nolazytime:
                sb->s_flags &= ~MS_LAZYTIME;
                return 1;
        case Opt_nolazytime:
                sb->s_flags &= ~MS_LAZYTIME;
                return 1;
@@ -2891,7 +2882,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/super.c linux-4.4.116-vs2.3.9.7/fs/e
        }
  
        for (m = ext4_mount_opts; m->token != Opt_err; m++)
        }
  
        for (m = ext4_mount_opts; m->token != Opt_err; m++)
-@@ -3379,6 +3397,9 @@ static int ext4_fill_super(struct super_
+@@ -3425,6 +3443,9 @@ static int ext4_fill_super(struct super_
                sb->s_iflags |= SB_I_CGROUPWB;
        }
  
                sb->s_iflags |= SB_I_CGROUPWB;
        }
  
@@ -2901,7 +2892,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/super.c linux-4.4.116-vs2.3.9.7/fs/e
        sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
                (test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0);
  
        sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
                (test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0);
  
-@@ -4727,6 +4748,14 @@ static int ext4_remount(struct super_blo
+@@ -4803,6 +4824,14 @@ static int ext4_remount(struct super_blo
        if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED)
                ext4_abort(sb, "Abort forced by user");
  
        if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED)
                ext4_abort(sb, "Abort forced by user");
  
@@ -2916,9 +2907,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ext4/super.c linux-4.4.116-vs2.3.9.7/fs/e
        sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
                (test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0);
  
        sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
                (test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0);
  
-diff -NurpP --minimal linux-4.4.116/fs/fcntl.c linux-4.4.116-vs2.3.9.7/fs/fcntl.c
---- linux-4.4.116/fs/fcntl.c   2018-02-22 21:19:52.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/fcntl.c 2018-02-10 15:16:50.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/fcntl.c linux-4.4.197-vs2.3.9.8/fs/fcntl.c
+--- linux-4.4.197/fs/fcntl.c   2019-10-22 12:34:32.028698862 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/fcntl.c 2018-10-20 04:57:21.000000000 +0000
 @@ -22,6 +22,7 @@
  #include <linux/pid_namespace.h>
  #include <linux/user_namespace.h>
 @@ -22,6 +22,7 @@
  #include <linux/pid_namespace.h>
  #include <linux/user_namespace.h>
@@ -2936,9 +2927,9 @@ diff -NurpP --minimal linux-4.4.116/fs/fcntl.c linux-4.4.116-vs2.3.9.7/fs/fcntl.
  
        if (unlikely(f.file->f_mode & FMODE_PATH)) {
                if (!check_fcntl_cmd(cmd))
  
        if (unlikely(f.file->f_mode & FMODE_PATH)) {
                if (!check_fcntl_cmd(cmd))
-diff -NurpP --minimal linux-4.4.116/fs/file.c linux-4.4.116-vs2.3.9.7/fs/file.c
---- linux-4.4.116/fs/file.c    2016-07-05 04:15:07.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/file.c  2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/file.c linux-4.4.197-vs2.3.9.8/fs/file.c
+--- linux-4.4.197/fs/file.c    2019-10-22 12:34:32.038698704 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/file.c  2019-10-05 14:35:33.802787957 +0000
 @@ -22,6 +22,7 @@
  #include <linux/spinlock.h>
  #include <linux/rcupdate.h>
 @@ -22,6 +22,7 @@
  #include <linux/spinlock.h>
  #include <linux/rcupdate.h>
@@ -2968,7 +2959,7 @@ diff -NurpP --minimal linux-4.4.116/fs/file.c linux-4.4.116-vs2.3.9.7/fs/file.c
                }
        }
  
                }
        }
  
-@@ -538,6 +543,7 @@ repeat:
+@@ -539,6 +544,7 @@ repeat:
        else
                __clear_close_on_exec(fd, fdt);
        error = fd;
        else
                __clear_close_on_exec(fd, fdt);
        error = fd;
@@ -2976,7 +2967,7 @@ diff -NurpP --minimal linux-4.4.116/fs/file.c linux-4.4.116-vs2.3.9.7/fs/file.c
  #if 1
        /* Sanity check */
        if (rcu_access_pointer(fdt->fd[fd]) != NULL) {
  #if 1
        /* Sanity check */
        if (rcu_access_pointer(fdt->fd[fd]) != NULL) {
-@@ -568,6 +574,7 @@ static void __put_unused_fd(struct files
+@@ -569,6 +575,7 @@ static void __put_unused_fd(struct files
        __clear_open_fd(fd, fdt);
        if (fd < files->next_fd)
                files->next_fd = fd;
        __clear_open_fd(fd, fdt);
        if (fd < files->next_fd)
                files->next_fd = fd;
@@ -2984,7 +2975,7 @@ diff -NurpP --minimal linux-4.4.116/fs/file.c linux-4.4.116-vs2.3.9.7/fs/file.c
  }
  
  void put_unused_fd(unsigned int fd)
  }
  
  void put_unused_fd(unsigned int fd)
-@@ -850,6 +857,8 @@ __releases(&files->file_lock)
+@@ -851,6 +858,8 @@ __releases(&files->file_lock)
  
        if (tofree)
                filp_close(tofree, files);
  
        if (tofree)
                filp_close(tofree, files);
@@ -2993,9 +2984,9 @@ diff -NurpP --minimal linux-4.4.116/fs/file.c linux-4.4.116-vs2.3.9.7/fs/file.c
  
        return fd;
  
  
        return fd;
  
-diff -NurpP --minimal linux-4.4.116/fs/file_table.c linux-4.4.116-vs2.3.9.7/fs/file_table.c
---- linux-4.4.116/fs/file_table.c      2015-10-29 09:21:35.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/file_table.c    2018-01-09 17:25:51.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/file_table.c linux-4.4.197-vs2.3.9.8/fs/file_table.c
+--- linux-4.4.197/fs/file_table.c      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/file_table.c    2018-10-20 04:57:21.000000000 +0000
 @@ -26,6 +26,8 @@
  #include <linux/task_work.h>
  #include <linux/ima.h>
 @@ -26,6 +26,8 @@
  #include <linux/task_work.h>
  #include <linux/ima.h>
@@ -3032,9 +3023,9 @@ diff -NurpP --minimal linux-4.4.116/fs/file_table.c linux-4.4.116-vs2.3.9.7/fs/f
                file_free(file);
        }
  }
                file_free(file);
        }
  }
-diff -NurpP --minimal linux-4.4.116/fs/fs_struct.c linux-4.4.116-vs2.3.9.7/fs/fs_struct.c
---- linux-4.4.116/fs/fs_struct.c       2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/fs_struct.c     2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/fs_struct.c linux-4.4.197-vs2.3.9.8/fs/fs_struct.c
+--- linux-4.4.197/fs/fs_struct.c       2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/fs_struct.c     2018-10-20 04:57:21.000000000 +0000
 @@ -4,6 +4,7 @@
  #include <linux/path.h>
  #include <linux/slab.h>
 @@ -4,6 +4,7 @@
  #include <linux/path.h>
  #include <linux/slab.h>
@@ -3059,9 +3050,9 @@ diff -NurpP --minimal linux-4.4.116/fs/fs_struct.c linux-4.4.116-vs2.3.9.7/fs/fs
        }
        return fs;
  }
        }
        return fs;
  }
-diff -NurpP --minimal linux-4.4.116/fs/gfs2/file.c linux-4.4.116-vs2.3.9.7/fs/gfs2/file.c
---- linux-4.4.116/fs/gfs2/file.c       2018-02-22 21:19:52.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/gfs2/file.c     2018-01-09 17:23:53.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/gfs2/file.c linux-4.4.197-vs2.3.9.8/fs/gfs2/file.c
+--- linux-4.4.197/fs/gfs2/file.c       2019-10-22 12:34:32.208695985 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/gfs2/file.c     2018-10-20 04:57:21.000000000 +0000
 @@ -137,6 +137,9 @@ static const u32 fsflags_to_gfs2[32] = {
        [12] = GFS2_DIF_EXHASH,
        [14] = GFS2_DIF_INHERIT_JDATA,
 @@ -137,6 +137,9 @@ static const u32 fsflags_to_gfs2[32] = {
        [12] = GFS2_DIF_EXHASH,
        [14] = GFS2_DIF_INHERIT_JDATA,
@@ -3087,11 +3078,11 @@ diff -NurpP --minimal linux-4.4.116/fs/gfs2/file.c linux-4.4.116-vs2.3.9.7/fs/gf
        struct gfs2_inode *ip = GFS2_I(inode);
        unsigned int flags = inode->i_flags;
 +      unsigned int vflags = inode->i_vflags;
        struct gfs2_inode *ip = GFS2_I(inode);
        unsigned int flags = inode->i_flags;
 +      unsigned int vflags = inode->i_vflags;
--      flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC|S_NOSEC);
++
 +      flags &= ~(S_IMMUTABLE | S_IXUNLINK |
 +              S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC | S_NOSEC);
 +      flags &= ~(S_IMMUTABLE | S_IXUNLINK |
 +              S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC | S_NOSEC);
-+
+-      flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC|S_NOSEC);
        if ((ip->i_eattr == 0) && !is_sxid(inode->i_mode))
                flags |= S_NOSEC;
        if (ip->i_diskflags & GFS2_DIF_IMMUTABLE)
        if ((ip->i_eattr == 0) && !is_sxid(inode->i_mode))
                flags |= S_NOSEC;
        if (ip->i_diskflags & GFS2_DIF_IMMUTABLE)
@@ -3183,9 +3174,9 @@ diff -NurpP --minimal linux-4.4.116/fs/gfs2/file.c linux-4.4.116-vs2.3.9.7/fs/gf
  static long gfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
  {
        switch(cmd) {
  static long gfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
  {
        switch(cmd) {
-diff -NurpP --minimal linux-4.4.116/fs/gfs2/inode.h linux-4.4.116-vs2.3.9.7/fs/gfs2/inode.h
---- linux-4.4.116/fs/gfs2/inode.h      2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/gfs2/inode.h    2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/gfs2/inode.h linux-4.4.197-vs2.3.9.8/fs/gfs2/inode.h
+--- linux-4.4.197/fs/gfs2/inode.h      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/gfs2/inode.h    2018-10-20 04:57:21.000000000 +0000
 @@ -118,6 +118,7 @@ extern const struct file_operations gfs2
  extern const struct file_operations gfs2_dir_fops_nolock;
  
 @@ -118,6 +118,7 @@ extern const struct file_operations gfs2
  extern const struct file_operations gfs2_dir_fops_nolock;
  
@@ -3194,9 +3185,9 @@ diff -NurpP --minimal linux-4.4.116/fs/gfs2/inode.h linux-4.4.116-vs2.3.9.7/fs/g
   
  #ifdef CONFIG_GFS2_FS_LOCKING_DLM
  extern const struct file_operations gfs2_file_fops;
   
  #ifdef CONFIG_GFS2_FS_LOCKING_DLM
  extern const struct file_operations gfs2_file_fops;
-diff -NurpP --minimal linux-4.4.116/fs/hostfs/hostfs.h linux-4.4.116-vs2.3.9.7/fs/hostfs/hostfs.h
---- linux-4.4.116/fs/hostfs/hostfs.h   2015-07-06 20:41:42.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/hostfs/hostfs.h 2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/hostfs/hostfs.h linux-4.4.197-vs2.3.9.8/fs/hostfs/hostfs.h
+--- linux-4.4.197/fs/hostfs/hostfs.h   2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/hostfs/hostfs.h 2018-10-20 04:57:21.000000000 +0000
 @@ -42,6 +42,7 @@ struct hostfs_iattr {
        unsigned short  ia_mode;
        uid_t           ia_uid;
 @@ -42,6 +42,7 @@ struct hostfs_iattr {
        unsigned short  ia_mode;
        uid_t           ia_uid;
@@ -3205,9 +3196,9 @@ diff -NurpP --minimal linux-4.4.116/fs/hostfs/hostfs.h linux-4.4.116-vs2.3.9.7/f
        loff_t          ia_size;
        struct timespec ia_atime;
        struct timespec ia_mtime;
        loff_t          ia_size;
        struct timespec ia_atime;
        struct timespec ia_mtime;
-diff -NurpP --minimal linux-4.4.116/fs/inode.c linux-4.4.116-vs2.3.9.7/fs/inode.c
---- linux-4.4.116/fs/inode.c   2018-02-22 21:19:52.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/inode.c 2018-02-22 21:30:19.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/inode.c linux-4.4.197-vs2.3.9.8/fs/inode.c
+--- linux-4.4.197/fs/inode.c   2019-10-22 12:34:32.438692310 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/inode.c 2019-10-05 14:35:34.142782561 +0000
 @@ -18,6 +18,7 @@
  #include <linux/buffer_head.h> /* for inode_has_buffers */
  #include <linux/ratelimit.h>
 @@ -18,6 +18,7 @@
  #include <linux/buffer_head.h> /* for inode_has_buffers */
  #include <linux/ratelimit.h>
@@ -3240,8 +3231,8 @@ diff -NurpP --minimal linux-4.4.116/fs/inode.c linux-4.4.116-vs2.3.9.7/fs/inode.
 +      inode->i_mdev = 0;
        inode->dirtied_when = 0;
  
 +      inode->i_mdev = 0;
        inode->dirtied_when = 0;
  
-       if (security_inode_alloc(inode))
-@@ -469,6 +474,8 @@ void __insert_inode_hash(struct inode *i
+ #ifdef CONFIG_CGROUP_WRITEBACK
+@@ -475,6 +480,8 @@ void __insert_inode_hash(struct inode *i
  }
  EXPORT_SYMBOL(__insert_inode_hash);
  
  }
  EXPORT_SYMBOL(__insert_inode_hash);
  
@@ -3250,7 +3241,7 @@ diff -NurpP --minimal linux-4.4.116/fs/inode.c linux-4.4.116-vs2.3.9.7/fs/inode.
  /**
   *    __remove_inode_hash - remove an inode from the hash
   *    @inode: inode to unhash
  /**
   *    __remove_inode_hash - remove an inode from the hash
   *    @inode: inode to unhash
-@@ -1911,9 +1918,11 @@ void init_special_inode(struct inode *in
+@@ -1922,9 +1929,11 @@ void init_special_inode(struct inode *in
        if (S_ISCHR(mode)) {
                inode->i_fop = &def_chr_fops;
                inode->i_rdev = rdev;
        if (S_ISCHR(mode)) {
                inode->i_fop = &def_chr_fops;
                inode->i_rdev = rdev;
@@ -3262,7 +3253,7 @@ diff -NurpP --minimal linux-4.4.116/fs/inode.c linux-4.4.116-vs2.3.9.7/fs/inode.
        } else if (S_ISFIFO(mode))
                inode->i_fop = &pipefifo_fops;
        else if (S_ISSOCK(mode))
        } else if (S_ISFIFO(mode))
                inode->i_fop = &pipefifo_fops;
        else if (S_ISSOCK(mode))
-@@ -1942,6 +1951,7 @@ void inode_init_owner(struct inode *inod
+@@ -1959,6 +1968,7 @@ void inode_init_owner(struct inode *inod
        } else
                inode->i_gid = current_fsgid();
        inode->i_mode = mode;
        } else
                inode->i_gid = current_fsgid();
        inode->i_mode = mode;
@@ -3270,9 +3261,9 @@ diff -NurpP --minimal linux-4.4.116/fs/inode.c linux-4.4.116-vs2.3.9.7/fs/inode.
  }
  EXPORT_SYMBOL(inode_init_owner);
  
  }
  EXPORT_SYMBOL(inode_init_owner);
  
-diff -NurpP --minimal linux-4.4.116/fs/ioctl.c linux-4.4.116-vs2.3.9.7/fs/ioctl.c
---- linux-4.4.116/fs/ioctl.c   2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ioctl.c 2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ioctl.c linux-4.4.197-vs2.3.9.8/fs/ioctl.c
+--- linux-4.4.197/fs/ioctl.c   2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ioctl.c 2018-10-20 04:57:21.000000000 +0000
 @@ -15,6 +15,9 @@
  #include <linux/writeback.h>
  #include <linux/buffer_head.h>
 @@ -15,6 +15,9 @@
  #include <linux/writeback.h>
  #include <linux/buffer_head.h>
@@ -3283,9 +3274,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ioctl.c linux-4.4.116-vs2.3.9.7/fs/ioctl.
  
  #include <asm/ioctls.h>
  
  
  #include <asm/ioctls.h>
  
-diff -NurpP --minimal linux-4.4.116/fs/jfs/file.c linux-4.4.116-vs2.3.9.7/fs/jfs/file.c
---- linux-4.4.116/fs/jfs/file.c        2016-07-05 04:12:33.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/jfs/file.c      2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/jfs/file.c linux-4.4.197-vs2.3.9.8/fs/jfs/file.c
+--- linux-4.4.197/fs/jfs/file.c        2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/jfs/file.c      2018-10-20 04:57:21.000000000 +0000
 @@ -113,7 +113,8 @@ int jfs_setattr(struct dentry *dentry, s
                        return rc;
        }
 @@ -113,7 +113,8 @@ int jfs_setattr(struct dentry *dentry, s
                        return rc;
        }
@@ -3304,9 +3295,9 @@ diff -NurpP --minimal linux-4.4.116/fs/jfs/file.c linux-4.4.116-vs2.3.9.7/fs/jfs
  };
  
  const struct file_operations jfs_file_operations = {
  };
  
  const struct file_operations jfs_file_operations = {
-diff -NurpP --minimal linux-4.4.116/fs/jfs/ioctl.c linux-4.4.116-vs2.3.9.7/fs/jfs/ioctl.c
---- linux-4.4.116/fs/jfs/ioctl.c       2015-10-29 09:21:36.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/jfs/ioctl.c     2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/jfs/ioctl.c linux-4.4.197-vs2.3.9.8/fs/jfs/ioctl.c
+--- linux-4.4.197/fs/jfs/ioctl.c       2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/jfs/ioctl.c     2018-10-20 04:57:21.000000000 +0000
 @@ -12,6 +12,7 @@
  #include <linux/time.h>
  #include <linux/sched.h>
 @@ -12,6 +12,7 @@
  #include <linux/time.h>
  #include <linux/sched.h>
@@ -3364,9 +3355,9 @@ diff -NurpP --minimal linux-4.4.116/fs/jfs/ioctl.c linux-4.4.116-vs2.3.9.7/fs/jf
                flags |= oldflags & ~JFS_FL_USER_MODIFIABLE;
                jfs_inode->mode2 = flags;
  
                flags |= oldflags & ~JFS_FL_USER_MODIFIABLE;
                jfs_inode->mode2 = flags;
  
-diff -NurpP --minimal linux-4.4.116/fs/jfs/jfs_dinode.h linux-4.4.116-vs2.3.9.7/fs/jfs/jfs_dinode.h
---- linux-4.4.116/fs/jfs/jfs_dinode.h  2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/jfs/jfs_dinode.h        2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/jfs/jfs_dinode.h linux-4.4.197-vs2.3.9.8/fs/jfs/jfs_dinode.h
+--- linux-4.4.197/fs/jfs/jfs_dinode.h  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/jfs/jfs_dinode.h        2018-10-20 04:57:21.000000000 +0000
 @@ -161,9 +161,13 @@ struct dinode {
  
  #define JFS_APPEND_FL         0x01000000 /* writes to file may only append */
 @@ -161,9 +161,13 @@ struct dinode {
  
  #define JFS_APPEND_FL         0x01000000 /* writes to file may only append */
@@ -3383,9 +3374,9 @@ diff -NurpP --minimal linux-4.4.116/fs/jfs/jfs_dinode.h linux-4.4.116-vs2.3.9.7/
  #define JFS_FL_INHERIT                0x03C80000
  
  /* These are identical to EXT[23]_IOC_GETFLAGS/SETFLAGS */
  #define JFS_FL_INHERIT                0x03C80000
  
  /* These are identical to EXT[23]_IOC_GETFLAGS/SETFLAGS */
-diff -NurpP --minimal linux-4.4.116/fs/jfs/jfs_filsys.h linux-4.4.116-vs2.3.9.7/fs/jfs/jfs_filsys.h
---- linux-4.4.116/fs/jfs/jfs_filsys.h  2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/jfs/jfs_filsys.h        2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/jfs/jfs_filsys.h linux-4.4.197-vs2.3.9.8/fs/jfs/jfs_filsys.h
+--- linux-4.4.197/fs/jfs/jfs_filsys.h  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/jfs/jfs_filsys.h        2018-10-20 04:57:21.000000000 +0000
 @@ -266,6 +266,7 @@
  #define JFS_NAME_MAX  255
  #define JFS_PATH_MAX  BPSIZE
 @@ -266,6 +266,7 @@
  #define JFS_NAME_MAX  255
  #define JFS_PATH_MAX  BPSIZE
@@ -3394,9 +3385,9 @@ diff -NurpP --minimal linux-4.4.116/fs/jfs/jfs_filsys.h linux-4.4.116-vs2.3.9.7/
  
  /*
   *    file system state (superblock state)
  
  /*
   *    file system state (superblock state)
-diff -NurpP --minimal linux-4.4.116/fs/jfs/jfs_imap.c linux-4.4.116-vs2.3.9.7/fs/jfs/jfs_imap.c
---- linux-4.4.116/fs/jfs/jfs_imap.c    2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/jfs/jfs_imap.c  2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/jfs/jfs_imap.c linux-4.4.197-vs2.3.9.8/fs/jfs/jfs_imap.c
+--- linux-4.4.197/fs/jfs/jfs_imap.c    2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/jfs/jfs_imap.c  2018-10-20 04:57:21.000000000 +0000
 @@ -46,6 +46,7 @@
  #include <linux/pagemap.h>
  #include <linux/quotaops.h>
 @@ -46,6 +46,7 @@
  #include <linux/pagemap.h>
  #include <linux/quotaops.h>
@@ -3460,9 +3451,9 @@ diff -NurpP --minimal linux-4.4.116/fs/jfs/jfs_imap.c linux-4.4.116-vs2.3.9.7/fs
        jfs_get_inode_flags(jfs_ip);
        /*
         * mode2 is only needed for storing the higher order bits.
        jfs_get_inode_flags(jfs_ip);
        /*
         * mode2 is only needed for storing the higher order bits.
-diff -NurpP --minimal linux-4.4.116/fs/jfs/jfs_inode.c linux-4.4.116-vs2.3.9.7/fs/jfs/jfs_inode.c
---- linux-4.4.116/fs/jfs/jfs_inode.c   2016-07-05 04:12:33.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/jfs/jfs_inode.c 2018-01-14 06:39:51.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/jfs/jfs_inode.c linux-4.4.197-vs2.3.9.8/fs/jfs/jfs_inode.c
+--- linux-4.4.197/fs/jfs/jfs_inode.c   2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/jfs/jfs_inode.c 2018-10-20 04:57:21.000000000 +0000
 @@ -18,6 +18,7 @@
  
  #include <linux/fs.h>
 @@ -18,6 +18,7 @@
  
  #include <linux/fs.h>
@@ -3533,9 +3524,9 @@ diff -NurpP --minimal linux-4.4.116/fs/jfs/jfs_inode.c linux-4.4.116-vs2.3.9.7/f
  }
  
  /*
  }
  
  /*
-diff -NurpP --minimal linux-4.4.116/fs/jfs/jfs_inode.h linux-4.4.116-vs2.3.9.7/fs/jfs/jfs_inode.h
---- linux-4.4.116/fs/jfs/jfs_inode.h   2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/jfs/jfs_inode.h 2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/jfs/jfs_inode.h linux-4.4.197-vs2.3.9.8/fs/jfs/jfs_inode.h
+--- linux-4.4.197/fs/jfs/jfs_inode.h   2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/jfs/jfs_inode.h 2018-10-20 04:57:21.000000000 +0000
 @@ -39,6 +39,7 @@ extern struct dentry *jfs_fh_to_dentry(s
  extern struct dentry *jfs_fh_to_parent(struct super_block *sb, struct fid *fid,
        int fh_len, int fh_type);
 @@ -39,6 +39,7 @@ extern struct dentry *jfs_fh_to_dentry(s
  extern struct dentry *jfs_fh_to_parent(struct super_block *sb, struct fid *fid,
        int fh_len, int fh_type);
@@ -3544,9 +3535,9 @@ diff -NurpP --minimal linux-4.4.116/fs/jfs/jfs_inode.h linux-4.4.116-vs2.3.9.7/f
  extern int jfs_get_block(struct inode *, sector_t, struct buffer_head *, int);
  extern int jfs_setattr(struct dentry *, struct iattr *);
  
  extern int jfs_get_block(struct inode *, sector_t, struct buffer_head *, int);
  extern int jfs_setattr(struct dentry *, struct iattr *);
  
-diff -NurpP --minimal linux-4.4.116/fs/jfs/namei.c linux-4.4.116-vs2.3.9.7/fs/jfs/namei.c
---- linux-4.4.116/fs/jfs/namei.c       2016-07-05 04:15:08.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/jfs/namei.c     2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/jfs/namei.c linux-4.4.197-vs2.3.9.8/fs/jfs/namei.c
+--- linux-4.4.197/fs/jfs/namei.c       2019-10-22 12:34:32.898684963 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/jfs/namei.c     2018-10-20 04:57:21.000000000 +0000
 @@ -22,6 +22,7 @@
  #include <linux/ctype.h>
  #include <linux/quotaops.h>
 @@ -22,6 +22,7 @@
  #include <linux/ctype.h>
  #include <linux/quotaops.h>
@@ -3555,7 +3546,7 @@ diff -NurpP --minimal linux-4.4.116/fs/jfs/namei.c linux-4.4.116-vs2.3.9.7/fs/jf
  #include "jfs_incore.h"
  #include "jfs_superblock.h"
  #include "jfs_inode.h"
  #include "jfs_incore.h"
  #include "jfs_superblock.h"
  #include "jfs_inode.h"
-@@ -1480,6 +1481,7 @@ static struct dentry *jfs_lookup(struct
+@@ -1476,6 +1477,7 @@ static struct dentry *jfs_lookup(struct
                        jfs_err("jfs_lookup: iget failed on inum %d", (uint)inum);
        }
  
                        jfs_err("jfs_lookup: iget failed on inum %d", (uint)inum);
        }
  
@@ -3563,7 +3554,7 @@ diff -NurpP --minimal linux-4.4.116/fs/jfs/namei.c linux-4.4.116-vs2.3.9.7/fs/jf
        return d_splice_alias(ip, dentry);
  }
  
        return d_splice_alias(ip, dentry);
  }
  
-@@ -1545,6 +1547,7 @@ const struct inode_operations jfs_dir_in
+@@ -1541,6 +1543,7 @@ const struct inode_operations jfs_dir_in
        .get_acl        = jfs_get_acl,
        .set_acl        = jfs_set_acl,
  #endif
        .get_acl        = jfs_get_acl,
        .set_acl        = jfs_set_acl,
  #endif
@@ -3571,9 +3562,9 @@ diff -NurpP --minimal linux-4.4.116/fs/jfs/namei.c linux-4.4.116-vs2.3.9.7/fs/jf
  };
  
  const struct file_operations jfs_dir_operations = {
  };
  
  const struct file_operations jfs_dir_operations = {
-diff -NurpP --minimal linux-4.4.116/fs/jfs/super.c linux-4.4.116-vs2.3.9.7/fs/jfs/super.c
---- linux-4.4.116/fs/jfs/super.c       2018-02-22 21:19:52.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/jfs/super.c     2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/jfs/super.c linux-4.4.197-vs2.3.9.8/fs/jfs/super.c
+--- linux-4.4.197/fs/jfs/super.c       2019-10-22 12:34:32.928684480 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/jfs/super.c     2018-10-20 04:57:21.000000000 +0000
 @@ -206,7 +206,8 @@ enum {
        Opt_integrity, Opt_nointegrity, Opt_iocharset, Opt_resize,
        Opt_resize_nosize, Opt_errors, Opt_ignore, Opt_err, Opt_quota,
 @@ -206,7 +206,8 @@ enum {
        Opt_integrity, Opt_nointegrity, Opt_iocharset, Opt_resize,
        Opt_resize_nosize, Opt_errors, Opt_ignore, Opt_err, Opt_quota,
@@ -3640,9 +3631,9 @@ diff -NurpP --minimal linux-4.4.116/fs/jfs/super.c linux-4.4.116-vs2.3.9.7/fs/jf
  
        if (newLVSize) {
                pr_err("resize option for remount only\n");
  
        if (newLVSize) {
                pr_err("resize option for remount only\n");
-diff -NurpP --minimal linux-4.4.116/fs/libfs.c linux-4.4.116-vs2.3.9.7/fs/libfs.c
---- linux-4.4.116/fs/libfs.c   2016-07-05 04:12:33.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/libfs.c 2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/libfs.c linux-4.4.197-vs2.3.9.8/fs/libfs.c
+--- linux-4.4.197/fs/libfs.c   2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/libfs.c 2018-10-20 04:57:21.000000000 +0000
 @@ -141,13 +141,14 @@ static inline unsigned char dt_type(stru
   * both impossible due to the lock on directory.
   */
 @@ -141,13 +141,14 @@ static inline unsigned char dt_type(stru
   * both impossible due to the lock on directory.
   */
@@ -3694,9 +3685,9 @@ diff -NurpP --minimal linux-4.4.116/fs/libfs.c linux-4.4.116-vs2.3.9.7/fs/libfs.
  ssize_t generic_read_dir(struct file *filp, char __user *buf, size_t siz, loff_t *ppos)
  {
        return -EISDIR;
  ssize_t generic_read_dir(struct file *filp, char __user *buf, size_t siz, loff_t *ppos)
  {
        return -EISDIR;
-diff -NurpP --minimal linux-4.4.116/fs/locks.c linux-4.4.116-vs2.3.9.7/fs/locks.c
---- linux-4.4.116/fs/locks.c   2018-02-22 21:19:52.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/locks.c 2018-01-25 00:25:02.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/locks.c linux-4.4.197-vs2.3.9.8/fs/locks.c
+--- linux-4.4.197/fs/locks.c   2019-10-22 12:34:33.328678089 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/locks.c 2018-10-20 04:57:21.000000000 +0000
 @@ -129,6 +129,8 @@
  #include <linux/hashtable.h>
  #include <linux/percpu.h>
 @@ -129,6 +129,8 @@
  #include <linux/hashtable.h>
  #include <linux/percpu.h>
@@ -3892,9 +3883,9 @@ diff -NurpP --minimal linux-4.4.116/fs/locks.c linux-4.4.116-vs2.3.9.7/fs/locks.
  
        return 0;
  }
  
        return 0;
  }
-diff -NurpP --minimal linux-4.4.116/fs/mount.h linux-4.4.116-vs2.3.9.7/fs/mount.h
---- linux-4.4.116/fs/mount.h   2018-02-22 21:19:52.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/mount.h 2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/mount.h linux-4.4.197-vs2.3.9.8/fs/mount.h
+--- linux-4.4.197/fs/mount.h   2019-10-22 12:34:33.348677769 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/mount.h 2018-10-20 04:57:21.000000000 +0000
 @@ -68,6 +68,7 @@ struct mount {
        struct hlist_head mnt_pins;
        struct fs_pin mnt_umount;
 @@ -68,6 +68,7 @@ struct mount {
        struct hlist_head mnt_pins;
        struct fs_pin mnt_umount;
@@ -3903,9 +3894,9 @@ diff -NurpP --minimal linux-4.4.116/fs/mount.h linux-4.4.116-vs2.3.9.7/fs/mount.
  };
  
  #define MNT_NS_INTERNAL ERR_PTR(-EINVAL) /* distinct from any mnt_namespace */
  };
  
  #define MNT_NS_INTERNAL ERR_PTR(-EINVAL) /* distinct from any mnt_namespace */
-diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.c
---- linux-4.4.116/fs/namei.c   2018-02-22 21:19:52.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/namei.c 2018-01-13 03:11:55.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/namei.c linux-4.4.197-vs2.3.9.8/fs/namei.c
+--- linux-4.4.197/fs/namei.c   2019-10-22 12:34:33.358677612 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/namei.c 2019-02-22 08:20:34.040952763 +0000
 @@ -34,10 +34,20 @@
  #include <linux/device_cgroup.h>
  #include <linux/fs_struct.h>
 @@ -34,10 +34,20 @@
  #include <linux/device_cgroup.h>
  #include <linux/fs_struct.h>
@@ -3927,7 +3918,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
  #include "mount.h"
  
  /* [Feb-1997 T. Schoebel-Theuer]
  #include "mount.h"
  
  /* [Feb-1997 T. Schoebel-Theuer]
-@@ -283,6 +293,93 @@ static int check_acl(struct inode *inode
+@@ -284,6 +294,93 @@ static int check_acl(struct inode *inode
        return -EAGAIN;
  }
  
        return -EAGAIN;
  }
  
@@ -4021,7 +4012,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
  /*
   * This does the basic permission checking
   */
  /*
   * This does the basic permission checking
   */
-@@ -407,10 +504,14 @@ int __inode_permission(struct inode *ino
+@@ -408,10 +505,14 @@ int __inode_permission(struct inode *ino
                /*
                 * Nobody gets write access to an immutable file.
                 */
                /*
                 * Nobody gets write access to an immutable file.
                 */
@@ -4037,7 +4028,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
        retval = do_inode_permission(inode, mask);
        if (retval)
                return retval;
        retval = do_inode_permission(inode, mask);
        if (retval)
                return retval;
-@@ -1583,6 +1684,9 @@ static int lookup_fast(struct nameidata
+@@ -1626,6 +1727,9 @@ static int lookup_fast(struct nameidata
                 */
                if (negative)
                        return -ENOENT;
                 */
                if (negative)
                        return -ENOENT;
@@ -4047,7 +4038,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
                path->mnt = mnt;
                path->dentry = dentry;
                if (likely(__follow_mount_rcu(nd, path, inode, seqp)))
                path->mnt = mnt;
                path->dentry = dentry;
                if (likely(__follow_mount_rcu(nd, path, inode, seqp)))
-@@ -1613,6 +1717,8 @@ unlazy:
+@@ -1656,6 +1760,8 @@ unlazy:
                dput(dentry);
                return -ENOENT;
        }
                dput(dentry);
                return -ENOENT;
        }
@@ -4056,7 +4047,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
        path->mnt = mnt;
        path->dentry = dentry;
        err = follow_managed(path, nd);
        path->mnt = mnt;
        path->dentry = dentry;
        err = follow_managed(path, nd);
-@@ -2571,7 +2677,7 @@ static int may_delete(struct inode *dir,
+@@ -2617,7 +2723,7 @@ static int may_delete(struct inode *dir,
                return -EPERM;
  
        if (check_sticky(dir, inode) || IS_APPEND(inode) ||
                return -EPERM;
  
        if (check_sticky(dir, inode) || IS_APPEND(inode) ||
@@ -4065,7 +4056,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
                return -EPERM;
        if (isdir) {
                if (!d_is_dir(victim))
                return -EPERM;
        if (isdir) {
                if (!d_is_dir(victim))
-@@ -2653,19 +2759,25 @@ int vfs_create(struct inode *dir, struct
+@@ -2699,19 +2805,25 @@ int vfs_create(struct inode *dir, struct
                bool want_excl)
  {
        int error = may_create(dir, dentry);
                bool want_excl)
  {
        int error = may_create(dir, dentry);
@@ -4093,7 +4084,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
        return error;
  }
  EXPORT_SYMBOL(vfs_create);
        return error;
  }
  EXPORT_SYMBOL(vfs_create);
-@@ -2701,6 +2813,15 @@ static int may_open(struct path *path, i
+@@ -2747,6 +2859,15 @@ static int may_open(struct path *path, i
                break;
        }
  
                break;
        }
  
@@ -4109,7 +4100,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
        error = inode_permission(inode, acc_mode);
        if (error)
                return error;
        error = inode_permission(inode, acc_mode);
        if (error)
                return error;
-@@ -3178,6 +3299,16 @@ finish_open:
+@@ -3230,6 +3351,16 @@ finish_open:
        }
  finish_open_created:
        error = may_open(&nd->path, acc_mode, open_flag);
        }
  finish_open_created:
        error = may_open(&nd->path, acc_mode, open_flag);
@@ -4126,7 +4117,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
        if (error)
                goto out;
  
        if (error)
                goto out;
  
-@@ -3302,6 +3433,9 @@ static struct file *path_openat(struct n
+@@ -3354,6 +3485,9 @@ static struct file *path_openat(struct n
        int opened = 0;
        int error;
  
        int opened = 0;
        int error;
  
@@ -4136,7 +4127,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
        file = get_empty_filp();
        if (IS_ERR(file))
                return file;
        file = get_empty_filp();
        if (IS_ERR(file))
                return file;
-@@ -3328,6 +3462,12 @@ static struct file *path_openat(struct n
+@@ -3380,6 +3514,12 @@ static struct file *path_openat(struct n
                }
        }
        terminate_walk(nd);
                }
        }
        terminate_walk(nd);
@@ -4149,7 +4140,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
  out2:
        if (!(opened & FILE_OPENED)) {
                BUG_ON(!error);
  out2:
        if (!(opened & FILE_OPENED)) {
                BUG_ON(!error);
-@@ -3448,6 +3588,11 @@ static struct dentry *filename_create(in
+@@ -3500,6 +3640,11 @@ static struct dentry *filename_create(in
                goto fail;
        }
        putname(name);
                goto fail;
        }
        putname(name);
@@ -4161,7 +4152,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
        return dentry;
  fail:
        dput(dentry);
        return dentry;
  fail:
        dput(dentry);
-@@ -3564,6 +3709,7 @@ retry:
+@@ -3616,6 +3761,7 @@ retry:
                        error = vfs_mknod(path.dentry->d_inode,dentry,mode,0);
                        break;
        }
                        error = vfs_mknod(path.dentry->d_inode,dentry,mode,0);
                        break;
        }
@@ -4169,7 +4160,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
  out:
        done_path_create(&path, dentry);
        if (retry_estale(error, lookup_flags)) {
  out:
        done_path_create(&path, dentry);
        if (retry_estale(error, lookup_flags)) {
-@@ -4010,7 +4156,7 @@ int vfs_link(struct dentry *old_dentry,
+@@ -4062,7 +4208,7 @@ int vfs_link(struct dentry *old_dentry,
        /*
         * A link to an append-only or immutable file cannot be created.
         */
        /*
         * A link to an append-only or immutable file cannot be created.
         */
@@ -4178,7 +4169,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
                return -EPERM;
        if (!dir->i_op->link)
                return -EPERM;
                return -EPERM;
        if (!dir->i_op->link)
                return -EPERM;
-@@ -4519,6 +4665,330 @@ int generic_readlink(struct dentry *dent
+@@ -4571,6 +4717,330 @@ int generic_readlink(struct dentry *dent
  }
  EXPORT_SYMBOL(generic_readlink);
  
  }
  EXPORT_SYMBOL(generic_readlink);
  
@@ -4509,9 +4500,9 @@ diff -NurpP --minimal linux-4.4.116/fs/namei.c linux-4.4.116-vs2.3.9.7/fs/namei.
  /* get the link contents into pagecache */
  static char *page_getlink(struct dentry * dentry, struct page **ppage)
  {
  /* get the link contents into pagecache */
  static char *page_getlink(struct dentry * dentry, struct page **ppage)
  {
-diff -NurpP --minimal linux-4.4.116/fs/namespace.c linux-4.4.116-vs2.3.9.7/fs/namespace.c
---- linux-4.4.116/fs/namespace.c       2018-02-22 21:19:52.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/namespace.c     2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/namespace.c linux-4.4.197-vs2.3.9.8/fs/namespace.c
+--- linux-4.4.197/fs/namespace.c       2019-10-22 12:34:33.388677130 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/namespace.c     2019-02-22 08:20:34.040952763 +0000
 @@ -24,6 +24,11 @@
  #include <linux/magic.h>
  #include <linux/bootmem.h>
 @@ -24,6 +24,11 @@
  #include <linux/magic.h>
  #include <linux/bootmem.h>
@@ -4524,7 +4515,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namespace.c linux-4.4.116-vs2.3.9.7/fs/na
  #include "pnode.h"
  #include "internal.h"
  
  #include "pnode.h"
  #include "internal.h"
  
-@@ -971,6 +976,10 @@ vfs_kern_mount(struct file_system_type *
+@@ -980,6 +985,10 @@ vfs_kern_mount(struct file_system_type *
        if (!type)
                return ERR_PTR(-ENODEV);
  
        if (!type)
                return ERR_PTR(-ENODEV);
  
@@ -4535,7 +4526,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namespace.c linux-4.4.116-vs2.3.9.7/fs/na
        mnt = alloc_vfsmnt(name);
        if (!mnt)
                return ERR_PTR(-ENOMEM);
        mnt = alloc_vfsmnt(name);
        if (!mnt)
                return ERR_PTR(-ENOMEM);
-@@ -1046,6 +1055,7 @@ static struct mount *clone_mnt(struct mo
+@@ -1056,6 +1065,7 @@ static struct mount *clone_mnt(struct mo
        mnt->mnt.mnt_root = dget(root);
        mnt->mnt_mountpoint = mnt->mnt.mnt_root;
        mnt->mnt_parent = mnt;
        mnt->mnt.mnt_root = dget(root);
        mnt->mnt_mountpoint = mnt->mnt.mnt_root;
        mnt->mnt_parent = mnt;
@@ -4543,7 +4534,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namespace.c linux-4.4.116-vs2.3.9.7/fs/na
        lock_mount_hash();
        list_add_tail(&mnt->mnt_instance, &sb->s_mounts);
        unlock_mount_hash();
        lock_mount_hash();
        list_add_tail(&mnt->mnt_instance, &sb->s_mounts);
        unlock_mount_hash();
-@@ -1620,7 +1630,8 @@ out_unlock:
+@@ -1651,7 +1661,8 @@ out_unlock:
   */
  static inline bool may_mount(void)
  {
   */
  static inline bool may_mount(void)
  {
@@ -4553,7 +4544,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namespace.c linux-4.4.116-vs2.3.9.7/fs/na
  }
  
  /*
  }
  
  /*
-@@ -2121,6 +2132,7 @@ static int do_change_type(struct path *p
+@@ -2158,6 +2169,7 @@ static int do_change_type(struct path *p
                if (err)
                        goto out_unlock;
        }
                if (err)
                        goto out_unlock;
        }
@@ -4561,7 +4552,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namespace.c linux-4.4.116-vs2.3.9.7/fs/na
  
        lock_mount_hash();
        for (m = mnt; m; m = (recurse ? next_mnt(m, mnt) : NULL))
  
        lock_mount_hash();
        for (m = mnt; m; m = (recurse ? next_mnt(m, mnt) : NULL))
-@@ -2149,12 +2161,14 @@ static bool has_locked_children(struct m
+@@ -2186,12 +2198,14 @@ static bool has_locked_children(struct m
   * do loopback mount.
   */
  static int do_loopback(struct path *path, const char *old_name,
   * do loopback mount.
   */
  static int do_loopback(struct path *path, const char *old_name,
@@ -4577,7 +4568,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namespace.c linux-4.4.116-vs2.3.9.7/fs/na
        if (!old_name || !*old_name)
                return -EINVAL;
        err = kern_path(old_name, LOOKUP_FOLLOW|LOOKUP_AUTOMOUNT, &old_path);
        if (!old_name || !*old_name)
                return -EINVAL;
        err = kern_path(old_name, LOOKUP_FOLLOW|LOOKUP_AUTOMOUNT, &old_path);
-@@ -2234,7 +2248,7 @@ static int change_mount_flags(struct vfs
+@@ -2271,7 +2285,7 @@ static int change_mount_flags(struct vfs
   * on it - tough luck.
   */
  static int do_remount(struct path *path, int flags, int mnt_flags,
   * on it - tough luck.
   */
  static int do_remount(struct path *path, int flags, int mnt_flags,
@@ -4586,7 +4577,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namespace.c linux-4.4.116-vs2.3.9.7/fs/na
  {
        int err;
        struct super_block *sb = path->mnt->mnt_sb;
  {
        int err;
        struct super_block *sb = path->mnt->mnt_sb;
-@@ -2742,6 +2756,7 @@ long do_mount(const char *dev_name, cons
+@@ -2779,6 +2793,7 @@ long do_mount(const char *dev_name, cons
        struct path path;
        int retval = 0;
        int mnt_flags = 0;
        struct path path;
        int retval = 0;
        int mnt_flags = 0;
@@ -4594,7 +4585,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namespace.c linux-4.4.116-vs2.3.9.7/fs/na
  
        /* Discard magic */
        if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
  
        /* Discard magic */
        if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
-@@ -2767,6 +2782,12 @@ long do_mount(const char *dev_name, cons
+@@ -2804,6 +2819,12 @@ long do_mount(const char *dev_name, cons
        if (!(flags & MS_NOATIME))
                mnt_flags |= MNT_RELATIME;
  
        if (!(flags & MS_NOATIME))
                mnt_flags |= MNT_RELATIME;
  
@@ -4607,7 +4598,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namespace.c linux-4.4.116-vs2.3.9.7/fs/na
        /* Separate the per-mountpoint flags */
        if (flags & MS_NOSUID)
                mnt_flags |= MNT_NOSUID;
        /* Separate the per-mountpoint flags */
        if (flags & MS_NOSUID)
                mnt_flags |= MNT_NOSUID;
-@@ -2791,15 +2812,17 @@ long do_mount(const char *dev_name, cons
+@@ -2828,15 +2849,17 @@ long do_mount(const char *dev_name, cons
                mnt_flags |= path.mnt->mnt_flags & MNT_ATIME_MASK;
        }
  
                mnt_flags |= path.mnt->mnt_flags & MNT_ATIME_MASK;
        }
  
@@ -4627,7 +4618,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namespace.c linux-4.4.116-vs2.3.9.7/fs/na
        else if (flags & (MS_SHARED | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE))
                retval = do_change_type(&path, flags);
        else if (flags & MS_MOVE)
        else if (flags & (MS_SHARED | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE))
                retval = do_change_type(&path, flags);
        else if (flags & MS_MOVE)
-@@ -2919,6 +2942,7 @@ struct mnt_namespace *copy_mnt_ns(unsign
+@@ -2956,6 +2979,7 @@ struct mnt_namespace *copy_mnt_ns(unsign
                        p = next_mnt(p, old);
        }
        namespace_unlock();
                        p = next_mnt(p, old);
        }
        namespace_unlock();
@@ -4635,7 +4626,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namespace.c linux-4.4.116-vs2.3.9.7/fs/na
  
        if (rootmnt)
                mntput(rootmnt);
  
        if (rootmnt)
                mntput(rootmnt);
-@@ -3094,9 +3118,10 @@ SYSCALL_DEFINE2(pivot_root, const char _
+@@ -3131,9 +3155,10 @@ SYSCALL_DEFINE2(pivot_root, const char _
        new_mnt = real_mount(new.mnt);
        root_mnt = real_mount(root.mnt);
        old_mnt = real_mount(old.mnt);
        new_mnt = real_mount(new.mnt);
        root_mnt = real_mount(root.mnt);
        old_mnt = real_mount(old.mnt);
@@ -4648,7 +4639,7 @@ diff -NurpP --minimal linux-4.4.116/fs/namespace.c linux-4.4.116-vs2.3.9.7/fs/na
                goto out4;
        if (!check_mnt(root_mnt) || !check_mnt(new_mnt))
                goto out4;
                goto out4;
        if (!check_mnt(root_mnt) || !check_mnt(new_mnt))
                goto out4;
-@@ -3234,6 +3259,7 @@ void put_mnt_ns(struct mnt_namespace *ns
+@@ -3271,6 +3296,7 @@ void put_mnt_ns(struct mnt_namespace *ns
        if (!atomic_dec_and_test(&ns->count))
                return;
        drop_collected_mounts(&ns->root->mnt);
        if (!atomic_dec_and_test(&ns->count))
                return;
        drop_collected_mounts(&ns->root->mnt);
@@ -4656,9 +4647,9 @@ diff -NurpP --minimal linux-4.4.116/fs/namespace.c linux-4.4.116-vs2.3.9.7/fs/na
        free_mnt_ns(ns);
  }
  
        free_mnt_ns(ns);
  }
  
-diff -NurpP --minimal linux-4.4.116/fs/nfs/client.c linux-4.4.116-vs2.3.9.7/fs/nfs/client.c
---- linux-4.4.116/fs/nfs/client.c      2016-07-05 04:15:08.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/nfs/client.c    2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/nfs/client.c linux-4.4.197-vs2.3.9.8/fs/nfs/client.c
+--- linux-4.4.197/fs/nfs/client.c      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/nfs/client.c    2018-10-20 04:57:21.000000000 +0000
 @@ -583,6 +583,9 @@ int nfs_init_server_rpcclient(struct nfs
        if (server->flags & NFS_MOUNT_SOFT)
                server->client->cl_softrtry = 1;
 @@ -583,6 +583,9 @@ int nfs_init_server_rpcclient(struct nfs
        if (server->flags & NFS_MOUNT_SOFT)
                server->client->cl_softrtry = 1;
@@ -4680,9 +4671,9 @@ diff -NurpP --minimal linux-4.4.116/fs/nfs/client.c linux-4.4.116-vs2.3.9.7/fs/n
        server->maxfilesize = fsinfo->maxfilesize;
  
        server->time_delta = fsinfo->time_delta;
        server->maxfilesize = fsinfo->maxfilesize;
  
        server->time_delta = fsinfo->time_delta;
-diff -NurpP --minimal linux-4.4.116/fs/nfs/dir.c linux-4.4.116-vs2.3.9.7/fs/nfs/dir.c
---- linux-4.4.116/fs/nfs/dir.c 2018-02-22 21:19:52.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/nfs/dir.c       2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/nfs/dir.c linux-4.4.197-vs2.3.9.8/fs/nfs/dir.c
+--- linux-4.4.197/fs/nfs/dir.c 2019-10-22 12:34:34.018667063 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/nfs/dir.c       2018-10-20 04:57:21.000000000 +0000
 @@ -37,6 +37,7 @@
  #include <linux/sched.h>
  #include <linux/kmemleak.h>
 @@ -37,6 +37,7 @@
  #include <linux/sched.h>
  #include <linux/kmemleak.h>
@@ -4699,9 +4690,9 @@ diff -NurpP --minimal linux-4.4.116/fs/nfs/dir.c linux-4.4.116-vs2.3.9.7/fs/nfs/
  no_entry:
        res = d_splice_alias(inode, dentry);
        if (res != NULL) {
  no_entry:
        res = d_splice_alias(inode, dentry);
        if (res != NULL) {
-diff -NurpP --minimal linux-4.4.116/fs/nfs/inode.c linux-4.4.116-vs2.3.9.7/fs/nfs/inode.c
---- linux-4.4.116/fs/nfs/inode.c       2018-02-22 21:19:52.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/nfs/inode.c     2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/nfs/inode.c linux-4.4.197-vs2.3.9.8/fs/nfs/inode.c
+--- linux-4.4.197/fs/nfs/inode.c       2019-10-22 12:34:34.128665305 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/nfs/inode.c     2019-10-05 14:35:34.462777487 +0000
 @@ -38,6 +38,7 @@
  #include <linux/slab.h>
  #include <linux/compat.h>
 @@ -38,6 +38,7 @@
  #include <linux/slab.h>
  #include <linux/compat.h>
@@ -4764,7 +4755,7 @@ diff -NurpP --minimal linux-4.4.116/fs/nfs/inode.c linux-4.4.116-vs2.3.9.7/fs/nf
                nfs_set_cache_invalid(inode, NFS_INO_INVALID_ACCESS
                                | NFS_INO_INVALID_ACL);
        }
                nfs_set_cache_invalid(inode, NFS_INO_INVALID_ACCESS
                                | NFS_INO_INVALID_ACL);
        }
-@@ -1235,7 +1244,9 @@ static int nfs_check_inode_attributes(st
+@@ -1236,7 +1245,9 @@ static int nfs_check_inode_attributes(st
        struct nfs_inode *nfsi = NFS_I(inode);
        loff_t cur_size, new_isize;
        unsigned long invalid = 0;
        struct nfs_inode *nfsi = NFS_I(inode);
        loff_t cur_size, new_isize;
        unsigned long invalid = 0;
@@ -4775,7 +4766,7 @@ diff -NurpP --minimal linux-4.4.116/fs/nfs/inode.c linux-4.4.116-vs2.3.9.7/fs/nf
  
        if (nfs_have_delegated_attributes(inode))
                return 0;
  
        if (nfs_have_delegated_attributes(inode))
                return 0;
-@@ -1262,13 +1273,18 @@ static int nfs_check_inode_attributes(st
+@@ -1263,13 +1274,18 @@ static int nfs_check_inode_attributes(st
        if (nfsi->nrequests != 0)
                invalid &= ~NFS_INO_REVAL_PAGECACHE;
  
        if (nfsi->nrequests != 0)
                invalid &= ~NFS_INO_REVAL_PAGECACHE;
  
@@ -4796,7 +4787,7 @@ diff -NurpP --minimal linux-4.4.116/fs/nfs/inode.c linux-4.4.116-vs2.3.9.7/fs/nf
  
        /* Has the link count changed? */
        if ((fattr->valid & NFS_ATTR_FATTR_NLINK) && inode->i_nlink != fattr->nlink)
  
        /* Has the link count changed? */
        if ((fattr->valid & NFS_ATTR_FATTR_NLINK) && inode->i_nlink != fattr->nlink)
-@@ -1642,6 +1658,9 @@ static int nfs_update_inode(struct inode
+@@ -1643,6 +1659,9 @@ static int nfs_update_inode(struct inode
        unsigned long now = jiffies;
        unsigned long save_cache_validity;
        bool cache_revalidated = true;
        unsigned long now = jiffies;
        unsigned long save_cache_validity;
        bool cache_revalidated = true;
@@ -4806,7 +4797,7 @@ diff -NurpP --minimal linux-4.4.116/fs/nfs/inode.c linux-4.4.116-vs2.3.9.7/fs/nf
  
        dfprintk(VFS, "NFS: %s(%s/%lu fh_crc=0x%08x ct=%d info=0x%x)\n",
                        __func__, inode->i_sb->s_id, inode->i_ino,
  
        dfprintk(VFS, "NFS: %s(%s/%lu fh_crc=0x%08x ct=%d info=0x%x)\n",
                        __func__, inode->i_sb->s_id, inode->i_ino,
-@@ -1752,6 +1771,9 @@ static int nfs_update_inode(struct inode
+@@ -1753,6 +1772,9 @@ static int nfs_update_inode(struct inode
                cache_revalidated = false;
        }
  
                cache_revalidated = false;
        }
  
@@ -4816,7 +4807,7 @@ diff -NurpP --minimal linux-4.4.116/fs/nfs/inode.c linux-4.4.116-vs2.3.9.7/fs/nf
  
        if (fattr->valid & NFS_ATTR_FATTR_ATIME)
                memcpy(&inode->i_atime, &fattr->atime, sizeof(inode->i_atime));
  
        if (fattr->valid & NFS_ATTR_FATTR_ATIME)
                memcpy(&inode->i_atime, &fattr->atime, sizeof(inode->i_atime));
-@@ -1806,6 +1828,10 @@ static int nfs_update_inode(struct inode
+@@ -1807,6 +1829,10 @@ static int nfs_update_inode(struct inode
                cache_revalidated = false;
        }
  
                cache_revalidated = false;
        }
  
@@ -4827,9 +4818,9 @@ diff -NurpP --minimal linux-4.4.116/fs/nfs/inode.c linux-4.4.116-vs2.3.9.7/fs/nf
        if (fattr->valid & NFS_ATTR_FATTR_NLINK) {
                if (inode->i_nlink != fattr->nlink) {
                        invalid |= NFS_INO_INVALID_ATTR;
        if (fattr->valid & NFS_ATTR_FATTR_NLINK) {
                if (inode->i_nlink != fattr->nlink) {
                        invalid |= NFS_INO_INVALID_ATTR;
-diff -NurpP --minimal linux-4.4.116/fs/nfs/nfs3xdr.c linux-4.4.116-vs2.3.9.7/fs/nfs/nfs3xdr.c
---- linux-4.4.116/fs/nfs/nfs3xdr.c     2016-07-05 04:12:33.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/nfs/nfs3xdr.c   2018-01-09 17:17:07.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/nfs/nfs3xdr.c linux-4.4.197-vs2.3.9.8/fs/nfs/nfs3xdr.c
+--- linux-4.4.197/fs/nfs/nfs3xdr.c     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/nfs/nfs3xdr.c   2018-10-20 04:57:21.000000000 +0000
 @@ -20,6 +20,7 @@
  #include <linux/nfs3.h>
  #include <linux/nfs_fs.h>
 @@ -20,6 +20,7 @@
  #include <linux/nfs3.h>
  #include <linux/nfs_fs.h>
@@ -4975,9 +4966,9 @@ diff -NurpP --minimal linux-4.4.116/fs/nfs/nfs3xdr.c linux-4.4.116-vs2.3.9.7/fs/
  }
  
  /*
  }
  
  /*
-diff -NurpP --minimal linux-4.4.116/fs/nfs/super.c linux-4.4.116-vs2.3.9.7/fs/nfs/super.c
---- linux-4.4.116/fs/nfs/super.c       2018-02-22 21:19:52.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/nfs/super.c     2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/nfs/super.c linux-4.4.197-vs2.3.9.8/fs/nfs/super.c
+--- linux-4.4.197/fs/nfs/super.c       2019-10-22 12:34:34.278662909 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/nfs/super.c     2019-10-05 14:35:34.622774949 +0000
 @@ -54,6 +54,7 @@
  #include <linux/parser.h>
  #include <linux/nsproxy.h>
 @@ -54,6 +54,7 @@
  #include <linux/parser.h>
  #include <linux/nsproxy.h>
@@ -5051,9 +5042,9 @@ diff -NurpP --minimal linux-4.4.116/fs/nfs/super.c linux-4.4.116-vs2.3.9.7/fs/nf
  
                /*
                 * options that take text values
  
                /*
                 * options that take text values
-diff -NurpP --minimal linux-4.4.116/fs/nfsd/auth.c linux-4.4.116-vs2.3.9.7/fs/nfsd/auth.c
---- linux-4.4.116/fs/nfsd/auth.c       2018-02-22 21:19:52.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/nfsd/auth.c     2018-02-10 15:16:50.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/nfsd/auth.c linux-4.4.197-vs2.3.9.8/fs/nfsd/auth.c
+--- linux-4.4.197/fs/nfsd/auth.c       2019-10-22 12:34:34.608657638 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/nfsd/auth.c     2018-10-20 04:57:21.000000000 +0000
 @@ -1,6 +1,7 @@
  /* Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> */
  
 @@ -1,6 +1,7 @@
  /* Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> */
  
@@ -5072,9 +5063,9 @@ diff -NurpP --minimal linux-4.4.116/fs/nfsd/auth.c linux-4.4.116-vs2.3.9.7/fs/nf
  
        rqgi = rqstp->rq_cred.cr_group_info;
  
  
        rqgi = rqstp->rq_cred.cr_group_info;
  
-diff -NurpP --minimal linux-4.4.116/fs/nfsd/nfs3xdr.c linux-4.4.116-vs2.3.9.7/fs/nfsd/nfs3xdr.c
---- linux-4.4.116/fs/nfsd/nfs3xdr.c    2018-02-22 21:19:52.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/nfsd/nfs3xdr.c  2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/nfsd/nfs3xdr.c linux-4.4.197-vs2.3.9.8/fs/nfsd/nfs3xdr.c
+--- linux-4.4.197/fs/nfsd/nfs3xdr.c    2019-10-22 12:34:34.648656997 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/nfsd/nfs3xdr.c  2019-10-05 14:35:34.682773996 +0000
 @@ -8,6 +8,7 @@
  
  #include <linux/namei.h>
 @@ -8,6 +8,7 @@
  
  #include <linux/namei.h>
@@ -5128,9 +5119,9 @@ diff -NurpP --minimal linux-4.4.116/fs/nfsd/nfs3xdr.c linux-4.4.116-vs2.3.9.7/fs
        if (S_ISLNK(stat->mode) && stat->size > NFS3_MAXPATHLEN) {
                p = xdr_encode_hyper(p, (u64) NFS3_MAXPATHLEN);
        } else {
        if (S_ISLNK(stat->mode) && stat->size > NFS3_MAXPATHLEN) {
                p = xdr_encode_hyper(p, (u64) NFS3_MAXPATHLEN);
        } else {
-diff -NurpP --minimal linux-4.4.116/fs/nfsd/nfs4xdr.c linux-4.4.116-vs2.3.9.7/fs/nfsd/nfs4xdr.c
---- linux-4.4.116/fs/nfsd/nfs4xdr.c    2018-02-22 21:19:53.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/nfsd/nfs4xdr.c  2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/nfsd/nfs4xdr.c linux-4.4.197-vs2.3.9.8/fs/nfsd/nfs4xdr.c
+--- linux-4.4.197/fs/nfsd/nfs4xdr.c    2019-10-22 12:34:34.708656037 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/nfsd/nfs4xdr.c  2018-10-20 05:50:20.000000000 +0000
 @@ -40,6 +40,7 @@
  #include <linux/utsname.h>
  #include <linux/pagemap.h>
 @@ -40,6 +40,7 @@
  #include <linux/utsname.h>
  #include <linux/pagemap.h>
@@ -5139,7 +5130,7 @@ diff -NurpP --minimal linux-4.4.116/fs/nfsd/nfs4xdr.c linux-4.4.116-vs2.3.9.7/fs
  
  #include "idmap.h"
  #include "acl.h"
  
  #include "idmap.h"
  #include "acl.h"
-@@ -2637,12 +2638,16 @@ out_acl:
+@@ -2639,12 +2640,16 @@ out_acl:
                *p++ = cpu_to_be32(stat.nlink);
        }
        if (bmval1 & FATTR4_WORD1_OWNER) {
                *p++ = cpu_to_be32(stat.nlink);
        }
        if (bmval1 & FATTR4_WORD1_OWNER) {
@@ -5158,9 +5149,9 @@ diff -NurpP --minimal linux-4.4.116/fs/nfsd/nfs4xdr.c linux-4.4.116-vs2.3.9.7/fs
                if (status)
                        goto out;
        }
                if (status)
                        goto out;
        }
-diff -NurpP --minimal linux-4.4.116/fs/nfsd/nfsxdr.c linux-4.4.116-vs2.3.9.7/fs/nfsd/nfsxdr.c
---- linux-4.4.116/fs/nfsd/nfsxdr.c     2018-02-22 21:19:53.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/nfsd/nfsxdr.c   2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/nfsd/nfsxdr.c linux-4.4.197-vs2.3.9.8/fs/nfsd/nfsxdr.c
+--- linux-4.4.197/fs/nfsd/nfsxdr.c     2019-10-22 12:34:34.718655878 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/nfsd/nfsxdr.c   2018-10-20 04:57:21.000000000 +0000
 @@ -7,6 +7,7 @@
  #include "vfs.h"
  #include "xdr.h"
 @@ -7,6 +7,7 @@
  #include "vfs.h"
  #include "xdr.h"
@@ -5212,9 +5203,9 @@ diff -NurpP --minimal linux-4.4.116/fs/nfsd/nfsxdr.c linux-4.4.116-vs2.3.9.7/fs/
  
        if (S_ISLNK(type) && stat->size > NFS_MAXPATHLEN) {
                *p++ = htonl(NFS_MAXPATHLEN);
  
        if (S_ISLNK(type) && stat->size > NFS_MAXPATHLEN) {
                *p++ = htonl(NFS_MAXPATHLEN);
-diff -NurpP --minimal linux-4.4.116/fs/ocfs2/dlmglue.c linux-4.4.116-vs2.3.9.7/fs/ocfs2/dlmglue.c
---- linux-4.4.116/fs/ocfs2/dlmglue.c   2018-02-22 21:19:53.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ocfs2/dlmglue.c 2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ocfs2/dlmglue.c linux-4.4.197-vs2.3.9.8/fs/ocfs2/dlmglue.c
+--- linux-4.4.197/fs/ocfs2/dlmglue.c   2019-10-22 12:34:35.158648847 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ocfs2/dlmglue.c 2018-10-20 04:57:21.000000000 +0000
 @@ -2128,6 +2128,7 @@ static void __ocfs2_stuff_meta_lvb(struc
        lvb->lvb_iclusters = cpu_to_be32(oi->ip_clusters);
        lvb->lvb_iuid      = cpu_to_be32(i_uid_read(inode));
 @@ -2128,6 +2128,7 @@ static void __ocfs2_stuff_meta_lvb(struc
        lvb->lvb_iclusters = cpu_to_be32(oi->ip_clusters);
        lvb->lvb_iuid      = cpu_to_be32(i_uid_read(inode));
@@ -5231,9 +5222,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ocfs2/dlmglue.c linux-4.4.116-vs2.3.9.7/f
        inode->i_mode    = be16_to_cpu(lvb->lvb_imode);
        set_nlink(inode, be16_to_cpu(lvb->lvb_inlink));
        ocfs2_unpack_timespec(&inode->i_atime,
        inode->i_mode    = be16_to_cpu(lvb->lvb_imode);
        set_nlink(inode, be16_to_cpu(lvb->lvb_inlink));
        ocfs2_unpack_timespec(&inode->i_atime,
-diff -NurpP --minimal linux-4.4.116/fs/ocfs2/dlmglue.h linux-4.4.116-vs2.3.9.7/fs/ocfs2/dlmglue.h
---- linux-4.4.116/fs/ocfs2/dlmglue.h   2018-02-22 21:19:53.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ocfs2/dlmglue.h 2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ocfs2/dlmglue.h linux-4.4.197-vs2.3.9.8/fs/ocfs2/dlmglue.h
+--- linux-4.4.197/fs/ocfs2/dlmglue.h   2019-10-22 12:34:35.158648847 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ocfs2/dlmglue.h 2018-10-20 04:57:21.000000000 +0000
 @@ -46,7 +46,8 @@ struct ocfs2_meta_lvb {
        __be16       lvb_inlink;
        __be32       lvb_iattr;
 @@ -46,7 +46,8 @@ struct ocfs2_meta_lvb {
        __be16       lvb_inlink;
        __be32       lvb_iattr;
@@ -5244,9 +5235,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ocfs2/dlmglue.h linux-4.4.116-vs2.3.9.7/f
  };
  
  #define OCFS2_QINFO_LVB_VERSION 1
  };
  
  #define OCFS2_QINFO_LVB_VERSION 1
-diff -NurpP --minimal linux-4.4.116/fs/ocfs2/file.c linux-4.4.116-vs2.3.9.7/fs/ocfs2/file.c
---- linux-4.4.116/fs/ocfs2/file.c      2018-02-22 21:19:53.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ocfs2/file.c    2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ocfs2/file.c linux-4.4.197-vs2.3.9.8/fs/ocfs2/file.c
+--- linux-4.4.197/fs/ocfs2/file.c      2019-10-22 12:34:35.158648847 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ocfs2/file.c    2018-10-20 04:57:21.000000000 +0000
 @@ -1151,7 +1151,7 @@ int ocfs2_setattr(struct dentry *dentry,
                attr->ia_valid &= ~ATTR_SIZE;
  
 @@ -1151,7 +1151,7 @@ int ocfs2_setattr(struct dentry *dentry,
                attr->ia_valid &= ~ATTR_SIZE;
  
@@ -5256,9 +5247,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ocfs2/file.c linux-4.4.116-vs2.3.9.7/fs/o
        if (!(attr->ia_valid & OCFS2_VALID_ATTRS))
                return 0;
  
        if (!(attr->ia_valid & OCFS2_VALID_ATTRS))
                return 0;
  
-diff -NurpP --minimal linux-4.4.116/fs/ocfs2/inode.c linux-4.4.116-vs2.3.9.7/fs/ocfs2/inode.c
---- linux-4.4.116/fs/ocfs2/inode.c     2016-07-05 04:12:34.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ocfs2/inode.c   2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ocfs2/inode.c linux-4.4.197-vs2.3.9.8/fs/ocfs2/inode.c
+--- linux-4.4.197/fs/ocfs2/inode.c     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ocfs2/inode.c   2018-10-20 04:57:21.000000000 +0000
 @@ -28,6 +28,7 @@
  #include <linux/highmem.h>
  #include <linux/pagemap.h>
 @@ -28,6 +28,7 @@
  #include <linux/highmem.h>
  #include <linux/pagemap.h>
@@ -5355,9 +5346,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ocfs2/inode.c linux-4.4.116-vs2.3.9.7/fs/
  
        /* Fast symlinks will have i_size but no allocated clusters. */
        if (S_ISLNK(inode->i_mode) && !fe->i_clusters) {
  
        /* Fast symlinks will have i_size but no allocated clusters. */
        if (S_ISLNK(inode->i_mode) && !fe->i_clusters) {
-diff -NurpP --minimal linux-4.4.116/fs/ocfs2/inode.h linux-4.4.116-vs2.3.9.7/fs/ocfs2/inode.h
---- linux-4.4.116/fs/ocfs2/inode.h     2016-07-05 04:15:08.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ocfs2/inode.h   2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ocfs2/inode.h linux-4.4.197-vs2.3.9.8/fs/ocfs2/inode.h
+--- linux-4.4.197/fs/ocfs2/inode.h     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ocfs2/inode.h   2018-10-20 04:57:21.000000000 +0000
 @@ -161,6 +161,7 @@ struct buffer_head *ocfs2_bread(struct i
  
  void ocfs2_set_inode_flags(struct inode *inode);
 @@ -161,6 +161,7 @@ struct buffer_head *ocfs2_bread(struct i
  
  void ocfs2_set_inode_flags(struct inode *inode);
@@ -5366,9 +5357,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ocfs2/inode.h linux-4.4.116-vs2.3.9.7/fs/
  
  static inline blkcnt_t ocfs2_inode_sector_count(struct inode *inode)
  {
  
  static inline blkcnt_t ocfs2_inode_sector_count(struct inode *inode)
  {
-diff -NurpP --minimal linux-4.4.116/fs/ocfs2/ioctl.c linux-4.4.116-vs2.3.9.7/fs/ocfs2/ioctl.c
---- linux-4.4.116/fs/ocfs2/ioctl.c     2015-10-29 09:21:37.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ocfs2/ioctl.c   2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ocfs2/ioctl.c linux-4.4.197-vs2.3.9.8/fs/ocfs2/ioctl.c
+--- linux-4.4.197/fs/ocfs2/ioctl.c     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ocfs2/ioctl.c   2018-10-20 04:57:21.000000000 +0000
 @@ -76,7 +76,41 @@ static int ocfs2_get_inode_attr(struct i
        return status;
  }
 @@ -76,7 +76,41 @@ static int ocfs2_get_inode_attr(struct i
        return status;
  }
@@ -5432,9 +5423,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ocfs2/ioctl.c linux-4.4.116-vs2.3.9.7/fs/
  long ocfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
  {
        struct inode *inode = file_inode(filp);
  long ocfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
  {
        struct inode *inode = file_inode(filp);
-diff -NurpP --minimal linux-4.4.116/fs/ocfs2/namei.c linux-4.4.116-vs2.3.9.7/fs/ocfs2/namei.c
---- linux-4.4.116/fs/ocfs2/namei.c     2018-02-22 21:19:53.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ocfs2/namei.c   2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ocfs2/namei.c linux-4.4.197-vs2.3.9.8/fs/ocfs2/namei.c
+--- linux-4.4.197/fs/ocfs2/namei.c     2019-10-22 12:34:35.168648690 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ocfs2/namei.c   2018-10-20 04:57:21.000000000 +0000
 @@ -41,6 +41,7 @@
  #include <linux/slab.h>
  #include <linux/highmem.h>
 @@ -41,6 +41,7 @@
  #include <linux/slab.h>
  #include <linux/highmem.h>
@@ -5467,20 +5458,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ocfs2/namei.c linux-4.4.116-vs2.3.9.7/fs/
        fe->i_mode = cpu_to_le16(inode->i_mode);
        if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
                fe->id1.dev1.i_rdev = cpu_to_le64(huge_encode_dev(dev));
        fe->i_mode = cpu_to_le16(inode->i_mode);
        if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
                fe->id1.dev1.i_rdev = cpu_to_le64(huge_encode_dev(dev));
-diff -NurpP --minimal linux-4.4.116/fs/ocfs2/ocfs2.h linux-4.4.116-vs2.3.9.7/fs/ocfs2/ocfs2.h
---- linux-4.4.116/fs/ocfs2/ocfs2.h     2018-02-22 21:19:53.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ocfs2/ocfs2.h   2018-01-09 17:21:54.000000000 +0000
-@@ -289,6 +289,7 @@ enum ocfs2_mount_options
-       OCFS2_MOUNT_JOURNAL_ASYNC_COMMIT = 1 << 15,  /* Journal Async Commit */
-       OCFS2_MOUNT_ERRORS_CONT = 1 << 16, /* Return EIO to the calling process on error */
-       OCFS2_MOUNT_ERRORS_ROFS = 1 << 17, /* Change filesystem to read-only on error */
-+      OCFS2_MOUNT_TAGGED = 1 << 18, /* use tagging */
- };
- #define OCFS2_OSB_SOFT_RO     0x0001
-diff -NurpP --minimal linux-4.4.116/fs/ocfs2/ocfs2_fs.h linux-4.4.116-vs2.3.9.7/fs/ocfs2/ocfs2_fs.h
---- linux-4.4.116/fs/ocfs2/ocfs2_fs.h  2016-07-05 04:12:34.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ocfs2/ocfs2_fs.h        2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ocfs2/ocfs2_fs.h linux-4.4.197-vs2.3.9.8/fs/ocfs2/ocfs2_fs.h
+--- linux-4.4.197/fs/ocfs2/ocfs2_fs.h  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ocfs2/ocfs2_fs.h        2018-10-20 04:57:21.000000000 +0000
 @@ -275,6 +275,11 @@
  #define OCFS2_TOPDIR_FL                       FS_TOPDIR_FL    /* Top of directory hierarchies*/
  #define OCFS2_RESERVED_FL             FS_RESERVED_FL  /* reserved for ext2 lib */
 @@ -275,6 +275,11 @@
  #define OCFS2_TOPDIR_FL                       FS_TOPDIR_FL    /* Top of directory hierarchies*/
  #define OCFS2_RESERVED_FL             FS_RESERVED_FL  /* reserved for ext2 lib */
@@ -5493,9 +5473,20 @@ diff -NurpP --minimal linux-4.4.116/fs/ocfs2/ocfs2_fs.h linux-4.4.116-vs2.3.9.7/
  #define OCFS2_FL_VISIBLE              FS_FL_USER_VISIBLE      /* User visible flags */
  #define OCFS2_FL_MODIFIABLE           FS_FL_USER_MODIFIABLE   /* User modifiable flags */
  
  #define OCFS2_FL_VISIBLE              FS_FL_USER_VISIBLE      /* User visible flags */
  #define OCFS2_FL_MODIFIABLE           FS_FL_USER_MODIFIABLE   /* User modifiable flags */
  
-diff -NurpP --minimal linux-4.4.116/fs/ocfs2/super.c linux-4.4.116-vs2.3.9.7/fs/ocfs2/super.c
---- linux-4.4.116/fs/ocfs2/super.c     2016-07-05 04:12:34.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/ocfs2/super.c   2018-01-09 17:22:51.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/ocfs2/ocfs2.h linux-4.4.197-vs2.3.9.8/fs/ocfs2/ocfs2.h
+--- linux-4.4.197/fs/ocfs2/ocfs2.h     2019-10-22 12:34:35.168648690 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ocfs2/ocfs2.h   2018-10-20 04:57:21.000000000 +0000
+@@ -289,6 +289,7 @@ enum ocfs2_mount_options
+       OCFS2_MOUNT_JOURNAL_ASYNC_COMMIT = 1 << 15,  /* Journal Async Commit */
+       OCFS2_MOUNT_ERRORS_CONT = 1 << 16, /* Return EIO to the calling process on error */
+       OCFS2_MOUNT_ERRORS_ROFS = 1 << 17, /* Change filesystem to read-only on error */
++      OCFS2_MOUNT_TAGGED = 1 << 18, /* use tagging */
+ };
+ #define OCFS2_OSB_SOFT_RO     0x0001
+diff -NurpP --minimal linux-4.4.197/fs/ocfs2/super.c linux-4.4.197-vs2.3.9.8/fs/ocfs2/super.c
+--- linux-4.4.197/fs/ocfs2/super.c     2019-10-22 12:34:35.168648690 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/ocfs2/super.c   2018-10-20 04:57:21.000000000 +0000
 @@ -193,6 +193,7 @@ enum {
        Opt_dir_resv_level,
        Opt_journal_async_commit,
 @@ -193,6 +193,7 @@ enum {
        Opt_dir_resv_level,
        Opt_journal_async_commit,
@@ -5514,7 +5505,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ocfs2/super.c linux-4.4.116-vs2.3.9.7/fs/
        {Opt_err, NULL}
  };
  
        {Opt_err, NULL}
  };
  
-@@ -677,6 +681,13 @@ static int ocfs2_remount(struct super_bl
+@@ -676,6 +680,13 @@ static int ocfs2_remount(struct super_bl
                goto out;
        }
  
                goto out;
        }
  
@@ -5528,7 +5519,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ocfs2/super.c linux-4.4.116-vs2.3.9.7/fs/
        /* We're going to/from readonly mode. */
        if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) {
                /* Disable quota accounting before remounting RO */
        /* We're going to/from readonly mode. */
        if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) {
                /* Disable quota accounting before remounting RO */
-@@ -1166,6 +1177,9 @@ static int ocfs2_fill_super(struct super
+@@ -1165,6 +1176,9 @@ static int ocfs2_fill_super(struct super
  
        ocfs2_complete_mount_recovery(osb);
  
  
        ocfs2_complete_mount_recovery(osb);
  
@@ -5538,7 +5529,7 @@ diff -NurpP --minimal linux-4.4.116/fs/ocfs2/super.c linux-4.4.116-vs2.3.9.7/fs/
        if (ocfs2_mount_local(osb))
                snprintf(nodestr, sizeof(nodestr), "local");
        else
        if (ocfs2_mount_local(osb))
                snprintf(nodestr, sizeof(nodestr), "local");
        else
-@@ -1486,6 +1500,20 @@ static int ocfs2_parse_options(struct su
+@@ -1485,6 +1499,20 @@ static int ocfs2_parse_options(struct su
                case Opt_journal_async_commit:
                        mopt->mount_opt |= OCFS2_MOUNT_JOURNAL_ASYNC_COMMIT;
                        break;
                case Opt_journal_async_commit:
                        mopt->mount_opt |= OCFS2_MOUNT_JOURNAL_ASYNC_COMMIT;
                        break;
@@ -5559,9 +5550,9 @@ diff -NurpP --minimal linux-4.4.116/fs/ocfs2/super.c linux-4.4.116-vs2.3.9.7/fs/
                default:
                        mlog(ML_ERROR,
                             "Unrecognized mount option \"%s\" "
                default:
                        mlog(ML_ERROR,
                             "Unrecognized mount option \"%s\" "
-diff -NurpP --minimal linux-4.4.116/fs/open.c linux-4.4.116-vs2.3.9.7/fs/open.c
---- linux-4.4.116/fs/open.c    2018-02-22 21:19:53.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/open.c  2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/open.c linux-4.4.197-vs2.3.9.8/fs/open.c
+--- linux-4.4.197/fs/open.c    2019-10-22 12:34:35.188648370 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/open.c  2019-10-05 14:35:34.862771141 +0000
 @@ -31,6 +31,11 @@
  #include <linux/ima.h>
  #include <linux/dnotify.h>
 @@ -31,6 +31,11 @@
  #include <linux/ima.h>
  #include <linux/dnotify.h>
@@ -5586,7 +5577,7 @@ diff -NurpP --minimal linux-4.4.116/fs/open.c linux-4.4.116-vs2.3.9.7/fs/open.c
        inode = path->dentry->d_inode;
  
        /* For directories it's -EISDIR, for other non-regulars - -EINVAL */
        inode = path->dentry->d_inode;
  
        /* For directories it's -EISDIR, for other non-regulars - -EINVAL */
-@@ -548,6 +558,13 @@ SYSCALL_DEFINE3(fchmodat, int, dfd, cons
+@@ -567,6 +577,13 @@ SYSCALL_DEFINE3(fchmodat, int, dfd, cons
        unsigned int lookup_flags = LOOKUP_FOLLOW;
  retry:
        error = user_path_at(dfd, filename, lookup_flags, &path);
        unsigned int lookup_flags = LOOKUP_FOLLOW;
  retry:
        error = user_path_at(dfd, filename, lookup_flags, &path);
@@ -5600,7 +5591,7 @@ diff -NurpP --minimal linux-4.4.116/fs/open.c linux-4.4.116-vs2.3.9.7/fs/open.c
        if (!error) {
                error = chmod_common(&path, mode);
                path_put(&path);
        if (!error) {
                error = chmod_common(&path, mode);
                path_put(&path);
-@@ -582,13 +599,15 @@ retry_deleg:
+@@ -601,13 +618,15 @@ retry_deleg:
                if (!uid_valid(uid))
                        return -EINVAL;
                newattrs.ia_valid |= ATTR_UID;
                if (!uid_valid(uid))
                        return -EINVAL;
                newattrs.ia_valid |= ATTR_UID;
@@ -5618,7 +5609,7 @@ diff -NurpP --minimal linux-4.4.116/fs/open.c linux-4.4.116-vs2.3.9.7/fs/open.c
        }
        if (!S_ISDIR(inode->i_mode))
                newattrs.ia_valid |=
        }
        if (!S_ISDIR(inode->i_mode))
                newattrs.ia_valid |=
-@@ -626,6 +645,10 @@ retry:
+@@ -645,6 +664,10 @@ retry:
        error = mnt_want_write(path.mnt);
        if (error)
                goto out_release;
        error = mnt_want_write(path.mnt);
        if (error)
                goto out_release;
@@ -5629,10 +5620,10 @@ diff -NurpP --minimal linux-4.4.116/fs/open.c linux-4.4.116-vs2.3.9.7/fs/open.c
        error = chown_common(&path, user, group);
        mnt_drop_write(path.mnt);
  out_release:
        error = chown_common(&path, user, group);
        mnt_drop_write(path.mnt);
  out_release:
-diff -NurpP --minimal linux-4.4.116/fs/proc/array.c linux-4.4.116-vs2.3.9.7/fs/proc/array.c
---- linux-4.4.116/fs/proc/array.c      2018-02-22 21:19:53.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/proc/array.c    2018-01-09 17:30:44.000000000 +0000
-@@ -83,6 +83,8 @@
+diff -NurpP --minimal linux-4.4.197/fs/proc/array.c linux-4.4.197-vs2.3.9.8/fs/proc/array.c
+--- linux-4.4.197/fs/proc/array.c      2019-10-22 12:34:35.328646133 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/proc/array.c    2019-02-22 08:20:34.160950722 +0000
+@@ -84,6 +84,8 @@
  #include <linux/tracehook.h>
  #include <linux/string_helpers.h>
  #include <linux/user_namespace.h>
  #include <linux/tracehook.h>
  #include <linux/string_helpers.h>
  #include <linux/user_namespace.h>
@@ -5641,7 +5632,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/array.c linux-4.4.116-vs2.3.9.7/fs/p
  
  #include <asm/pgtable.h>
  #include <asm/processor.h>
  
  #include <asm/pgtable.h>
  #include <asm/processor.h>
-@@ -154,6 +156,9 @@ static inline void task_state(struct seq
+@@ -155,6 +157,9 @@ static inline void task_state(struct seq
        ppid = pid_alive(p) ?
                task_tgid_nr_ns(rcu_dereference(p->real_parent), ns) : 0;
  
        ppid = pid_alive(p) ?
                task_tgid_nr_ns(rcu_dereference(p->real_parent), ns) : 0;
  
@@ -5651,7 +5642,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/array.c linux-4.4.116-vs2.3.9.7/fs/p
        tracer = ptrace_parent(p);
        if (tracer)
                tpid = task_pid_nr_ns(tracer, ns);
        tracer = ptrace_parent(p);
        if (tracer)
                tpid = task_pid_nr_ns(tracer, ns);
-@@ -292,8 +297,8 @@ static inline void task_sig(struct seq_f
+@@ -293,8 +298,8 @@ static inline void task_sig(struct seq_f
        render_sigset_t(m, "SigCgt:\t", &caught);
  }
  
        render_sigset_t(m, "SigCgt:\t", &caught);
  }
  
@@ -5662,7 +5653,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/array.c linux-4.4.116-vs2.3.9.7/fs/p
  {
        unsigned __capi;
  
  {
        unsigned __capi;
  
-@@ -320,11 +325,12 @@ static inline void task_cap(struct seq_f
+@@ -321,11 +326,12 @@ static inline void task_cap(struct seq_f
        cap_ambient     = cred->cap_ambient;
        rcu_read_unlock();
  
        cap_ambient     = cred->cap_ambient;
        rcu_read_unlock();
  
@@ -5680,7 +5671,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/array.c linux-4.4.116-vs2.3.9.7/fs/p
  }
  
  static inline void task_seccomp(struct seq_file *m, struct task_struct *p)
  }
  
  static inline void task_seccomp(struct seq_file *m, struct task_struct *p)
-@@ -351,6 +357,43 @@ static void task_cpus_allowed(struct seq
+@@ -377,6 +383,43 @@ static void task_cpus_allowed(struct seq
                   cpumask_pr_args(&task->cpus_allowed));
  }
  
                   cpumask_pr_args(&task->cpus_allowed));
  }
  
@@ -5724,7 +5715,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/array.c linux-4.4.116-vs2.3.9.7/fs/p
  int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
                        struct pid *pid, struct task_struct *task)
  {
  int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
                        struct pid *pid, struct task_struct *task)
  {
-@@ -368,6 +411,7 @@ int proc_pid_status(struct seq_file *m,
+@@ -394,6 +437,7 @@ int proc_pid_status(struct seq_file *m,
        task_seccomp(m, task);
        task_cpus_allowed(m, task);
        cpuset_task_status_allowed(m, task);
        task_seccomp(m, task);
        task_cpus_allowed(m, task);
        cpuset_task_status_allowed(m, task);
@@ -5732,7 +5723,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/array.c linux-4.4.116-vs2.3.9.7/fs/p
        task_context_switch_counts(m, task);
        return 0;
  }
        task_context_switch_counts(m, task);
        return 0;
  }
-@@ -471,6 +515,17 @@ static int do_task_stat(struct seq_file
+@@ -497,6 +541,17 @@ static int do_task_stat(struct seq_file
        /* convert nsec -> ticks */
        start_time = nsec_to_clock_t(task->real_start_time);
  
        /* convert nsec -> ticks */
        start_time = nsec_to_clock_t(task->real_start_time);
  
@@ -5750,9 +5741,9 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/array.c linux-4.4.116-vs2.3.9.7/fs/p
        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);
        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.4.116/fs/proc/base.c linux-4.4.116-vs2.3.9.7/fs/proc/base.c
---- linux-4.4.116/fs/proc/base.c       2018-02-22 21:19:53.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/proc/base.c     2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/proc/base.c linux-4.4.197-vs2.3.9.8/fs/proc/base.c
+--- linux-4.4.197/fs/proc/base.c       2019-10-22 12:34:35.338645971 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/proc/base.c     2019-02-22 08:20:34.200950045 +0000
 @@ -87,6 +87,8 @@
  #include <linux/slab.h>
  #include <linux/flex_array.h>
 @@ -87,6 +87,8 @@
  #include <linux/slab.h>
  #include <linux/flex_array.h>
@@ -5762,7 +5753,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/base.c linux-4.4.116-vs2.3.9.7/fs/pr
  #ifdef CONFIG_HARDWALL
  #include <asm/hardwall.h>
  #endif
  #ifdef CONFIG_HARDWALL
  #include <asm/hardwall.h>
  #endif
-@@ -1097,11 +1099,15 @@ static ssize_t oom_adj_write(struct file
+@@ -1125,11 +1127,15 @@ static ssize_t oom_adj_write(struct file
                oom_adj = (oom_adj * OOM_SCORE_ADJ_MAX) / -OOM_DISABLE;
  
        if (oom_adj < task->signal->oom_score_adj &&
                oom_adj = (oom_adj * OOM_SCORE_ADJ_MAX) / -OOM_DISABLE;
  
        if (oom_adj < task->signal->oom_score_adj &&
@@ -5779,7 +5770,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/base.c linux-4.4.116-vs2.3.9.7/fs/pr
        /*
         * /proc/pid/oom_adj is provided for legacy purposes, ask users to use
         * /proc/pid/oom_score_adj instead.
        /*
         * /proc/pid/oom_adj is provided for legacy purposes, ask users to use
         * /proc/pid/oom_score_adj instead.
-@@ -1666,6 +1672,8 @@ struct inode *proc_pid_make_inode(struct
+@@ -1694,6 +1700,8 @@ struct inode *proc_pid_make_inode(struct
                inode->i_gid = cred->egid;
                rcu_read_unlock();
        }
                inode->i_gid = cred->egid;
                rcu_read_unlock();
        }
@@ -5788,7 +5779,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/base.c linux-4.4.116-vs2.3.9.7/fs/pr
        security_task_to_inode(task, inode);
  
  out:
        security_task_to_inode(task, inode);
  
  out:
-@@ -1711,6 +1719,8 @@ int pid_getattr(struct vfsmount *mnt, st
+@@ -1739,6 +1747,8 @@ int pid_getattr(struct vfsmount *mnt, st
  
  /* dentry stuff */
  
  
  /* dentry stuff */
  
@@ -5797,7 +5788,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/base.c linux-4.4.116-vs2.3.9.7/fs/pr
  /*
   *    Exceptional case: normally we are not allowed to unhash a busy
   * directory. In this case, however, we can do it - no aliasing problems
  /*
   *    Exceptional case: normally we are not allowed to unhash a busy
   * directory. In this case, however, we can do it - no aliasing problems
-@@ -1739,6 +1749,19 @@ int pid_revalidate(struct dentry *dentry
+@@ -1767,6 +1777,19 @@ int pid_revalidate(struct dentry *dentry
        task = get_proc_task(inode);
  
        if (task) {
        task = get_proc_task(inode);
  
        if (task) {
@@ -5817,7 +5808,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/base.c linux-4.4.116-vs2.3.9.7/fs/pr
                if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) ||
                    task_dumpable(task)) {
                        rcu_read_lock();
                if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) ||
                    task_dumpable(task)) {
                        rcu_read_lock();
-@@ -2283,6 +2306,13 @@ static struct dentry *proc_pident_lookup
+@@ -2336,6 +2359,13 @@ static struct dentry *proc_pident_lookup
        if (!task)
                goto out_no_task;
  
        if (!task)
                goto out_no_task;
  
@@ -5831,7 +5822,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/base.c linux-4.4.116-vs2.3.9.7/fs/pr
        /*
         * Yes, it does not scale. And it should not. Don't add
         * new entries into /proc/<tgid>/ without very good reasons.
        /*
         * Yes, it does not scale. And it should not. Don't add
         * new entries into /proc/<tgid>/ without very good reasons.
-@@ -2725,6 +2755,11 @@ static int proc_pid_personality(struct s
+@@ -2778,6 +2808,11 @@ static int proc_pid_personality(struct s
  static const struct file_operations proc_task_operations;
  static const struct inode_operations proc_task_inode_operations;
  
  static const struct file_operations proc_task_operations;
  static const struct inode_operations proc_task_inode_operations;
  
@@ -5843,7 +5834,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/base.c linux-4.4.116-vs2.3.9.7/fs/pr
  static const struct pid_entry tgid_base_stuff[] = {
        DIR("task",       S_IRUGO|S_IXUGO, proc_task_inode_operations, proc_task_operations),
        DIR("fd",         S_IRUSR|S_IXUSR, proc_fd_inode_operations, proc_fd_operations),
  static const struct pid_entry tgid_base_stuff[] = {
        DIR("task",       S_IRUGO|S_IXUGO, proc_task_inode_operations, proc_task_operations),
        DIR("fd",         S_IRUSR|S_IXUSR, proc_fd_inode_operations, proc_fd_operations),
-@@ -2789,6 +2824,8 @@ static const struct pid_entry tgid_base_
+@@ -2842,6 +2877,8 @@ static const struct pid_entry tgid_base_
  #ifdef CONFIG_CGROUPS
        ONE("cgroup",  S_IRUGO, proc_cgroup_show),
  #endif
  #ifdef CONFIG_CGROUPS
        ONE("cgroup",  S_IRUGO, proc_cgroup_show),
  #endif
@@ -5852,7 +5843,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/base.c linux-4.4.116-vs2.3.9.7/fs/pr
        ONE("oom_score",  S_IRUGO, proc_oom_score),
        REG("oom_adj",    S_IRUGO|S_IWUSR, proc_oom_adj_operations),
        REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations),
        ONE("oom_score",  S_IRUGO, proc_oom_score),
        REG("oom_adj",    S_IRUGO|S_IWUSR, proc_oom_adj_operations),
        REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations),
-@@ -3003,7 +3040,7 @@ retry:
+@@ -3056,7 +3093,7 @@ retry:
        iter.task = NULL;
        pid = find_ge_pid(iter.tgid, ns);
        if (pid) {
        iter.task = NULL;
        pid = find_ge_pid(iter.tgid, ns);
        if (pid) {
@@ -5861,7 +5852,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/base.c linux-4.4.116-vs2.3.9.7/fs/pr
                iter.task = pid_task(pid, PIDTYPE_PID);
                /* What we to know is if the pid we have find is the
                 * pid of a thread_group_leader.  Testing for task
                iter.task = pid_task(pid, PIDTYPE_PID);
                /* What we to know is if the pid we have find is the
                 * pid of a thread_group_leader.  Testing for task
-@@ -3063,8 +3100,10 @@ int proc_pid_readdir(struct file *file,
+@@ -3116,8 +3153,10 @@ int proc_pid_readdir(struct file *file,
                if (!has_pid_permissions(ns, iter.task, 2))
                        continue;
  
                if (!has_pid_permissions(ns, iter.task, 2))
                        continue;
  
@@ -5873,7 +5864,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/base.c linux-4.4.116-vs2.3.9.7/fs/pr
                if (!proc_fill_cache(file, ctx, name, len,
                                     proc_pid_instantiate, iter.task, NULL)) {
                        put_task_struct(iter.task);
                if (!proc_fill_cache(file, ctx, name, len,
                                     proc_pid_instantiate, iter.task, NULL)) {
                        put_task_struct(iter.task);
-@@ -3161,6 +3200,7 @@ static const struct pid_entry tid_base_s
+@@ -3254,6 +3293,7 @@ static const struct pid_entry tid_base_s
        REG("projid_map", S_IRUGO|S_IWUSR, proc_projid_map_operations),
        REG("setgroups",  S_IRUGO|S_IWUSR, proc_setgroups_operations),
  #endif
        REG("projid_map", S_IRUGO|S_IWUSR, proc_projid_map_operations),
        REG("setgroups",  S_IRUGO|S_IWUSR, proc_setgroups_operations),
  #endif
@@ -5881,7 +5872,7 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/base.c linux-4.4.116-vs2.3.9.7/fs/pr
  };
  
  static int proc_tid_base_readdir(struct file *file, struct dir_context *ctx)
  };
  
  static int proc_tid_base_readdir(struct file *file, struct dir_context *ctx)
-@@ -3227,6 +3267,8 @@ static struct dentry *proc_task_lookup(s
+@@ -3320,6 +3360,8 @@ static struct dentry *proc_task_lookup(s
        tid = name_to_int(&dentry->d_name);
        if (tid == ~0U)
                goto out;
        tid = name_to_int(&dentry->d_name);
        if (tid == ~0U)
                goto out;
@@ -5890,9 +5881,9 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/base.c linux-4.4.116-vs2.3.9.7/fs/pr
  
        ns = dentry->d_sb->s_fs_info;
        rcu_read_lock();
  
        ns = dentry->d_sb->s_fs_info;
        rcu_read_lock();
-diff -NurpP --minimal linux-4.4.116/fs/proc/generic.c linux-4.4.116-vs2.3.9.7/fs/proc/generic.c
---- linux-4.4.116/fs/proc/generic.c    2018-02-22 21:19:53.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/proc/generic.c  2018-01-09 17:29:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/proc/generic.c linux-4.4.197-vs2.3.9.8/fs/proc/generic.c
+--- linux-4.4.197/fs/proc/generic.c    2019-10-22 12:34:35.338645971 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/proc/generic.c  2018-10-20 04:57:21.000000000 +0000
 @@ -22,6 +22,7 @@
  #include <linux/bitops.h>
  #include <linux/spinlock.h>
 @@ -22,6 +22,7 @@
  #include <linux/bitops.h>
  #include <linux/spinlock.h>
@@ -5967,9 +5958,9 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/generic.c linux-4.4.116-vs2.3.9.7/fs
                } else {
                        kfree(ent);
                        ent = NULL;
                } else {
                        kfree(ent);
                        ent = NULL;
-diff -NurpP --minimal linux-4.4.116/fs/proc/inode.c linux-4.4.116-vs2.3.9.7/fs/proc/inode.c
---- linux-4.4.116/fs/proc/inode.c      2015-10-29 09:21:39.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/proc/inode.c    2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/proc/inode.c linux-4.4.197-vs2.3.9.8/fs/proc/inode.c
+--- linux-4.4.197/fs/proc/inode.c      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/proc/inode.c    2018-10-20 04:57:21.000000000 +0000
 @@ -431,6 +431,8 @@ struct inode *proc_get_inode(struct supe
                        inode->i_uid = de->uid;
                        inode->i_gid = de->gid;
 @@ -431,6 +431,8 @@ struct inode *proc_get_inode(struct supe
                        inode->i_uid = de->uid;
                        inode->i_gid = de->gid;
@@ -5979,9 +5970,9 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/inode.c linux-4.4.116-vs2.3.9.7/fs/p
                if (de->size)
                        inode->i_size = de->size;
                if (de->nlink)
                if (de->size)
                        inode->i_size = de->size;
                if (de->nlink)
-diff -NurpP --minimal linux-4.4.116/fs/proc/internal.h linux-4.4.116-vs2.3.9.7/fs/proc/internal.h
---- linux-4.4.116/fs/proc/internal.h   2015-10-29 09:21:39.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/proc/internal.h 2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/proc/internal.h linux-4.4.197-vs2.3.9.8/fs/proc/internal.h
+--- linux-4.4.197/fs/proc/internal.h   2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/proc/internal.h 2018-10-20 04:57:21.000000000 +0000
 @@ -14,6 +14,7 @@
  #include <linux/spinlock.h>
  #include <linux/atomic.h>
 @@ -14,6 +14,7 @@
  #include <linux/spinlock.h>
  #include <linux/atomic.h>
@@ -6048,9 +6039,9 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/internal.h linux-4.4.116-vs2.3.9.7/f
  
  /*
   * base.c
  
  /*
   * base.c
-diff -NurpP --minimal linux-4.4.116/fs/proc/loadavg.c linux-4.4.116-vs2.3.9.7/fs/proc/loadavg.c
---- linux-4.4.116/fs/proc/loadavg.c    2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/proc/loadavg.c  2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/proc/loadavg.c linux-4.4.197-vs2.3.9.8/fs/proc/loadavg.c
+--- linux-4.4.197/fs/proc/loadavg.c    2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/proc/loadavg.c  2018-10-20 04:57:21.000000000 +0000
 @@ -12,15 +12,27 @@
  
  static int loadavg_proc_show(struct seq_file *m, void *v)
 @@ -12,15 +12,27 @@
  
  static int loadavg_proc_show(struct seq_file *m, void *v)
@@ -6080,9 +6071,9 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/loadavg.c linux-4.4.116-vs2.3.9.7/fs
                task_active_pid_ns(current)->last_pid);
        return 0;
  }
                task_active_pid_ns(current)->last_pid);
        return 0;
  }
-diff -NurpP --minimal linux-4.4.116/fs/proc/meminfo.c linux-4.4.116-vs2.3.9.7/fs/proc/meminfo.c
---- linux-4.4.116/fs/proc/meminfo.c    2016-07-05 04:15:09.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/proc/meminfo.c  2018-01-12 18:43:53.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/proc/meminfo.c linux-4.4.197-vs2.3.9.8/fs/proc/meminfo.c
+--- linux-4.4.197/fs/proc/meminfo.c    2019-10-22 12:34:35.338645971 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/proc/meminfo.c  2018-10-20 04:57:21.000000000 +0000
 @@ -43,7 +43,8 @@ static int meminfo_proc_show(struct seq_
        si_swapinfo(&i);
        committed = percpu_counter_read_positive(&vm_committed_as);
 @@ -43,7 +43,8 @@ static int meminfo_proc_show(struct seq_
        si_swapinfo(&i);
        committed = percpu_counter_read_positive(&vm_committed_as);
@@ -6093,28 +6084,9 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/meminfo.c linux-4.4.116-vs2.3.9.7/fs
                        total_swapcache_pages() - i.bufferram;
        if (cached < 0)
                cached = 0;
                        total_swapcache_pages() - i.bufferram;
        if (cached < 0)
                cached = 0;
-@@ -70,13 +71,16 @@ static int meminfo_proc_show(struct seq_
-        */
-       pagecache = pages[LRU_ACTIVE_FILE] + pages[LRU_INACTIVE_FILE];
-       pagecache -= min(pagecache / 2, wmark_low);
--      available += pagecache;
-+
-+      if (!vx_flags(VXF_VIRT_MEM, 0))
-+              available += pagecache;
-       /*
-        * Part of the reclaimable slab consists of items that are in use,
-        * and cannot be freed. Cap this estimate at the low watermark.
-        */
--      available += global_page_state(NR_SLAB_RECLAIMABLE) -
-+      if (!vx_flags(VXF_VIRT_MEM, 0))
-+              available += global_page_state(NR_SLAB_RECLAIMABLE) -
-                    min(global_page_state(NR_SLAB_RECLAIMABLE) / 2, wmark_low);
-       if (available < 0)
-diff -NurpP --minimal linux-4.4.116/fs/proc/root.c linux-4.4.116-vs2.3.9.7/fs/proc/root.c
---- linux-4.4.116/fs/proc/root.c       2018-02-22 21:19:53.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/proc/root.c     2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/proc/root.c linux-4.4.197-vs2.3.9.8/fs/proc/root.c
+--- linux-4.4.197/fs/proc/root.c       2019-10-22 12:34:35.358645651 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/proc/root.c     2018-10-20 04:57:21.000000000 +0000
 @@ -20,9 +20,14 @@
  #include <linux/mount.h>
  #include <linux/pid_namespace.h>
 @@ -20,9 +20,14 @@
  #include <linux/mount.h>
  #include <linux/pid_namespace.h>
@@ -6156,9 +6128,9 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/root.c linux-4.4.116-vs2.3.9.7/fs/pr
        .subdir         = RB_ROOT,
        .name           = "/proc",
  };
        .subdir         = RB_ROOT,
        .name           = "/proc",
  };
-diff -NurpP --minimal linux-4.4.116/fs/proc/self.c linux-4.4.116-vs2.3.9.7/fs/proc/self.c
---- linux-4.4.116/fs/proc/self.c       2015-10-29 09:21:39.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/proc/self.c     2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/proc/self.c linux-4.4.197-vs2.3.9.8/fs/proc/self.c
+--- linux-4.4.197/fs/proc/self.c       2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/proc/self.c     2018-10-20 04:57:21.000000000 +0000
 @@ -1,6 +1,7 @@
  #include <linux/sched.h>
  #include <linux/slab.h>
 @@ -1,6 +1,7 @@
  #include <linux/sched.h>
  #include <linux/slab.h>
@@ -6176,9 +6148,9 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/self.c linux-4.4.116-vs2.3.9.7/fs/pr
                if (inode) {
                        inode->i_ino = self_inum;
                        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
                if (inode) {
                        inode->i_ino = self_inum;
                        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
-diff -NurpP --minimal linux-4.4.116/fs/proc/stat.c linux-4.4.116-vs2.3.9.7/fs/proc/stat.c
---- linux-4.4.116/fs/proc/stat.c       2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/proc/stat.c     2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/proc/stat.c linux-4.4.197-vs2.3.9.8/fs/proc/stat.c
+--- linux-4.4.197/fs/proc/stat.c       2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/proc/stat.c     2018-10-20 04:57:21.000000000 +0000
 @@ -9,8 +9,10 @@
  #include <linux/slab.h>
  #include <linux/time.h>
 @@ -9,8 +9,10 @@
  #include <linux/slab.h>
  #include <linux/time.h>
@@ -6227,9 +6199,9 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/stat.c linux-4.4.116-vs2.3.9.7/fs/pr
                /* Copy values here to work around gcc-2.95.3, gcc-2.96 */
                user = kcpustat_cpu(i).cpustat[CPUTIME_USER];
                nice = kcpustat_cpu(i).cpustat[CPUTIME_NICE];
                /* Copy values here to work around gcc-2.95.3, gcc-2.96 */
                user = kcpustat_cpu(i).cpustat[CPUTIME_USER];
                nice = kcpustat_cpu(i).cpustat[CPUTIME_NICE];
-diff -NurpP --minimal linux-4.4.116/fs/proc/uptime.c linux-4.4.116-vs2.3.9.7/fs/proc/uptime.c
---- linux-4.4.116/fs/proc/uptime.c     2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/proc/uptime.c   2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/proc/uptime.c linux-4.4.197-vs2.3.9.8/fs/proc/uptime.c
+--- linux-4.4.197/fs/proc/uptime.c     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/proc/uptime.c   2018-10-20 04:57:21.000000000 +0000
 @@ -5,6 +5,7 @@
  #include <linux/seq_file.h>
  #include <linux/time.h>
 @@ -5,6 +5,7 @@
  #include <linux/seq_file.h>
  #include <linux/time.h>
@@ -6249,9 +6221,9 @@ diff -NurpP --minimal linux-4.4.116/fs/proc/uptime.c linux-4.4.116-vs2.3.9.7/fs/
        seq_printf(m, "%lu.%02lu %lu.%02lu\n",
                        (unsigned long) uptime.tv_sec,
                        (uptime.tv_nsec / (NSEC_PER_SEC / 100)),
        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.4.116/fs/proc_namespace.c linux-4.4.116-vs2.3.9.7/fs/proc_namespace.c
---- linux-4.4.116/fs/proc_namespace.c  2018-02-22 21:19:53.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/proc_namespace.c        2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/proc_namespace.c linux-4.4.197-vs2.3.9.8/fs/proc_namespace.c
+--- linux-4.4.197/fs/proc_namespace.c  2019-10-22 12:34:35.388645172 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/proc_namespace.c        2018-10-20 04:57:21.000000000 +0000
 @@ -46,6 +46,8 @@ static int show_sb_opts(struct seq_file
                { MS_DIRSYNC, ",dirsync" },
                { MS_MANDLOCK, ",mand" },
 @@ -46,6 +46,8 @@ static int show_sb_opts(struct seq_file
                { MS_DIRSYNC, ",dirsync" },
                { MS_MANDLOCK, ",mand" },
@@ -6365,9 +6337,9 @@ diff -NurpP --minimal linux-4.4.116/fs/proc_namespace.c linux-4.4.116-vs2.3.9.7/
        /* file system type */
        seq_puts(m, "with fstype ");
        show_type(m, sb);
        /* file system type */
        seq_puts(m, "with fstype ");
        show_type(m, sb);
-diff -NurpP --minimal linux-4.4.116/fs/quota/dquot.c linux-4.4.116-vs2.3.9.7/fs/quota/dquot.c
---- linux-4.4.116/fs/quota/dquot.c     2018-02-22 21:19:53.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/quota/dquot.c   2018-02-10 15:16:50.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/quota/dquot.c linux-4.4.197-vs2.3.9.8/fs/quota/dquot.c
+--- linux-4.4.197/fs/quota/dquot.c     2019-10-22 12:34:35.478643734 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/quota/dquot.c   2018-10-20 04:57:21.000000000 +0000
 @@ -1643,6 +1643,9 @@ int __dquot_alloc_space(struct inode *in
        int reserve = flags & DQUOT_SPACE_RESERVE;
        struct dquot **dquots;
 @@ -1643,6 +1643,9 @@ int __dquot_alloc_space(struct inode *in
        int reserve = flags & DQUOT_SPACE_RESERVE;
        struct dquot **dquots;
@@ -6406,9 +6378,9 @@ diff -NurpP --minimal linux-4.4.116/fs/quota/dquot.c linux-4.4.116-vs2.3.9.7/fs/
        if (!dquot_active(inode))
                return;
  
        if (!dquot_active(inode))
                return;
  
-diff -NurpP --minimal linux-4.4.116/fs/quota/quota.c linux-4.4.116-vs2.3.9.7/fs/quota/quota.c
---- linux-4.4.116/fs/quota/quota.c     2016-07-05 04:12:34.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/quota/quota.c   2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/quota/quota.c linux-4.4.197-vs2.3.9.8/fs/quota/quota.c
+--- linux-4.4.197/fs/quota/quota.c     2019-10-22 12:34:35.498643414 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/quota/quota.c   2018-10-20 05:50:20.000000000 +0000
 @@ -8,6 +8,7 @@
  #include <linux/fs.h>
  #include <linux/namei.h>
 @@ -8,6 +8,7 @@
  #include <linux/fs.h>
  #include <linux/namei.h>
@@ -6417,7 +6389,7 @@ diff -NurpP --minimal linux-4.4.116/fs/quota/quota.c linux-4.4.116-vs2.3.9.7/fs/
  #include <asm/current.h>
  #include <linux/uaccess.h>
  #include <linux/kernel.h>
  #include <asm/current.h>
  #include <linux/uaccess.h>
  #include <linux/kernel.h>
-@@ -38,7 +39,7 @@ static int check_quotactl_permission(str
+@@ -39,7 +40,7 @@ static int check_quotactl_permission(str
                        break;
                /*FALLTHROUGH*/
        default:
                        break;
                /*FALLTHROUGH*/
        default:
@@ -6426,7 +6398,7 @@ diff -NurpP --minimal linux-4.4.116/fs/quota/quota.c linux-4.4.116-vs2.3.9.7/fs/
                        return -EPERM;
        }
  
                        return -EPERM;
        }
  
-@@ -702,6 +703,46 @@ static int do_quotactl(struct super_bloc
+@@ -704,6 +705,46 @@ static int do_quotactl(struct super_bloc
  
  #ifdef CONFIG_BLOCK
  
  
  #ifdef CONFIG_BLOCK
  
@@ -6473,7 +6445,7 @@ diff -NurpP --minimal linux-4.4.116/fs/quota/quota.c linux-4.4.116-vs2.3.9.7/fs/
  /* Return 1 if 'cmd' will block on frozen filesystem */
  static int quotactl_cmd_write(int cmd)
  {
  /* Return 1 if 'cmd' will block on frozen filesystem */
  static int quotactl_cmd_write(int cmd)
  {
-@@ -737,6 +778,22 @@ static struct super_block *quotactl_bloc
+@@ -739,6 +780,22 @@ static struct super_block *quotactl_bloc
        putname(tmp);
        if (IS_ERR(bdev))
                return ERR_CAST(bdev);
        putname(tmp);
        if (IS_ERR(bdev))
                return ERR_CAST(bdev);
@@ -6496,9 +6468,9 @@ diff -NurpP --minimal linux-4.4.116/fs/quota/quota.c linux-4.4.116-vs2.3.9.7/fs/
        if (quotactl_cmd_write(cmd))
                sb = get_super_thawed(bdev);
        else
        if (quotactl_cmd_write(cmd))
                sb = get_super_thawed(bdev);
        else
-diff -NurpP --minimal linux-4.4.116/fs/stat.c linux-4.4.116-vs2.3.9.7/fs/stat.c
---- linux-4.4.116/fs/stat.c    2018-02-22 21:19:54.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/stat.c  2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/stat.c linux-4.4.197-vs2.3.9.8/fs/stat.c
+--- linux-4.4.197/fs/stat.c    2019-10-22 12:34:35.708640058 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/stat.c  2018-10-20 04:57:21.000000000 +0000
 @@ -26,6 +26,7 @@ void generic_fillattr(struct inode *inod
        stat->nlink = inode->i_nlink;
        stat->uid = inode->i_uid;
 @@ -26,6 +26,7 @@ void generic_fillattr(struct inode *inod
        stat->nlink = inode->i_nlink;
        stat->uid = inode->i_uid;
@@ -6507,9 +6479,9 @@ diff -NurpP --minimal linux-4.4.116/fs/stat.c linux-4.4.116-vs2.3.9.7/fs/stat.c
        stat->rdev = inode->i_rdev;
        stat->size = i_size_read(inode);
        stat->atime = inode->i_atime;
        stat->rdev = inode->i_rdev;
        stat->size = i_size_read(inode);
        stat->atime = inode->i_atime;
-diff -NurpP --minimal linux-4.4.116/fs/statfs.c linux-4.4.116-vs2.3.9.7/fs/statfs.c
---- linux-4.4.116/fs/statfs.c  2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/statfs.c        2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/statfs.c linux-4.4.197-vs2.3.9.8/fs/statfs.c
+--- linux-4.4.197/fs/statfs.c  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/statfs.c        2018-10-20 04:57:21.000000000 +0000
 @@ -7,6 +7,8 @@
  #include <linux/statfs.h>
  #include <linux/security.h>
 @@ -7,6 +7,8 @@
  #include <linux/statfs.h>
  #include <linux/security.h>
@@ -6528,9 +6500,9 @@ diff -NurpP --minimal linux-4.4.116/fs/statfs.c linux-4.4.116-vs2.3.9.7/fs/statf
        return retval;
  }
  
        return retval;
  }
  
-diff -NurpP --minimal linux-4.4.116/fs/super.c linux-4.4.116-vs2.3.9.7/fs/super.c
---- linux-4.4.116/fs/super.c   2018-02-22 21:19:54.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/super.c 2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/super.c linux-4.4.197-vs2.3.9.8/fs/super.c
+--- linux-4.4.197/fs/super.c   2019-10-22 12:34:35.718639901 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/super.c 2019-02-22 08:20:34.220949702 +0000
 @@ -33,6 +33,8 @@
  #include <linux/cleancache.h>
  #include <linux/fsnotify.h>
 @@ -33,6 +33,8 @@
  #include <linux/cleancache.h>
  #include <linux/fsnotify.h>
@@ -6540,8 +6512,8 @@ diff -NurpP --minimal linux-4.4.116/fs/super.c linux-4.4.116-vs2.3.9.7/fs/super.
  #include "internal.h"
  
  
  #include "internal.h"
  
  
-@@ -1131,6 +1133,13 @@ mount_fs(struct file_system_type *type,
-       WARN_ON(!sb->s_bdi);
+@@ -1153,6 +1155,13 @@ mount_fs(struct file_system_type *type,
+       smp_wmb();
        sb->s_flags |= MS_BORN;
  
 +      error = -EPERM;
        sb->s_flags |= MS_BORN;
  
 +      error = -EPERM;
@@ -6554,9 +6526,9 @@ diff -NurpP --minimal linux-4.4.116/fs/super.c linux-4.4.116-vs2.3.9.7/fs/super.
        error = security_sb_kern_mount(sb, flags, secdata);
        if (error)
                goto out_sb;
        error = security_sb_kern_mount(sb, flags, secdata);
        if (error)
                goto out_sb;
-diff -NurpP --minimal linux-4.4.116/fs/utimes.c linux-4.4.116-vs2.3.9.7/fs/utimes.c
---- linux-4.4.116/fs/utimes.c  2018-02-22 21:19:54.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/utimes.c        2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/utimes.c linux-4.4.197-vs2.3.9.8/fs/utimes.c
+--- linux-4.4.197/fs/utimes.c  2019-10-22 12:34:36.098633826 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/utimes.c        2018-10-20 04:57:21.000000000 +0000
 @@ -8,6 +8,8 @@
  #include <linux/stat.h>
  #include <linux/utime.h>
 @@ -8,6 +8,8 @@
  #include <linux/stat.h>
  #include <linux/utime.h>
@@ -6587,9 +6559,9 @@ diff -NurpP --minimal linux-4.4.116/fs/utimes.c linux-4.4.116-vs2.3.9.7/fs/utime
        if (times && times[0].tv_nsec == UTIME_NOW &&
                     times[1].tv_nsec == UTIME_NOW)
                times = NULL;
        if (times && times[0].tv_nsec == UTIME_NOW &&
                     times[1].tv_nsec == UTIME_NOW)
                times = NULL;
-diff -NurpP --minimal linux-4.4.116/fs/xattr.c linux-4.4.116-vs2.3.9.7/fs/xattr.c
---- linux-4.4.116/fs/xattr.c   2018-02-22 21:19:54.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/fs/xattr.c 2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/fs/xattr.c linux-4.4.197-vs2.3.9.8/fs/xattr.c
+--- linux-4.4.197/fs/xattr.c   2019-10-22 12:34:36.098633826 +0000
++++ linux-4.4.197-vs2.3.9.8/fs/xattr.c 2018-10-20 05:50:20.000000000 +0000
 @@ -21,6 +21,7 @@
  #include <linux/audit.h>
  #include <linux/vmalloc.h>
 @@ -21,6 +21,7 @@
  #include <linux/audit.h>
  #include <linux/vmalloc.h>
@@ -6607,9 +6579,9 @@ diff -NurpP --minimal linux-4.4.116/fs/xattr.c linux-4.4.116-vs2.3.9.7/fs/xattr.
                        return (mask & MAY_WRITE) ? -EPERM : -ENODATA;
                return 0;
        }
                        return (mask & MAY_WRITE) ? -EPERM : -ENODATA;
                return 0;
        }
-diff -NurpP --minimal linux-4.4.116/include/linux/capability.h linux-4.4.116-vs2.3.9.7/include/linux/capability.h
---- linux-4.4.116/include/linux/capability.h   2018-02-22 21:19:56.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/capability.h 2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/capability.h linux-4.4.197-vs2.3.9.8/include/linux/capability.h
+--- linux-4.4.197/include/linux/capability.h   2019-10-22 12:34:36.818622321 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/capability.h 2018-10-20 04:57:21.000000000 +0000
 @@ -77,7 +77,8 @@ extern const kernel_cap_t __cap_init_eff
  #else /* HAND-CODED capability initializers */
  
 @@ -77,7 +77,8 @@ extern const kernel_cap_t __cap_init_eff
  #else /* HAND-CODED capability initializers */
  
@@ -6620,10 +6592,10 @@ diff -NurpP --minimal linux-4.4.116/include/linux/capability.h linux-4.4.116-vs2
  
  # define CAP_EMPTY_SET    ((kernel_cap_t){{ 0, 0 }})
  # define CAP_FULL_SET     ((kernel_cap_t){{ ~0, CAP_LAST_U32_VALID_MASK }})
  
  # define CAP_EMPTY_SET    ((kernel_cap_t){{ 0, 0 }})
  # define CAP_FULL_SET     ((kernel_cap_t){{ ~0, CAP_LAST_U32_VALID_MASK }})
-diff -NurpP --minimal linux-4.4.116/include/linux/cred.h linux-4.4.116-vs2.3.9.7/include/linux/cred.h
---- linux-4.4.116/include/linux/cred.h 2018-02-22 21:19:57.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/cred.h       2018-01-11 08:03:00.000000000 +0000
-@@ -161,6 +161,7 @@ extern void exit_creds(struct task_struc
+diff -NurpP --minimal linux-4.4.197/include/linux/cred.h linux-4.4.197-vs2.3.9.8/include/linux/cred.h
+--- linux-4.4.197/include/linux/cred.h 2019-10-22 12:34:36.938620404 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/cred.h       2019-10-05 14:35:35.422762257 +0000
+@@ -165,6 +165,7 @@ extern void exit_creds(struct task_struc
  extern int copy_creds(struct task_struct *, unsigned long);
  extern const struct cred *get_task_cred(struct task_struct *);
  extern struct cred *cred_alloc_blank(void);
  extern int copy_creds(struct task_struct *, unsigned long);
  extern const struct cred *get_task_cred(struct task_struct *);
  extern struct cred *cred_alloc_blank(void);
@@ -6631,7 +6603,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/cred.h linux-4.4.116-vs2.3.9.7
  extern struct cred *prepare_creds(void);
  extern struct cred *prepare_exec_creds(void);
  extern int commit_creds(struct cred *);
  extern struct cred *prepare_creds(void);
  extern struct cred *prepare_exec_creds(void);
  extern int commit_creds(struct cred *);
-@@ -221,6 +222,31 @@ static inline bool cap_ambient_invariant
+@@ -225,6 +226,31 @@ static inline bool cap_ambient_invariant
                                          cred->cap_inheritable));
  }
  
                                          cred->cap_inheritable));
  }
  
@@ -6663,9 +6635,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/cred.h linux-4.4.116-vs2.3.9.7
  /**
   * get_new_cred - Get a reference on a new set of credentials
   * @cred: The new credentials to reference
  /**
   * get_new_cred - Get a reference on a new set of credentials
   * @cred: The new credentials to reference
-diff -NurpP --minimal linux-4.4.116/include/linux/dcache.h linux-4.4.116-vs2.3.9.7/include/linux/dcache.h
---- linux-4.4.116/include/linux/dcache.h       2018-02-22 21:19:57.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/dcache.h     2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/dcache.h linux-4.4.197-vs2.3.9.8/include/linux/dcache.h
+--- linux-4.4.197/include/linux/dcache.h       2019-10-22 12:34:36.958620084 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/dcache.h     2018-10-20 04:57:21.000000000 +0000
 @@ -10,6 +10,7 @@
  #include <linux/cache.h>
  #include <linux/rcupdate.h>
 @@ -10,6 +10,7 @@
  #include <linux/cache.h>
  #include <linux/rcupdate.h>
@@ -6674,7 +6646,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/dcache.h linux-4.4.116-vs2.3.9
  
  struct path;
  struct vfsmount;
  
  struct path;
  struct vfsmount;
-@@ -351,8 +352,10 @@ extern char *dentry_path(struct dentry *
+@@ -352,8 +353,10 @@ extern char *dentry_path(struct dentry *
   */
  static inline struct dentry *dget_dlock(struct dentry *dentry)
  {
   */
  static inline struct dentry *dget_dlock(struct dentry *dentry)
  {
@@ -6686,19 +6658,19 @@ diff -NurpP --minimal linux-4.4.116/include/linux/dcache.h linux-4.4.116-vs2.3.9
        return dentry;
  }
  
        return dentry;
  }
  
-diff -NurpP --minimal linux-4.4.116/include/linux/devpts_fs.h linux-4.4.116-vs2.3.9.7/include/linux/devpts_fs.h
---- linux-4.4.116/include/linux/devpts_fs.h    2018-02-22 21:19:57.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/devpts_fs.h  2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/devpts_fs.h linux-4.4.197-vs2.3.9.8/include/linux/devpts_fs.h
+--- linux-4.4.197/include/linux/devpts_fs.h    2019-10-22 12:34:36.958620084 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/devpts_fs.h  2018-10-20 04:57:21.000000000 +0000
 @@ -35,5 +35,4 @@ void devpts_pty_kill(struct inode *inode
  
  #endif
  
 -
  #endif /* _LINUX_DEVPTS_FS_H */
 @@ -35,5 +35,4 @@ void devpts_pty_kill(struct inode *inode
  
  #endif
  
 -
  #endif /* _LINUX_DEVPTS_FS_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/include/linux/fs.h
---- linux-4.4.116/include/linux/fs.h   2018-02-22 21:19:57.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/fs.h 2018-02-22 21:30:19.000000000 +0000
-@@ -227,6 +227,7 @@ typedef void (dax_iodone_t)(struct buffe
+diff -NurpP --minimal linux-4.4.197/include/linux/fs.h linux-4.4.197-vs2.3.9.8/include/linux/fs.h
+--- linux-4.4.197/include/linux/fs.h   2019-10-22 12:34:36.968619927 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/fs.h 2019-10-05 14:35:35.442761942 +0000
+@@ -232,6 +232,7 @@ typedef void (dax_iodone_t)(struct buffe
  #define ATTR_OPEN     (1 << 15) /* Truncating from open(O_TRUNC) */
  #define ATTR_TIMES_SET        (1 << 16)
  #define ATTR_TOUCH    (1 << 17)
  #define ATTR_OPEN     (1 << 15) /* Truncating from open(O_TRUNC) */
  #define ATTR_TIMES_SET        (1 << 16)
  #define ATTR_TOUCH    (1 << 17)
@@ -6706,7 +6678,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
  
  /*
   * Whiteout is represented by a char device.  The following constants define the
  
  /*
   * Whiteout is represented by a char device.  The following constants define the
-@@ -249,6 +250,7 @@ struct iattr {
+@@ -254,6 +255,7 @@ struct iattr {
        umode_t         ia_mode;
        kuid_t          ia_uid;
        kgid_t          ia_gid;
        umode_t         ia_mode;
        kuid_t          ia_uid;
        kgid_t          ia_gid;
@@ -6714,7 +6686,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
        loff_t          ia_size;
        struct timespec ia_atime;
        struct timespec ia_mtime;
        loff_t          ia_size;
        struct timespec ia_atime;
        struct timespec ia_mtime;
-@@ -587,7 +589,9 @@ struct inode {
+@@ -592,7 +594,9 @@ struct inode {
        unsigned short          i_opflags;
        kuid_t                  i_uid;
        kgid_t                  i_gid;
        unsigned short          i_opflags;
        kuid_t                  i_uid;
        kgid_t                  i_gid;
@@ -6725,7 +6697,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
  
  #ifdef CONFIG_FS_POSIX_ACL
        struct posix_acl        *i_acl;
  
  #ifdef CONFIG_FS_POSIX_ACL
        struct posix_acl        *i_acl;
-@@ -616,6 +620,7 @@ struct inode {
+@@ -621,6 +625,7 @@ struct inode {
                unsigned int __i_nlink;
        };
        dev_t                   i_rdev;
                unsigned int __i_nlink;
        };
        dev_t                   i_rdev;
@@ -6733,7 +6705,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
        loff_t                  i_size;
        struct timespec         i_atime;
        struct timespec         i_mtime;
        loff_t                  i_size;
        struct timespec         i_atime;
        struct timespec         i_mtime;
-@@ -814,6 +819,11 @@ static inline gid_t i_gid_read(const str
+@@ -819,6 +824,11 @@ static inline gid_t i_gid_read(const str
        return from_kgid(&init_user_ns, inode->i_gid);
  }
  
        return from_kgid(&init_user_ns, inode->i_gid);
  }
  
@@ -6745,7 +6717,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
  static inline void i_uid_write(struct inode *inode, uid_t uid)
  {
        inode->i_uid = make_kuid(&init_user_ns, uid);
  static inline void i_uid_write(struct inode *inode, uid_t uid)
  {
        inode->i_uid = make_kuid(&init_user_ns, uid);
-@@ -824,14 +834,19 @@ static inline void i_gid_write(struct in
+@@ -829,14 +839,19 @@ static inline void i_gid_write(struct in
        inode->i_gid = make_kgid(&init_user_ns, gid);
  }
  
        inode->i_gid = make_kgid(&init_user_ns, gid);
  }
  
@@ -6767,7 +6739,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
  }
  
  extern struct block_device *I_BDEV(struct inode *inode);
  }
  
  extern struct block_device *I_BDEV(struct inode *inode);
-@@ -888,6 +903,7 @@ struct file {
+@@ -893,6 +908,7 @@ struct file {
        loff_t                  f_pos;
        struct fown_struct      f_owner;
        const struct cred       *f_cred;
        loff_t                  f_pos;
        struct fown_struct      f_owner;
        const struct cred       *f_cred;
@@ -6775,7 +6747,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
        struct file_ra_state    f_ra;
  
        u64                     f_version;
        struct file_ra_state    f_ra;
  
        u64                     f_version;
-@@ -1022,6 +1038,7 @@ struct file_lock {
+@@ -1027,6 +1043,7 @@ struct file_lock {
        struct file *fl_file;
        loff_t fl_start;
        loff_t fl_end;
        struct file *fl_file;
        loff_t fl_start;
        loff_t fl_end;
@@ -6783,7 +6755,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
  
        struct fasync_struct *  fl_fasync; /* for lease break notifications */
        /* for lease breaks: */
  
        struct fasync_struct *  fl_fasync; /* for lease break notifications */
        /* for lease breaks: */
-@@ -1698,6 +1715,7 @@ struct inode_operations {
+@@ -1704,6 +1721,7 @@ struct inode_operations {
        ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
        ssize_t (*listxattr) (struct dentry *, char *, size_t);
        int (*removexattr) (struct dentry *, const char *);
        ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
        ssize_t (*listxattr) (struct dentry *, char *, size_t);
        int (*removexattr) (struct dentry *, const char *);
@@ -6791,7 +6763,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
        int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start,
                      u64 len);
        int (*update_time)(struct inode *, struct timespec *, int);
        int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start,
                      u64 len);
        int (*update_time)(struct inode *, struct timespec *, int);
-@@ -1712,6 +1730,7 @@ ssize_t rw_copy_check_uvector(int type,
+@@ -1718,6 +1736,7 @@ ssize_t rw_copy_check_uvector(int type,
                              unsigned long nr_segs, unsigned long fast_segs,
                              struct iovec *fast_pointer,
                              struct iovec **ret_pointer);
                              unsigned long nr_segs, unsigned long fast_segs,
                              struct iovec *fast_pointer,
                              struct iovec **ret_pointer);
@@ -6799,7 +6771,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
  
  extern ssize_t __vfs_read(struct file *, char __user *, size_t, loff_t *);
  extern ssize_t __vfs_write(struct file *, const char __user *, size_t, loff_t *);
  
  extern ssize_t __vfs_read(struct file *, char __user *, size_t, loff_t *);
  extern ssize_t __vfs_write(struct file *, const char __user *, size_t, loff_t *);
-@@ -1777,6 +1796,14 @@ struct super_operations {
+@@ -1783,6 +1802,14 @@ struct super_operations {
  #else
  #define S_DAX         0       /* Make all the DAX code disappear */
  #endif
  #else
  #define S_DAX         0       /* Make all the DAX code disappear */
  #endif
@@ -6814,7 +6786,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
  
  /*
   * Note that nosuid etc flags are inode-specific: setting some file-system
  
  /*
   * Note that nosuid etc flags are inode-specific: setting some file-system
-@@ -1801,10 +1828,13 @@ struct super_operations {
+@@ -1807,10 +1834,13 @@ struct super_operations {
  #define IS_MANDLOCK(inode)    __IS_FLG(inode, MS_MANDLOCK)
  #define IS_NOATIME(inode)     __IS_FLG(inode, MS_RDONLY|MS_NOATIME)
  #define IS_I_VERSION(inode)   __IS_FLG(inode, MS_I_VERSION)
  #define IS_MANDLOCK(inode)    __IS_FLG(inode, MS_MANDLOCK)
  #define IS_NOATIME(inode)     __IS_FLG(inode, MS_RDONLY|MS_NOATIME)
  #define IS_I_VERSION(inode)   __IS_FLG(inode, MS_I_VERSION)
@@ -6828,7 +6800,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
  #define IS_POSIXACL(inode)    __IS_FLG(inode, MS_POSIXACL)
  
  #define IS_DEADDIR(inode)     ((inode)->i_flags & S_DEAD)
  #define IS_POSIXACL(inode)    __IS_FLG(inode, MS_POSIXACL)
  
  #define IS_DEADDIR(inode)     ((inode)->i_flags & S_DEAD)
-@@ -1819,6 +1849,16 @@ struct super_operations {
+@@ -1825,6 +1855,16 @@ struct super_operations {
  #define IS_WHITEOUT(inode)    (S_ISCHR(inode->i_mode) && \
                                 (inode)->i_rdev == WHITEOUT_DEV)
  
  #define IS_WHITEOUT(inode)    (S_ISCHR(inode->i_mode) && \
                                 (inode)->i_rdev == WHITEOUT_DEV)
  
@@ -6845,7 +6817,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
  /*
   * Inode state bits.  Protected by inode->i_lock
   *
  /*
   * Inode state bits.  Protected by inode->i_lock
   *
-@@ -2075,6 +2115,9 @@ extern struct kobject *fs_kobj;
+@@ -2081,6 +2121,9 @@ extern struct kobject *fs_kobj;
  extern int locks_mandatory_locked(struct file *);
  extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t);
  
  extern int locks_mandatory_locked(struct file *);
  extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t);
  
@@ -6855,7 +6827,7 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
  /*
   * Candidates for mandatory locking have the setgid bit set
   * but no group execute bit -  an otherwise meaningless combination.
  /*
   * Candidates for mandatory locking have the setgid bit set
   * but no group execute bit -  an otherwise meaningless combination.
-@@ -2830,6 +2873,7 @@ extern int dcache_dir_open(struct inode
+@@ -2837,6 +2880,7 @@ extern int dcache_dir_open(struct inode
  extern int dcache_dir_close(struct inode *, struct file *);
  extern loff_t dcache_dir_lseek(struct file *, loff_t, int);
  extern int dcache_readdir(struct file *, struct dir_context *);
  extern int dcache_dir_close(struct inode *, struct file *);
  extern loff_t dcache_dir_lseek(struct file *, loff_t, int);
  extern int dcache_readdir(struct file *, struct dir_context *);
@@ -6863,9 +6835,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/fs.h linux-4.4.116-vs2.3.9.7/i
  extern int simple_setattr(struct dentry *, struct iattr *);
  extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
  extern int simple_statfs(struct dentry *, struct kstatfs *);
  extern int simple_setattr(struct dentry *, struct iattr *);
  extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
  extern int simple_statfs(struct dentry *, struct kstatfs *);
-diff -NurpP --minimal linux-4.4.116/include/linux/init_task.h linux-4.4.116-vs2.3.9.7/include/linux/init_task.h
---- linux-4.4.116/include/linux/init_task.h    2016-07-05 04:15:10.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/init_task.h  2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/init_task.h linux-4.4.197-vs2.3.9.8/include/linux/init_task.h
+--- linux-4.4.197/include/linux/init_task.h    2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/init_task.h  2018-10-20 04:57:21.000000000 +0000
 @@ -260,6 +260,10 @@ extern struct task_group root_task_group
        INIT_VTIME(tsk)                                                 \
        INIT_NUMA_BALANCING(tsk)                                        \
 @@ -260,6 +260,10 @@ extern struct task_group root_task_group
        INIT_VTIME(tsk)                                                 \
        INIT_NUMA_BALANCING(tsk)                                        \
@@ -6877,9 +6849,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/init_task.h linux-4.4.116-vs2.
  }
  
  
  }
  
  
-diff -NurpP --minimal linux-4.4.116/include/linux/ipc.h linux-4.4.116-vs2.3.9.7/include/linux/ipc.h
---- linux-4.4.116/include/linux/ipc.h  2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/ipc.h        2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/ipc.h linux-4.4.197-vs2.3.9.8/include/linux/ipc.h
+--- linux-4.4.197/include/linux/ipc.h  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/ipc.h        2018-10-20 04:57:21.000000000 +0000
 @@ -16,6 +16,7 @@ struct kern_ipc_perm
        key_t           key;
        kuid_t          uid;
 @@ -16,6 +16,7 @@ struct kern_ipc_perm
        key_t           key;
        kuid_t          uid;
@@ -6888,9 +6860,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/ipc.h linux-4.4.116-vs2.3.9.7/
        kuid_t          cuid;
        kgid_t          cgid;
        umode_t         mode; 
        kuid_t          cuid;
        kgid_t          cgid;
        umode_t         mode; 
-diff -NurpP --minimal linux-4.4.116/include/linux/memcontrol.h linux-4.4.116-vs2.3.9.7/include/linux/memcontrol.h
---- linux-4.4.116/include/linux/memcontrol.h   2018-02-22 21:19:57.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/memcontrol.h 2018-01-24 22:44:17.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/memcontrol.h linux-4.4.197-vs2.3.9.8/include/linux/memcontrol.h
+--- linux-4.4.197/include/linux/memcontrol.h   2019-10-22 12:34:37.858605703 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/memcontrol.h 2018-10-20 04:57:21.000000000 +0000
 @@ -113,6 +113,7 @@ struct cg_proto {
        struct mem_cgroup       *memcg;
  };
 @@ -113,6 +113,7 @@ struct cg_proto {
        struct mem_cgroup       *memcg;
  };
@@ -6912,9 +6884,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/memcontrol.h linux-4.4.116-vs2
  static inline bool mm_match_cgroup(struct mm_struct *mm,
                                   struct mem_cgroup *memcg)
  {
  static inline bool mm_match_cgroup(struct mm_struct *mm,
                                   struct mem_cgroup *memcg)
  {
-diff -NurpP --minimal linux-4.4.116/include/linux/mount.h linux-4.4.116-vs2.3.9.7/include/linux/mount.h
---- linux-4.4.116/include/linux/mount.h        2018-02-22 21:19:57.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/mount.h      2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/mount.h linux-4.4.197-vs2.3.9.8/include/linux/mount.h
+--- linux-4.4.197/include/linux/mount.h        2019-10-22 12:34:38.708592123 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/mount.h      2018-10-20 04:57:21.000000000 +0000
 @@ -63,6 +63,9 @@ struct mnt_namespace;
  #define MNT_MARKED            0x4000000
  #define MNT_UMOUNT            0x8000000
 @@ -63,6 +63,9 @@ struct mnt_namespace;
  #define MNT_MARKED            0x4000000
  #define MNT_UMOUNT            0x8000000
@@ -6925,9 +6897,20 @@ diff -NurpP --minimal linux-4.4.116/include/linux/mount.h linux-4.4.116-vs2.3.9.
  struct vfsmount {
        struct dentry *mnt_root;        /* root of the mounted tree */
        struct super_block *mnt_sb;     /* pointer to superblock */
  struct vfsmount {
        struct dentry *mnt_root;        /* root of the mounted tree */
        struct super_block *mnt_sb;     /* pointer to superblock */
-diff -NurpP --minimal linux-4.4.116/include/linux/net.h linux-4.4.116-vs2.3.9.7/include/linux/net.h
---- linux-4.4.116/include/linux/net.h  2018-02-22 21:19:57.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/net.h        2018-01-09 16:42:30.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/netdevice.h linux-4.4.197-vs2.3.9.8/include/linux/netdevice.h
+--- linux-4.4.197/include/linux/netdevice.h    2019-10-22 12:34:38.768591162 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/netdevice.h  2019-02-22 08:20:34.370947154 +0000
+@@ -2303,6 +2303,7 @@ static inline int dev_recursion_level(vo
+ struct net_device *dev_get_by_index(struct net *net, int ifindex);
+ struct net_device *__dev_get_by_index(struct net *net, int ifindex);
++struct net_device *dev_get_by_index_real_rcu(struct net *net, int ifindex);
+ struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
+ int netdev_get_name(struct net *net, char *name, int ifindex);
+ int dev_restart(struct net_device *dev);
+diff -NurpP --minimal linux-4.4.197/include/linux/net.h linux-4.4.197-vs2.3.9.8/include/linux/net.h
+--- linux-4.4.197/include/linux/net.h  2019-10-22 12:34:38.738591641 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/net.h        2018-10-20 04:57:21.000000000 +0000
 @@ -43,6 +43,7 @@ struct net;
  #define SOCK_NOSPACE          2
  #define SOCK_PASSCRED         3
 @@ -43,6 +43,7 @@ struct net;
  #define SOCK_NOSPACE          2
  #define SOCK_PASSCRED         3
@@ -6936,20 +6919,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/net.h linux-4.4.116-vs2.3.9.7/
  
  #ifndef ARCH_HAS_SOCKET_TYPES
  /**
  
  #ifndef ARCH_HAS_SOCKET_TYPES
  /**
-diff -NurpP --minimal linux-4.4.116/include/linux/netdevice.h linux-4.4.116-vs2.3.9.7/include/linux/netdevice.h
---- linux-4.4.116/include/linux/netdevice.h    2018-02-22 21:19:57.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/netdevice.h  2018-01-09 16:36:32.000000000 +0000
-@@ -2296,6 +2296,7 @@ static inline int dev_recursion_level(vo
- struct net_device *dev_get_by_index(struct net *net, int ifindex);
- struct net_device *__dev_get_by_index(struct net *net, int ifindex);
-+struct net_device *dev_get_by_index_real_rcu(struct net *net, int ifindex);
- struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
- int netdev_get_name(struct net *net, char *name, int ifindex);
- int dev_restart(struct net_device *dev);
-diff -NurpP --minimal linux-4.4.116/include/linux/nsproxy.h linux-4.4.116-vs2.3.9.7/include/linux/nsproxy.h
---- linux-4.4.116/include/linux/nsproxy.h      2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/nsproxy.h    2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/nsproxy.h linux-4.4.197-vs2.3.9.8/include/linux/nsproxy.h
+--- linux-4.4.197/include/linux/nsproxy.h      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/nsproxy.h    2018-10-20 04:57:21.000000000 +0000
 @@ -3,6 +3,7 @@
  
  #include <linux/spinlock.h>
 @@ -3,6 +3,7 @@
  
  #include <linux/spinlock.h>
@@ -6999,9 +6971,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/nsproxy.h linux-4.4.116-vs2.3.
  }
  
  #endif
  }
  
  #endif
-diff -NurpP --minimal linux-4.4.116/include/linux/pid.h linux-4.4.116-vs2.3.9.7/include/linux/pid.h
---- linux-4.4.116/include/linux/pid.h  2018-02-22 21:19:57.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/pid.h        2018-01-09 16:45:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/pid.h linux-4.4.197-vs2.3.9.8/include/linux/pid.h
+--- linux-4.4.197/include/linux/pid.h  2019-10-22 12:34:38.858589724 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/pid.h        2018-10-20 04:57:21.000000000 +0000
 @@ -10,7 +10,8 @@ enum pid_type
        PIDTYPE_SID,
        PIDTYPE_MAX,
 @@ -10,7 +10,8 @@ enum pid_type
        PIDTYPE_SID,
        PIDTYPE_MAX,
@@ -7020,9 +6992,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/pid.h linux-4.4.116-vs2.3.9.7/
  pid_t pid_vnr(struct pid *pid);
  
  #define do_each_pid_task(pid, type, task)                             \
  pid_t pid_vnr(struct pid *pid);
  
  #define do_each_pid_task(pid, type, task)                             \
-diff -NurpP --minimal linux-4.4.116/include/linux/quotaops.h linux-4.4.116-vs2.3.9.7/include/linux/quotaops.h
---- linux-4.4.116/include/linux/quotaops.h     2016-07-05 04:12:37.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/quotaops.h   2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/quotaops.h linux-4.4.197-vs2.3.9.8/include/linux/quotaops.h
+--- linux-4.4.197/include/linux/quotaops.h     2019-10-22 12:34:38.948588285 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/quotaops.h   2019-10-05 14:35:35.702757815 +0000
 @@ -8,6 +8,7 @@
  #define _LINUX_QUOTAOPS_
  
 @@ -8,6 +8,7 @@
  #define _LINUX_QUOTAOPS_
  
@@ -7064,9 +7036,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/quotaops.h linux-4.4.116-vs2.3
  }
  
  static inline int dquot_claim_space_nodirty(struct inode *inode, qsize_t number)
  }
  
  static inline int dquot_claim_space_nodirty(struct inode *inode, qsize_t number)
-diff -NurpP --minimal linux-4.4.116/include/linux/sched.h linux-4.4.116-vs2.3.9.7/include/linux/sched.h
---- linux-4.4.116/include/linux/sched.h        2018-02-22 21:19:57.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/sched.h      2018-02-10 15:16:50.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/sched.h linux-4.4.197-vs2.3.9.8/include/linux/sched.h
+--- linux-4.4.197/include/linux/sched.h        2019-10-22 12:34:38.988587649 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/sched.h      2019-10-05 14:35:35.742757182 +0000
 @@ -1601,6 +1601,14 @@ struct task_struct {
  #endif
        struct seccomp seccomp;
 @@ -1601,6 +1601,14 @@ struct task_struct {
  #endif
        struct seccomp seccomp;
@@ -7104,9 +7076,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/sched.h linux-4.4.116-vs2.3.9.
  }
  
  
  }
  
  
-diff -NurpP --minimal linux-4.4.116/include/linux/shmem_fs.h linux-4.4.116-vs2.3.9.7/include/linux/shmem_fs.h
---- linux-4.4.116/include/linux/shmem_fs.h     2018-02-22 21:19:57.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/shmem_fs.h   2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/shmem_fs.h linux-4.4.197-vs2.3.9.8/include/linux/shmem_fs.h
+--- linux-4.4.197/include/linux/shmem_fs.h     2019-10-22 12:34:39.018587167 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/shmem_fs.h   2018-10-20 04:57:21.000000000 +0000
 @@ -10,6 +10,9 @@
  
  /* inode in-kernel data */
 @@ -10,6 +10,9 @@
  
  /* inode in-kernel data */
@@ -7117,9 +7089,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/shmem_fs.h linux-4.4.116-vs2.3
  struct shmem_inode_info {
        spinlock_t              lock;
        unsigned int            seals;          /* shmem seals */
  struct shmem_inode_info {
        spinlock_t              lock;
        unsigned int            seals;          /* shmem seals */
-diff -NurpP --minimal linux-4.4.116/include/linux/stat.h linux-4.4.116-vs2.3.9.7/include/linux/stat.h
---- linux-4.4.116/include/linux/stat.h 2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/stat.h       2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/stat.h linux-4.4.197-vs2.3.9.8/include/linux/stat.h
+--- linux-4.4.197/include/linux/stat.h 2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/stat.h       2018-10-20 04:57:21.000000000 +0000
 @@ -25,6 +25,7 @@ struct kstat {
        unsigned int    nlink;
        kuid_t          uid;
 @@ -25,6 +25,7 @@ struct kstat {
        unsigned int    nlink;
        kuid_t          uid;
@@ -7128,9 +7100,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/stat.h linux-4.4.116-vs2.3.9.7
        dev_t           rdev;
        loff_t          size;
        struct timespec  atime;
        dev_t           rdev;
        loff_t          size;
        struct timespec  atime;
-diff -NurpP --minimal linux-4.4.116/include/linux/sunrpc/auth.h linux-4.4.116-vs2.3.9.7/include/linux/sunrpc/auth.h
---- linux-4.4.116/include/linux/sunrpc/auth.h  2016-07-05 04:12:37.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/sunrpc/auth.h        2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/sunrpc/auth.h linux-4.4.197-vs2.3.9.8/include/linux/sunrpc/auth.h
+--- linux-4.4.197/include/linux/sunrpc/auth.h  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/sunrpc/auth.h        2018-10-20 04:57:21.000000000 +0000
 @@ -40,6 +40,7 @@ enum {
  struct auth_cred {
        kuid_t  uid;
 @@ -40,6 +40,7 @@ enum {
  struct auth_cred {
        kuid_t  uid;
@@ -7139,9 +7111,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/sunrpc/auth.h linux-4.4.116-vs
        struct group_info *group_info;
        const char *principal;
        unsigned long ac_flags;
        struct group_info *group_info;
        const char *principal;
        unsigned long ac_flags;
-diff -NurpP --minimal linux-4.4.116/include/linux/sunrpc/clnt.h linux-4.4.116-vs2.3.9.7/include/linux/sunrpc/clnt.h
---- linux-4.4.116/include/linux/sunrpc/clnt.h  2018-02-22 21:19:58.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/sunrpc/clnt.h        2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/sunrpc/clnt.h linux-4.4.197-vs2.3.9.8/include/linux/sunrpc/clnt.h
+--- linux-4.4.197/include/linux/sunrpc/clnt.h  2019-10-22 12:34:39.118585570 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/sunrpc/clnt.h        2018-10-20 04:57:21.000000000 +0000
 @@ -51,7 +51,8 @@ struct rpc_clnt {
                                cl_discrtry : 1,/* disconnect before retry */
                                cl_noretranstimeo: 1,/* No retransmit timeouts */
 @@ -51,7 +51,8 @@ struct rpc_clnt {
                                cl_discrtry : 1,/* disconnect before retry */
                                cl_noretranstimeo: 1,/* No retransmit timeouts */
@@ -7152,9 +7124,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/sunrpc/clnt.h linux-4.4.116-vs
  
        struct rpc_rtt *        cl_rtt;         /* RTO estimator data */
        const struct rpc_timeout *cl_timeout;   /* Timeout strategy */
  
        struct rpc_rtt *        cl_rtt;         /* RTO estimator data */
        const struct rpc_timeout *cl_timeout;   /* Timeout strategy */
-diff -NurpP --minimal linux-4.4.116/include/linux/types.h linux-4.4.116-vs2.3.9.7/include/linux/types.h
---- linux-4.4.116/include/linux/types.h        2016-07-05 04:15:11.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/types.h      2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/types.h linux-4.4.197-vs2.3.9.8/include/linux/types.h
+--- linux-4.4.197/include/linux/types.h        2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/types.h      2018-10-20 04:57:21.000000000 +0000
 @@ -32,6 +32,9 @@ typedef __kernel_uid32_t     uid_t;
  typedef __kernel_gid32_t      gid_t;
  typedef __kernel_uid16_t        uid16_t;
 @@ -32,6 +32,9 @@ typedef __kernel_uid32_t     uid_t;
  typedef __kernel_gid32_t      gid_t;
  typedef __kernel_uid16_t        uid16_t;
@@ -7165,9 +7137,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/types.h linux-4.4.116-vs2.3.9.
  
  typedef unsigned long         uintptr_t;
  
  
  typedef unsigned long         uintptr_t;
  
-diff -NurpP --minimal linux-4.4.116/include/linux/uidgid.h linux-4.4.116-vs2.3.9.7/include/linux/uidgid.h
---- linux-4.4.116/include/linux/uidgid.h       2015-07-06 20:41:43.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/uidgid.h     2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/uidgid.h linux-4.4.197-vs2.3.9.8/include/linux/uidgid.h
+--- linux-4.4.197/include/linux/uidgid.h       2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/uidgid.h     2018-10-20 04:57:21.000000000 +0000
 @@ -21,13 +21,17 @@ typedef struct {
        uid_t val;
  } kuid_t;
 @@ -21,13 +21,17 @@ typedef struct {
        uid_t val;
  } kuid_t;
@@ -7264,9 +7236,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/uidgid.h linux-4.4.116-vs2.3.9
  static inline uid_t from_kuid_munged(struct user_namespace *to, kuid_t kuid)
  {
        uid_t uid = from_kuid(to, kuid);
  static inline uid_t from_kuid_munged(struct user_namespace *to, kuid_t kuid)
  {
        uid_t uid = from_kuid(to, kuid);
-diff -NurpP --minimal linux-4.4.116/include/linux/vroot.h linux-4.4.116-vs2.3.9.7/include/linux/vroot.h
---- linux-4.4.116/include/linux/vroot.h        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vroot.h      2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/vroot.h linux-4.4.197-vs2.3.9.8/include/linux/vroot.h
+--- linux-4.4.197/include/linux/vroot.h        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vroot.h      2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,51 @@
 +
 +/*
 @@ -0,0 +1,51 @@
 +
 +/*
@@ -7319,9 +7291,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/vroot.h linux-4.4.116-vs2.3.9.
 +#define VROOT_CLR_DEV         0x5601
 +
 +#endif /* _LINUX_VROOT_H */
 +#define VROOT_CLR_DEV         0x5601
 +
 +#endif /* _LINUX_VROOT_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_base.h linux-4.4.116-vs2.3.9.7/include/linux/vs_base.h
---- linux-4.4.116/include/linux/vs_base.h      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_base.h    2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_base.h linux-4.4.197-vs2.3.9.8/include/linux/vs_base.h
+--- linux-4.4.197/include/linux/vs_base.h      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_base.h    2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,10 @@
 +#ifndef _VS_BASE_H
 +#define _VS_BASE_H
 @@ -0,0 +1,10 @@
 +#ifndef _VS_BASE_H
 +#define _VS_BASE_H
@@ -7333,9 +7305,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/vs_base.h linux-4.4.116-vs2.3.
 +#else
 +#warning duplicate inclusion
 +#endif
 +#else
 +#warning duplicate inclusion
 +#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_context.h linux-4.4.116-vs2.3.9.7/include/linux/vs_context.h
---- linux-4.4.116/include/linux/vs_context.h   1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_context.h 2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_context.h linux-4.4.197-vs2.3.9.8/include/linux/vs_context.h
+--- linux-4.4.197/include/linux/vs_context.h   1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_context.h 2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,242 @@
 +#ifndef _VS_CONTEXT_H
 +#define _VS_CONTEXT_H
 @@ -0,0 +1,242 @@
 +#ifndef _VS_CONTEXT_H
 +#define _VS_CONTEXT_H
@@ -7579,9 +7551,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/vs_context.h linux-4.4.116-vs2
 +#else
 +#warning duplicate inclusion
 +#endif
 +#else
 +#warning duplicate inclusion
 +#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_cowbl.h linux-4.4.116-vs2.3.9.7/include/linux/vs_cowbl.h
---- linux-4.4.116/include/linux/vs_cowbl.h     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_cowbl.h   2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_cowbl.h linux-4.4.197-vs2.3.9.8/include/linux/vs_cowbl.h
+--- linux-4.4.197/include/linux/vs_cowbl.h     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_cowbl.h   2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,48 @@
 +#ifndef _VS_COWBL_H
 +#define _VS_COWBL_H
 @@ -0,0 +1,48 @@
 +#ifndef _VS_COWBL_H
 +#define _VS_COWBL_H
@@ -7631,9 +7603,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/vs_cowbl.h linux-4.4.116-vs2.3
 +#else
 +#warning duplicate inclusion
 +#endif
 +#else
 +#warning duplicate inclusion
 +#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_cvirt.h linux-4.4.116-vs2.3.9.7/include/linux/vs_cvirt.h
---- linux-4.4.116/include/linux/vs_cvirt.h     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_cvirt.h   2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_cvirt.h linux-4.4.197-vs2.3.9.8/include/linux/vs_cvirt.h
+--- linux-4.4.197/include/linux/vs_cvirt.h     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_cvirt.h   2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,50 @@
 +#ifndef _VS_CVIRT_H
 +#define _VS_CVIRT_H
 @@ -0,0 +1,50 @@
 +#ifndef _VS_CVIRT_H
 +#define _VS_CVIRT_H
@@ -7685,9 +7657,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/vs_cvirt.h linux-4.4.116-vs2.3
 +#else
 +#warning duplicate inclusion
 +#endif
 +#else
 +#warning duplicate inclusion
 +#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_device.h linux-4.4.116-vs2.3.9.7/include/linux/vs_device.h
---- linux-4.4.116/include/linux/vs_device.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_device.h  2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_device.h linux-4.4.197-vs2.3.9.8/include/linux/vs_device.h
+--- linux-4.4.197/include/linux/vs_device.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_device.h  2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,45 @@
 +#ifndef _VS_DEVICE_H
 +#define _VS_DEVICE_H
 @@ -0,0 +1,45 @@
 +#ifndef _VS_DEVICE_H
 +#define _VS_DEVICE_H
@@ -7734,9 +7706,9 @@ diff -NurpP --minimal linux-4.4.116/include/linux/vs_device.h linux-4.4.116-vs2.
 +#else
 +#warning duplicate inclusion
 +#endif
 +#else
 +#warning duplicate inclusion
 +#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_dlimit.h linux-4.4.116-vs2.3.9.7/include/linux/vs_dlimit.h
---- linux-4.4.116/include/linux/vs_dlimit.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_dlimit.h  2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_dlimit.h linux-4.4.197-vs2.3.9.8/include/linux/vs_dlimit.h
+--- linux-4.4.197/include/linux/vs_dlimit.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_dlimit.h  2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,215 @@
 +#ifndef _VS_DLIMIT_H
 +#define _VS_DLIMIT_H
 @@ -0,0 +1,215 @@
 +#ifndef _VS_DLIMIT_H
 +#define _VS_DLIMIT_H
@@ -7953,3414 +7925,3414 @@ diff -NurpP --minimal linux-4.4.116/include/linux/vs_dlimit.h linux-4.4.116-vs2.
 +#else
 +#warning duplicate inclusion
 +#endif
 +#else
 +#warning duplicate inclusion
 +#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_inet.h linux-4.4.116-vs2.3.9.7/include/linux/vs_inet.h
---- linux-4.4.116/include/linux/vs_inet.h      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_inet.h    2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,364 @@
-+#ifndef _VS_INET_H
-+#define _VS_INET_H
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/base.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/base.h
+--- linux-4.4.197/include/linux/vserver/base.h 1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/base.h       2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,184 @@
++#ifndef _VSERVER_BASE_H
++#define _VSERVER_BASE_H
 +
 +
-+#include "vserver/base.h"
-+#include "vserver/network.h"
-+#include "vserver/debug.h"
 +
 +
-+#define IPI_LOOPBACK  htonl(INADDR_LOOPBACK)
++/* context state changes */
 +
 +
-+#define NXAV4(a)      NIPQUAD((a)->ip[0]), NIPQUAD((a)->ip[1]), \
-+                      NIPQUAD((a)->mask), (a)->type
-+#define NXAV4_FMT     "[" NIPQUAD_FMT "-" NIPQUAD_FMT "/" NIPQUAD_FMT ":%04x]"
++enum {
++      VSC_STARTUP = 1,
++      VSC_SHUTDOWN,
 +
 +
-+#define NIPQUAD(addr) \
-+      ((unsigned char *)&addr)[0], \
-+      ((unsigned char *)&addr)[1], \
-+      ((unsigned char *)&addr)[2], \
-+      ((unsigned char *)&addr)[3]
++      VSC_NETUP,
++      VSC_NETDOWN,
++};
 +
 +
-+#define NIPQUAD_FMT "%u.%u.%u.%u"
 +
 +
 +
 +
-+static inline
-+int v4_addr_match(struct nx_addr_v4 *nxa, __be32 addr, uint16_t tmask)
-+{
-+      __be32 ip = nxa->ip[0].s_addr;
-+      __be32 mask = nxa->mask.s_addr;
-+      __be32 bcast = ip | ~mask;
-+      int ret = 0;
++#define vx_task_xid(t)        ((t)->xid)
 +
 +
-+      switch (nxa->type & tmask) {
-+      case NXA_TYPE_MASK:
-+              ret = (ip == (addr & mask));
-+              break;
-+      case NXA_TYPE_ADDR:
-+              ret = 3;
-+              if (addr == ip)
-+                      break;
-+              /* fall through to broadcast */
-+      case NXA_MOD_BCAST:
-+              ret = ((tmask & NXA_MOD_BCAST) && (addr == bcast));
-+              break;
-+      case NXA_TYPE_RANGE:
-+              ret = ((nxa->ip[0].s_addr <= addr) &&
-+                      (nxa->ip[1].s_addr > addr));
-+              break;
-+      case NXA_TYPE_ANY:
-+              ret = 2;
-+              break;
-+      }
++#define vx_current_xid() vx_task_xid(current)
 +
 +
-+      vxdprintk(VXD_CBIT(net, 0),
-+              "v4_addr_match(%p" NXAV4_FMT "," NIPQUAD_FMT ",%04x) = %d",
-+              nxa, NXAV4(nxa), NIPQUAD(addr), tmask, ret);
-+      return ret;
-+}
++#define current_vx_info() (current->vx_info)
 +
 +
-+static inline
-+int v4_addr_in_nx_info(struct nx_info *nxi, __be32 addr, uint16_t tmask)
-+{
-+      struct nx_addr_v4 *nxa;
-+      unsigned long irqflags;
-+      int ret = 1;
 +
 +
-+      if (!nxi)
-+              goto out;
++#define nx_task_nid(t)        ((t)->nid)
 +
 +
-+      ret = 2;
-+      /* allow 127.0.0.1 when remapping lback */
-+      if ((tmask & NXA_LOOPBACK) &&
-+              (addr == IPI_LOOPBACK) &&
-+              nx_info_flags(nxi, NXF_LBACK_REMAP, 0))
-+              goto out;
-+      ret = 3;
-+      /* check for lback address */
-+      if ((tmask & NXA_MOD_LBACK) &&
-+              (nxi->v4_lback.s_addr == addr))
-+              goto out;
-+      ret = 4;
-+      /* check for broadcast address */
-+      if ((tmask & NXA_MOD_BCAST) &&
-+              (nxi->v4_bcast.s_addr == addr))
-+              goto out;
-+      ret = 5;
++#define nx_current_nid() nx_task_nid(current)
 +
 +
-+      /* check for v4 addresses */
-+      spin_lock_irqsave(&nxi->addr_lock, irqflags);
-+      for (nxa = &nxi->v4; nxa; nxa = nxa->next)
-+              if (v4_addr_match(nxa, addr, tmask))
-+                      goto out_unlock;
-+      ret = 0;
-+out_unlock:
-+      spin_unlock_irqrestore(&nxi->addr_lock, irqflags);
-+out:
-+      vxdprintk(VXD_CBIT(net, 0),
-+              "v4_addr_in_nx_info(%p[#%u]," NIPQUAD_FMT ",%04x) = %d",
-+              nxi, nxi ? nxi->nx_id : 0, NIPQUAD(addr), tmask, ret);
-+      return ret;
-+}
++#define current_nx_info() (current->nx_info)
 +
 +
-+static inline
-+int v4_nx_addr_match(struct nx_addr_v4 *nxa, struct nx_addr_v4 *addr, uint16_t mask)
-+{
-+      /* FIXME: needs full range checks */
-+      return v4_addr_match(nxa, addr->ip[0].s_addr, mask);
-+}
 +
 +
-+static inline
-+int v4_nx_addr_in_nx_info(struct nx_info *nxi, struct nx_addr_v4 *nxa, uint16_t mask)
-+{
-+      struct nx_addr_v4 *ptr;
-+      unsigned long irqflags;
-+      int ret = 1;
++/* generic flag merging */
 +
 +
-+      spin_lock_irqsave(&nxi->addr_lock, irqflags);
-+      for (ptr = &nxi->v4; ptr; ptr = ptr->next)
-+              if (v4_nx_addr_match(ptr, nxa, mask))
-+                      goto out_unlock;
-+      ret = 0;
-+out_unlock:
-+      spin_unlock_irqrestore(&nxi->addr_lock, irqflags);
-+      return ret;
-+}
++#define vs_check_flags(v, m, f)       (((v) & (m)) ^ (f))
 +
 +
-+#include <net/inet_sock.h>
++#define vs_mask_flags(v, f, m)        (((v) & ~(m)) | ((f) & (m)))
 +
 +
-+/*
-+ *    Check if a given address matches for a socket
-+ *
-+ *    nxi:            the socket's nx_info if any
-+ *    addr:           to be verified address
-+ */
-+static inline
-+int v4_sock_addr_match (
-+      struct nx_info *nxi,
-+      struct inet_sock *inet,
-+      __be32 addr)
-+{
-+      __be32 saddr = inet->inet_rcv_saddr;
-+      __be32 bcast = nxi ? nxi->v4_bcast.s_addr : INADDR_BROADCAST;
++#define vs_mask_mask(v, f, m) (((v) & ~(m)) | ((v) & (f) & (m)))
 +
 +
-+      if (addr && (saddr == addr || bcast == addr))
-+              return 1;
-+      if (!saddr)
-+              return v4_addr_in_nx_info(nxi, addr, NXA_MASK_BIND);
-+      return 0;
-+}
++#define vs_check_bit(v, n)    ((v) & (1LL << (n)))
 +
 +
 +
 +
-+/* inet related checks and helpers */
++/* context flags */
 +
 +
++#define __vx_flags(v) ((v) ? (v)->vx_flags : 0)
 +
 +
-+struct in_ifaddr;
-+struct net_device;
-+struct sock;
++#define vx_current_flags()    __vx_flags(current_vx_info())
 +
 +
-+#ifdef CONFIG_INET
++#define vx_info_flags(v, m, f) \
++      vs_check_flags(__vx_flags(v), m, f)
 +
 +
-+#include <linux/netdevice.h>
-+#include <linux/inetdevice.h>
-+#include <net/inet_sock.h>
-+#include <net/inet_timewait_sock.h>
++#define task_vx_flags(t, m, f) \
++      ((t) && vx_info_flags((t)->vx_info, m, f))
 +
 +
++#define vx_flags(m, f)        vx_info_flags(current_vx_info(), m, f)
 +
 +
-+int dev_in_nx_info(struct net_device *, struct nx_info *);
-+int v4_dev_in_nx_info(struct net_device *, struct nx_info *);
-+int nx_v4_addr_conflict(struct nx_info *, struct nx_info *);
 +
 +
++/* context caps */
 +
 +
-+/*
-+ *    check if address is covered by socket
-+ *
-+ *    sk:     the socket to check against
-+ *    addr:   the address in question (must be != 0)
-+ */
++#define __vx_ccaps(v) ((v) ? (v)->vx_ccaps : 0)
 +
 +
-+static inline
-+int __v4_addr_match_socket(const struct sock *sk, struct nx_addr_v4 *nxa)
-+{
-+      struct nx_info *nxi = sk->sk_nx_info;
-+      __be32 saddr = sk->sk_rcv_saddr;
++#define vx_current_ccaps()    __vx_ccaps(current_vx_info())
 +
 +
-+      vxdprintk(VXD_CBIT(net, 5),
-+              "__v4_addr_in_socket(%p," NXAV4_FMT ") %p:" NIPQUAD_FMT " %p;%lx",
-+              sk, NXAV4(nxa), nxi, NIPQUAD(saddr), sk->sk_socket,
-+              (sk->sk_socket?sk->sk_socket->flags:0));
++#define vx_info_ccaps(v, c)   (__vx_ccaps(v) & (c))
 +
 +
-+      if (saddr) {            /* direct address match */
-+              return v4_addr_match(nxa, saddr, -1);
-+      } else if (nxi) {       /* match against nx_info */
-+              return v4_nx_addr_in_nx_info(nxi, nxa, -1);
-+      } else {                /* unrestricted any socket */
-+              return 1;
-+      }
-+}
++#define vx_ccaps(c)   vx_info_ccaps(current_vx_info(), (c))
 +
 +
 +
 +
 +
 +
-+static inline
-+int nx_dev_visible(struct nx_info *nxi, struct net_device *dev)
-+{
-+      vxdprintk(VXD_CBIT(net, 1),
-+              "nx_dev_visible(%p[#%u],%p " VS_Q("%s") ") %d",
-+              nxi, nxi ? nxi->nx_id : 0, dev, dev->name,
-+              nxi ? dev_in_nx_info(dev, nxi) : 0);
++/* network flags */
 +
 +
-+      if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0))
-+              return 1;
-+      if (dev_in_nx_info(dev, nxi))
-+              return 1;
-+      return 0;
-+}
++#define __nx_flags(n) ((n) ? (n)->nx_flags : 0)
 +
 +
++#define nx_current_flags()    __nx_flags(current_nx_info())
 +
 +
-+static inline
-+int v4_ifa_in_nx_info(struct in_ifaddr *ifa, struct nx_info *nxi)
-+{
-+      if (!nxi)
-+              return 1;
-+      if (!ifa)
-+              return 0;
-+      return v4_addr_in_nx_info(nxi, ifa->ifa_local, NXA_MASK_SHOW);
-+}
++#define nx_info_flags(n, m, f) \
++      vs_check_flags(__nx_flags(n), m, f)
 +
 +
-+static inline
-+int nx_v4_ifa_visible(struct nx_info *nxi, struct in_ifaddr *ifa)
-+{
-+      vxdprintk(VXD_CBIT(net, 1), "nx_v4_ifa_visible(%p[#%u],%p) %d",
-+              nxi, nxi ? nxi->nx_id : 0, ifa,
-+              nxi ? v4_ifa_in_nx_info(ifa, nxi) : 0);
++#define task_nx_flags(t, m, f) \
++      ((t) && nx_info_flags((t)->nx_info, m, f))
 +
 +
-+      if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0))
-+              return 1;
-+      if (v4_ifa_in_nx_info(ifa, nxi))
-+              return 1;
-+      return 0;
-+}
++#define nx_flags(m, f)        nx_info_flags(current_nx_info(), m, f)
 +
 +
 +
 +
-+struct nx_v4_sock_addr {
-+      __be32 saddr;   /* Address used for validation */
-+      __be32 baddr;   /* Address used for socket bind */
-+};
++/* network caps */
 +
 +
-+static inline
-+int v4_map_sock_addr(struct inet_sock *inet, struct sockaddr_in *addr,
-+      struct nx_v4_sock_addr *nsa)
-+{
-+      struct sock *sk = &inet->sk;
-+      struct nx_info *nxi = sk->sk_nx_info;
-+      __be32 saddr = addr->sin_addr.s_addr;
-+      __be32 baddr = saddr;
++#define __nx_ncaps(n) ((n) ? (n)->nx_ncaps : 0)
 +
 +
-+      vxdprintk(VXD_CBIT(net, 3),
-+              "inet_bind(%p)* %p,%p;%lx " NIPQUAD_FMT,
-+              sk, sk->sk_nx_info, sk->sk_socket,
-+              (sk->sk_socket ? sk->sk_socket->flags : 0),
-+              NIPQUAD(saddr));
++#define nx_current_ncaps()    __nx_ncaps(current_nx_info())
 +
 +
-+      if (nxi) {
-+              if (saddr == INADDR_ANY) {
-+                      if (nx_info_flags(nxi, NXF_SINGLE_IP, 0))
-+                              baddr = nxi->v4.ip[0].s_addr;
-+              } else if (saddr == IPI_LOOPBACK) {
-+                      if (nx_info_flags(nxi, NXF_LBACK_REMAP, 0))
-+                              baddr = nxi->v4_lback.s_addr;
-+              } else if (!ipv4_is_multicast(saddr) ||
-+                      !nx_info_ncaps(nxi, NXC_MULTICAST)) {
-+                      /* normal address bind */
-+                      if (!v4_addr_in_nx_info(nxi, saddr, NXA_MASK_BIND))
-+                              return -EADDRNOTAVAIL;
-+              }
-+      }
++#define nx_info_ncaps(n, c)   (__nx_ncaps(n) & (c))
 +
 +
-+      vxdprintk(VXD_CBIT(net, 3),
-+              "inet_bind(%p) " NIPQUAD_FMT ", " NIPQUAD_FMT,
-+              sk, NIPQUAD(saddr), NIPQUAD(baddr));
++#define nx_ncaps(c)   nx_info_ncaps(current_nx_info(), c)
 +
 +
-+      nsa->saddr = saddr;
-+      nsa->baddr = baddr;
-+      return 0;
-+}
 +
 +
-+static inline
-+void v4_set_sock_addr(struct inet_sock *inet, struct nx_v4_sock_addr *nsa)
-+{
-+      inet->inet_saddr = nsa->baddr;
-+      inet->inet_rcv_saddr = nsa->baddr;
-+}
++/* context mask capabilities */
 +
 +
++#define __vx_mcaps(v) ((v) ? (v)->vx_ccaps >> 32UL : ~0 )
 +
 +
-+/*
-+ *      helper to simplify inet_lookup_listener
-+ *
-+ *      nxi:  the socket's nx_info if any
-+ *      addr: to be verified address
-+ *      saddr:        socket address
-+ */
-+static inline int v4_inet_addr_match (
-+      struct nx_info *nxi,
-+      __be32 addr,
-+      __be32 saddr)
-+{
-+      if (addr && (saddr == addr))
-+              return 1;
-+      if (!saddr)
-+              return nxi ? v4_addr_in_nx_info(nxi, addr, NXA_MASK_BIND) : 1;
-+      return 0;
-+}
++#define vx_info_mcaps(v, c)   (__vx_mcaps(v) & (c))
 +
 +
-+static inline __be32 nx_map_sock_lback(struct nx_info *nxi, __be32 addr)
-+{
-+      if (nx_info_flags(nxi, NXF_HIDE_LBACK, 0) &&
-+              (addr == nxi->v4_lback.s_addr))
-+              return IPI_LOOPBACK;
-+      return addr;
-+}
++#define vx_mcaps(c)   vx_info_mcaps(current_vx_info(), c)
 +
 +
-+static inline
-+int nx_info_has_v4(struct nx_info *nxi)
-+{
-+      if (!nxi)
-+              return 1;
-+      if (NX_IPV4(nxi))
-+              return 1;
-+      if (nx_info_flags(nxi, NXF_LBACK_REMAP, 0))
-+              return 1;
-+      return 0;
-+}
 +
 +
-+#else /* CONFIG_INET */
++/* context bcap mask */
 +
 +
-+static inline
-+int nx_dev_visible(struct nx_info *n, struct net_device *d)
-+{
-+      return 1;
-+}
++#define __vx_bcaps(v)         ((v)->vx_bcaps)
 +
 +
-+static inline
-+int nx_v4_addr_conflict(struct nx_info *n, uint32_t a, const struct sock *s)
-+{
-+      return 1;
-+}
++#define vx_current_bcaps()    __vx_bcaps(current_vx_info())
 +
 +
-+static inline
-+int v4_ifa_in_nx_info(struct in_ifaddr *a, struct nx_info *n)
-+{
-+      return 1;
-+}
 +
 +
-+static inline
-+int nx_info_has_v4(struct nx_info *nxi)
-+{
-+      return 0;
-+}
++/* mask given bcaps */
 +
 +
-+#endif /* CONFIG_INET */
++#define vx_info_mbcaps(v, c)  ((v) ? cap_intersect(__vx_bcaps(v), c) : c)
 +
 +
-+#define current_nx_info_has_v4() \
-+      nx_info_has_v4(current_nx_info())
++#define vx_mbcaps(c)          vx_info_mbcaps(current_vx_info(), c)
 +
 +
-+#else
-+// #warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_inet6.h linux-4.4.116-vs2.3.9.7/include/linux/vs_inet6.h
---- linux-4.4.116/include/linux/vs_inet6.h     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_inet6.h   2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,257 @@
-+#ifndef _VS_INET6_H
-+#define _VS_INET6_H
 +
 +
-+#include "vserver/base.h"
-+#include "vserver/network.h"
-+#include "vserver/debug.h"
++/* masked cap_bset */
 +
 +
-+#include <net/ipv6.h>
++#define vx_info_cap_bset(v)   vx_info_mbcaps(v, current->cap_bset)
 +
 +
-+#define NXAV6(a)      &(a)->ip, &(a)->mask, (a)->prefix, (a)->type
-+#define NXAV6_FMT     "[%pI6/%pI6/%d:%04x]"
++#define vx_current_cap_bset() vx_info_cap_bset(current_vx_info())
 +
 +
++#if 0
++#define vx_info_mbcap(v, b) \
++      (!vx_info_flags(v, VXF_STATE_SETUP, 0) ? \
++      vx_info_bcaps(v, b) : (b))
 +
 +
-+#ifdef        CONFIG_IPV6
++#define task_vx_mbcap(t, b) \
++      vx_info_mbcap((t)->vx_info, (t)->b)
 +
 +
-+static inline
-+int v6_addr_match(struct nx_addr_v6 *nxa,
-+      const struct in6_addr *addr, uint16_t mask)
-+{
-+      int ret = 0;
++#define vx_mbcap(b)   task_vx_mbcap(current, b)
++#endif
 +
 +
-+      switch (nxa->type & mask) {
-+      case NXA_TYPE_MASK:
-+              ret = ipv6_masked_addr_cmp(&nxa->ip, &nxa->mask, addr);
-+              break;
-+      case NXA_TYPE_ADDR:
-+              ret = ipv6_addr_equal(&nxa->ip, addr);
-+              break;
-+      case NXA_TYPE_ANY:
-+              ret = 1;
-+              break;
-+      }
-+      vxdprintk(VXD_CBIT(net, 0),
-+              "v6_addr_match(%p" NXAV6_FMT ",%pI6,%04x) = %d",
-+              nxa, NXAV6(nxa), addr, mask, ret);
-+      return ret;
-+}
++#define vx_cap_raised(v, c, f)        cap_raised(vx_info_mbcaps(v, c), f)
 +
 +
-+static inline
-+int v6_addr_in_nx_info(struct nx_info *nxi,
-+      const struct in6_addr *addr, uint16_t mask)
-+{
-+      struct nx_addr_v6 *nxa;
-+      unsigned long irqflags;
-+      int ret = 1;
++#define vx_capable(b, c) (capable(b) || \
++      (cap_raised(current_cap(), b) && vx_ccaps(c)))
 +
 +
-+      if (!nxi)
-+              goto out;
++#define vx_ns_capable(n, b, c) (ns_capable(n, b) || \
++      (cap_raised(current_cap(), b) && vx_ccaps(c)))
 +
 +
-+      spin_lock_irqsave(&nxi->addr_lock, irqflags);
-+      for (nxa = &nxi->v6; nxa; nxa = nxa->next)
-+              if (v6_addr_match(nxa, addr, mask))
-+                      goto out_unlock;
-+      ret = 0;
-+out_unlock:
-+      spin_unlock_irqrestore(&nxi->addr_lock, irqflags);
-+out:
-+      vxdprintk(VXD_CBIT(net, 0),
-+              "v6_addr_in_nx_info(%p[#%u],%pI6,%04x) = %d",
-+              nxi, nxi ? nxi->nx_id : 0, addr, mask, ret);
-+      return ret;
-+}
++#define nx_capable(b, c) (capable(b) || \
++      (cap_raised(current_cap(), b) && nx_ncaps(c)))
 +
 +
-+static inline
-+int v6_nx_addr_match(struct nx_addr_v6 *nxa, struct nx_addr_v6 *addr, uint16_t mask)
-+{
-+      /* FIXME: needs full range checks */
-+      return v6_addr_match(nxa, &addr->ip, mask);
-+}
++#define nx_ns_capable(n, b, c) (ns_capable(n, b) || \
++      (cap_raised(current_cap(), b) && nx_ncaps(c)))
 +
 +
-+static inline
-+int v6_nx_addr_in_nx_info(struct nx_info *nxi, struct nx_addr_v6 *nxa, uint16_t mask)
-+{
-+      struct nx_addr_v6 *ptr;
-+      unsigned long irqflags;
-+      int ret = 1;
++#define vx_task_initpid(t, n) \
++      ((t)->vx_info && \
++      ((t)->vx_info->vx_initpid == (n)))
 +
 +
-+      spin_lock_irqsave(&nxi->addr_lock, irqflags);
-+      for (ptr = &nxi->v6; ptr; ptr = ptr->next)
-+              if (v6_nx_addr_match(ptr, nxa, mask))
-+                      goto out_unlock;
-+      ret = 0;
-+out_unlock:
-+      spin_unlock_irqrestore(&nxi->addr_lock, irqflags);
-+      return ret;
-+}
++#define vx_current_initpid(n) vx_task_initpid(current, n)
 +
 +
 +
 +
-+/*
-+ *    Check if a given address matches for a socket
-+ *
-+ *    nxi:            the socket's nx_info if any
-+ *    addr:           to be verified address
-+ */
-+static inline
-+int v6_sock_addr_match (
-+      struct nx_info *nxi,
-+      struct inet_sock *inet,
-+      struct in6_addr *addr)
-+{
-+      struct sock *sk = &inet->sk;
-+      const struct in6_addr *saddr = inet6_rcv_saddr(sk);
++/* context unshare mask */
 +
 +
-+      if (!ipv6_addr_any(addr) &&
-+              ipv6_addr_equal(saddr, addr))
-+              return 1;
-+      if (ipv6_addr_any(saddr))
-+              return v6_addr_in_nx_info(nxi, addr, -1);
-+      return 0;
-+}
++#define __vx_umask(v)         ((v)->vx_umask)
 +
 +
-+/*
-+ *    check if address is covered by socket
-+ *
-+ *    sk:     the socket to check against
-+ *    addr:   the address in question (must be != 0)
-+ */
++#define vx_current_umask()    __vx_umask(current_vx_info())
 +
 +
-+static inline
-+int __v6_addr_match_socket(const struct sock *sk, struct nx_addr_v6 *nxa)
-+{
-+      struct nx_info *nxi = sk->sk_nx_info;
-+      const struct in6_addr *saddr = inet6_rcv_saddr(sk);
++#define vx_can_unshare(b, f) (capable(b) || \
++      (cap_raised(current_cap(), b) && \
++      !((f) & ~vx_current_umask())))
 +
 +
-+      vxdprintk(VXD_CBIT(net, 5),
-+              "__v6_addr_in_socket(%p," NXAV6_FMT ") %p:%pI6 %p;%lx",
-+              sk, NXAV6(nxa), nxi, saddr, sk->sk_socket,
-+              (sk->sk_socket?sk->sk_socket->flags:0));
++#define vx_ns_can_unshare(n, b, f) (ns_capable(n, b) || \
++      (cap_raised(current_cap(), b) && \
++      !((f) & ~vx_current_umask())))
 +
 +
-+      if (!ipv6_addr_any(saddr)) {    /* direct address match */
-+              return v6_addr_match(nxa, saddr, -1);
-+      } else if (nxi) {               /* match against nx_info */
-+              return v6_nx_addr_in_nx_info(nxi, nxa, -1);
-+      } else {                        /* unrestricted any socket */
-+              return 1;
-+      }
-+}
++#define __vx_wmask(v)         ((v)->vx_wmask)
 +
 +
++#define vx_current_wmask()    __vx_wmask(current_vx_info())
 +
 +
-+/* inet related checks and helpers */
 +
 +
++#define __vx_state(v) ((v) ? ((v)->vx_state) : 0)
 +
 +
-+struct in_ifaddr;
-+struct net_device;
-+struct sock;
++#define vx_info_state(v, m)   (__vx_state(v) & (m))
 +
 +
 +
 +
-+#include <linux/netdevice.h>
-+#include <linux/inetdevice.h>
-+#include <net/inet_timewait_sock.h>
++#define __nx_state(n) ((n) ? ((n)->nx_state) : 0)
 +
 +
++#define nx_info_state(n, m)   (__nx_state(n) & (m))
 +
 +
-+int dev_in_nx_info(struct net_device *, struct nx_info *);
-+int v6_dev_in_nx_info(struct net_device *, struct nx_info *);
-+int nx_v6_addr_conflict(struct nx_info *, struct nx_info *);
++#endif
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/cacct_cmd.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/cacct_cmd.h
+--- linux-4.4.197/include/linux/vserver/cacct_cmd.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/cacct_cmd.h  2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,10 @@
++#ifndef _VSERVER_CACCT_CMD_H
++#define _VSERVER_CACCT_CMD_H
 +
 +
 +
 +
++#include <linux/compiler.h>
++#include <uapi/vserver/cacct_cmd.h>
 +
 +
-+static inline
-+int v6_ifa_in_nx_info(struct inet6_ifaddr *ifa, struct nx_info *nxi)
-+{
-+      if (!nxi)
-+              return 1;
-+      if (!ifa)
-+              return 0;
-+      return v6_addr_in_nx_info(nxi, &ifa->addr, -1);
-+}
++extern int vc_sock_stat(struct vx_info *, void __user *);
 +
 +
-+static inline
-+int nx_v6_ifa_visible(struct nx_info *nxi, struct inet6_ifaddr *ifa)
-+{
-+      vxdprintk(VXD_CBIT(net, 1), "nx_v6_ifa_visible(%p[#%u],%p) %d",
-+              nxi, nxi ? nxi->nx_id : 0, ifa,
-+              nxi ? v6_ifa_in_nx_info(ifa, nxi) : 0);
++#endif        /* _VSERVER_CACCT_CMD_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/cacct_def.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/cacct_def.h
+--- linux-4.4.197/include/linux/vserver/cacct_def.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/cacct_def.h  2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,43 @@
++#ifndef _VSERVER_CACCT_DEF_H
++#define _VSERVER_CACCT_DEF_H
 +
 +
-+      if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0))
-+              return 1;
-+      if (v6_ifa_in_nx_info(ifa, nxi))
-+              return 1;
-+      return 0;
-+}
++#include <asm/atomic.h>
++#include <linux/vserver/cacct.h>
 +
 +
 +
 +
-+struct nx_v6_sock_addr {
-+      struct in6_addr saddr;  /* Address used for validation */
-+      struct in6_addr baddr;  /* Address used for socket bind */
++struct _vx_sock_acc {
++      atomic_long_t count;
++      atomic_long_t total;
 +};
 +
 +};
 +
-+static inline
-+int v6_map_sock_addr(struct inet_sock *inet, struct sockaddr_in6 *addr,
-+      struct nx_v6_sock_addr *nsa)
-+{
-+      // struct sock *sk = &inet->sk;
-+      // struct nx_info *nxi = sk->sk_nx_info;
-+      struct in6_addr saddr = addr->sin6_addr;
-+      struct in6_addr baddr = saddr;
++/* context sub struct */
 +
 +
-+      nsa->saddr = saddr;
-+      nsa->baddr = baddr;
-+      return 0;
-+}
++struct _vx_cacct {
++      struct _vx_sock_acc sock[VXA_SOCK_SIZE][3];
++      atomic_t slab[8];
++      atomic_t page[6][8];
++};
 +
 +
-+static inline
-+void v6_set_sock_addr(struct inet_sock *inet, struct nx_v6_sock_addr *nsa)
++#ifdef CONFIG_VSERVER_DEBUG
++
++static inline void __dump_vx_cacct(struct _vx_cacct *cacct)
 +{
 +{
-+      // struct sock *sk = &inet->sk;
-+      // struct in6_addr *saddr = inet6_rcv_saddr(sk);
++      int i, j;
 +
 +
-+      // *saddr = nsa->baddr;
-+      // inet->inet_saddr = nsa->baddr;
-+}
++      printk("\t_vx_cacct:");
++      for (i = 0; i < 6; i++) {
++              struct _vx_sock_acc *ptr = cacct->sock[i];
 +
 +
-+static inline
-+int nx_info_has_v6(struct nx_info *nxi)
-+{
-+      if (!nxi)
-+              return 1;
-+      if (NX_IPV6(nxi))
-+              return 1;
-+      return 0;
++              printk("\t [%d] =", i);
++              for (j = 0; j < 3; j++) {
++                      printk(" [%d] = %8lu, %8lu", j,
++                              atomic_long_read(&ptr[j].count),
++                              atomic_long_read(&ptr[j].total));
++              }
++              printk("\n");
++      }
 +}
 +
 +}
 +
-+#else /* CONFIG_IPV6 */
++#endif
 +
 +
-+static inline
-+int nx_v6_dev_visible(struct nx_info *n, struct net_device *d)
-+{
-+      return 1;
-+}
++#endif        /* _VSERVER_CACCT_DEF_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/cacct.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/cacct.h
+--- linux-4.4.197/include/linux/vserver/cacct.h        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/cacct.h      2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,15 @@
++#ifndef _VSERVER_CACCT_H
++#define _VSERVER_CACCT_H
 +
 +
 +
 +
-+static inline
-+int nx_v6_addr_conflict(struct nx_info *n, uint32_t a, const struct sock *s)
-+{
-+      return 1;
-+}
++enum sock_acc_field {
++      VXA_SOCK_UNSPEC = 0,
++      VXA_SOCK_UNIX,
++      VXA_SOCK_INET,
++      VXA_SOCK_INET6,
++      VXA_SOCK_PACKET,
++      VXA_SOCK_OTHER,
++      VXA_SOCK_SIZE   /* array size */
++};
++
++#endif        /* _VSERVER_CACCT_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/cacct_int.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/cacct_int.h
+--- linux-4.4.197/include/linux/vserver/cacct_int.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/cacct_int.h  2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,17 @@
++#ifndef _VSERVER_CACCT_INT_H
++#define _VSERVER_CACCT_INT_H
 +
 +static inline
 +
 +static inline
-+int v6_ifa_in_nx_info(struct in_ifaddr *a, struct nx_info *n)
++unsigned long vx_sock_count(struct _vx_cacct *cacct, int type, int pos)
 +{
 +{
-+      return 1;
++      return atomic_long_read(&cacct->sock[type][pos].count);
 +}
 +
 +}
 +
++
 +static inline
 +static inline
-+int nx_info_has_v6(struct nx_info *nxi)
++unsigned long vx_sock_total(struct _vx_cacct *cacct, int type, int pos)
 +{
 +{
-+      return 0;
++      return atomic_long_read(&cacct->sock[type][pos].total);
 +}
 +
 +}
 +
-+#endif /* CONFIG_IPV6 */
++#endif        /* _VSERVER_CACCT_INT_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/check.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/check.h
+--- linux-4.4.197/include/linux/vserver/check.h        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/check.h      2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,89 @@
++#ifndef _VSERVER_CHECK_H
++#define _VSERVER_CHECK_H
 +
 +
-+#define current_nx_info_has_v6() \
-+      nx_info_has_v6(current_nx_info())
 +
 +
++#define MAX_S_CONTEXT 65535   /* Arbitrary limit */
++
++#ifdef        CONFIG_VSERVER_DYNAMIC_IDS
++#define MIN_D_CONTEXT 49152   /* dynamic contexts start here */
 +#else
 +#else
-+#warning duplicate inclusion
++#define MIN_D_CONTEXT 65536
 +#endif
 +#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_limit.h linux-4.4.116-vs2.3.9.7/include/linux/vs_limit.h
---- linux-4.4.116/include/linux/vs_limit.h     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_limit.h   2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,140 @@
-+#ifndef _VS_LIMIT_H
-+#define _VS_LIMIT_H
 +
 +
-+#include "vserver/limit.h"
-+#include "vserver/base.h"
-+#include "vserver/context.h"
-+#include "vserver/debug.h"
-+#include "vserver/context.h"
-+#include "vserver/limit_int.h"
++/* check conditions */
 +
 +
++#define VS_ADMIN      0x0001
++#define VS_WATCH      0x0002
++#define VS_HIDE               0x0004
++#define VS_HOSTID     0x0008
 +
 +
-+#define vx_acc_cres(v, d, p, r) \
-+      __vx_acc_cres(v, r, d, p, __FILE__, __LINE__)
++#define VS_IDENT      0x0010
++#define VS_EQUIV      0x0020
++#define VS_PARENT     0x0040
++#define VS_CHILD      0x0080
 +
 +
-+#define vx_acc_cres_cond(x, d, p, r) \
-+      __vx_acc_cres(((x) == vx_current_xid()) ? current_vx_info() : 0, \
-+      r, d, p, __FILE__, __LINE__)
++#define VS_ARG_MASK   0x00F0
 +
 +
++#define VS_DYNAMIC    0x0100
++#define VS_STATIC     0x0200
 +
 +
-+#define vx_add_cres(v, a, p, r) \
-+      __vx_add_cres(v, r, a, p, __FILE__, __LINE__)
-+#define vx_sub_cres(v, a, p, r)               vx_add_cres(v, -(a), p, r)
++#define VS_ATR_MASK   0x0F00
 +
 +
-+#define vx_add_cres_cond(x, a, p, r) \
-+      __vx_add_cres(((x) == vx_current_xid()) ? current_vx_info() : 0, \
-+      r, a, p, __FILE__, __LINE__)
-+#define vx_sub_cres_cond(x, a, p, r)  vx_add_cres_cond(x, -(a), p, r)
++#ifdef        CONFIG_VSERVER_PRIVACY
++#define VS_ADMIN_P    (0)
++#define VS_WATCH_P    (0)
++#else
++#define VS_ADMIN_P    VS_ADMIN
++#define VS_WATCH_P    VS_WATCH
++#endif
 +
 +
++#define VS_HARDIRQ    0x1000
++#define VS_SOFTIRQ    0x2000
++#define VS_IRQ                0x4000
 +
 +
-+/* process and file limits */
++#define VS_IRQ_MASK   0xF000
 +
 +
-+#define vx_nproc_inc(p) \
-+      vx_acc_cres((p)->vx_info, 1, p, RLIMIT_NPROC)
++#include <linux/hardirq.h>
 +
 +
-+#define vx_nproc_dec(p) \
-+      vx_acc_cres((p)->vx_info,-1, p, RLIMIT_NPROC)
++/*
++ * check current context for ADMIN/WATCH and
++ * optionally against supplied argument
++ */
++static inline int __vs_check(int cid, int id, unsigned int mode)
++{
++      if (mode & VS_ARG_MASK) {
++              if ((mode & VS_IDENT) && (id == cid))
++                      return 1;
++      }
++      if (mode & VS_ATR_MASK) {
++              if ((mode & VS_DYNAMIC) &&
++                      (id >= MIN_D_CONTEXT) &&
++                      (id <= MAX_S_CONTEXT))
++                      return 1;
++              if ((mode & VS_STATIC) &&
++                      (id > 1) && (id < MIN_D_CONTEXT))
++                      return 1;
++      }
++      if (mode & VS_IRQ_MASK) {
++              if ((mode & VS_IRQ) && unlikely(in_interrupt()))
++                      return 1;
++              if ((mode & VS_HARDIRQ) && unlikely(in_irq()))
++                      return 1;
++              if ((mode & VS_SOFTIRQ) && unlikely(in_softirq()))
++                      return 1;
++      }
++      return (((mode & VS_ADMIN) && (cid == 0)) ||
++              ((mode & VS_WATCH) && (cid == 1)) ||
++              ((mode & VS_HOSTID) && (id == 0)));
++}
 +
 +
-+#define vx_files_inc(f) \
-+      vx_acc_cres_cond((f)->f_xid, 1, f, RLIMIT_NOFILE)
++#define vx_check(c, m)        __vs_check(vx_current_xid(), c, (m) | VS_IRQ)
 +
 +
-+#define vx_files_dec(f) \
-+      vx_acc_cres_cond((f)->f_xid,-1, f, RLIMIT_NOFILE)
++#define vx_weak_check(c, m)   ((m) ? vx_check(c, m) : 1)
 +
 +
-+#define vx_locks_inc(l) \
-+      vx_acc_cres_cond((l)->fl_xid, 1, l, RLIMIT_LOCKS)
 +
 +
-+#define vx_locks_dec(l) \
-+      vx_acc_cres_cond((l)->fl_xid,-1, l, RLIMIT_LOCKS)
++#define nx_check(c, m)        __vs_check(nx_current_nid(), c, m)
 +
 +
-+#define vx_openfd_inc(f) \
-+      vx_acc_cres(current_vx_info(), 1, (void *)(long)(f), VLIMIT_OPENFD)
++#define nx_weak_check(c, m)   ((m) ? nx_check(c, m) : 1)
 +
 +
-+#define vx_openfd_dec(f) \
-+      vx_acc_cres(current_vx_info(),-1, (void *)(long)(f), VLIMIT_OPENFD)
++#endif
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/context_cmd.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/context_cmd.h
+--- linux-4.4.197/include/linux/vserver/context_cmd.h  1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/context_cmd.h        2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,33 @@
++#ifndef _VSERVER_CONTEXT_CMD_H
++#define _VSERVER_CONTEXT_CMD_H
 +
 +
++#include <uapi/vserver/context_cmd.h>
 +
 +
-+#define vx_cres_avail(v, n, r) \
-+      __vx_cres_avail(v, r, n, __FILE__, __LINE__)
++extern int vc_task_xid(uint32_t);
 +
 +
++extern int vc_vx_info(struct vx_info *, void __user *);
 +
 +
-+#define vx_nproc_avail(n) \
-+      vx_cres_avail(current_vx_info(), n, RLIMIT_NPROC)
++extern int vc_ctx_stat(struct vx_info *, void __user *);
 +
 +
-+#define vx_files_avail(n) \
-+      vx_cres_avail(current_vx_info(), n, RLIMIT_NOFILE)
++extern int vc_ctx_create(uint32_t, void __user *);
++extern int vc_ctx_migrate(struct vx_info *, void __user *);
 +
 +
-+#define vx_locks_avail(n) \
-+      vx_cres_avail(current_vx_info(), n, RLIMIT_LOCKS)
++extern int vc_get_cflags(struct vx_info *, void __user *);
++extern int vc_set_cflags(struct vx_info *, void __user *);
 +
 +
-+#define vx_openfd_avail(n) \
-+      vx_cres_avail(current_vx_info(), n, VLIMIT_OPENFD)
++extern int vc_get_ccaps(struct vx_info *, void __user *);
++extern int vc_set_ccaps(struct vx_info *, void __user *);
 +
 +
++extern int vc_get_bcaps(struct vx_info *, void __user *);
++extern int vc_set_bcaps(struct vx_info *, void __user *);
 +
 +
-+/* dentry limits */
++extern int vc_get_umask(struct vx_info *, void __user *);
++extern int vc_set_umask(struct vx_info *, void __user *);
 +
 +
-+#define vx_dentry_inc(d) do {                                         \
-+      if (d_count(d) == 1)                                            \
-+              vx_acc_cres(current_vx_info(), 1, d, VLIMIT_DENTRY);    \
-+      } while (0)
++extern int vc_get_wmask(struct vx_info *, void __user *);
++extern int vc_set_wmask(struct vx_info *, void __user *);
 +
 +
-+#define vx_dentry_dec(d) do {                                         \
-+      if (d_count(d) == 0)                                            \
-+              vx_acc_cres(current_vx_info(),-1, d, VLIMIT_DENTRY);    \
-+      } while (0)
++extern int vc_get_badness(struct vx_info *, void __user *);
++extern int vc_set_badness(struct vx_info *, void __user *);
 +
 +
-+#define vx_dentry_avail(n) \
-+      vx_cres_avail(current_vx_info(), n, VLIMIT_DENTRY)
++#endif        /* _VSERVER_CONTEXT_CMD_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/context.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/context.h
+--- linux-4.4.197/include/linux/vserver/context.h      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/context.h    2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,110 @@
++#ifndef _VSERVER_CONTEXT_H
++#define _VSERVER_CONTEXT_H
 +
 +
 +
 +
-+/* socket limits */
++#include <linux/list.h>
++#include <linux/spinlock.h>
++#include <linux/rcupdate.h>
++#include <uapi/vserver/context.h>
 +
 +
-+#define vx_sock_inc(s) \
-+      vx_acc_cres((s)->sk_vx_info, 1, s, VLIMIT_NSOCK)
++#include "limit_def.h"
++#include "sched_def.h"
++#include "cvirt_def.h"
++#include "cacct_def.h"
++#include "device_def.h"
 +
 +
-+#define vx_sock_dec(s) \
-+      vx_acc_cres((s)->sk_vx_info,-1, s, VLIMIT_NSOCK)
++#define VX_SPACES     2
 +
 +
-+#define vx_sock_avail(n) \
-+      vx_cres_avail(current_vx_info(), n, VLIMIT_NSOCK)
++struct _vx_info_pc {
++      struct _vx_sched_pc sched_pc;
++      struct _vx_cvirt_pc cvirt_pc;
++};
 +
 +
++struct _vx_space {
++      unsigned long vx_nsmask;                /* assignment mask */
++      struct nsproxy *vx_nsproxy;             /* private namespaces */
++      struct fs_struct *vx_fs;                /* private namespace fs */
++      const struct cred *vx_cred;             /* task credentials */
++};
 +
 +
-+/* ipc resource limits */
++struct vx_info {
++      struct hlist_node vx_hlist;             /* linked list of contexts */
++      vxid_t vx_id;                           /* context id */
++      atomic_t vx_usecnt;                     /* usage count */
++      atomic_t vx_tasks;                      /* tasks count */
++      struct vx_info *vx_parent;              /* parent context */
++      int vx_state;                           /* context state */
 +
 +
-+#define vx_ipcmsg_add(v, u, a) \
-+      vx_add_cres(v, a, u, RLIMIT_MSGQUEUE)
++      struct _vx_space space[VX_SPACES];      /* namespace store */
 +
 +
-+#define vx_ipcmsg_sub(v, u, a) \
-+      vx_sub_cres(v, a, u, RLIMIT_MSGQUEUE)
++      uint64_t vx_flags;                      /* context flags */
++      uint64_t vx_ccaps;                      /* context caps (vserver) */
++      uint64_t vx_umask;                      /* unshare mask (guest) */
++      uint64_t vx_wmask;                      /* warn mask (guest) */
++      kernel_cap_t vx_bcaps;                  /* bounding caps (system) */
 +
 +
-+#define vx_ipcmsg_avail(v, a) \
-+      vx_cres_avail(v, a, RLIMIT_MSGQUEUE)
++      struct task_struct *vx_reaper;          /* guest reaper process */
++      pid_t vx_initpid;                       /* PID of guest init */
++      int64_t vx_badness_bias;                /* OOM points bias */
 +
 +
++      struct _vx_limit limit;                 /* vserver limits */
++      struct _vx_sched sched;                 /* vserver scheduler */
++      struct _vx_cvirt cvirt;                 /* virtual/bias stuff */
++      struct _vx_cacct cacct;                 /* context accounting */
 +
 +
-+#define vx_ipcshm_add(v, k, a) \
-+      vx_add_cres(v, a, (void *)(long)(k), VLIMIT_SHMEM)
++      struct _vx_device dmap;                 /* default device map targets */
 +
 +
-+#define vx_ipcshm_sub(v, k, a) \
-+      vx_sub_cres(v, a, (void *)(long)(k), VLIMIT_SHMEM)
++#ifndef CONFIG_SMP
++      struct _vx_info_pc info_pc;             /* per cpu data */
++#else
++      struct _vx_info_pc *ptr_pc;             /* per cpu array */
++#endif
 +
 +
-+#define vx_ipcshm_avail(v, a) \
-+      vx_cres_avail(v, a, VLIMIT_SHMEM)
++      wait_queue_head_t vx_wait;              /* context exit waitqueue */
++      int reboot_cmd;                         /* last sys_reboot() cmd */
++      int exit_code;                          /* last process exit code */
 +
 +
++      char vx_name[65];                       /* vserver name */
++};
 +
 +
-+#define vx_semary_inc(a) \
-+      vx_acc_cres(current_vx_info(), 1, a, VLIMIT_SEMARY)
++#ifndef CONFIG_SMP
++#define       vx_ptr_pc(vxi)          (&(vxi)->info_pc)
++#define       vx_per_cpu(vxi, v, id)  vx_ptr_pc(vxi)->v
++#else
++#define       vx_ptr_pc(vxi)          ((vxi)->ptr_pc)
++#define       vx_per_cpu(vxi, v, id)  per_cpu_ptr(vx_ptr_pc(vxi), id)->v
++#endif
 +
 +
-+#define vx_semary_dec(a) \
-+      vx_acc_cres(current_vx_info(), -1, a, VLIMIT_SEMARY)
++#define       vx_cpu(vxi, v)          vx_per_cpu(vxi, v, smp_processor_id())
 +
 +
 +
 +
-+#define vx_nsems_add(a,n) \
-+      vx_add_cres(current_vx_info(), n, a, VLIMIT_NSEMS)
++struct vx_info_save {
++      struct vx_info *vxi;
++      vxid_t xid;
++};
 +
 +
-+#define vx_nsems_sub(a,n) \
-+      vx_sub_cres(current_vx_info(), n, a, VLIMIT_NSEMS)
 +
 +
++/* status flags */
 +
 +
-+#else
-+#warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_network.h linux-4.4.116-vs2.3.9.7/include/linux/vs_network.h
---- linux-4.4.116/include/linux/vs_network.h   1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_network.h 2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,169 @@
-+#ifndef _NX_VS_NETWORK_H
-+#define _NX_VS_NETWORK_H
++#define VXS_HASHED    0x0001
++#define VXS_PAUSED    0x0010
++#define VXS_SHUTDOWN  0x0100
++#define VXS_HELPER    0x1000
++#define VXS_RELEASED  0x8000
 +
 +
-+#include "vserver/context.h"
-+#include "vserver/network.h"
-+#include "vserver/base.h"
-+#include "vserver/check.h"
-+#include "vserver/debug.h"
 +
 +
-+#include <linux/sched.h>
++extern void claim_vx_info(struct vx_info *, struct task_struct *);
++extern void release_vx_info(struct vx_info *, struct task_struct *);
 +
 +
++extern struct vx_info *lookup_vx_info(int);
++extern struct vx_info *lookup_or_create_vx_info(int);
 +
 +
-+#define get_nx_info(i) __get_nx_info(i, __FILE__, __LINE__)
++extern int get_xid_list(int, unsigned int *, int);
++extern int xid_is_hashed(vxid_t);
 +
 +
-+static inline struct nx_info *__get_nx_info(struct nx_info *nxi,
-+      const char *_file, int _line)
-+{
-+      if (!nxi)
-+              return NULL;
++extern int vx_migrate_task(struct task_struct *, struct vx_info *, int);
 +
 +
-+      vxlprintk(VXD_CBIT(nid, 2), "get_nx_info(%p[#%d.%d])",
-+              nxi, nxi ? nxi->nx_id : 0,
-+              nxi ? atomic_read(&nxi->nx_usecnt) : 0,
-+              _file, _line);
++extern long vs_state_change(struct vx_info *, unsigned int);
 +
 +
-+      atomic_inc(&nxi->nx_usecnt);
-+      return nxi;
-+}
 +
 +
++#endif        /* _VSERVER_CONTEXT_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/cvirt_cmd.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/cvirt_cmd.h
+--- linux-4.4.197/include/linux/vserver/cvirt_cmd.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/cvirt_cmd.h  2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,13 @@
++#ifndef _VSERVER_CVIRT_CMD_H
++#define _VSERVER_CVIRT_CMD_H
 +
 +
-+extern void free_nx_info(struct nx_info *);
 +
 +
-+#define put_nx_info(i) __put_nx_info(i, __FILE__, __LINE__)
++#include <linux/compiler.h>
++#include <uapi/vserver/cvirt_cmd.h>
 +
 +
-+static inline void __put_nx_info(struct nx_info *nxi, const char *_file, int _line)
-+{
-+      if (!nxi)
-+              return;
++extern int vc_set_vhi_name(struct vx_info *, void __user *);
++extern int vc_get_vhi_name(struct vx_info *, void __user *);
 +
 +
-+      vxlprintk(VXD_CBIT(nid, 2), "put_nx_info(%p[#%d.%d])",
-+              nxi, nxi ? nxi->nx_id : 0,
-+              nxi ? atomic_read(&nxi->nx_usecnt) : 0,
-+              _file, _line);
++extern int vc_virt_stat(struct vx_info *, void __user *);
 +
 +
-+      if (atomic_dec_and_test(&nxi->nx_usecnt))
-+              free_nx_info(nxi);
-+}
++#endif        /* _VSERVER_CVIRT_CMD_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/cvirt_def.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/cvirt_def.h
+--- linux-4.4.197/include/linux/vserver/cvirt_def.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/cvirt_def.h  2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,80 @@
++#ifndef _VSERVER_CVIRT_DEF_H
++#define _VSERVER_CVIRT_DEF_H
 +
 +
++#include <linux/jiffies.h>
++#include <linux/spinlock.h>
++#include <linux/wait.h>
++#include <linux/time.h>
++#include <asm/atomic.h>
 +
 +
-+#define init_nx_info(p, i) __init_nx_info(p, i, __FILE__, __LINE__)
 +
 +
-+static inline void __init_nx_info(struct nx_info **nxp, struct nx_info *nxi,
-+              const char *_file, int _line)
-+{
-+      if (nxi) {
-+              vxlprintk(VXD_CBIT(nid, 3),
-+                      "init_nx_info(%p[#%d.%d])",
-+                      nxi, nxi ? nxi->nx_id : 0,
-+                      nxi ? atomic_read(&nxi->nx_usecnt) : 0,
-+                      _file, _line);
++struct _vx_usage_stat {
++      uint64_t user;
++      uint64_t nice;
++      uint64_t system;
++      uint64_t softirq;
++      uint64_t irq;
++      uint64_t idle;
++      uint64_t iowait;
++};
 +
 +
-+              atomic_inc(&nxi->nx_usecnt);
-+      }
-+      *nxp = nxi;
-+}
++struct _vx_syslog {
++      wait_queue_head_t log_wait;
++      spinlock_t logbuf_lock;         /* lock for the log buffer */
 +
 +
++      unsigned long log_start;        /* next char to be read by syslog() */
++      unsigned long con_start;        /* next char to be sent to consoles */
++      unsigned long log_end;  /* most-recently-written-char + 1 */
++      unsigned long logged_chars;     /* #chars since last read+clear operation */
 +
 +
-+#define set_nx_info(p, i) __set_nx_info(p, i, __FILE__, __LINE__)
++      char log_buf[1024];
++};
 +
 +
-+static inline void __set_nx_info(struct nx_info **nxp, struct nx_info *nxi,
-+      const char *_file, int _line)
-+{
-+      struct nx_info *nxo;
 +
 +
-+      if (!nxi)
-+              return;
++/* context sub struct */
 +
 +
-+      vxlprintk(VXD_CBIT(nid, 3), "set_nx_info(%p[#%d.%d])",
-+              nxi, nxi ? nxi->nx_id : 0,
-+              nxi ? atomic_read(&nxi->nx_usecnt) : 0,
-+              _file, _line);
++struct _vx_cvirt {
++      atomic_t nr_threads;            /* number of current threads */
++      atomic_t nr_running;            /* number of running threads */
++      atomic_t nr_uninterruptible;    /* number of uninterruptible threads */
 +
 +
-+      atomic_inc(&nxi->nx_usecnt);
-+      nxo = xchg(nxp, nxi);
-+      BUG_ON(nxo);
-+}
++      atomic_t nr_onhold;             /* processes on hold */
++      uint32_t onhold_last;           /* jiffies when put on hold */
 +
 +
-+#define clr_nx_info(p) __clr_nx_info(p, __FILE__, __LINE__)
++      struct timespec bias_ts;        /* time offset to the host */
++      struct timespec bias_idle;
++      struct timespec bias_uptime;    /* context creation point */
++      uint64_t bias_clock;            /* offset in clock_t */
 +
 +
-+static inline void __clr_nx_info(struct nx_info **nxp,
-+      const char *_file, int _line)
-+{
-+      struct nx_info *nxo;
++      spinlock_t load_lock;           /* lock for the load averages */
++      atomic_t load_updates;          /* nr of load updates done so far */
++      uint32_t load_last;             /* last time load was calculated */
++      uint32_t load[3];               /* load averages 1,5,15 */
 +
 +
-+      nxo = xchg(nxp, NULL);
-+      if (!nxo)
-+              return;
++      atomic_t total_forks;           /* number of forks so far */
 +
 +
-+      vxlprintk(VXD_CBIT(nid, 3), "clr_nx_info(%p[#%d.%d])",
-+              nxo, nxo ? nxo->nx_id : 0,
-+              nxo ? atomic_read(&nxo->nx_usecnt) : 0,
-+              _file, _line);
++      struct _vx_syslog syslog;
++};
 +
 +
-+      if (atomic_dec_and_test(&nxo->nx_usecnt))
-+              free_nx_info(nxo);
-+}
++struct _vx_cvirt_pc {
++      struct _vx_usage_stat cpustat;
++};
 +
 +
 +
 +
-+#define claim_nx_info(v, p) __claim_nx_info(v, p, __FILE__, __LINE__)
++#ifdef CONFIG_VSERVER_DEBUG
 +
 +
-+static inline void __claim_nx_info(struct nx_info *nxi,
-+      struct task_struct *task, const char *_file, int _line)
++static inline void __dump_vx_cvirt(struct _vx_cvirt *cvirt)
 +{
 +{
-+      vxlprintk(VXD_CBIT(nid, 3), "claim_nx_info(%p[#%d.%d.%d]) %p",
-+              nxi, nxi ? nxi->nx_id : 0,
-+              nxi?atomic_read(&nxi->nx_usecnt):0,
-+              nxi?atomic_read(&nxi->nx_tasks):0,
-+              task, _file, _line);
-+
-+      atomic_inc(&nxi->nx_tasks);
++      printk("\t_vx_cvirt:\n");
++      printk("\t threads: %4d, %4d, %4d, %4d\n",
++              atomic_read(&cvirt->nr_threads),
++              atomic_read(&cvirt->nr_running),
++              atomic_read(&cvirt->nr_uninterruptible),
++              atomic_read(&cvirt->nr_onhold));
++      /* add rest here */
++      printk("\t total_forks = %d\n", atomic_read(&cvirt->total_forks));
 +}
 +
 +}
 +
++#endif
 +
 +
-+extern void unhash_nx_info(struct nx_info *);
-+
-+#define release_nx_info(v, p) __release_nx_info(v, p, __FILE__, __LINE__)
-+
-+static inline void __release_nx_info(struct nx_info *nxi,
-+      struct task_struct *task, const char *_file, int _line)
-+{
-+      vxlprintk(VXD_CBIT(nid, 3), "release_nx_info(%p[#%d.%d.%d]) %p",
-+              nxi, nxi ? nxi->nx_id : 0,
-+              nxi ? atomic_read(&nxi->nx_usecnt) : 0,
-+              nxi ? atomic_read(&nxi->nx_tasks) : 0,
-+              task, _file, _line);
-+
-+      might_sleep();
-+
-+      if (atomic_dec_and_test(&nxi->nx_tasks))
-+              unhash_nx_info(nxi);
-+}
++#endif        /* _VSERVER_CVIRT_DEF_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/cvirt.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/cvirt.h
+--- linux-4.4.197/include/linux/vserver/cvirt.h        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/cvirt.h      2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,18 @@
++#ifndef _VSERVER_CVIRT_H
++#define _VSERVER_CVIRT_H
 +
 +
++struct timespec;
 +
 +
-+#define task_get_nx_info(i)   __task_get_nx_info(i, __FILE__, __LINE__)
++void vx_vsi_boottime(struct timespec *);
 +
 +
-+static __inline__ struct nx_info *__task_get_nx_info(struct task_struct *p,
-+      const char *_file, int _line)
-+{
-+      struct nx_info *nxi;
++void vx_vsi_uptime(struct timespec *, struct timespec *);
 +
 +
-+      task_lock(p);
-+      vxlprintk(VXD_CBIT(nid, 5), "task_get_nx_info(%p)",
-+              p, _file, _line);
-+      nxi = __get_nx_info(p->nx_info, _file, _line);
-+      task_unlock(p);
-+      return nxi;
-+}
 +
 +
++struct vx_info;
 +
 +
-+static inline void exit_nx_info(struct task_struct *p)
-+{
-+      if (p->nx_info)
-+              release_nx_info(p->nx_info, p);
-+}
++void vx_update_load(struct vx_info *);
 +
 +
 +
 +
-+#else
-+#warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_pid.h linux-4.4.116-vs2.3.9.7/include/linux/vs_pid.h
---- linux-4.4.116/include/linux/vs_pid.h       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_pid.h     2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,50 @@
-+#ifndef _VS_PID_H
-+#define _VS_PID_H
++int vx_do_syslog(int, char __user *, int);
 +
 +
-+#include "vserver/base.h"
-+#include "vserver/check.h"
-+#include "vserver/context.h"
-+#include "vserver/debug.h"
-+#include "vserver/pid.h"
-+#include <linux/pid_namespace.h>
++#endif        /* _VSERVER_CVIRT_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/debug_cmd.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/debug_cmd.h
+--- linux-4.4.197/include/linux/vserver/debug_cmd.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/debug_cmd.h  2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,37 @@
++#ifndef _VSERVER_DEBUG_CMD_H
++#define _VSERVER_DEBUG_CMD_H
 +
 +
++#include <uapi/vserver/debug_cmd.h>
 +
 +
-+#define VXF_FAKE_INIT (VXF_INFO_INIT | VXF_STATE_INIT)
 +
 +
-+static inline
-+int vx_proc_task_visible(struct task_struct *task)
-+{
-+      if ((task->pid == 1) &&
-+              !vx_flags(VXF_FAKE_INIT, VXF_FAKE_INIT))
-+              /* show a blend through init */
-+              goto visible;
-+      if (vx_check(vx_task_xid(task), VS_WATCH | VS_IDENT))
-+              goto visible;
-+      return 0;
-+visible:
-+      return 1;
-+}
++#ifdef        CONFIG_COMPAT
 +
 +
-+#define find_task_by_real_pid(pid) find_task_by_pid_ns(pid, &init_pid_ns)
++#include <asm/compat.h>
 +
 +
++struct        vcmd_read_history_v0_x32 {
++      uint32_t index;
++      uint32_t count;
++      compat_uptr_t data_ptr;
++};
 +
 +
-+static inline
-+struct task_struct *vx_get_proc_task(struct inode *inode, struct pid *pid)
-+{
-+      struct task_struct *task = get_pid_task(pid, PIDTYPE_PID);
++struct        vcmd_read_monitor_v0_x32 {
++      uint32_t index;
++      uint32_t count;
++      compat_uptr_t data_ptr;
++};
 +
 +
-+      if (task && !vx_proc_task_visible(task)) {
-+              vxdprintk(VXD_CBIT(misc, 6),
-+                      "dropping task (get) %p[#%u,%u] for %p[#%u,%u]",
-+                      task, task->xid, task->pid,
-+                      current, current->xid, current->pid);
-+              put_task_struct(task);
-+              task = NULL;
-+      }
-+      return task;
-+}
++#endif  /* CONFIG_COMPAT */
 +
 +
++extern int vc_dump_history(uint32_t);
 +
 +
-+#else
-+#warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_sched.h linux-4.4.116-vs2.3.9.7/include/linux/vs_sched.h
---- linux-4.4.116/include/linux/vs_sched.h     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_sched.h   2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,40 @@
-+#ifndef _VS_SCHED_H
-+#define _VS_SCHED_H
++extern int vc_read_history(uint32_t, void __user *);
++extern int vc_read_monitor(uint32_t, void __user *);
 +
 +
-+#include "vserver/base.h"
-+#include "vserver/context.h"
-+#include "vserver/sched.h"
++#ifdef        CONFIG_COMPAT
 +
 +
++extern int vc_read_history_x32(uint32_t, void __user *);
++extern int vc_read_monitor_x32(uint32_t, void __user *);
 +
 +
-+#define MAX_PRIO_BIAS          20
-+#define MIN_PRIO_BIAS         -20
++#endif  /* CONFIG_COMPAT */
 +
 +
-+static inline
-+int vx_adjust_prio(struct task_struct *p, int prio, int max_user)
-+{
-+      struct vx_info *vxi = p->vx_info;
++#endif        /* _VSERVER_DEBUG_CMD_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/debug.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/debug.h
+--- linux-4.4.197/include/linux/vserver/debug.h        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/debug.h      2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,146 @@
++#ifndef _VSERVER_DEBUG_H
++#define _VSERVER_DEBUG_H
 +
 +
-+      if (vxi)
-+              prio += vx_cpu(vxi, sched_pc).prio_bias;
-+      return prio;
-+}
 +
 +
-+static inline void vx_account_user(struct vx_info *vxi,
-+      cputime_t cputime, int nice)
-+{
-+      if (!vxi)
-+              return;
-+      vx_cpu(vxi, sched_pc).user_ticks += cputime;
-+}
++#define VXD_CBIT(n, m)        (vs_debug_ ## n & (1 << (m)))
++#define VXD_CMIN(n, m)        (vs_debug_ ## n > (m))
++#define VXD_MASK(n, m)        (vs_debug_ ## n & (m))
 +
 +
-+static inline void vx_account_system(struct vx_info *vxi,
-+      cputime_t cputime, int idle)
-+{
-+      if (!vxi)
-+              return;
-+      vx_cpu(vxi, sched_pc).sys_ticks += cputime;
-+}
++#define VXD_DEV(d)    (d), (d)->bd_inode->i_ino,              \
++                      imajor((d)->bd_inode), iminor((d)->bd_inode)
++#define VXF_DEV               "%p[%lu,%d:%d]"
 +
 +
++#if   defined(CONFIG_QUOTES_UTF8)
++#define       VS_Q_LQM        "\xc2\xbb"
++#define       VS_Q_RQM        "\xc2\xab"
++#elif defined(CONFIG_QUOTES_ASCII)
++#define       VS_Q_LQM        "\x27"
++#define       VS_Q_RQM        "\x27"
 +#else
 +#else
-+#warning duplicate inclusion
++#define       VS_Q_LQM        "\xbb"
++#define       VS_Q_RQM        "\xab"
 +#endif
 +#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_socket.h linux-4.4.116-vs2.3.9.7/include/linux/vs_socket.h
---- linux-4.4.116/include/linux/vs_socket.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_socket.h  2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,67 @@
-+#ifndef _VS_SOCKET_H
-+#define _VS_SOCKET_H
 +
 +
-+#include "vserver/debug.h"
-+#include "vserver/base.h"
-+#include "vserver/cacct.h"
-+#include "vserver/context.h"
-+#include "vserver/tag.h"
++#define       VS_Q(f)         VS_Q_LQM f VS_Q_RQM
 +
 +
 +
 +
-+/* socket accounting */
++#define vxd_path(p)                                           \
++      ({ static char _buffer[PATH_MAX];                       \
++         d_path(p, _buffer, sizeof(_buffer)); })
 +
 +
-+#include <linux/socket.h>
++#define vxd_cond_path(n)                                      \
++      ((n) ? vxd_path(&(n)->path) : "<null>" )
 +
 +
-+static inline int vx_sock_type(int family)
-+{
-+      switch (family) {
-+      case PF_UNSPEC:
-+              return VXA_SOCK_UNSPEC;
-+      case PF_UNIX:
-+              return VXA_SOCK_UNIX;
-+      case PF_INET:
-+              return VXA_SOCK_INET;
-+      case PF_INET6:
-+              return VXA_SOCK_INET6;
-+      case PF_PACKET:
-+              return VXA_SOCK_PACKET;
-+      default:
-+              return VXA_SOCK_OTHER;
-+      }
-+}
 +
 +
-+#define vx_acc_sock(v, f, p, s) \
-+      __vx_acc_sock(v, f, p, s, __FILE__, __LINE__)
++#ifdef        CONFIG_VSERVER_DEBUG
 +
 +
-+static inline void __vx_acc_sock(struct vx_info *vxi,
-+      int family, int pos, int size, char *file, int line)
-+{
-+      if (vxi) {
-+              int type = vx_sock_type(family);
++extern unsigned int vs_debug_switch;
++extern unsigned int vs_debug_xid;
++extern unsigned int vs_debug_nid;
++extern unsigned int vs_debug_tag;
++extern unsigned int vs_debug_net;
++extern unsigned int vs_debug_limit;
++extern unsigned int vs_debug_cres;
++extern unsigned int vs_debug_dlim;
++extern unsigned int vs_debug_quota;
++extern unsigned int vs_debug_cvirt;
++extern unsigned int vs_debug_space;
++extern unsigned int vs_debug_perm;
++extern unsigned int vs_debug_misc;
 +
 +
-+              atomic_long_inc(&vxi->cacct.sock[type][pos].count);
-+              atomic_long_add(size, &vxi->cacct.sock[type][pos].total);
-+      }
-+}
 +
 +
-+#define vx_sock_recv(sk, s) \
-+      vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 0, s)
-+#define vx_sock_send(sk, s) \
-+      vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 1, s)
-+#define vx_sock_fail(sk, s) \
-+      vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 2, s)
++#define VX_LOGLEVEL   "vxD: "
++#define VX_PROC_FMT   "%p: "
++#define VX_PROCESS    current
 +
 +
++#define vxdprintk(c, f, x...)                                 \
++      do {                                                    \
++              if (c)                                          \
++                      printk(VX_LOGLEVEL VX_PROC_FMT f "\n",  \
++                              VX_PROCESS , ##x);              \
++      } while (0)
 +
 +
-+#define sock_vx_init(s) do {          \
-+      (s)->sk_xid = 0;                \
-+      (s)->sk_vx_info = NULL;         \
++#define vxlprintk(c, f, x...)                                 \
++      do {                                                    \
++              if (c)                                          \
++                      printk(VX_LOGLEVEL f " @%s:%d\n", x);   \
 +      } while (0)
 +
 +      } while (0)
 +
-+#define sock_nx_init(s) do {          \
-+      (s)->sk_nid = 0;                \
-+      (s)->sk_nx_info = NULL;         \
++#define vxfprintk(c, f, x...)                                 \
++      do {                                                    \
++              if (c)                                          \
++                      printk(VX_LOGLEVEL f " %s@%s:%d\n", x); \
 +      } while (0)
 +
 +      } while (0)
 +
-+#else
-+#warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_tag.h linux-4.4.116-vs2.3.9.7/include/linux/vs_tag.h
---- linux-4.4.116/include/linux/vs_tag.h       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_tag.h     2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,47 @@
-+#ifndef _VS_TAG_H
-+#define _VS_TAG_H
 +
 +
-+#include <linux/vserver/tag.h>
++struct vx_info;
 +
 +
-+/* check conditions */
++void dump_vx_info(struct vx_info *, int);
++void dump_vx_info_inactive(int);
 +
 +
-+#define DX_ADMIN      0x0001
-+#define DX_WATCH      0x0002
-+#define DX_HOSTID     0x0008
++#else /* CONFIG_VSERVER_DEBUG */
 +
 +
-+#define DX_IDENT      0x0010
++#define vs_debug_switch       0
++#define vs_debug_xid  0
++#define vs_debug_nid  0
++#define vs_debug_tag  0
++#define vs_debug_net  0
++#define vs_debug_limit        0
++#define vs_debug_cres 0
++#define vs_debug_dlim 0
++#define vs_debug_quota        0
++#define vs_debug_cvirt        0
++#define vs_debug_space        0
++#define vs_debug_perm 0
++#define vs_debug_misc 0
 +
 +
-+#define DX_ARG_MASK   0x0010
++#define vxdprintk(x...) do { } while (0)
++#define vxlprintk(x...) do { } while (0)
++#define vxfprintk(x...) do { } while (0)
 +
 +
++#endif        /* CONFIG_VSERVER_DEBUG */
 +
 +
-+#define dx_task_tag(t)        ((t)->tag)
 +
 +
-+#define dx_current_tag() dx_task_tag(current)
++#ifdef        CONFIG_VSERVER_WARN
 +
 +
-+#define dx_check(c, m)        __dx_check(dx_current_tag(), c, m)
++#define VX_WARNLEVEL  KERN_WARNING "vxW: "
++#define VX_WARN_TASK  "[" VS_Q("%s") ",%u:#%u|%u|%u] "
++#define VX_WARN_XID   "[xid #%u] "
++#define VX_WARN_NID   "[nid #%u] "
++#define VX_WARN_TAG   "[tag #%u] "
 +
 +
-+#define dx_weak_check(c, m)   ((m) ? dx_check(c, m) : 1)
++#define vxwprintk(c, f, x...)                                 \
++      do {                                                    \
++              if (c)                                          \
++                      printk(VX_WARNLEVEL f "\n", ##x);       \
++      } while (0)
 +
 +
++#else /* CONFIG_VSERVER_WARN */
 +
 +
-+/*
-+ * check current context for ADMIN/WATCH and
-+ * optionally against supplied argument
-+ */
-+static inline int __dx_check(vtag_t cid, vtag_t id, unsigned int mode)
-+{
-+      if (mode & DX_ARG_MASK) {
-+              if ((mode & DX_IDENT) && (id == cid))
-+                      return 1;
-+      }
-+      return (((mode & DX_ADMIN) && (cid == 0)) ||
-+              ((mode & DX_WATCH) && (cid == 1)) ||
-+              ((mode & DX_HOSTID) && (id == 0)));
-+}
++#define vxwprintk(x...) do { } while (0)
 +
 +
-+struct inode;
-+int dx_permission(const struct inode *inode, int mask);
++#endif        /* CONFIG_VSERVER_WARN */
 +
 +
++#define vxwprintk_task(c, f, x...)                            \
++      vxwprintk(c, VX_WARN_TASK f,                            \
++              current->comm, current->pid,                    \
++              current->xid, current->nid,                     \
++              current->tag, ##x)
++#define vxwprintk_xid(c, f, x...)                             \
++      vxwprintk(c, VX_WARN_XID f, current->xid, x)
++#define vxwprintk_nid(c, f, x...)                             \
++      vxwprintk(c, VX_WARN_NID f, current->nid, x)
++#define vxwprintk_tag(c, f, x...)                             \
++      vxwprintk(c, VX_WARN_TAG f, current->tag, x)
 +
 +
++#ifdef        CONFIG_VSERVER_DEBUG
++#define vxd_assert_lock(l)    assert_spin_locked(l)
++#define vxd_assert(c, f, x...)        vxlprintk(!(c), \
++      "assertion [" f "] failed.", ##x, __FILE__, __LINE__)
 +#else
 +#else
-+#warning duplicate inclusion
++#define vxd_assert_lock(l)    do { } while (0)
++#define vxd_assert(c, f, x...)        do { } while (0)
 +#endif
 +#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vs_time.h linux-4.4.116-vs2.3.9.7/include/linux/vs_time.h
---- linux-4.4.116/include/linux/vs_time.h      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vs_time.h    2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,19 @@
-+#ifndef _VS_TIME_H
-+#define _VS_TIME_H
 +
 +
 +
 +
-+/* time faking stuff */
++#endif /* _VSERVER_DEBUG_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/device_cmd.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/device_cmd.h
+--- linux-4.4.197/include/linux/vserver/device_cmd.h   1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/device_cmd.h 2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,31 @@
++#ifndef _VSERVER_DEVICE_CMD_H
++#define _VSERVER_DEVICE_CMD_H
 +
 +
-+#ifdef CONFIG_VSERVER_VTIME
++#include <uapi/vserver/device_cmd.h>
 +
 +
-+extern void vx_adjust_timespec(struct timespec *ts);
-+extern int vx_settimeofday(const struct timespec *ts);
 +
 +
-+#else
-+#define       vx_adjust_timespec(t)   do { } while (0)
-+#define       vx_settimeofday(t)      do_settimeofday(t)
-+#endif
++#ifdef        CONFIG_COMPAT
 +
 +
-+#else
-+#warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/base.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/base.h
---- linux-4.4.116/include/linux/vserver/base.h 1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/base.h       2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,184 @@
-+#ifndef _VSERVER_BASE_H
-+#define _VSERVER_BASE_H
++#include <asm/compat.h>
 +
 +
++struct        vcmd_set_mapping_v0_x32 {
++      compat_uptr_t device_ptr;
++      compat_uptr_t target_ptr;
++      uint32_t flags;
++};
 +
 +
-+/* context state changes */
++#endif        /* CONFIG_COMPAT */
 +
 +
-+enum {
-+      VSC_STARTUP = 1,
-+      VSC_SHUTDOWN,
++#include <linux/compiler.h>
 +
 +
-+      VSC_NETUP,
-+      VSC_NETDOWN,
-+};
++extern int vc_set_mapping(struct vx_info *, void __user *);
++extern int vc_unset_mapping(struct vx_info *, void __user *);
 +
 +
++#ifdef        CONFIG_COMPAT
 +
 +
++extern int vc_set_mapping_x32(struct vx_info *, void __user *);
++extern int vc_unset_mapping_x32(struct vx_info *, void __user *);
 +
 +
-+#define vx_task_xid(t)        ((t)->xid)
++#endif        /* CONFIG_COMPAT */
 +
 +
-+#define vx_current_xid() vx_task_xid(current)
++#endif        /* _VSERVER_DEVICE_CMD_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/device_def.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/device_def.h
+--- linux-4.4.197/include/linux/vserver/device_def.h   1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/device_def.h 2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,17 @@
++#ifndef _VSERVER_DEVICE_DEF_H
++#define _VSERVER_DEVICE_DEF_H
 +
 +
-+#define current_vx_info() (current->vx_info)
++#include <linux/types.h>
 +
 +
++struct vx_dmap_target {
++      dev_t target;
++      uint32_t flags;
++};
 +
 +
-+#define nx_task_nid(t)        ((t)->nid)
++struct _vx_device {
++#ifdef CONFIG_VSERVER_DEVICE
++      struct vx_dmap_target targets[2];
++#endif
++};
 +
 +
-+#define nx_current_nid() nx_task_nid(current)
++#endif        /* _VSERVER_DEVICE_DEF_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/device.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/device.h
+--- linux-4.4.197/include/linux/vserver/device.h       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/device.h     2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,9 @@
++#ifndef _VSERVER_DEVICE_H
++#define _VSERVER_DEVICE_H
 +
 +
-+#define current_nx_info() (current->nx_info)
 +
 +
++#include <uapi/vserver/device.h>
 +
 +
-+/* generic flag merging */
++#else /* _VSERVER_DEVICE_H */
++#warning duplicate inclusion
++#endif        /* _VSERVER_DEVICE_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/dlimit_cmd.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/dlimit_cmd.h
+--- linux-4.4.197/include/linux/vserver/dlimit_cmd.h   1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/dlimit_cmd.h 2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,46 @@
++#ifndef _VSERVER_DLIMIT_CMD_H
++#define _VSERVER_DLIMIT_CMD_H
 +
 +
-+#define vs_check_flags(v, m, f)       (((v) & (m)) ^ (f))
++#include <uapi/vserver/dlimit_cmd.h>
 +
 +
-+#define vs_mask_flags(v, f, m)        (((v) & ~(m)) | ((f) & (m)))
 +
 +
-+#define vs_mask_mask(v, f, m) (((v) & ~(m)) | ((v) & (f) & (m)))
++#ifdef        CONFIG_COMPAT
 +
 +
-+#define vs_check_bit(v, n)    ((v) & (1LL << (n)))
++#include <asm/compat.h>
 +
 +
++struct        vcmd_ctx_dlimit_base_v0_x32 {
++      compat_uptr_t name_ptr;
++      uint32_t flags;
++};
 +
 +
-+/* context flags */
++struct        vcmd_ctx_dlimit_v0_x32 {
++      compat_uptr_t name_ptr;
++      uint32_t space_used;                    /* used space in kbytes */
++      uint32_t space_total;                   /* maximum space in kbytes */
++      uint32_t inodes_used;                   /* used inodes */
++      uint32_t inodes_total;                  /* maximum inodes */
++      uint32_t reserved;                      /* reserved for root in % */
++      uint32_t flags;
++};
 +
 +
-+#define __vx_flags(v) ((v) ? (v)->vx_flags : 0)
++#endif        /* CONFIG_COMPAT */
 +
 +
-+#define vx_current_flags()    __vx_flags(current_vx_info())
++#include <linux/compiler.h>
 +
 +
-+#define vx_info_flags(v, m, f) \
-+      vs_check_flags(__vx_flags(v), m, f)
++extern int vc_add_dlimit(uint32_t, void __user *);
++extern int vc_rem_dlimit(uint32_t, void __user *);
 +
 +
-+#define task_vx_flags(t, m, f) \
-+      ((t) && vx_info_flags((t)->vx_info, m, f))
++extern int vc_set_dlimit(uint32_t, void __user *);
++extern int vc_get_dlimit(uint32_t, void __user *);
 +
 +
-+#define vx_flags(m, f)        vx_info_flags(current_vx_info(), m, f)
++#ifdef        CONFIG_COMPAT
 +
 +
++extern int vc_add_dlimit_x32(uint32_t, void __user *);
++extern int vc_rem_dlimit_x32(uint32_t, void __user *);
 +
 +
-+/* context caps */
++extern int vc_set_dlimit_x32(uint32_t, void __user *);
++extern int vc_get_dlimit_x32(uint32_t, void __user *);
 +
 +
-+#define __vx_ccaps(v) ((v) ? (v)->vx_ccaps : 0)
++#endif        /* CONFIG_COMPAT */
 +
 +
-+#define vx_current_ccaps()    __vx_ccaps(current_vx_info())
++#endif        /* _VSERVER_DLIMIT_CMD_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/dlimit.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/dlimit.h
+--- linux-4.4.197/include/linux/vserver/dlimit.h       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/dlimit.h     2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,54 @@
++#ifndef _VSERVER_DLIMIT_H
++#define _VSERVER_DLIMIT_H
 +
 +
-+#define vx_info_ccaps(v, c)   (__vx_ccaps(v) & (c))
++#include "switch.h"
 +
 +
-+#define vx_ccaps(c)   vx_info_ccaps(current_vx_info(), (c))
 +
 +
++#ifdef        __KERNEL__
 +
 +
++/*      keep in sync with CDLIM_INFINITY      */
 +
 +
-+/* network flags */
++#define DLIM_INFINITY         (~0ULL)
 +
 +
-+#define __nx_flags(n) ((n) ? (n)->nx_flags : 0)
++#include <linux/spinlock.h>
++#include <linux/rcupdate.h>
 +
 +
-+#define nx_current_flags()    __nx_flags(current_nx_info())
++struct super_block;
 +
 +
-+#define nx_info_flags(n, m, f) \
-+      vs_check_flags(__nx_flags(n), m, f)
++struct dl_info {
++      struct hlist_node dl_hlist;             /* linked list of contexts */
++      struct rcu_head dl_rcu;                 /* the rcu head */
++      vtag_t dl_tag;                          /* context tag */
++      atomic_t dl_usecnt;                     /* usage count */
++      atomic_t dl_refcnt;                     /* reference count */
 +
 +
-+#define task_nx_flags(t, m, f) \
-+      ((t) && nx_info_flags((t)->nx_info, m, f))
++      struct super_block *dl_sb;              /* associated superblock */
 +
 +
-+#define nx_flags(m, f)        nx_info_flags(current_nx_info(), m, f)
++      spinlock_t dl_lock;                     /* protect the values */
 +
 +
++      unsigned long long dl_space_used;       /* used space in bytes */
++      unsigned long long dl_space_total;      /* maximum space in bytes */
++      unsigned long dl_inodes_used;           /* used inodes */
++      unsigned long dl_inodes_total;          /* maximum inodes */
 +
 +
-+/* network caps */
++      unsigned int dl_nrlmult;                /* non root limit mult */
++};
 +
 +
-+#define __nx_ncaps(n) ((n) ? (n)->nx_ncaps : 0)
++struct rcu_head;
 +
 +
-+#define nx_current_ncaps()    __nx_ncaps(current_nx_info())
++extern void rcu_free_dl_info(struct rcu_head *);
++extern void unhash_dl_info(struct dl_info *);
 +
 +
-+#define nx_info_ncaps(n, c)   (__nx_ncaps(n) & (c))
++extern struct dl_info *locate_dl_info(struct super_block *, vtag_t);
 +
 +
-+#define nx_ncaps(c)   nx_info_ncaps(current_nx_info(), c)
 +
 +
++struct kstatfs;
 +
 +
-+/* context mask capabilities */
++extern void vx_vsi_statfs(struct super_block *, struct kstatfs *);
 +
 +
-+#define __vx_mcaps(v) ((v) ? (v)->vx_ccaps >> 32UL : ~0 )
++typedef uint64_t dlsize_t;
 +
 +
-+#define vx_info_mcaps(v, c)   (__vx_mcaps(v) & (c))
++#endif        /* __KERNEL__ */
++#else /* _VSERVER_DLIMIT_H */
++#warning duplicate inclusion
++#endif        /* _VSERVER_DLIMIT_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/global.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/global.h
+--- linux-4.4.197/include/linux/vserver/global.h       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/global.h     2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,19 @@
++#ifndef _VSERVER_GLOBAL_H
++#define _VSERVER_GLOBAL_H
 +
 +
-+#define vx_mcaps(c)   vx_info_mcaps(current_vx_info(), c)
 +
 +
++extern atomic_t vx_global_ctotal;
++extern atomic_t vx_global_cactive;
 +
 +
-+/* context bcap mask */
++extern atomic_t nx_global_ctotal;
++extern atomic_t nx_global_cactive;
 +
 +
-+#define __vx_bcaps(v)         ((v)->vx_bcaps)
-+
-+#define vx_current_bcaps()    __vx_bcaps(current_vx_info())
++extern atomic_t vs_global_nsproxy;
++extern atomic_t vs_global_fs;
++extern atomic_t vs_global_mnt_ns;
++extern atomic_t vs_global_uts_ns;
++extern atomic_t vs_global_user_ns;
++extern atomic_t vs_global_pid_ns;
 +
 +
 +
 +
-+/* mask given bcaps */
++#endif /* _VSERVER_GLOBAL_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/history.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/history.h
+--- linux-4.4.197/include/linux/vserver/history.h      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/history.h    2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,197 @@
++#ifndef _VSERVER_HISTORY_H
++#define _VSERVER_HISTORY_H
 +
 +
-+#define vx_info_mbcaps(v, c)  ((v) ? cap_intersect(__vx_bcaps(v), c) : c)
 +
 +
-+#define vx_mbcaps(c)          vx_info_mbcaps(current_vx_info(), c)
++enum {
++      VXH_UNUSED = 0,
++      VXH_THROW_OOPS = 1,
 +
 +
++      VXH_GET_VX_INFO,
++      VXH_PUT_VX_INFO,
++      VXH_INIT_VX_INFO,
++      VXH_SET_VX_INFO,
++      VXH_CLR_VX_INFO,
++      VXH_CLAIM_VX_INFO,
++      VXH_RELEASE_VX_INFO,
++      VXH_ALLOC_VX_INFO,
++      VXH_DEALLOC_VX_INFO,
++      VXH_HASH_VX_INFO,
++      VXH_UNHASH_VX_INFO,
++      VXH_LOC_VX_INFO,
++      VXH_LOOKUP_VX_INFO,
++      VXH_CREATE_VX_INFO,
++};
 +
 +
-+/* masked cap_bset */
++struct _vxhe_vxi {
++      struct vx_info *ptr;
++      unsigned xid;
++      unsigned usecnt;
++      unsigned tasks;
++};
 +
 +
-+#define vx_info_cap_bset(v)   vx_info_mbcaps(v, current->cap_bset)
++struct _vxhe_set_clr {
++      void *data;
++};
 +
 +
-+#define vx_current_cap_bset() vx_info_cap_bset(current_vx_info())
++struct _vxhe_loc_lookup {
++      unsigned arg;
++};
 +
 +
-+#if 0
-+#define vx_info_mbcap(v, b) \
-+      (!vx_info_flags(v, VXF_STATE_SETUP, 0) ? \
-+      vx_info_bcaps(v, b) : (b))
++struct _vx_hist_entry {
++      void *loc;
++      unsigned short seq;
++      unsigned short type;
++      struct _vxhe_vxi vxi;
++      union {
++              struct _vxhe_set_clr sc;
++              struct _vxhe_loc_lookup ll;
++      };
++};
 +
 +
-+#define task_vx_mbcap(t, b) \
-+      vx_info_mbcap((t)->vx_info, (t)->b)
++#ifdef        CONFIG_VSERVER_HISTORY
 +
 +
-+#define vx_mbcap(b)   task_vx_mbcap(current, b)
-+#endif
++extern unsigned volatile int vxh_active;
 +
 +
-+#define vx_cap_raised(v, c, f)        cap_raised(vx_info_mbcaps(v, c), f)
++struct _vx_hist_entry *vxh_advance(void *loc);
 +
 +
-+#define vx_capable(b, c) (capable(b) || \
-+      (cap_raised(current_cap(), b) && vx_ccaps(c)))
 +
 +
-+#define vx_ns_capable(n, b, c) (ns_capable(n, b) || \
-+      (cap_raised(current_cap(), b) && vx_ccaps(c)))
++static inline
++void  __vxh_copy_vxi(struct _vx_hist_entry *entry, struct vx_info *vxi)
++{
++      entry->vxi.ptr = vxi;
++      if (vxi) {
++              entry->vxi.usecnt = atomic_read(&vxi->vx_usecnt);
++              entry->vxi.tasks = atomic_read(&vxi->vx_tasks);
++              entry->vxi.xid = vxi->vx_id;
++      }
++}
 +
 +
-+#define nx_capable(b, c) (capable(b) || \
-+      (cap_raised(current_cap(), b) && nx_ncaps(c)))
 +
 +
-+#define nx_ns_capable(n, b, c) (ns_capable(n, b) || \
-+      (cap_raised(current_cap(), b) && nx_ncaps(c)))
++#define       __HERE__ current_text_addr()
 +
 +
-+#define vx_task_initpid(t, n) \
-+      ((t)->vx_info && \
-+      ((t)->vx_info->vx_initpid == (n)))
++#define __VXH_BODY(__type, __data, __here)    \
++      struct _vx_hist_entry *entry;           \
++                                              \
++      preempt_disable();                      \
++      entry = vxh_advance(__here);            \
++      __data;                                 \
++      entry->type = __type;                   \
++      preempt_enable();
 +
 +
-+#define vx_current_initpid(n) vx_task_initpid(current, n)
 +
 +
++      /* pass vxi only */
 +
 +
-+/* context unshare mask */
++#define __VXH_SMPL                            \
++      __vxh_copy_vxi(entry, vxi)
 +
 +
-+#define __vx_umask(v)         ((v)->vx_umask)
++static inline
++void  __vxh_smpl(struct vx_info *vxi, int __type, void *__here)
++{
++      __VXH_BODY(__type, __VXH_SMPL, __here)
++}
 +
 +
-+#define vx_current_umask()    __vx_umask(current_vx_info())
++      /* pass vxi and data (void *) */
 +
 +
-+#define vx_can_unshare(b, f) (capable(b) || \
-+      (cap_raised(current_cap(), b) && \
-+      !((f) & ~vx_current_umask())))
++#define __VXH_DATA                            \
++      __vxh_copy_vxi(entry, vxi);             \
++      entry->sc.data = data
 +
 +
-+#define vx_ns_can_unshare(n, b, f) (ns_capable(n, b) || \
-+      (cap_raised(current_cap(), b) && \
-+      !((f) & ~vx_current_umask())))
++static inline
++void  __vxh_data(struct vx_info *vxi, void *data,
++                      int __type, void *__here)
++{
++      __VXH_BODY(__type, __VXH_DATA, __here)
++}
 +
 +
-+#define __vx_wmask(v)         ((v)->vx_wmask)
++      /* pass vxi and arg (long) */
 +
 +
-+#define vx_current_wmask()    __vx_wmask(current_vx_info())
++#define __VXH_LONG                            \
++      __vxh_copy_vxi(entry, vxi);             \
++      entry->ll.arg = arg
 +
 +
++static inline
++void  __vxh_long(struct vx_info *vxi, long arg,
++                      int __type, void *__here)
++{
++      __VXH_BODY(__type, __VXH_LONG, __here)
++}
 +
 +
-+#define __vx_state(v) ((v) ? ((v)->vx_state) : 0)
 +
 +
-+#define vx_info_state(v, m)   (__vx_state(v) & (m))
++static inline
++void  __vxh_throw_oops(void *__here)
++{
++      __VXH_BODY(VXH_THROW_OOPS, {}, __here);
++      /* prevent further acquisition */
++      vxh_active = 0;
++}
 +
 +
 +
 +
-+#define __nx_state(n) ((n) ? ((n)->nx_state) : 0)
++#define vxh_throw_oops()      __vxh_throw_oops(__HERE__);
 +
 +
-+#define nx_info_state(n, m)   (__nx_state(n) & (m))
++#define __vxh_get_vx_info(v, h)       __vxh_smpl(v, VXH_GET_VX_INFO, h);
++#define __vxh_put_vx_info(v, h)       __vxh_smpl(v, VXH_PUT_VX_INFO, h);
 +
 +
-+#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/cacct.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/cacct.h
---- linux-4.4.116/include/linux/vserver/cacct.h        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/cacct.h      2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,15 @@
-+#ifndef _VSERVER_CACCT_H
-+#define _VSERVER_CACCT_H
++#define __vxh_init_vx_info(v, d, h) \
++      __vxh_data(v, d, VXH_INIT_VX_INFO, h);
++#define __vxh_set_vx_info(v, d, h) \
++      __vxh_data(v, d, VXH_SET_VX_INFO, h);
++#define __vxh_clr_vx_info(v, d, h) \
++      __vxh_data(v, d, VXH_CLR_VX_INFO, h);
 +
 +
++#define __vxh_claim_vx_info(v, d, h) \
++      __vxh_data(v, d, VXH_CLAIM_VX_INFO, h);
++#define __vxh_release_vx_info(v, d, h) \
++      __vxh_data(v, d, VXH_RELEASE_VX_INFO, h);
 +
 +
-+enum sock_acc_field {
-+      VXA_SOCK_UNSPEC = 0,
-+      VXA_SOCK_UNIX,
-+      VXA_SOCK_INET,
-+      VXA_SOCK_INET6,
-+      VXA_SOCK_PACKET,
-+      VXA_SOCK_OTHER,
-+      VXA_SOCK_SIZE   /* array size */
-+};
++#define vxh_alloc_vx_info(v) \
++      __vxh_smpl(v, VXH_ALLOC_VX_INFO, __HERE__);
++#define vxh_dealloc_vx_info(v) \
++      __vxh_smpl(v, VXH_DEALLOC_VX_INFO, __HERE__);
 +
 +
-+#endif        /* _VSERVER_CACCT_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/cacct_cmd.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/cacct_cmd.h
---- linux-4.4.116/include/linux/vserver/cacct_cmd.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/cacct_cmd.h  2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,10 @@
-+#ifndef _VSERVER_CACCT_CMD_H
-+#define _VSERVER_CACCT_CMD_H
++#define vxh_hash_vx_info(v) \
++      __vxh_smpl(v, VXH_HASH_VX_INFO, __HERE__);
++#define vxh_unhash_vx_info(v) \
++      __vxh_smpl(v, VXH_UNHASH_VX_INFO, __HERE__);
 +
 +
++#define vxh_loc_vx_info(v, l) \
++      __vxh_long(v, l, VXH_LOC_VX_INFO, __HERE__);
++#define vxh_lookup_vx_info(v, l) \
++      __vxh_long(v, l, VXH_LOOKUP_VX_INFO, __HERE__);
++#define vxh_create_vx_info(v, l) \
++      __vxh_long(v, l, VXH_CREATE_VX_INFO, __HERE__);
 +
 +
-+#include <linux/compiler.h>
-+#include <uapi/vserver/cacct_cmd.h>
++extern void vxh_dump_history(void);
 +
 +
-+extern int vc_sock_stat(struct vx_info *, void __user *);
 +
 +
-+#endif        /* _VSERVER_CACCT_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/cacct_def.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/cacct_def.h
---- linux-4.4.116/include/linux/vserver/cacct_def.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/cacct_def.h  2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,43 @@
-+#ifndef _VSERVER_CACCT_DEF_H
-+#define _VSERVER_CACCT_DEF_H
++#else  /* CONFIG_VSERVER_HISTORY */
 +
 +
-+#include <asm/atomic.h>
-+#include <linux/vserver/cacct.h>
++#define       __HERE__        0
 +
 +
++#define vxh_throw_oops()              do { } while (0)
 +
 +
-+struct _vx_sock_acc {
-+      atomic_long_t count;
-+      atomic_long_t total;
-+};
++#define __vxh_get_vx_info(v, h)               do { } while (0)
++#define __vxh_put_vx_info(v, h)               do { } while (0)
 +
 +
-+/* context sub struct */
++#define __vxh_init_vx_info(v, d, h)   do { } while (0)
++#define __vxh_set_vx_info(v, d, h)    do { } while (0)
++#define __vxh_clr_vx_info(v, d, h)    do { } while (0)
 +
 +
-+struct _vx_cacct {
-+      struct _vx_sock_acc sock[VXA_SOCK_SIZE][3];
-+      atomic_t slab[8];
-+      atomic_t page[6][8];
-+};
++#define __vxh_claim_vx_info(v, d, h)  do { } while (0)
++#define __vxh_release_vx_info(v, d, h)        do { } while (0)
 +
 +
-+#ifdef CONFIG_VSERVER_DEBUG
++#define vxh_alloc_vx_info(v)          do { } while (0)
++#define vxh_dealloc_vx_info(v)                do { } while (0)
 +
 +
-+static inline void __dump_vx_cacct(struct _vx_cacct *cacct)
-+{
-+      int i, j;
++#define vxh_hash_vx_info(v)           do { } while (0)
++#define vxh_unhash_vx_info(v)         do { } while (0)
 +
 +
-+      printk("\t_vx_cacct:");
-+      for (i = 0; i < 6; i++) {
-+              struct _vx_sock_acc *ptr = cacct->sock[i];
++#define vxh_loc_vx_info(v, l)         do { } while (0)
++#define vxh_lookup_vx_info(v, l)      do { } while (0)
++#define vxh_create_vx_info(v, l)      do { } while (0)
 +
 +
-+              printk("\t [%d] =", i);
-+              for (j = 0; j < 3; j++) {
-+                      printk(" [%d] = %8lu, %8lu", j,
-+                              atomic_long_read(&ptr[j].count),
-+                              atomic_long_read(&ptr[j].total));
-+              }
-+              printk("\n");
-+      }
-+}
++#define vxh_dump_history()            do { } while (0)
 +
 +
-+#endif
 +
 +
-+#endif        /* _VSERVER_CACCT_DEF_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/cacct_int.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/cacct_int.h
---- linux-4.4.116/include/linux/vserver/cacct_int.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/cacct_int.h  2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,17 @@
-+#ifndef _VSERVER_CACCT_INT_H
-+#define _VSERVER_CACCT_INT_H
++#endif /* CONFIG_VSERVER_HISTORY */
 +
 +
-+static inline
-+unsigned long vx_sock_count(struct _vx_cacct *cacct, int type, int pos)
-+{
-+      return atomic_long_read(&cacct->sock[type][pos].count);
-+}
++#endif /* _VSERVER_HISTORY_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/inode_cmd.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/inode_cmd.h
+--- linux-4.4.197/include/linux/vserver/inode_cmd.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/inode_cmd.h  2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,36 @@
++#ifndef _VSERVER_INODE_CMD_H
++#define _VSERVER_INODE_CMD_H
 +
 +
++#include <uapi/vserver/inode_cmd.h>
 +
 +
-+static inline
-+unsigned long vx_sock_total(struct _vx_cacct *cacct, int type, int pos)
-+{
-+      return atomic_long_read(&cacct->sock[type][pos].total);
-+}
 +
 +
-+#endif        /* _VSERVER_CACCT_INT_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/check.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/check.h
---- linux-4.4.116/include/linux/vserver/check.h        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/check.h      2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,89 @@
-+#ifndef _VSERVER_CHECK_H
-+#define _VSERVER_CHECK_H
 +
 +
++#ifdef        CONFIG_COMPAT
 +
 +
-+#define MAX_S_CONTEXT 65535   /* Arbitrary limit */
++#include <asm/compat.h>
 +
 +
-+#ifdef        CONFIG_VSERVER_DYNAMIC_IDS
-+#define MIN_D_CONTEXT 49152   /* dynamic contexts start here */
-+#else
-+#define MIN_D_CONTEXT 65536
-+#endif
++struct        vcmd_ctx_iattr_v1_x32 {
++      compat_uptr_t name_ptr;
++      uint32_t tag;
++      uint32_t flags;
++      uint32_t mask;
++};
 +
 +
-+/* check conditions */
++#endif        /* CONFIG_COMPAT */
 +
 +
-+#define VS_ADMIN      0x0001
-+#define VS_WATCH      0x0002
-+#define VS_HIDE               0x0004
-+#define VS_HOSTID     0x0008
++#include <linux/compiler.h>
 +
 +
-+#define VS_IDENT      0x0010
-+#define VS_EQUIV      0x0020
-+#define VS_PARENT     0x0040
-+#define VS_CHILD      0x0080
++extern int vc_get_iattr(void __user *);
++extern int vc_set_iattr(void __user *);
 +
 +
-+#define VS_ARG_MASK   0x00F0
++extern int vc_fget_iattr(uint32_t, void __user *);
++extern int vc_fset_iattr(uint32_t, void __user *);
 +
 +
-+#define VS_DYNAMIC    0x0100
-+#define VS_STATIC     0x0200
++#ifdef        CONFIG_COMPAT
 +
 +
-+#define VS_ATR_MASK   0x0F00
++extern int vc_get_iattr_x32(void __user *);
++extern int vc_set_iattr_x32(void __user *);
 +
 +
-+#ifdef        CONFIG_VSERVER_PRIVACY
-+#define VS_ADMIN_P    (0)
-+#define VS_WATCH_P    (0)
++#endif        /* CONFIG_COMPAT */
++
++#endif        /* _VSERVER_INODE_CMD_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/inode.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/inode.h
+--- linux-4.4.197/include/linux/vserver/inode.h        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/inode.h      2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,19 @@
++#ifndef _VSERVER_INODE_H
++#define _VSERVER_INODE_H
++
++#include <uapi/vserver/inode.h>
++
++
++#ifdef        CONFIG_VSERVER_PROC_SECURE
++#define IATTR_PROC_DEFAULT    ( IATTR_ADMIN | IATTR_HIDE )
++#define IATTR_PROC_SYMLINK    ( IATTR_ADMIN )
 +#else
 +#else
-+#define VS_ADMIN_P    VS_ADMIN
-+#define VS_WATCH_P    VS_WATCH
++#define IATTR_PROC_DEFAULT    ( IATTR_ADMIN )
++#define IATTR_PROC_SYMLINK    ( IATTR_ADMIN )
 +#endif
 +
 +#endif
 +
-+#define VS_HARDIRQ    0x1000
-+#define VS_SOFTIRQ    0x2000
-+#define VS_IRQ                0x4000
++#define vx_hide_check(c, m)   (((m) & IATTR_HIDE) ? vx_check(c, m) : 1)
 +
 +
-+#define VS_IRQ_MASK   0xF000
++#else /* _VSERVER_INODE_H */
++#warning duplicate inclusion
++#endif        /* _VSERVER_INODE_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/limit_cmd.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/limit_cmd.h
+--- linux-4.4.197/include/linux/vserver/limit_cmd.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/limit_cmd.h  2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,35 @@
++#ifndef _VSERVER_LIMIT_CMD_H
++#define _VSERVER_LIMIT_CMD_H
 +
 +
-+#include <linux/hardirq.h>
++#include <uapi/vserver/limit_cmd.h>
 +
 +
-+/*
-+ * check current context for ADMIN/WATCH and
-+ * optionally against supplied argument
-+ */
-+static inline int __vs_check(int cid, int id, unsigned int mode)
-+{
-+      if (mode & VS_ARG_MASK) {
-+              if ((mode & VS_IDENT) && (id == cid))
-+                      return 1;
-+      }
-+      if (mode & VS_ATR_MASK) {
-+              if ((mode & VS_DYNAMIC) &&
-+                      (id >= MIN_D_CONTEXT) &&
-+                      (id <= MAX_S_CONTEXT))
-+                      return 1;
-+              if ((mode & VS_STATIC) &&
-+                      (id > 1) && (id < MIN_D_CONTEXT))
-+                      return 1;
-+      }
-+      if (mode & VS_IRQ_MASK) {
-+              if ((mode & VS_IRQ) && unlikely(in_interrupt()))
-+                      return 1;
-+              if ((mode & VS_HARDIRQ) && unlikely(in_irq()))
-+                      return 1;
-+              if ((mode & VS_SOFTIRQ) && unlikely(in_softirq()))
-+                      return 1;
-+      }
-+      return (((mode & VS_ADMIN) && (cid == 0)) ||
-+              ((mode & VS_WATCH) && (cid == 1)) ||
-+              ((mode & VS_HOSTID) && (id == 0)));
-+}
 +
 +
-+#define vx_check(c, m)        __vs_check(vx_current_xid(), c, (m) | VS_IRQ)
++#ifdef        CONFIG_IA32_EMULATION
 +
 +
-+#define vx_weak_check(c, m)   ((m) ? vx_check(c, m) : 1)
++struct        vcmd_ctx_rlimit_v0_x32 {
++      uint32_t id;
++      uint64_t minimum;
++      uint64_t softlimit;
++      uint64_t maximum;
++} __attribute__ ((packed));
 +
 +
++#endif        /* CONFIG_IA32_EMULATION */
 +
 +
-+#define nx_check(c, m)        __vs_check(nx_current_nid(), c, m)
++#include <linux/compiler.h>
 +
 +
-+#define nx_weak_check(c, m)   ((m) ? nx_check(c, m) : 1)
++extern int vc_get_rlimit_mask(uint32_t, void __user *);
++extern int vc_get_rlimit(struct vx_info *, void __user *);
++extern int vc_set_rlimit(struct vx_info *, void __user *);
++extern int vc_reset_hits(struct vx_info *, void __user *);
++extern int vc_reset_minmax(struct vx_info *, void __user *);
 +
 +
-+#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/context.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/context.h
---- linux-4.4.116/include/linux/vserver/context.h      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/context.h    2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,110 @@
-+#ifndef _VSERVER_CONTEXT_H
-+#define _VSERVER_CONTEXT_H
++extern int vc_rlimit_stat(struct vx_info *, void __user *);
 +
 +
++#ifdef        CONFIG_IA32_EMULATION
 +
 +
-+#include <linux/list.h>
-+#include <linux/spinlock.h>
-+#include <linux/rcupdate.h>
-+#include <uapi/vserver/context.h>
++extern int vc_get_rlimit_x32(struct vx_info *, void __user *);
++extern int vc_set_rlimit_x32(struct vx_info *, void __user *);
 +
 +
-+#include "limit_def.h"
-+#include "sched_def.h"
-+#include "cvirt_def.h"
-+#include "cacct_def.h"
-+#include "device_def.h"
++#endif        /* CONFIG_IA32_EMULATION */
 +
 +
-+#define VX_SPACES     2
++#endif        /* _VSERVER_LIMIT_CMD_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/limit_def.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/limit_def.h
+--- linux-4.4.197/include/linux/vserver/limit_def.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/limit_def.h  2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,47 @@
++#ifndef _VSERVER_LIMIT_DEF_H
++#define _VSERVER_LIMIT_DEF_H
 +
 +
-+struct _vx_info_pc {
-+      struct _vx_sched_pc sched_pc;
-+      struct _vx_cvirt_pc cvirt_pc;
-+};
++#include <asm/atomic.h>
++#include <asm/resource.h>
 +
 +
-+struct _vx_space {
-+      unsigned long vx_nsmask;                /* assignment mask */
-+      struct nsproxy *vx_nsproxy;             /* private namespaces */
-+      struct fs_struct *vx_fs;                /* private namespace fs */
-+      const struct cred *vx_cred;             /* task credentials */
-+};
++#include "limit.h"
 +
 +
-+struct vx_info {
-+      struct hlist_node vx_hlist;             /* linked list of contexts */
-+      vxid_t vx_id;                           /* context id */
-+      atomic_t vx_usecnt;                     /* usage count */
-+      atomic_t vx_tasks;                      /* tasks count */
-+      struct vx_info *vx_parent;              /* parent context */
-+      int vx_state;                           /* context state */
 +
 +
-+      struct _vx_space space[VX_SPACES];      /* namespace store */
++struct _vx_res_limit {
++      rlim_t soft;            /* Context soft limit */
++      rlim_t hard;            /* Context hard limit */
 +
 +
-+      uint64_t vx_flags;                      /* context flags */
-+      uint64_t vx_ccaps;                      /* context caps (vserver) */
-+      uint64_t vx_umask;                      /* unshare mask (guest) */
-+      uint64_t vx_wmask;                      /* warn mask (guest) */
-+      kernel_cap_t vx_bcaps;                  /* bounding caps (system) */
++      rlim_atomic_t rcur;     /* Current value */
++      rlim_t rmin;            /* Context minimum */
++      rlim_t rmax;            /* Context maximum */
 +
 +
-+      struct task_struct *vx_reaper;          /* guest reaper process */
-+      pid_t vx_initpid;                       /* PID of guest init */
-+      int64_t vx_badness_bias;                /* OOM points bias */
++      atomic_t lhit;          /* Limit hits */
++};
 +
 +
-+      struct _vx_limit limit;                 /* vserver limits */
-+      struct _vx_sched sched;                 /* vserver scheduler */
-+      struct _vx_cvirt cvirt;                 /* virtual/bias stuff */
-+      struct _vx_cacct cacct;                 /* context accounting */
++/* context sub struct */
 +
 +
-+      struct _vx_device dmap;                 /* default device map targets */
++struct _vx_limit {
++      struct _vx_res_limit res[NUM_LIMITS];
++};
 +
 +
-+#ifndef CONFIG_SMP
-+      struct _vx_info_pc info_pc;             /* per cpu data */
-+#else
-+      struct _vx_info_pc *ptr_pc;             /* per cpu array */
-+#endif
++#ifdef CONFIG_VSERVER_DEBUG
 +
 +
-+      wait_queue_head_t vx_wait;              /* context exit waitqueue */
-+      int reboot_cmd;                         /* last sys_reboot() cmd */
-+      int exit_code;                          /* last process exit code */
++static inline void __dump_vx_limit(struct _vx_limit *limit)
++{
++      int i;
 +
 +
-+      char vx_name[65];                       /* vserver name */
-+};
++      printk("\t_vx_limit:");
++      for (i = 0; i < NUM_LIMITS; i++) {
++              printk("\t [%2d] = %8lu %8lu/%8lu, %8ld/%8ld, %8d\n",
++                      i, (unsigned long)__rlim_get(limit, i),
++                      (unsigned long)__rlim_rmin(limit, i),
++                      (unsigned long)__rlim_rmax(limit, i),
++                      (long)__rlim_soft(limit, i),
++                      (long)__rlim_hard(limit, i),
++                      atomic_read(&__rlim_lhit(limit, i)));
++      }
++}
 +
 +
-+#ifndef CONFIG_SMP
-+#define       vx_ptr_pc(vxi)          (&(vxi)->info_pc)
-+#define       vx_per_cpu(vxi, v, id)  vx_ptr_pc(vxi)->v
-+#else
-+#define       vx_ptr_pc(vxi)          ((vxi)->ptr_pc)
-+#define       vx_per_cpu(vxi, v, id)  per_cpu_ptr(vx_ptr_pc(vxi), id)->v
 +#endif
 +
 +#endif
 +
-+#define       vx_cpu(vxi, v)          vx_per_cpu(vxi, v, smp_processor_id())
++#endif        /* _VSERVER_LIMIT_DEF_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/limit.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/limit.h
+--- linux-4.4.197/include/linux/vserver/limit.h        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/limit.h      2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,67 @@
++#ifndef _VSERVER_LIMIT_H
++#define _VSERVER_LIMIT_H
 +
 +
++#include <uapi/vserver/limit.h>
 +
 +
-+struct vx_info_save {
-+      struct vx_info *vxi;
-+      vxid_t xid;
-+};
 +
 +
++#define       VLIM_NOCHECK    ((1L << VLIMIT_DENTRY) | (1L << RLIMIT_RSS))
 +
 +
-+/* status flags */
++/*    keep in sync with CRLIM_INFINITY */
 +
 +
-+#define VXS_HASHED    0x0001
-+#define VXS_PAUSED    0x0010
-+#define VXS_SHUTDOWN  0x0100
-+#define VXS_HELPER    0x1000
-+#define VXS_RELEASED  0x8000
++#define       VLIM_INFINITY   (~0ULL)
 +
 +
++#include <asm/atomic.h>
++#include <asm/resource.h>
 +
 +
-+extern void claim_vx_info(struct vx_info *, struct task_struct *);
-+extern void release_vx_info(struct vx_info *, struct task_struct *);
++#ifndef RLIM_INFINITY
++#warning RLIM_INFINITY is undefined
++#endif
 +
 +
-+extern struct vx_info *lookup_vx_info(int);
-+extern struct vx_info *lookup_or_create_vx_info(int);
++#define __rlim_val(l, r, v)   ((l)->res[r].v)
 +
 +
-+extern int get_xid_list(int, unsigned int *, int);
-+extern int xid_is_hashed(vxid_t);
++#define __rlim_soft(l, r)     __rlim_val(l, r, soft)
++#define __rlim_hard(l, r)     __rlim_val(l, r, hard)
 +
 +
-+extern int vx_migrate_task(struct task_struct *, struct vx_info *, int);
++#define __rlim_rcur(l, r)     __rlim_val(l, r, rcur)
++#define __rlim_rmin(l, r)     __rlim_val(l, r, rmin)
++#define __rlim_rmax(l, r)     __rlim_val(l, r, rmax)
 +
 +
-+extern long vs_state_change(struct vx_info *, unsigned int);
++#define __rlim_lhit(l, r)     __rlim_val(l, r, lhit)
++#define __rlim_hit(l, r)      atomic_inc(&__rlim_lhit(l, r))
 +
 +
++typedef atomic_long_t rlim_atomic_t;
++typedef unsigned long rlim_t;
 +
 +
-+#endif        /* _VSERVER_CONTEXT_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/context_cmd.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/context_cmd.h
---- linux-4.4.116/include/linux/vserver/context_cmd.h  1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/context_cmd.h        2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,33 @@
-+#ifndef _VSERVER_CONTEXT_CMD_H
-+#define _VSERVER_CONTEXT_CMD_H
++#define __rlim_get(l, r)      atomic_long_read(&__rlim_rcur(l, r))
++#define __rlim_set(l, r, v)   atomic_long_set(&__rlim_rcur(l, r), v)
++#define __rlim_inc(l, r)      atomic_long_inc(&__rlim_rcur(l, r))
++#define __rlim_dec(l, r)      atomic_long_dec(&__rlim_rcur(l, r))
++#define __rlim_add(l, r, v)   atomic_long_add(v, &__rlim_rcur(l, r))
++#define __rlim_sub(l, r, v)   atomic_long_sub(v, &__rlim_rcur(l, r))
 +
 +
-+#include <uapi/vserver/context_cmd.h>
 +
 +
-+extern int vc_task_xid(uint32_t);
++#if   (RLIM_INFINITY == VLIM_INFINITY)
++#define       VX_VLIM(r) ((long long)(long)(r))
++#define       VX_RLIM(v) ((rlim_t)(v))
++#else
++#define       VX_VLIM(r) (((r) == RLIM_INFINITY) \
++              ? VLIM_INFINITY : (long long)(r))
++#define       VX_RLIM(v) (((v) == VLIM_INFINITY) \
++              ? RLIM_INFINITY : (rlim_t)(v))
++#endif
 +
 +
-+extern int vc_vx_info(struct vx_info *, void __user *);
++struct sysinfo;
 +
 +
-+extern int vc_ctx_stat(struct vx_info *, void __user *);
++#ifdef        CONFIG_MEMCG
++void vx_vsi_meminfo(struct sysinfo *);
++void vx_vsi_swapinfo(struct sysinfo *);
++long vx_vsi_cached(struct sysinfo *);
++#else /* !CONFIG_MEMCG */
++#define vx_vsi_meminfo(s) do { } while (0)
++#define vx_vsi_swapinfo(s) do { } while (0)
++#define vx_vsi_cached(s) (0L)
++#endif        /* !CONFIG_MEMCG */
 +
 +
-+extern int vc_ctx_create(uint32_t, void __user *);
-+extern int vc_ctx_migrate(struct vx_info *, void __user *);
++#define NUM_LIMITS    24
 +
 +
-+extern int vc_get_cflags(struct vx_info *, void __user *);
-+extern int vc_set_cflags(struct vx_info *, void __user *);
++#endif        /* _VSERVER_LIMIT_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/limit_int.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/limit_int.h
+--- linux-4.4.197/include/linux/vserver/limit_int.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/limit_int.h  2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,193 @@
++#ifndef _VSERVER_LIMIT_INT_H
++#define _VSERVER_LIMIT_INT_H
 +
 +
-+extern int vc_get_ccaps(struct vx_info *, void __user *);
-+extern int vc_set_ccaps(struct vx_info *, void __user *);
++#define VXD_RCRES_COND(r)     VXD_CBIT(cres, r)
++#define VXD_RLIMIT_COND(r)    VXD_CBIT(limit, r)
 +
 +
-+extern int vc_get_bcaps(struct vx_info *, void __user *);
-+extern int vc_set_bcaps(struct vx_info *, void __user *);
++extern const char *vlimit_name[NUM_LIMITS];
 +
 +
-+extern int vc_get_umask(struct vx_info *, void __user *);
-+extern int vc_set_umask(struct vx_info *, void __user *);
++static inline void __vx_acc_cres(struct vx_info *vxi,
++      int res, int dir, void *_data, char *_file, int _line)
++{
++      if (VXD_RCRES_COND(res))
++              vxlprintk(1, "vx_acc_cres[%5d,%s,%2d]: %5ld%s (%p)",
++                      (vxi ? vxi->vx_id : -1), vlimit_name[res], res,
++                      (vxi ? (long)__rlim_get(&vxi->limit, res) : 0),
++                      (dir > 0) ? "++" : "--", _data, _file, _line);
++      if (!vxi)
++              return;
 +
 +
-+extern int vc_get_wmask(struct vx_info *, void __user *);
-+extern int vc_set_wmask(struct vx_info *, void __user *);
++      if (dir > 0)
++              __rlim_inc(&vxi->limit, res);
++      else
++              __rlim_dec(&vxi->limit, res);
++}
 +
 +
-+extern int vc_get_badness(struct vx_info *, void __user *);
-+extern int vc_set_badness(struct vx_info *, void __user *);
++static inline void __vx_add_cres(struct vx_info *vxi,
++      int res, int amount, void *_data, char *_file, int _line)
++{
++      if (VXD_RCRES_COND(res))
++              vxlprintk(1, "vx_add_cres[%5d,%s,%2d]: %5ld += %5d (%p)",
++                      (vxi ? vxi->vx_id : -1), vlimit_name[res], res,
++                      (vxi ? (long)__rlim_get(&vxi->limit, res) : 0),
++                      amount, _data, _file, _line);
++      if (amount == 0)
++              return;
++      if (!vxi)
++              return;
++      __rlim_add(&vxi->limit, res, amount);
++}
 +
 +
-+#endif        /* _VSERVER_CONTEXT_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/cvirt.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/cvirt.h
---- linux-4.4.116/include/linux/vserver/cvirt.h        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/cvirt.h      2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,18 @@
-+#ifndef _VSERVER_CVIRT_H
-+#define _VSERVER_CVIRT_H
++static inline
++int __vx_cres_adjust_max(struct _vx_limit *limit, int res, rlim_t value)
++{
++      int cond = (value > __rlim_rmax(limit, res));
 +
 +
-+struct timespec;
++      if (cond)
++              __rlim_rmax(limit, res) = value;
++      return cond;
++}
 +
 +
-+void vx_vsi_boottime(struct timespec *);
++static inline
++int __vx_cres_adjust_min(struct _vx_limit *limit, int res, rlim_t value)
++{
++      int cond = (value < __rlim_rmin(limit, res));
 +
 +
-+void vx_vsi_uptime(struct timespec *, struct timespec *);
++      if (cond)
++              __rlim_rmin(limit, res) = value;
++      return cond;
++}
 +
 +
++static inline
++void __vx_cres_fixup(struct _vx_limit *limit, int res, rlim_t value)
++{
++      if (!__vx_cres_adjust_max(limit, res, value))
++              __vx_cres_adjust_min(limit, res, value);
++}
 +
 +
-+struct vx_info;
 +
 +
-+void vx_update_load(struct vx_info *);
++/*    return values:
++       +1 ... no limit hit
++       -1 ... over soft limit
++        0 ... over hard limit         */
 +
 +
++static inline int __vx_cres_avail(struct vx_info *vxi,
++      int res, int num, char *_file, int _line)
++{
++      struct _vx_limit *limit;
++      rlim_t value;
 +
 +
-+int vx_do_syslog(int, char __user *, int);
++      if (VXD_RLIMIT_COND(res))
++              vxlprintk(1, "vx_cres_avail[%5d,%s,%2d]: %5ld/%5ld > %5ld + %5d",
++                      (vxi ? vxi->vx_id : -1), vlimit_name[res], res,
++                      (vxi ? (long)__rlim_soft(&vxi->limit, res) : -1),
++                      (vxi ? (long)__rlim_hard(&vxi->limit, res) : -1),
++                      (vxi ? (long)__rlim_get(&vxi->limit, res) : 0),
++                      num, _file, _line);
++      if (!vxi)
++              return 1;
 +
 +
-+#endif        /* _VSERVER_CVIRT_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/cvirt_cmd.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/cvirt_cmd.h
---- linux-4.4.116/include/linux/vserver/cvirt_cmd.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/cvirt_cmd.h  2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,13 @@
-+#ifndef _VSERVER_CVIRT_CMD_H
-+#define _VSERVER_CVIRT_CMD_H
++      limit = &vxi->limit;
++      value = __rlim_get(limit, res);
 +
 +
++      if (!__vx_cres_adjust_max(limit, res, value))
++              __vx_cres_adjust_min(limit, res, value);
 +
 +
-+#include <linux/compiler.h>
-+#include <uapi/vserver/cvirt_cmd.h>
++      if (num == 0)
++              return 1;
 +
 +
-+extern int vc_set_vhi_name(struct vx_info *, void __user *);
-+extern int vc_get_vhi_name(struct vx_info *, void __user *);
++      if (__rlim_soft(limit, res) == RLIM_INFINITY)
++              return -1;
++      if (value + num <= __rlim_soft(limit, res))
++              return -1;
 +
 +
-+extern int vc_virt_stat(struct vx_info *, void __user *);
++      if (__rlim_hard(limit, res) == RLIM_INFINITY)
++              return 1;
++      if (value + num <= __rlim_hard(limit, res))
++              return 1;
 +
 +
-+#endif        /* _VSERVER_CVIRT_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/cvirt_def.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/cvirt_def.h
---- linux-4.4.116/include/linux/vserver/cvirt_def.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/cvirt_def.h  2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,80 @@
-+#ifndef _VSERVER_CVIRT_DEF_H
-+#define _VSERVER_CVIRT_DEF_H
++      __rlim_hit(limit, res);
++      return 0;
++}
 +
 +
-+#include <linux/jiffies.h>
-+#include <linux/spinlock.h>
-+#include <linux/wait.h>
-+#include <linux/time.h>
-+#include <asm/atomic.h>
 +
 +
++static const int VLA_RSS[] = { RLIMIT_RSS, VLIMIT_ANON, VLIMIT_MAPPED, 0 };
 +
 +
-+struct _vx_usage_stat {
-+      uint64_t user;
-+      uint64_t nice;
-+      uint64_t system;
-+      uint64_t softirq;
-+      uint64_t irq;
-+      uint64_t idle;
-+      uint64_t iowait;
-+};
++static inline
++rlim_t __vx_cres_array_sum(struct _vx_limit *limit, const int *array)
++{
++      rlim_t value, sum = 0;
++      int res;
 +
 +
-+struct _vx_syslog {
-+      wait_queue_head_t log_wait;
-+      spinlock_t logbuf_lock;         /* lock for the log buffer */
++      while ((res = *array++)) {
++              value = __rlim_get(limit, res);
++              __vx_cres_fixup(limit, res, value);
++              sum += value;
++      }
++      return sum;
++}
 +
 +
-+      unsigned long log_start;        /* next char to be read by syslog() */
-+      unsigned long con_start;        /* next char to be sent to consoles */
-+      unsigned long log_end;  /* most-recently-written-char + 1 */
-+      unsigned long logged_chars;     /* #chars since last read+clear operation */
++static inline
++rlim_t __vx_cres_array_fixup(struct _vx_limit *limit, const int *array)
++{
++      rlim_t value = __vx_cres_array_sum(limit, array + 1);
++      int res = *array;
 +
 +
-+      char log_buf[1024];
-+};
++      if (value == __rlim_get(limit, res))
++              return value;
 +
 +
++      __rlim_set(limit, res, value);
++      /* now adjust min/max */
++      if (!__vx_cres_adjust_max(limit, res, value))
++              __vx_cres_adjust_min(limit, res, value);
 +
 +
-+/* context sub struct */
++      return value;
++}
 +
 +
-+struct _vx_cvirt {
-+      atomic_t nr_threads;            /* number of current threads */
-+      atomic_t nr_running;            /* number of running threads */
-+      atomic_t nr_uninterruptible;    /* number of uninterruptible threads */
++static inline int __vx_cres_array_avail(struct vx_info *vxi,
++      const int *array, int num, char *_file, int _line)
++{
++      struct _vx_limit *limit;
++      rlim_t value = 0;
++      int res;
 +
 +
-+      atomic_t nr_onhold;             /* processes on hold */
-+      uint32_t onhold_last;           /* jiffies when put on hold */
++      if (num == 0)
++              return 1;
++      if (!vxi)
++              return 1;
 +
 +
-+      struct timespec bias_ts;        /* time offset to the host */
-+      struct timespec bias_idle;
-+      struct timespec bias_uptime;    /* context creation point */
-+      uint64_t bias_clock;            /* offset in clock_t */
++      limit = &vxi->limit;
++      res = *array;
++      value = __vx_cres_array_sum(limit, array + 1);
 +
 +
-+      spinlock_t load_lock;           /* lock for the load averages */
-+      atomic_t load_updates;          /* nr of load updates done so far */
-+      uint32_t load_last;             /* last time load was calculated */
-+      uint32_t load[3];               /* load averages 1,5,15 */
++      __rlim_set(limit, res, value);
++      __vx_cres_fixup(limit, res, value);
 +
 +
-+      atomic_t total_forks;           /* number of forks so far */
++      return __vx_cres_avail(vxi, res, num, _file, _line);
++}
 +
 +
-+      struct _vx_syslog syslog;
-+};
 +
 +
-+struct _vx_cvirt_pc {
-+      struct _vx_usage_stat cpustat;
-+};
++static inline void vx_limit_fixup(struct _vx_limit *limit, int id)
++{
++      rlim_t value;
++      int res;
 +
 +
++      /* complex resources first */
++      if ((id < 0) || (id == RLIMIT_RSS))
++              __vx_cres_array_fixup(limit, VLA_RSS);
 +
 +
-+#ifdef CONFIG_VSERVER_DEBUG
++      for (res = 0; res < NUM_LIMITS; res++) {
++              if ((id > 0) && (res != id))
++                      continue;
 +
 +
-+static inline void __dump_vx_cvirt(struct _vx_cvirt *cvirt)
-+{
-+      printk("\t_vx_cvirt:\n");
-+      printk("\t threads: %4d, %4d, %4d, %4d\n",
-+              atomic_read(&cvirt->nr_threads),
-+              atomic_read(&cvirt->nr_running),
-+              atomic_read(&cvirt->nr_uninterruptible),
-+              atomic_read(&cvirt->nr_onhold));
-+      /* add rest here */
-+      printk("\t total_forks = %d\n", atomic_read(&cvirt->total_forks));
++              value = __rlim_get(limit, res);
++              __vx_cres_fixup(limit, res, value);
++
++              /* not supposed to happen, maybe warn? */
++              if (__rlim_rmax(limit, res) > __rlim_hard(limit, res))
++                      __rlim_rmax(limit, res) = __rlim_hard(limit, res);
++      }
 +}
 +
 +}
 +
-+#endif
 +
 +
-+#endif        /* _VSERVER_CVIRT_DEF_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/debug.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/debug.h
---- linux-4.4.116/include/linux/vserver/debug.h        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/debug.h      2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,146 @@
-+#ifndef _VSERVER_DEBUG_H
-+#define _VSERVER_DEBUG_H
++#endif        /* _VSERVER_LIMIT_INT_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/monitor.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/monitor.h
+--- linux-4.4.197/include/linux/vserver/monitor.h      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/monitor.h    2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,6 @@
++#ifndef _VSERVER_MONITOR_H
++#define _VSERVER_MONITOR_H
 +
 +
++#include <uapi/vserver/monitor.h>
 +
 +
-+#define VXD_CBIT(n, m)        (vs_debug_ ## n & (1 << (m)))
-+#define VXD_CMIN(n, m)        (vs_debug_ ## n > (m))
-+#define VXD_MASK(n, m)        (vs_debug_ ## n & (m))
++#endif /* _VSERVER_MONITOR_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/network_cmd.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/network_cmd.h
+--- linux-4.4.197/include/linux/vserver/network_cmd.h  1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/network_cmd.h        2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,37 @@
++#ifndef _VSERVER_NETWORK_CMD_H
++#define _VSERVER_NETWORK_CMD_H
 +
 +
-+#define VXD_DEV(d)    (d), (d)->bd_inode->i_ino,              \
-+                      imajor((d)->bd_inode), iminor((d)->bd_inode)
-+#define VXF_DEV               "%p[%lu,%d:%d]"
++#include <uapi/vserver/network_cmd.h>
 +
 +
-+#if   defined(CONFIG_QUOTES_UTF8)
-+#define       VS_Q_LQM        "\xc2\xbb"
-+#define       VS_Q_RQM        "\xc2\xab"
-+#elif defined(CONFIG_QUOTES_ASCII)
-+#define       VS_Q_LQM        "\x27"
-+#define       VS_Q_RQM        "\x27"
-+#else
-+#define       VS_Q_LQM        "\xbb"
-+#define       VS_Q_RQM        "\xab"
-+#endif
++extern int vc_task_nid(uint32_t);
 +
 +
-+#define       VS_Q(f)         VS_Q_LQM f VS_Q_RQM
++extern int vc_nx_info(struct nx_info *, void __user *);
 +
 +
++extern int vc_net_create(uint32_t, void __user *);
++extern int vc_net_migrate(struct nx_info *, void __user *);
 +
 +
-+#define vxd_path(p)                                           \
-+      ({ static char _buffer[PATH_MAX];                       \
-+         d_path(p, _buffer, sizeof(_buffer)); })
++extern int vc_net_add(struct nx_info *, void __user *);
++extern int vc_net_remove(struct nx_info *, void __user *);
 +
 +
-+#define vxd_cond_path(n)                                      \
-+      ((n) ? vxd_path(&(n)->path) : "<null>" )
++extern int vc_net_add_ipv4_v1(struct nx_info *, void __user *);
++extern int vc_net_add_ipv4(struct nx_info *, void __user *);
 +
 +
++extern int vc_net_rem_ipv4_v1(struct nx_info *, void __user *);
++extern int vc_net_rem_ipv4(struct nx_info *, void __user *);
 +
 +
-+#ifdef        CONFIG_VSERVER_DEBUG
++extern int vc_net_add_ipv6(struct nx_info *, void __user *);
++extern int vc_net_remove_ipv6(struct nx_info *, void __user *);
 +
 +
-+extern unsigned int vs_debug_switch;
-+extern unsigned int vs_debug_xid;
-+extern unsigned int vs_debug_nid;
-+extern unsigned int vs_debug_tag;
-+extern unsigned int vs_debug_net;
-+extern unsigned int vs_debug_limit;
-+extern unsigned int vs_debug_cres;
-+extern unsigned int vs_debug_dlim;
-+extern unsigned int vs_debug_quota;
-+extern unsigned int vs_debug_cvirt;
-+extern unsigned int vs_debug_space;
-+extern unsigned int vs_debug_perm;
-+extern unsigned int vs_debug_misc;
++extern int vc_add_match_ipv4(struct nx_info *, void __user *);
++extern int vc_get_match_ipv4(struct nx_info *, void __user *);
 +
 +
++extern int vc_add_match_ipv6(struct nx_info *, void __user *);
++extern int vc_get_match_ipv6(struct nx_info *, void __user *);
 +
 +
-+#define VX_LOGLEVEL   "vxD: "
-+#define VX_PROC_FMT   "%p: "
-+#define VX_PROCESS    current
++extern int vc_get_nflags(struct nx_info *, void __user *);
++extern int vc_set_nflags(struct nx_info *, void __user *);
 +
 +
-+#define vxdprintk(c, f, x...)                                 \
-+      do {                                                    \
-+              if (c)                                          \
-+                      printk(VX_LOGLEVEL VX_PROC_FMT f "\n",  \
-+                              VX_PROCESS , ##x);              \
-+      } while (0)
++extern int vc_get_ncaps(struct nx_info *, void __user *);
++extern int vc_set_ncaps(struct nx_info *, void __user *);
 +
 +
-+#define vxlprintk(c, f, x...)                                 \
-+      do {                                                    \
-+              if (c)                                          \
-+                      printk(VX_LOGLEVEL f " @%s:%d\n", x);   \
-+      } while (0)
++#endif        /* _VSERVER_CONTEXT_CMD_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/network.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/network.h
+--- linux-4.4.197/include/linux/vserver/network.h      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/network.h    2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,76 @@
++#ifndef _VSERVER_NETWORK_H
++#define _VSERVER_NETWORK_H
 +
 +
-+#define vxfprintk(c, f, x...)                                 \
-+      do {                                                    \
-+              if (c)                                          \
-+                      printk(VX_LOGLEVEL f " %s@%s:%d\n", x); \
-+      } while (0)
 +
 +
++#include <linux/list.h>
++#include <linux/spinlock.h>
++#include <linux/rcupdate.h>
++#include <linux/in.h>
++#include <linux/in6.h>
++#include <asm/atomic.h>
++#include <uapi/vserver/network.h>
 +
 +
-+struct vx_info;
++struct nx_addr_v4 {
++      struct nx_addr_v4 *next;
++      struct in_addr ip[2];
++      struct in_addr mask;
++      uint16_t type;
++      uint16_t flags;
++};
 +
 +
-+void dump_vx_info(struct vx_info *, int);
-+void dump_vx_info_inactive(int);
++struct nx_addr_v6 {
++      struct nx_addr_v6 *next;
++      struct in6_addr ip;
++      struct in6_addr mask;
++      uint32_t prefix;
++      uint16_t type;
++      uint16_t flags;
++};
 +
 +
-+#else /* CONFIG_VSERVER_DEBUG */
++struct nx_info {
++      struct hlist_node nx_hlist;     /* linked list of nxinfos */
++      vnid_t nx_id;                   /* vnet id */
++      atomic_t nx_usecnt;             /* usage count */
++      atomic_t nx_tasks;              /* tasks count */
++      int nx_state;                   /* context state */
 +
 +
-+#define vs_debug_switch       0
-+#define vs_debug_xid  0
-+#define vs_debug_nid  0
-+#define vs_debug_tag  0
-+#define vs_debug_net  0
-+#define vs_debug_limit        0
-+#define vs_debug_cres 0
-+#define vs_debug_dlim 0
-+#define vs_debug_quota        0
-+#define vs_debug_cvirt        0
-+#define vs_debug_space        0
-+#define vs_debug_perm 0
-+#define vs_debug_misc 0
++      uint64_t nx_flags;              /* network flag word */
++      uint64_t nx_ncaps;              /* network capabilities */
 +
 +
-+#define vxdprintk(x...) do { } while (0)
-+#define vxlprintk(x...) do { } while (0)
-+#define vxfprintk(x...) do { } while (0)
++      spinlock_t addr_lock;           /* protect address changes */
++      struct in_addr v4_lback;        /* Loopback address */
++      struct in_addr v4_bcast;        /* Broadcast address */
++      struct nx_addr_v4 v4;           /* First/Single ipv4 address */
++#ifdef        CONFIG_IPV6
++      struct nx_addr_v6 v6;           /* First/Single ipv6 address */
++#endif
++      char nx_name[65];               /* network context name */
++};
 +
 +
-+#endif        /* CONFIG_VSERVER_DEBUG */
 +
 +
++/* status flags */
 +
 +
-+#ifdef        CONFIG_VSERVER_WARN
++#define NXS_HASHED      0x0001
++#define NXS_SHUTDOWN    0x0100
++#define NXS_RELEASED    0x8000
 +
 +
-+#define VX_WARNLEVEL  KERN_WARNING "vxW: "
-+#define VX_WARN_TASK  "[" VS_Q("%s") ",%u:#%u|%u|%u] "
-+#define VX_WARN_XID   "[xid #%u] "
-+#define VX_WARN_NID   "[nid #%u] "
-+#define VX_WARN_TAG   "[tag #%u] "
++extern struct nx_info *lookup_nx_info(int);
 +
 +
-+#define vxwprintk(c, f, x...)                                 \
-+      do {                                                    \
-+              if (c)                                          \
-+                      printk(VX_WARNLEVEL f "\n", ##x);       \
-+      } while (0)
++extern int get_nid_list(int, unsigned int *, int);
++extern int nid_is_hashed(vnid_t);
 +
 +
-+#else /* CONFIG_VSERVER_WARN */
++extern int nx_migrate_task(struct task_struct *, struct nx_info *);
 +
 +
-+#define vxwprintk(x...) do { } while (0)
++extern long vs_net_change(struct nx_info *, unsigned int);
 +
 +
-+#endif        /* CONFIG_VSERVER_WARN */
++struct sock;
 +
 +
-+#define vxwprintk_task(c, f, x...)                            \
-+      vxwprintk(c, VX_WARN_TASK f,                            \
-+              current->comm, current->pid,                    \
-+              current->xid, current->nid,                     \
-+              current->tag, ##x)
-+#define vxwprintk_xid(c, f, x...)                             \
-+      vxwprintk(c, VX_WARN_XID f, current->xid, x)
-+#define vxwprintk_nid(c, f, x...)                             \
-+      vxwprintk(c, VX_WARN_NID f, current->nid, x)
-+#define vxwprintk_tag(c, f, x...)                             \
-+      vxwprintk(c, VX_WARN_TAG f, current->tag, x)
 +
 +
-+#ifdef        CONFIG_VSERVER_DEBUG
-+#define vxd_assert_lock(l)    assert_spin_locked(l)
-+#define vxd_assert(c, f, x...)        vxlprintk(!(c), \
-+      "assertion [" f "] failed.", ##x, __FILE__, __LINE__)
++#define NX_IPV4(n)    ((n)->v4.type != NXA_TYPE_NONE)
++#ifdef  CONFIG_IPV6
++#define NX_IPV6(n)    ((n)->v6.type != NXA_TYPE_NONE)
 +#else
 +#else
-+#define vxd_assert_lock(l)    do { } while (0)
-+#define vxd_assert(c, f, x...)        do { } while (0)
++#define NX_IPV6(n)    (0)
 +#endif
 +
 +#endif
 +
++#endif        /* _VSERVER_NETWORK_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/percpu.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/percpu.h
+--- linux-4.4.197/include/linux/vserver/percpu.h       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/percpu.h     2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,14 @@
++#ifndef _VSERVER_PERCPU_H
++#define _VSERVER_PERCPU_H
 +
 +
-+#endif /* _VSERVER_DEBUG_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/debug_cmd.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/debug_cmd.h
---- linux-4.4.116/include/linux/vserver/debug_cmd.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/debug_cmd.h  2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,37 @@
-+#ifndef _VSERVER_DEBUG_CMD_H
-+#define _VSERVER_DEBUG_CMD_H
-+
-+#include <uapi/vserver/debug_cmd.h>
++#include "cvirt_def.h"
++#include "sched_def.h"
 +
 +
++struct        _vx_percpu {
++      struct _vx_cvirt_pc cvirt;
++      struct _vx_sched_pc sched;
++};
 +
 +
-+#ifdef        CONFIG_COMPAT
++#define       PERCPU_PERCTX   (sizeof(struct _vx_percpu))
 +
 +
-+#include <asm/compat.h>
++#endif        /* _VSERVER_PERCPU_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/pid.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/pid.h
+--- linux-4.4.197/include/linux/vserver/pid.h  1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/pid.h        2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,51 @@
++#ifndef _VSERVER_PID_H
++#define _VSERVER_PID_H
 +
 +
-+struct        vcmd_read_history_v0_x32 {
-+      uint32_t index;
-+      uint32_t count;
-+      compat_uptr_t data_ptr;
-+};
++/* pid faking stuff */
 +
 +
-+struct        vcmd_read_monitor_v0_x32 {
-+      uint32_t index;
-+      uint32_t count;
-+      compat_uptr_t data_ptr;
-+};
++#define vx_info_map_pid(v, p) \
++      __vx_info_map_pid((v), (p), __func__, __FILE__, __LINE__)
++#define vx_info_map_tgid(v,p)  vx_info_map_pid(v,p)
++#define vx_map_pid(p) vx_info_map_pid(current_vx_info(), p)
++#define vx_map_tgid(p) vx_map_pid(p)
 +
 +
-+#endif  /* CONFIG_COMPAT */
++static inline int __vx_info_map_pid(struct vx_info *vxi, int pid,
++      const char *func, const char *file, int line)
++{
++      if (vx_info_flags(vxi, VXF_INFO_INIT, 0)) {
++              vxfprintk(VXD_CBIT(cvirt, 2),
++                      "vx_map_tgid: %p/%llx: %d -> %d",
++                      vxi, (long long)vxi->vx_flags, pid,
++                      (pid && pid == vxi->vx_initpid) ? 1 : pid,
++                      func, file, line);
++              if (pid == 0)
++                      return 0;
++              if (pid == vxi->vx_initpid)
++                      return 1;
++      }
++      return pid;
++}
 +
 +
-+extern int vc_dump_history(uint32_t);
++#define vx_info_rmap_pid(v, p) \
++      __vx_info_rmap_pid((v), (p), __func__, __FILE__, __LINE__)
++#define vx_rmap_pid(p) vx_info_rmap_pid(current_vx_info(), p)
++#define vx_rmap_tgid(p) vx_rmap_pid(p)
 +
 +
-+extern int vc_read_history(uint32_t, void __user *);
-+extern int vc_read_monitor(uint32_t, void __user *);
++static inline int __vx_info_rmap_pid(struct vx_info *vxi, int pid,
++      const char *func, const char *file, int line)
++{
++      if (vx_info_flags(vxi, VXF_INFO_INIT, 0)) {
++              vxfprintk(VXD_CBIT(cvirt, 2),
++                      "vx_rmap_tgid: %p/%llx: %d -> %d",
++                      vxi, (long long)vxi->vx_flags, pid,
++                      (pid == 1) ? vxi->vx_initpid : pid,
++                      func, file, line);
++              if ((pid == 1) && vxi->vx_initpid)
++                      return vxi->vx_initpid;
++              if (pid == vxi->vx_initpid)
++                      return ~0U;
++      }
++      return pid;
++}
 +
 +
-+#ifdef        CONFIG_COMPAT
++#endif
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/sched_cmd.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/sched_cmd.h
+--- linux-4.4.197/include/linux/vserver/sched_cmd.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/sched_cmd.h  2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,11 @@
++#ifndef _VSERVER_SCHED_CMD_H
++#define _VSERVER_SCHED_CMD_H
 +
 +
-+extern int vc_read_history_x32(uint32_t, void __user *);
-+extern int vc_read_monitor_x32(uint32_t, void __user *);
 +
 +
-+#endif  /* CONFIG_COMPAT */
++#include <linux/compiler.h>
++#include <uapi/vserver/sched_cmd.h>
 +
 +
-+#endif        /* _VSERVER_DEBUG_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/device.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/device.h
---- linux-4.4.116/include/linux/vserver/device.h       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/device.h     2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,9 @@
-+#ifndef _VSERVER_DEVICE_H
-+#define _VSERVER_DEVICE_H
++extern int vc_set_prio_bias(struct vx_info *, void __user *);
++extern int vc_get_prio_bias(struct vx_info *, void __user *);
 +
 +
++#endif        /* _VSERVER_SCHED_CMD_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/sched_def.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/sched_def.h
+--- linux-4.4.197/include/linux/vserver/sched_def.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/sched_def.h  2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,38 @@
++#ifndef _VSERVER_SCHED_DEF_H
++#define _VSERVER_SCHED_DEF_H
 +
 +
-+#include <uapi/vserver/device.h>
++#include <linux/spinlock.h>
++#include <linux/jiffies.h>
++#include <linux/cpumask.h>
++#include <asm/atomic.h>
++#include <asm/param.h>
 +
 +
-+#else /* _VSERVER_DEVICE_H */
-+#warning duplicate inclusion
-+#endif        /* _VSERVER_DEVICE_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/device_cmd.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/device_cmd.h
---- linux-4.4.116/include/linux/vserver/device_cmd.h   1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/device_cmd.h 2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,31 @@
-+#ifndef _VSERVER_DEVICE_CMD_H
-+#define _VSERVER_DEVICE_CMD_H
 +
 +
-+#include <uapi/vserver/device_cmd.h>
++/* context sub struct */
 +
 +
++struct _vx_sched {
++      int prio_bias;                  /* bias offset for priority */
 +
 +
-+#ifdef        CONFIG_COMPAT
++      cpumask_t update;               /* CPUs which should update */
++};
 +
 +
-+#include <asm/compat.h>
++struct _vx_sched_pc {
++      int prio_bias;                  /* bias offset for priority */
 +
 +
-+struct        vcmd_set_mapping_v0_x32 {
-+      compat_uptr_t device_ptr;
-+      compat_uptr_t target_ptr;
-+      uint32_t flags;
++      uint64_t user_ticks;            /* token tick events */
++      uint64_t sys_ticks;             /* token tick events */
++      uint64_t hold_ticks;            /* token ticks paused */
 +};
 +
 +};
 +
-+#endif        /* CONFIG_COMPAT */
 +
 +
-+#include <linux/compiler.h>
++#ifdef CONFIG_VSERVER_DEBUG
 +
 +
-+extern int vc_set_mapping(struct vx_info *, void __user *);
-+extern int vc_unset_mapping(struct vx_info *, void __user *);
++static inline void __dump_vx_sched(struct _vx_sched *sched)
++{
++      printk("\t_vx_sched:\n");
++      printk("\t priority = %4d\n", sched->prio_bias);
++}
 +
 +
-+#ifdef        CONFIG_COMPAT
++#endif
 +
 +
-+extern int vc_set_mapping_x32(struct vx_info *, void __user *);
-+extern int vc_unset_mapping_x32(struct vx_info *, void __user *);
++#endif        /* _VSERVER_SCHED_DEF_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/sched.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/sched.h
+--- linux-4.4.197/include/linux/vserver/sched.h        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/sched.h      2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,23 @@
++#ifndef _VSERVER_SCHED_H
++#define _VSERVER_SCHED_H
 +
 +
-+#endif        /* CONFIG_COMPAT */
 +
 +
-+#endif        /* _VSERVER_DEVICE_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/device_def.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/device_def.h
---- linux-4.4.116/include/linux/vserver/device_def.h   1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/device_def.h 2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,17 @@
-+#ifndef _VSERVER_DEVICE_DEF_H
-+#define _VSERVER_DEVICE_DEF_H
++#ifdef        __KERNEL__
 +
 +
-+#include <linux/types.h>
++struct timespec;
 +
 +
-+struct vx_dmap_target {
-+      dev_t target;
-+      uint32_t flags;
-+};
++void vx_vsi_uptime(struct timespec *, struct timespec *);
 +
 +
-+struct _vx_device {
-+#ifdef CONFIG_VSERVER_DEVICE
-+      struct vx_dmap_target targets[2];
-+#endif
-+};
 +
 +
-+#endif        /* _VSERVER_DEVICE_DEF_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/dlimit.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/dlimit.h
---- linux-4.4.116/include/linux/vserver/dlimit.h       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/dlimit.h     2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,54 @@
-+#ifndef _VSERVER_DLIMIT_H
-+#define _VSERVER_DLIMIT_H
++struct vx_info;
 +
 +
-+#include "switch.h"
++void vx_update_load(struct vx_info *);
 +
 +
 +
 +
-+#ifdef        __KERNEL__
++void vx_update_sched_param(struct _vx_sched *sched,
++      struct _vx_sched_pc *sched_pc);
 +
 +
-+/*      keep in sync with CDLIM_INFINITY      */
++#endif        /* __KERNEL__ */
++#else /* _VSERVER_SCHED_H */
++#warning duplicate inclusion
++#endif        /* _VSERVER_SCHED_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/signal_cmd.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/signal_cmd.h
+--- linux-4.4.197/include/linux/vserver/signal_cmd.h   1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/signal_cmd.h 2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,14 @@
++#ifndef _VSERVER_SIGNAL_CMD_H
++#define _VSERVER_SIGNAL_CMD_H
 +
 +
-+#define DLIM_INFINITY         (~0ULL)
++#include <uapi/vserver/signal_cmd.h>
 +
 +
-+#include <linux/spinlock.h>
-+#include <linux/rcupdate.h>
 +
 +
-+struct super_block;
++extern int vc_ctx_kill(struct vx_info *, void __user *);
++extern int vc_wait_exit(struct vx_info *, void __user *);
 +
 +
-+struct dl_info {
-+      struct hlist_node dl_hlist;             /* linked list of contexts */
-+      struct rcu_head dl_rcu;                 /* the rcu head */
-+      vtag_t dl_tag;                          /* context tag */
-+      atomic_t dl_usecnt;                     /* usage count */
-+      atomic_t dl_refcnt;                     /* reference count */
 +
 +
-+      struct super_block *dl_sb;              /* associated superblock */
++extern int vc_get_pflags(uint32_t pid, void __user *);
++extern int vc_set_pflags(uint32_t pid, void __user *);
 +
 +
-+      spinlock_t dl_lock;                     /* protect the values */
++#endif        /* _VSERVER_SIGNAL_CMD_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/signal.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/signal.h
+--- linux-4.4.197/include/linux/vserver/signal.h       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/signal.h     2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,14 @@
++#ifndef _VSERVER_SIGNAL_H
++#define _VSERVER_SIGNAL_H
 +
 +
-+      unsigned long long dl_space_used;       /* used space in bytes */
-+      unsigned long long dl_space_total;      /* maximum space in bytes */
-+      unsigned long dl_inodes_used;           /* used inodes */
-+      unsigned long dl_inodes_total;          /* maximum inodes */
 +
 +
-+      unsigned int dl_nrlmult;                /* non root limit mult */
-+};
++#ifdef        __KERNEL__
 +
 +
-+struct rcu_head;
++struct vx_info;
 +
 +
-+extern void rcu_free_dl_info(struct rcu_head *);
-+extern void unhash_dl_info(struct dl_info *);
++int vx_info_kill(struct vx_info *, int, int);
 +
 +
-+extern struct dl_info *locate_dl_info(struct super_block *, vtag_t);
++#endif        /* __KERNEL__ */
++#else /* _VSERVER_SIGNAL_H */
++#warning duplicate inclusion
++#endif        /* _VSERVER_SIGNAL_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/space_cmd.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/space_cmd.h
+--- linux-4.4.197/include/linux/vserver/space_cmd.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/space_cmd.h  2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,13 @@
++#ifndef _VSERVER_SPACE_CMD_H
++#define _VSERVER_SPACE_CMD_H
 +
 +
++#include <uapi/vserver/space_cmd.h>
 +
 +
-+struct kstatfs;
 +
 +
-+extern void vx_vsi_statfs(struct super_block *, struct kstatfs *);
++extern int vc_enter_space_v1(struct vx_info *, void __user *);
++extern int vc_set_space_v1(struct vx_info *, void __user *);
++extern int vc_enter_space(struct vx_info *, void __user *);
++extern int vc_set_space(struct vx_info *, void __user *);
++extern int vc_get_space_mask(void __user *, int);
 +
 +
-+typedef uint64_t dlsize_t;
++#endif        /* _VSERVER_SPACE_CMD_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/space.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/space.h
+--- linux-4.4.197/include/linux/vserver/space.h        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/space.h      2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,12 @@
++#ifndef _VSERVER_SPACE_H
++#define _VSERVER_SPACE_H
 +
 +
-+#endif        /* __KERNEL__ */
-+#else /* _VSERVER_DLIMIT_H */
-+#warning duplicate inclusion
-+#endif        /* _VSERVER_DLIMIT_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/dlimit_cmd.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/dlimit_cmd.h
---- linux-4.4.116/include/linux/vserver/dlimit_cmd.h   1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/dlimit_cmd.h 2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,46 @@
-+#ifndef _VSERVER_DLIMIT_CMD_H
-+#define _VSERVER_DLIMIT_CMD_H
++#include <linux/types.h>
 +
 +
-+#include <uapi/vserver/dlimit_cmd.h>
++struct vx_info;
 +
 +
++int vx_set_space(struct vx_info *vxi, unsigned long mask, unsigned index);
 +
 +
-+#ifdef        CONFIG_COMPAT
++#else /* _VSERVER_SPACE_H */
++#warning duplicate inclusion
++#endif        /* _VSERVER_SPACE_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/switch.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/switch.h
+--- linux-4.4.197/include/linux/vserver/switch.h       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/switch.h     2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,8 @@
++#ifndef _VSERVER_SWITCH_H
++#define _VSERVER_SWITCH_H
 +
 +
-+#include <asm/compat.h>
 +
 +
-+struct        vcmd_ctx_dlimit_base_v0_x32 {
-+      compat_uptr_t name_ptr;
-+      uint32_t flags;
-+};
++#include <linux/errno.h>
++#include <uapi/vserver/switch.h>
 +
 +
-+struct        vcmd_ctx_dlimit_v0_x32 {
-+      compat_uptr_t name_ptr;
-+      uint32_t space_used;                    /* used space in kbytes */
-+      uint32_t space_total;                   /* maximum space in kbytes */
-+      uint32_t inodes_used;                   /* used inodes */
-+      uint32_t inodes_total;                  /* maximum inodes */
-+      uint32_t reserved;                      /* reserved for root in % */
-+      uint32_t flags;
-+};
++#endif        /* _VSERVER_SWITCH_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/tag_cmd.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/tag_cmd.h
+--- linux-4.4.197/include/linux/vserver/tag_cmd.h      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/tag_cmd.h    2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,10 @@
++#ifndef _VSERVER_TAG_CMD_H
++#define _VSERVER_TAG_CMD_H
 +
 +
-+#endif        /* CONFIG_COMPAT */
++#include <uapi/vserver/tag_cmd.h>
 +
 +
-+#include <linux/compiler.h>
++extern int vc_task_tag(uint32_t);
 +
 +
-+extern int vc_add_dlimit(uint32_t, void __user *);
-+extern int vc_rem_dlimit(uint32_t, void __user *);
++extern int vc_tag_migrate(uint32_t);
 +
 +
-+extern int vc_set_dlimit(uint32_t, void __user *);
-+extern int vc_get_dlimit(uint32_t, void __user *);
++#endif        /* _VSERVER_TAG_CMD_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vserver/tag.h linux-4.4.197-vs2.3.9.8/include/linux/vserver/tag.h
+--- linux-4.4.197/include/linux/vserver/tag.h  1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vserver/tag.h        2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,160 @@
++#ifndef _DX_TAG_H
++#define _DX_TAG_H
 +
 +
-+#ifdef        CONFIG_COMPAT
++#include <linux/types.h>
++#include <linux/uidgid.h>
 +
 +
-+extern int vc_add_dlimit_x32(uint32_t, void __user *);
-+extern int vc_rem_dlimit_x32(uint32_t, void __user *);
 +
 +
-+extern int vc_set_dlimit_x32(uint32_t, void __user *);
-+extern int vc_get_dlimit_x32(uint32_t, void __user *);
++#define DX_TAG(in)    (IS_TAGGED(in))
 +
 +
-+#endif        /* CONFIG_COMPAT */
 +
 +
-+#endif        /* _VSERVER_DLIMIT_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/global.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/global.h
---- linux-4.4.116/include/linux/vserver/global.h       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/global.h     2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,19 @@
-+#ifndef _VSERVER_GLOBAL_H
-+#define _VSERVER_GLOBAL_H
++#ifdef CONFIG_TAG_NFSD
++#define DX_TAG_NFSD   1
++#else
++#define DX_TAG_NFSD   0
++#endif
 +
 +
 +
 +
-+extern atomic_t vx_global_ctotal;
-+extern atomic_t vx_global_cactive;
++#ifdef CONFIG_TAGGING_NONE
 +
 +
-+extern atomic_t nx_global_ctotal;
-+extern atomic_t nx_global_cactive;
++#define MAX_UID               0xFFFFFFFF
++#define MAX_GID               0xFFFFFFFF
 +
 +
-+extern atomic_t vs_global_nsproxy;
-+extern atomic_t vs_global_fs;
-+extern atomic_t vs_global_mnt_ns;
-+extern atomic_t vs_global_uts_ns;
-+extern atomic_t vs_global_user_ns;
-+extern atomic_t vs_global_pid_ns;
++#define INOTAG_TAG(cond, uid, gid, tag)       (0)
 +
 +
++#define TAGINO_UID(cond, uid, tag)    (uid)
++#define TAGINO_GID(cond, gid, tag)    (gid)
 +
 +
-+#endif /* _VSERVER_GLOBAL_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/history.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/history.h
---- linux-4.4.116/include/linux/vserver/history.h      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/history.h    2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,197 @@
-+#ifndef _VSERVER_HISTORY_H
-+#define _VSERVER_HISTORY_H
++#endif
 +
 +
 +
 +
-+enum {
-+      VXH_UNUSED = 0,
-+      VXH_THROW_OOPS = 1,
++#ifdef CONFIG_TAGGING_GID16
 +
 +
-+      VXH_GET_VX_INFO,
-+      VXH_PUT_VX_INFO,
-+      VXH_INIT_VX_INFO,
-+      VXH_SET_VX_INFO,
-+      VXH_CLR_VX_INFO,
-+      VXH_CLAIM_VX_INFO,
-+      VXH_RELEASE_VX_INFO,
-+      VXH_ALLOC_VX_INFO,
-+      VXH_DEALLOC_VX_INFO,
-+      VXH_HASH_VX_INFO,
-+      VXH_UNHASH_VX_INFO,
-+      VXH_LOC_VX_INFO,
-+      VXH_LOOKUP_VX_INFO,
-+      VXH_CREATE_VX_INFO,
-+};
++#define MAX_UID               0xFFFFFFFF
++#define MAX_GID               0x0000FFFF
 +
 +
-+struct _vxhe_vxi {
-+      struct vx_info *ptr;
-+      unsigned xid;
-+      unsigned usecnt;
-+      unsigned tasks;
-+};
++#define INOTAG_TAG(cond, uid, gid, tag)       \
++      ((cond) ? (((gid) >> 16) & 0xFFFF) : 0)
 +
 +
-+struct _vxhe_set_clr {
-+      void *data;
-+};
++#define TAGINO_UID(cond, uid, tag)    (uid)
++#define TAGINO_GID(cond, gid, tag)    \
++      ((cond) ? (((gid) & 0xFFFF) | ((tag) << 16)) : (gid))
 +
 +
-+struct _vxhe_loc_lookup {
-+      unsigned arg;
-+};
++#endif
 +
 +
-+struct _vx_hist_entry {
-+      void *loc;
-+      unsigned short seq;
-+      unsigned short type;
-+      struct _vxhe_vxi vxi;
-+      union {
-+              struct _vxhe_set_clr sc;
-+              struct _vxhe_loc_lookup ll;
-+      };
-+};
 +
 +
-+#ifdef        CONFIG_VSERVER_HISTORY
++#ifdef CONFIG_TAGGING_ID24
 +
 +
-+extern unsigned volatile int vxh_active;
++#define MAX_UID               0x00FFFFFF
++#define MAX_GID               0x00FFFFFF
 +
 +
-+struct _vx_hist_entry *vxh_advance(void *loc);
++#define INOTAG_TAG(cond, uid, gid, tag)       \
++      ((cond) ? ((((uid) >> 16) & 0xFF00) | (((gid) >> 24) & 0xFF)) : 0)
 +
 +
++#define TAGINO_UID(cond, uid, tag)    \
++      ((cond) ? (((uid) & 0xFFFFFF) | (((tag) & 0xFF00) << 16)) : (uid))
++#define TAGINO_GID(cond, gid, tag)    \
++      ((cond) ? (((gid) & 0xFFFFFF) | (((tag) & 0x00FF) << 24)) : (gid))
 +
 +
-+static inline
-+void  __vxh_copy_vxi(struct _vx_hist_entry *entry, struct vx_info *vxi)
-+{
-+      entry->vxi.ptr = vxi;
-+      if (vxi) {
-+              entry->vxi.usecnt = atomic_read(&vxi->vx_usecnt);
-+              entry->vxi.tasks = atomic_read(&vxi->vx_tasks);
-+              entry->vxi.xid = vxi->vx_id;
-+      }
-+}
++#endif
 +
 +
 +
 +
-+#define       __HERE__ current_text_addr()
++#ifdef CONFIG_TAGGING_UID16
 +
 +
-+#define __VXH_BODY(__type, __data, __here)    \
-+      struct _vx_hist_entry *entry;           \
-+                                              \
-+      preempt_disable();                      \
-+      entry = vxh_advance(__here);            \
-+      __data;                                 \
-+      entry->type = __type;                   \
-+      preempt_enable();
++#define MAX_UID               0x0000FFFF
++#define MAX_GID               0xFFFFFFFF
 +
 +
++#define INOTAG_TAG(cond, uid, gid, tag)       \
++      ((cond) ? (((uid) >> 16) & 0xFFFF) : 0)
 +
 +
-+      /* pass vxi only */
++#define TAGINO_UID(cond, uid, tag)    \
++      ((cond) ? (((uid) & 0xFFFF) | ((tag) << 16)) : (uid))
++#define TAGINO_GID(cond, gid, tag)    (gid)
 +
 +
-+#define __VXH_SMPL                            \
-+      __vxh_copy_vxi(entry, vxi)
++#endif
 +
 +
-+static inline
-+void  __vxh_smpl(struct vx_info *vxi, int __type, void *__here)
-+{
-+      __VXH_BODY(__type, __VXH_SMPL, __here)
-+}
 +
 +
-+      /* pass vxi and data (void *) */
++#ifdef CONFIG_TAGGING_INTERN
 +
 +
-+#define __VXH_DATA                            \
-+      __vxh_copy_vxi(entry, vxi);             \
-+      entry->sc.data = data
++#define MAX_UID               0xFFFFFFFF
++#define MAX_GID               0xFFFFFFFF
 +
 +
-+static inline
-+void  __vxh_data(struct vx_info *vxi, void *data,
-+                      int __type, void *__here)
-+{
-+      __VXH_BODY(__type, __VXH_DATA, __here)
-+}
++#define INOTAG_TAG(cond, uid, gid, tag)       \
++      ((cond) ? (tag) : 0)
 +
 +
-+      /* pass vxi and arg (long) */
++#define TAGINO_UID(cond, uid, tag)    (uid)
++#define TAGINO_GID(cond, gid, tag)    (gid)
 +
 +
-+#define __VXH_LONG                            \
-+      __vxh_copy_vxi(entry, vxi);             \
-+      entry->ll.arg = arg
++#endif
 +
 +
-+static inline
-+void  __vxh_long(struct vx_info *vxi, long arg,
-+                      int __type, void *__here)
++
++#ifndef CONFIG_TAGGING_NONE
++#define dx_current_fstag(sb)  \
++      ((sb)->s_flags & MS_TAGGED ? dx_current_tag() : 0)
++#else
++#define dx_current_fstag(sb)  (0)
++#endif
++
++#ifndef CONFIG_TAGGING_INTERN
++#define TAGINO_TAG(cond, tag) (0)
++#else
++#define TAGINO_TAG(cond, tag) ((cond) ? (tag) : 0)
++#endif
++
++#define TAGINO_KUID(cond, kuid, ktag) \
++      KUIDT_INIT(TAGINO_UID(cond, __kuid_val(kuid), __ktag_val(ktag)))
++#define TAGINO_KGID(cond, kgid, ktag) \
++      KGIDT_INIT(TAGINO_GID(cond, __kgid_val(kgid), __ktag_val(ktag)))
++#define TAGINO_KTAG(cond, ktag)               \
++      KTAGT_INIT(TAGINO_TAG(cond, __ktag_val(ktag)))
++
++
++#define INOTAG_UID(cond, uid, gid)    \
++      ((cond) ? ((uid) & MAX_UID) : (uid))
++#define INOTAG_GID(cond, uid, gid)    \
++      ((cond) ? ((gid) & MAX_GID) : (gid))
++
++#define INOTAG_KUID(cond, kuid, kgid) \
++      KUIDT_INIT(INOTAG_UID(cond, __kuid_val(kuid), __kgid_val(kgid)))
++#define INOTAG_KGID(cond, kuid, kgid) \
++      KGIDT_INIT(INOTAG_GID(cond, __kuid_val(kuid), __kgid_val(kgid)))
++#define INOTAG_KTAG(cond, kuid, kgid, ktag) \
++      KTAGT_INIT(INOTAG_TAG(cond, \
++              __kuid_val(kuid), __kgid_val(kgid), __ktag_val(ktag)))
++
++
++static inline uid_t dx_map_uid(uid_t uid)
 +{
 +{
-+      __VXH_BODY(__type, __VXH_LONG, __here)
++      if ((uid > MAX_UID) && (uid != -1))
++              uid = -2;
++      return (uid & MAX_UID);
 +}
 +
 +}
 +
-+
-+static inline
-+void  __vxh_throw_oops(void *__here)
++static inline gid_t dx_map_gid(gid_t gid)
 +{
 +{
-+      __VXH_BODY(VXH_THROW_OOPS, {}, __here);
-+      /* prevent further acquisition */
-+      vxh_active = 0;
++      if ((gid > MAX_GID) && (gid != -1))
++              gid = -2;
++      return (gid & MAX_GID);
 +}
 +
 +}
 +
++struct peer_tag {
++      int32_t xid;
++      int32_t nid;
++};
 +
 +
-+#define vxh_throw_oops()      __vxh_throw_oops(__HERE__);
++#define dx_notagcheck(sb) ((sb) && ((sb)->s_flags & MS_NOTAGCHECK))
 +
 +
-+#define __vxh_get_vx_info(v, h)       __vxh_smpl(v, VXH_GET_VX_INFO, h);
-+#define __vxh_put_vx_info(v, h)       __vxh_smpl(v, VXH_PUT_VX_INFO, h);
++int dx_parse_tag(char *string, vtag_t *tag, int remove, int *mnt_flags,
++               unsigned long *flags);
 +
 +
-+#define __vxh_init_vx_info(v, d, h) \
-+      __vxh_data(v, d, VXH_INIT_VX_INFO, h);
-+#define __vxh_set_vx_info(v, d, h) \
-+      __vxh_data(v, d, VXH_SET_VX_INFO, h);
-+#define __vxh_clr_vx_info(v, d, h) \
-+      __vxh_data(v, d, VXH_CLR_VX_INFO, h);
++#ifdef        CONFIG_PROPAGATE
 +
 +
-+#define __vxh_claim_vx_info(v, d, h) \
-+      __vxh_data(v, d, VXH_CLAIM_VX_INFO, h);
-+#define __vxh_release_vx_info(v, d, h) \
-+      __vxh_data(v, d, VXH_RELEASE_VX_INFO, h);
++void __dx_propagate_tag(struct nameidata *nd, struct inode *inode);
 +
 +
-+#define vxh_alloc_vx_info(v) \
-+      __vxh_smpl(v, VXH_ALLOC_VX_INFO, __HERE__);
-+#define vxh_dealloc_vx_info(v) \
-+      __vxh_smpl(v, VXH_DEALLOC_VX_INFO, __HERE__);
-+
-+#define vxh_hash_vx_info(v) \
-+      __vxh_smpl(v, VXH_HASH_VX_INFO, __HERE__);
-+#define vxh_unhash_vx_info(v) \
-+      __vxh_smpl(v, VXH_UNHASH_VX_INFO, __HERE__);
++#define dx_propagate_tag(n, i)        __dx_propagate_tag(n, i)
 +
 +
-+#define vxh_loc_vx_info(v, l) \
-+      __vxh_long(v, l, VXH_LOC_VX_INFO, __HERE__);
-+#define vxh_lookup_vx_info(v, l) \
-+      __vxh_long(v, l, VXH_LOOKUP_VX_INFO, __HERE__);
-+#define vxh_create_vx_info(v, l) \
-+      __vxh_long(v, l, VXH_CREATE_VX_INFO, __HERE__);
++#else
++#define dx_propagate_tag(n, i)        do { } while (0)
++#endif
 +
 +
-+extern void vxh_dump_history(void);
++#endif /* _DX_TAG_H */
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_inet6.h linux-4.4.197-vs2.3.9.8/include/linux/vs_inet6.h
+--- linux-4.4.197/include/linux/vs_inet6.h     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_inet6.h   2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,257 @@
++#ifndef _VS_INET6_H
++#define _VS_INET6_H
 +
 +
++#include "vserver/base.h"
++#include "vserver/network.h"
++#include "vserver/debug.h"
 +
 +
-+#else  /* CONFIG_VSERVER_HISTORY */
++#include <net/ipv6.h>
 +
 +
-+#define       __HERE__        0
++#define NXAV6(a)      &(a)->ip, &(a)->mask, (a)->prefix, (a)->type
++#define NXAV6_FMT     "[%pI6/%pI6/%d:%04x]"
 +
 +
-+#define vxh_throw_oops()              do { } while (0)
 +
 +
-+#define __vxh_get_vx_info(v, h)               do { } while (0)
-+#define __vxh_put_vx_info(v, h)               do { } while (0)
++#ifdef        CONFIG_IPV6
 +
 +
-+#define __vxh_init_vx_info(v, d, h)   do { } while (0)
-+#define __vxh_set_vx_info(v, d, h)    do { } while (0)
-+#define __vxh_clr_vx_info(v, d, h)    do { } while (0)
++static inline
++int v6_addr_match(struct nx_addr_v6 *nxa,
++      const struct in6_addr *addr, uint16_t mask)
++{
++      int ret = 0;
 +
 +
-+#define __vxh_claim_vx_info(v, d, h)  do { } while (0)
-+#define __vxh_release_vx_info(v, d, h)        do { } while (0)
++      switch (nxa->type & mask) {
++      case NXA_TYPE_MASK:
++              ret = ipv6_masked_addr_cmp(&nxa->ip, &nxa->mask, addr);
++              break;
++      case NXA_TYPE_ADDR:
++              ret = ipv6_addr_equal(&nxa->ip, addr);
++              break;
++      case NXA_TYPE_ANY:
++              ret = 1;
++              break;
++      }
++      vxdprintk(VXD_CBIT(net, 0),
++              "v6_addr_match(%p" NXAV6_FMT ",%pI6,%04x) = %d",
++              nxa, NXAV6(nxa), addr, mask, ret);
++      return ret;
++}
 +
 +
-+#define vxh_alloc_vx_info(v)          do { } while (0)
-+#define vxh_dealloc_vx_info(v)                do { } while (0)
++static inline
++int v6_addr_in_nx_info(struct nx_info *nxi,
++      const struct in6_addr *addr, uint16_t mask)
++{
++      struct nx_addr_v6 *nxa;
++      unsigned long irqflags;
++      int ret = 1;
 +
 +
-+#define vxh_hash_vx_info(v)           do { } while (0)
-+#define vxh_unhash_vx_info(v)         do { } while (0)
++      if (!nxi)
++              goto out;
 +
 +
-+#define vxh_loc_vx_info(v, l)         do { } while (0)
-+#define vxh_lookup_vx_info(v, l)      do { } while (0)
-+#define vxh_create_vx_info(v, l)      do { } while (0)
++      spin_lock_irqsave(&nxi->addr_lock, irqflags);
++      for (nxa = &nxi->v6; nxa; nxa = nxa->next)
++              if (v6_addr_match(nxa, addr, mask))
++                      goto out_unlock;
++      ret = 0;
++out_unlock:
++      spin_unlock_irqrestore(&nxi->addr_lock, irqflags);
++out:
++      vxdprintk(VXD_CBIT(net, 0),
++              "v6_addr_in_nx_info(%p[#%u],%pI6,%04x) = %d",
++              nxi, nxi ? nxi->nx_id : 0, addr, mask, ret);
++      return ret;
++}
 +
 +
-+#define vxh_dump_history()            do { } while (0)
++static inline
++int v6_nx_addr_match(struct nx_addr_v6 *nxa, struct nx_addr_v6 *addr, uint16_t mask)
++{
++      /* FIXME: needs full range checks */
++      return v6_addr_match(nxa, &addr->ip, mask);
++}
 +
 +
++static inline
++int v6_nx_addr_in_nx_info(struct nx_info *nxi, struct nx_addr_v6 *nxa, uint16_t mask)
++{
++      struct nx_addr_v6 *ptr;
++      unsigned long irqflags;
++      int ret = 1;
 +
 +
-+#endif /* CONFIG_VSERVER_HISTORY */
++      spin_lock_irqsave(&nxi->addr_lock, irqflags);
++      for (ptr = &nxi->v6; ptr; ptr = ptr->next)
++              if (v6_nx_addr_match(ptr, nxa, mask))
++                      goto out_unlock;
++      ret = 0;
++out_unlock:
++      spin_unlock_irqrestore(&nxi->addr_lock, irqflags);
++      return ret;
++}
 +
 +
-+#endif /* _VSERVER_HISTORY_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/inode.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/inode.h
---- linux-4.4.116/include/linux/vserver/inode.h        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/inode.h      2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,19 @@
-+#ifndef _VSERVER_INODE_H
-+#define _VSERVER_INODE_H
 +
 +
-+#include <uapi/vserver/inode.h>
++/*
++ *    Check if a given address matches for a socket
++ *
++ *    nxi:            the socket's nx_info if any
++ *    addr:           to be verified address
++ */
++static inline
++int v6_sock_addr_match (
++      struct nx_info *nxi,
++      struct inet_sock *inet,
++      struct in6_addr *addr)
++{
++      struct sock *sk = &inet->sk;
++      const struct in6_addr *saddr = inet6_rcv_saddr(sk);
 +
 +
++      if (!ipv6_addr_any(addr) &&
++              ipv6_addr_equal(saddr, addr))
++              return 1;
++      if (ipv6_addr_any(saddr))
++              return v6_addr_in_nx_info(nxi, addr, -1);
++      return 0;
++}
 +
 +
-+#ifdef        CONFIG_VSERVER_PROC_SECURE
-+#define IATTR_PROC_DEFAULT    ( IATTR_ADMIN | IATTR_HIDE )
-+#define IATTR_PROC_SYMLINK    ( IATTR_ADMIN )
-+#else
-+#define IATTR_PROC_DEFAULT    ( IATTR_ADMIN )
-+#define IATTR_PROC_SYMLINK    ( IATTR_ADMIN )
-+#endif
++/*
++ *    check if address is covered by socket
++ *
++ *    sk:     the socket to check against
++ *    addr:   the address in question (must be != 0)
++ */
 +
 +
-+#define vx_hide_check(c, m)   (((m) & IATTR_HIDE) ? vx_check(c, m) : 1)
++static inline
++int __v6_addr_match_socket(const struct sock *sk, struct nx_addr_v6 *nxa)
++{
++      struct nx_info *nxi = sk->sk_nx_info;
++      const struct in6_addr *saddr = inet6_rcv_saddr(sk);
 +
 +
-+#else /* _VSERVER_INODE_H */
-+#warning duplicate inclusion
-+#endif        /* _VSERVER_INODE_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/inode_cmd.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/inode_cmd.h
---- linux-4.4.116/include/linux/vserver/inode_cmd.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/inode_cmd.h  2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,36 @@
-+#ifndef _VSERVER_INODE_CMD_H
-+#define _VSERVER_INODE_CMD_H
++      vxdprintk(VXD_CBIT(net, 5),
++              "__v6_addr_in_socket(%p," NXAV6_FMT ") %p:%pI6 %p;%lx",
++              sk, NXAV6(nxa), nxi, saddr, sk->sk_socket,
++              (sk->sk_socket?sk->sk_socket->flags:0));
 +
 +
-+#include <uapi/vserver/inode_cmd.h>
++      if (!ipv6_addr_any(saddr)) {    /* direct address match */
++              return v6_addr_match(nxa, saddr, -1);
++      } else if (nxi) {               /* match against nx_info */
++              return v6_nx_addr_in_nx_info(nxi, nxa, -1);
++      } else {                        /* unrestricted any socket */
++              return 1;
++      }
++}
 +
 +
 +
 +
++/* inet related checks and helpers */
 +
 +
-+#ifdef        CONFIG_COMPAT
 +
 +
-+#include <asm/compat.h>
++struct in_ifaddr;
++struct net_device;
++struct sock;
 +
 +
-+struct        vcmd_ctx_iattr_v1_x32 {
-+      compat_uptr_t name_ptr;
-+      uint32_t tag;
-+      uint32_t flags;
-+      uint32_t mask;
-+};
 +
 +
-+#endif        /* CONFIG_COMPAT */
++#include <linux/netdevice.h>
++#include <linux/inetdevice.h>
++#include <net/inet_timewait_sock.h>
 +
 +
-+#include <linux/compiler.h>
 +
 +
-+extern int vc_get_iattr(void __user *);
-+extern int vc_set_iattr(void __user *);
++int dev_in_nx_info(struct net_device *, struct nx_info *);
++int v6_dev_in_nx_info(struct net_device *, struct nx_info *);
++int nx_v6_addr_conflict(struct nx_info *, struct nx_info *);
 +
 +
-+extern int vc_fget_iattr(uint32_t, void __user *);
-+extern int vc_fset_iattr(uint32_t, void __user *);
 +
 +
-+#ifdef        CONFIG_COMPAT
 +
 +
-+extern int vc_get_iattr_x32(void __user *);
-+extern int vc_set_iattr_x32(void __user *);
++static inline
++int v6_ifa_in_nx_info(struct inet6_ifaddr *ifa, struct nx_info *nxi)
++{
++      if (!nxi)
++              return 1;
++      if (!ifa)
++              return 0;
++      return v6_addr_in_nx_info(nxi, &ifa->addr, -1);
++}
 +
 +
-+#endif        /* CONFIG_COMPAT */
++static inline
++int nx_v6_ifa_visible(struct nx_info *nxi, struct inet6_ifaddr *ifa)
++{
++      vxdprintk(VXD_CBIT(net, 1), "nx_v6_ifa_visible(%p[#%u],%p) %d",
++              nxi, nxi ? nxi->nx_id : 0, ifa,
++              nxi ? v6_ifa_in_nx_info(ifa, nxi) : 0);
 +
 +
-+#endif        /* _VSERVER_INODE_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/limit.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/limit.h
---- linux-4.4.116/include/linux/vserver/limit.h        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/limit.h      2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,67 @@
-+#ifndef _VSERVER_LIMIT_H
-+#define _VSERVER_LIMIT_H
++      if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0))
++              return 1;
++      if (v6_ifa_in_nx_info(ifa, nxi))
++              return 1;
++      return 0;
++}
 +
 +
-+#include <uapi/vserver/limit.h>
 +
 +
++struct nx_v6_sock_addr {
++      struct in6_addr saddr;  /* Address used for validation */
++      struct in6_addr baddr;  /* Address used for socket bind */
++};
 +
 +
-+#define       VLIM_NOCHECK    ((1L << VLIMIT_DENTRY) | (1L << RLIMIT_RSS))
++static inline
++int v6_map_sock_addr(struct inet_sock *inet, struct sockaddr_in6 *addr,
++      struct nx_v6_sock_addr *nsa)
++{
++      // struct sock *sk = &inet->sk;
++      // struct nx_info *nxi = sk->sk_nx_info;
++      struct in6_addr saddr = addr->sin6_addr;
++      struct in6_addr baddr = saddr;
 +
 +
-+/*    keep in sync with CRLIM_INFINITY */
++      nsa->saddr = saddr;
++      nsa->baddr = baddr;
++      return 0;
++}
 +
 +
-+#define       VLIM_INFINITY   (~0ULL)
++static inline
++void v6_set_sock_addr(struct inet_sock *inet, struct nx_v6_sock_addr *nsa)
++{
++      // struct sock *sk = &inet->sk;
++      // struct in6_addr *saddr = inet6_rcv_saddr(sk);
 +
 +
-+#include <asm/atomic.h>
-+#include <asm/resource.h>
++      // *saddr = nsa->baddr;
++      // inet->inet_saddr = nsa->baddr;
++}
 +
 +
-+#ifndef RLIM_INFINITY
-+#warning RLIM_INFINITY is undefined
-+#endif
++static inline
++int nx_info_has_v6(struct nx_info *nxi)
++{
++      if (!nxi)
++              return 1;
++      if (NX_IPV6(nxi))
++              return 1;
++      return 0;
++}
 +
 +
-+#define __rlim_val(l, r, v)   ((l)->res[r].v)
++#else /* CONFIG_IPV6 */
 +
 +
-+#define __rlim_soft(l, r)     __rlim_val(l, r, soft)
-+#define __rlim_hard(l, r)     __rlim_val(l, r, hard)
++static inline
++int nx_v6_dev_visible(struct nx_info *n, struct net_device *d)
++{
++      return 1;
++}
 +
 +
-+#define __rlim_rcur(l, r)     __rlim_val(l, r, rcur)
-+#define __rlim_rmin(l, r)     __rlim_val(l, r, rmin)
-+#define __rlim_rmax(l, r)     __rlim_val(l, r, rmax)
 +
 +
-+#define __rlim_lhit(l, r)     __rlim_val(l, r, lhit)
-+#define __rlim_hit(l, r)      atomic_inc(&__rlim_lhit(l, r))
++static inline
++int nx_v6_addr_conflict(struct nx_info *n, uint32_t a, const struct sock *s)
++{
++      return 1;
++}
 +
 +
-+typedef atomic_long_t rlim_atomic_t;
-+typedef unsigned long rlim_t;
++static inline
++int v6_ifa_in_nx_info(struct in_ifaddr *a, struct nx_info *n)
++{
++      return 1;
++}
 +
 +
-+#define __rlim_get(l, r)      atomic_long_read(&__rlim_rcur(l, r))
-+#define __rlim_set(l, r, v)   atomic_long_set(&__rlim_rcur(l, r), v)
-+#define __rlim_inc(l, r)      atomic_long_inc(&__rlim_rcur(l, r))
-+#define __rlim_dec(l, r)      atomic_long_dec(&__rlim_rcur(l, r))
-+#define __rlim_add(l, r, v)   atomic_long_add(v, &__rlim_rcur(l, r))
-+#define __rlim_sub(l, r, v)   atomic_long_sub(v, &__rlim_rcur(l, r))
++static inline
++int nx_info_has_v6(struct nx_info *nxi)
++{
++      return 0;
++}
 +
 +
++#endif /* CONFIG_IPV6 */
++
++#define current_nx_info_has_v6() \
++      nx_info_has_v6(current_nx_info())
 +
 +
-+#if   (RLIM_INFINITY == VLIM_INFINITY)
-+#define       VX_VLIM(r) ((long long)(long)(r))
-+#define       VX_RLIM(v) ((rlim_t)(v))
 +#else
 +#else
-+#define       VX_VLIM(r) (((r) == RLIM_INFINITY) \
-+              ? VLIM_INFINITY : (long long)(r))
-+#define       VX_RLIM(v) (((v) == VLIM_INFINITY) \
-+              ? RLIM_INFINITY : (rlim_t)(v))
++#warning duplicate inclusion
 +#endif
 +#endif
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_inet.h linux-4.4.197-vs2.3.9.8/include/linux/vs_inet.h
+--- linux-4.4.197/include/linux/vs_inet.h      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_inet.h    2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,364 @@
++#ifndef _VS_INET_H
++#define _VS_INET_H
 +
 +
-+struct sysinfo;
-+
-+#ifdef        CONFIG_MEMCG
-+void vx_vsi_meminfo(struct sysinfo *);
-+void vx_vsi_swapinfo(struct sysinfo *);
-+long vx_vsi_cached(struct sysinfo *);
-+#else /* !CONFIG_MEMCG */
-+#define vx_vsi_meminfo(s) do { } while (0)
-+#define vx_vsi_swapinfo(s) do { } while (0)
-+#define vx_vsi_cached(s) (0L)
-+#endif        /* !CONFIG_MEMCG */
++#include "vserver/base.h"
++#include "vserver/network.h"
++#include "vserver/debug.h"
 +
 +
-+#define NUM_LIMITS    24
++#define IPI_LOOPBACK  htonl(INADDR_LOOPBACK)
 +
 +
-+#endif        /* _VSERVER_LIMIT_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/limit_cmd.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/limit_cmd.h
---- linux-4.4.116/include/linux/vserver/limit_cmd.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/limit_cmd.h  2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,35 @@
-+#ifndef _VSERVER_LIMIT_CMD_H
-+#define _VSERVER_LIMIT_CMD_H
++#define NXAV4(a)      NIPQUAD((a)->ip[0]), NIPQUAD((a)->ip[1]), \
++                      NIPQUAD((a)->mask), (a)->type
++#define NXAV4_FMT     "[" NIPQUAD_FMT "-" NIPQUAD_FMT "/" NIPQUAD_FMT ":%04x]"
 +
 +
-+#include <uapi/vserver/limit_cmd.h>
++#define NIPQUAD(addr) \
++      ((unsigned char *)&addr)[0], \
++      ((unsigned char *)&addr)[1], \
++      ((unsigned char *)&addr)[2], \
++      ((unsigned char *)&addr)[3]
 +
 +
++#define NIPQUAD_FMT "%u.%u.%u.%u"
 +
 +
-+#ifdef        CONFIG_IA32_EMULATION
 +
 +
-+struct        vcmd_ctx_rlimit_v0_x32 {
-+      uint32_t id;
-+      uint64_t minimum;
-+      uint64_t softlimit;
-+      uint64_t maximum;
-+} __attribute__ ((packed));
++static inline
++int v4_addr_match(struct nx_addr_v4 *nxa, __be32 addr, uint16_t tmask)
++{
++      __be32 ip = nxa->ip[0].s_addr;
++      __be32 mask = nxa->mask.s_addr;
++      __be32 bcast = ip | ~mask;
++      int ret = 0;
 +
 +
-+#endif        /* CONFIG_IA32_EMULATION */
++      switch (nxa->type & tmask) {
++      case NXA_TYPE_MASK:
++              ret = (ip == (addr & mask));
++              break;
++      case NXA_TYPE_ADDR:
++              ret = 3;
++              if (addr == ip)
++                      break;
++              /* fall through to broadcast */
++      case NXA_MOD_BCAST:
++              ret = ((tmask & NXA_MOD_BCAST) && (addr == bcast));
++              break;
++      case NXA_TYPE_RANGE:
++              ret = ((nxa->ip[0].s_addr <= addr) &&
++                      (nxa->ip[1].s_addr > addr));
++              break;
++      case NXA_TYPE_ANY:
++              ret = 2;
++              break;
++      }
 +
 +
-+#include <linux/compiler.h>
++      vxdprintk(VXD_CBIT(net, 0),
++              "v4_addr_match(%p" NXAV4_FMT "," NIPQUAD_FMT ",%04x) = %d",
++              nxa, NXAV4(nxa), NIPQUAD(addr), tmask, ret);
++      return ret;
++}
 +
 +
-+extern int vc_get_rlimit_mask(uint32_t, void __user *);
-+extern int vc_get_rlimit(struct vx_info *, void __user *);
-+extern int vc_set_rlimit(struct vx_info *, void __user *);
-+extern int vc_reset_hits(struct vx_info *, void __user *);
-+extern int vc_reset_minmax(struct vx_info *, void __user *);
++static inline
++int v4_addr_in_nx_info(struct nx_info *nxi, __be32 addr, uint16_t tmask)
++{
++      struct nx_addr_v4 *nxa;
++      unsigned long irqflags;
++      int ret = 1;
 +
 +
-+extern int vc_rlimit_stat(struct vx_info *, void __user *);
++      if (!nxi)
++              goto out;
 +
 +
-+#ifdef        CONFIG_IA32_EMULATION
++      ret = 2;
++      /* allow 127.0.0.1 when remapping lback */
++      if ((tmask & NXA_LOOPBACK) &&
++              (addr == IPI_LOOPBACK) &&
++              nx_info_flags(nxi, NXF_LBACK_REMAP, 0))
++              goto out;
++      ret = 3;
++      /* check for lback address */
++      if ((tmask & NXA_MOD_LBACK) &&
++              (nxi->v4_lback.s_addr == addr))
++              goto out;
++      ret = 4;
++      /* check for broadcast address */
++      if ((tmask & NXA_MOD_BCAST) &&
++              (nxi->v4_bcast.s_addr == addr))
++              goto out;
++      ret = 5;
 +
 +
-+extern int vc_get_rlimit_x32(struct vx_info *, void __user *);
-+extern int vc_set_rlimit_x32(struct vx_info *, void __user *);
++      /* check for v4 addresses */
++      spin_lock_irqsave(&nxi->addr_lock, irqflags);
++      for (nxa = &nxi->v4; nxa; nxa = nxa->next)
++              if (v4_addr_match(nxa, addr, tmask))
++                      goto out_unlock;
++      ret = 0;
++out_unlock:
++      spin_unlock_irqrestore(&nxi->addr_lock, irqflags);
++out:
++      vxdprintk(VXD_CBIT(net, 0),
++              "v4_addr_in_nx_info(%p[#%u]," NIPQUAD_FMT ",%04x) = %d",
++              nxi, nxi ? nxi->nx_id : 0, NIPQUAD(addr), tmask, ret);
++      return ret;
++}
 +
 +
-+#endif        /* CONFIG_IA32_EMULATION */
++static inline
++int v4_nx_addr_match(struct nx_addr_v4 *nxa, struct nx_addr_v4 *addr, uint16_t mask)
++{
++      /* FIXME: needs full range checks */
++      return v4_addr_match(nxa, addr->ip[0].s_addr, mask);
++}
 +
 +
-+#endif        /* _VSERVER_LIMIT_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/limit_def.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/limit_def.h
---- linux-4.4.116/include/linux/vserver/limit_def.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/limit_def.h  2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,47 @@
-+#ifndef _VSERVER_LIMIT_DEF_H
-+#define _VSERVER_LIMIT_DEF_H
++static inline
++int v4_nx_addr_in_nx_info(struct nx_info *nxi, struct nx_addr_v4 *nxa, uint16_t mask)
++{
++      struct nx_addr_v4 *ptr;
++      unsigned long irqflags;
++      int ret = 1;
 +
 +
-+#include <asm/atomic.h>
-+#include <asm/resource.h>
++      spin_lock_irqsave(&nxi->addr_lock, irqflags);
++      for (ptr = &nxi->v4; ptr; ptr = ptr->next)
++              if (v4_nx_addr_match(ptr, nxa, mask))
++                      goto out_unlock;
++      ret = 0;
++out_unlock:
++      spin_unlock_irqrestore(&nxi->addr_lock, irqflags);
++      return ret;
++}
 +
 +
-+#include "limit.h"
++#include <net/inet_sock.h>
 +
 +
++/*
++ *    Check if a given address matches for a socket
++ *
++ *    nxi:            the socket's nx_info if any
++ *    addr:           to be verified address
++ */
++static inline
++int v4_sock_addr_match (
++      struct nx_info *nxi,
++      struct inet_sock *inet,
++      __be32 addr)
++{
++      __be32 saddr = inet->inet_rcv_saddr;
++      __be32 bcast = nxi ? nxi->v4_bcast.s_addr : INADDR_BROADCAST;
 +
 +
-+struct _vx_res_limit {
-+      rlim_t soft;            /* Context soft limit */
-+      rlim_t hard;            /* Context hard limit */
++      if (addr && (saddr == addr || bcast == addr))
++              return 1;
++      if (!saddr)
++              return v4_addr_in_nx_info(nxi, addr, NXA_MASK_BIND);
++      return 0;
++}
 +
 +
-+      rlim_atomic_t rcur;     /* Current value */
-+      rlim_t rmin;            /* Context minimum */
-+      rlim_t rmax;            /* Context maximum */
 +
 +
-+      atomic_t lhit;          /* Limit hits */
-+};
++/* inet related checks and helpers */
 +
 +
-+/* context sub struct */
 +
 +
-+struct _vx_limit {
-+      struct _vx_res_limit res[NUM_LIMITS];
-+};
++struct in_ifaddr;
++struct net_device;
++struct sock;
 +
 +
-+#ifdef CONFIG_VSERVER_DEBUG
++#ifdef CONFIG_INET
 +
 +
-+static inline void __dump_vx_limit(struct _vx_limit *limit)
++#include <linux/netdevice.h>
++#include <linux/inetdevice.h>
++#include <net/inet_sock.h>
++#include <net/inet_timewait_sock.h>
++
++
++int dev_in_nx_info(struct net_device *, struct nx_info *);
++int v4_dev_in_nx_info(struct net_device *, struct nx_info *);
++int nx_v4_addr_conflict(struct nx_info *, struct nx_info *);
++
++
++/*
++ *    check if address is covered by socket
++ *
++ *    sk:     the socket to check against
++ *    addr:   the address in question (must be != 0)
++ */
++
++static inline
++int __v4_addr_match_socket(const struct sock *sk, struct nx_addr_v4 *nxa)
 +{
 +{
-+      int i;
++      struct nx_info *nxi = sk->sk_nx_info;
++      __be32 saddr = sk->sk_rcv_saddr;
 +
 +
-+      printk("\t_vx_limit:");
-+      for (i = 0; i < NUM_LIMITS; i++) {
-+              printk("\t [%2d] = %8lu %8lu/%8lu, %8ld/%8ld, %8d\n",
-+                      i, (unsigned long)__rlim_get(limit, i),
-+                      (unsigned long)__rlim_rmin(limit, i),
-+                      (unsigned long)__rlim_rmax(limit, i),
-+                      (long)__rlim_soft(limit, i),
-+                      (long)__rlim_hard(limit, i),
-+                      atomic_read(&__rlim_lhit(limit, i)));
++      vxdprintk(VXD_CBIT(net, 5),
++              "__v4_addr_in_socket(%p," NXAV4_FMT ") %p:" NIPQUAD_FMT " %p;%lx",
++              sk, NXAV4(nxa), nxi, NIPQUAD(saddr), sk->sk_socket,
++              (sk->sk_socket?sk->sk_socket->flags:0));
++
++      if (saddr) {            /* direct address match */
++              return v4_addr_match(nxa, saddr, -1);
++      } else if (nxi) {       /* match against nx_info */
++              return v4_nx_addr_in_nx_info(nxi, nxa, -1);
++      } else {                /* unrestricted any socket */
++              return 1;
 +      }
 +}
 +
 +      }
 +}
 +
-+#endif
-+
-+#endif        /* _VSERVER_LIMIT_DEF_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/limit_int.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/limit_int.h
---- linux-4.4.116/include/linux/vserver/limit_int.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/limit_int.h  2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,193 @@
-+#ifndef _VSERVER_LIMIT_INT_H
-+#define _VSERVER_LIMIT_INT_H
-+
-+#define VXD_RCRES_COND(r)     VXD_CBIT(cres, r)
-+#define VXD_RLIMIT_COND(r)    VXD_CBIT(limit, r)
 +
 +
-+extern const char *vlimit_name[NUM_LIMITS];
 +
 +
-+static inline void __vx_acc_cres(struct vx_info *vxi,
-+      int res, int dir, void *_data, char *_file, int _line)
++static inline
++int nx_dev_visible(struct nx_info *nxi, struct net_device *dev)
 +{
 +{
-+      if (VXD_RCRES_COND(res))
-+              vxlprintk(1, "vx_acc_cres[%5d,%s,%2d]: %5ld%s (%p)",
-+                      (vxi ? vxi->vx_id : -1), vlimit_name[res], res,
-+                      (vxi ? (long)__rlim_get(&vxi->limit, res) : 0),
-+                      (dir > 0) ? "++" : "--", _data, _file, _line);
-+      if (!vxi)
-+              return;
++      vxdprintk(VXD_CBIT(net, 1),
++              "nx_dev_visible(%p[#%u],%p " VS_Q("%s") ") %d",
++              nxi, nxi ? nxi->nx_id : 0, dev, dev->name,
++              nxi ? dev_in_nx_info(dev, nxi) : 0);
 +
 +
-+      if (dir > 0)
-+              __rlim_inc(&vxi->limit, res);
-+      else
-+              __rlim_dec(&vxi->limit, res);
++      if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0))
++              return 1;
++      if (dev_in_nx_info(dev, nxi))
++              return 1;
++      return 0;
 +}
 +
 +}
 +
-+static inline void __vx_add_cres(struct vx_info *vxi,
-+      int res, int amount, void *_data, char *_file, int _line)
++
++static inline
++int v4_ifa_in_nx_info(struct in_ifaddr *ifa, struct nx_info *nxi)
 +{
 +{
-+      if (VXD_RCRES_COND(res))
-+              vxlprintk(1, "vx_add_cres[%5d,%s,%2d]: %5ld += %5d (%p)",
-+                      (vxi ? vxi->vx_id : -1), vlimit_name[res], res,
-+                      (vxi ? (long)__rlim_get(&vxi->limit, res) : 0),
-+                      amount, _data, _file, _line);
-+      if (amount == 0)
-+              return;
-+      if (!vxi)
-+              return;
-+      __rlim_add(&vxi->limit, res, amount);
++      if (!nxi)
++              return 1;
++      if (!ifa)
++              return 0;
++      return v4_addr_in_nx_info(nxi, ifa->ifa_local, NXA_MASK_SHOW);
 +}
 +
 +static inline
 +}
 +
 +static inline
-+int __vx_cres_adjust_max(struct _vx_limit *limit, int res, rlim_t value)
++int nx_v4_ifa_visible(struct nx_info *nxi, struct in_ifaddr *ifa)
 +{
 +{
-+      int cond = (value > __rlim_rmax(limit, res));
++      vxdprintk(VXD_CBIT(net, 1), "nx_v4_ifa_visible(%p[#%u],%p) %d",
++              nxi, nxi ? nxi->nx_id : 0, ifa,
++              nxi ? v4_ifa_in_nx_info(ifa, nxi) : 0);
 +
 +
-+      if (cond)
-+              __rlim_rmax(limit, res) = value;
-+      return cond;
++      if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0))
++              return 1;
++      if (v4_ifa_in_nx_info(ifa, nxi))
++              return 1;
++      return 0;
 +}
 +
 +}
 +
++
++struct nx_v4_sock_addr {
++      __be32 saddr;   /* Address used for validation */
++      __be32 baddr;   /* Address used for socket bind */
++};
++
 +static inline
 +static inline
-+int __vx_cres_adjust_min(struct _vx_limit *limit, int res, rlim_t value)
++int v4_map_sock_addr(struct inet_sock *inet, struct sockaddr_in *addr,
++      struct nx_v4_sock_addr *nsa)
 +{
 +{
-+      int cond = (value < __rlim_rmin(limit, res));
++      struct sock *sk = &inet->sk;
++      struct nx_info *nxi = sk->sk_nx_info;
++      __be32 saddr = addr->sin_addr.s_addr;
++      __be32 baddr = saddr;
 +
 +
-+      if (cond)
-+              __rlim_rmin(limit, res) = value;
-+      return cond;
++      vxdprintk(VXD_CBIT(net, 3),
++              "inet_bind(%p)* %p,%p;%lx " NIPQUAD_FMT,
++              sk, sk->sk_nx_info, sk->sk_socket,
++              (sk->sk_socket ? sk->sk_socket->flags : 0),
++              NIPQUAD(saddr));
++
++      if (nxi) {
++              if (saddr == INADDR_ANY) {
++                      if (nx_info_flags(nxi, NXF_SINGLE_IP, 0))
++                              baddr = nxi->v4.ip[0].s_addr;
++              } else if (saddr == IPI_LOOPBACK) {
++                      if (nx_info_flags(nxi, NXF_LBACK_REMAP, 0))
++                              baddr = nxi->v4_lback.s_addr;
++              } else if (!ipv4_is_multicast(saddr) ||
++                      !nx_info_ncaps(nxi, NXC_MULTICAST)) {
++                      /* normal address bind */
++                      if (!v4_addr_in_nx_info(nxi, saddr, NXA_MASK_BIND))
++                              return -EADDRNOTAVAIL;
++              }
++      }
++
++      vxdprintk(VXD_CBIT(net, 3),
++              "inet_bind(%p) " NIPQUAD_FMT ", " NIPQUAD_FMT,
++              sk, NIPQUAD(saddr), NIPQUAD(baddr));
++
++      nsa->saddr = saddr;
++      nsa->baddr = baddr;
++      return 0;
 +}
 +
 +static inline
 +}
 +
 +static inline
-+void __vx_cres_fixup(struct _vx_limit *limit, int res, rlim_t value)
++void v4_set_sock_addr(struct inet_sock *inet, struct nx_v4_sock_addr *nsa)
 +{
 +{
-+      if (!__vx_cres_adjust_max(limit, res, value))
-+              __vx_cres_adjust_min(limit, res, value);
++      inet->inet_saddr = nsa->baddr;
++      inet->inet_rcv_saddr = nsa->baddr;
 +}
 +
 +
 +}
 +
 +
-+/*    return values:
-+       +1 ... no limit hit
-+       -1 ... over soft limit
-+        0 ... over hard limit         */
-+
-+static inline int __vx_cres_avail(struct vx_info *vxi,
-+      int res, int num, char *_file, int _line)
++/*
++ *      helper to simplify inet_lookup_listener
++ *
++ *      nxi:  the socket's nx_info if any
++ *      addr: to be verified address
++ *      saddr:        socket address
++ */
++static inline int v4_inet_addr_match (
++      struct nx_info *nxi,
++      __be32 addr,
++      __be32 saddr)
 +{
 +{
-+      struct _vx_limit *limit;
-+      rlim_t value;
-+
-+      if (VXD_RLIMIT_COND(res))
-+              vxlprintk(1, "vx_cres_avail[%5d,%s,%2d]: %5ld/%5ld > %5ld + %5d",
-+                      (vxi ? vxi->vx_id : -1), vlimit_name[res], res,
-+                      (vxi ? (long)__rlim_soft(&vxi->limit, res) : -1),
-+                      (vxi ? (long)__rlim_hard(&vxi->limit, res) : -1),
-+                      (vxi ? (long)__rlim_get(&vxi->limit, res) : 0),
-+                      num, _file, _line);
-+      if (!vxi)
++      if (addr && (saddr == addr))
 +              return 1;
 +              return 1;
++      if (!saddr)
++              return nxi ? v4_addr_in_nx_info(nxi, addr, NXA_MASK_BIND) : 1;
++      return 0;
++}
 +
 +
-+      limit = &vxi->limit;
-+      value = __rlim_get(limit, res);
-+
-+      if (!__vx_cres_adjust_max(limit, res, value))
-+              __vx_cres_adjust_min(limit, res, value);
++static inline __be32 nx_map_sock_lback(struct nx_info *nxi, __be32 addr)
++{
++      if (nx_info_flags(nxi, NXF_HIDE_LBACK, 0) &&
++              (addr == nxi->v4_lback.s_addr))
++              return IPI_LOOPBACK;
++      return addr;
++}
 +
 +
-+      if (num == 0)
++static inline
++int nx_info_has_v4(struct nx_info *nxi)
++{
++      if (!nxi)
 +              return 1;
 +              return 1;
-+
-+      if (__rlim_soft(limit, res) == RLIM_INFINITY)
-+              return -1;
-+      if (value + num <= __rlim_soft(limit, res))
-+              return -1;
-+
-+      if (__rlim_hard(limit, res) == RLIM_INFINITY)
++      if (NX_IPV4(nxi))
 +              return 1;
 +              return 1;
-+      if (value + num <= __rlim_hard(limit, res))
++      if (nx_info_flags(nxi, NXF_LBACK_REMAP, 0))
 +              return 1;
 +              return 1;
-+
-+      __rlim_hit(limit, res);
 +      return 0;
 +}
 +
 +      return 0;
 +}
 +
++#else /* CONFIG_INET */
 +
 +
-+static const int VLA_RSS[] = { RLIMIT_RSS, VLIMIT_ANON, VLIMIT_MAPPED, 0 };
++static inline
++int nx_dev_visible(struct nx_info *n, struct net_device *d)
++{
++      return 1;
++}
 +
 +static inline
 +
 +static inline
-+rlim_t __vx_cres_array_sum(struct _vx_limit *limit, const int *array)
++int nx_v4_addr_conflict(struct nx_info *n, uint32_t a, const struct sock *s)
 +{
 +{
-+      rlim_t value, sum = 0;
-+      int res;
++      return 1;
++}
 +
 +
-+      while ((res = *array++)) {
-+              value = __rlim_get(limit, res);
-+              __vx_cres_fixup(limit, res, value);
-+              sum += value;
-+      }
-+      return sum;
++static inline
++int v4_ifa_in_nx_info(struct in_ifaddr *a, struct nx_info *n)
++{
++      return 1;
 +}
 +
 +static inline
 +}
 +
 +static inline
-+rlim_t __vx_cres_array_fixup(struct _vx_limit *limit, const int *array)
++int nx_info_has_v4(struct nx_info *nxi)
 +{
 +{
-+      rlim_t value = __vx_cres_array_sum(limit, array + 1);
-+      int res = *array;
++      return 0;
++}
 +
 +
-+      if (value == __rlim_get(limit, res))
-+              return value;
++#endif /* CONFIG_INET */
 +
 +
-+      __rlim_set(limit, res, value);
-+      /* now adjust min/max */
-+      if (!__vx_cres_adjust_max(limit, res, value))
-+              __vx_cres_adjust_min(limit, res, value);
++#define current_nx_info_has_v4() \
++      nx_info_has_v4(current_nx_info())
 +
 +
-+      return value;
-+}
++#else
++// #warning duplicate inclusion
++#endif
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_limit.h linux-4.4.197-vs2.3.9.8/include/linux/vs_limit.h
+--- linux-4.4.197/include/linux/vs_limit.h     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_limit.h   2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,140 @@
++#ifndef _VS_LIMIT_H
++#define _VS_LIMIT_H
 +
 +
-+static inline int __vx_cres_array_avail(struct vx_info *vxi,
-+      const int *array, int num, char *_file, int _line)
-+{
-+      struct _vx_limit *limit;
-+      rlim_t value = 0;
-+      int res;
++#include "vserver/limit.h"
++#include "vserver/base.h"
++#include "vserver/context.h"
++#include "vserver/debug.h"
++#include "vserver/context.h"
++#include "vserver/limit_int.h"
 +
 +
-+      if (num == 0)
-+              return 1;
-+      if (!vxi)
-+              return 1;
 +
 +
-+      limit = &vxi->limit;
-+      res = *array;
-+      value = __vx_cres_array_sum(limit, array + 1);
++#define vx_acc_cres(v, d, p, r) \
++      __vx_acc_cres(v, r, d, p, __FILE__, __LINE__)
 +
 +
-+      __rlim_set(limit, res, value);
-+      __vx_cres_fixup(limit, res, value);
++#define vx_acc_cres_cond(x, d, p, r) \
++      __vx_acc_cres(((x) == vx_current_xid()) ? current_vx_info() : 0, \
++      r, d, p, __FILE__, __LINE__)
 +
 +
-+      return __vx_cres_avail(vxi, res, num, _file, _line);
-+}
 +
 +
++#define vx_add_cres(v, a, p, r) \
++      __vx_add_cres(v, r, a, p, __FILE__, __LINE__)
++#define vx_sub_cres(v, a, p, r)               vx_add_cres(v, -(a), p, r)
 +
 +
-+static inline void vx_limit_fixup(struct _vx_limit *limit, int id)
-+{
-+      rlim_t value;
-+      int res;
++#define vx_add_cres_cond(x, a, p, r) \
++      __vx_add_cres(((x) == vx_current_xid()) ? current_vx_info() : 0, \
++      r, a, p, __FILE__, __LINE__)
++#define vx_sub_cres_cond(x, a, p, r)  vx_add_cres_cond(x, -(a), p, r)
 +
 +
-+      /* complex resources first */
-+      if ((id < 0) || (id == RLIMIT_RSS))
-+              __vx_cres_array_fixup(limit, VLA_RSS);
 +
 +
-+      for (res = 0; res < NUM_LIMITS; res++) {
-+              if ((id > 0) && (res != id))
-+                      continue;
++/* process and file limits */
 +
 +
-+              value = __rlim_get(limit, res);
-+              __vx_cres_fixup(limit, res, value);
++#define vx_nproc_inc(p) \
++      vx_acc_cres((p)->vx_info, 1, p, RLIMIT_NPROC)
 +
 +
-+              /* not supposed to happen, maybe warn? */
-+              if (__rlim_rmax(limit, res) > __rlim_hard(limit, res))
-+                      __rlim_rmax(limit, res) = __rlim_hard(limit, res);
-+      }
-+}
++#define vx_nproc_dec(p) \
++      vx_acc_cres((p)->vx_info,-1, p, RLIMIT_NPROC)
 +
 +
++#define vx_files_inc(f) \
++      vx_acc_cres_cond((f)->f_xid, 1, f, RLIMIT_NOFILE)
 +
 +
-+#endif        /* _VSERVER_LIMIT_INT_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/monitor.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/monitor.h
---- linux-4.4.116/include/linux/vserver/monitor.h      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/monitor.h    2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,6 @@
-+#ifndef _VSERVER_MONITOR_H
-+#define _VSERVER_MONITOR_H
++#define vx_files_dec(f) \
++      vx_acc_cres_cond((f)->f_xid,-1, f, RLIMIT_NOFILE)
 +
 +
-+#include <uapi/vserver/monitor.h>
++#define vx_locks_inc(l) \
++      vx_acc_cres_cond((l)->fl_xid, 1, l, RLIMIT_LOCKS)
 +
 +
-+#endif /* _VSERVER_MONITOR_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/network.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/network.h
---- linux-4.4.116/include/linux/vserver/network.h      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/network.h    2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,76 @@
-+#ifndef _VSERVER_NETWORK_H
-+#define _VSERVER_NETWORK_H
++#define vx_locks_dec(l) \
++      vx_acc_cres_cond((l)->fl_xid,-1, l, RLIMIT_LOCKS)
 +
 +
++#define vx_openfd_inc(f) \
++      vx_acc_cres(current_vx_info(), 1, (void *)(long)(f), VLIMIT_OPENFD)
 +
 +
-+#include <linux/list.h>
-+#include <linux/spinlock.h>
-+#include <linux/rcupdate.h>
-+#include <linux/in.h>
-+#include <linux/in6.h>
-+#include <asm/atomic.h>
-+#include <uapi/vserver/network.h>
++#define vx_openfd_dec(f) \
++      vx_acc_cres(current_vx_info(),-1, (void *)(long)(f), VLIMIT_OPENFD)
 +
 +
-+struct nx_addr_v4 {
-+      struct nx_addr_v4 *next;
-+      struct in_addr ip[2];
-+      struct in_addr mask;
-+      uint16_t type;
-+      uint16_t flags;
-+};
 +
 +
-+struct nx_addr_v6 {
-+      struct nx_addr_v6 *next;
-+      struct in6_addr ip;
-+      struct in6_addr mask;
-+      uint32_t prefix;
-+      uint16_t type;
-+      uint16_t flags;
-+};
++#define vx_cres_avail(v, n, r) \
++      __vx_cres_avail(v, r, n, __FILE__, __LINE__)
 +
 +
-+struct nx_info {
-+      struct hlist_node nx_hlist;     /* linked list of nxinfos */
-+      vnid_t nx_id;                   /* vnet id */
-+      atomic_t nx_usecnt;             /* usage count */
-+      atomic_t nx_tasks;              /* tasks count */
-+      int nx_state;                   /* context state */
 +
 +
-+      uint64_t nx_flags;              /* network flag word */
-+      uint64_t nx_ncaps;              /* network capabilities */
++#define vx_nproc_avail(n) \
++      vx_cres_avail(current_vx_info(), n, RLIMIT_NPROC)
 +
 +
-+      spinlock_t addr_lock;           /* protect address changes */
-+      struct in_addr v4_lback;        /* Loopback address */
-+      struct in_addr v4_bcast;        /* Broadcast address */
-+      struct nx_addr_v4 v4;           /* First/Single ipv4 address */
-+#ifdef        CONFIG_IPV6
-+      struct nx_addr_v6 v6;           /* First/Single ipv6 address */
-+#endif
-+      char nx_name[65];               /* network context name */
-+};
++#define vx_files_avail(n) \
++      vx_cres_avail(current_vx_info(), n, RLIMIT_NOFILE)
 +
 +
++#define vx_locks_avail(n) \
++      vx_cres_avail(current_vx_info(), n, RLIMIT_LOCKS)
 +
 +
-+/* status flags */
++#define vx_openfd_avail(n) \
++      vx_cres_avail(current_vx_info(), n, VLIMIT_OPENFD)
 +
 +
-+#define NXS_HASHED      0x0001
-+#define NXS_SHUTDOWN    0x0100
-+#define NXS_RELEASED    0x8000
 +
 +
-+extern struct nx_info *lookup_nx_info(int);
++/* dentry limits */
 +
 +
-+extern int get_nid_list(int, unsigned int *, int);
-+extern int nid_is_hashed(vnid_t);
++#define vx_dentry_inc(d) do {                                         \
++      if (d_count(d) == 1)                                            \
++              vx_acc_cres(current_vx_info(), 1, d, VLIMIT_DENTRY);    \
++      } while (0)
 +
 +
-+extern int nx_migrate_task(struct task_struct *, struct nx_info *);
++#define vx_dentry_dec(d) do {                                         \
++      if (d_count(d) == 0)                                            \
++              vx_acc_cres(current_vx_info(),-1, d, VLIMIT_DENTRY);    \
++      } while (0)
 +
 +
-+extern long vs_net_change(struct nx_info *, unsigned int);
++#define vx_dentry_avail(n) \
++      vx_cres_avail(current_vx_info(), n, VLIMIT_DENTRY)
 +
 +
-+struct sock;
 +
 +
++/* socket limits */
 +
 +
-+#define NX_IPV4(n)    ((n)->v4.type != NXA_TYPE_NONE)
-+#ifdef  CONFIG_IPV6
-+#define NX_IPV6(n)    ((n)->v6.type != NXA_TYPE_NONE)
-+#else
-+#define NX_IPV6(n)    (0)
-+#endif
++#define vx_sock_inc(s) \
++      vx_acc_cres((s)->sk_vx_info, 1, s, VLIMIT_NSOCK)
 +
 +
-+#endif        /* _VSERVER_NETWORK_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/network_cmd.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/network_cmd.h
---- linux-4.4.116/include/linux/vserver/network_cmd.h  1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/network_cmd.h        2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,37 @@
-+#ifndef _VSERVER_NETWORK_CMD_H
-+#define _VSERVER_NETWORK_CMD_H
++#define vx_sock_dec(s) \
++      vx_acc_cres((s)->sk_vx_info,-1, s, VLIMIT_NSOCK)
 +
 +
-+#include <uapi/vserver/network_cmd.h>
++#define vx_sock_avail(n) \
++      vx_cres_avail(current_vx_info(), n, VLIMIT_NSOCK)
 +
 +
-+extern int vc_task_nid(uint32_t);
 +
 +
-+extern int vc_nx_info(struct nx_info *, void __user *);
++/* ipc resource limits */
 +
 +
-+extern int vc_net_create(uint32_t, void __user *);
-+extern int vc_net_migrate(struct nx_info *, void __user *);
++#define vx_ipcmsg_add(v, u, a) \
++      vx_add_cres(v, a, u, RLIMIT_MSGQUEUE)
 +
 +
-+extern int vc_net_add(struct nx_info *, void __user *);
-+extern int vc_net_remove(struct nx_info *, void __user *);
++#define vx_ipcmsg_sub(v, u, a) \
++      vx_sub_cres(v, a, u, RLIMIT_MSGQUEUE)
 +
 +
-+extern int vc_net_add_ipv4_v1(struct nx_info *, void __user *);
-+extern int vc_net_add_ipv4(struct nx_info *, void __user *);
++#define vx_ipcmsg_avail(v, a) \
++      vx_cres_avail(v, a, RLIMIT_MSGQUEUE)
 +
 +
-+extern int vc_net_rem_ipv4_v1(struct nx_info *, void __user *);
-+extern int vc_net_rem_ipv4(struct nx_info *, void __user *);
 +
 +
-+extern int vc_net_add_ipv6(struct nx_info *, void __user *);
-+extern int vc_net_remove_ipv6(struct nx_info *, void __user *);
++#define vx_ipcshm_add(v, k, a) \
++      vx_add_cres(v, a, (void *)(long)(k), VLIMIT_SHMEM)
 +
 +
-+extern int vc_add_match_ipv4(struct nx_info *, void __user *);
-+extern int vc_get_match_ipv4(struct nx_info *, void __user *);
++#define vx_ipcshm_sub(v, k, a) \
++      vx_sub_cres(v, a, (void *)(long)(k), VLIMIT_SHMEM)
 +
 +
-+extern int vc_add_match_ipv6(struct nx_info *, void __user *);
-+extern int vc_get_match_ipv6(struct nx_info *, void __user *);
++#define vx_ipcshm_avail(v, a) \
++      vx_cres_avail(v, a, VLIMIT_SHMEM)
 +
 +
-+extern int vc_get_nflags(struct nx_info *, void __user *);
-+extern int vc_set_nflags(struct nx_info *, void __user *);
 +
 +
-+extern int vc_get_ncaps(struct nx_info *, void __user *);
-+extern int vc_set_ncaps(struct nx_info *, void __user *);
++#define vx_semary_inc(a) \
++      vx_acc_cres(current_vx_info(), 1, a, VLIMIT_SEMARY)
 +
 +
-+#endif        /* _VSERVER_CONTEXT_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/percpu.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/percpu.h
---- linux-4.4.116/include/linux/vserver/percpu.h       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/percpu.h     2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,14 @@
-+#ifndef _VSERVER_PERCPU_H
-+#define _VSERVER_PERCPU_H
++#define vx_semary_dec(a) \
++      vx_acc_cres(current_vx_info(), -1, a, VLIMIT_SEMARY)
 +
 +
-+#include "cvirt_def.h"
-+#include "sched_def.h"
 +
 +
-+struct        _vx_percpu {
-+      struct _vx_cvirt_pc cvirt;
-+      struct _vx_sched_pc sched;
-+};
++#define vx_nsems_add(a,n) \
++      vx_add_cres(current_vx_info(), n, a, VLIMIT_NSEMS)
 +
 +
-+#define       PERCPU_PERCTX   (sizeof(struct _vx_percpu))
++#define vx_nsems_sub(a,n) \
++      vx_sub_cres(current_vx_info(), n, a, VLIMIT_NSEMS)
 +
 +
-+#endif        /* _VSERVER_PERCPU_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/pid.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/pid.h
---- linux-4.4.116/include/linux/vserver/pid.h  1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/pid.h        2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,51 @@
-+#ifndef _VSERVER_PID_H
-+#define _VSERVER_PID_H
 +
 +
-+/* pid faking stuff */
++#else
++#warning duplicate inclusion
++#endif
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_network.h linux-4.4.197-vs2.3.9.8/include/linux/vs_network.h
+--- linux-4.4.197/include/linux/vs_network.h   1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_network.h 2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,169 @@
++#ifndef _NX_VS_NETWORK_H
++#define _NX_VS_NETWORK_H
 +
 +
-+#define vx_info_map_pid(v, p) \
-+      __vx_info_map_pid((v), (p), __func__, __FILE__, __LINE__)
-+#define vx_info_map_tgid(v,p)  vx_info_map_pid(v,p)
-+#define vx_map_pid(p) vx_info_map_pid(current_vx_info(), p)
-+#define vx_map_tgid(p) vx_map_pid(p)
++#include "vserver/context.h"
++#include "vserver/network.h"
++#include "vserver/base.h"
++#include "vserver/check.h"
++#include "vserver/debug.h"
 +
 +
-+static inline int __vx_info_map_pid(struct vx_info *vxi, int pid,
-+      const char *func, const char *file, int line)
-+{
-+      if (vx_info_flags(vxi, VXF_INFO_INIT, 0)) {
-+              vxfprintk(VXD_CBIT(cvirt, 2),
-+                      "vx_map_tgid: %p/%llx: %d -> %d",
-+                      vxi, (long long)vxi->vx_flags, pid,
-+                      (pid && pid == vxi->vx_initpid) ? 1 : pid,
-+                      func, file, line);
-+              if (pid == 0)
-+                      return 0;
-+              if (pid == vxi->vx_initpid)
-+                      return 1;
-+      }
-+      return pid;
-+}
++#include <linux/sched.h>
 +
 +
-+#define vx_info_rmap_pid(v, p) \
-+      __vx_info_rmap_pid((v), (p), __func__, __FILE__, __LINE__)
-+#define vx_rmap_pid(p) vx_info_rmap_pid(current_vx_info(), p)
-+#define vx_rmap_tgid(p) vx_rmap_pid(p)
 +
 +
-+static inline int __vx_info_rmap_pid(struct vx_info *vxi, int pid,
-+      const char *func, const char *file, int line)
++#define get_nx_info(i) __get_nx_info(i, __FILE__, __LINE__)
++
++static inline struct nx_info *__get_nx_info(struct nx_info *nxi,
++      const char *_file, int _line)
 +{
 +{
-+      if (vx_info_flags(vxi, VXF_INFO_INIT, 0)) {
-+              vxfprintk(VXD_CBIT(cvirt, 2),
-+                      "vx_rmap_tgid: %p/%llx: %d -> %d",
-+                      vxi, (long long)vxi->vx_flags, pid,
-+                      (pid == 1) ? vxi->vx_initpid : pid,
-+                      func, file, line);
-+              if ((pid == 1) && vxi->vx_initpid)
-+                      return vxi->vx_initpid;
-+              if (pid == vxi->vx_initpid)
-+                      return ~0U;
-+      }
-+      return pid;
-+}
++      if (!nxi)
++              return NULL;
 +
 +
-+#endif
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/sched.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/sched.h
---- linux-4.4.116/include/linux/vserver/sched.h        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/sched.h      2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,23 @@
-+#ifndef _VSERVER_SCHED_H
-+#define _VSERVER_SCHED_H
++      vxlprintk(VXD_CBIT(nid, 2), "get_nx_info(%p[#%d.%d])",
++              nxi, nxi ? nxi->nx_id : 0,
++              nxi ? atomic_read(&nxi->nx_usecnt) : 0,
++              _file, _line);
 +
 +
++      atomic_inc(&nxi->nx_usecnt);
++      return nxi;
++}
 +
 +
-+#ifdef        __KERNEL__
 +
 +
-+struct timespec;
++extern void free_nx_info(struct nx_info *);
 +
 +
-+void vx_vsi_uptime(struct timespec *, struct timespec *);
++#define put_nx_info(i) __put_nx_info(i, __FILE__, __LINE__)
 +
 +
++static inline void __put_nx_info(struct nx_info *nxi, const char *_file, int _line)
++{
++      if (!nxi)
++              return;
 +
 +
-+struct vx_info;
++      vxlprintk(VXD_CBIT(nid, 2), "put_nx_info(%p[#%d.%d])",
++              nxi, nxi ? nxi->nx_id : 0,
++              nxi ? atomic_read(&nxi->nx_usecnt) : 0,
++              _file, _line);
 +
 +
-+void vx_update_load(struct vx_info *);
++      if (atomic_dec_and_test(&nxi->nx_usecnt))
++              free_nx_info(nxi);
++}
 +
 +
 +
 +
-+void vx_update_sched_param(struct _vx_sched *sched,
-+      struct _vx_sched_pc *sched_pc);
++#define init_nx_info(p, i) __init_nx_info(p, i, __FILE__, __LINE__)
 +
 +
-+#endif        /* __KERNEL__ */
-+#else /* _VSERVER_SCHED_H */
-+#warning duplicate inclusion
-+#endif        /* _VSERVER_SCHED_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/sched_cmd.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/sched_cmd.h
---- linux-4.4.116/include/linux/vserver/sched_cmd.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/sched_cmd.h  2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,11 @@
-+#ifndef _VSERVER_SCHED_CMD_H
-+#define _VSERVER_SCHED_CMD_H
++static inline void __init_nx_info(struct nx_info **nxp, struct nx_info *nxi,
++              const char *_file, int _line)
++{
++      if (nxi) {
++              vxlprintk(VXD_CBIT(nid, 3),
++                      "init_nx_info(%p[#%d.%d])",
++                      nxi, nxi ? nxi->nx_id : 0,
++                      nxi ? atomic_read(&nxi->nx_usecnt) : 0,
++                      _file, _line);
 +
 +
++              atomic_inc(&nxi->nx_usecnt);
++      }
++      *nxp = nxi;
++}
 +
 +
-+#include <linux/compiler.h>
-+#include <uapi/vserver/sched_cmd.h>
 +
 +
-+extern int vc_set_prio_bias(struct vx_info *, void __user *);
-+extern int vc_get_prio_bias(struct vx_info *, void __user *);
++#define set_nx_info(p, i) __set_nx_info(p, i, __FILE__, __LINE__)
 +
 +
-+#endif        /* _VSERVER_SCHED_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/sched_def.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/sched_def.h
---- linux-4.4.116/include/linux/vserver/sched_def.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/sched_def.h  2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,38 @@
-+#ifndef _VSERVER_SCHED_DEF_H
-+#define _VSERVER_SCHED_DEF_H
++static inline void __set_nx_info(struct nx_info **nxp, struct nx_info *nxi,
++      const char *_file, int _line)
++{
++      struct nx_info *nxo;
 +
 +
-+#include <linux/spinlock.h>
-+#include <linux/jiffies.h>
-+#include <linux/cpumask.h>
-+#include <asm/atomic.h>
-+#include <asm/param.h>
++      if (!nxi)
++              return;
 +
 +
++      vxlprintk(VXD_CBIT(nid, 3), "set_nx_info(%p[#%d.%d])",
++              nxi, nxi ? nxi->nx_id : 0,
++              nxi ? atomic_read(&nxi->nx_usecnt) : 0,
++              _file, _line);
 +
 +
-+/* context sub struct */
++      atomic_inc(&nxi->nx_usecnt);
++      nxo = xchg(nxp, nxi);
++      BUG_ON(nxo);
++}
 +
 +
-+struct _vx_sched {
-+      int prio_bias;                  /* bias offset for priority */
++#define clr_nx_info(p) __clr_nx_info(p, __FILE__, __LINE__)
 +
 +
-+      cpumask_t update;               /* CPUs which should update */
-+};
++static inline void __clr_nx_info(struct nx_info **nxp,
++      const char *_file, int _line)
++{
++      struct nx_info *nxo;
 +
 +
-+struct _vx_sched_pc {
-+      int prio_bias;                  /* bias offset for priority */
++      nxo = xchg(nxp, NULL);
++      if (!nxo)
++              return;
 +
 +
-+      uint64_t user_ticks;            /* token tick events */
-+      uint64_t sys_ticks;             /* token tick events */
-+      uint64_t hold_ticks;            /* token ticks paused */
-+};
++      vxlprintk(VXD_CBIT(nid, 3), "clr_nx_info(%p[#%d.%d])",
++              nxo, nxo ? nxo->nx_id : 0,
++              nxo ? atomic_read(&nxo->nx_usecnt) : 0,
++              _file, _line);
++
++      if (atomic_dec_and_test(&nxo->nx_usecnt))
++              free_nx_info(nxo);
++}
 +
 +
 +
 +
-+#ifdef CONFIG_VSERVER_DEBUG
++#define claim_nx_info(v, p) __claim_nx_info(v, p, __FILE__, __LINE__)
 +
 +
-+static inline void __dump_vx_sched(struct _vx_sched *sched)
++static inline void __claim_nx_info(struct nx_info *nxi,
++      struct task_struct *task, const char *_file, int _line)
 +{
 +{
-+      printk("\t_vx_sched:\n");
-+      printk("\t priority = %4d\n", sched->prio_bias);
++      vxlprintk(VXD_CBIT(nid, 3), "claim_nx_info(%p[#%d.%d.%d]) %p",
++              nxi, nxi ? nxi->nx_id : 0,
++              nxi?atomic_read(&nxi->nx_usecnt):0,
++              nxi?atomic_read(&nxi->nx_tasks):0,
++              task, _file, _line);
++
++      atomic_inc(&nxi->nx_tasks);
 +}
 +
 +}
 +
-+#endif
 +
 +
-+#endif        /* _VSERVER_SCHED_DEF_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/signal.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/signal.h
---- linux-4.4.116/include/linux/vserver/signal.h       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/signal.h     2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,14 @@
-+#ifndef _VSERVER_SIGNAL_H
-+#define _VSERVER_SIGNAL_H
++extern void unhash_nx_info(struct nx_info *);
 +
 +
++#define release_nx_info(v, p) __release_nx_info(v, p, __FILE__, __LINE__)
 +
 +
-+#ifdef        __KERNEL__
++static inline void __release_nx_info(struct nx_info *nxi,
++      struct task_struct *task, const char *_file, int _line)
++{
++      vxlprintk(VXD_CBIT(nid, 3), "release_nx_info(%p[#%d.%d.%d]) %p",
++              nxi, nxi ? nxi->nx_id : 0,
++              nxi ? atomic_read(&nxi->nx_usecnt) : 0,
++              nxi ? atomic_read(&nxi->nx_tasks) : 0,
++              task, _file, _line);
 +
 +
-+struct vx_info;
++      might_sleep();
 +
 +
-+int vx_info_kill(struct vx_info *, int, int);
++      if (atomic_dec_and_test(&nxi->nx_tasks))
++              unhash_nx_info(nxi);
++}
 +
 +
-+#endif        /* __KERNEL__ */
-+#else /* _VSERVER_SIGNAL_H */
-+#warning duplicate inclusion
-+#endif        /* _VSERVER_SIGNAL_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/signal_cmd.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/signal_cmd.h
---- linux-4.4.116/include/linux/vserver/signal_cmd.h   1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/signal_cmd.h 2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,14 @@
-+#ifndef _VSERVER_SIGNAL_CMD_H
-+#define _VSERVER_SIGNAL_CMD_H
 +
 +
-+#include <uapi/vserver/signal_cmd.h>
++#define task_get_nx_info(i)   __task_get_nx_info(i, __FILE__, __LINE__)
 +
 +
++static __inline__ struct nx_info *__task_get_nx_info(struct task_struct *p,
++      const char *_file, int _line)
++{
++      struct nx_info *nxi;
 +
 +
-+extern int vc_ctx_kill(struct vx_info *, void __user *);
-+extern int vc_wait_exit(struct vx_info *, void __user *);
++      task_lock(p);
++      vxlprintk(VXD_CBIT(nid, 5), "task_get_nx_info(%p)",
++              p, _file, _line);
++      nxi = __get_nx_info(p->nx_info, _file, _line);
++      task_unlock(p);
++      return nxi;
++}
 +
 +
 +
 +
-+extern int vc_get_pflags(uint32_t pid, void __user *);
-+extern int vc_set_pflags(uint32_t pid, void __user *);
++static inline void exit_nx_info(struct task_struct *p)
++{
++      if (p->nx_info)
++              release_nx_info(p->nx_info, p);
++}
 +
 +
-+#endif        /* _VSERVER_SIGNAL_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/space.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/space.h
---- linux-4.4.116/include/linux/vserver/space.h        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/space.h      2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,12 @@
-+#ifndef _VSERVER_SPACE_H
-+#define _VSERVER_SPACE_H
 +
 +
-+#include <linux/types.h>
++#else
++#warning duplicate inclusion
++#endif
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_pid.h linux-4.4.197-vs2.3.9.8/include/linux/vs_pid.h
+--- linux-4.4.197/include/linux/vs_pid.h       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_pid.h     2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,50 @@
++#ifndef _VS_PID_H
++#define _VS_PID_H
 +
 +
-+struct vx_info;
++#include "vserver/base.h"
++#include "vserver/check.h"
++#include "vserver/context.h"
++#include "vserver/debug.h"
++#include "vserver/pid.h"
++#include <linux/pid_namespace.h>
 +
 +
-+int vx_set_space(struct vx_info *vxi, unsigned long mask, unsigned index);
 +
 +
-+#else /* _VSERVER_SPACE_H */
-+#warning duplicate inclusion
-+#endif        /* _VSERVER_SPACE_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/space_cmd.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/space_cmd.h
---- linux-4.4.116/include/linux/vserver/space_cmd.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/space_cmd.h  2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,13 @@
-+#ifndef _VSERVER_SPACE_CMD_H
-+#define _VSERVER_SPACE_CMD_H
++#define VXF_FAKE_INIT (VXF_INFO_INIT | VXF_STATE_INIT)
 +
 +
-+#include <uapi/vserver/space_cmd.h>
++static inline
++int vx_proc_task_visible(struct task_struct *task)
++{
++      if ((task->pid == 1) &&
++              !vx_flags(VXF_FAKE_INIT, VXF_FAKE_INIT))
++              /* show a blend through init */
++              goto visible;
++      if (vx_check(vx_task_xid(task), VS_WATCH | VS_IDENT))
++              goto visible;
++      return 0;
++visible:
++      return 1;
++}
 +
 +
++#define find_task_by_real_pid(pid) find_task_by_pid_ns(pid, &init_pid_ns)
 +
 +
-+extern int vc_enter_space_v1(struct vx_info *, void __user *);
-+extern int vc_set_space_v1(struct vx_info *, void __user *);
-+extern int vc_enter_space(struct vx_info *, void __user *);
-+extern int vc_set_space(struct vx_info *, void __user *);
-+extern int vc_get_space_mask(void __user *, int);
-+
-+#endif        /* _VSERVER_SPACE_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/switch.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/switch.h
---- linux-4.4.116/include/linux/vserver/switch.h       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/switch.h     2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,8 @@
-+#ifndef _VSERVER_SWITCH_H
-+#define _VSERVER_SWITCH_H
-+
-+
-+#include <linux/errno.h>
-+#include <uapi/vserver/switch.h>
-+
-+#endif        /* _VSERVER_SWITCH_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/tag.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/tag.h
---- linux-4.4.116/include/linux/vserver/tag.h  1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/tag.h        2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,160 @@
-+#ifndef _DX_TAG_H
-+#define _DX_TAG_H
-+
-+#include <linux/types.h>
-+#include <linux/uidgid.h>
 +
 +
++static inline
++struct task_struct *vx_get_proc_task(struct inode *inode, struct pid *pid)
++{
++      struct task_struct *task = get_pid_task(pid, PIDTYPE_PID);
 +
 +
-+#define DX_TAG(in)    (IS_TAGGED(in))
++      if (task && !vx_proc_task_visible(task)) {
++              vxdprintk(VXD_CBIT(misc, 6),
++                      "dropping task (get) %p[#%u,%u] for %p[#%u,%u]",
++                      task, task->xid, task->pid,
++                      current, current->xid, current->pid);
++              put_task_struct(task);
++              task = NULL;
++      }
++      return task;
++}
 +
 +
 +
 +
-+#ifdef CONFIG_TAG_NFSD
-+#define DX_TAG_NFSD   1
 +#else
 +#else
-+#define DX_TAG_NFSD   0
++#warning duplicate inclusion
 +#endif
 +#endif
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_sched.h linux-4.4.197-vs2.3.9.8/include/linux/vs_sched.h
+--- linux-4.4.197/include/linux/vs_sched.h     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_sched.h   2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,40 @@
++#ifndef _VS_SCHED_H
++#define _VS_SCHED_H
 +
 +
++#include "vserver/base.h"
++#include "vserver/context.h"
++#include "vserver/sched.h"
 +
 +
-+#ifdef CONFIG_TAGGING_NONE
-+
-+#define MAX_UID               0xFFFFFFFF
-+#define MAX_GID               0xFFFFFFFF
-+
-+#define INOTAG_TAG(cond, uid, gid, tag)       (0)
-+
-+#define TAGINO_UID(cond, uid, tag)    (uid)
-+#define TAGINO_GID(cond, gid, tag)    (gid)
-+
-+#endif
 +
 +
++#define MAX_PRIO_BIAS          20
++#define MIN_PRIO_BIAS         -20
 +
 +
-+#ifdef CONFIG_TAGGING_GID16
++static inline
++int vx_adjust_prio(struct task_struct *p, int prio, int max_user)
++{
++      struct vx_info *vxi = p->vx_info;
 +
 +
-+#define MAX_UID               0xFFFFFFFF
-+#define MAX_GID               0x0000FFFF
++      if (vxi)
++              prio += vx_cpu(vxi, sched_pc).prio_bias;
++      return prio;
++}
 +
 +
-+#define INOTAG_TAG(cond, uid, gid, tag)       \
-+      ((cond) ? (((gid) >> 16) & 0xFFFF) : 0)
++static inline void vx_account_user(struct vx_info *vxi,
++      cputime_t cputime, int nice)
++{
++      if (!vxi)
++              return;
++      vx_cpu(vxi, sched_pc).user_ticks += cputime;
++}
 +
 +
-+#define TAGINO_UID(cond, uid, tag)    (uid)
-+#define TAGINO_GID(cond, gid, tag)    \
-+      ((cond) ? (((gid) & 0xFFFF) | ((tag) << 16)) : (gid))
++static inline void vx_account_system(struct vx_info *vxi,
++      cputime_t cputime, int idle)
++{
++      if (!vxi)
++              return;
++      vx_cpu(vxi, sched_pc).sys_ticks += cputime;
++}
 +
 +
++#else
++#warning duplicate inclusion
 +#endif
 +#endif
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_socket.h linux-4.4.197-vs2.3.9.8/include/linux/vs_socket.h
+--- linux-4.4.197/include/linux/vs_socket.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_socket.h  2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,67 @@
++#ifndef _VS_SOCKET_H
++#define _VS_SOCKET_H
 +
 +
++#include "vserver/debug.h"
++#include "vserver/base.h"
++#include "vserver/cacct.h"
++#include "vserver/context.h"
++#include "vserver/tag.h"
 +
 +
-+#ifdef CONFIG_TAGGING_ID24
-+
-+#define MAX_UID               0x00FFFFFF
-+#define MAX_GID               0x00FFFFFF
-+
-+#define INOTAG_TAG(cond, uid, gid, tag)       \
-+      ((cond) ? ((((uid) >> 16) & 0xFF00) | (((gid) >> 24) & 0xFF)) : 0)
 +
 +
-+#define TAGINO_UID(cond, uid, tag)    \
-+      ((cond) ? (((uid) & 0xFFFFFF) | (((tag) & 0xFF00) << 16)) : (uid))
-+#define TAGINO_GID(cond, gid, tag)    \
-+      ((cond) ? (((gid) & 0xFFFFFF) | (((tag) & 0x00FF) << 24)) : (gid))
++/* socket accounting */
 +
 +
-+#endif
++#include <linux/socket.h>
 +
 +
++static inline int vx_sock_type(int family)
++{
++      switch (family) {
++      case PF_UNSPEC:
++              return VXA_SOCK_UNSPEC;
++      case PF_UNIX:
++              return VXA_SOCK_UNIX;
++      case PF_INET:
++              return VXA_SOCK_INET;
++      case PF_INET6:
++              return VXA_SOCK_INET6;
++      case PF_PACKET:
++              return VXA_SOCK_PACKET;
++      default:
++              return VXA_SOCK_OTHER;
++      }
++}
 +
 +
-+#ifdef CONFIG_TAGGING_UID16
++#define vx_acc_sock(v, f, p, s) \
++      __vx_acc_sock(v, f, p, s, __FILE__, __LINE__)
 +
 +
-+#define MAX_UID               0x0000FFFF
-+#define MAX_GID               0xFFFFFFFF
++static inline void __vx_acc_sock(struct vx_info *vxi,
++      int family, int pos, int size, char *file, int line)
++{
++      if (vxi) {
++              int type = vx_sock_type(family);
 +
 +
-+#define INOTAG_TAG(cond, uid, gid, tag)       \
-+      ((cond) ? (((uid) >> 16) & 0xFFFF) : 0)
++              atomic_long_inc(&vxi->cacct.sock[type][pos].count);
++              atomic_long_add(size, &vxi->cacct.sock[type][pos].total);
++      }
++}
 +
 +
-+#define TAGINO_UID(cond, uid, tag)    \
-+      ((cond) ? (((uid) & 0xFFFF) | ((tag) << 16)) : (uid))
-+#define TAGINO_GID(cond, gid, tag)    (gid)
++#define vx_sock_recv(sk, s) \
++      vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 0, s)
++#define vx_sock_send(sk, s) \
++      vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 1, s)
++#define vx_sock_fail(sk, s) \
++      vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 2, s)
 +
 +
-+#endif
 +
 +
++#define sock_vx_init(s) do {          \
++      (s)->sk_xid = 0;                \
++      (s)->sk_vx_info = NULL;         \
++      } while (0)
 +
 +
-+#ifdef CONFIG_TAGGING_INTERN
++#define sock_nx_init(s) do {          \
++      (s)->sk_nid = 0;                \
++      (s)->sk_nx_info = NULL;         \
++      } while (0)
 +
 +
-+#define MAX_UID               0xFFFFFFFF
-+#define MAX_GID               0xFFFFFFFF
++#else
++#warning duplicate inclusion
++#endif
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_tag.h linux-4.4.197-vs2.3.9.8/include/linux/vs_tag.h
+--- linux-4.4.197/include/linux/vs_tag.h       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_tag.h     2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,47 @@
++#ifndef _VS_TAG_H
++#define _VS_TAG_H
 +
 +
-+#define INOTAG_TAG(cond, uid, gid, tag)       \
-+      ((cond) ? (tag) : 0)
++#include <linux/vserver/tag.h>
 +
 +
-+#define TAGINO_UID(cond, uid, tag)    (uid)
-+#define TAGINO_GID(cond, gid, tag)    (gid)
++/* check conditions */
 +
 +
-+#endif
++#define DX_ADMIN      0x0001
++#define DX_WATCH      0x0002
++#define DX_HOSTID     0x0008
 +
 +
++#define DX_IDENT      0x0010
 +
 +
-+#ifndef CONFIG_TAGGING_NONE
-+#define dx_current_fstag(sb)  \
-+      ((sb)->s_flags & MS_TAGGED ? dx_current_tag() : 0)
-+#else
-+#define dx_current_fstag(sb)  (0)
-+#endif
++#define DX_ARG_MASK   0x0010
 +
 +
-+#ifndef CONFIG_TAGGING_INTERN
-+#define TAGINO_TAG(cond, tag) (0)
-+#else
-+#define TAGINO_TAG(cond, tag) ((cond) ? (tag) : 0)
-+#endif
 +
 +
-+#define TAGINO_KUID(cond, kuid, ktag) \
-+      KUIDT_INIT(TAGINO_UID(cond, __kuid_val(kuid), __ktag_val(ktag)))
-+#define TAGINO_KGID(cond, kgid, ktag) \
-+      KGIDT_INIT(TAGINO_GID(cond, __kgid_val(kgid), __ktag_val(ktag)))
-+#define TAGINO_KTAG(cond, ktag)               \
-+      KTAGT_INIT(TAGINO_TAG(cond, __ktag_val(ktag)))
++#define dx_task_tag(t)        ((t)->tag)
 +
 +
++#define dx_current_tag() dx_task_tag(current)
 +
 +
-+#define INOTAG_UID(cond, uid, gid)    \
-+      ((cond) ? ((uid) & MAX_UID) : (uid))
-+#define INOTAG_GID(cond, uid, gid)    \
-+      ((cond) ? ((gid) & MAX_GID) : (gid))
++#define dx_check(c, m)        __dx_check(dx_current_tag(), c, m)
 +
 +
-+#define INOTAG_KUID(cond, kuid, kgid) \
-+      KUIDT_INIT(INOTAG_UID(cond, __kuid_val(kuid), __kgid_val(kgid)))
-+#define INOTAG_KGID(cond, kuid, kgid) \
-+      KGIDT_INIT(INOTAG_GID(cond, __kuid_val(kuid), __kgid_val(kgid)))
-+#define INOTAG_KTAG(cond, kuid, kgid, ktag) \
-+      KTAGT_INIT(INOTAG_TAG(cond, \
-+              __kuid_val(kuid), __kgid_val(kgid), __ktag_val(ktag)))
++#define dx_weak_check(c, m)   ((m) ? dx_check(c, m) : 1)
 +
 +
 +
 +
-+static inline uid_t dx_map_uid(uid_t uid)
++/*
++ * check current context for ADMIN/WATCH and
++ * optionally against supplied argument
++ */
++static inline int __dx_check(vtag_t cid, vtag_t id, unsigned int mode)
 +{
 +{
-+      if ((uid > MAX_UID) && (uid != -1))
-+              uid = -2;
-+      return (uid & MAX_UID);
++      if (mode & DX_ARG_MASK) {
++              if ((mode & DX_IDENT) && (id == cid))
++                      return 1;
++      }
++      return (((mode & DX_ADMIN) && (cid == 0)) ||
++              ((mode & DX_WATCH) && (cid == 1)) ||
++              ((mode & DX_HOSTID) && (id == 0)));
 +}
 +
 +}
 +
-+static inline gid_t dx_map_gid(gid_t gid)
-+{
-+      if ((gid > MAX_GID) && (gid != -1))
-+              gid = -2;
-+      return (gid & MAX_GID);
-+}
++struct inode;
++int dx_permission(const struct inode *inode, int mask);
 +
 +
-+struct peer_tag {
-+      int32_t xid;
-+      int32_t nid;
-+};
 +
 +
-+#define dx_notagcheck(sb) ((sb) && ((sb)->s_flags & MS_NOTAGCHECK))
++#else
++#warning duplicate inclusion
++#endif
+diff -NurpP --minimal linux-4.4.197/include/linux/vs_time.h linux-4.4.197-vs2.3.9.8/include/linux/vs_time.h
+--- linux-4.4.197/include/linux/vs_time.h      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/linux/vs_time.h    2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,19 @@
++#ifndef _VS_TIME_H
++#define _VS_TIME_H
 +
 +
-+int dx_parse_tag(char *string, vtag_t *tag, int remove, int *mnt_flags,
-+               unsigned long *flags);
 +
 +
-+#ifdef        CONFIG_PROPAGATE
++/* time faking stuff */
 +
 +
-+void __dx_propagate_tag(struct nameidata *nd, struct inode *inode);
++#ifdef CONFIG_VSERVER_VTIME
 +
 +
-+#define dx_propagate_tag(n, i)        __dx_propagate_tag(n, i)
++extern void vx_adjust_timespec(struct timespec *ts);
++extern int vx_settimeofday(const struct timespec *ts);
 +
 +#else
 +
 +#else
-+#define dx_propagate_tag(n, i)        do { } while (0)
++#define       vx_adjust_timespec(t)   do { } while (0)
++#define       vx_settimeofday(t)      do_settimeofday(t)
 +#endif
 +
 +#endif
 +
-+#endif /* _DX_TAG_H */
-diff -NurpP --minimal linux-4.4.116/include/linux/vserver/tag_cmd.h linux-4.4.116-vs2.3.9.7/include/linux/vserver/tag_cmd.h
---- linux-4.4.116/include/linux/vserver/tag_cmd.h      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/linux/vserver/tag_cmd.h    2018-01-09 16:36:32.000000000 +0000
-@@ -0,0 +1,10 @@
-+#ifndef _VSERVER_TAG_CMD_H
-+#define _VSERVER_TAG_CMD_H
-+
-+#include <uapi/vserver/tag_cmd.h>
-+
-+extern int vc_task_tag(uint32_t);
-+
-+extern int vc_tag_migrate(uint32_t);
-+
-+#endif        /* _VSERVER_TAG_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/net/addrconf.h linux-4.4.116-vs2.3.9.7/include/net/addrconf.h
---- linux-4.4.116/include/net/addrconf.h       2018-02-22 21:19:58.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/net/addrconf.h     2018-01-09 16:36:32.000000000 +0000
++#else
++#warning duplicate inclusion
++#endif
+diff -NurpP --minimal linux-4.4.197/include/net/addrconf.h linux-4.4.197-vs2.3.9.8/include/net/addrconf.h
+--- linux-4.4.197/include/net/addrconf.h       2019-10-22 12:34:39.288582855 +0000
++++ linux-4.4.197-vs2.3.9.8/include/net/addrconf.h     2019-10-05 14:35:35.882754960 +0000
 @@ -84,7 +84,7 @@ struct inet6_ifaddr *ipv6_get_ifaddr(str
  
  int ipv6_dev_get_saddr(struct net *net, const struct net_device *dev,
 @@ -84,7 +84,7 @@ struct inet6_ifaddr *ipv6_get_ifaddr(str
  
  int ipv6_dev_get_saddr(struct net *net, const struct net_device *dev,
@@ -11370,9 +11342,9 @@ diff -NurpP --minimal linux-4.4.116/include/net/addrconf.h linux-4.4.116-vs2.3.9
  int __ipv6_get_lladdr(struct inet6_dev *idev, struct in6_addr *addr,
                      u32 banned_flags);
  int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr,
  int __ipv6_get_lladdr(struct inet6_dev *idev, struct in6_addr *addr,
                      u32 banned_flags);
  int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr,
-diff -NurpP --minimal linux-4.4.116/include/net/af_unix.h linux-4.4.116-vs2.3.9.7/include/net/af_unix.h
---- linux-4.4.116/include/net/af_unix.h        2018-02-22 21:19:58.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/net/af_unix.h      2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/net/af_unix.h linux-4.4.197-vs2.3.9.8/include/net/af_unix.h
+--- linux-4.4.197/include/net/af_unix.h        2019-10-22 12:34:39.288582855 +0000
++++ linux-4.4.197-vs2.3.9.8/include/net/af_unix.h      2018-10-20 04:57:21.000000000 +0000
 @@ -4,6 +4,7 @@
  #include <linux/socket.h>
  #include <linux/un.h>
 @@ -4,6 +4,7 @@
  #include <linux/socket.h>
  #include <linux/un.h>
@@ -11381,10 +11353,10 @@ diff -NurpP --minimal linux-4.4.116/include/net/af_unix.h linux-4.4.116-vs2.3.9.
  #include <net/sock.h>
  
  void unix_inflight(struct user_struct *user, struct file *fp);
  #include <net/sock.h>
  
  void unix_inflight(struct user_struct *user, struct file *fp);
-diff -NurpP --minimal linux-4.4.116/include/net/inet_timewait_sock.h linux-4.4.116-vs2.3.9.7/include/net/inet_timewait_sock.h
---- linux-4.4.116/include/net/inet_timewait_sock.h     2016-07-05 04:15:11.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/net/inet_timewait_sock.h   2018-01-09 16:40:17.000000000 +0000
-@@ -71,6 +71,10 @@ struct inet_timewait_sock {
+diff -NurpP --minimal linux-4.4.197/include/net/inet_timewait_sock.h linux-4.4.197-vs2.3.9.8/include/net/inet_timewait_sock.h
+--- linux-4.4.197/include/net/inet_timewait_sock.h     2019-10-22 12:34:39.408580935 +0000
++++ linux-4.4.197-vs2.3.9.8/include/net/inet_timewait_sock.h   2018-10-20 04:57:21.000000000 +0000
+@@ -72,6 +72,10 @@ struct inet_timewait_sock {
  #define tw_num                        __tw_common.skc_num
  #define tw_cookie             __tw_common.skc_cookie
  #define tw_dr                 __tw_common.skc_tw_dr
  #define tw_num                        __tw_common.skc_num
  #define tw_cookie             __tw_common.skc_cookie
  #define tw_dr                 __tw_common.skc_tw_dr
@@ -11395,9 +11367,9 @@ diff -NurpP --minimal linux-4.4.116/include/net/inet_timewait_sock.h linux-4.4.1
  
        int                     tw_timeout;
        volatile unsigned char  tw_substate;
  
        int                     tw_timeout;
        volatile unsigned char  tw_substate;
-diff -NurpP --minimal linux-4.4.116/include/net/ip6_route.h linux-4.4.116-vs2.3.9.7/include/net/ip6_route.h
---- linux-4.4.116/include/net/ip6_route.h      2018-02-22 21:19:58.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/net/ip6_route.h    2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/net/ip6_route.h linux-4.4.197-vs2.3.9.8/include/net/ip6_route.h
+--- linux-4.4.197/include/net/ip6_route.h      2019-10-22 12:34:39.418580776 +0000
++++ linux-4.4.197-vs2.3.9.8/include/net/ip6_route.h    2018-10-20 04:57:21.000000000 +0000
 @@ -90,7 +90,7 @@ int ip6_del_rt(struct rt6_info *);
  
  int ip6_route_get_saddr(struct net *net, struct rt6_info *rt,
 @@ -90,7 +90,7 @@ int ip6_del_rt(struct rt6_info *);
  
  int ip6_route_get_saddr(struct net *net, struct rt6_info *rt,
@@ -11407,10 +11379,10 @@ diff -NurpP --minimal linux-4.4.116/include/net/ip6_route.h linux-4.4.116-vs2.3.
  
  struct rt6_info *rt6_lookup(struct net *net, const struct in6_addr *daddr,
                            const struct in6_addr *saddr, int oif, int flags);
  
  struct rt6_info *rt6_lookup(struct net *net, const struct in6_addr *daddr,
                            const struct in6_addr *saddr, int oif, int flags);
-diff -NurpP --minimal linux-4.4.116/include/net/route.h linux-4.4.116-vs2.3.9.7/include/net/route.h
---- linux-4.4.116/include/net/route.h  2016-07-05 04:15:11.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/net/route.h        2018-01-09 16:39:47.000000000 +0000
-@@ -223,6 +223,9 @@ static inline void ip_rt_put(struct rtab
+diff -NurpP --minimal linux-4.4.197/include/net/route.h linux-4.4.197-vs2.3.9.8/include/net/route.h
+--- linux-4.4.197/include/net/route.h  2019-10-22 12:34:39.578578219 +0000
++++ linux-4.4.197-vs2.3.9.8/include/net/route.h        2018-10-20 04:57:21.000000000 +0000
+@@ -224,6 +224,9 @@ static inline void ip_rt_put(struct rtab
        dst_release(&rt->dst);
  }
  
        dst_release(&rt->dst);
  }
  
@@ -11420,7 +11392,7 @@ diff -NurpP --minimal linux-4.4.116/include/net/route.h linux-4.4.116-vs2.3.9.7/
  #define IPTOS_RT_MASK (IPTOS_TOS_MASK & ~3)
  
  extern const __u8 ip_tos2prio[16];
  #define IPTOS_RT_MASK (IPTOS_TOS_MASK & ~3)
  
  extern const __u8 ip_tos2prio[16];
-@@ -270,6 +273,9 @@ static inline void ip_route_connect_init
+@@ -271,6 +274,9 @@ static inline void ip_route_connect_init
                           protocol, flow_flags, dst, src, dport, sport);
  }
  
                           protocol, flow_flags, dst, src, dport, sport);
  }
  
@@ -11430,7 +11402,7 @@ diff -NurpP --minimal linux-4.4.116/include/net/route.h linux-4.4.116-vs2.3.9.7/
  static inline struct rtable *ip_route_connect(struct flowi4 *fl4,
                                              __be32 dst, __be32 src, u32 tos,
                                              int oif, u8 protocol,
  static inline struct rtable *ip_route_connect(struct flowi4 *fl4,
                                              __be32 dst, __be32 src, u32 tos,
                                              int oif, u8 protocol,
-@@ -278,6 +284,7 @@ static inline struct rtable *ip_route_co
+@@ -279,6 +285,7 @@ static inline struct rtable *ip_route_co
  {
        struct net *net = sock_net(sk);
        struct rtable *rt;
  {
        struct net *net = sock_net(sk);
        struct rtable *rt;
@@ -11438,7 +11410,7 @@ diff -NurpP --minimal linux-4.4.116/include/net/route.h linux-4.4.116-vs2.3.9.7/
  
        ip_route_connect_init(fl4, dst, src, tos, oif, protocol,
                              sport, dport, sk);
  
        ip_route_connect_init(fl4, dst, src, tos, oif, protocol,
                              sport, dport, sk);
-@@ -291,7 +298,21 @@ static inline struct rtable *ip_route_co
+@@ -292,7 +299,21 @@ static inline struct rtable *ip_route_co
  
                src = fl4->saddr;
        }
  
                src = fl4->saddr;
        }
@@ -11461,9 +11433,9 @@ diff -NurpP --minimal linux-4.4.116/include/net/route.h linux-4.4.116-vs2.3.9.7/
                rt = __ip_route_output_key(net, fl4);
                if (IS_ERR(rt))
                        return rt;
                rt = __ip_route_output_key(net, fl4);
                if (IS_ERR(rt))
                        return rt;
-diff -NurpP --minimal linux-4.4.116/include/net/sock.h linux-4.4.116-vs2.3.9.7/include/net/sock.h
---- linux-4.4.116/include/net/sock.h   2018-02-22 21:19:58.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/net/sock.h 2018-01-09 16:41:40.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/net/sock.h linux-4.4.197-vs2.3.9.8/include/net/sock.h
+--- linux-4.4.197/include/net/sock.h   2019-10-22 12:34:39.628577420 +0000
++++ linux-4.4.197-vs2.3.9.8/include/net/sock.h 2019-10-05 14:35:36.182750203 +0000
 @@ -201,6 +201,10 @@ struct sock_common {
        struct in6_addr         skc_v6_daddr;
        struct in6_addr         skc_v6_rcv_saddr;
 @@ -201,6 +201,10 @@ struct sock_common {
        struct in6_addr         skc_v6_daddr;
        struct in6_addr         skc_v6_rcv_saddr;
@@ -11475,7 +11447,7 @@ diff -NurpP --minimal linux-4.4.116/include/net/sock.h linux-4.4.116-vs2.3.9.7/i
  
        atomic64_t              skc_cookie;
  
  
        atomic64_t              skc_cookie;
  
-@@ -349,8 +353,12 @@ struct sock {
+@@ -350,8 +354,12 @@ struct sock {
  #define sk_prot                       __sk_common.skc_prot
  #define sk_net                        __sk_common.skc_net
  #define sk_v6_daddr           __sk_common.skc_v6_daddr
  #define sk_prot                       __sk_common.skc_prot
  #define sk_net                        __sk_common.skc_net
  #define sk_v6_daddr           __sk_common.skc_v6_daddr
@@ -11489,17 +11461,17 @@ diff -NurpP --minimal linux-4.4.116/include/net/sock.h linux-4.4.116-vs2.3.9.7/i
  #define sk_incoming_cpu               __sk_common.skc_incoming_cpu
  #define sk_flags              __sk_common.skc_flags
  #define sk_rxhash             __sk_common.skc_rxhash
  #define sk_incoming_cpu               __sk_common.skc_incoming_cpu
  #define sk_flags              __sk_common.skc_flags
  #define sk_rxhash             __sk_common.skc_rxhash
-diff -NurpP --minimal linux-4.4.116/include/uapi/Kbuild linux-4.4.116-vs2.3.9.7/include/uapi/Kbuild
---- linux-4.4.116/include/uapi/Kbuild  2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/Kbuild        2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/Kbuild linux-4.4.197-vs2.3.9.8/include/uapi/Kbuild
+--- linux-4.4.197/include/uapi/Kbuild  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/Kbuild        2018-10-20 04:57:21.000000000 +0000
 @@ -13,3 +13,4 @@ header-y += drm/
  header-y += xen/
  header-y += scsi/
  header-y += misc/
 +header-y += vserver/
 @@ -13,3 +13,4 @@ header-y += drm/
  header-y += xen/
  header-y += scsi/
  header-y += misc/
 +header-y += vserver/
-diff -NurpP --minimal linux-4.4.116/include/uapi/linux/capability.h linux-4.4.116-vs2.3.9.7/include/uapi/linux/capability.h
---- linux-4.4.116/include/uapi/linux/capability.h      2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/linux/capability.h    2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/linux/capability.h linux-4.4.197-vs2.3.9.8/include/uapi/linux/capability.h
+--- linux-4.4.197/include/uapi/linux/capability.h      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/linux/capability.h    2018-10-20 04:57:21.000000000 +0000
 @@ -259,6 +259,7 @@ struct vfs_cap_data {
     arbitrary SCSI commands */
  /* Allow setting encryption key on loopback filesystem */
 @@ -259,6 +259,7 @@ struct vfs_cap_data {
     arbitrary SCSI commands */
  /* Allow setting encryption key on loopback filesystem */
@@ -11522,9 +11494,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/linux/capability.h linux-4.4.11
  
  /*
   * Bit location of each capability (used by user-space library and kernel)
  
  /*
   * Bit location of each capability (used by user-space library and kernel)
-diff -NurpP --minimal linux-4.4.116/include/uapi/linux/fs.h linux-4.4.116-vs2.3.9.7/include/uapi/linux/fs.h
---- linux-4.4.116/include/uapi/linux/fs.h      2016-07-05 04:15:11.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/linux/fs.h    2018-01-09 16:47:48.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/linux/fs.h linux-4.4.197-vs2.3.9.8/include/uapi/linux/fs.h
+--- linux-4.4.197/include/uapi/linux/fs.h      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/linux/fs.h    2018-10-20 04:57:21.000000000 +0000
 @@ -91,6 +91,9 @@ struct inodes_stat_t {
  #define MS_I_VERSION  (1<<23) /* Update inode I_version field */
  #define MS_STRICTATIME        (1<<24) /* Always perform atime updates */
 @@ -91,6 +91,9 @@ struct inodes_stat_t {
  #define MS_I_VERSION  (1<<23) /* Update inode I_version field */
  #define MS_STRICTATIME        (1<<24) /* Always perform atime updates */
@@ -11545,18 +11517,17 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/linux/fs.h linux-4.4.116-vs2.3.
  
 -#define FS_FL_USER_VISIBLE            0x0003DFFF /* User visible flags */
 -#define FS_FL_USER_MODIFIABLE         0x000380FF /* User modifiable flags */
  
 -#define FS_FL_USER_VISIBLE            0x0003DFFF /* User visible flags */
 -#define FS_FL_USER_MODIFIABLE         0x000380FF /* User modifiable flags */
--
 +#define FS_BARRIER_FL                 0x04000000 /* Barrier for chroot() */
 +#define FS_COW_FL                     0x20000000 /* Copy on Write marker */
 +#define FS_BARRIER_FL                 0x04000000 /* Barrier for chroot() */
 +#define FS_COW_FL                     0x20000000 /* Copy on Write marker */
-+
 +#define FS_FL_USER_VISIBLE            0x0103DFFF /* User visible flags */
 +#define FS_FL_USER_MODIFIABLE         0x010380FF /* User modifiable flags */
  
  #define SYNC_FILE_RANGE_WAIT_BEFORE   1
  #define SYNC_FILE_RANGE_WRITE         2
 +#define FS_FL_USER_VISIBLE            0x0103DFFF /* User visible flags */
 +#define FS_FL_USER_MODIFIABLE         0x010380FF /* User modifiable flags */
  
  #define SYNC_FILE_RANGE_WAIT_BEFORE   1
  #define SYNC_FILE_RANGE_WRITE         2
-diff -NurpP --minimal linux-4.4.116/include/uapi/linux/gfs2_ondisk.h linux-4.4.116-vs2.3.9.7/include/uapi/linux/gfs2_ondisk.h
---- linux-4.4.116/include/uapi/linux/gfs2_ondisk.h     2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/linux/gfs2_ondisk.h   2018-01-09 16:36:32.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/linux/gfs2_ondisk.h linux-4.4.197-vs2.3.9.8/include/uapi/linux/gfs2_ondisk.h
+--- linux-4.4.197/include/uapi/linux/gfs2_ondisk.h     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/linux/gfs2_ondisk.h   2018-10-20 04:57:21.000000000 +0000
 @@ -225,6 +225,9 @@ enum {
        gfs2fl_Sync             = 8,
        gfs2fl_System           = 9,
 @@ -225,6 +225,9 @@ enum {
        gfs2fl_Sync             = 8,
        gfs2fl_System           = 9,
@@ -11577,9 +11548,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/linux/gfs2_ondisk.h linux-4.4.1
  #define GFS2_DIF_TRUNC_IN_PROG                0x20000000 /* New in gfs2 */
  #define GFS2_DIF_INHERIT_DIRECTIO     0x40000000 /* only in gfs1 */
  #define GFS2_DIF_INHERIT_JDATA                0x80000000
  #define GFS2_DIF_TRUNC_IN_PROG                0x20000000 /* New in gfs2 */
  #define GFS2_DIF_INHERIT_DIRECTIO     0x40000000 /* only in gfs1 */
  #define GFS2_DIF_INHERIT_JDATA                0x80000000
-diff -NurpP --minimal linux-4.4.116/include/uapi/linux/if_tun.h linux-4.4.116-vs2.3.9.7/include/uapi/linux/if_tun.h
---- linux-4.4.116/include/uapi/linux/if_tun.h  2015-10-29 09:21:42.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/linux/if_tun.h        2018-01-09 16:46:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/linux/if_tun.h linux-4.4.197-vs2.3.9.8/include/uapi/linux/if_tun.h
+--- linux-4.4.197/include/uapi/linux/if_tun.h  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/linux/if_tun.h        2018-10-20 04:57:21.000000000 +0000
 @@ -56,6 +56,7 @@
   */
  #define TUNSETVNETBE _IOW('T', 222, int)
 @@ -56,6 +56,7 @@
   */
  #define TUNSETVNETBE _IOW('T', 222, int)
@@ -11588,9 +11559,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/linux/if_tun.h linux-4.4.116-vs
  
  /* TUNSETIFF ifr flags */
  #define IFF_TUN               0x0001
  
  /* TUNSETIFF ifr flags */
  #define IFF_TUN               0x0001
-diff -NurpP --minimal linux-4.4.116/include/uapi/linux/major.h linux-4.4.116-vs2.3.9.7/include/uapi/linux/major.h
---- linux-4.4.116/include/uapi/linux/major.h   2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/linux/major.h 2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/linux/major.h linux-4.4.197-vs2.3.9.8/include/uapi/linux/major.h
+--- linux-4.4.197/include/uapi/linux/major.h   2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/linux/major.h 2018-10-20 04:57:21.000000000 +0000
 @@ -15,6 +15,7 @@
  #define HD_MAJOR              IDE0_MAJOR
  #define PTY_SLAVE_MAJOR               3
 @@ -15,6 +15,7 @@
  #define HD_MAJOR              IDE0_MAJOR
  #define PTY_SLAVE_MAJOR               3
@@ -11599,9 +11570,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/linux/major.h linux-4.4.116-vs2
  #define TTYAUX_MAJOR          5
  #define LP_MAJOR              6
  #define VCS_MAJOR             7
  #define TTYAUX_MAJOR          5
  #define LP_MAJOR              6
  #define VCS_MAJOR             7
-diff -NurpP --minimal linux-4.4.116/include/uapi/linux/nfs_mount.h linux-4.4.116-vs2.3.9.7/include/uapi/linux/nfs_mount.h
---- linux-4.4.116/include/uapi/linux/nfs_mount.h       2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/linux/nfs_mount.h     2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/linux/nfs_mount.h linux-4.4.197-vs2.3.9.8/include/uapi/linux/nfs_mount.h
+--- linux-4.4.197/include/uapi/linux/nfs_mount.h       2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/linux/nfs_mount.h     2018-10-20 04:57:21.000000000 +0000
 @@ -63,7 +63,8 @@ struct nfs_mount_data {
  #define NFS_MOUNT_SECFLAVOUR  0x2000  /* 5 non-text parsed mount data only */
  #define NFS_MOUNT_NORDIRPLUS  0x4000  /* 5 */
 @@ -63,7 +63,8 @@ struct nfs_mount_data {
  #define NFS_MOUNT_SECFLAVOUR  0x2000  /* 5 non-text parsed mount data only */
  #define NFS_MOUNT_NORDIRPLUS  0x4000  /* 5 */
@@ -11612,9 +11583,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/linux/nfs_mount.h linux-4.4.116
  
  /* The following are for internal use only */
  #define NFS_MOUNT_LOOKUP_CACHE_NONEG  0x10000
  
  /* The following are for internal use only */
  #define NFS_MOUNT_LOOKUP_CACHE_NONEG  0x10000
-diff -NurpP --minimal linux-4.4.116/include/uapi/linux/reboot.h linux-4.4.116-vs2.3.9.7/include/uapi/linux/reboot.h
---- linux-4.4.116/include/uapi/linux/reboot.h  2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/linux/reboot.h        2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/linux/reboot.h linux-4.4.197-vs2.3.9.8/include/uapi/linux/reboot.h
+--- linux-4.4.197/include/uapi/linux/reboot.h  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/linux/reboot.h        2018-10-20 04:57:21.000000000 +0000
 @@ -33,7 +33,7 @@
  #define       LINUX_REBOOT_CMD_RESTART2       0xA1B2C3D4
  #define       LINUX_REBOOT_CMD_SW_SUSPEND     0xD000FCE2
 @@ -33,7 +33,7 @@
  #define       LINUX_REBOOT_CMD_RESTART2       0xA1B2C3D4
  #define       LINUX_REBOOT_CMD_SW_SUSPEND     0xD000FCE2
@@ -11624,9 +11595,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/linux/reboot.h linux-4.4.116-vs
  
  
  #endif /* _UAPI_LINUX_REBOOT_H */
  
  
  #endif /* _UAPI_LINUX_REBOOT_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/linux/sysctl.h linux-4.4.116-vs2.3.9.7/include/uapi/linux/sysctl.h
---- linux-4.4.116/include/uapi/linux/sysctl.h  2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/linux/sysctl.h        2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/linux/sysctl.h linux-4.4.197-vs2.3.9.8/include/uapi/linux/sysctl.h
+--- linux-4.4.197/include/uapi/linux/sysctl.h  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/linux/sysctl.h        2018-10-20 04:57:21.000000000 +0000
 @@ -60,6 +60,7 @@ enum
        CTL_ABI=9,              /* Binary emulation */
        CTL_CPU=10,             /* CPU stuff (speed scaling, etc) */
 @@ -60,6 +60,7 @@ enum
        CTL_ABI=9,              /* Binary emulation */
        CTL_CPU=10,             /* CPU stuff (speed scaling, etc) */
@@ -11643,22 +11614,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/linux/sysctl.h linux-4.4.116-vs
  
        KERN_SPARC_REBOOT=21,   /* reboot command on Sparc */
        KERN_CTLALTDEL=22,      /* int: allow ctl-alt-del to reboot */
  
        KERN_SPARC_REBOOT=21,   /* reboot command on Sparc */
        KERN_CTLALTDEL=22,      /* int: allow ctl-alt-del to reboot */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/Kbuild linux-4.4.116-vs2.3.9.7/include/uapi/vserver/Kbuild
---- linux-4.4.116/include/uapi/vserver/Kbuild  1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/Kbuild        2018-01-09 16:36:33.000000000 +0000
-@@ -0,0 +1,9 @@
-+
-+header-y += context_cmd.h network_cmd.h space_cmd.h \
-+      cacct_cmd.h cvirt_cmd.h limit_cmd.h dlimit_cmd.h \
-+      inode_cmd.h tag_cmd.h sched_cmd.h signal_cmd.h \
-+      debug_cmd.h device_cmd.h
-+
-+header-y += switch.h context.h network.h monitor.h \
-+      limit.h inode.h device.h
-+
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/cacct_cmd.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/cacct_cmd.h
---- linux-4.4.116/include/uapi/vserver/cacct_cmd.h     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/cacct_cmd.h   2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/cacct_cmd.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/cacct_cmd.h
+--- linux-4.4.197/include/uapi/vserver/cacct_cmd.h     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/cacct_cmd.h   2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,15 @@
 +#ifndef _UAPI_VS_CACCT_CMD_H
 +#define _UAPI_VS_CACCT_CMD_H
 @@ -0,0 +1,15 @@
 +#ifndef _UAPI_VS_CACCT_CMD_H
 +#define _UAPI_VS_CACCT_CMD_H
@@ -11675,94 +11633,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/cacct_cmd.h linux-4.4.1
 +};
 +
 +#endif /* _UAPI_VS_CACCT_CMD_H */
 +};
 +
 +#endif /* _UAPI_VS_CACCT_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/context.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/context.h
---- linux-4.4.116/include/uapi/vserver/context.h       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/context.h     2018-01-09 16:36:33.000000000 +0000
-@@ -0,0 +1,81 @@
-+#ifndef _UAPI_VS_CONTEXT_H
-+#define _UAPI_VS_CONTEXT_H
-+
-+#include <linux/types.h>
-+#include <linux/capability.h>
-+
-+
-+/* context flags */
-+
-+#define VXF_INFO_SCHED                0x00000002
-+#define VXF_INFO_NPROC                0x00000004
-+#define VXF_INFO_PRIVATE      0x00000008
-+
-+#define VXF_INFO_INIT         0x00000010
-+#define VXF_INFO_HIDE         0x00000020
-+#define VXF_INFO_ULIMIT               0x00000040
-+#define VXF_INFO_NSPACE               0x00000080
-+
-+#define VXF_SCHED_HARD                0x00000100
-+#define VXF_SCHED_PRIO                0x00000200
-+#define VXF_SCHED_PAUSE               0x00000400
-+
-+#define VXF_VIRT_MEM          0x00010000
-+#define VXF_VIRT_UPTIME               0x00020000
-+#define VXF_VIRT_CPU          0x00040000
-+#define VXF_VIRT_LOAD         0x00080000
-+#define VXF_VIRT_TIME         0x00100000
-+
-+#define VXF_HIDE_MOUNT                0x01000000
-+/* was        VXF_HIDE_NETIF          0x02000000 */
-+#define VXF_HIDE_VINFO                0x04000000
-+
-+#define VXF_STATE_SETUP               (1ULL << 32)
-+#define VXF_STATE_INIT                (1ULL << 33)
-+#define VXF_STATE_ADMIN               (1ULL << 34)
-+
-+#define VXF_SC_HELPER         (1ULL << 36)
-+#define VXF_REBOOT_KILL               (1ULL << 37)
-+#define VXF_PERSISTENT                (1ULL << 38)
-+
-+#define VXF_FORK_RSS          (1ULL << 48)
-+#define VXF_PROLIFIC          (1ULL << 49)
-+
-+#define VXF_IGNEG_NICE                (1ULL << 52)
-+
-+#define VXF_ONE_TIME          (0x0007ULL << 32)
-+
-+#define VXF_INIT_SET          (VXF_STATE_SETUP | VXF_STATE_INIT | VXF_STATE_ADMIN)
-+
-+
-+/* context migration */
-+
-+#define VXM_SET_INIT          0x00000001
-+#define VXM_SET_REAPER                0x00000002
-+
-+/* context caps */
-+
-+#define VXC_SET_UTSNAME               0x00000001
-+#define VXC_SET_RLIMIT                0x00000002
-+#define VXC_FS_SECURITY               0x00000004
-+#define VXC_FS_TRUSTED                0x00000008
-+#define VXC_TIOCSTI           0x00000010
-+
-+/* was        VXC_RAW_ICMP            0x00000100 */
-+#define VXC_SYSLOG            0x00001000
-+#define VXC_OOM_ADJUST                0x00002000
-+#define VXC_AUDIT_CONTROL     0x00004000
-+
-+#define VXC_SECURE_MOUNT      0x00010000
-+/* #define VXC_SECURE_REMOUNT 0x00020000 */
-+#define VXC_BINARY_MOUNT      0x00040000
-+#define VXC_DEV_MOUNT         0x00080000
-+
-+#define VXC_QUOTA_CTL         0x00100000
-+#define VXC_ADMIN_MAPPER      0x00200000
-+#define VXC_ADMIN_CLOOP               0x00400000
-+
-+#define VXC_KTHREAD           0x01000000
-+#define VXC_NAMESPACE         0x02000000
-+
-+#endif /* _UAPI_VS_CONTEXT_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/context_cmd.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/context_cmd.h
---- linux-4.4.116/include/uapi/vserver/context_cmd.h   1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/context_cmd.h 2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/context_cmd.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/context_cmd.h
+--- linux-4.4.197/include/uapi/vserver/context_cmd.h   1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/context_cmd.h 2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,115 @@
 +#ifndef _UAPI_VS_CONTEXT_CMD_H
 +#define _UAPI_VS_CONTEXT_CMD_H
 @@ -0,0 +1,115 @@
 +#ifndef _UAPI_VS_CONTEXT_CMD_H
 +#define _UAPI_VS_CONTEXT_CMD_H
@@ -11879,9 +11752,94 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/context_cmd.h linux-4.4
 +};
 +
 +#endif /* _UAPI_VS_CONTEXT_CMD_H */
 +};
 +
 +#endif /* _UAPI_VS_CONTEXT_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/cvirt_cmd.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/cvirt_cmd.h
---- linux-4.4.116/include/uapi/vserver/cvirt_cmd.h     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/cvirt_cmd.h   2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/context.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/context.h
+--- linux-4.4.197/include/uapi/vserver/context.h       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/context.h     2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,81 @@
++#ifndef _UAPI_VS_CONTEXT_H
++#define _UAPI_VS_CONTEXT_H
++
++#include <linux/types.h>
++#include <linux/capability.h>
++
++
++/* context flags */
++
++#define VXF_INFO_SCHED                0x00000002
++#define VXF_INFO_NPROC                0x00000004
++#define VXF_INFO_PRIVATE      0x00000008
++
++#define VXF_INFO_INIT         0x00000010
++#define VXF_INFO_HIDE         0x00000020
++#define VXF_INFO_ULIMIT               0x00000040
++#define VXF_INFO_NSPACE               0x00000080
++
++#define VXF_SCHED_HARD                0x00000100
++#define VXF_SCHED_PRIO                0x00000200
++#define VXF_SCHED_PAUSE               0x00000400
++
++#define VXF_VIRT_MEM          0x00010000
++#define VXF_VIRT_UPTIME               0x00020000
++#define VXF_VIRT_CPU          0x00040000
++#define VXF_VIRT_LOAD         0x00080000
++#define VXF_VIRT_TIME         0x00100000
++
++#define VXF_HIDE_MOUNT                0x01000000
++/* was        VXF_HIDE_NETIF          0x02000000 */
++#define VXF_HIDE_VINFO                0x04000000
++
++#define VXF_STATE_SETUP               (1ULL << 32)
++#define VXF_STATE_INIT                (1ULL << 33)
++#define VXF_STATE_ADMIN               (1ULL << 34)
++
++#define VXF_SC_HELPER         (1ULL << 36)
++#define VXF_REBOOT_KILL               (1ULL << 37)
++#define VXF_PERSISTENT                (1ULL << 38)
++
++#define VXF_FORK_RSS          (1ULL << 48)
++#define VXF_PROLIFIC          (1ULL << 49)
++
++#define VXF_IGNEG_NICE                (1ULL << 52)
++
++#define VXF_ONE_TIME          (0x0007ULL << 32)
++
++#define VXF_INIT_SET          (VXF_STATE_SETUP | VXF_STATE_INIT | VXF_STATE_ADMIN)
++
++
++/* context migration */
++
++#define VXM_SET_INIT          0x00000001
++#define VXM_SET_REAPER                0x00000002
++
++/* context caps */
++
++#define VXC_SET_UTSNAME               0x00000001
++#define VXC_SET_RLIMIT                0x00000002
++#define VXC_FS_SECURITY               0x00000004
++#define VXC_FS_TRUSTED                0x00000008
++#define VXC_TIOCSTI           0x00000010
++
++/* was        VXC_RAW_ICMP            0x00000100 */
++#define VXC_SYSLOG            0x00001000
++#define VXC_OOM_ADJUST                0x00002000
++#define VXC_AUDIT_CONTROL     0x00004000
++
++#define VXC_SECURE_MOUNT      0x00010000
++/* #define VXC_SECURE_REMOUNT 0x00020000 */
++#define VXC_BINARY_MOUNT      0x00040000
++#define VXC_DEV_MOUNT         0x00080000
++
++#define VXC_QUOTA_CTL         0x00100000
++#define VXC_ADMIN_MAPPER      0x00200000
++#define VXC_ADMIN_CLOOP               0x00400000
++
++#define VXC_KTHREAD           0x01000000
++#define VXC_NAMESPACE         0x02000000
++
++#endif /* _UAPI_VS_CONTEXT_H */
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/cvirt_cmd.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/cvirt_cmd.h
+--- linux-4.4.197/include/uapi/vserver/cvirt_cmd.h     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/cvirt_cmd.h   2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,41 @@
 +#ifndef _UAPI_VS_CVIRT_CMD_H
 +#define _UAPI_VS_CVIRT_CMD_H
 @@ -0,0 +1,41 @@
 +#ifndef _UAPI_VS_CVIRT_CMD_H
 +#define _UAPI_VS_CVIRT_CMD_H
@@ -11924,9 +11882,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/cvirt_cmd.h linux-4.4.1
 +};
 +
 +#endif /* _UAPI_VS_CVIRT_CMD_H */
 +};
 +
 +#endif /* _UAPI_VS_CVIRT_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/debug_cmd.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/debug_cmd.h
---- linux-4.4.116/include/uapi/vserver/debug_cmd.h     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/debug_cmd.h   2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/debug_cmd.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/debug_cmd.h
+--- linux-4.4.197/include/uapi/vserver/debug_cmd.h     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/debug_cmd.h   2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,24 @@
 +#ifndef _UAPI_VS_DEBUG_CMD_H
 +#define _UAPI_VS_DEBUG_CMD_H
 @@ -0,0 +1,24 @@
 +#ifndef _UAPI_VS_DEBUG_CMD_H
 +#define _UAPI_VS_DEBUG_CMD_H
@@ -11952,25 +11910,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/debug_cmd.h linux-4.4.1
 +};
 +
 +#endif /* _UAPI_VS_DEBUG_CMD_H */
 +};
 +
 +#endif /* _UAPI_VS_DEBUG_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/device.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/device.h
---- linux-4.4.116/include/uapi/vserver/device.h        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/device.h      2018-01-09 16:36:33.000000000 +0000
-@@ -0,0 +1,12 @@
-+#ifndef _UAPI_VS_DEVICE_H
-+#define _UAPI_VS_DEVICE_H
-+
-+
-+#define DATTR_CREATE  0x00000001
-+#define DATTR_OPEN    0x00000002
-+
-+#define DATTR_REMAP   0x00000010
-+
-+#define DATTR_MASK    0x00000013
-+
-+#endif        /* _UAPI_VS_DEVICE_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/device_cmd.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/device_cmd.h
---- linux-4.4.116/include/uapi/vserver/device_cmd.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/device_cmd.h  2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/device_cmd.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/device_cmd.h
+--- linux-4.4.197/include/uapi/vserver/device_cmd.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/device_cmd.h  2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,16 @@
 +#ifndef _UAPI_VS_DEVICE_CMD_H
 +#define _UAPI_VS_DEVICE_CMD_H
 @@ -0,0 +1,16 @@
 +#ifndef _UAPI_VS_DEVICE_CMD_H
 +#define _UAPI_VS_DEVICE_CMD_H
@@ -11988,9 +11930,25 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/device_cmd.h linux-4.4.
 +};
 +
 +#endif /* _UAPI_VS_DEVICE_CMD_H */
 +};
 +
 +#endif /* _UAPI_VS_DEVICE_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/dlimit_cmd.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/dlimit_cmd.h
---- linux-4.4.116/include/uapi/vserver/dlimit_cmd.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/dlimit_cmd.h  2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/device.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/device.h
+--- linux-4.4.197/include/uapi/vserver/device.h        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/device.h      2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,12 @@
++#ifndef _UAPI_VS_DEVICE_H
++#define _UAPI_VS_DEVICE_H
++
++
++#define DATTR_CREATE  0x00000001
++#define DATTR_OPEN    0x00000002
++
++#define DATTR_REMAP   0x00000010
++
++#define DATTR_MASK    0x00000013
++
++#endif        /* _UAPI_VS_DEVICE_H */
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/dlimit_cmd.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/dlimit_cmd.h
+--- linux-4.4.197/include/uapi/vserver/dlimit_cmd.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/dlimit_cmd.h  2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,67 @@
 +#ifndef _UAPI_VS_DLIMIT_CMD_H
 +#define _UAPI_VS_DLIMIT_CMD_H
 @@ -0,0 +1,67 @@
 +#ifndef _UAPI_VS_DLIMIT_CMD_H
 +#define _UAPI_VS_DLIMIT_CMD_H
@@ -12059,36 +12017,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/dlimit_cmd.h linux-4.4.
 +}
 +
 +#endif /* _UAPI_VS_DLIMIT_CMD_H */
 +}
 +
 +#endif /* _UAPI_VS_DLIMIT_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/inode.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/inode.h
---- linux-4.4.116/include/uapi/vserver/inode.h 1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/inode.h       2018-01-09 16:36:33.000000000 +0000
-@@ -0,0 +1,23 @@
-+#ifndef _UAPI_VS_INODE_H
-+#define _UAPI_VS_INODE_H
-+
-+
-+#define IATTR_TAG     0x01000000
-+
-+#define IATTR_ADMIN   0x00000001
-+#define IATTR_WATCH   0x00000002
-+#define IATTR_HIDE    0x00000004
-+#define IATTR_FLAGS   0x00000007
-+
-+#define IATTR_BARRIER 0x00010000
-+#define IATTR_IXUNLINK        0x00020000
-+#define IATTR_IMMUTABLE 0x00040000
-+#define IATTR_COW     0x00080000
-+
-+
-+/* inode ioctls */
-+
-+#define FIOC_GETXFLG  _IOR('x', 5, long)
-+#define FIOC_SETXFLG  _IOW('x', 6, long)
-+
-+#endif        /* _UAPI_VS_INODE_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/inode_cmd.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/inode_cmd.h
---- linux-4.4.116/include/uapi/vserver/inode_cmd.h     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/inode_cmd.h   2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/inode_cmd.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/inode_cmd.h
+--- linux-4.4.197/include/uapi/vserver/inode_cmd.h     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/inode_cmd.h   2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,26 @@
 +#ifndef _UAPI_VS_INODE_CMD_H
 +#define _UAPI_VS_INODE_CMD_H
 @@ -0,0 +1,26 @@
 +#ifndef _UAPI_VS_INODE_CMD_H
 +#define _UAPI_VS_INODE_CMD_H
@@ -12116,27 +12047,49 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/inode_cmd.h linux-4.4.1
 +};
 +
 +#endif /* _UAPI_VS_INODE_CMD_H */
 +};
 +
 +#endif /* _UAPI_VS_INODE_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/limit.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/limit.h
---- linux-4.4.116/include/uapi/vserver/limit.h 1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/limit.h       2018-01-09 16:36:33.000000000 +0000
-@@ -0,0 +1,14 @@
-+#ifndef _UAPI_VS_LIMIT_H
-+#define _UAPI_VS_LIMIT_H
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/inode.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/inode.h
+--- linux-4.4.197/include/uapi/vserver/inode.h 1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/inode.h       2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,23 @@
++#ifndef _UAPI_VS_INODE_H
++#define _UAPI_VS_INODE_H
 +
 +
 +
 +
-+#define VLIMIT_NSOCK  16
-+#define VLIMIT_OPENFD 17
-+#define VLIMIT_ANON   18
-+#define VLIMIT_SHMEM  19
-+#define VLIMIT_SEMARY 20
-+#define VLIMIT_NSEMS  21
-+#define VLIMIT_DENTRY 22
-+#define VLIMIT_MAPPED 23
++#define IATTR_TAG     0x01000000
 +
 +
-+#endif /* _UAPI_VS_LIMIT_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/limit_cmd.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/limit_cmd.h
---- linux-4.4.116/include/uapi/vserver/limit_cmd.h     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/limit_cmd.h   2018-01-09 16:36:33.000000000 +0000
++#define IATTR_ADMIN   0x00000001
++#define IATTR_WATCH   0x00000002
++#define IATTR_HIDE    0x00000004
++#define IATTR_FLAGS   0x00000007
++
++#define IATTR_BARRIER 0x00010000
++#define IATTR_IXUNLINK        0x00020000
++#define IATTR_IMMUTABLE 0x00040000
++#define IATTR_COW     0x00080000
++
++
++/* inode ioctls */
++
++#define FIOC_GETXFLG  _IOR('x', 5, long)
++#define FIOC_SETXFLG  _IOW('x', 6, long)
++
++#endif        /* _UAPI_VS_INODE_H */
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/Kbuild linux-4.4.197-vs2.3.9.8/include/uapi/vserver/Kbuild
+--- linux-4.4.197/include/uapi/vserver/Kbuild  1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/Kbuild        2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,9 @@
++
++header-y += context_cmd.h network_cmd.h space_cmd.h \
++      cacct_cmd.h cvirt_cmd.h limit_cmd.h dlimit_cmd.h \
++      inode_cmd.h tag_cmd.h sched_cmd.h signal_cmd.h \
++      debug_cmd.h device_cmd.h
++
++header-y += switch.h context.h network.h monitor.h \
++      limit.h inode.h device.h
++
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/limit_cmd.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/limit_cmd.h
+--- linux-4.4.197/include/uapi/vserver/limit_cmd.h     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/limit_cmd.h   2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,40 @@
 +#ifndef _UAPI_VS_LIMIT_CMD_H
 +#define _UAPI_VS_LIMIT_CMD_H
 @@ -0,0 +1,40 @@
 +#ifndef _UAPI_VS_LIMIT_CMD_H
 +#define _UAPI_VS_LIMIT_CMD_H
@@ -12178,9 +12131,27 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/limit_cmd.h linux-4.4.1
 +#define CRLIM_KEEP            (~1ULL)
 +
 +#endif /* _UAPI_VS_LIMIT_CMD_H */
 +#define CRLIM_KEEP            (~1ULL)
 +
 +#endif /* _UAPI_VS_LIMIT_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/monitor.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/monitor.h
---- linux-4.4.116/include/uapi/vserver/monitor.h       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/monitor.h     2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/limit.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/limit.h
+--- linux-4.4.197/include/uapi/vserver/limit.h 1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/limit.h       2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,14 @@
++#ifndef _UAPI_VS_LIMIT_H
++#define _UAPI_VS_LIMIT_H
++
++
++#define VLIMIT_NSOCK  16
++#define VLIMIT_OPENFD 17
++#define VLIMIT_ANON   18
++#define VLIMIT_SHMEM  19
++#define VLIMIT_SEMARY 20
++#define VLIMIT_NSEMS  21
++#define VLIMIT_DENTRY 22
++#define VLIMIT_MAPPED 23
++
++#endif /* _UAPI_VS_LIMIT_H */
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/monitor.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/monitor.h
+--- linux-4.4.197/include/uapi/vserver/monitor.h       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/monitor.h     2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,96 @@
 +#ifndef _UAPI_VS_MONITOR_H
 +#define _UAPI_VS_MONITOR_H
 @@ -0,0 +1,96 @@
 +#ifndef _UAPI_VS_MONITOR_H
 +#define _UAPI_VS_MONITOR_H
@@ -12278,89 +12249,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/monitor.h linux-4.4.116
 +};
 +
 +#endif /* _UAPI_VS_MONITOR_H */
 +};
 +
 +#endif /* _UAPI_VS_MONITOR_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/network.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/network.h
---- linux-4.4.116/include/uapi/vserver/network.h       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/network.h     2018-01-09 16:36:33.000000000 +0000
-@@ -0,0 +1,76 @@
-+#ifndef _UAPI_VS_NETWORK_H
-+#define _UAPI_VS_NETWORK_H
-+
-+#include <linux/types.h>
-+
-+
-+#define MAX_N_CONTEXT 65535   /* Arbitrary limit */
-+
-+
-+/* network flags */
-+
-+#define NXF_INFO_PRIVATE      0x00000008
-+
-+#define NXF_SINGLE_IP         0x00000100
-+#define NXF_LBACK_REMAP               0x00000200
-+#define NXF_LBACK_ALLOW               0x00000400
-+
-+#define NXF_HIDE_NETIF                0x02000000
-+#define NXF_HIDE_LBACK                0x04000000
-+
-+#define NXF_STATE_SETUP               (1ULL << 32)
-+#define NXF_STATE_ADMIN               (1ULL << 34)
-+
-+#define NXF_SC_HELPER         (1ULL << 36)
-+#define NXF_PERSISTENT                (1ULL << 38)
-+
-+#define NXF_ONE_TIME          (0x0005ULL << 32)
-+
-+
-+#define       NXF_INIT_SET            (__nxf_init_set())
-+
-+static inline uint64_t __nxf_init_set(void) {
-+      return    NXF_STATE_ADMIN
-+#ifdef        CONFIG_VSERVER_AUTO_LBACK
-+              | NXF_LBACK_REMAP
-+              | NXF_HIDE_LBACK
-+#endif
-+#ifdef        CONFIG_VSERVER_AUTO_SINGLE
-+              | NXF_SINGLE_IP
-+#endif
-+              | NXF_HIDE_NETIF;
-+}
-+
-+
-+/* network caps */
-+
-+#define NXC_TUN_CREATE                0x00000001
-+
-+#define NXC_RAW_ICMP          0x00000100
-+
-+#define NXC_MULTICAST         0x00001000
-+
-+
-+/* address types */
-+
-+#define NXA_TYPE_IPV4         0x0001
-+#define NXA_TYPE_IPV6         0x0002
-+
-+#define NXA_TYPE_NONE         0x0000
-+#define NXA_TYPE_ANY          0x00FF
-+
-+#define NXA_TYPE_ADDR         0x0010
-+#define NXA_TYPE_MASK         0x0020
-+#define NXA_TYPE_RANGE                0x0040
-+
-+#define NXA_MASK_ALL          (NXA_TYPE_ADDR | NXA_TYPE_MASK | NXA_TYPE_RANGE)
-+
-+#define NXA_MOD_BCAST         0x0100
-+#define NXA_MOD_LBACK         0x0200
-+
-+#define NXA_LOOPBACK          0x1000
-+
-+#define NXA_MASK_BIND         (NXA_MASK_ALL | NXA_MOD_BCAST | NXA_MOD_LBACK)
-+#define NXA_MASK_SHOW         (NXA_MASK_ALL | NXA_LOOPBACK)
-+
-+#endif /* _UAPI_VS_NETWORK_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/network_cmd.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/network_cmd.h
---- linux-4.4.116/include/uapi/vserver/network_cmd.h   1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/network_cmd.h 2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/network_cmd.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/network_cmd.h
+--- linux-4.4.197/include/uapi/vserver/network_cmd.h   1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/network_cmd.h 2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,123 @@
 +#ifndef _UAPI_VS_NETWORK_CMD_H
 +#define _UAPI_VS_NETWORK_CMD_H
 @@ -0,0 +1,123 @@
 +#ifndef _UAPI_VS_NETWORK_CMD_H
 +#define _UAPI_VS_NETWORK_CMD_H
@@ -12485,9 +12376,89 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/network_cmd.h linux-4.4
 +};
 +
 +#endif /* _UAPI_VS_NETWORK_CMD_H */
 +};
 +
 +#endif /* _UAPI_VS_NETWORK_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/sched_cmd.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/sched_cmd.h
---- linux-4.4.116/include/uapi/vserver/sched_cmd.h     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/sched_cmd.h   2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/network.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/network.h
+--- linux-4.4.197/include/uapi/vserver/network.h       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/network.h     2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,76 @@
++#ifndef _UAPI_VS_NETWORK_H
++#define _UAPI_VS_NETWORK_H
++
++#include <linux/types.h>
++
++
++#define MAX_N_CONTEXT 65535   /* Arbitrary limit */
++
++
++/* network flags */
++
++#define NXF_INFO_PRIVATE      0x00000008
++
++#define NXF_SINGLE_IP         0x00000100
++#define NXF_LBACK_REMAP               0x00000200
++#define NXF_LBACK_ALLOW               0x00000400
++
++#define NXF_HIDE_NETIF                0x02000000
++#define NXF_HIDE_LBACK                0x04000000
++
++#define NXF_STATE_SETUP               (1ULL << 32)
++#define NXF_STATE_ADMIN               (1ULL << 34)
++
++#define NXF_SC_HELPER         (1ULL << 36)
++#define NXF_PERSISTENT                (1ULL << 38)
++
++#define NXF_ONE_TIME          (0x0005ULL << 32)
++
++
++#define       NXF_INIT_SET            (__nxf_init_set())
++
++static inline uint64_t __nxf_init_set(void) {
++      return    NXF_STATE_ADMIN
++#ifdef        CONFIG_VSERVER_AUTO_LBACK
++              | NXF_LBACK_REMAP
++              | NXF_HIDE_LBACK
++#endif
++#ifdef        CONFIG_VSERVER_AUTO_SINGLE
++              | NXF_SINGLE_IP
++#endif
++              | NXF_HIDE_NETIF;
++}
++
++
++/* network caps */
++
++#define NXC_TUN_CREATE                0x00000001
++
++#define NXC_RAW_ICMP          0x00000100
++
++#define NXC_MULTICAST         0x00001000
++
++
++/* address types */
++
++#define NXA_TYPE_IPV4         0x0001
++#define NXA_TYPE_IPV6         0x0002
++
++#define NXA_TYPE_NONE         0x0000
++#define NXA_TYPE_ANY          0x00FF
++
++#define NXA_TYPE_ADDR         0x0010
++#define NXA_TYPE_MASK         0x0020
++#define NXA_TYPE_RANGE                0x0040
++
++#define NXA_MASK_ALL          (NXA_TYPE_ADDR | NXA_TYPE_MASK | NXA_TYPE_RANGE)
++
++#define NXA_MOD_BCAST         0x0100
++#define NXA_MOD_LBACK         0x0200
++
++#define NXA_LOOPBACK          0x1000
++
++#define NXA_MASK_BIND         (NXA_MASK_ALL | NXA_MOD_BCAST | NXA_MOD_LBACK)
++#define NXA_MASK_SHOW         (NXA_MASK_ALL | NXA_LOOPBACK)
++
++#endif /* _UAPI_VS_NETWORK_H */
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/sched_cmd.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/sched_cmd.h
+--- linux-4.4.197/include/uapi/vserver/sched_cmd.h     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/sched_cmd.h   2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,13 @@
 +#ifndef _UAPI_VS_SCHED_CMD_H
 +#define _UAPI_VS_SCHED_CMD_H
 @@ -0,0 +1,13 @@
 +#ifndef _UAPI_VS_SCHED_CMD_H
 +#define _UAPI_VS_SCHED_CMD_H
@@ -12502,9 +12473,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/sched_cmd.h linux-4.4.1
 +#define VCMD_get_prio_bias    VC_CMD(SCHED, 5, 0)
 +
 +#endif /* _UAPI_VS_SCHED_CMD_H */
 +#define VCMD_get_prio_bias    VC_CMD(SCHED, 5, 0)
 +
 +#endif /* _UAPI_VS_SCHED_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/signal_cmd.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/signal_cmd.h
---- linux-4.4.116/include/uapi/vserver/signal_cmd.h    1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/signal_cmd.h  2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/signal_cmd.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/signal_cmd.h
+--- linux-4.4.197/include/uapi/vserver/signal_cmd.h    1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/signal_cmd.h  2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,31 @@
 +#ifndef _UAPI_VS_SIGNAL_CMD_H
 +#define _UAPI_VS_SIGNAL_CMD_H
 @@ -0,0 +1,31 @@
 +#ifndef _UAPI_VS_SIGNAL_CMD_H
 +#define _UAPI_VS_SIGNAL_CMD_H
@@ -12537,9 +12508,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/signal_cmd.h linux-4.4.
 +};
 +
 +#endif /* _UAPI_VS_SIGNAL_CMD_H */
 +};
 +
 +#endif /* _UAPI_VS_SIGNAL_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/space_cmd.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/space_cmd.h
---- linux-4.4.116/include/uapi/vserver/space_cmd.h     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/space_cmd.h   2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/space_cmd.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/space_cmd.h
+--- linux-4.4.197/include/uapi/vserver/space_cmd.h     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/space_cmd.h   2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,28 @@
 +#ifndef _UAPI_VS_SPACE_CMD_H
 +#define _UAPI_VS_SPACE_CMD_H
 @@ -0,0 +1,28 @@
 +#ifndef _UAPI_VS_SPACE_CMD_H
 +#define _UAPI_VS_SPACE_CMD_H
@@ -12569,9 +12540,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/space_cmd.h linux-4.4.1
 +};
 +
 +#endif /* _UAPI_VS_SPACE_CMD_H */
 +};
 +
 +#endif /* _UAPI_VS_SPACE_CMD_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/switch.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/switch.h
---- linux-4.4.116/include/uapi/vserver/switch.h        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/switch.h      2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/switch.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/switch.h
+--- linux-4.4.197/include/uapi/vserver/switch.h        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/switch.h      2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,90 @@
 +#ifndef _UAPI_VS_SWITCH_H
 +#define _UAPI_VS_SWITCH_H
 @@ -0,0 +1,90 @@
 +#ifndef _UAPI_VS_SWITCH_H
 +#define _UAPI_VS_SWITCH_H
@@ -12663,9 +12634,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/switch.h linux-4.4.116-
 +#define VCMD_get_vci          VC_CMD(VERSION, 1, 0)
 +
 +#endif /* _UAPI_VS_SWITCH_H */
 +#define VCMD_get_vci          VC_CMD(VERSION, 1, 0)
 +
 +#endif /* _UAPI_VS_SWITCH_H */
-diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/tag_cmd.h linux-4.4.116-vs2.3.9.7/include/uapi/vserver/tag_cmd.h
---- linux-4.4.116/include/uapi/vserver/tag_cmd.h       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/include/uapi/vserver/tag_cmd.h     2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/include/uapi/vserver/tag_cmd.h linux-4.4.197-vs2.3.9.8/include/uapi/vserver/tag_cmd.h
+--- linux-4.4.197/include/uapi/vserver/tag_cmd.h       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/include/uapi/vserver/tag_cmd.h     2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,14 @@
 +#ifndef _UAPI_VS_TAG_CMD_H
 +#define _UAPI_VS_TAG_CMD_H
 @@ -0,0 +1,14 @@
 +#ifndef _UAPI_VS_TAG_CMD_H
 +#define _UAPI_VS_TAG_CMD_H
@@ -12681,9 +12652,9 @@ diff -NurpP --minimal linux-4.4.116/include/uapi/vserver/tag_cmd.h linux-4.4.116
 +#define VCMD_tag_migrate      VC_CMD(TAGMIG, 1, 0)
 +
 +#endif /* _UAPI_VS_TAG_CMD_H */
 +#define VCMD_tag_migrate      VC_CMD(TAGMIG, 1, 0)
 +
 +#endif /* _UAPI_VS_TAG_CMD_H */
-diff -NurpP --minimal linux-4.4.116/init/Kconfig linux-4.4.116-vs2.3.9.7/init/Kconfig
---- linux-4.4.116/init/Kconfig 2018-02-22 21:19:59.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/init/Kconfig       2018-02-10 15:16:50.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/init/Kconfig linux-4.4.197-vs2.3.9.8/init/Kconfig
+--- linux-4.4.197/init/Kconfig 2019-10-22 12:34:40.648561123 +0000
++++ linux-4.4.197-vs2.3.9.8/init/Kconfig       2018-10-20 04:57:21.000000000 +0000
 @@ -927,6 +927,7 @@ config NUMA_BALANCING_DEFAULT_ENABLED
  menuconfig CGROUPS
        bool "Control Group support"
 @@ -927,6 +927,7 @@ config NUMA_BALANCING_DEFAULT_ENABLED
  menuconfig CGROUPS
        bool "Control Group support"
@@ -12692,9 +12663,9 @@ diff -NurpP --minimal linux-4.4.116/init/Kconfig linux-4.4.116-vs2.3.9.7/init/Kc
        help
          This option adds support for grouping sets of processes together, for
          use with process control subsystems such as Cpusets, CFS, memory
        help
          This option adds support for grouping sets of processes together, for
          use with process control subsystems such as Cpusets, CFS, memory
-diff -NurpP --minimal linux-4.4.116/init/main.c linux-4.4.116-vs2.3.9.7/init/main.c
---- linux-4.4.116/init/main.c  2018-02-22 21:19:59.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/init/main.c        2018-01-09 16:58:21.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/init/main.c linux-4.4.197-vs2.3.9.8/init/main.c
+--- linux-4.4.197/init/main.c  2019-10-22 12:34:40.648561123 +0000
++++ linux-4.4.197-vs2.3.9.8/init/main.c        2019-10-05 14:35:36.472745602 +0000
 @@ -82,6 +82,7 @@
  #include <linux/proc_ns.h>
  #include <linux/io.h>
 @@ -82,6 +82,7 @@
  #include <linux/proc_ns.h>
  #include <linux/io.h>
@@ -12703,9 +12674,9 @@ diff -NurpP --minimal linux-4.4.116/init/main.c linux-4.4.116-vs2.3.9.7/init/mai
  
  #include <asm/io.h>
  #include <asm/bugs.h>
  
  #include <asm/io.h>
  #include <asm/bugs.h>
-diff -NurpP --minimal linux-4.4.116/ipc/mqueue.c linux-4.4.116-vs2.3.9.7/ipc/mqueue.c
---- linux-4.4.116/ipc/mqueue.c 2018-02-22 21:19:59.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/ipc/mqueue.c       2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/ipc/mqueue.c linux-4.4.197-vs2.3.9.8/ipc/mqueue.c
+--- linux-4.4.197/ipc/mqueue.c 2019-10-22 12:34:40.688560482 +0000
++++ linux-4.4.197-vs2.3.9.8/ipc/mqueue.c       2019-10-05 14:39:58.588586269 +0000
 @@ -35,6 +35,8 @@
  #include <linux/ipc_namespace.h>
  #include <linux/user_namespace.h>
 @@ -35,6 +35,8 @@
  #include <linux/ipc_namespace.h>
  #include <linux/user_namespace.h>
@@ -12761,19 +12732,23 @@ diff -NurpP --minimal linux-4.4.116/ipc/mqueue.c linux-4.4.116-vs2.3.9.7/ipc/mqu
        } else if (S_ISDIR(mode)) {
                inc_nlink(inode);
                /* Some things misbehave if size == 0 on a directory */
        } else if (S_ISDIR(mode)) {
                inc_nlink(inode);
                /* Some things misbehave if size == 0 on a directory */
-@@ -398,8 +406,11 @@ static void mqueue_evict_inode(struct in
+@@ -395,6 +403,7 @@ static void mqueue_evict_inode(struct in
  
        user = info->user;
        if (user) {
 +              struct vx_info *vxi = info->vxi;
  
        user = info->user;
        if (user) {
 +              struct vx_info *vxi = info->vxi;
-+
+               unsigned long mq_bytes, mq_treesize;
+               /* Total amount of bytes accounted for the mqueue */
+@@ -407,6 +416,7 @@ static void mqueue_evict_inode(struct in
                spin_lock(&mq_lock);
                user->mq_bytes -= mq_bytes;
 +              vx_ipcmsg_sub(vxi, user, mq_bytes);
                /*
                 * get_ns_from_inode() ensures that the
                 * (ipc_ns = sb->s_fs_info) is either a valid ipc_ns
                spin_lock(&mq_lock);
                user->mq_bytes -= mq_bytes;
 +              vx_ipcmsg_sub(vxi, user, mq_bytes);
                /*
                 * get_ns_from_inode() ensures that the
                 * (ipc_ns = sb->s_fs_info) is either a valid ipc_ns
-@@ -409,6 +420,7 @@ static void mqueue_evict_inode(struct in
+@@ -416,6 +426,7 @@ static void mqueue_evict_inode(struct in
                if (ipc_ns)
                        ipc_ns->mq_queues_count--;
                spin_unlock(&mq_lock);
                if (ipc_ns)
                        ipc_ns->mq_queues_count--;
                spin_unlock(&mq_lock);
@@ -12781,9 +12756,9 @@ diff -NurpP --minimal linux-4.4.116/ipc/mqueue.c linux-4.4.116-vs2.3.9.7/ipc/mqu
                free_uid(user);
        }
        if (ipc_ns)
                free_uid(user);
        }
        if (ipc_ns)
-diff -NurpP --minimal linux-4.4.116/ipc/msg.c linux-4.4.116-vs2.3.9.7/ipc/msg.c
---- linux-4.4.116/ipc/msg.c    2018-02-22 21:19:59.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/ipc/msg.c  2018-02-10 15:16:50.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/ipc/msg.c linux-4.4.197-vs2.3.9.8/ipc/msg.c
+--- linux-4.4.197/ipc/msg.c    2019-10-22 12:34:40.708560162 +0000
++++ linux-4.4.197-vs2.3.9.8/ipc/msg.c  2018-10-20 04:57:21.000000000 +0000
 @@ -37,6 +37,7 @@
  #include <linux/rwsem.h>
  #include <linux/nsproxy.h>
 @@ -37,6 +37,7 @@
  #include <linux/rwsem.h>
  #include <linux/nsproxy.h>
@@ -12800,9 +12775,9 @@ diff -NurpP --minimal linux-4.4.116/ipc/msg.c linux-4.4.116-vs2.3.9.7/ipc/msg.c
  
        msq->q_perm.security = NULL;
        retval = security_msg_queue_alloc(msq);
  
        msq->q_perm.security = NULL;
        retval = security_msg_queue_alloc(msq);
-diff -NurpP --minimal linux-4.4.116/ipc/sem.c linux-4.4.116-vs2.3.9.7/ipc/sem.c
---- linux-4.4.116/ipc/sem.c    2018-02-22 21:19:59.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/ipc/sem.c  2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/ipc/sem.c linux-4.4.197-vs2.3.9.8/ipc/sem.c
+--- linux-4.4.197/ipc/sem.c    2019-10-22 12:34:40.728559842 +0000
++++ linux-4.4.197-vs2.3.9.8/ipc/sem.c  2018-10-20 04:57:21.000000000 +0000
 @@ -85,6 +85,8 @@
  #include <linux/rwsem.h>
  #include <linux/nsproxy.h>
 @@ -85,6 +85,8 @@
  #include <linux/rwsem.h>
  #include <linux/nsproxy.h>
@@ -12840,9 +12815,9 @@ diff -NurpP --minimal linux-4.4.116/ipc/sem.c linux-4.4.116-vs2.3.9.7/ipc/sem.c
        ipc_rcu_putref(sma, sem_rcu_free);
  }
  
        ipc_rcu_putref(sma, sem_rcu_free);
  }
  
-diff -NurpP --minimal linux-4.4.116/ipc/shm.c linux-4.4.116-vs2.3.9.7/ipc/shm.c
---- linux-4.4.116/ipc/shm.c    2018-02-22 21:19:59.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/ipc/shm.c  2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/ipc/shm.c linux-4.4.197-vs2.3.9.8/ipc/shm.c
+--- linux-4.4.197/ipc/shm.c    2019-10-22 12:34:40.738559683 +0000
++++ linux-4.4.197-vs2.3.9.8/ipc/shm.c  2018-10-20 04:57:21.000000000 +0000
 @@ -42,6 +42,8 @@
  #include <linux/nsproxy.h>
  #include <linux/mount.h>
 @@ -42,6 +42,8 @@
  #include <linux/nsproxy.h>
  #include <linux/mount.h>
@@ -12852,7 +12827,7 @@ diff -NurpP --minimal linux-4.4.116/ipc/shm.c linux-4.4.116-vs2.3.9.7/ipc/shm.c
  
  #include <linux/uaccess.h>
  
  
  #include <linux/uaccess.h>
  
-@@ -228,10 +230,14 @@ static void shm_open(struct vm_area_stru
+@@ -234,10 +236,14 @@ static void shm_open(struct vm_area_stru
  static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)
  {
        struct file *shm_file;
  static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)
  {
        struct file *shm_file;
@@ -12868,7 +12843,7 @@ diff -NurpP --minimal linux-4.4.116/ipc/shm.c linux-4.4.116-vs2.3.9.7/ipc/shm.c
        shm_rmid(ns, shp);
        shm_unlock(shp);
        if (!is_file_hugepages(shm_file))
        shm_rmid(ns, shp);
        shm_unlock(shp);
        if (!is_file_hugepages(shm_file))
-@@ -240,6 +246,7 @@ static void shm_destroy(struct ipc_names
+@@ -246,6 +252,7 @@ static void shm_destroy(struct ipc_names
                user_shm_unlock(i_size_read(file_inode(shm_file)),
                                shp->mlock_user);
        fput(shm_file);
                user_shm_unlock(i_size_read(file_inode(shm_file)),
                                shp->mlock_user);
        fput(shm_file);
@@ -12876,7 +12851,7 @@ diff -NurpP --minimal linux-4.4.116/ipc/shm.c linux-4.4.116-vs2.3.9.7/ipc/shm.c
        ipc_rcu_putref(shp, shm_rcu_free);
  }
  
        ipc_rcu_putref(shp, shm_rcu_free);
  }
  
-@@ -537,11 +544,15 @@ static int newseg(struct ipc_namespace *
+@@ -545,11 +552,15 @@ static int newseg(struct ipc_namespace *
                        ns->shm_tot + numpages > ns->shm_ctlall)
                return -ENOSPC;
  
                        ns->shm_tot + numpages > ns->shm_ctlall)
                return -ENOSPC;
  
@@ -12892,7 +12867,7 @@ diff -NurpP --minimal linux-4.4.116/ipc/shm.c linux-4.4.116-vs2.3.9.7/ipc/shm.c
        shp->shm_perm.mode = (shmflg & S_IRWXUGO);
        shp->mlock_user = NULL;
  
        shp->shm_perm.mode = (shmflg & S_IRWXUGO);
        shp->mlock_user = NULL;
  
-@@ -612,6 +623,7 @@ static int newseg(struct ipc_namespace *
+@@ -620,6 +631,7 @@ static int newseg(struct ipc_namespace *
  
        ipc_unlock_object(&shp->shm_perm);
        rcu_read_unlock();
  
        ipc_unlock_object(&shp->shm_perm);
        rcu_read_unlock();
@@ -12900,21 +12875,10 @@ diff -NurpP --minimal linux-4.4.116/ipc/shm.c linux-4.4.116-vs2.3.9.7/ipc/shm.c
        return error;
  
  no_id:
        return error;
  
  no_id:
-diff -NurpP --minimal linux-4.4.116/kernel/Makefile linux-4.4.116-vs2.3.9.7/kernel/Makefile
---- linux-4.4.116/kernel/Makefile      2016-07-05 04:12:38.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/Makefile    2018-01-09 16:36:33.000000000 +0000
-@@ -29,6 +29,7 @@ obj-y += printk/
- obj-y += irq/
- obj-y += rcu/
- obj-y += livepatch/
-+obj-y += vserver/
- obj-$(CONFIG_CHECKPOINT_RESTORE) += kcmp.o
- obj-$(CONFIG_FREEZER) += freezer.o
-diff -NurpP --minimal linux-4.4.116/kernel/auditsc.c linux-4.4.116-vs2.3.9.7/kernel/auditsc.c
---- linux-4.4.116/kernel/auditsc.c     2018-02-22 21:19:59.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/auditsc.c   2018-01-09 16:36:33.000000000 +0000
-@@ -1962,7 +1962,7 @@ static int audit_set_loginuid_perm(kuid_
+diff -NurpP --minimal linux-4.4.197/kernel/auditsc.c linux-4.4.197-vs2.3.9.8/kernel/auditsc.c
+--- linux-4.4.197/kernel/auditsc.c     2019-10-22 12:34:40.828558245 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/auditsc.c   2018-10-20 05:50:20.000000000 +0000
+@@ -1964,7 +1964,7 @@ static int audit_set_loginuid_perm(kuid_
        if (is_audit_feature_set(AUDIT_FEATURE_LOGINUID_IMMUTABLE))
                return -EPERM;
        /* it is set, you need permission */
        if (is_audit_feature_set(AUDIT_FEATURE_LOGINUID_IMMUTABLE))
                return -EPERM;
        /* it is set, you need permission */
@@ -12923,9 +12887,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/auditsc.c linux-4.4.116-vs2.3.9.7/ker
                return -EPERM;
        /* reject if this is not an unset and we don't allow that */
        if (is_audit_feature_set(AUDIT_FEATURE_ONLY_UNSET_LOGINUID) && uid_valid(loginuid))
                return -EPERM;
        /* reject if this is not an unset and we don't allow that */
        if (is_audit_feature_set(AUDIT_FEATURE_ONLY_UNSET_LOGINUID) && uid_valid(loginuid))
-diff -NurpP --minimal linux-4.4.116/kernel/capability.c linux-4.4.116-vs2.3.9.7/kernel/capability.c
---- linux-4.4.116/kernel/capability.c  2018-02-22 21:19:59.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/capability.c        2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/capability.c linux-4.4.197-vs2.3.9.8/kernel/capability.c
+--- linux-4.4.197/kernel/capability.c  2019-10-22 12:34:40.908556969 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/capability.c        2018-10-20 04:57:21.000000000 +0000
 @@ -17,6 +17,7 @@
  #include <linux/syscalls.h>
  #include <linux/pid_namespace.h>
 @@ -17,6 +17,7 @@
  #include <linux/syscalls.h>
  #include <linux/pid_namespace.h>
@@ -12951,9 +12915,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/capability.c linux-4.4.116-vs2.3.9.7/
  /**
   * has_capability_noaudit - Does a task have a capability (unaudited) in the
   * initial user ns
  /**
   * has_capability_noaudit - Does a task have a capability (unaudited) in the
   * initial user ns
-diff -NurpP --minimal linux-4.4.116/kernel/compat.c linux-4.4.116-vs2.3.9.7/kernel/compat.c
---- linux-4.4.116/kernel/compat.c      2015-07-06 20:41:43.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/compat.c    2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/compat.c linux-4.4.197-vs2.3.9.8/kernel/compat.c
+--- linux-4.4.197/kernel/compat.c      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/compat.c    2018-10-20 04:57:21.000000000 +0000
 @@ -27,6 +27,7 @@
  #include <linux/times.h>
  #include <linux/ptrace.h>
 @@ -27,6 +27,7 @@
  #include <linux/times.h>
  #include <linux/ptrace.h>
@@ -12971,9 +12935,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/compat.c linux-4.4.116-vs2.3.9.7/kern
        return 0;
  }
  
        return 0;
  }
  
-diff -NurpP --minimal linux-4.4.116/kernel/cred.c linux-4.4.116-vs2.3.9.7/kernel/cred.c
---- linux-4.4.116/kernel/cred.c        2018-02-22 21:19:59.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/cred.c      2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/cred.c linux-4.4.197-vs2.3.9.8/kernel/cred.c
+--- linux-4.4.197/kernel/cred.c        2019-10-22 12:34:40.968556008 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/cred.c      2019-10-05 14:35:36.762741001 +0000
 @@ -64,31 +64,6 @@ struct cred init_cred = {
        .group_info             = &init_groups,
  };
 @@ -64,31 +64,6 @@ struct cred init_cred = {
        .group_info             = &init_groups,
  };
@@ -13006,7 +12970,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/cred.c linux-4.4.116-vs2.3.9.7/kernel
  /*
   * The RCU callback to actually dispose of a set of credentials
   */
  /*
   * The RCU callback to actually dispose of a set of credentials
   */
-@@ -240,21 +215,16 @@ error:
+@@ -243,21 +218,16 @@ error:
   *
   * Call commit_creds() or abort_creds() to clean up.
   */
   *
   * Call commit_creds() or abort_creds() to clean up.
   */
@@ -13028,8 +12992,8 @@ diff -NurpP --minimal linux-4.4.116/kernel/cred.c linux-4.4.116-vs2.3.9.7/kernel
 -      old = task->cred;
        memcpy(new, old, sizeof(struct cred));
  
 -      old = task->cred;
        memcpy(new, old, sizeof(struct cred));
  
-       atomic_set(&new->usage, 1);
-@@ -283,6 +253,13 @@ error:
+       new->non_rcu = 0;
+@@ -287,6 +257,13 @@ error:
        abort_creds(new);
        return NULL;
  }
        abort_creds(new);
        return NULL;
  }
@@ -13043,9 +13007,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/cred.c linux-4.4.116-vs2.3.9.7/kernel
  EXPORT_SYMBOL(prepare_creds);
  
  /*
  EXPORT_SYMBOL(prepare_creds);
  
  /*
-diff -NurpP --minimal linux-4.4.116/kernel/exit.c linux-4.4.116-vs2.3.9.7/kernel/exit.c
---- linux-4.4.116/kernel/exit.c        2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/exit.c      2018-02-06 17:16:09.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/exit.c linux-4.4.197-vs2.3.9.8/kernel/exit.c
+--- linux-4.4.197/kernel/exit.c        2019-10-22 12:34:41.168552811 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/exit.c      2019-02-24 12:45:10.423538525 +0000
 @@ -48,6 +48,10 @@
  #include <linux/fs_struct.h>
  #include <linux/init_task.h>
 @@ -48,6 +48,10 @@
  #include <linux/fs_struct.h>
  #include <linux/init_task.h>
@@ -13057,12 +13021,13 @@ diff -NurpP --minimal linux-4.4.116/kernel/exit.c linux-4.4.116-vs2.3.9.7/kernel
  #include <trace/events/sched.h>
  #include <linux/hw_breakpoint.h>
  #include <linux/oom.h>
  #include <trace/events/sched.h>
  #include <linux/hw_breakpoint.h>
  #include <linux/oom.h>
-@@ -456,14 +460,24 @@ static struct task_struct *find_child_re
+@@ -457,15 +461,25 @@ static struct task_struct *find_child_re
  {
        struct pid_namespace *pid_ns = task_active_pid_ns(father);
        struct task_struct *reaper = pid_ns->child_reaper;
 +      struct vx_info *vxi = task_get_vx_info(father);
  {
        struct pid_namespace *pid_ns = task_active_pid_ns(father);
        struct task_struct *reaper = pid_ns->child_reaper;
 +      struct vx_info *vxi = task_get_vx_info(father);
-+
+       struct task_struct *p, *n;
 +      if (vxi) {
 +              BUG_ON(!vxi->vx_reaper);
 +              if (vxi->vx_reaper != init_pid_ns.child_reaper &&
 +      if (vxi) {
 +              BUG_ON(!vxi->vx_reaper);
 +              if (vxi->vx_reaper != init_pid_ns.child_reaper &&
@@ -13071,7 +13036,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/exit.c linux-4.4.116-vs2.3.9.7/kernel
 +                      goto out_put;
 +              }
 +      }
 +                      goto out_put;
 +              }
 +      }
++
        if (likely(reaper != father))
 -              return reaper;
 +              goto out_put;
        if (likely(reaper != father))
 -              return reaper;
 +              goto out_put;
@@ -13084,7 +13049,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/exit.c linux-4.4.116-vs2.3.9.7/kernel
        }
  
        write_unlock_irq(&tasklist_lock);
        }
  
        write_unlock_irq(&tasklist_lock);
-@@ -474,7 +488,10 @@ static struct task_struct *find_child_re
+@@ -482,7 +496,10 @@ static struct task_struct *find_child_re
        zap_pid_ns_processes(pid_ns);
        write_lock_irq(&tasklist_lock);
  
        zap_pid_ns_processes(pid_ns);
        write_lock_irq(&tasklist_lock);
  
@@ -13096,7 +13061,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/exit.c linux-4.4.116-vs2.3.9.7/kernel
  }
  
  /*
  }
  
  /*
-@@ -562,9 +579,13 @@ static void forget_original_parent(struc
+@@ -570,9 +587,13 @@ static void forget_original_parent(struc
                return;
  
        reaper = find_new_reaper(father, reaper);
                return;
  
        reaper = find_new_reaper(father, reaper);
@@ -13112,7 +13077,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/exit.c linux-4.4.116-vs2.3.9.7/kernel
                        BUG_ON((!t->ptrace) != (t->parent == father));
                        if (likely(!t->ptrace))
                                t->parent = t->real_parent;
                        BUG_ON((!t->ptrace) != (t->parent == father));
                        if (likely(!t->ptrace))
                                t->parent = t->real_parent;
-@@ -576,10 +597,13 @@ static void forget_original_parent(struc
+@@ -584,10 +605,13 @@ static void forget_original_parent(struc
                 * If this is a threaded reparent there is no need to
                 * notify anyone anything has happened.
                 */
                 * If this is a threaded reparent there is no need to
                 * notify anyone anything has happened.
                 */
@@ -13128,7 +13093,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/exit.c linux-4.4.116-vs2.3.9.7/kernel
  }
  
  /*
  }
  
  /*
-@@ -763,6 +787,9 @@ void do_exit(long code)
+@@ -771,6 +795,9 @@ void do_exit(long code)
         */
        flush_ptrace_hw_breakpoint(tsk);
  
         */
        flush_ptrace_hw_breakpoint(tsk);
  
@@ -13138,7 +13103,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/exit.c linux-4.4.116-vs2.3.9.7/kernel
        TASKS_RCU(preempt_disable());
        TASKS_RCU(tasks_rcu_i = __srcu_read_lock(&tasks_rcu_exit_srcu));
        TASKS_RCU(preempt_enable());
        TASKS_RCU(preempt_disable());
        TASKS_RCU(tasks_rcu_i = __srcu_read_lock(&tasks_rcu_exit_srcu));
        TASKS_RCU(preempt_enable());
-@@ -800,6 +827,10 @@ void do_exit(long code)
+@@ -808,6 +835,10 @@ void do_exit(long code)
  
        validate_creds_for_do_exit(tsk);
  
  
        validate_creds_for_do_exit(tsk);
  
@@ -13149,7 +13114,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/exit.c linux-4.4.116-vs2.3.9.7/kernel
        check_stack_usage();
        preempt_disable();
        if (tsk->nr_dirtied)
        check_stack_usage();
        preempt_disable();
        if (tsk->nr_dirtied)
-@@ -826,6 +857,7 @@ void do_exit(long code)
+@@ -834,6 +865,7 @@ void do_exit(long code)
        tsk->state = TASK_DEAD;
        tsk->flags |= PF_NOFREEZE;      /* tell freezer to ignore us */
        schedule();
        tsk->state = TASK_DEAD;
        tsk->flags |= PF_NOFREEZE;      /* tell freezer to ignore us */
        schedule();
@@ -13157,9 +13122,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/exit.c linux-4.4.116-vs2.3.9.7/kernel
        BUG();
        /* Avoid "noreturn function does return".  */
        for (;;)
        BUG();
        /* Avoid "noreturn function does return".  */
        for (;;)
-diff -NurpP --minimal linux-4.4.116/kernel/fork.c linux-4.4.116-vs2.3.9.7/kernel/fork.c
---- linux-4.4.116/kernel/fork.c        2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/fork.c      2018-01-09 17:00:00.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/fork.c linux-4.4.197-vs2.3.9.8/kernel/fork.c
+--- linux-4.4.197/kernel/fork.c        2019-10-22 12:34:41.168552811 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/fork.c      2019-10-22 13:45:50.680817558 +0000
 @@ -76,6 +76,9 @@
  #include <linux/aio.h>
  #include <linux/compiler.h>
 @@ -76,6 +76,9 @@
  #include <linux/aio.h>
  #include <linux/compiler.h>
@@ -13179,7 +13144,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/fork.c linux-4.4.116-vs2.3.9.7/kernel
        ftrace_graph_exit_task(tsk);
        put_seccomp_filter(tsk);
        arch_release_task_struct(tsk);
        ftrace_graph_exit_task(tsk);
        put_seccomp_filter(tsk);
        arch_release_task_struct(tsk);
-@@ -1282,6 +1287,8 @@ static struct task_struct *copy_process(
+@@ -1284,6 +1289,8 @@ static struct task_struct *copy_process(
  {
        int retval;
        struct task_struct *p;
  {
        int retval;
        struct task_struct *p;
@@ -13188,7 +13153,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/fork.c linux-4.4.116-vs2.3.9.7/kernel
        void *cgrp_ss_priv[CGROUP_CANFORK_COUNT] = {};
  
        if ((clone_flags & (CLONE_NEWNS|CLONE_FS)) == (CLONE_NEWNS|CLONE_FS))
        void *cgrp_ss_priv[CGROUP_CANFORK_COUNT] = {};
  
        if ((clone_flags & (CLONE_NEWNS|CLONE_FS)) == (CLONE_NEWNS|CLONE_FS))
-@@ -1343,7 +1350,12 @@ static struct task_struct *copy_process(
+@@ -1357,7 +1364,12 @@ static struct task_struct *copy_process(
        DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled);
        DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
  #endif
        DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled);
        DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
  #endif
@@ -13201,7 +13166,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/fork.c linux-4.4.116-vs2.3.9.7/kernel
        if (atomic_read(&p->real_cred->user->processes) >=
                        task_rlimit(p, RLIMIT_NPROC)) {
                if (p->real_cred->user != INIT_USER &&
        if (atomic_read(&p->real_cred->user->processes) >=
                        task_rlimit(p, RLIMIT_NPROC)) {
                if (p->real_cred->user != INIT_USER &&
-@@ -1640,6 +1652,18 @@ static struct task_struct *copy_process(
+@@ -1658,6 +1670,18 @@ static struct task_struct *copy_process(
        total_forks++;
        spin_unlock(&current->sighand->siglock);
        syscall_tracepoint_update(p);
        total_forks++;
        spin_unlock(&current->sighand->siglock);
        syscall_tracepoint_update(p);
@@ -13220,9 +13185,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/fork.c linux-4.4.116-vs2.3.9.7/kernel
        write_unlock_irq(&tasklist_lock);
  
        proc_fork_connector(p);
        write_unlock_irq(&tasklist_lock);
  
        proc_fork_connector(p);
-diff -NurpP --minimal linux-4.4.116/kernel/kthread.c linux-4.4.116-vs2.3.9.7/kernel/kthread.c
---- linux-4.4.116/kernel/kthread.c     2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/kthread.c   2018-01-09 17:01:06.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/kthread.c linux-4.4.197-vs2.3.9.8/kernel/kthread.c
+--- linux-4.4.197/kernel/kthread.c     2019-10-22 12:34:41.318550415 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/kthread.c   2018-10-20 05:50:20.000000000 +0000
 @@ -19,6 +19,7 @@
  #include <linux/ptrace.h>
  #include <linux/uaccess.h>
 @@ -19,6 +19,7 @@
  #include <linux/ptrace.h>
  #include <linux/uaccess.h>
@@ -13231,9 +13196,20 @@ diff -NurpP --minimal linux-4.4.116/kernel/kthread.c linux-4.4.116-vs2.3.9.7/ker
  #include <trace/events/sched.h>
  
  static DEFINE_SPINLOCK(kthread_create_lock);
  #include <trace/events/sched.h>
  
  static DEFINE_SPINLOCK(kthread_create_lock);
-diff -NurpP --minimal linux-4.4.116/kernel/nsproxy.c linux-4.4.116-vs2.3.9.7/kernel/nsproxy.c
---- linux-4.4.116/kernel/nsproxy.c     2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/nsproxy.c   2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/Makefile linux-4.4.197-vs2.3.9.8/kernel/Makefile
+--- linux-4.4.197/kernel/Makefile      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/Makefile    2018-10-20 04:57:21.000000000 +0000
+@@ -29,6 +29,7 @@ obj-y += printk/
+ obj-y += irq/
+ obj-y += rcu/
+ obj-y += livepatch/
++obj-y += vserver/
+ obj-$(CONFIG_CHECKPOINT_RESTORE) += kcmp.o
+ obj-$(CONFIG_FREEZER) += freezer.o
+diff -NurpP --minimal linux-4.4.197/kernel/nsproxy.c linux-4.4.197-vs2.3.9.8/kernel/nsproxy.c
+--- linux-4.4.197/kernel/nsproxy.c     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/nsproxy.c   2018-10-20 04:57:21.000000000 +0000
 @@ -20,11 +20,14 @@
  #include <linux/mnt_namespace.h>
  #include <linux/utsname.h>
 @@ -20,11 +20,14 @@
  #include <linux/mnt_namespace.h>
  #include <linux/utsname.h>
@@ -13418,9 +13394,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/nsproxy.c linux-4.4.116-vs2.3.9.7/ker
                return -EPERM;
  
        *new_nsp = create_new_namespaces(unshare_flags, current, user_ns,
                return -EPERM;
  
        *new_nsp = create_new_namespaces(unshare_flags, current, user_ns,
-diff -NurpP --minimal linux-4.4.116/kernel/pid.c linux-4.4.116-vs2.3.9.7/kernel/pid.c
---- linux-4.4.116/kernel/pid.c 2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/pid.c       2018-01-09 21:54:23.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/pid.c linux-4.4.197-vs2.3.9.8/kernel/pid.c
+--- linux-4.4.197/kernel/pid.c 2019-10-22 12:34:41.408548977 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/pid.c       2018-10-20 04:57:21.000000000 +0000
 @@ -38,6 +38,7 @@
  #include <linux/syscalls.h>
  #include <linux/proc_ns.h>
 @@ -38,6 +38,7 @@
  #include <linux/syscalls.h>
  #include <linux/proc_ns.h>
@@ -13429,7 +13405,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/pid.c linux-4.4.116-vs2.3.9.7/kernel/
  
  #define pid_hashfn(nr, ns)    \
        hash_long((unsigned long)nr + (unsigned long)ns, pidhash_shift)
  
  #define pid_hashfn(nr, ns)    \
        hash_long((unsigned long)nr + (unsigned long)ns, pidhash_shift)
-@@ -379,7 +380,7 @@ EXPORT_SYMBOL_GPL(find_pid_ns);
+@@ -381,7 +382,7 @@ EXPORT_SYMBOL_GPL(find_pid_ns);
  
  struct pid *find_vpid(int nr)
  {
  
  struct pid *find_vpid(int nr)
  {
@@ -13438,7 +13414,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/pid.c linux-4.4.116-vs2.3.9.7/kernel/
  }
  EXPORT_SYMBOL_GPL(find_vpid);
  
  }
  EXPORT_SYMBOL_GPL(find_vpid);
  
-@@ -435,6 +436,9 @@ void transfer_pid(struct task_struct *ol
+@@ -437,6 +438,9 @@ void transfer_pid(struct task_struct *ol
  struct task_struct *pid_task(struct pid *pid, enum pid_type type)
  {
        struct task_struct *result = NULL;
  struct task_struct *pid_task(struct pid *pid, enum pid_type type)
  {
        struct task_struct *result = NULL;
@@ -13448,7 +13424,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/pid.c linux-4.4.116-vs2.3.9.7/kernel/
        if (pid) {
                struct hlist_node *first;
                first = rcu_dereference_check(hlist_first_rcu(&pid->tasks[type]),
        if (pid) {
                struct hlist_node *first;
                first = rcu_dereference_check(hlist_first_rcu(&pid->tasks[type]),
-@@ -453,7 +457,7 @@ struct task_struct *find_task_by_pid_ns(
+@@ -455,7 +459,7 @@ struct task_struct *find_task_by_pid_ns(
  {
        RCU_LOCKDEP_WARN(!rcu_read_lock_held(),
                         "find_task_by_pid_ns() needs rcu_read_lock() protection");
  {
        RCU_LOCKDEP_WARN(!rcu_read_lock_held(),
                         "find_task_by_pid_ns() needs rcu_read_lock() protection");
@@ -13457,7 +13433,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/pid.c linux-4.4.116-vs2.3.9.7/kernel/
  }
  
  struct task_struct *find_task_by_vpid(pid_t vnr)
  }
  
  struct task_struct *find_task_by_vpid(pid_t vnr)
-@@ -497,7 +501,7 @@ struct pid *find_get_pid(pid_t nr)
+@@ -499,7 +503,7 @@ struct pid *find_get_pid(pid_t nr)
  }
  EXPORT_SYMBOL_GPL(find_get_pid);
  
  }
  EXPORT_SYMBOL_GPL(find_get_pid);
  
@@ -13466,7 +13442,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/pid.c linux-4.4.116-vs2.3.9.7/kernel/
  {
        struct upid *upid;
        pid_t nr = 0;
  {
        struct upid *upid;
        pid_t nr = 0;
-@@ -511,6 +515,11 @@ pid_t pid_nr_ns(struct pid *pid, struct
+@@ -513,6 +517,11 @@ pid_t pid_nr_ns(struct pid *pid, struct
  }
  EXPORT_SYMBOL_GPL(pid_nr_ns);
  
  }
  EXPORT_SYMBOL_GPL(pid_nr_ns);
  
@@ -13478,9 +13454,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/pid.c linux-4.4.116-vs2.3.9.7/kernel/
  pid_t pid_vnr(struct pid *pid)
  {
        return pid_nr_ns(pid, task_active_pid_ns(current));
  pid_t pid_vnr(struct pid *pid)
  {
        return pid_nr_ns(pid, task_active_pid_ns(current));
-diff -NurpP --minimal linux-4.4.116/kernel/pid_namespace.c linux-4.4.116-vs2.3.9.7/kernel/pid_namespace.c
---- linux-4.4.116/kernel/pid_namespace.c       2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/pid_namespace.c     2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/pid_namespace.c linux-4.4.197-vs2.3.9.8/kernel/pid_namespace.c
+--- linux-4.4.197/kernel/pid_namespace.c       2019-10-22 12:34:41.408548977 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/pid_namespace.c     2019-10-05 14:35:36.942738146 +0000
 @@ -18,6 +18,7 @@
  #include <linux/proc_ns.h>
  #include <linux/reboot.h>
 @@ -18,6 +18,7 @@
  #include <linux/proc_ns.h>
  #include <linux/reboot.h>
@@ -13505,9 +13481,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/pid_namespace.c linux-4.4.116-vs2.3.9
        kmem_cache_free(pid_ns_cachep, ns);
  out:
        return ERR_PTR(err);
        kmem_cache_free(pid_ns_cachep, ns);
  out:
        return ERR_PTR(err);
-diff -NurpP --minimal linux-4.4.116/kernel/printk/printk.c linux-4.4.116-vs2.3.9.7/kernel/printk/printk.c
---- linux-4.4.116/kernel/printk/printk.c       2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/printk/printk.c     2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/printk/printk.c linux-4.4.197-vs2.3.9.8/kernel/printk/printk.c
+--- linux-4.4.197/kernel/printk/printk.c       2019-10-22 12:34:41.518547219 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/printk/printk.c     2019-10-05 14:35:36.962737828 +0000
 @@ -46,6 +46,7 @@
  #include <linux/utsname.h>
  #include <linux/ctype.h>
 @@ -46,6 +46,7 @@
  #include <linux/utsname.h>
  #include <linux/ctype.h>
@@ -13525,7 +13501,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/printk/printk.c linux-4.4.116-vs2.3.9
                        goto ok;
                /*
                 * For historical reasons, accept CAP_SYS_ADMIN too, with
                        goto ok;
                /*
                 * For historical reasons, accept CAP_SYS_ADMIN too, with
-@@ -1304,12 +1305,9 @@ int do_syslog(int type, char __user *buf
+@@ -1309,12 +1310,9 @@ int do_syslog(int type, char __user *buf
        if (error)
                goto out;
  
        if (error)
                goto out;
  
@@ -13541,7 +13517,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/printk/printk.c linux-4.4.116-vs2.3.9
                error = -EINVAL;
                if (!buf || len < 0)
                        goto out;
                error = -EINVAL;
                if (!buf || len < 0)
                        goto out;
-@@ -1320,6 +1318,16 @@ int do_syslog(int type, char __user *buf
+@@ -1325,6 +1323,16 @@ int do_syslog(int type, char __user *buf
                        error = -EFAULT;
                        goto out;
                }
                        error = -EFAULT;
                        goto out;
                }
@@ -13558,7 +13534,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/printk/printk.c linux-4.4.116-vs2.3.9
                error = wait_event_interruptible(log_wait,
                                                 syslog_seq != log_next_seq);
                if (error)
                error = wait_event_interruptible(log_wait,
                                                 syslog_seq != log_next_seq);
                if (error)
-@@ -1332,16 +1340,6 @@ int do_syslog(int type, char __user *buf
+@@ -1337,16 +1345,6 @@ int do_syslog(int type, char __user *buf
                /* FALL THRU */
        /* Read last kernel messages */
        case SYSLOG_ACTION_READ_ALL:
                /* FALL THRU */
        /* Read last kernel messages */
        case SYSLOG_ACTION_READ_ALL:
@@ -13575,9 +13551,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/printk/printk.c linux-4.4.116-vs2.3.9
                error = syslog_print_all(buf, len, clear);
                break;
        /* Clear ring buffer */
                error = syslog_print_all(buf, len, clear);
                break;
        /* Clear ring buffer */
-diff -NurpP --minimal linux-4.4.116/kernel/ptrace.c linux-4.4.116-vs2.3.9.7/kernel/ptrace.c
---- linux-4.4.116/kernel/ptrace.c      2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/ptrace.c    2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/ptrace.c linux-4.4.197-vs2.3.9.8/kernel/ptrace.c
+--- linux-4.4.197/kernel/ptrace.c      2019-10-22 12:34:41.518547219 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/ptrace.c    2019-10-05 14:37:35.400859010 +0000
 @@ -23,6 +23,7 @@
  #include <linux/syscalls.h>
  #include <linux/uaccess.h>
 @@ -23,6 +23,7 @@
  #include <linux/syscalls.h>
  #include <linux/uaccess.h>
@@ -13586,7 +13562,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/ptrace.c linux-4.4.116-vs2.3.9.7/kern
  #include <linux/hw_breakpoint.h>
  #include <linux/cn_proc.h>
  #include <linux/compat.h>
  #include <linux/hw_breakpoint.h>
  #include <linux/cn_proc.h>
  #include <linux/compat.h>
-@@ -295,6 +296,11 @@ ok:
+@@ -306,6 +307,11 @@ ok:
             !ptrace_has_cap(mm->user_ns, mode)))
            return -EPERM;
  
             !ptrace_has_cap(mm->user_ns, mode)))
            return -EPERM;
  
@@ -13595,12 +13571,12 @@ diff -NurpP --minimal linux-4.4.116/kernel/ptrace.c linux-4.4.116-vs2.3.9.7/kern
 +      if (!vx_check(task->xid, VS_IDENT) &&
 +              !task_vx_flags(task, VXF_STATE_ADMIN, 0))
 +              return -EACCES;
 +      if (!vx_check(task->xid, VS_IDENT) &&
 +              !task_vx_flags(task, VXF_STATE_ADMIN, 0))
 +              return -EACCES;
+       if (mode & PTRACE_MODE_SCHED)
+               return 0;
        return security_ptrace_access_check(task, mode);
        return security_ptrace_access_check(task, mode);
- }
-diff -NurpP --minimal linux-4.4.116/kernel/reboot.c linux-4.4.116-vs2.3.9.7/kernel/reboot.c
---- linux-4.4.116/kernel/reboot.c      2016-07-05 04:12:39.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/reboot.c    2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/reboot.c linux-4.4.197-vs2.3.9.8/kernel/reboot.c
+--- linux-4.4.197/kernel/reboot.c      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/reboot.c    2018-10-20 04:57:21.000000000 +0000
 @@ -16,6 +16,7 @@
  #include <linux/syscalls.h>
  #include <linux/syscore_ops.h>
 @@ -16,6 +16,7 @@
  #include <linux/syscalls.h>
  #include <linux/syscore_ops.h>
@@ -13628,9 +13604,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/reboot.c linux-4.4.116-vs2.3.9.7/kern
        mutex_lock(&reboot_mutex);
        switch (cmd) {
        case LINUX_REBOOT_CMD_RESTART:
        mutex_lock(&reboot_mutex);
        switch (cmd) {
        case LINUX_REBOOT_CMD_RESTART:
-diff -NurpP --minimal linux-4.4.116/kernel/sched/core.c linux-4.4.116-vs2.3.9.7/kernel/sched/core.c
---- linux-4.4.116/kernel/sched/core.c  2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/sched/core.c        2018-02-22 21:30:19.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/sched/core.c linux-4.4.197-vs2.3.9.8/kernel/sched/core.c
+--- linux-4.4.197/kernel/sched/core.c  2019-10-22 12:34:41.628545464 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/sched/core.c        2019-10-05 14:35:37.012737036 +0000
 @@ -74,6 +74,8 @@
  #include <linux/binfmts.h>
  #include <linux/context_tracking.h>
 @@ -74,6 +74,8 @@
  #include <linux/binfmts.h>
  #include <linux/context_tracking.h>
@@ -13640,7 +13616,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/sched/core.c linux-4.4.116-vs2.3.9.7/
  
  #include <asm/switch_to.h>
  #include <asm/tlb.h>
  
  #include <asm/switch_to.h>
  #include <asm/tlb.h>
-@@ -3559,7 +3561,7 @@ SYSCALL_DEFINE1(nice, int, increment)
+@@ -3560,7 +3562,7 @@ SYSCALL_DEFINE1(nice, int, increment)
  
        nice = clamp_val(nice, MIN_NICE, MAX_NICE);
        if (increment < 0 && !can_nice(current, nice))
  
        nice = clamp_val(nice, MIN_NICE, MAX_NICE);
        if (increment < 0 && !can_nice(current, nice))
@@ -13649,9 +13625,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/sched/core.c linux-4.4.116-vs2.3.9.7/
  
        retval = security_task_setnice(current, nice);
        if (retval)
  
        retval = security_task_setnice(current, nice);
        if (retval)
-diff -NurpP --minimal linux-4.4.116/kernel/sched/cputime.c linux-4.4.116-vs2.3.9.7/kernel/sched/cputime.c
---- linux-4.4.116/kernel/sched/cputime.c       2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/sched/cputime.c     2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/sched/cputime.c linux-4.4.197-vs2.3.9.8/kernel/sched/cputime.c
+--- linux-4.4.197/kernel/sched/cputime.c       2019-10-22 12:34:41.628545464 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/sched/cputime.c     2018-10-20 04:57:21.000000000 +0000
 @@ -4,6 +4,7 @@
  #include <linux/kernel_stat.h>
  #include <linux/static_key.h>
 @@ -4,6 +4,7 @@
  #include <linux/kernel_stat.h>
  #include <linux/static_key.h>
@@ -13692,9 +13668,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/sched/cputime.c linux-4.4.116-vs2.3.9
        account_group_system_time(p, cputime);
  
        /* Add system time to cpustat. */
        account_group_system_time(p, cputime);
  
        /* Add system time to cpustat. */
-diff -NurpP --minimal linux-4.4.116/kernel/sched/fair.c linux-4.4.116-vs2.3.9.7/kernel/sched/fair.c
---- linux-4.4.116/kernel/sched/fair.c  2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/sched/fair.c        2018-01-09 16:36:33.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/sched/fair.c linux-4.4.197-vs2.3.9.8/kernel/sched/fair.c
+--- linux-4.4.197/kernel/sched/fair.c  2019-10-22 12:34:41.638545302 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/sched/fair.c        2019-10-05 14:35:37.022736877 +0000
 @@ -30,6 +30,7 @@
  #include <linux/mempolicy.h>
  #include <linux/migrate.h>
 @@ -30,6 +30,7 @@
  #include <linux/mempolicy.h>
  #include <linux/migrate.h>
@@ -13703,7 +13679,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/sched/fair.c linux-4.4.116-vs2.3.9.7/
  
  #include <trace/events/sched.h>
  
  
  #include <trace/events/sched.h>
  
-@@ -3055,6 +3056,8 @@ enqueue_entity(struct cfs_rq *cfs_rq, st
+@@ -3094,6 +3095,8 @@ enqueue_entity(struct cfs_rq *cfs_rq, st
                __enqueue_entity(cfs_rq, se);
        se->on_rq = 1;
  
                __enqueue_entity(cfs_rq, se);
        se->on_rq = 1;
  
@@ -13712,7 +13688,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/sched/fair.c linux-4.4.116-vs2.3.9.7/
        if (cfs_rq->nr_running == 1) {
                list_add_leaf_cfs_rq(cfs_rq);
                check_enqueue_throttle(cfs_rq);
        if (cfs_rq->nr_running == 1) {
                list_add_leaf_cfs_rq(cfs_rq);
                check_enqueue_throttle(cfs_rq);
-@@ -3136,6 +3139,8 @@ dequeue_entity(struct cfs_rq *cfs_rq, st
+@@ -3175,6 +3178,8 @@ dequeue_entity(struct cfs_rq *cfs_rq, st
        if (se != cfs_rq->curr)
                __dequeue_entity(cfs_rq, se);
        se->on_rq = 0;
        if (se != cfs_rq->curr)
                __dequeue_entity(cfs_rq, se);
        se->on_rq = 0;
@@ -13721,9 +13697,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/sched/fair.c linux-4.4.116-vs2.3.9.7/
        account_entity_dequeue(cfs_rq, se);
  
        /*
        account_entity_dequeue(cfs_rq, se);
  
        /*
-diff -NurpP --minimal linux-4.4.116/kernel/sched/loadavg.c linux-4.4.116-vs2.3.9.7/kernel/sched/loadavg.c
---- linux-4.4.116/kernel/sched/loadavg.c       2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/sched/loadavg.c     2018-01-24 23:01:30.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/sched/loadavg.c linux-4.4.197-vs2.3.9.8/kernel/sched/loadavg.c
+--- linux-4.4.197/kernel/sched/loadavg.c       2019-10-22 12:34:41.648545144 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/sched/loadavg.c     2018-10-20 04:57:21.000000000 +0000
 @@ -73,9 +73,16 @@ EXPORT_SYMBOL(avenrun); /* should be rem
   */
  void get_avenrun(unsigned long *loads, unsigned long offset, int shift)
 @@ -73,9 +73,16 @@ EXPORT_SYMBOL(avenrun); /* should be rem
   */
  void get_avenrun(unsigned long *loads, unsigned long offset, int shift)
@@ -13744,9 +13720,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/sched/loadavg.c linux-4.4.116-vs2.3.9
  }
  
  long calc_load_fold_active(struct rq *this_rq)
  }
  
  long calc_load_fold_active(struct rq *this_rq)
-diff -NurpP --minimal linux-4.4.116/kernel/signal.c linux-4.4.116-vs2.3.9.7/kernel/signal.c
---- linux-4.4.116/kernel/signal.c      2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/signal.c    2018-01-11 08:03:00.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/signal.c linux-4.4.197-vs2.3.9.8/kernel/signal.c
+--- linux-4.4.197/kernel/signal.c      2019-10-22 12:34:41.648545144 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/signal.c    2019-10-05 14:35:37.072736083 +0000
 @@ -34,6 +34,8 @@
  #include <linux/compat.h>
  #include <linux/cn_proc.h>
 @@ -34,6 +34,8 @@
  #include <linux/compat.h>
  #include <linux/cn_proc.h>
@@ -13756,7 +13732,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/signal.c linux-4.4.116-vs2.3.9.7/kern
  
  #define CREATE_TRACE_POINTS
  #include <trace/events/signal.h>
  
  #define CREATE_TRACE_POINTS
  #include <trace/events/signal.h>
-@@ -726,9 +728,18 @@ static int check_kill_permission(int sig
+@@ -768,9 +770,18 @@ static int check_kill_permission(int sig
        struct pid *sid;
        int error;
  
        struct pid *sid;
        int error;
  
@@ -13775,7 +13751,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/signal.c linux-4.4.116-vs2.3.9.7/kern
        if (!si_fromuser(info))
                return 0;
  
        if (!si_fromuser(info))
                return 0;
  
-@@ -752,6 +763,20 @@ static int check_kill_permission(int sig
+@@ -794,6 +805,20 @@ static int check_kill_permission(int sig
                }
        }
  
                }
        }
  
@@ -13796,7 +13772,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/signal.c linux-4.4.116-vs2.3.9.7/kern
        return security_task_kill(t, info, sig, 0);
  }
  
        return security_task_kill(t, info, sig, 0);
  }
  
-@@ -1303,8 +1328,14 @@ int kill_pid_info(int sig, struct siginf
+@@ -1345,8 +1370,14 @@ int kill_pid_info(int sig, struct siginf
        for (;;) {
                rcu_read_lock();
                p = pid_task(pid, PIDTYPE_PID);
        for (;;) {
                rcu_read_lock();
                p = pid_task(pid, PIDTYPE_PID);
@@ -13813,7 +13789,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/signal.c linux-4.4.116-vs2.3.9.7/kern
                rcu_read_unlock();
                if (likely(!p || error != -ESRCH))
                        return error;
                rcu_read_unlock();
                if (likely(!p || error != -ESRCH))
                        return error;
-@@ -1349,7 +1380,7 @@ int kill_pid_info_as_cred(int sig, struc
+@@ -1391,7 +1422,7 @@ int kill_pid_info_as_cred(int sig, struc
  
        rcu_read_lock();
        p = pid_task(pid, PIDTYPE_PID);
  
        rcu_read_lock();
        p = pid_task(pid, PIDTYPE_PID);
@@ -13822,7 +13798,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/signal.c linux-4.4.116-vs2.3.9.7/kern
                ret = -ESRCH;
                goto out_unlock;
        }
                ret = -ESRCH;
                goto out_unlock;
        }
-@@ -1401,8 +1432,10 @@ static int kill_something_info(int sig,
+@@ -1447,8 +1478,10 @@ static int kill_something_info(int sig,
                struct task_struct * p;
  
                for_each_process(p) {
                struct task_struct * p;
  
                for_each_process(p) {
@@ -13835,7 +13811,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/signal.c linux-4.4.116-vs2.3.9.7/kern
                                int err = group_send_sig_info(sig, info, p);
                                ++count;
                                if (err != -EPERM)
                                int err = group_send_sig_info(sig, info, p);
                                ++count;
                                if (err != -EPERM)
-@@ -2255,6 +2288,11 @@ relock:
+@@ -2319,6 +2352,11 @@ relock:
                                !sig_kernel_only(signr))
                        continue;
  
                                !sig_kernel_only(signr))
                        continue;
  
@@ -13847,9 +13823,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/signal.c linux-4.4.116-vs2.3.9.7/kern
                if (sig_kernel_stop(signr)) {
                        /*
                         * The default action is to stop all threads in
                if (sig_kernel_stop(signr)) {
                        /*
                         * The default action is to stop all threads in
-diff -NurpP --minimal linux-4.4.116/kernel/softirq.c linux-4.4.116-vs2.3.9.7/kernel/softirq.c
---- linux-4.4.116/kernel/softirq.c     2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/softirq.c   2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/softirq.c linux-4.4.197-vs2.3.9.8/kernel/softirq.c
+--- linux-4.4.197/kernel/softirq.c     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/softirq.c   2018-10-20 04:57:21.000000000 +0000
 @@ -26,6 +26,7 @@
  #include <linux/smpboot.h>
  #include <linux/tick.h>
 @@ -26,6 +26,7 @@
  #include <linux/smpboot.h>
  #include <linux/tick.h>
@@ -13858,18 +13834,18 @@ diff -NurpP --minimal linux-4.4.116/kernel/softirq.c linux-4.4.116-vs2.3.9.7/ker
  
  #define CREATE_TRACE_POINTS
  #include <trace/events/irq.h>
  
  #define CREATE_TRACE_POINTS
  #include <trace/events/irq.h>
-diff -NurpP --minimal linux-4.4.116/kernel/sys.c linux-4.4.116-vs2.3.9.7/kernel/sys.c
---- linux-4.4.116/kernel/sys.c 2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/sys.c       2018-01-09 17:00:36.000000000 +0000
-@@ -54,6 +54,7 @@
- #include <linux/cred.h>
+diff -NurpP --minimal linux-4.4.197/kernel/sys.c linux-4.4.197-vs2.3.9.8/kernel/sys.c
+--- linux-4.4.197/kernel/sys.c 2019-10-22 12:34:41.648545144 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/sys.c       2019-10-05 14:35:37.082735926 +0000
+@@ -56,6 +56,7 @@
+ #include <linux/nospec.h>
  
  #include <linux/kmsg_dump.h>
 +#include <linux/vs_pid.h>
  /* Move somewhere else to avoid recompiling? */
  #include <generated/utsrelease.h>
  
  
  #include <linux/kmsg_dump.h>
 +#include <linux/vs_pid.h>
  /* Move somewhere else to avoid recompiling? */
  #include <generated/utsrelease.h>
  
-@@ -157,7 +158,10 @@ static int set_one_prio(struct task_stru
+@@ -159,7 +160,10 @@ static int set_one_prio(struct task_stru
                goto out;
        }
        if (niceval < task_nice(p) && !can_nice(p, niceval)) {
                goto out;
        }
        if (niceval < task_nice(p) && !can_nice(p, niceval)) {
@@ -13881,7 +13857,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/sys.c linux-4.4.116-vs2.3.9.7/kernel/
                goto out;
        }
        no_nice = security_task_setnice(p, niceval);
                goto out;
        }
        no_nice = security_task_setnice(p, niceval);
-@@ -208,6 +212,8 @@ SYSCALL_DEFINE3(setpriority, int, which,
+@@ -210,6 +214,8 @@ SYSCALL_DEFINE3(setpriority, int, which,
                else
                        pgrp = task_pgrp(current);
                do_each_pid_thread(pgrp, PIDTYPE_PGID, p) {
                else
                        pgrp = task_pgrp(current);
                do_each_pid_thread(pgrp, PIDTYPE_PGID, p) {
@@ -13890,7 +13866,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/sys.c linux-4.4.116-vs2.3.9.7/kernel/
                        error = set_one_prio(p, niceval, error);
                } while_each_pid_thread(pgrp, PIDTYPE_PGID, p);
                break;
                        error = set_one_prio(p, niceval, error);
                } while_each_pid_thread(pgrp, PIDTYPE_PGID, p);
                break;
-@@ -274,6 +280,8 @@ SYSCALL_DEFINE2(getpriority, int, which,
+@@ -276,6 +282,8 @@ SYSCALL_DEFINE2(getpriority, int, which,
                else
                        pgrp = task_pgrp(current);
                do_each_pid_thread(pgrp, PIDTYPE_PGID, p) {
                else
                        pgrp = task_pgrp(current);
                do_each_pid_thread(pgrp, PIDTYPE_PGID, p) {
@@ -13899,7 +13875,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/sys.c linux-4.4.116-vs2.3.9.7/kernel/
                        niceval = nice_to_rlimit(task_nice(p));
                        if (niceval > retval)
                                retval = niceval;
                        niceval = nice_to_rlimit(task_nice(p));
                        if (niceval > retval)
                                retval = niceval;
-@@ -290,6 +298,8 @@ SYSCALL_DEFINE2(getpriority, int, which,
+@@ -292,6 +300,8 @@ SYSCALL_DEFINE2(getpriority, int, which,
                                goto out_unlock;        /* No processes for this user */
                }
                do_each_thread(g, p) {
                                goto out_unlock;        /* No processes for this user */
                }
                do_each_thread(g, p) {
@@ -13908,7 +13884,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/sys.c linux-4.4.116-vs2.3.9.7/kernel/
                        if (uid_eq(task_uid(p), uid) && task_pid_vnr(p)) {
                                niceval = nice_to_rlimit(task_nice(p));
                                if (niceval > retval)
                        if (uid_eq(task_uid(p), uid) && task_pid_vnr(p)) {
                                niceval = nice_to_rlimit(task_nice(p));
                                if (niceval > retval)
-@@ -1217,7 +1227,8 @@ SYSCALL_DEFINE2(sethostname, char __user
+@@ -1211,7 +1221,8 @@ SYSCALL_DEFINE2(sethostname, char __user
        int errno;
        char tmp[__NEW_UTS_LEN];
  
        int errno;
        char tmp[__NEW_UTS_LEN];
  
@@ -13918,7 +13894,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/sys.c linux-4.4.116-vs2.3.9.7/kernel/
                return -EPERM;
  
        if (len < 0 || len > __NEW_UTS_LEN)
                return -EPERM;
  
        if (len < 0 || len > __NEW_UTS_LEN)
-@@ -1268,7 +1279,8 @@ SYSCALL_DEFINE2(setdomainname, char __us
+@@ -1264,7 +1275,8 @@ SYSCALL_DEFINE2(setdomainname, char __us
        int errno;
        char tmp[__NEW_UTS_LEN];
  
        int errno;
        char tmp[__NEW_UTS_LEN];
  
@@ -13928,7 +13904,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/sys.c linux-4.4.116-vs2.3.9.7/kernel/
                return -EPERM;
        if (len < 0 || len > __NEW_UTS_LEN)
                return -EINVAL;
                return -EPERM;
        if (len < 0 || len > __NEW_UTS_LEN)
                return -EINVAL;
-@@ -1386,7 +1398,7 @@ int do_prlimit(struct task_struct *tsk,
+@@ -1384,7 +1396,7 @@ int do_prlimit(struct task_struct *tsk,
                /* Keep the capable check against init_user_ns until
                   cgroups can contain all limits */
                if (new_rlim->rlim_max > rlim->rlim_max &&
                /* Keep the capable check against init_user_ns until
                   cgroups can contain all limits */
                if (new_rlim->rlim_max > rlim->rlim_max &&
@@ -13937,7 +13913,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/sys.c linux-4.4.116-vs2.3.9.7/kernel/
                        retval = -EPERM;
                if (!retval)
                        retval = security_task_setrlimit(tsk->group_leader,
                        retval = -EPERM;
                if (!retval)
                        retval = security_task_setrlimit(tsk->group_leader,
-@@ -1439,7 +1451,8 @@ static int check_prlimit_permission(stru
+@@ -1437,7 +1449,8 @@ static int check_prlimit_permission(stru
            gid_eq(cred->gid, tcred->sgid) &&
            gid_eq(cred->gid, tcred->gid))
                return 0;
            gid_eq(cred->gid, tcred->sgid) &&
            gid_eq(cred->gid, tcred->gid))
                return 0;
@@ -13947,9 +13923,20 @@ diff -NurpP --minimal linux-4.4.116/kernel/sys.c linux-4.4.116-vs2.3.9.7/kernel/
                return 0;
  
        return -EPERM;
                return 0;
  
        return -EPERM;
-diff -NurpP --minimal linux-4.4.116/kernel/sysctl.c linux-4.4.116-vs2.3.9.7/kernel/sysctl.c
---- linux-4.4.116/kernel/sysctl.c      2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/sysctl.c    2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/sysctl_binary.c linux-4.4.197-vs2.3.9.8/kernel/sysctl_binary.c
+--- linux-4.4.197/kernel/sysctl_binary.c       2019-10-22 12:34:41.648545144 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/sysctl_binary.c     2018-10-20 04:57:21.000000000 +0000
+@@ -73,6 +73,7 @@ static const struct bin_table bin_kern_t
+       { CTL_INT,      KERN_PANIC,                     "panic" },
+       { CTL_INT,      KERN_REALROOTDEV,               "real-root-dev" },
++      { CTL_STR,      KERN_VSHELPER,                  "vshelper" },
+       { CTL_STR,      KERN_SPARC_REBOOT,              "reboot-cmd" },
+       { CTL_INT,      KERN_CTLALTDEL,                 "ctrl-alt-del" },
+diff -NurpP --minimal linux-4.4.197/kernel/sysctl.c linux-4.4.197-vs2.3.9.8/kernel/sysctl.c
+--- linux-4.4.197/kernel/sysctl.c      2019-10-22 12:34:41.648545144 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/sysctl.c    2019-10-05 14:35:37.132735132 +0000
 @@ -87,6 +87,7 @@
  #if defined(CONFIG_PROVE_LOCKING) || defined(CONFIG_LOCK_STAT)
  #include <linux/lockdep.h>
 @@ -87,6 +87,7 @@
  #if defined(CONFIG_PROVE_LOCKING) || defined(CONFIG_LOCK_STAT)
  #include <linux/lockdep.h>
@@ -13958,7 +13945,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/sysctl.c linux-4.4.116-vs2.3.9.7/kern
  #ifdef CONFIG_CHR_DEV_SG
  #include <scsi/sg.h>
  #endif
  #ifdef CONFIG_CHR_DEV_SG
  #include <scsi/sg.h>
  #endif
-@@ -279,6 +280,13 @@ static int max_extfrag_threshold = 1000;
+@@ -281,6 +282,13 @@ static int max_extfrag_threshold = 1000;
  
  static struct ctl_table kern_table[] = {
        {
  
  static struct ctl_table kern_table[] = {
        {
@@ -13972,7 +13959,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/sysctl.c linux-4.4.116-vs2.3.9.7/kern
                .procname       = "sched_child_runs_first",
                .data           = &sysctl_sched_child_runs_first,
                .maxlen         = sizeof(unsigned int),
                .procname       = "sched_child_runs_first",
                .data           = &sysctl_sched_child_runs_first,
                .maxlen         = sizeof(unsigned int),
-@@ -1385,7 +1393,6 @@ static struct ctl_table vm_table[] = {
+@@ -1388,7 +1396,6 @@ static struct ctl_table vm_table[] = {
                .extra1         = &zero,
                .extra2         = &one,
        },
                .extra1         = &zero,
                .extra2         = &one,
        },
@@ -13980,20 +13967,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/sysctl.c linux-4.4.116-vs2.3.9.7/kern
  #endif /* CONFIG_COMPACTION */
        {
                .procname       = "min_free_kbytes",
  #endif /* CONFIG_COMPACTION */
        {
                .procname       = "min_free_kbytes",
-diff -NurpP --minimal linux-4.4.116/kernel/sysctl_binary.c linux-4.4.116-vs2.3.9.7/kernel/sysctl_binary.c
---- linux-4.4.116/kernel/sysctl_binary.c       2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/sysctl_binary.c     2018-01-09 16:36:34.000000000 +0000
-@@ -73,6 +73,7 @@ static const struct bin_table bin_kern_t
-       { CTL_INT,      KERN_PANIC,                     "panic" },
-       { CTL_INT,      KERN_REALROOTDEV,               "real-root-dev" },
-+      { CTL_STR,      KERN_VSHELPER,                  "vshelper" },
-       { CTL_STR,      KERN_SPARC_REBOOT,              "reboot-cmd" },
-       { CTL_INT,      KERN_CTLALTDEL,                 "ctrl-alt-del" },
-diff -NurpP --minimal linux-4.4.116/kernel/time/posix-timers.c linux-4.4.116-vs2.3.9.7/kernel/time/posix-timers.c
---- linux-4.4.116/kernel/time/posix-timers.c   2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/time/posix-timers.c 2018-02-22 21:30:19.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/time/posix-timers.c linux-4.4.197-vs2.3.9.8/kernel/time/posix-timers.c
+--- linux-4.4.197/kernel/time/posix-timers.c   2019-10-22 12:34:41.778543065 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/time/posix-timers.c 2019-02-22 08:20:35.190933224 +0000
 @@ -48,6 +48,7 @@
  #include <linux/workqueue.h>
  #include <linux/export.h>
 @@ -48,6 +48,7 @@
  #include <linux/workqueue.h>
  #include <linux/export.h>
@@ -14002,7 +13978,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/time/posix-timers.c linux-4.4.116-vs2
  
  #include "timekeeping.h"
  
  
  #include "timekeeping.h"
  
-@@ -407,6 +408,7 @@ int posix_timer_event(struct k_itimer *t
+@@ -417,6 +418,7 @@ int posix_timer_event(struct k_itimer *t
  {
        struct task_struct *task;
        int shared, ret = -1;
  {
        struct task_struct *task;
        int shared, ret = -1;
@@ -14010,7 +13986,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/time/posix-timers.c linux-4.4.116-vs2
        /*
         * FIXME: if ->sigq is queued we can race with
         * dequeue_signal()->do_schedule_next_timer().
        /*
         * FIXME: if ->sigq is queued we can race with
         * dequeue_signal()->do_schedule_next_timer().
-@@ -423,10 +425,18 @@ int posix_timer_event(struct k_itimer *t
+@@ -433,10 +435,18 @@ int posix_timer_event(struct k_itimer *t
        rcu_read_lock();
        task = pid_task(timr->it_pid, PIDTYPE_PID);
        if (task) {
        rcu_read_lock();
        task = pid_task(timr->it_pid, PIDTYPE_PID);
        if (task) {
@@ -14029,10 +14005,10 @@ diff -NurpP --minimal linux-4.4.116/kernel/time/posix-timers.c linux-4.4.116-vs2
        /* If we failed to send the signal the timer stops. */
        return ret > 0;
  }
        /* If we failed to send the signal the timer stops. */
        return ret > 0;
  }
-diff -NurpP --minimal linux-4.4.116/kernel/time/time.c linux-4.4.116-vs2.3.9.7/kernel/time/time.c
---- linux-4.4.116/kernel/time/time.c   2016-07-05 04:12:39.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/time/time.c 2018-01-09 16:36:34.000000000 +0000
-@@ -37,6 +37,7 @@
+diff -NurpP --minimal linux-4.4.197/kernel/time/time.c linux-4.4.197-vs2.3.9.8/kernel/time/time.c
+--- linux-4.4.197/kernel/time/time.c   2019-10-22 12:34:41.828542266 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/time/time.c 2018-10-20 04:57:21.000000000 +0000
+@@ -38,6 +38,7 @@
  #include <linux/fs.h>
  #include <linux/math64.h>
  #include <linux/ptrace.h>
  #include <linux/fs.h>
  #include <linux/math64.h>
  #include <linux/ptrace.h>
@@ -14040,7 +14016,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/time/time.c linux-4.4.116-vs2.3.9.7/k
  
  #include <asm/uaccess.h>
  #include <asm/unistd.h>
  
  #include <asm/uaccess.h>
  #include <asm/unistd.h>
-@@ -93,7 +94,7 @@ SYSCALL_DEFINE1(stime, time_t __user *,
+@@ -94,7 +95,7 @@ SYSCALL_DEFINE1(stime, time_t __user *,
        if (err)
                return err;
  
        if (err)
                return err;
  
@@ -14049,7 +14025,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/time/time.c linux-4.4.116-vs2.3.9.7/k
        return 0;
  }
  
        return 0;
  }
  
-@@ -186,7 +187,7 @@ int do_sys_settimeofday(const struct tim
+@@ -187,7 +188,7 @@ int do_sys_settimeofday(const struct tim
                }
        }
        if (tv)
                }
        }
        if (tv)
@@ -14058,9 +14034,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/time/time.c linux-4.4.116-vs2.3.9.7/k
        return 0;
  }
  
        return 0;
  }
  
-diff -NurpP --minimal linux-4.4.116/kernel/time/timekeeping.c linux-4.4.116-vs2.3.9.7/kernel/time/timekeeping.c
---- linux-4.4.116/kernel/time/timekeeping.c    2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/time/timekeeping.c  2018-01-09 17:02:47.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/time/timekeeping.c linux-4.4.197-vs2.3.9.8/kernel/time/timekeeping.c
+--- linux-4.4.197/kernel/time/timekeeping.c    2019-10-22 12:34:41.848541946 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/time/timekeeping.c  2019-02-22 08:20:35.190933224 +0000
 @@ -23,6 +23,7 @@
  #include <linux/stop_machine.h>
  #include <linux/pvclock_gtod.h>
 @@ -23,6 +23,7 @@
  #include <linux/stop_machine.h>
  #include <linux/pvclock_gtod.h>
@@ -14069,7 +14045,7 @@ diff -NurpP --minimal linux-4.4.116/kernel/time/timekeeping.c linux-4.4.116-vs2.
  
  #include "tick-internal.h"
  #include "ntp_internal.h"
  
  #include "tick-internal.h"
  #include "ntp_internal.h"
-@@ -921,7 +922,9 @@ void ktime_get_raw_and_real_ts64(struct
+@@ -922,7 +923,9 @@ void ktime_get_raw_and_real_ts64(struct
        } while (read_seqcount_retry(&tk_core.seq, seq));
  
        timespec64_add_ns(ts_raw, nsecs_raw);
        } while (read_seqcount_retry(&tk_core.seq, seq));
  
        timespec64_add_ns(ts_raw, nsecs_raw);
@@ -14079,9 +14055,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/time/timekeeping.c linux-4.4.116-vs2.
  }
  EXPORT_SYMBOL(ktime_get_raw_and_real_ts64);
  
  }
  EXPORT_SYMBOL(ktime_get_raw_and_real_ts64);
  
-diff -NurpP --minimal linux-4.4.116/kernel/time/timer.c linux-4.4.116-vs2.3.9.7/kernel/time/timer.c
---- linux-4.4.116/kernel/time/timer.c  2018-02-22 21:20:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/time/timer.c        2018-02-10 15:16:50.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/time/timer.c linux-4.4.197-vs2.3.9.8/kernel/time/timer.c
+--- linux-4.4.197/kernel/time/timer.c  2019-10-22 12:34:41.878541469 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/time/timer.c        2018-10-20 04:57:21.000000000 +0000
 @@ -42,6 +42,10 @@
  #include <linux/sched/sysctl.h>
  #include <linux/slab.h>
 @@ -42,6 +42,10 @@
  #include <linux/sched/sysctl.h>
  #include <linux/slab.h>
@@ -14093,9 +14069,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/time/timer.c linux-4.4.116-vs2.3.9.7/
  
  #include <asm/uaccess.h>
  #include <asm/unistd.h>
  
  #include <asm/uaccess.h>
  #include <asm/unistd.h>
-diff -NurpP --minimal linux-4.4.116/kernel/user_namespace.c linux-4.4.116-vs2.3.9.7/kernel/user_namespace.c
---- linux-4.4.116/kernel/user_namespace.c      2016-07-05 04:12:39.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/user_namespace.c    2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/user_namespace.c linux-4.4.197-vs2.3.9.8/kernel/user_namespace.c
+--- linux-4.4.197/kernel/user_namespace.c      2019-10-22 12:34:42.308534596 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/user_namespace.c    2018-10-20 05:50:20.000000000 +0000
 @@ -22,6 +22,7 @@
  #include <linux/ctype.h>
  #include <linux/projid.h>
 @@ -22,6 +22,7 @@
  #include <linux/ctype.h>
  #include <linux/projid.h>
@@ -14139,9 +14115,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/user_namespace.c linux-4.4.116-vs2.3.
  /**
   *    make_kprojid - Map a user-namespace projid pair into a kprojid.
   *    @ns:  User namespace that the projid is in
  /**
   *    make_kprojid - Map a user-namespace projid pair into a kprojid.
   *    @ns:  User namespace that the projid is in
-diff -NurpP --minimal linux-4.4.116/kernel/utsname.c linux-4.4.116-vs2.3.9.7/kernel/utsname.c
---- linux-4.4.116/kernel/utsname.c     2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/utsname.c   2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/utsname.c linux-4.4.197-vs2.3.9.8/kernel/utsname.c
+--- linux-4.4.197/kernel/utsname.c     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/utsname.c   2018-10-20 04:57:21.000000000 +0000
 @@ -16,14 +16,17 @@
  #include <linux/slab.h>
  #include <linux/user_namespace.h>
 @@ -16,14 +16,17 @@
  #include <linux/slab.h>
  #include <linux/user_namespace.h>
@@ -14155,279 +14131,23 @@ diff -NurpP --minimal linux-4.4.116/kernel/utsname.c linux-4.4.116-vs2.3.9.7/ker
        uts_ns = kmalloc(sizeof(struct uts_namespace), GFP_KERNEL);
 -      if (uts_ns)
 +      if (uts_ns) {
        uts_ns = kmalloc(sizeof(struct uts_namespace), GFP_KERNEL);
 -      if (uts_ns)
 +      if (uts_ns) {
-               kref_init(&uts_ns->kref);
-+              atomic_inc(&vs_global_uts_ns);
-+      }
-       return uts_ns;
- }
-@@ -87,6 +90,7 @@ void free_uts_ns(struct kref *kref)
-       ns = container_of(kref, struct uts_namespace, kref);
-       put_user_ns(ns->user_ns);
-       ns_free_inum(&ns->ns);
-+      atomic_dec(&vs_global_uts_ns);
-       kfree(ns);
- }
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/Kconfig linux-4.4.116-vs2.3.9.7/kernel/vserver/Kconfig
---- linux-4.4.116/kernel/vserver/Kconfig       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/Kconfig     2018-01-09 16:36:34.000000000 +0000
-@@ -0,0 +1,230 @@
-+#
-+# Linux VServer configuration
-+#
-+
-+menu "Linux VServer"
-+
-+config        VSERVER_AUTO_LBACK
-+      bool    "Automatically Assign Loopback IP"
-+      default y
-+      help
-+        Automatically assign a guest specific loopback
-+        IP and add it to the kernel network stack on
-+        startup.
-+
-+config        VSERVER_AUTO_SINGLE
-+      bool    "Automatic Single IP Special Casing"
-+      default n
-+      help
-+        This allows network contexts with a single IP to
-+        automatically remap 0.0.0.0 bindings to that IP,
-+        avoiding further network checks and improving
-+        performance.
-+
-+        (note: such guests do not allow to change the ip
-+         on the fly and do not show loopback addresses)
-+
-+config        VSERVER_COWBL
-+      bool    "Enable COW Immutable Link Breaking"
-+      default y
-+      help
-+        This enables the COW (Copy-On-Write) link break code.
-+        It allows you to treat unified files like normal files
-+        when writing to them (which will implicitely break the
-+        link and create a copy of the unified file)
-+
-+config        VSERVER_VTIME
-+      bool    "Enable Virtualized Guest Time (EXPERIMENTAL)"
-+      default n
-+      help
-+        This enables per guest time offsets to allow for
-+        adjusting the system clock individually per guest.
-+        this adds some overhead to the time functions and
-+        therefore should not be enabled without good reason.
-+
-+config        VSERVER_DEVICE
-+      bool    "Enable Guest Device Mapping (EXPERIMENTAL)"
-+      default n
-+      help
-+        This enables generic device remapping.
-+
-+config        VSERVER_PROC_SECURE
-+      bool    "Enable Proc Security"
-+      depends on PROC_FS
-+      default y
-+      help
-+        This configures ProcFS security to initially hide
-+        non-process entries for all contexts except the main and
-+        spectator context (i.e. for all guests), which is a secure
-+        default.
-+
-+        (note: on 1.2x the entries were visible by default)
-+
-+choice
-+      prompt  "Persistent Inode Tagging"
-+      default TAGGING_ID24
-+      help
-+        This adds persistent context information to filesystems
-+        mounted with the tagxid option. Tagging is a requirement
-+        for per-context disk limits and per-context quota.
-+
-+
-+config        TAGGING_NONE
-+      bool    "Disabled"
-+      help
-+        do not store per-context information in inodes.
-+
-+config        TAGGING_UID16
-+      bool    "UID16/GID32"
-+      help
-+        reduces UID to 16 bit, but leaves GID at 32 bit.
-+
-+config        TAGGING_GID16
-+      bool    "UID32/GID16"
-+      help
-+        reduces GID to 16 bit, but leaves UID at 32 bit.
-+
-+config        TAGGING_ID24
-+      bool    "UID24/GID24"
-+      help
-+        uses the upper 8bit from UID and GID for XID tagging
-+        which leaves 24bit for UID/GID each, which should be
-+        more than sufficient for normal use.
-+
-+config        TAGGING_INTERN
-+      bool    "UID32/GID32"
-+      help
-+        this uses otherwise reserved inode fields in the on
-+        disk representation, which limits the use to a few
-+        filesystems (currently ext2 and ext3)
-+
-+endchoice
-+
-+config        TAG_NFSD
-+      bool    "Tag NFSD User Auth and Files"
-+      default n
-+      help
-+        Enable this if you do want the in-kernel NFS
-+        Server to use the tagging specified above.
-+        (will require patched clients too)
-+
-+config        VSERVER_PRIVACY
-+      bool    "Honor Privacy Aspects of Guests"
-+      default n
-+      help
-+        When enabled, most context checks will disallow
-+        access to structures assigned to a specific context,
-+        like ptys or loop devices.
-+
-+config        VSERVER_CONTEXTS
-+      int     "Maximum number of Contexts (1-65533)"  if EMBEDDED
-+      range 1 65533
-+      default "768"   if 64BIT
-+      default "256"
-+      help
-+        This setting will optimize certain data structures
-+        and memory allocations according to the expected
-+        maximum.
-+
-+        note: this is not a strict upper limit.
-+
-+config        VSERVER_WARN
-+      bool    "VServer Warnings"
-+      default y
-+      help
-+        This enables various runtime warnings, which will
-+        notify about potential manipulation attempts or
-+        resource shortage. It is generally considered to
-+        be a good idea to have that enabled.
-+
-+config        VSERVER_WARN_DEVPTS
-+      bool    "VServer DevPTS Warnings"
-+      depends on VSERVER_WARN
-+      default y
-+      help
-+        This enables DevPTS related warnings, issued when a
-+        process inside a context tries to lookup or access
-+        a dynamic pts from the host or a different context.
-+
-+config        VSERVER_DEBUG
-+      bool    "VServer Debugging Code"
-+      default n
-+      help
-+        Set this to yes if you want to be able to activate
-+        debugging output at runtime. It adds a very small
-+        overhead to all vserver related functions and
-+        increases the kernel size by about 20k.
-+
-+config        VSERVER_HISTORY
-+      bool    "VServer History Tracing"
-+      depends on VSERVER_DEBUG
-+      default n
-+      help
-+        Set this to yes if you want to record the history of
-+        linux-vserver activities, so they can be replayed in
-+        the event of a kernel panic or oops.
-+
-+config        VSERVER_HISTORY_SIZE
-+      int     "Per-CPU History Size (32-65536)"
-+      depends on VSERVER_HISTORY
-+      range 32 65536
-+      default 64
-+      help
-+        This allows you to specify the number of entries in
-+        the per-CPU history buffer.
-+
-+config        VSERVER_EXTRA_MNT_CHECK
-+      bool    "Extra Checks for Reachability"
-+      default n
-+      help
-+        Set this to yes if you want to do extra checks for
-+        vfsmount reachability in the proc filesystem code.
-+        This shouldn't be required on any setup utilizing
-+        mnt namespaces.
-+
-+choice
-+      prompt  "Quotes used in debug and warn messages"
-+      default QUOTES_ISO8859
-+
-+config        QUOTES_ISO8859
-+      bool    "Extended ASCII (ISO 8859) angle quotes"
-+      help
-+        This uses the extended ASCII characters \xbb
-+        and \xab for quoting file and process names.
-+
-+config        QUOTES_UTF8
-+      bool    "UTF-8 angle quotes"
-+      help
-+        This uses the the UTF-8 sequences for angle
-+        quotes to quote file and process names.
-+
-+config        QUOTES_ASCII
-+      bool    "ASCII single quotes"
-+      help
-+        This uses the ASCII single quote character
-+        (\x27) to quote file and process names.
-+
-+endchoice
-+
-+endmenu
-+
-+
-+config        VSERVER
-+      bool
-+      default y
-+      select NAMESPACES
-+      select UTS_NS
-+      select IPC_NS
-+#     select USER_NS
-+      select SYSVIPC
-+
-+config        VSERVER_SECURITY
-+      bool
-+      depends on SECURITY
-+      default y
-+      select SECURITY_CAPABILITIES
-+
-+config        VSERVER_DISABLED
-+      bool
-+      default n
-+
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/Makefile linux-4.4.116-vs2.3.9.7/kernel/vserver/Makefile
---- linux-4.4.116/kernel/vserver/Makefile      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/Makefile    2018-01-09 16:36:34.000000000 +0000
-@@ -0,0 +1,18 @@
-+#
-+# Makefile for the Linux vserver routines.
-+#
-+
-+
-+obj-y         += vserver.o
-+
-+vserver-y     := switch.o context.o space.o sched.o network.o inode.o \
-+                 limit.o cvirt.o cacct.o signal.o helper.o init.o \
-+                 dlimit.o tag.o
-+
-+vserver-$(CONFIG_INET) += inet.o
-+vserver-$(CONFIG_PROC_FS) += proc.o
-+vserver-$(CONFIG_VSERVER_DEBUG) += sysctl.o debug.o
-+vserver-$(CONFIG_VSERVER_HISTORY) += history.o
-+vserver-$(CONFIG_VSERVER_MONITOR) += monitor.o
-+vserver-$(CONFIG_VSERVER_DEVICE) += device.o
-+
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/cacct.c linux-4.4.116-vs2.3.9.7/kernel/vserver/cacct.c
---- linux-4.4.116/kernel/vserver/cacct.c       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/cacct.c     2018-01-09 16:36:34.000000000 +0000
+               kref_init(&uts_ns->kref);
++              atomic_inc(&vs_global_uts_ns);
++      }
+       return uts_ns;
+ }
+@@ -87,6 +90,7 @@ void free_uts_ns(struct kref *kref)
+       ns = container_of(kref, struct uts_namespace, kref);
+       put_user_ns(ns->user_ns);
+       ns_free_inum(&ns->ns);
++      atomic_dec(&vs_global_uts_ns);
+       kfree(ns);
+ }
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/cacct.c linux-4.4.197-vs2.3.9.8/kernel/vserver/cacct.c
+--- linux-4.4.197/kernel/vserver/cacct.c       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/cacct.c     2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,42 @@
 +/*
 + *  linux/kernel/vserver/cacct.c
 @@ -0,0 +1,42 @@
 +/*
 + *  linux/kernel/vserver/cacct.c
@@ -14471,9 +14191,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/cacct.c linux-4.4.116-vs2.3.9
 +      return 0;
 +}
 +
 +      return 0;
 +}
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/cacct_init.h linux-4.4.116-vs2.3.9.7/kernel/vserver/cacct_init.h
---- linux-4.4.116/kernel/vserver/cacct_init.h  1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/cacct_init.h        2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/cacct_init.h linux-4.4.197-vs2.3.9.8/kernel/vserver/cacct_init.h
+--- linux-4.4.197/kernel/vserver/cacct_init.h  1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/cacct_init.h        2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,25 @@
 +
 +
 @@ -0,0 +1,25 @@
 +
 +
@@ -14500,9 +14220,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/cacct_init.h linux-4.4.116-vs
 +      return;
 +}
 +
 +      return;
 +}
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/cacct_proc.h linux-4.4.116-vs2.3.9.7/kernel/vserver/cacct_proc.h
---- linux-4.4.116/kernel/vserver/cacct_proc.h  1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/cacct_proc.h        2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/cacct_proc.h linux-4.4.197-vs2.3.9.8/kernel/vserver/cacct_proc.h
+--- linux-4.4.197/kernel/vserver/cacct_proc.h  1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/cacct_proc.h        2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,53 @@
 +#ifndef _VX_CACCT_PROC_H
 +#define _VX_CACCT_PROC_H
 @@ -0,0 +1,53 @@
 +#ifndef _VX_CACCT_PROC_H
 +#define _VX_CACCT_PROC_H
@@ -14557,9 +14277,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/cacct_proc.h linux-4.4.116-vs
 +}
 +
 +#endif        /* _VX_CACCT_PROC_H */
 +}
 +
 +#endif        /* _VX_CACCT_PROC_H */
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/context.c linux-4.4.116-vs2.3.9.7/kernel/vserver/context.c
---- linux-4.4.116/kernel/vserver/context.c     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/context.c   2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/context.c linux-4.4.197-vs2.3.9.8/kernel/vserver/context.c
+--- linux-4.4.197/kernel/vserver/context.c     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/context.c   2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,1119 @@
 +/*
 + *  linux/kernel/vserver/context.c
 @@ -0,0 +1,1119 @@
 +/*
 + *  linux/kernel/vserver/context.c
@@ -15680,9 +15400,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/context.c linux-4.4.116-vs2.3
 +
 +EXPORT_SYMBOL_GPL(free_vx_info);
 +
 +
 +EXPORT_SYMBOL_GPL(free_vx_info);
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/cvirt.c linux-4.4.116-vs2.3.9.7/kernel/vserver/cvirt.c
---- linux-4.4.116/kernel/vserver/cvirt.c       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/cvirt.c     2018-01-09 22:27:39.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/cvirt.c linux-4.4.197-vs2.3.9.8/kernel/vserver/cvirt.c
+--- linux-4.4.197/kernel/vserver/cvirt.c       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/cvirt.c     2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,313 @@
 +/*
 + *  linux/kernel/vserver/cvirt.c
 @@ -0,0 +1,313 @@
 +/*
 + *  linux/kernel/vserver/cvirt.c
@@ -15997,9 +15717,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/cvirt.c linux-4.4.116-vs2.3.9
 +
 +#endif
 +
 +
 +#endif
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/cvirt_init.h linux-4.4.116-vs2.3.9.7/kernel/vserver/cvirt_init.h
---- linux-4.4.116/kernel/vserver/cvirt_init.h  1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/cvirt_init.h        2018-01-09 22:16:00.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/cvirt_init.h linux-4.4.197-vs2.3.9.8/kernel/vserver/cvirt_init.h
+--- linux-4.4.197/kernel/vserver/cvirt_init.h  1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/cvirt_init.h        2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,70 @@
 +
 +
 @@ -0,0 +1,70 @@
 +
 +
@@ -16071,9 +15791,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/cvirt_init.h linux-4.4.116-vs
 +      return;
 +}
 +
 +      return;
 +}
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/cvirt_proc.h linux-4.4.116-vs2.3.9.7/kernel/vserver/cvirt_proc.h
---- linux-4.4.116/kernel/vserver/cvirt_proc.h  1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/cvirt_proc.h        2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/cvirt_proc.h linux-4.4.197-vs2.3.9.8/kernel/vserver/cvirt_proc.h
+--- linux-4.4.197/kernel/vserver/cvirt_proc.h  1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/cvirt_proc.h        2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,123 @@
 +#ifndef _VX_CVIRT_PROC_H
 +#define _VX_CVIRT_PROC_H
 @@ -0,0 +1,123 @@
 +#ifndef _VX_CVIRT_PROC_H
 +#define _VX_CVIRT_PROC_H
@@ -16198,9 +15918,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/cvirt_proc.h linux-4.4.116-vs
 +}
 +
 +#endif        /* _VX_CVIRT_PROC_H */
 +}
 +
 +#endif        /* _VX_CVIRT_PROC_H */
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/debug.c linux-4.4.116-vs2.3.9.7/kernel/vserver/debug.c
---- linux-4.4.116/kernel/vserver/debug.c       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/debug.c     2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/debug.c linux-4.4.197-vs2.3.9.8/kernel/vserver/debug.c
+--- linux-4.4.197/kernel/vserver/debug.c       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/debug.c     2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,32 @@
 +/*
 + *  kernel/vserver/debug.c
 @@ -0,0 +1,32 @@
 +/*
 + *  kernel/vserver/debug.c
@@ -16234,9 +15954,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/debug.c linux-4.4.116-vs2.3.9
 +
 +EXPORT_SYMBOL_GPL(dump_vx_info);
 +
 +
 +EXPORT_SYMBOL_GPL(dump_vx_info);
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/device.c linux-4.4.116-vs2.3.9.7/kernel/vserver/device.c
---- linux-4.4.116/kernel/vserver/device.c      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/device.c    2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/device.c linux-4.4.197-vs2.3.9.8/kernel/vserver/device.c
+--- linux-4.4.197/kernel/vserver/device.c      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/device.c    2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,443 @@
 +/*
 + *  linux/kernel/vserver/device.c
 @@ -0,0 +1,443 @@
 +/*
 + *  linux/kernel/vserver/device.c
@@ -16681,9 +16401,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/device.c linux-4.4.116-vs2.3.
 +#endif        /* CONFIG_COMPAT */
 +
 +
 +#endif        /* CONFIG_COMPAT */
 +
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/dlimit.c linux-4.4.116-vs2.3.9.7/kernel/vserver/dlimit.c
---- linux-4.4.116/kernel/vserver/dlimit.c      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/dlimit.c    2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/dlimit.c linux-4.4.197-vs2.3.9.8/kernel/vserver/dlimit.c
+--- linux-4.4.197/kernel/vserver/dlimit.c      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/dlimit.c    2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,528 @@
 +/*
 + *  linux/kernel/vserver/dlimit.c
 @@ -0,0 +1,528 @@
 +/*
 + *  linux/kernel/vserver/dlimit.c
@@ -17213,9 +16933,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/dlimit.c linux-4.4.116-vs2.3.
 +EXPORT_SYMBOL_GPL(locate_dl_info);
 +EXPORT_SYMBOL_GPL(rcu_free_dl_info);
 +
 +EXPORT_SYMBOL_GPL(locate_dl_info);
 +EXPORT_SYMBOL_GPL(rcu_free_dl_info);
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/helper.c linux-4.4.116-vs2.3.9.7/kernel/vserver/helper.c
---- linux-4.4.116/kernel/vserver/helper.c      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/helper.c    2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/helper.c linux-4.4.197-vs2.3.9.8/kernel/vserver/helper.c
+--- linux-4.4.197/kernel/vserver/helper.c      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/helper.c    2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,242 @@
 +/*
 + *  linux/kernel/vserver/helper.c
 @@ -0,0 +1,242 @@
 +/*
 + *  linux/kernel/vserver/helper.c
@@ -17459,9 +17179,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/helper.c linux-4.4.116-vs2.3.
 +      return do_vshelper(vshelper_path, argv, envp, 1);
 +}
 +
 +      return do_vshelper(vshelper_path, argv, envp, 1);
 +}
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/history.c linux-4.4.116-vs2.3.9.7/kernel/vserver/history.c
---- linux-4.4.116/kernel/vserver/history.c     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/history.c   2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/history.c linux-4.4.197-vs2.3.9.8/kernel/vserver/history.c
+--- linux-4.4.197/kernel/vserver/history.c     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/history.c   2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,258 @@
 +/*
 + *  kernel/vserver/history.c
 @@ -0,0 +1,258 @@
 +/*
 + *  kernel/vserver/history.c
@@ -17721,9 +17441,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/history.c linux-4.4.116-vs2.3
 +
 +#endif        /* CONFIG_COMPAT */
 +
 +
 +#endif        /* CONFIG_COMPAT */
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/inet.c linux-4.4.116-vs2.3.9.7/kernel/vserver/inet.c
---- linux-4.4.116/kernel/vserver/inet.c        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/inet.c      2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/inet.c linux-4.4.197-vs2.3.9.8/kernel/vserver/inet.c
+--- linux-4.4.197/kernel/vserver/inet.c        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/inet.c      2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,236 @@
 +
 +#include <linux/in.h>
 @@ -0,0 +1,236 @@
 +
 +#include <linux/in.h>
@@ -17961,9 +17681,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/inet.c linux-4.4.116-vs2.3.9.
 +
 +EXPORT_SYMBOL_GPL(ip_v4_find_src);
 +
 +
 +EXPORT_SYMBOL_GPL(ip_v4_find_src);
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/init.c linux-4.4.116-vs2.3.9.7/kernel/vserver/init.c
---- linux-4.4.116/kernel/vserver/init.c        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/init.c      2018-01-09 22:31:39.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/init.c linux-4.4.197-vs2.3.9.8/kernel/vserver/init.c
+--- linux-4.4.197/kernel/vserver/init.c        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/init.c      2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,46 @@
 +/*
 + *  linux/kernel/init.c
 @@ -0,0 +1,46 @@
 +/*
 + *  linux/kernel/init.c
@@ -18011,9 +17731,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/init.c linux-4.4.116-vs2.3.9.
 +module_init(init_vserver);
 +module_exit(exit_vserver);
 +
 +module_init(init_vserver);
 +module_exit(exit_vserver);
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/inode.c linux-4.4.116-vs2.3.9.7/kernel/vserver/inode.c
---- linux-4.4.116/kernel/vserver/inode.c       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/inode.c     2018-01-09 22:24:56.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/inode.c linux-4.4.197-vs2.3.9.8/kernel/vserver/inode.c
+--- linux-4.4.197/kernel/vserver/inode.c       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/inode.c     2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,440 @@
 +/*
 + *  linux/kernel/vserver/inode.c
 @@ -0,0 +1,440 @@
 +/*
 + *  linux/kernel/vserver/inode.c
@@ -18333,131 +18053,365 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/inode.c linux-4.4.116-vs2.3.9
 +
 +enum { Opt_notagcheck, Opt_tag, Opt_notag, Opt_tagid, Opt_err };
 +
 +
 +enum { Opt_notagcheck, Opt_tag, Opt_notag, Opt_tagid, Opt_err };
 +
-+static match_table_t tokens = {
-+      {Opt_notagcheck, "notagcheck"},
-+#ifdef        CONFIG_PROPAGATE
-+      {Opt_notag, "notag"},
-+      {Opt_tag, "tag"},
-+      {Opt_tagid, "tagid=%u"},
-+#endif
-+      {Opt_err, NULL}
-+};
++static match_table_t tokens = {
++      {Opt_notagcheck, "notagcheck"},
++#ifdef        CONFIG_PROPAGATE
++      {Opt_notag, "notag"},
++      {Opt_tag, "tag"},
++      {Opt_tagid, "tagid=%u"},
++#endif
++      {Opt_err, NULL}
++};
++
++
++static void __dx_parse_remove(char *string, char *opt)
++{
++      char *p = strstr(string, opt);
++      char *q = p;
++
++      if (p) {
++              while (*q != '\0' && *q != ',')
++                      q++;
++              while (*q)
++                      *p++ = *q++;
++              while (*p)
++                      *p++ = '\0';
++      }
++}
++
++int dx_parse_tag(char *string, vtag_t *tag, int remove, int *mnt_flags,
++               unsigned long *flags)
++{
++      int set = 0;
++      substring_t args[MAX_OPT_ARGS];
++      int token;
++      char *s, *p, *opts;
++#if defined(CONFIG_PROPAGATE) || defined(CONFIG_VSERVER_DEBUG)
++      int option = 0;
++#endif
++
++      if (!string)
++              return 0;
++      s = kstrdup(string, GFP_KERNEL | GFP_ATOMIC);
++      if (!s)
++              return 0;
++
++      opts = s;
++      while ((p = strsep(&opts, ",")) != NULL) {
++              token = match_token(p, tokens, args);
++
++              switch (token) {
++#ifdef CONFIG_PROPAGATE
++              case Opt_tag:
++                      if (tag)
++                              *tag = 0;
++                      if (remove)
++                              __dx_parse_remove(s, "tag");
++                      *mnt_flags |= MNT_TAGID;
++                      set |= MNT_TAGID;
++                      break;
++              case Opt_notag:
++                      if (remove)
++                              __dx_parse_remove(s, "notag");
++                      *mnt_flags |= MNT_NOTAG;
++                      set |= MNT_NOTAG;
++                      break;
++              case Opt_tagid:
++                      if (tag && !match_int(args, &option))
++                              *tag = option;
++                      if (remove)
++                              __dx_parse_remove(s, "tagid");
++                      *mnt_flags |= MNT_TAGID;
++                      set |= MNT_TAGID;
++                      break;
++#endif        /* CONFIG_PROPAGATE */
++              case Opt_notagcheck:
++                      if (remove)
++                              __dx_parse_remove(s, "notagcheck");
++                      *flags |= MS_NOTAGCHECK;
++                      set |= MS_NOTAGCHECK;
++                      break;
++              }
++              vxdprintk(VXD_CBIT(tag, 7),
++                      "dx_parse_tag(" VS_Q("%s") "): %d:#%d",
++                      p, token, option);
++      }
++      if (set)
++              strcpy(string, s);
++      kfree(s);
++      return set;
++}
++
++#ifdef        CONFIG_PROPAGATE
++
++void __dx_propagate_tag(struct nameidata *nd, struct inode *inode)
++{
++      vtag_t new_tag = 0;
++      struct vfsmount *mnt;
++      int propagate;
++
++      if (!nd)
++              return;
++      mnt = nd->path.mnt;
++      if (!mnt)
++              return;
++
++      propagate = (mnt->mnt_flags & MNT_TAGID);
++      if (propagate)
++              new_tag = mnt->mnt_tag;
++
++      vxdprintk(VXD_CBIT(tag, 7),
++              "dx_propagate_tag(%p[#%lu.%d]): %d,%d",
++              inode, inode->i_ino, inode->i_tag,
++              new_tag, (propagate) ? 1 : 0);
++
++      if (propagate)
++              i_tag_write(inode, new_tag);
++}
++
++#include <linux/module.h>
++
++EXPORT_SYMBOL_GPL(__dx_propagate_tag);
++
++#endif        /* CONFIG_PROPAGATE */
++
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/Kconfig linux-4.4.197-vs2.3.9.8/kernel/vserver/Kconfig
+--- linux-4.4.197/kernel/vserver/Kconfig       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/Kconfig     2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,230 @@
++#
++# Linux VServer configuration
++#
++
++menu "Linux VServer"
++
++config        VSERVER_AUTO_LBACK
++      bool    "Automatically Assign Loopback IP"
++      default y
++      help
++        Automatically assign a guest specific loopback
++        IP and add it to the kernel network stack on
++        startup.
++
++config        VSERVER_AUTO_SINGLE
++      bool    "Automatic Single IP Special Casing"
++      default n
++      help
++        This allows network contexts with a single IP to
++        automatically remap 0.0.0.0 bindings to that IP,
++        avoiding further network checks and improving
++        performance.
++
++        (note: such guests do not allow to change the ip
++         on the fly and do not show loopback addresses)
++
++config        VSERVER_COWBL
++      bool    "Enable COW Immutable Link Breaking"
++      default y
++      help
++        This enables the COW (Copy-On-Write) link break code.
++        It allows you to treat unified files like normal files
++        when writing to them (which will implicitely break the
++        link and create a copy of the unified file)
++
++config        VSERVER_VTIME
++      bool    "Enable Virtualized Guest Time (EXPERIMENTAL)"
++      default n
++      help
++        This enables per guest time offsets to allow for
++        adjusting the system clock individually per guest.
++        this adds some overhead to the time functions and
++        therefore should not be enabled without good reason.
++
++config        VSERVER_DEVICE
++      bool    "Enable Guest Device Mapping (EXPERIMENTAL)"
++      default n
++      help
++        This enables generic device remapping.
++
++config        VSERVER_PROC_SECURE
++      bool    "Enable Proc Security"
++      depends on PROC_FS
++      default y
++      help
++        This configures ProcFS security to initially hide
++        non-process entries for all contexts except the main and
++        spectator context (i.e. for all guests), which is a secure
++        default.
++
++        (note: on 1.2x the entries were visible by default)
++
++choice
++      prompt  "Persistent Inode Tagging"
++      default TAGGING_ID24
++      help
++        This adds persistent context information to filesystems
++        mounted with the tagxid option. Tagging is a requirement
++        for per-context disk limits and per-context quota.
++
++
++config        TAGGING_NONE
++      bool    "Disabled"
++      help
++        do not store per-context information in inodes.
++
++config        TAGGING_UID16
++      bool    "UID16/GID32"
++      help
++        reduces UID to 16 bit, but leaves GID at 32 bit.
++
++config        TAGGING_GID16
++      bool    "UID32/GID16"
++      help
++        reduces GID to 16 bit, but leaves UID at 32 bit.
++
++config        TAGGING_ID24
++      bool    "UID24/GID24"
++      help
++        uses the upper 8bit from UID and GID for XID tagging
++        which leaves 24bit for UID/GID each, which should be
++        more than sufficient for normal use.
++
++config        TAGGING_INTERN
++      bool    "UID32/GID32"
++      help
++        this uses otherwise reserved inode fields in the on
++        disk representation, which limits the use to a few
++        filesystems (currently ext2 and ext3)
++
++endchoice
++
++config        TAG_NFSD
++      bool    "Tag NFSD User Auth and Files"
++      default n
++      help
++        Enable this if you do want the in-kernel NFS
++        Server to use the tagging specified above.
++        (will require patched clients too)
++
++config        VSERVER_PRIVACY
++      bool    "Honor Privacy Aspects of Guests"
++      default n
++      help
++        When enabled, most context checks will disallow
++        access to structures assigned to a specific context,
++        like ptys or loop devices.
++
++config        VSERVER_CONTEXTS
++      int     "Maximum number of Contexts (1-65533)"  if EMBEDDED
++      range 1 65533
++      default "768"   if 64BIT
++      default "256"
++      help
++        This setting will optimize certain data structures
++        and memory allocations according to the expected
++        maximum.
++
++        note: this is not a strict upper limit.
 +
 +
++config        VSERVER_WARN
++      bool    "VServer Warnings"
++      default y
++      help
++        This enables various runtime warnings, which will
++        notify about potential manipulation attempts or
++        resource shortage. It is generally considered to
++        be a good idea to have that enabled.
 +
 +
-+static void __dx_parse_remove(char *string, char *opt)
-+{
-+      char *p = strstr(string, opt);
-+      char *q = p;
++config        VSERVER_WARN_DEVPTS
++      bool    "VServer DevPTS Warnings"
++      depends on VSERVER_WARN
++      default y
++      help
++        This enables DevPTS related warnings, issued when a
++        process inside a context tries to lookup or access
++        a dynamic pts from the host or a different context.
 +
 +
-+      if (p) {
-+              while (*q != '\0' && *q != ',')
-+                      q++;
-+              while (*q)
-+                      *p++ = *q++;
-+              while (*p)
-+                      *p++ = '\0';
-+      }
-+}
++config        VSERVER_DEBUG
++      bool    "VServer Debugging Code"
++      default n
++      help
++        Set this to yes if you want to be able to activate
++        debugging output at runtime. It adds a very small
++        overhead to all vserver related functions and
++        increases the kernel size by about 20k.
 +
 +
-+int dx_parse_tag(char *string, vtag_t *tag, int remove, int *mnt_flags,
-+               unsigned long *flags)
-+{
-+      int set = 0;
-+      substring_t args[MAX_OPT_ARGS];
-+      int token;
-+      char *s, *p, *opts;
-+#if defined(CONFIG_PROPAGATE) || defined(CONFIG_VSERVER_DEBUG)
-+      int option = 0;
-+#endif
++config        VSERVER_HISTORY
++      bool    "VServer History Tracing"
++      depends on VSERVER_DEBUG
++      default n
++      help
++        Set this to yes if you want to record the history of
++        linux-vserver activities, so they can be replayed in
++        the event of a kernel panic or oops.
 +
 +
-+      if (!string)
-+              return 0;
-+      s = kstrdup(string, GFP_KERNEL | GFP_ATOMIC);
-+      if (!s)
-+              return 0;
++config        VSERVER_HISTORY_SIZE
++      int     "Per-CPU History Size (32-65536)"
++      depends on VSERVER_HISTORY
++      range 32 65536
++      default 64
++      help
++        This allows you to specify the number of entries in
++        the per-CPU history buffer.
 +
 +
-+      opts = s;
-+      while ((p = strsep(&opts, ",")) != NULL) {
-+              token = match_token(p, tokens, args);
++config        VSERVER_EXTRA_MNT_CHECK
++      bool    "Extra Checks for Reachability"
++      default n
++      help
++        Set this to yes if you want to do extra checks for
++        vfsmount reachability in the proc filesystem code.
++        This shouldn't be required on any setup utilizing
++        mnt namespaces.
 +
 +
-+              switch (token) {
-+#ifdef CONFIG_PROPAGATE
-+              case Opt_tag:
-+                      if (tag)
-+                              *tag = 0;
-+                      if (remove)
-+                              __dx_parse_remove(s, "tag");
-+                      *mnt_flags |= MNT_TAGID;
-+                      set |= MNT_TAGID;
-+                      break;
-+              case Opt_notag:
-+                      if (remove)
-+                              __dx_parse_remove(s, "notag");
-+                      *mnt_flags |= MNT_NOTAG;
-+                      set |= MNT_NOTAG;
-+                      break;
-+              case Opt_tagid:
-+                      if (tag && !match_int(args, &option))
-+                              *tag = option;
-+                      if (remove)
-+                              __dx_parse_remove(s, "tagid");
-+                      *mnt_flags |= MNT_TAGID;
-+                      set |= MNT_TAGID;
-+                      break;
-+#endif        /* CONFIG_PROPAGATE */
-+              case Opt_notagcheck:
-+                      if (remove)
-+                              __dx_parse_remove(s, "notagcheck");
-+                      *flags |= MS_NOTAGCHECK;
-+                      set |= MS_NOTAGCHECK;
-+                      break;
-+              }
-+              vxdprintk(VXD_CBIT(tag, 7),
-+                      "dx_parse_tag(" VS_Q("%s") "): %d:#%d",
-+                      p, token, option);
-+      }
-+      if (set)
-+              strcpy(string, s);
-+      kfree(s);
-+      return set;
-+}
++choice
++      prompt  "Quotes used in debug and warn messages"
++      default QUOTES_ISO8859
 +
 +
-+#ifdef        CONFIG_PROPAGATE
++config        QUOTES_ISO8859
++      bool    "Extended ASCII (ISO 8859) angle quotes"
++      help
++        This uses the extended ASCII characters \xbb
++        and \xab for quoting file and process names.
 +
 +
-+void __dx_propagate_tag(struct nameidata *nd, struct inode *inode)
-+{
-+      vtag_t new_tag = 0;
-+      struct vfsmount *mnt;
-+      int propagate;
++config        QUOTES_UTF8
++      bool    "UTF-8 angle quotes"
++      help
++        This uses the the UTF-8 sequences for angle
++        quotes to quote file and process names.
 +
 +
-+      if (!nd)
-+              return;
-+      mnt = nd->path.mnt;
-+      if (!mnt)
-+              return;
++config        QUOTES_ASCII
++      bool    "ASCII single quotes"
++      help
++        This uses the ASCII single quote character
++        (\x27) to quote file and process names.
 +
 +
-+      propagate = (mnt->mnt_flags & MNT_TAGID);
-+      if (propagate)
-+              new_tag = mnt->mnt_tag;
++endchoice
 +
 +
-+      vxdprintk(VXD_CBIT(tag, 7),
-+              "dx_propagate_tag(%p[#%lu.%d]): %d,%d",
-+              inode, inode->i_ino, inode->i_tag,
-+              new_tag, (propagate) ? 1 : 0);
++endmenu
 +
 +
-+      if (propagate)
-+              i_tag_write(inode, new_tag);
-+}
 +
 +
-+#include <linux/module.h>
++config        VSERVER
++      bool
++      default y
++      select NAMESPACES
++      select UTS_NS
++      select IPC_NS
++#     select USER_NS
++      select SYSVIPC
 +
 +
-+EXPORT_SYMBOL_GPL(__dx_propagate_tag);
++config        VSERVER_SECURITY
++      bool
++      depends on SECURITY
++      default y
++      select SECURITY_CAPABILITIES
 +
 +
-+#endif        /* CONFIG_PROPAGATE */
++config        VSERVER_DISABLED
++      bool
++      default n
 +
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/limit.c linux-4.4.116-vs2.3.9.7/kernel/vserver/limit.c
---- linux-4.4.116/kernel/vserver/limit.c       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/limit.c     2018-01-24 23:13:15.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/limit.c linux-4.4.197-vs2.3.9.8/kernel/vserver/limit.c
+--- linux-4.4.197/kernel/vserver/limit.c       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/limit.c     2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,386 @@
 +/*
 + *  linux/kernel/vserver/limit.c
 @@ -0,0 +1,386 @@
 +/*
 + *  linux/kernel/vserver/limit.c
@@ -18845,9 +18799,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/limit.c linux-4.4.116-vs2.3.9
 +}
 +#endif        /* !CONFIG_MEMCG */
 +
 +}
 +#endif        /* !CONFIG_MEMCG */
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/limit_init.h linux-4.4.116-vs2.3.9.7/kernel/vserver/limit_init.h
---- linux-4.4.116/kernel/vserver/limit_init.h  1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/limit_init.h        2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/limit_init.h linux-4.4.197-vs2.3.9.8/kernel/vserver/limit_init.h
+--- linux-4.4.197/kernel/vserver/limit_init.h  1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/limit_init.h        2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,31 @@
 +
 +
 @@ -0,0 +1,31 @@
 +
 +
@@ -18880,9 +18834,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/limit_init.h linux-4.4.116-vs
 +      }
 +}
 +
 +      }
 +}
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/limit_proc.h linux-4.4.116-vs2.3.9.7/kernel/vserver/limit_proc.h
---- linux-4.4.116/kernel/vserver/limit_proc.h  1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/limit_proc.h        2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/limit_proc.h linux-4.4.197-vs2.3.9.8/kernel/vserver/limit_proc.h
+--- linux-4.4.197/kernel/vserver/limit_proc.h  1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/limit_proc.h        2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,57 @@
 +#ifndef _VX_LIMIT_PROC_H
 +#define _VX_LIMIT_PROC_H
 @@ -0,0 +1,57 @@
 +#ifndef _VX_LIMIT_PROC_H
 +#define _VX_LIMIT_PROC_H
@@ -18941,9 +18895,31 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/limit_proc.h linux-4.4.116-vs
 +#endif        /* _VX_LIMIT_PROC_H */
 +
 +
 +#endif        /* _VX_LIMIT_PROC_H */
 +
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/network.c linux-4.4.116-vs2.3.9.7/kernel/vserver/network.c
---- linux-4.4.116/kernel/vserver/network.c     1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/network.c   2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/Makefile linux-4.4.197-vs2.3.9.8/kernel/vserver/Makefile
+--- linux-4.4.197/kernel/vserver/Makefile      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/Makefile    2018-10-20 04:57:21.000000000 +0000
+@@ -0,0 +1,18 @@
++#
++# Makefile for the Linux vserver routines.
++#
++
++
++obj-y         += vserver.o
++
++vserver-y     := switch.o context.o space.o sched.o network.o inode.o \
++                 limit.o cvirt.o cacct.o signal.o helper.o init.o \
++                 dlimit.o tag.o
++
++vserver-$(CONFIG_INET) += inet.o
++vserver-$(CONFIG_PROC_FS) += proc.o
++vserver-$(CONFIG_VSERVER_DEBUG) += sysctl.o debug.o
++vserver-$(CONFIG_VSERVER_HISTORY) += history.o
++vserver-$(CONFIG_VSERVER_MONITOR) += monitor.o
++vserver-$(CONFIG_VSERVER_DEVICE) += device.o
++
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/network.c linux-4.4.197-vs2.3.9.8/kernel/vserver/network.c
+--- linux-4.4.197/kernel/vserver/network.c     1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/network.c   2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,1053 @@
 +/*
 + *  linux/kernel/vserver/network.c
 @@ -0,0 +1,1053 @@
 +/*
 + *  linux/kernel/vserver/network.c
@@ -19998,9 +19974,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/network.c linux-4.4.116-vs2.3
 +EXPORT_SYMBOL_GPL(free_nx_info);
 +EXPORT_SYMBOL_GPL(unhash_nx_info);
 +
 +EXPORT_SYMBOL_GPL(free_nx_info);
 +EXPORT_SYMBOL_GPL(unhash_nx_info);
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/proc.c linux-4.4.116-vs2.3.9.7/kernel/vserver/proc.c
---- linux-4.4.116/kernel/vserver/proc.c        1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/proc.c      2018-01-11 12:02:42.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/proc.c linux-4.4.197-vs2.3.9.8/kernel/vserver/proc.c
+--- linux-4.4.197/kernel/vserver/proc.c        1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/proc.c      2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,1040 @@
 +/*
 + *  linux/kernel/vserver/proc.c
 @@ -0,0 +1,1040 @@
 +/*
 + *  linux/kernel/vserver/proc.c
@@ -21042,9 +21018,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/proc.c linux-4.4.116-vs2.3.9.
 +      return 0;
 +}
 +
 +      return 0;
 +}
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/sched.c linux-4.4.116-vs2.3.9.7/kernel/vserver/sched.c
---- linux-4.4.116/kernel/vserver/sched.c       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/sched.c     2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/sched.c linux-4.4.197-vs2.3.9.8/kernel/vserver/sched.c
+--- linux-4.4.197/kernel/vserver/sched.c       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/sched.c     2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,83 @@
 +/*
 + *  linux/kernel/vserver/sched.c
 @@ -0,0 +1,83 @@
 +/*
 + *  linux/kernel/vserver/sched.c
@@ -21129,9 +21105,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/sched.c linux-4.4.116-vs2.3.9
 +      return 0;
 +}
 +
 +      return 0;
 +}
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/sched_init.h linux-4.4.116-vs2.3.9.7/kernel/vserver/sched_init.h
---- linux-4.4.116/kernel/vserver/sched_init.h  1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/sched_init.h        2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/sched_init.h linux-4.4.197-vs2.3.9.8/kernel/vserver/sched_init.h
+--- linux-4.4.197/kernel/vserver/sched_init.h  1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/sched_init.h        2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,27 @@
 +
 +static inline void vx_info_init_sched(struct _vx_sched *sched)
 @@ -0,0 +1,27 @@
 +
 +static inline void vx_info_init_sched(struct _vx_sched *sched)
@@ -21160,9 +21136,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/sched_init.h linux-4.4.116-vs
 +{
 +      return;
 +}
 +{
 +      return;
 +}
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/sched_proc.h linux-4.4.116-vs2.3.9.7/kernel/vserver/sched_proc.h
---- linux-4.4.116/kernel/vserver/sched_proc.h  1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/sched_proc.h        2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/sched_proc.h linux-4.4.197-vs2.3.9.8/kernel/vserver/sched_proc.h
+--- linux-4.4.197/kernel/vserver/sched_proc.h  1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/sched_proc.h        2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,32 @@
 +#ifndef _VX_SCHED_PROC_H
 +#define _VX_SCHED_PROC_H
 @@ -0,0 +1,32 @@
 +#ifndef _VX_SCHED_PROC_H
 +#define _VX_SCHED_PROC_H
@@ -21196,9 +21172,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/sched_proc.h linux-4.4.116-vs
 +}
 +
 +#endif        /* _VX_SCHED_PROC_H */
 +}
 +
 +#endif        /* _VX_SCHED_PROC_H */
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/signal.c linux-4.4.116-vs2.3.9.7/kernel/vserver/signal.c
---- linux-4.4.116/kernel/vserver/signal.c      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/signal.c    2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/signal.c linux-4.4.197-vs2.3.9.8/kernel/vserver/signal.c
+--- linux-4.4.197/kernel/vserver/signal.c      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/signal.c    2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,134 @@
 +/*
 + *  linux/kernel/vserver/signal.c
 @@ -0,0 +1,134 @@
 +/*
 + *  linux/kernel/vserver/signal.c
@@ -21334,9 +21310,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/signal.c linux-4.4.116-vs2.3.
 +      return ret;
 +}
 +
 +      return ret;
 +}
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/space.c linux-4.4.116-vs2.3.9.7/kernel/vserver/space.c
---- linux-4.4.116/kernel/vserver/space.c       1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/space.c     2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/space.c linux-4.4.197-vs2.3.9.8/kernel/vserver/space.c
+--- linux-4.4.197/kernel/vserver/space.c       1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/space.c     2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,436 @@
 +/*
 + *  linux/kernel/vserver/space.c
 @@ -0,0 +1,436 @@
 +/*
 + *  linux/kernel/vserver/space.c
@@ -21774,9 +21750,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/space.c linux-4.4.116-vs2.3.9
 +      return 0;
 +}
 +
 +      return 0;
 +}
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/switch.c linux-4.4.116-vs2.3.9.7/kernel/vserver/switch.c
---- linux-4.4.116/kernel/vserver/switch.c      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/switch.c    2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/switch.c linux-4.4.197-vs2.3.9.8/kernel/vserver/switch.c
+--- linux-4.4.197/kernel/vserver/switch.c      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/switch.c    2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,556 @@
 +/*
 + *  linux/kernel/vserver/switch.c
 @@ -0,0 +1,556 @@
 +/*
 + *  linux/kernel/vserver/switch.c
@@ -22334,9 +22310,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/switch.c linux-4.4.116-vs2.3.
 +}
 +
 +#endif        /* CONFIG_COMPAT */
 +}
 +
 +#endif        /* CONFIG_COMPAT */
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/sysctl.c linux-4.4.116-vs2.3.9.7/kernel/vserver/sysctl.c
---- linux-4.4.116/kernel/vserver/sysctl.c      1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/sysctl.c    2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/sysctl.c linux-4.4.197-vs2.3.9.8/kernel/vserver/sysctl.c
+--- linux-4.4.197/kernel/vserver/sysctl.c      1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/sysctl.c    2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,247 @@
 +/*
 + *  kernel/vserver/sysctl.c
 @@ -0,0 +1,247 @@
 +/*
 + *  kernel/vserver/sysctl.c
@@ -22585,9 +22561,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/sysctl.c linux-4.4.116-vs2.3.
 +EXPORT_SYMBOL_GPL(vs_debug_perm);
 +EXPORT_SYMBOL_GPL(vs_debug_misc);
 +
 +EXPORT_SYMBOL_GPL(vs_debug_perm);
 +EXPORT_SYMBOL_GPL(vs_debug_misc);
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/tag.c linux-4.4.116-vs2.3.9.7/kernel/vserver/tag.c
---- linux-4.4.116/kernel/vserver/tag.c 1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/tag.c       2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/tag.c linux-4.4.197-vs2.3.9.8/kernel/vserver/tag.c
+--- linux-4.4.197/kernel/vserver/tag.c 1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/tag.c       2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,63 @@
 +/*
 + *  linux/kernel/vserver/tag.c
 @@ -0,0 +1,63 @@
 +/*
 + *  linux/kernel/vserver/tag.c
@@ -22652,9 +22628,9 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/tag.c linux-4.4.116-vs2.3.9.7
 +}
 +
 +
 +}
 +
 +
-diff -NurpP --minimal linux-4.4.116/kernel/vserver/vci_config.h linux-4.4.116-vs2.3.9.7/kernel/vserver/vci_config.h
---- linux-4.4.116/kernel/vserver/vci_config.h  1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/kernel/vserver/vci_config.h        2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/kernel/vserver/vci_config.h linux-4.4.197-vs2.3.9.8/kernel/vserver/vci_config.h
+--- linux-4.4.197/kernel/vserver/vci_config.h  1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/kernel/vserver/vci_config.h        2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,80 @@
 +
 +/*  interface version */
 @@ -0,0 +1,80 @@
 +
 +/*  interface version */
@@ -22736,10 +22712,10 @@ diff -NurpP --minimal linux-4.4.116/kernel/vserver/vci_config.h linux-4.4.116-vs
 +      0;
 +}
 +
 +      0;
 +}
 +
-diff -NurpP --minimal linux-4.4.116/mm/memcontrol.c linux-4.4.116-vs2.3.9.7/mm/memcontrol.c
---- linux-4.4.116/mm/memcontrol.c      2018-02-22 21:20:01.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/mm/memcontrol.c    2018-02-10 15:16:50.000000000 +0000
-@@ -2888,6 +2888,42 @@ static u64 mem_cgroup_read_u64(struct cg
+diff -NurpP --minimal linux-4.4.197/mm/memcontrol.c linux-4.4.197-vs2.3.9.8/mm/memcontrol.c
+--- linux-4.4.197/mm/memcontrol.c      2019-10-22 12:34:43.988507753 +0000
++++ linux-4.4.197-vs2.3.9.8/mm/memcontrol.c    2019-10-05 14:35:37.712725933 +0000
+@@ -2907,6 +2907,42 @@ static u64 mem_cgroup_read_u64(struct cg
        }
  }
  
        }
  }
  
@@ -22782,9 +22758,9 @@ diff -NurpP --minimal linux-4.4.116/mm/memcontrol.c linux-4.4.116-vs2.3.9.7/mm/m
  #ifdef CONFIG_MEMCG_KMEM
  static int memcg_activate_kmem(struct mem_cgroup *memcg,
                               unsigned long nr_pages)
  #ifdef CONFIG_MEMCG_KMEM
  static int memcg_activate_kmem(struct mem_cgroup *memcg,
                               unsigned long nr_pages)
-diff -NurpP --minimal linux-4.4.116/mm/oom_kill.c linux-4.4.116-vs2.3.9.7/mm/oom_kill.c
---- linux-4.4.116/mm/oom_kill.c        2016-07-05 04:15:13.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/mm/oom_kill.c      2018-01-09 16:56:23.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/mm/oom_kill.c linux-4.4.197-vs2.3.9.8/mm/oom_kill.c
+--- linux-4.4.197/mm/oom_kill.c        2019-10-22 12:34:44.058506635 +0000
++++ linux-4.4.197-vs2.3.9.8/mm/oom_kill.c      2019-02-22 08:20:35.470928469 +0000
 @@ -35,6 +35,8 @@
  #include <linux/freezer.h>
  #include <linux/ftrace.h>
 @@ -35,6 +35,8 @@
  #include <linux/freezer.h>
  #include <linux/ftrace.h>
@@ -22825,7 +22801,7 @@ diff -NurpP --minimal linux-4.4.116/mm/oom_kill.c linux-4.4.116-vs2.3.9.7/mm/oom
  
        /*
         * If any of p's children has a different mm and is eligible for kill,
  
        /*
         * If any of p's children has a different mm and is eligible for kill,
-@@ -585,8 +594,8 @@ void oom_kill_process(struct oom_control
+@@ -593,8 +602,8 @@ void oom_kill_process(struct oom_control
         */
        do_send_sig_info(SIGKILL, SEND_SIG_FORCED, victim, true);
        mark_oom_victim(victim);
         */
        do_send_sig_info(SIGKILL, SEND_SIG_FORCED, victim, true);
        mark_oom_victim(victim);
@@ -22836,7 +22812,7 @@ diff -NurpP --minimal linux-4.4.116/mm/oom_kill.c linux-4.4.116-vs2.3.9.7/mm/oom
                K(get_mm_counter(victim->mm, MM_ANONPAGES)),
                K(get_mm_counter(victim->mm, MM_FILEPAGES)));
        task_unlock(victim);
                K(get_mm_counter(victim->mm, MM_ANONPAGES)),
                K(get_mm_counter(victim->mm, MM_FILEPAGES)));
        task_unlock(victim);
-@@ -622,6 +631,8 @@ void oom_kill_process(struct oom_control
+@@ -630,6 +639,8 @@ void oom_kill_process(struct oom_control
  }
  #undef K
  
  }
  #undef K
  
@@ -22845,7 +22821,7 @@ diff -NurpP --minimal linux-4.4.116/mm/oom_kill.c linux-4.4.116-vs2.3.9.7/mm/oom
  /*
   * Determines whether the kernel must panic because of the panic_on_oom sysctl.
   */
  /*
   * Determines whether the kernel must panic because of the panic_on_oom sysctl.
   */
-@@ -722,7 +733,12 @@ bool out_of_memory(struct oom_control *o
+@@ -730,7 +741,12 @@ bool out_of_memory(struct oom_control *o
        /* Found nothing?!?! Either we hang forever, or we panic. */
        if (!p && !is_sysrq_oom(oc)) {
                dump_header(oc, NULL, NULL);
        /* Found nothing?!?! Either we hang forever, or we panic. */
        if (!p && !is_sysrq_oom(oc)) {
                dump_header(oc, NULL, NULL);
@@ -22859,9 +22835,9 @@ diff -NurpP --minimal linux-4.4.116/mm/oom_kill.c linux-4.4.116-vs2.3.9.7/mm/oom
        }
        if (p && p != (void *)-1UL) {
                oom_kill_process(oc, p, points, totalpages, NULL,
        }
        if (p && p != (void *)-1UL) {
                oom_kill_process(oc, p, points, totalpages, NULL,
-diff -NurpP --minimal linux-4.4.116/mm/page_alloc.c linux-4.4.116-vs2.3.9.7/mm/page_alloc.c
---- linux-4.4.116/mm/page_alloc.c      2018-02-22 21:20:01.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/mm/page_alloc.c    2018-02-10 15:16:50.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/mm/page_alloc.c linux-4.4.197-vs2.3.9.8/mm/page_alloc.c
+--- linux-4.4.197/mm/page_alloc.c      2019-10-22 12:34:44.058506635 +0000
++++ linux-4.4.197-vs2.3.9.8/mm/page_alloc.c    2018-10-20 04:57:21.000000000 +0000
 @@ -62,6 +62,8 @@
  #include <linux/sched/rt.h>
  #include <linux/page_owner.h>
 @@ -62,6 +62,8 @@
  #include <linux/sched/rt.h>
  #include <linux/page_owner.h>
@@ -22871,7 +22847,7 @@ diff -NurpP --minimal linux-4.4.116/mm/page_alloc.c linux-4.4.116-vs2.3.9.7/mm/p
  
  #include <asm/sections.h>
  #include <asm/tlbflush.h>
  
  #include <asm/sections.h>
  #include <asm/tlbflush.h>
-@@ -3661,6 +3663,9 @@ void si_meminfo(struct sysinfo *val)
+@@ -3659,6 +3661,9 @@ void si_meminfo(struct sysinfo *val)
        val->totalhigh = totalhigh_pages;
        val->freehigh = nr_free_highpages();
        val->mem_unit = PAGE_SIZE;
        val->totalhigh = totalhigh_pages;
        val->freehigh = nr_free_highpages();
        val->mem_unit = PAGE_SIZE;
@@ -22881,7 +22857,7 @@ diff -NurpP --minimal linux-4.4.116/mm/page_alloc.c linux-4.4.116-vs2.3.9.7/mm/p
  }
  
  EXPORT_SYMBOL(si_meminfo);
  }
  
  EXPORT_SYMBOL(si_meminfo);
-@@ -3686,6 +3691,9 @@ void si_meminfo_node(struct sysinfo *val
+@@ -3684,6 +3689,9 @@ void si_meminfo_node(struct sysinfo *val
        val->freehigh = 0;
  #endif
        val->mem_unit = PAGE_SIZE;
        val->freehigh = 0;
  #endif
        val->mem_unit = PAGE_SIZE;
@@ -22891,9 +22867,9 @@ diff -NurpP --minimal linux-4.4.116/mm/page_alloc.c linux-4.4.116-vs2.3.9.7/mm/p
  }
  #endif
  
  }
  #endif
  
-diff -NurpP --minimal linux-4.4.116/mm/pgtable-generic.c linux-4.4.116-vs2.3.9.7/mm/pgtable-generic.c
---- linux-4.4.116/mm/pgtable-generic.c 2018-02-22 21:20:01.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/mm/pgtable-generic.c       2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/mm/pgtable-generic.c linux-4.4.197-vs2.3.9.8/mm/pgtable-generic.c
+--- linux-4.4.197/mm/pgtable-generic.c 2019-10-22 12:34:44.058506635 +0000
++++ linux-4.4.197-vs2.3.9.8/mm/pgtable-generic.c       2018-10-20 04:57:21.000000000 +0000
 @@ -6,6 +6,8 @@
   *  Copyright (C) 2010  Linus Torvalds
   */
 @@ -6,6 +6,8 @@
   *  Copyright (C) 2010  Linus Torvalds
   */
@@ -22903,9 +22879,9 @@ diff -NurpP --minimal linux-4.4.116/mm/pgtable-generic.c linux-4.4.116-vs2.3.9.7
  #include <linux/pagemap.h>
  #include <asm/tlb.h>
  #include <asm-generic/pgtable.h>
  #include <linux/pagemap.h>
  #include <asm/tlb.h>
  #include <asm-generic/pgtable.h>
-diff -NurpP --minimal linux-4.4.116/mm/shmem.c linux-4.4.116-vs2.3.9.7/mm/shmem.c
---- linux-4.4.116/mm/shmem.c   2018-02-22 21:20:01.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/mm/shmem.c 2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/mm/shmem.c linux-4.4.197-vs2.3.9.8/mm/shmem.c
+--- linux-4.4.197/mm/shmem.c   2019-10-22 12:34:44.078506315 +0000
++++ linux-4.4.197-vs2.3.9.8/mm/shmem.c 2019-10-05 14:35:37.802724503 +0000
 @@ -2198,7 +2198,7 @@ static int shmem_statfs(struct dentry *d
  {
        struct shmem_sb_info *sbinfo = SHMEM_SB(dentry->d_sb);
 @@ -2198,7 +2198,7 @@ static int shmem_statfs(struct dentry *d
  {
        struct shmem_sb_info *sbinfo = SHMEM_SB(dentry->d_sb);
@@ -22915,7 +22891,7 @@ diff -NurpP --minimal linux-4.4.116/mm/shmem.c linux-4.4.116-vs2.3.9.7/mm/shmem.
        buf->f_bsize = PAGE_CACHE_SIZE;
        buf->f_namelen = NAME_MAX;
        if (sbinfo->max_blocks) {
        buf->f_bsize = PAGE_CACHE_SIZE;
        buf->f_namelen = NAME_MAX;
        if (sbinfo->max_blocks) {
-@@ -3044,7 +3044,7 @@ int shmem_fill_super(struct super_block
+@@ -3048,7 +3048,7 @@ int shmem_fill_super(struct super_block
        sb->s_maxbytes = MAX_LFS_FILESIZE;
        sb->s_blocksize = PAGE_CACHE_SIZE;
        sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
        sb->s_maxbytes = MAX_LFS_FILESIZE;
        sb->s_blocksize = PAGE_CACHE_SIZE;
        sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
@@ -22924,9 +22900,9 @@ diff -NurpP --minimal linux-4.4.116/mm/shmem.c linux-4.4.116-vs2.3.9.7/mm/shmem.
        sb->s_op = &shmem_ops;
        sb->s_time_gran = 1;
  #ifdef CONFIG_TMPFS_XATTR
        sb->s_op = &shmem_ops;
        sb->s_time_gran = 1;
  #ifdef CONFIG_TMPFS_XATTR
-diff -NurpP --minimal linux-4.4.116/mm/slab.c linux-4.4.116-vs2.3.9.7/mm/slab.c
---- linux-4.4.116/mm/slab.c    2016-07-05 04:15:13.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/mm/slab.c  2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/mm/slab.c linux-4.4.197-vs2.3.9.8/mm/slab.c
+--- linux-4.4.197/mm/slab.c    2019-10-22 12:34:44.098505995 +0000
++++ linux-4.4.197-vs2.3.9.8/mm/slab.c  2019-10-05 14:35:37.812724346 +0000
 @@ -337,6 +337,8 @@ static void kmem_cache_node_init(struct
  #define STATS_INC_FREEMISS(x) do { } while (0)
  #endif
 @@ -337,6 +337,8 @@ static void kmem_cache_node_init(struct
  #define STATS_INC_FREEMISS(x) do { } while (0)
  #endif
@@ -22936,7 +22912,7 @@ diff -NurpP --minimal linux-4.4.116/mm/slab.c linux-4.4.116-vs2.3.9.7/mm/slab.c
  #if DEBUG
  
  /*
  #if DEBUG
  
  /*
-@@ -3183,6 +3185,7 @@ slab_alloc_node(struct kmem_cache *cache
+@@ -3186,6 +3188,7 @@ slab_alloc_node(struct kmem_cache *cache
        /* ___cache_alloc_node can fall back to other nodes */
        ptr = ____cache_alloc_node(cachep, flags, nodeid);
    out:
        /* ___cache_alloc_node can fall back to other nodes */
        ptr = ____cache_alloc_node(cachep, flags, nodeid);
    out:
@@ -22944,7 +22920,7 @@ diff -NurpP --minimal linux-4.4.116/mm/slab.c linux-4.4.116-vs2.3.9.7/mm/slab.c
        local_irq_restore(save_flags);
        ptr = cache_alloc_debugcheck_after(cachep, flags, ptr, caller);
        kmemleak_alloc_recursive(ptr, cachep->object_size, 1, cachep->flags,
        local_irq_restore(save_flags);
        ptr = cache_alloc_debugcheck_after(cachep, flags, ptr, caller);
        kmemleak_alloc_recursive(ptr, cachep->object_size, 1, cachep->flags,
-@@ -3371,6 +3374,7 @@ static inline void __cache_free(struct k
+@@ -3374,6 +3377,7 @@ static inline void __cache_free(struct k
        check_irq_off();
        kmemleak_free_recursive(objp, cachep->flags);
        objp = cache_free_debugcheck(cachep, objp, caller);
        check_irq_off();
        kmemleak_free_recursive(objp, cachep->flags);
        objp = cache_free_debugcheck(cachep, objp, caller);
@@ -22952,9 +22928,9 @@ diff -NurpP --minimal linux-4.4.116/mm/slab.c linux-4.4.116-vs2.3.9.7/mm/slab.c
  
        kmemcheck_slab_free(cachep, objp, cachep->object_size);
  
  
        kmemcheck_slab_free(cachep, objp, cachep->object_size);
  
-diff -NurpP --minimal linux-4.4.116/mm/slab_vs.h linux-4.4.116-vs2.3.9.7/mm/slab_vs.h
---- linux-4.4.116/mm/slab_vs.h 1970-01-01 00:00:00.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/mm/slab_vs.h       2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/mm/slab_vs.h linux-4.4.197-vs2.3.9.8/mm/slab_vs.h
+--- linux-4.4.197/mm/slab_vs.h 1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/mm/slab_vs.h       2018-10-20 04:57:21.000000000 +0000
 @@ -0,0 +1,29 @@
 +
 +#include <linux/vserver/context.h>
 @@ -0,0 +1,29 @@
 +
 +#include <linux/vserver/context.h>
@@ -22985,9 +22961,9 @@ diff -NurpP --minimal linux-4.4.116/mm/slab_vs.h linux-4.4.116-vs2.3.9.7/mm/slab
 +      atomic_sub(cachep->size, &vxi->cacct.slab[what]);
 +}
 +
 +      atomic_sub(cachep->size, &vxi->cacct.slab[what]);
 +}
 +
-diff -NurpP --minimal linux-4.4.116/mm/swapfile.c linux-4.4.116-vs2.3.9.7/mm/swapfile.c
---- linux-4.4.116/mm/swapfile.c        2018-02-22 21:20:01.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/mm/swapfile.c      2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/mm/swapfile.c linux-4.4.197-vs2.3.9.8/mm/swapfile.c
+--- linux-4.4.197/mm/swapfile.c        2019-10-22 12:34:44.098505995 +0000
++++ linux-4.4.197-vs2.3.9.8/mm/swapfile.c      2018-10-20 05:50:20.000000000 +0000
 @@ -39,6 +39,7 @@
  #include <asm/tlbflush.h>
  #include <linux/swapops.h>
 @@ -39,6 +39,7 @@
  #include <asm/tlbflush.h>
  #include <linux/swapops.h>
@@ -23013,7 +22989,7 @@ diff -NurpP --minimal linux-4.4.116/mm/swapfile.c linux-4.4.116-vs2.3.9.7/mm/swa
                return 0;
        }
  
                return 0;
        }
  
-@@ -2609,6 +2620,8 @@ void si_swapinfo(struct sysinfo *val)
+@@ -2627,6 +2638,8 @@ void si_swapinfo(struct sysinfo *val)
        val->freeswap = atomic_long_read(&nr_swap_pages) + nr_to_be_unused;
        val->totalswap = total_swap_pages + nr_to_be_unused;
        spin_unlock(&swap_lock);
        val->freeswap = atomic_long_read(&nr_swap_pages) + nr_to_be_unused;
        val->totalswap = total_swap_pages + nr_to_be_unused;
        spin_unlock(&swap_lock);
@@ -23022,9 +22998,9 @@ diff -NurpP --minimal linux-4.4.116/mm/swapfile.c linux-4.4.116-vs2.3.9.7/mm/swa
  }
  
  /*
  }
  
  /*
-diff -NurpP --minimal linux-4.4.116/net/bridge/br_multicast.c linux-4.4.116-vs2.3.9.7/net/bridge/br_multicast.c
---- linux-4.4.116/net/bridge/br_multicast.c    2018-02-22 21:20:02.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/bridge/br_multicast.c  2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/bridge/br_multicast.c linux-4.4.197-vs2.3.9.8/net/bridge/br_multicast.c
+--- linux-4.4.197/net/bridge/br_multicast.c    2019-10-22 12:34:44.398501200 +0000
++++ linux-4.4.197-vs2.3.9.8/net/bridge/br_multicast.c  2019-10-05 14:35:38.062720379 +0000
 @@ -462,7 +462,7 @@ static struct sk_buff *br_ip6_multicast_
        ip6h->hop_limit = 1;
        ipv6_addr_set(&ip6h->daddr, htonl(0xff020000), 0, 0, htonl(1));
 @@ -462,7 +462,7 @@ static struct sk_buff *br_ip6_multicast_
        ip6h->hop_limit = 1;
        ipv6_addr_set(&ip6h->daddr, htonl(0xff020000), 0, 0, htonl(1));
@@ -23034,9 +23010,9 @@ diff -NurpP --minimal linux-4.4.116/net/bridge/br_multicast.c linux-4.4.116-vs2.
                kfree_skb(skb);
                br->has_ipv6_addr = 0;
                return NULL;
                kfree_skb(skb);
                br->has_ipv6_addr = 0;
                return NULL;
-diff -NurpP --minimal linux-4.4.116/net/core/dev.c linux-4.4.116-vs2.3.9.7/net/core/dev.c
---- linux-4.4.116/net/core/dev.c       2018-02-22 21:20:02.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/core/dev.c     2018-02-10 15:16:50.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/core/dev.c linux-4.4.197-vs2.3.9.8/net/core/dev.c
+--- linux-4.4.197/net/core/dev.c       2019-10-22 12:34:44.548498802 +0000
++++ linux-4.4.197-vs2.3.9.8/net/core/dev.c     2019-10-05 14:35:38.182718477 +0000
 @@ -124,6 +124,7 @@
  #include <linux/in.h>
  #include <linux/jhash.h>
 @@ -124,6 +124,7 @@
  #include <linux/in.h>
  #include <linux/jhash.h>
@@ -23154,9 +23130,9 @@ diff -NurpP --minimal linux-4.4.116/net/core/dev.c linux-4.4.116-vs2.3.9.7/net/c
  
                        /*  avoid cases where sscanf is not exact inverse of printf */
                        snprintf(buf, IFNAMSIZ, name, i);
  
                        /*  avoid cases where sscanf is not exact inverse of printf */
                        snprintf(buf, IFNAMSIZ, name, i);
-diff -NurpP --minimal linux-4.4.116/net/core/net-procfs.c linux-4.4.116-vs2.3.9.7/net/core/net-procfs.c
---- linux-4.4.116/net/core/net-procfs.c        2015-04-12 22:12:50.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/core/net-procfs.c      2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/core/net-procfs.c linux-4.4.197-vs2.3.9.8/net/core/net-procfs.c
+--- linux-4.4.197/net/core/net-procfs.c        2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/net/core/net-procfs.c      2018-10-20 04:57:21.000000000 +0000
 @@ -1,6 +1,7 @@
  #include <linux/netdevice.h>
  #include <linux/proc_fs.h>
 @@ -1,6 +1,7 @@
  #include <linux/netdevice.h>
  #include <linux/proc_fs.h>
@@ -23180,9 +23156,9 @@ diff -NurpP --minimal linux-4.4.116/net/core/net-procfs.c linux-4.4.116-vs2.3.9.
        seq_printf(seq, "%6s: %7llu %7llu %4llu %4llu %4llu %5llu %10llu %9llu "
                   "%8llu %7llu %4llu %4llu %4llu %5llu %7llu %10llu\n",
                   dev->name, stats->rx_bytes, stats->rx_packets,
        seq_printf(seq, "%6s: %7llu %7llu %4llu %4llu %4llu %5llu %10llu %9llu "
                   "%8llu %7llu %4llu %4llu %4llu %5llu %7llu %10llu\n",
                   dev->name, stats->rx_bytes, stats->rx_packets,
-diff -NurpP --minimal linux-4.4.116/net/core/rtnetlink.c linux-4.4.116-vs2.3.9.7/net/core/rtnetlink.c
---- linux-4.4.116/net/core/rtnetlink.c 2018-02-22 21:20:02.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/core/rtnetlink.c       2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/core/rtnetlink.c linux-4.4.197-vs2.3.9.8/net/core/rtnetlink.c
+--- linux-4.4.197/net/core/rtnetlink.c 2019-10-22 12:34:44.578498323 +0000
++++ linux-4.4.197-vs2.3.9.8/net/core/rtnetlink.c       2019-02-22 08:20:35.940920486 +0000
 @@ -1456,6 +1456,8 @@ static int rtnl_dump_ifinfo(struct sk_bu
                hlist_for_each_entry(dev, head, index_hlist) {
                        if (idx < s_idx)
 @@ -1456,6 +1456,8 @@ static int rtnl_dump_ifinfo(struct sk_bu
                hlist_for_each_entry(dev, head, index_hlist) {
                        if (idx < s_idx)
@@ -23192,7 +23168,7 @@ diff -NurpP --minimal linux-4.4.116/net/core/rtnetlink.c linux-4.4.116-vs2.3.9.7
                        err = rtnl_fill_ifinfo(skb, dev, RTM_NEWLINK,
                                               NETLINK_CB(cb->skb).portid,
                                               cb->nlh->nlmsg_seq, 0,
                        err = rtnl_fill_ifinfo(skb, dev, RTM_NEWLINK,
                                               NETLINK_CB(cb->skb).portid,
                                               cb->nlh->nlmsg_seq, 0,
-@@ -2559,6 +2561,9 @@ void rtmsg_ifinfo(int type, struct net_d
+@@ -2568,6 +2570,9 @@ void rtmsg_ifinfo(int type, struct net_d
  {
        struct sk_buff *skb;
  
  {
        struct sk_buff *skb;
  
@@ -23202,9 +23178,9 @@ diff -NurpP --minimal linux-4.4.116/net/core/rtnetlink.c linux-4.4.116-vs2.3.9.7
        if (dev->reg_state != NETREG_REGISTERED)
                return;
  
        if (dev->reg_state != NETREG_REGISTERED)
                return;
  
-diff -NurpP --minimal linux-4.4.116/net/core/sock.c linux-4.4.116-vs2.3.9.7/net/core/sock.c
---- linux-4.4.116/net/core/sock.c      2018-02-22 21:20:02.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/core/sock.c    2018-01-09 17:15:58.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/core/sock.c linux-4.4.197-vs2.3.9.8/net/core/sock.c
+--- linux-4.4.197/net/core/sock.c      2019-10-22 12:34:44.578498323 +0000
++++ linux-4.4.197-vs2.3.9.8/net/core/sock.c    2019-02-22 08:20:35.940920486 +0000
 @@ -134,6 +134,10 @@
  #include <linux/sock_diag.h>
  
 @@ -134,6 +134,10 @@
  #include <linux/sock_diag.h>
  
@@ -23216,7 +23192,7 @@ diff -NurpP --minimal linux-4.4.116/net/core/sock.c linux-4.4.116-vs2.3.9.7/net/
  
  #include <trace/events/sock.h>
  
  
  #include <trace/events/sock.h>
  
-@@ -1363,6 +1367,8 @@ static struct sock *sk_prot_alloc(struct
+@@ -1364,6 +1368,8 @@ static struct sock *sk_prot_alloc(struct
                        goto out_free_sec;
                sk_tx_queue_clear(sk);
        }
                        goto out_free_sec;
                sk_tx_queue_clear(sk);
        }
@@ -23225,7 +23201,7 @@ diff -NurpP --minimal linux-4.4.116/net/core/sock.c linux-4.4.116-vs2.3.9.7/net/
  
        return sk;
  
  
        return sk;
  
-@@ -1469,6 +1475,11 @@ void sk_destruct(struct sock *sk)
+@@ -1470,6 +1476,11 @@ void sk_destruct(struct sock *sk)
        put_pid(sk->sk_peer_pid);
        if (likely(sk->sk_net_refcnt))
                put_net(sock_net(sk));
        put_pid(sk->sk_peer_pid);
        if (likely(sk->sk_net_refcnt))
                put_net(sock_net(sk));
@@ -23237,7 +23213,7 @@ diff -NurpP --minimal linux-4.4.116/net/core/sock.c linux-4.4.116-vs2.3.9.7/net/
        sk_prot_free(sk->sk_prot_creator, sk);
  }
  
        sk_prot_free(sk->sk_prot_creator, sk);
  }
  
-@@ -1521,6 +1532,8 @@ struct sock *sk_clone_lock(const struct
+@@ -1522,6 +1533,8 @@ struct sock *sk_clone_lock(const struct
                /* SANITY */
                if (likely(newsk->sk_net_refcnt))
                        get_net(sock_net(newsk));
                /* SANITY */
                if (likely(newsk->sk_net_refcnt))
                        get_net(sock_net(newsk));
@@ -23246,7 +23222,7 @@ diff -NurpP --minimal linux-4.4.116/net/core/sock.c linux-4.4.116-vs2.3.9.7/net/
                sk_node_init(&newsk->sk_node);
                sock_lock_init(newsk);
                bh_lock_sock(newsk);
                sk_node_init(&newsk->sk_node);
                sock_lock_init(newsk);
                bh_lock_sock(newsk);
-@@ -1586,6 +1599,12 @@ struct sock *sk_clone_lock(const struct
+@@ -1587,6 +1600,12 @@ struct sock *sk_clone_lock(const struct
                smp_wmb();
                atomic_set(&newsk->sk_refcnt, 2);
  
                smp_wmb();
                atomic_set(&newsk->sk_refcnt, 2);
  
@@ -23259,9 +23235,9 @@ diff -NurpP --minimal linux-4.4.116/net/core/sock.c linux-4.4.116-vs2.3.9.7/net/
                /*
                 * Increment the counter in the same struct proto as the master
                 * sock (sk_refcnt_debug_inc uses newsk->sk_prot->socks, that
                /*
                 * Increment the counter in the same struct proto as the master
                 * sock (sk_refcnt_debug_inc uses newsk->sk_prot->socks, that
-@@ -2424,6 +2443,12 @@ void sock_init_data(struct socket *sock,
-       sk->sk_stamp = ktime_set(-1L, 0);
+@@ -2428,6 +2447,12 @@ void sock_init_data(struct socket *sock,
+       seqlock_init(&sk->sk_stamp_seq);
+ #endif
  
 +      set_vx_info(&sk->sk_vx_info, current_vx_info());
 +      sk->sk_xid = vx_current_xid();
  
 +      set_vx_info(&sk->sk_vx_info, current_vx_info());
 +      sk->sk_xid = vx_current_xid();
@@ -23272,9 +23248,9 @@ diff -NurpP --minimal linux-4.4.116/net/core/sock.c linux-4.4.116-vs2.3.9.7/net/
  #ifdef CONFIG_NET_RX_BUSY_POLL
        sk->sk_napi_id          =       0;
        sk->sk_ll_usec          =       sysctl_net_busy_read;
  #ifdef CONFIG_NET_RX_BUSY_POLL
        sk->sk_napi_id          =       0;
        sk->sk_ll_usec          =       sysctl_net_busy_read;
-diff -NurpP --minimal linux-4.4.116/net/ipv4/af_inet.c linux-4.4.116-vs2.3.9.7/net/ipv4/af_inet.c
---- linux-4.4.116/net/ipv4/af_inet.c   2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv4/af_inet.c 2018-01-09 17:11:11.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv4/af_inet.c linux-4.4.197-vs2.3.9.8/net/ipv4/af_inet.c
+--- linux-4.4.197/net/ipv4/af_inet.c   2019-10-22 12:34:44.798494810 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/af_inet.c 2018-10-20 05:50:20.000000000 +0000
 @@ -308,10 +308,15 @@ lookup_protocol:
        }
  
 @@ -308,10 +308,15 @@ lookup_protocol:
        }
  
@@ -23353,10 +23329,10 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/af_inet.c linux-4.4.116-vs2.3.9.7/n
  
  const struct proto_ops inet_stream_ops = {
        .family            = PF_INET,
  
  const struct proto_ops inet_stream_ops = {
        .family            = PF_INET,
-diff -NurpP --minimal linux-4.4.116/net/ipv4/arp.c linux-4.4.116-vs2.3.9.7/net/ipv4/arp.c
---- linux-4.4.116/net/ipv4/arp.c       2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv4/arp.c     2018-02-10 15:16:50.000000000 +0000
-@@ -1295,6 +1295,7 @@ static void arp_format_neigh_entry(struc
+diff -NurpP --minimal linux-4.4.197/net/ipv4/arp.c linux-4.4.197-vs2.3.9.8/net/ipv4/arp.c
+--- linux-4.4.197/net/ipv4/arp.c       2019-10-22 12:34:44.808494648 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/arp.c     2018-10-20 04:57:21.000000000 +0000
+@@ -1307,6 +1307,7 @@ static void arp_format_neigh_entry(struc
        struct net_device *dev = n->dev;
        int hatype = dev->type;
  
        struct net_device *dev = n->dev;
        int hatype = dev->type;
  
@@ -23364,7 +23340,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/arp.c linux-4.4.116-vs2.3.9.7/net/i
        read_lock(&n->lock);
        /* Convert hardware address to XX:XX:XX:XX ... form. */
  #if IS_ENABLED(CONFIG_AX25)
        read_lock(&n->lock);
        /* Convert hardware address to XX:XX:XX:XX ... form. */
  #if IS_ENABLED(CONFIG_AX25)
-@@ -1326,6 +1327,7 @@ static void arp_format_pneigh_entry(stru
+@@ -1338,6 +1339,7 @@ static void arp_format_pneigh_entry(stru
        int hatype = dev ? dev->type : 0;
        char tbuf[16];
  
        int hatype = dev ? dev->type : 0;
        char tbuf[16];
  
@@ -23372,10 +23348,10 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/arp.c linux-4.4.116-vs2.3.9.7/net/i
        sprintf(tbuf, "%pI4", n->key);
        seq_printf(seq, "%-16s 0x%-10x0x%-10x%s     *        %s\n",
                   tbuf, hatype, ATF_PUBL | ATF_PERM, "00:00:00:00:00:00",
        sprintf(tbuf, "%pI4", n->key);
        seq_printf(seq, "%-16s 0x%-10x0x%-10x%s     *        %s\n",
                   tbuf, hatype, ATF_PUBL | ATF_PERM, "00:00:00:00:00:00",
-diff -NurpP --minimal linux-4.4.116/net/ipv4/devinet.c linux-4.4.116-vs2.3.9.7/net/ipv4/devinet.c
---- linux-4.4.116/net/ipv4/devinet.c   2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv4/devinet.c 2018-01-09 16:36:34.000000000 +0000
-@@ -538,6 +538,7 @@ struct in_device *inetdev_by_index(struc
+diff -NurpP --minimal linux-4.4.197/net/ipv4/devinet.c linux-4.4.197-vs2.3.9.8/net/ipv4/devinet.c
+--- linux-4.4.197/net/ipv4/devinet.c   2019-10-22 12:34:44.838494169 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/devinet.c 2019-10-05 14:35:38.482713717 +0000
+@@ -546,6 +546,7 @@ struct in_device *inetdev_by_index(struc
  }
  EXPORT_SYMBOL(inetdev_by_index);
  
  }
  EXPORT_SYMBOL(inetdev_by_index);
  
@@ -23383,7 +23359,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/devinet.c linux-4.4.116-vs2.3.9.7/n
  /* Called only from RTNL semaphored context. No locks. */
  
  struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix,
  /* Called only from RTNL semaphored context. No locks. */
  
  struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix,
-@@ -992,6 +993,8 @@ int devinet_ioctl(struct net *net, unsig
+@@ -1000,6 +1001,8 @@ int devinet_ioctl(struct net *net, unsig
  
        in_dev = __in_dev_get_rtnl(dev);
        if (in_dev) {
  
        in_dev = __in_dev_get_rtnl(dev);
        if (in_dev) {
@@ -23392,7 +23368,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/devinet.c linux-4.4.116-vs2.3.9.7/n
                if (tryaddrmatch) {
                        /* Matthias Andree */
                        /* compare label and address (4.4BSD style) */
                if (tryaddrmatch) {
                        /* Matthias Andree */
                        /* compare label and address (4.4BSD style) */
-@@ -1000,6 +1003,8 @@ int devinet_ioctl(struct net *net, unsig
+@@ -1008,6 +1011,8 @@ int devinet_ioctl(struct net *net, unsig
                           This is checked above. */
                        for (ifap = &in_dev->ifa_list; (ifa = *ifap) != NULL;
                             ifap = &ifa->ifa_next) {
                           This is checked above. */
                        for (ifap = &in_dev->ifa_list; (ifa = *ifap) != NULL;
                             ifap = &ifa->ifa_next) {
@@ -23401,7 +23377,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/devinet.c linux-4.4.116-vs2.3.9.7/n
                                if (!strcmp(ifr.ifr_name, ifa->ifa_label) &&
                                    sin_orig.sin_addr.s_addr ==
                                                        ifa->ifa_local) {
                                if (!strcmp(ifr.ifr_name, ifa->ifa_label) &&
                                    sin_orig.sin_addr.s_addr ==
                                                        ifa->ifa_local) {
-@@ -1012,9 +1017,12 @@ int devinet_ioctl(struct net *net, unsig
+@@ -1020,9 +1025,12 @@ int devinet_ioctl(struct net *net, unsig
                   comparing just the label */
                if (!ifa) {
                        for (ifap = &in_dev->ifa_list; (ifa = *ifap) != NULL;
                   comparing just the label */
                if (!ifa) {
                        for (ifap = &in_dev->ifa_list; (ifa = *ifap) != NULL;
@@ -23415,7 +23391,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/devinet.c linux-4.4.116-vs2.3.9.7/n
                }
        }
  
                }
        }
  
-@@ -1168,6 +1176,8 @@ static int inet_gifconf(struct net_devic
+@@ -1176,6 +1184,8 @@ static int inet_gifconf(struct net_devic
                goto out;
  
        for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) {
                goto out;
  
        for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) {
@@ -23424,7 +23400,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/devinet.c linux-4.4.116-vs2.3.9.7/n
                if (!buf) {
                        done += sizeof(ifr);
                        continue;
                if (!buf) {
                        done += sizeof(ifr);
                        continue;
-@@ -1573,6 +1583,7 @@ static int inet_dump_ifaddr(struct sk_bu
+@@ -1581,6 +1591,7 @@ static int inet_dump_ifaddr(struct sk_bu
        struct net_device *dev;
        struct in_device *in_dev;
        struct in_ifaddr *ifa;
        struct net_device *dev;
        struct in_device *in_dev;
        struct in_ifaddr *ifa;
@@ -23432,7 +23408,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/devinet.c linux-4.4.116-vs2.3.9.7/n
        struct hlist_head *head;
  
        s_h = cb->args[0];
        struct hlist_head *head;
  
        s_h = cb->args[0];
-@@ -1596,6 +1607,8 @@ static int inet_dump_ifaddr(struct sk_bu
+@@ -1604,6 +1615,8 @@ static int inet_dump_ifaddr(struct sk_bu
  
                        for (ifa = in_dev->ifa_list, ip_idx = 0; ifa;
                             ifa = ifa->ifa_next, ip_idx++) {
  
                        for (ifa = in_dev->ifa_list, ip_idx = 0; ifa;
                             ifa = ifa->ifa_next, ip_idx++) {
@@ -23441,10 +23417,10 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/devinet.c linux-4.4.116-vs2.3.9.7/n
                                if (ip_idx < s_ip_idx)
                                        continue;
                                if (inet_fill_ifaddr(skb, ifa,
                                if (ip_idx < s_ip_idx)
                                        continue;
                                if (inet_fill_ifaddr(skb, ifa,
-diff -NurpP --minimal linux-4.4.116/net/ipv4/fib_trie.c linux-4.4.116-vs2.3.9.7/net/ipv4/fib_trie.c
---- linux-4.4.116/net/ipv4/fib_trie.c  2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv4/fib_trie.c        2018-01-09 16:36:34.000000000 +0000
-@@ -2591,6 +2591,7 @@ static int fib_route_seq_show(struct seq
+diff -NurpP --minimal linux-4.4.197/net/ipv4/fib_trie.c linux-4.4.197-vs2.3.9.8/net/ipv4/fib_trie.c
+--- linux-4.4.197/net/ipv4/fib_trie.c  2019-10-22 12:34:44.898493209 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/fib_trie.c        2019-02-22 08:20:35.970919974 +0000
+@@ -2601,6 +2601,7 @@ static int fib_route_seq_show(struct seq
  
                seq_setwidth(seq, 127);
  
  
                seq_setwidth(seq, 127);
  
@@ -23452,9 +23428,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/fib_trie.c linux-4.4.116-vs2.3.9.7/
                if (fi)
                        seq_printf(seq,
                                   "%s\t%08X\t%08X\t%04X\t%d\t%u\t"
                if (fi)
                        seq_printf(seq,
                                   "%s\t%08X\t%08X\t%04X\t%d\t%u\t"
-diff -NurpP --minimal linux-4.4.116/net/ipv4/inet_connection_sock.c linux-4.4.116-vs2.3.9.7/net/ipv4/inet_connection_sock.c
---- linux-4.4.116/net/ipv4/inet_connection_sock.c      2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv4/inet_connection_sock.c    2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv4/inet_connection_sock.c linux-4.4.197-vs2.3.9.8/net/ipv4/inet_connection_sock.c
+--- linux-4.4.197/net/ipv4/inet_connection_sock.c      2019-10-22 12:34:44.918492889 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/inet_connection_sock.c    2019-10-05 14:35:38.522713082 +0000
 @@ -43,6 +43,37 @@ void inet_get_local_port_range(struct ne
  }
  EXPORT_SYMBOL(inet_get_local_port_range);
 @@ -43,6 +43,37 @@ void inet_get_local_port_range(struct ne
  }
  EXPORT_SYMBOL(inet_get_local_port_range);
@@ -23511,9 +23487,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/inet_connection_sock.c linux-4.4.11
                                        break;
                        }
                }
                                        break;
                        }
                }
-diff -NurpP --minimal linux-4.4.116/net/ipv4/inet_diag.c linux-4.4.116-vs2.3.9.7/net/ipv4/inet_diag.c
---- linux-4.4.116/net/ipv4/inet_diag.c 2016-07-05 04:15:14.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv4/inet_diag.c       2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv4/inet_diag.c linux-4.4.197-vs2.3.9.8/net/ipv4/inet_diag.c
+--- linux-4.4.197/net/ipv4/inet_diag.c 2019-10-22 12:34:44.948492410 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/inet_diag.c       2019-10-05 14:35:38.532712922 +0000
 @@ -31,6 +31,8 @@
  
  #include <linux/inet.h>
 @@ -31,6 +31,8 @@
  
  #include <linux/inet.h>
@@ -23523,16 +23499,28 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/inet_diag.c linux-4.4.116-vs2.3.9.7
  
  #include <linux/inet_diag.h>
  #include <linux/sock_diag.h>
  
  #include <linux/inet_diag.h>
  #include <linux/sock_diag.h>
-@@ -761,6 +763,8 @@ void inet_diag_dump_icsk(struct inet_has
+@@ -85,8 +87,8 @@ static void inet_diag_msg_common_fill(st
+       memset(&r->id.idiag_src, 0, sizeof(r->id.idiag_src));
+       memset(&r->id.idiag_dst, 0, sizeof(r->id.idiag_dst));
+-      r->id.idiag_src[0] = sk->sk_rcv_saddr;
+-      r->id.idiag_dst[0] = sk->sk_daddr;
++      r->id.idiag_src[0] = nx_map_sock_lback(sk->sk_nx_info, sk->sk_rcv_saddr);
++      r->id.idiag_dst[0] = nx_map_sock_lback(sk->sk_nx_info, sk->sk_daddr);
+       }
+ }
+@@ -768,6 +770,9 @@ void inet_diag_dump_icsk(struct inet_has
                                if (!net_eq(sock_net(sk), net))
                                        continue;
  
 +                              if (!nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT))
 +                                      continue;
                                if (!net_eq(sock_net(sk), net))
                                        continue;
  
 +                              if (!nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT))
 +                                      continue;
++
                                if (num < s_num) {
                                        num++;
                                        continue;
                                if (num < s_num) {
                                        num++;
                                        continue;
-@@ -822,6 +826,8 @@ skip_listen_ht:
+@@ -829,6 +834,8 @@ skip_listen_ht:
  
                        if (!net_eq(sock_net(sk), net))
                                continue;
  
                        if (!net_eq(sock_net(sk), net))
                                continue;
@@ -23541,9 +23529,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/inet_diag.c linux-4.4.116-vs2.3.9.7
                        if (num < s_num)
                                goto next_normal;
                        state = (sk->sk_state == TCP_TIME_WAIT) ?
                        if (num < s_num)
                                goto next_normal;
                        state = (sk->sk_state == TCP_TIME_WAIT) ?
-diff -NurpP --minimal linux-4.4.116/net/ipv4/inet_hashtables.c linux-4.4.116-vs2.3.9.7/net/ipv4/inet_hashtables.c
---- linux-4.4.116/net/ipv4/inet_hashtables.c   2016-07-05 04:15:14.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv4/inet_hashtables.c 2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv4/inet_hashtables.c linux-4.4.197-vs2.3.9.8/net/ipv4/inet_hashtables.c
+--- linux-4.4.197/net/ipv4/inet_hashtables.c   2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/inet_hashtables.c 2018-10-20 04:57:21.000000000 +0000
 @@ -23,6 +23,7 @@
  #include <net/inet_connection_sock.h>
  #include <net/inet_hashtables.h>
 @@ -23,6 +23,7 @@
  #include <net/inet_connection_sock.h>
  #include <net/inet_hashtables.h>
@@ -23580,9 +23568,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/inet_hashtables.c linux-4.4.116-vs2
        /*
         * if the nulls value we got at the end of this lookup is
         * not the expected one, we must restart lookup.
        /*
         * if the nulls value we got at the end of this lookup is
         * not the expected one, we must restart lookup.
-diff -NurpP --minimal linux-4.4.116/net/ipv4/netfilter.c linux-4.4.116-vs2.3.9.7/net/ipv4/netfilter.c
---- linux-4.4.116/net/ipv4/netfilter.c 2016-07-05 04:15:14.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv4/netfilter.c       2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv4/netfilter.c linux-4.4.197-vs2.3.9.8/net/ipv4/netfilter.c
+--- linux-4.4.197/net/ipv4/netfilter.c 2019-10-22 12:34:45.218488099 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/netfilter.c       2018-10-20 04:57:21.000000000 +0000
 @@ -11,7 +11,7 @@
  #include <linux/skbuff.h>
  #include <linux/gfp.h>
 @@ -11,7 +11,7 @@
  #include <linux/skbuff.h>
  #include <linux/gfp.h>
@@ -23592,9 +23580,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/netfilter.c linux-4.4.116-vs2.3.9.7
  #include <net/xfrm.h>
  #include <net/ip.h>
  #include <net/netfilter/nf_queue.h>
  #include <net/xfrm.h>
  #include <net/ip.h>
  #include <net/netfilter/nf_queue.h>
-diff -NurpP --minimal linux-4.4.116/net/ipv4/raw.c linux-4.4.116-vs2.3.9.7/net/ipv4/raw.c
---- linux-4.4.116/net/ipv4/raw.c       2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv4/raw.c     2018-01-09 17:06:10.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv4/raw.c linux-4.4.197-vs2.3.9.8/net/ipv4/raw.c
+--- linux-4.4.197/net/ipv4/raw.c       2019-10-22 12:34:45.268487297 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/raw.c     2019-10-05 14:35:38.622711495 +0000
 @@ -126,7 +126,7 @@ static struct sock *__raw_v4_lookup(stru
  
                if (net_eq(sock_net(sk), net) && inet->inet_num == num  &&
 @@ -126,7 +126,7 @@ static struct sock *__raw_v4_lookup(stru
  
                if (net_eq(sock_net(sk), net) && inet->inet_num == num  &&
@@ -23687,10 +23675,10 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/raw.c linux-4.4.116-vs2.3.9.7/net/i
  
        if (!sk && ++state->bucket < RAW_HTABLE_SIZE) {
                sk = sk_head(&state->h->ht[state->bucket]);
  
        if (!sk && ++state->bucket < RAW_HTABLE_SIZE) {
                sk = sk_head(&state->h->ht[state->bucket]);
-diff -NurpP --minimal linux-4.4.116/net/ipv4/route.c linux-4.4.116-vs2.3.9.7/net/ipv4/route.c
---- linux-4.4.116/net/ipv4/route.c     2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv4/route.c   2018-01-09 16:36:34.000000000 +0000
-@@ -2226,7 +2226,7 @@ struct rtable *__ip_route_output_key_has
+diff -NurpP --minimal linux-4.4.197/net/ipv4/route.c linux-4.4.197-vs2.3.9.8/net/ipv4/route.c
+--- linux-4.4.197/net/ipv4/route.c     2019-10-22 12:34:45.268487297 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/route.c   2019-10-22 13:45:50.760816294 +0000
+@@ -2274,7 +2274,7 @@ struct rtable *__ip_route_output_key_has
  
  
        if (fl4->flowi4_oif) {
  
  
        if (fl4->flowi4_oif) {
@@ -23699,9 +23687,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/route.c linux-4.4.116-vs2.3.9.7/net
                rth = ERR_PTR(-ENODEV);
                if (!dev_out)
                        goto out;
                rth = ERR_PTR(-ENODEV);
                if (!dev_out)
                        goto out;
-diff -NurpP --minimal linux-4.4.116/net/ipv4/tcp.c linux-4.4.116-vs2.3.9.7/net/ipv4/tcp.c
---- linux-4.4.116/net/ipv4/tcp.c       2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv4/tcp.c     2018-02-22 21:30:19.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv4/tcp.c linux-4.4.197-vs2.3.9.8/net/ipv4/tcp.c
+--- linux-4.4.197/net/ipv4/tcp.c       2019-10-22 12:34:45.268487297 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/tcp.c     2019-10-05 14:35:38.622711495 +0000
 @@ -269,6 +269,7 @@
  #include <linux/crypto.h>
  #include <linux/time.h>
 @@ -269,6 +269,7 @@
  #include <linux/crypto.h>
  #include <linux/time.h>
@@ -23710,10 +23698,10 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/tcp.c linux-4.4.116-vs2.3.9.7/net/i
  
  #include <net/icmp.h>
  #include <net/inet_common.h>
  
  #include <net/icmp.h>
  #include <net/inet_common.h>
-diff -NurpP --minimal linux-4.4.116/net/ipv4/tcp_ipv4.c linux-4.4.116-vs2.3.9.7/net/ipv4/tcp_ipv4.c
---- linux-4.4.116/net/ipv4/tcp_ipv4.c  2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv4/tcp_ipv4.c        2018-01-09 17:13:45.000000000 +0000
-@@ -1885,6 +1885,10 @@ static void *listening_get_next(struct s
+diff -NurpP --minimal linux-4.4.197/net/ipv4/tcp_ipv4.c linux-4.4.197-vs2.3.9.8/net/ipv4/tcp_ipv4.c
+--- linux-4.4.197/net/ipv4/tcp_ipv4.c  2019-10-22 12:34:45.278487138 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/tcp_ipv4.c        2019-10-05 14:35:38.622711495 +0000
+@@ -1891,6 +1891,10 @@ static void *listening_get_next(struct s
        sk = sk_nulls_next(sk);
  get_sk:
        sk_nulls_for_each_from(sk, node) {
        sk = sk_nulls_next(sk);
  get_sk:
        sk_nulls_for_each_from(sk, node) {
@@ -23724,7 +23712,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/tcp_ipv4.c linux-4.4.116-vs2.3.9.7/
                if (!net_eq(sock_net(sk), net))
                        continue;
                if (sk->sk_family == st->family) {
                if (!net_eq(sock_net(sk), net))
                        continue;
                if (sk->sk_family == st->family) {
-@@ -1949,6 +1953,11 @@ static void *established_get_first(struc
+@@ -1955,6 +1959,11 @@ static void *established_get_first(struc
  
                spin_lock_bh(lock);
                sk_nulls_for_each(sk, node, &tcp_hashinfo.ehash[st->bucket].chain) {
  
                spin_lock_bh(lock);
                sk_nulls_for_each(sk, node, &tcp_hashinfo.ehash[st->bucket].chain) {
@@ -23736,7 +23724,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/tcp_ipv4.c linux-4.4.116-vs2.3.9.7/
                        if (sk->sk_family != st->family ||
                            !net_eq(sock_net(sk), net)) {
                                continue;
                        if (sk->sk_family != st->family ||
                            !net_eq(sock_net(sk), net)) {
                                continue;
-@@ -1975,6 +1984,11 @@ static void *established_get_next(struct
+@@ -1981,6 +1990,11 @@ static void *established_get_next(struct
        sk = sk_nulls_next(sk);
  
        sk_nulls_for_each_from(sk, node) {
        sk = sk_nulls_next(sk);
  
        sk_nulls_for_each_from(sk, node) {
@@ -23748,7 +23736,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/tcp_ipv4.c linux-4.4.116-vs2.3.9.7/
                if (sk->sk_family == st->family && net_eq(sock_net(sk), net))
                        return sk;
        }
                if (sk->sk_family == st->family && net_eq(sock_net(sk), net))
                        return sk;
        }
-@@ -2166,9 +2180,9 @@ static void get_openreq4(const struct re
+@@ -2172,9 +2186,9 @@ static void get_openreq4(const struct re
        seq_printf(f, "%4d: %08X:%04X %08X:%04X"
                " %02X %08X:%08X %02X:%08lX %08X %5u %8d %u %d %pK",
                i,
        seq_printf(f, "%4d: %08X:%04X %08X:%04X"
                " %02X %08X:%08X %02X:%08lX %08X %5u %8d %u %d %pK",
                i,
@@ -23760,7 +23748,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/tcp_ipv4.c linux-4.4.116-vs2.3.9.7/
                ntohs(ireq->ir_rmt_port),
                TCP_SYN_RECV,
                0, 0, /* could print option size, but that is af dependent. */
                ntohs(ireq->ir_rmt_port),
                TCP_SYN_RECV,
                0, 0, /* could print option size, but that is af dependent. */
-@@ -2191,8 +2205,8 @@ static void get_tcp4_sock(struct sock *s
+@@ -2197,8 +2211,8 @@ static void get_tcp4_sock(struct sock *s
        const struct inet_connection_sock *icsk = inet_csk(sk);
        const struct inet_sock *inet = inet_sk(sk);
        const struct fastopen_queue *fastopenq = &icsk->icsk_accept_queue.fastopenq;
        const struct inet_connection_sock *icsk = inet_csk(sk);
        const struct inet_sock *inet = inet_sk(sk);
        const struct fastopen_queue *fastopenq = &icsk->icsk_accept_queue.fastopenq;
@@ -23771,7 +23759,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/tcp_ipv4.c linux-4.4.116-vs2.3.9.7/
        __u16 destp = ntohs(inet->inet_dport);
        __u16 srcp = ntohs(inet->inet_sport);
        int rx_queue;
        __u16 destp = ntohs(inet->inet_dport);
        __u16 srcp = ntohs(inet->inet_sport);
        int rx_queue;
-@@ -2251,8 +2265,8 @@ static void get_timewait4_sock(const str
+@@ -2257,8 +2271,8 @@ static void get_timewait4_sock(const str
        __be32 dest, src;
        __u16 destp, srcp;
  
        __be32 dest, src;
        __u16 destp, srcp;
  
@@ -23782,9 +23770,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/tcp_ipv4.c linux-4.4.116-vs2.3.9.7/
        destp = ntohs(tw->tw_dport);
        srcp  = ntohs(tw->tw_sport);
  
        destp = ntohs(tw->tw_dport);
        srcp  = ntohs(tw->tw_sport);
  
-diff -NurpP --minimal linux-4.4.116/net/ipv4/tcp_minisocks.c linux-4.4.116-vs2.3.9.7/net/ipv4/tcp_minisocks.c
---- linux-4.4.116/net/ipv4/tcp_minisocks.c     2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv4/tcp_minisocks.c   2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv4/tcp_minisocks.c linux-4.4.197-vs2.3.9.8/net/ipv4/tcp_minisocks.c
+--- linux-4.4.197/net/ipv4/tcp_minisocks.c     2019-10-22 12:34:45.278487138 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/tcp_minisocks.c   2018-10-20 05:50:20.000000000 +0000
 @@ -23,6 +23,9 @@
  #include <linux/slab.h>
  #include <linux/sysctl.h>
 @@ -23,6 +23,9 @@
  #include <linux/slab.h>
  #include <linux/sysctl.h>
@@ -23795,7 +23783,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/tcp_minisocks.c linux-4.4.116-vs2.3
  #include <net/tcp.h>
  #include <net/inet_common.h>
  #include <net/xfrm.h>
  #include <net/tcp.h>
  #include <net/inet_common.h>
  #include <net/xfrm.h>
-@@ -291,6 +294,11 @@ void tcp_time_wait(struct sock *sk, int
+@@ -292,6 +295,11 @@ void tcp_time_wait(struct sock *sk, int
                tcptw->tw_ts_offset     = tp->tsoffset;
                tcptw->tw_last_oow_ack_time = 0;
  
                tcptw->tw_ts_offset     = tp->tsoffset;
                tcptw->tw_last_oow_ack_time = 0;
  
@@ -23807,9 +23795,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/tcp_minisocks.c linux-4.4.116-vs2.3
  #if IS_ENABLED(CONFIG_IPV6)
                if (tw->tw_family == PF_INET6) {
                        struct ipv6_pinfo *np = inet6_sk(sk);
  #if IS_ENABLED(CONFIG_IPV6)
                if (tw->tw_family == PF_INET6) {
                        struct ipv6_pinfo *np = inet6_sk(sk);
-diff -NurpP --minimal linux-4.4.116/net/ipv4/udp.c linux-4.4.116-vs2.3.9.7/net/ipv4/udp.c
---- linux-4.4.116/net/ipv4/udp.c       2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv4/udp.c     2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv4/udp.c linux-4.4.197-vs2.3.9.8/net/ipv4/udp.c
+--- linux-4.4.197/net/ipv4/udp.c       2019-10-22 12:34:45.288486980 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/udp.c     2019-10-05 14:35:38.652711021 +0000
 @@ -309,14 +309,7 @@ fail:
  }
  EXPORT_SYMBOL(udp_lib_get_port);
 @@ -309,14 +309,7 @@ fail:
  }
  EXPORT_SYMBOL(udp_lib_get_port);
@@ -23883,7 +23871,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/udp.c linux-4.4.116-vs2.3.9.7/net/i
            ipv6_only_sock(sk) ||
            (sk->sk_bound_dev_if && sk->sk_bound_dev_if != dif))
                return false;
            ipv6_only_sock(sk) ||
            (sk->sk_bound_dev_if && sk->sk_bound_dev_if != dif))
                return false;
-@@ -1033,6 +1039,16 @@ int udp_sendmsg(struct sock *sk, struct
+@@ -1035,6 +1041,16 @@ int udp_sendmsg(struct sock *sk, struct
                                goto out;
                }
  
                                goto out;
                }
  
@@ -23900,7 +23888,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/udp.c linux-4.4.116-vs2.3.9.7/net/i
                security_sk_classify_flow(sk, flowi4_to_flowi(fl4));
                rt = ip_route_output_flow(net, fl4, sk);
                if (IS_ERR(rt)) {
                security_sk_classify_flow(sk, flowi4_to_flowi(fl4));
                rt = ip_route_output_flow(net, fl4, sk);
                if (IS_ERR(rt)) {
-@@ -1337,7 +1353,8 @@ try_again:
+@@ -1340,7 +1356,8 @@ try_again:
        if (sin) {
                sin->sin_family = AF_INET;
                sin->sin_port = udp_hdr(skb)->source;
        if (sin) {
                sin->sin_family = AF_INET;
                sin->sin_port = udp_hdr(skb)->source;
@@ -23910,7 +23898,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/udp.c linux-4.4.116-vs2.3.9.7/net/i
                memset(sin->sin_zero, 0, sizeof(sin->sin_zero));
                *addr_len = sizeof(*sin);
        }
                memset(sin->sin_zero, 0, sizeof(sin->sin_zero));
                *addr_len = sizeof(*sin);
        }
-@@ -2319,6 +2336,8 @@ static struct sock *udp_get_first(struct
+@@ -2327,6 +2344,8 @@ static struct sock *udp_get_first(struct
                sk_nulls_for_each(sk, node, &hslot->head) {
                        if (!net_eq(sock_net(sk), net))
                                continue;
                sk_nulls_for_each(sk, node, &hslot->head) {
                        if (!net_eq(sock_net(sk), net))
                                continue;
@@ -23919,7 +23907,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/udp.c linux-4.4.116-vs2.3.9.7/net/i
                        if (sk->sk_family == state->family)
                                goto found;
                }
                        if (sk->sk_family == state->family)
                                goto found;
                }
-@@ -2336,7 +2355,9 @@ static struct sock *udp_get_next(struct
+@@ -2344,7 +2363,9 @@ static struct sock *udp_get_next(struct
  
        do {
                sk = sk_nulls_next(sk);
  
        do {
                sk = sk_nulls_next(sk);
@@ -23930,7 +23918,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/udp.c linux-4.4.116-vs2.3.9.7/net/i
  
        if (!sk) {
                if (state->bucket <= state->udp_table->mask)
  
        if (!sk) {
                if (state->bucket <= state->udp_table->mask)
-@@ -2432,8 +2453,8 @@ static void udp4_format_sock(struct sock
+@@ -2440,8 +2461,8 @@ static void udp4_format_sock(struct sock
                int bucket)
  {
        struct inet_sock *inet = inet_sk(sp);
                int bucket)
  {
        struct inet_sock *inet = inet_sk(sp);
@@ -23941,9 +23929,21 @@ diff -NurpP --minimal linux-4.4.116/net/ipv4/udp.c linux-4.4.116-vs2.3.9.7/net/i
        __u16 destp       = ntohs(inet->inet_dport);
        __u16 srcp        = ntohs(inet->inet_sport);
  
        __u16 destp       = ntohs(inet->inet_dport);
        __u16 srcp        = ntohs(inet->inet_sport);
  
-diff -NurpP --minimal linux-4.4.116/net/ipv6/addrconf.c linux-4.4.116-vs2.3.9.7/net/ipv6/addrconf.c
---- linux-4.4.116/net/ipv6/addrconf.c  2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv6/addrconf.c        2018-01-09 23:41:55.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv4/udp_diag.c linux-4.4.197-vs2.3.9.8/net/ipv4/udp_diag.c
+--- linux-4.4.197/net/ipv4/udp_diag.c  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv4/udp_diag.c        2018-10-20 04:57:21.000000000 +0000
+@@ -118,6 +118,8 @@ static void udp_dump(struct udp_table *t
+                       if (!net_eq(sock_net(sk), net))
+                               continue;
++                      if (!nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT))
++                              continue;
+                       if (num < s_num)
+                               goto next;
+                       if (!(r->idiag_states & (1 << sk->sk_state)))
+diff -NurpP --minimal linux-4.4.197/net/ipv6/addrconf.c linux-4.4.197-vs2.3.9.8/net/ipv6/addrconf.c
+--- linux-4.4.197/net/ipv6/addrconf.c  2019-10-22 12:34:45.308486661 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv6/addrconf.c        2019-10-05 14:35:38.692710385 +0000
 @@ -92,6 +92,8 @@
  #include <linux/proc_fs.h>
  #include <linux/seq_file.h>
 @@ -92,6 +92,8 @@
  #include <linux/proc_fs.h>
  #include <linux/seq_file.h>
@@ -23953,7 +23953,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/addrconf.c linux-4.4.116-vs2.3.9.7/
  
  /* Set to 3 to get tracing... */
  #define ACONF_DEBUG 2
  
  /* Set to 3 to get tracing... */
  #define ACONF_DEBUG 2
-@@ -1442,7 +1444,8 @@ static int __ipv6_dev_get_saddr(struct n
+@@ -1446,7 +1448,8 @@ static int __ipv6_dev_get_saddr(struct n
                                struct ipv6_saddr_dst *dst,
                                struct inet6_dev *idev,
                                struct ipv6_saddr_score *scores,
                                struct ipv6_saddr_dst *dst,
                                struct inet6_dev *idev,
                                struct ipv6_saddr_score *scores,
@@ -23963,7 +23963,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/addrconf.c linux-4.4.116-vs2.3.9.7/
  {
        struct ipv6_saddr_score *score = &scores[1 - hiscore_idx], *hiscore = &scores[hiscore_idx];
  
  {
        struct ipv6_saddr_score *score = &scores[1 - hiscore_idx], *hiscore = &scores[hiscore_idx];
  
-@@ -1472,6 +1475,8 @@ static int __ipv6_dev_get_saddr(struct n
+@@ -1476,6 +1479,8 @@ static int __ipv6_dev_get_saddr(struct n
                                            idev->dev->name);
                        continue;
                }
                                            idev->dev->name);
                        continue;
                }
@@ -23972,7 +23972,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/addrconf.c linux-4.4.116-vs2.3.9.7/
  
                score->rule = -1;
                bitmap_zero(score->scorebits, IPV6_SADDR_RULE_MAX);
  
                score->rule = -1;
                bitmap_zero(score->scorebits, IPV6_SADDR_RULE_MAX);
-@@ -1519,7 +1524,7 @@ out:
+@@ -1523,7 +1528,7 @@ out:
  
  int ipv6_dev_get_saddr(struct net *net, const struct net_device *dst_dev,
                       const struct in6_addr *daddr, unsigned int prefs,
  
  int ipv6_dev_get_saddr(struct net *net, const struct net_device *dst_dev,
                       const struct in6_addr *daddr, unsigned int prefs,
@@ -23981,7 +23981,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/addrconf.c linux-4.4.116-vs2.3.9.7/
  {
        struct ipv6_saddr_score scores[2], *hiscore;
        struct ipv6_saddr_dst dst;
  {
        struct ipv6_saddr_score scores[2], *hiscore;
        struct ipv6_saddr_dst dst;
-@@ -1568,13 +1573,15 @@ int ipv6_dev_get_saddr(struct net *net,
+@@ -1572,13 +1577,15 @@ int ipv6_dev_get_saddr(struct net *net,
  
        if (use_oif_addr) {
                if (idev)
  
        if (use_oif_addr) {
                if (idev)
@@ -23999,7 +23999,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/addrconf.c linux-4.4.116-vs2.3.9.7/
                }
        }
        rcu_read_unlock();
                }
        }
        rcu_read_unlock();
-@@ -3846,7 +3853,10 @@ static void if6_seq_stop(struct seq_file
+@@ -3848,7 +3855,10 @@ static void if6_seq_stop(struct seq_file
  static int if6_seq_show(struct seq_file *seq, void *v)
  {
        struct inet6_ifaddr *ifp = (struct inet6_ifaddr *)v;
  static int if6_seq_show(struct seq_file *seq, void *v)
  {
        struct inet6_ifaddr *ifp = (struct inet6_ifaddr *)v;
@@ -24011,7 +24011,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/addrconf.c linux-4.4.116-vs2.3.9.7/
                   &ifp->addr,
                   ifp->idev->dev->ifindex,
                   ifp->prefix_len,
                   &ifp->addr,
                   ifp->idev->dev->ifindex,
                   ifp->prefix_len,
-@@ -4430,6 +4440,11 @@ static int in6_dump_addrs(struct inet6_d
+@@ -4432,6 +4442,11 @@ static int in6_dump_addrs(struct inet6_d
        struct ifacaddr6 *ifaca;
        int err = 1;
        int ip_idx = *p_ip_idx;
        struct ifacaddr6 *ifaca;
        int err = 1;
        int ip_idx = *p_ip_idx;
@@ -24023,16 +24023,16 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/addrconf.c linux-4.4.116-vs2.3.9.7/
  
        read_lock_bh(&idev->lock);
        switch (type) {
  
        read_lock_bh(&idev->lock);
        switch (type) {
-@@ -4440,6 +4455,8 @@ static int in6_dump_addrs(struct inet6_d
+@@ -4442,6 +4457,8 @@ static int in6_dump_addrs(struct inet6_d
                list_for_each_entry(ifa, &idev->addr_list, if_list) {
                list_for_each_entry(ifa, &idev->addr_list, if_list) {
-                       if (++ip_idx < s_ip_idx)
-                               continue;
+                       if (ip_idx < s_ip_idx)
+                               goto next;
 +                      if (!v6_addr_in_nx_info(nxi, &ifa->addr, -1))
 +                      if (!v6_addr_in_nx_info(nxi, &ifa->addr, -1))
-+                              continue;
++                              goto next;
                        err = inet6_fill_ifaddr(skb, ifa,
                                                NETLINK_CB(cb->skb).portid,
                                                cb->nlh->nlmsg_seq,
                        err = inet6_fill_ifaddr(skb, ifa,
                                                NETLINK_CB(cb->skb).portid,
                                                cb->nlh->nlmsg_seq,
-@@ -4457,6 +4474,8 @@ static int in6_dump_addrs(struct inet6_d
+@@ -4461,6 +4478,8 @@ next:
                     ifmca = ifmca->next, ip_idx++) {
                        if (ip_idx < s_ip_idx)
                                continue;
                     ifmca = ifmca->next, ip_idx++) {
                        if (ip_idx < s_ip_idx)
                                continue;
@@ -24041,7 +24041,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/addrconf.c linux-4.4.116-vs2.3.9.7/
                        err = inet6_fill_ifmcaddr(skb, ifmca,
                                                  NETLINK_CB(cb->skb).portid,
                                                  cb->nlh->nlmsg_seq,
                        err = inet6_fill_ifmcaddr(skb, ifmca,
                                                  NETLINK_CB(cb->skb).portid,
                                                  cb->nlh->nlmsg_seq,
-@@ -4472,6 +4491,8 @@ static int in6_dump_addrs(struct inet6_d
+@@ -4476,6 +4495,8 @@ next:
                     ifaca = ifaca->aca_next, ip_idx++) {
                        if (ip_idx < s_ip_idx)
                                continue;
                     ifaca = ifaca->aca_next, ip_idx++) {
                        if (ip_idx < s_ip_idx)
                                continue;
@@ -24050,7 +24050,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/addrconf.c linux-4.4.116-vs2.3.9.7/
                        err = inet6_fill_ifacaddr(skb, ifaca,
                                                  NETLINK_CB(cb->skb).portid,
                                                  cb->nlh->nlmsg_seq,
                        err = inet6_fill_ifacaddr(skb, ifaca,
                                                  NETLINK_CB(cb->skb).portid,
                                                  cb->nlh->nlmsg_seq,
-@@ -4500,6 +4521,10 @@ static int inet6_dump_addr(struct sk_buf
+@@ -4504,6 +4525,10 @@ static int inet6_dump_addr(struct sk_buf
        struct inet6_dev *idev;
        struct hlist_head *head;
  
        struct inet6_dev *idev;
        struct hlist_head *head;
  
@@ -24061,7 +24061,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/addrconf.c linux-4.4.116-vs2.3.9.7/
        s_h = cb->args[0];
        s_idx = idx = cb->args[1];
        s_ip_idx = ip_idx = cb->args[2];
        s_h = cb->args[0];
        s_idx = idx = cb->args[1];
        s_ip_idx = ip_idx = cb->args[2];
-@@ -5008,6 +5033,7 @@ static int inet6_dump_ifinfo(struct sk_b
+@@ -5012,6 +5037,7 @@ static int inet6_dump_ifinfo(struct sk_b
        struct net_device *dev;
        struct inet6_dev *idev;
        struct hlist_head *head;
        struct net_device *dev;
        struct inet6_dev *idev;
        struct hlist_head *head;
@@ -24069,7 +24069,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/addrconf.c linux-4.4.116-vs2.3.9.7/
  
        s_h = cb->args[0];
        s_idx = cb->args[1];
  
        s_h = cb->args[0];
        s_idx = cb->args[1];
-@@ -5019,6 +5045,8 @@ static int inet6_dump_ifinfo(struct sk_b
+@@ -5023,6 +5049,8 @@ static int inet6_dump_ifinfo(struct sk_b
                hlist_for_each_entry_rcu(dev, head, index_hlist) {
                        if (idx < s_idx)
                                goto cont;
                hlist_for_each_entry_rcu(dev, head, index_hlist) {
                        if (idx < s_idx)
                                goto cont;
@@ -24078,9 +24078,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/addrconf.c linux-4.4.116-vs2.3.9.7/
                        idev = __in6_dev_get(dev);
                        if (!idev)
                                goto cont;
                        idev = __in6_dev_get(dev);
                        if (!idev)
                                goto cont;
-diff -NurpP --minimal linux-4.4.116/net/ipv6/af_inet6.c linux-4.4.116-vs2.3.9.7/net/ipv6/af_inet6.c
---- linux-4.4.116/net/ipv6/af_inet6.c  2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv6/af_inet6.c        2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv6/af_inet6.c linux-4.4.197-vs2.3.9.8/net/ipv6/af_inet6.c
+--- linux-4.4.197/net/ipv6/af_inet6.c  2019-10-22 12:34:45.318486498 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv6/af_inet6.c        2019-02-22 08:20:35.970919974 +0000
 @@ -43,6 +43,8 @@
  #include <linux/netdevice.h>
  #include <linux/icmpv6.h>
 @@ -43,6 +43,8 @@
  #include <linux/netdevice.h>
  #include <linux/icmpv6.h>
@@ -24124,7 +24124,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/af_inet6.c linux-4.4.116-vs2.3.9.7/
        addr_type = ipv6_addr_type(&addr->sin6_addr);
        if ((addr_type & IPV6_ADDR_MULTICAST) && sock->type == SOCK_STREAM)
                return -EINVAL;
        addr_type = ipv6_addr_type(&addr->sin6_addr);
        if ((addr_type & IPV6_ADDR_MULTICAST) && sock->type == SOCK_STREAM)
                return -EINVAL;
-@@ -314,6 +324,10 @@ int inet6_bind(struct socket *sock, stru
+@@ -326,6 +336,10 @@ int inet6_bind(struct socket *sock, stru
                        err = -EADDRNOTAVAIL;
                        goto out;
                }
                        err = -EADDRNOTAVAIL;
                        goto out;
                }
@@ -24135,7 +24135,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/af_inet6.c linux-4.4.116-vs2.3.9.7/
        } else {
                if (addr_type != IPV6_ADDR_ANY) {
                        struct net_device *dev = NULL;
        } else {
                if (addr_type != IPV6_ADDR_ANY) {
                        struct net_device *dev = NULL;
-@@ -340,6 +354,11 @@ int inet6_bind(struct socket *sock, stru
+@@ -355,6 +369,11 @@ int inet6_bind(struct socket *sock, stru
                                }
                        }
  
                                }
                        }
  
@@ -24147,7 +24147,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/af_inet6.c linux-4.4.116-vs2.3.9.7/
                        /* ipv4 addr of the socket is invalid.  Only the
                         * unspecified and mapped address have a v4 equivalent.
                         */
                        /* ipv4 addr of the socket is invalid.  Only the
                         * unspecified and mapped address have a v4 equivalent.
                         */
-@@ -357,6 +376,9 @@ int inet6_bind(struct socket *sock, stru
+@@ -372,6 +391,9 @@ int inet6_bind(struct socket *sock, stru
                }
        }
  
                }
        }
  
@@ -24157,7 +24157,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/af_inet6.c linux-4.4.116-vs2.3.9.7/
        inet->inet_rcv_saddr = v4addr;
        inet->inet_saddr = v4addr;
  
        inet->inet_rcv_saddr = v4addr;
        inet->inet_saddr = v4addr;
  
-@@ -461,9 +483,11 @@ int inet6_getname(struct socket *sock, s
+@@ -476,9 +498,11 @@ int inet6_getname(struct socket *sock, s
                        return -ENOTCONN;
                sin->sin6_port = inet->inet_dport;
                sin->sin6_addr = sk->sk_v6_daddr;
                        return -ENOTCONN;
                sin->sin6_port = inet->inet_dport;
                sin->sin6_addr = sk->sk_v6_daddr;
@@ -24169,10 +24169,10 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/af_inet6.c linux-4.4.116-vs2.3.9.7/
                if (ipv6_addr_any(&sk->sk_v6_rcv_saddr))
                        sin->sin6_addr = np->saddr;
                else
                if (ipv6_addr_any(&sk->sk_v6_rcv_saddr))
                        sin->sin6_addr = np->saddr;
                else
-diff -NurpP --minimal linux-4.4.116/net/ipv6/datagram.c linux-4.4.116-vs2.3.9.7/net/ipv6/datagram.c
---- linux-4.4.116/net/ipv6/datagram.c  2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv6/datagram.c        2018-01-09 16:36:34.000000000 +0000
-@@ -733,7 +733,7 @@ int ip6_datagram_send_ctl(struct net *ne
+diff -NurpP --minimal linux-4.4.197/net/ipv6/datagram.c linux-4.4.197-vs2.3.9.8/net/ipv6/datagram.c
+--- linux-4.4.197/net/ipv6/datagram.c  2019-10-22 12:34:45.318486498 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv6/datagram.c        2019-02-22 08:20:35.970919974 +0000
+@@ -735,7 +735,7 @@ int ip6_datagram_send_ctl(struct net *ne
  
                        rcu_read_lock();
                        if (fl6->flowi6_oif) {
  
                        rcu_read_lock();
                        if (fl6->flowi6_oif) {
@@ -24181,9 +24181,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/datagram.c linux-4.4.116-vs2.3.9.7/
                                if (!dev) {
                                        rcu_read_unlock();
                                        return -ENODEV;
                                if (!dev) {
                                        rcu_read_unlock();
                                        return -ENODEV;
-diff -NurpP --minimal linux-4.4.116/net/ipv6/fib6_rules.c linux-4.4.116-vs2.3.9.7/net/ipv6/fib6_rules.c
---- linux-4.4.116/net/ipv6/fib6_rules.c        2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv6/fib6_rules.c      2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv6/fib6_rules.c linux-4.4.197-vs2.3.9.8/net/ipv6/fib6_rules.c
+--- linux-4.4.197/net/ipv6/fib6_rules.c        2019-10-22 12:34:45.318486498 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv6/fib6_rules.c      2018-10-20 04:57:21.000000000 +0000
 @@ -97,7 +97,7 @@ static int fib6_rule_action(struct fib_r
                                               ip6_dst_idev(&rt->dst)->dev,
                                               &flp6->daddr,
 @@ -97,7 +97,7 @@ static int fib6_rule_action(struct fib_r
                                               ip6_dst_idev(&rt->dst)->dev,
                                               &flp6->daddr,
@@ -24193,9 +24193,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/fib6_rules.c linux-4.4.116-vs2.3.9.
                                goto again;
                        if (!ipv6_prefix_equal(&saddr, &r->src.addr,
                                               r->src.plen))
                                goto again;
                        if (!ipv6_prefix_equal(&saddr, &r->src.addr,
                                               r->src.plen))
-diff -NurpP --minimal linux-4.4.116/net/ipv6/inet6_hashtables.c linux-4.4.116-vs2.3.9.7/net/ipv6/inet6_hashtables.c
---- linux-4.4.116/net/ipv6/inet6_hashtables.c  2016-07-05 04:15:14.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv6/inet6_hashtables.c        2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv6/inet6_hashtables.c linux-4.4.197-vs2.3.9.8/net/ipv6/inet6_hashtables.c
+--- linux-4.4.197/net/ipv6/inet6_hashtables.c  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv6/inet6_hashtables.c        2018-10-20 04:57:21.000000000 +0000
 @@ -16,6 +16,7 @@
  
  #include <linux/module.h>
 @@ -16,6 +16,7 @@
  
  #include <linux/module.h>
@@ -24222,9 +24222,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/inet6_hashtables.c linux-4.4.116-vs
                }
                if (sk->sk_bound_dev_if) {
                        if (sk->sk_bound_dev_if != dif)
                }
                if (sk->sk_bound_dev_if) {
                        if (sk->sk_bound_dev_if != dif)
-diff -NurpP --minimal linux-4.4.116/net/ipv6/ip6_fib.c linux-4.4.116-vs2.3.9.7/net/ipv6/ip6_fib.c
---- linux-4.4.116/net/ipv6/ip6_fib.c   2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv6/ip6_fib.c 2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv6/ip6_fib.c linux-4.4.197-vs2.3.9.8/net/ipv6/ip6_fib.c
+--- linux-4.4.197/net/ipv6/ip6_fib.c   2019-10-22 12:34:45.348486021 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv6/ip6_fib.c 2018-10-20 04:57:21.000000000 +0000
 @@ -1968,6 +1968,7 @@ static int ipv6_route_seq_show(struct se
        struct rt6_info *rt = v;
        struct ipv6_route_iter *iter = seq->private;
 @@ -1968,6 +1968,7 @@ static int ipv6_route_seq_show(struct se
        struct rt6_info *rt = v;
        struct ipv6_route_iter *iter = seq->private;
@@ -24233,10 +24233,10 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/ip6_fib.c linux-4.4.116-vs2.3.9.7/n
        seq_printf(seq, "%pi6 %02x ", &rt->rt6i_dst.addr, rt->rt6i_dst.plen);
  
  #ifdef CONFIG_IPV6_SUBTREES
        seq_printf(seq, "%pi6 %02x ", &rt->rt6i_dst.addr, rt->rt6i_dst.plen);
  
  #ifdef CONFIG_IPV6_SUBTREES
-diff -NurpP --minimal linux-4.4.116/net/ipv6/ip6_output.c linux-4.4.116-vs2.3.9.7/net/ipv6/ip6_output.c
---- linux-4.4.116/net/ipv6/ip6_output.c        2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv6/ip6_output.c      2018-02-10 15:16:50.000000000 +0000
-@@ -941,7 +941,8 @@ static int ip6_dst_lookup_tail(struct ne
+diff -NurpP --minimal linux-4.4.197/net/ipv6/ip6_output.c linux-4.4.197-vs2.3.9.8/net/ipv6/ip6_output.c
+--- linux-4.4.197/net/ipv6/ip6_output.c        2019-10-22 12:34:45.358485858 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv6/ip6_output.c      2019-10-05 14:35:38.762709276 +0000
+@@ -945,7 +945,8 @@ static int ip6_dst_lookup_tail(struct ne
                rt = (*dst)->error ? NULL : (struct rt6_info *)*dst;
                err = ip6_route_get_saddr(net, rt, &fl6->daddr,
                                          sk ? inet6_sk(sk)->srcprefs : 0,
                rt = (*dst)->error ? NULL : (struct rt6_info *)*dst;
                err = ip6_route_get_saddr(net, rt, &fl6->daddr,
                                          sk ? inet6_sk(sk)->srcprefs : 0,
@@ -24246,9 +24246,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/ip6_output.c linux-4.4.116-vs2.3.9.
                if (err)
                        goto out_err_release;
  
                if (err)
                        goto out_err_release;
  
-diff -NurpP --minimal linux-4.4.116/net/ipv6/ndisc.c linux-4.4.116-vs2.3.9.7/net/ipv6/ndisc.c
---- linux-4.4.116/net/ipv6/ndisc.c     2016-07-05 04:15:14.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv6/ndisc.c   2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv6/ndisc.c linux-4.4.197-vs2.3.9.8/net/ipv6/ndisc.c
+--- linux-4.4.197/net/ipv6/ndisc.c     2019-10-22 12:34:45.358485858 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv6/ndisc.c   2019-02-22 08:20:35.980919804 +0000
 @@ -501,7 +501,7 @@ void ndisc_send_na(struct net_device *de
        } else {
                if (ipv6_dev_get_saddr(dev_net(dev), dev, daddr,
 @@ -501,7 +501,7 @@ void ndisc_send_na(struct net_device *de
        } else {
                if (ipv6_dev_get_saddr(dev_net(dev), dev, daddr,
@@ -24258,9 +24258,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/ndisc.c linux-4.4.116-vs2.3.9.7/net
                        return;
                src_addr = &tmpaddr;
        }
                        return;
                src_addr = &tmpaddr;
        }
-diff -NurpP --minimal linux-4.4.116/net/ipv6/netfilter/nf_nat_masquerade_ipv6.c linux-4.4.116-vs2.3.9.7/net/ipv6/netfilter/nf_nat_masquerade_ipv6.c
---- linux-4.4.116/net/ipv6/netfilter/nf_nat_masquerade_ipv6.c  2016-07-05 04:15:14.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv6/netfilter/nf_nat_masquerade_ipv6.c        2018-01-09 17:04:44.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv6/netfilter/nf_nat_masquerade_ipv6.c linux-4.4.197-vs2.3.9.8/net/ipv6/netfilter/nf_nat_masquerade_ipv6.c
+--- linux-4.4.197/net/ipv6/netfilter/nf_nat_masquerade_ipv6.c  2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv6/netfilter/nf_nat_masquerade_ipv6.c        2018-10-20 04:57:21.000000000 +0000
 @@ -35,7 +35,7 @@ nf_nat_masquerade_ipv6(struct sk_buff *s
                            ctinfo == IP_CT_RELATED_REPLY));
  
 @@ -35,7 +35,7 @@ nf_nat_masquerade_ipv6(struct sk_buff *s
                            ctinfo == IP_CT_RELATED_REPLY));
  
@@ -24270,9 +24270,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/netfilter/nf_nat_masquerade_ipv6.c
                return NF_DROP;
  
        nfct_nat(ct)->masq_index = out->ifindex;
                return NF_DROP;
  
        nfct_nat(ct)->masq_index = out->ifindex;
-diff -NurpP --minimal linux-4.4.116/net/ipv6/raw.c linux-4.4.116-vs2.3.9.7/net/ipv6/raw.c
---- linux-4.4.116/net/ipv6/raw.c       2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv6/raw.c     2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv6/raw.c linux-4.4.197-vs2.3.9.8/net/ipv6/raw.c
+--- linux-4.4.197/net/ipv6/raw.c       2019-10-22 12:34:45.378485542 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv6/raw.c     2019-10-05 14:35:38.852707848 +0000
 @@ -30,6 +30,7 @@
  #include <linux/icmpv6.h>
  #include <linux/netfilter.h>
 @@ -30,6 +30,7 @@
  #include <linux/icmpv6.h>
  #include <linux/netfilter.h>
@@ -24281,7 +24281,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/raw.c linux-4.4.116-vs2.3.9.7/net/i
  #include <linux/skbuff.h>
  #include <linux/compat.h>
  #include <linux/uaccess.h>
  #include <linux/skbuff.h>
  #include <linux/compat.h>
  #include <linux/uaccess.h>
-@@ -291,6 +292,13 @@ static int rawv6_bind(struct sock *sk, s
+@@ -293,6 +294,13 @@ static int rawv6_bind(struct sock *sk, s
                                goto out_unlock;
                }
  
                                goto out_unlock;
                }
  
@@ -24295,9 +24295,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/raw.c linux-4.4.116-vs2.3.9.7/net/i
                /* ipv4 addr of the socket is invalid.  Only the
                 * unspecified and mapped address have a v4 equivalent.
                 */
                /* ipv4 addr of the socket is invalid.  Only the
                 * unspecified and mapped address have a v4 equivalent.
                 */
-diff -NurpP --minimal linux-4.4.116/net/ipv6/route.c linux-4.4.116-vs2.3.9.7/net/ipv6/route.c
---- linux-4.4.116/net/ipv6/route.c     2018-02-22 21:20:03.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv6/route.c   2018-01-09 17:03:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv6/route.c linux-4.4.197-vs2.3.9.8/net/ipv6/route.c
+--- linux-4.4.197/net/ipv6/route.c     2019-10-22 12:34:45.378485542 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv6/route.c   2019-10-05 14:35:38.872707530 +0000
 @@ -62,6 +62,7 @@
  #include <net/lwtunnel.h>
  #include <net/ip_tunnels.h>
 @@ -62,6 +62,7 @@
  #include <net/lwtunnel.h>
  #include <net/ip_tunnels.h>
@@ -24306,7 +24306,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/route.c linux-4.4.116-vs2.3.9.7/net
  
  #include <asm/uaccess.h>
  
  
  #include <asm/uaccess.h>
  
-@@ -2545,16 +2546,18 @@ int ip6_route_get_saddr(struct net *net,
+@@ -2553,16 +2554,18 @@ int ip6_route_get_saddr(struct net *net,
                        struct rt6_info *rt,
                        const struct in6_addr *daddr,
                        unsigned int prefs,
                        struct rt6_info *rt,
                        const struct in6_addr *daddr,
                        unsigned int prefs,
@@ -24328,7 +24328,7 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/route.c linux-4.4.116-vs2.3.9.7/net
        return err;
  }
  
        return err;
  }
  
-@@ -3168,7 +3171,8 @@ static int rt6_fill_node(struct net *net
+@@ -3178,7 +3181,8 @@ static int rt6_fill_node(struct net *net
                                goto nla_put_failure;
        } else if (dst) {
                struct in6_addr saddr_buf;
                                goto nla_put_failure;
        } else if (dst) {
                struct in6_addr saddr_buf;
@@ -24338,9 +24338,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/route.c linux-4.4.116-vs2.3.9.7/net
                    nla_put_in6_addr(skb, RTA_PREFSRC, &saddr_buf))
                        goto nla_put_failure;
        }
                    nla_put_in6_addr(skb, RTA_PREFSRC, &saddr_buf))
                        goto nla_put_failure;
        }
-diff -NurpP --minimal linux-4.4.116/net/ipv6/tcp_ipv6.c linux-4.4.116-vs2.3.9.7/net/ipv6/tcp_ipv6.c
---- linux-4.4.116/net/ipv6/tcp_ipv6.c  2018-02-22 21:20:04.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv6/tcp_ipv6.c        2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv6/tcp_ipv6.c linux-4.4.197-vs2.3.9.8/net/ipv6/tcp_ipv6.c
+--- linux-4.4.197/net/ipv6/tcp_ipv6.c  2019-10-22 12:34:45.378485542 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv6/tcp_ipv6.c        2019-10-05 14:35:38.882707371 +0000
 @@ -69,6 +69,7 @@
  
  #include <linux/crypto.h>
 @@ -69,6 +69,7 @@
  
  #include <linux/crypto.h>
@@ -24373,9 +24373,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/tcp_ipv6.c linux-4.4.116-vs2.3.9.7/
        }
  
        addr_type = ipv6_addr_type(&usin->sin6_addr);
        }
  
        addr_type = ipv6_addr_type(&usin->sin6_addr);
-diff -NurpP --minimal linux-4.4.116/net/ipv6/udp.c linux-4.4.116-vs2.3.9.7/net/ipv6/udp.c
---- linux-4.4.116/net/ipv6/udp.c       2018-02-22 21:20:04.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv6/udp.c     2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv6/udp.c linux-4.4.197-vs2.3.9.8/net/ipv6/udp.c
+--- linux-4.4.197/net/ipv6/udp.c       2019-10-22 12:34:45.378485542 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv6/udp.c     2019-10-05 14:35:38.882707371 +0000
 @@ -47,6 +47,7 @@
  #include <net/xfrm.h>
  #include <net/inet6_hashtables.h>
 @@ -47,6 +47,7 @@
  #include <net/xfrm.h>
  #include <net/inet6_hashtables.h>
@@ -24469,9 +24469,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/udp.c linux-4.4.116-vs2.3.9.7/net/i
        }
  
        if (!ipv6_addr_any(&sk->sk_v6_rcv_saddr)) {
        }
  
        if (!ipv6_addr_any(&sk->sk_v6_rcv_saddr)) {
-diff -NurpP --minimal linux-4.4.116/net/ipv6/xfrm6_policy.c linux-4.4.116-vs2.3.9.7/net/ipv6/xfrm6_policy.c
---- linux-4.4.116/net/ipv6/xfrm6_policy.c      2016-07-05 04:15:14.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/ipv6/xfrm6_policy.c    2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/ipv6/xfrm6_policy.c linux-4.4.197-vs2.3.9.8/net/ipv6/xfrm6_policy.c
+--- linux-4.4.197/net/ipv6/xfrm6_policy.c      2019-10-22 12:34:45.378485542 +0000
++++ linux-4.4.197-vs2.3.9.8/net/ipv6/xfrm6_policy.c    2018-10-20 04:57:21.000000000 +0000
 @@ -64,7 +64,8 @@ static int xfrm6_get_saddr(struct net *n
                return -EHOSTUNREACH;
  
 @@ -64,7 +64,8 @@ static int xfrm6_get_saddr(struct net *n
                return -EHOSTUNREACH;
  
@@ -24482,9 +24482,9 @@ diff -NurpP --minimal linux-4.4.116/net/ipv6/xfrm6_policy.c linux-4.4.116-vs2.3.
        dst_release(dst);
        return 0;
  }
        dst_release(dst);
        return 0;
  }
-diff -NurpP --minimal linux-4.4.116/net/netfilter/ipvs/ip_vs_xmit.c linux-4.4.116-vs2.3.9.7/net/netfilter/ipvs/ip_vs_xmit.c
---- linux-4.4.116/net/netfilter/ipvs/ip_vs_xmit.c      2016-07-05 04:15:15.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/netfilter/ipvs/ip_vs_xmit.c    2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/netfilter/ipvs/ip_vs_xmit.c linux-4.4.197-vs2.3.9.8/net/netfilter/ipvs/ip_vs_xmit.c
+--- linux-4.4.197/net/netfilter/ipvs/ip_vs_xmit.c      2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/net/netfilter/ipvs/ip_vs_xmit.c    2018-10-20 04:57:21.000000000 +0000
 @@ -381,7 +381,7 @@ __ip_vs_route_output_v6(struct net *net,
                return dst;
        if (ipv6_addr_any(&fl6.saddr) &&
 @@ -381,7 +381,7 @@ __ip_vs_route_output_v6(struct net *net,
                return dst;
        if (ipv6_addr_any(&fl6.saddr) &&
@@ -24494,19 +24494,19 @@ diff -NurpP --minimal linux-4.4.116/net/netfilter/ipvs/ip_vs_xmit.c linux-4.4.11
                goto out_err;
        if (do_xfrm) {
                dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), NULL, 0);
                goto out_err;
        if (do_xfrm) {
                dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), NULL, 0);
-diff -NurpP --minimal linux-4.4.116/net/netlink/af_netlink.c linux-4.4.116-vs2.3.9.7/net/netlink/af_netlink.c
---- linux-4.4.116/net/netlink/af_netlink.c     2018-02-22 21:20:06.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/netlink/af_netlink.c   2018-01-09 16:36:34.000000000 +0000
-@@ -62,6 +62,8 @@
- #include <asm/cacheflush.h>
+diff -NurpP --minimal linux-4.4.197/net/netlink/af_netlink.c linux-4.4.197-vs2.3.9.8/net/netlink/af_netlink.c
+--- linux-4.4.197/net/netlink/af_netlink.c     2019-10-22 12:34:46.108473875 +0000
++++ linux-4.4.197-vs2.3.9.8/net/netlink/af_netlink.c   2018-10-20 05:53:02.000000000 +0000
+@@ -63,6 +63,8 @@
  #include <linux/hash.h>
  #include <linux/genetlink.h>
  #include <linux/hash.h>
  #include <linux/genetlink.h>
+ #include <linux/nospec.h>
 +#include <linux/vs_context.h>
 +#include <linux/vs_network.h>
  
  #include <net/net_namespace.h>
  #include <net/sock.h>
 +#include <linux/vs_context.h>
 +#include <linux/vs_network.h>
  
  #include <net/net_namespace.h>
  #include <net/sock.h>
-@@ -2460,7 +2462,8 @@ static void *__netlink_seq_next(struct s
+@@ -2472,7 +2474,8 @@ static void *__netlink_seq_next(struct s
                        if (err)
                                return ERR_PTR(err);
                }
                        if (err)
                                return ERR_PTR(err);
                }
@@ -24516,10 +24516,30 @@ diff -NurpP --minimal linux-4.4.116/net/netlink/af_netlink.c linux-4.4.116-vs2.3
  
        return nlk;
  }
  
        return nlk;
  }
-diff -NurpP --minimal linux-4.4.116/net/socket.c linux-4.4.116-vs2.3.9.7/net/socket.c
---- linux-4.4.116/net/socket.c 2018-02-22 21:20:07.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/socket.c       2018-02-10 15:16:50.000000000 +0000
-@@ -99,10 +99,12 @@
+diff -NurpP --minimal linux-4.4.197/net/packet/diag.c linux-4.4.197-vs2.3.9.8/net/packet/diag.c
+--- linux-4.4.197/net/packet/diag.c    2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/net/packet/diag.c  2018-10-20 04:57:21.000000000 +0000
+@@ -4,6 +4,7 @@
+ #include <linux/netdevice.h>
+ #include <linux/packet_diag.h>
+ #include <linux/percpu.h>
++#include <linux/vs_network.h>
+ #include <net/net_namespace.h>
+ #include <net/sock.h>
+@@ -201,6 +202,8 @@ static int packet_diag_dump(struct sk_bu
+       sk_for_each(sk, &net->packet.sklist) {
+               if (!net_eq(sock_net(sk), net))
+                       continue;
++              if (!nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT))
++                      continue;
+               if (num < s_num)
+                       goto next;
+diff -NurpP --minimal linux-4.4.197/net/socket.c linux-4.4.197-vs2.3.9.8/net/socket.c
+--- linux-4.4.197/net/socket.c 2019-10-22 12:34:47.008459493 +0000
++++ linux-4.4.197-vs2.3.9.8/net/socket.c       2019-10-05 14:35:42.162655341 +0000
+@@ -100,10 +100,12 @@
  
  #include <net/sock.h>
  #include <linux/netfilter.h>
  
  #include <net/sock.h>
  #include <linux/netfilter.h>
@@ -24533,7 +24553,7 @@ diff -NurpP --minimal linux-4.4.116/net/socket.c linux-4.4.116-vs2.3.9.7/net/soc
  #include <linux/sockios.h>
  #include <linux/atalk.h>
  #include <net/busy_poll.h>
  #include <linux/sockios.h>
  #include <linux/atalk.h>
  #include <net/busy_poll.h>
-@@ -608,8 +610,24 @@ EXPORT_SYMBOL(__sock_tx_timestamp);
+@@ -597,8 +599,24 @@ EXPORT_SYMBOL(__sock_tx_timestamp);
  
  static inline int sock_sendmsg_nosec(struct socket *sock, struct msghdr *msg)
  {
  
  static inline int sock_sendmsg_nosec(struct socket *sock, struct msghdr *msg)
  {
@@ -24560,7 +24580,7 @@ diff -NurpP --minimal linux-4.4.116/net/socket.c linux-4.4.116-vs2.3.9.7/net/soc
        return ret;
  }
  
        return ret;
  }
  
-@@ -1100,6 +1118,13 @@ int __sock_create(struct net *net, int f
+@@ -1089,6 +1107,13 @@ int __sock_create(struct net *net, int f
        if (type < 0 || type >= SOCK_MAX)
                return -EINVAL;
  
        if (type < 0 || type >= SOCK_MAX)
                return -EINVAL;
  
@@ -24574,7 +24594,7 @@ diff -NurpP --minimal linux-4.4.116/net/socket.c linux-4.4.116-vs2.3.9.7/net/soc
        /* Compatibility.
  
           This uglymoron is moved from INET layer to here to avoid
        /* Compatibility.
  
           This uglymoron is moved from INET layer to here to avoid
-@@ -1234,6 +1259,7 @@ SYSCALL_DEFINE3(socket, int, family, int
+@@ -1223,6 +1248,7 @@ SYSCALL_DEFINE3(socket, int, family, int
        if (retval < 0)
                goto out;
  
        if (retval < 0)
                goto out;
  
@@ -24582,7 +24602,7 @@ diff -NurpP --minimal linux-4.4.116/net/socket.c linux-4.4.116-vs2.3.9.7/net/soc
        retval = sock_map_fd(sock, flags & (O_CLOEXEC | O_NONBLOCK));
        if (retval < 0)
                goto out_release;
        retval = sock_map_fd(sock, flags & (O_CLOEXEC | O_NONBLOCK));
        if (retval < 0)
                goto out_release;
-@@ -1275,10 +1301,12 @@ SYSCALL_DEFINE4(socketpair, int, family,
+@@ -1264,10 +1290,12 @@ SYSCALL_DEFINE4(socketpair, int, family,
        err = sock_create(family, type, protocol, &sock1);
        if (err < 0)
                goto out;
        err = sock_create(family, type, protocol, &sock1);
        if (err < 0)
                goto out;
@@ -24595,9 +24615,9 @@ diff -NurpP --minimal linux-4.4.116/net/socket.c linux-4.4.116-vs2.3.9.7/net/soc
  
        err = sock1->ops->socketpair(sock1, sock2);
        if (err < 0)
  
        err = sock1->ops->socketpair(sock1, sock2);
        if (err < 0)
-diff -NurpP --minimal linux-4.4.116/net/sunrpc/auth.c linux-4.4.116-vs2.3.9.7/net/sunrpc/auth.c
---- linux-4.4.116/net/sunrpc/auth.c    2015-10-29 09:21:46.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/sunrpc/auth.c  2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/sunrpc/auth.c linux-4.4.197-vs2.3.9.8/net/sunrpc/auth.c
+--- linux-4.4.197/net/sunrpc/auth.c    2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/net/sunrpc/auth.c  2018-10-20 04:57:21.000000000 +0000
 @@ -15,6 +15,7 @@
  #include <linux/sunrpc/clnt.h>
  #include <linux/sunrpc/gss_api.h>
 @@ -15,6 +15,7 @@
  #include <linux/sunrpc/clnt.h>
  #include <linux/sunrpc/gss_api.h>
@@ -24622,9 +24642,9 @@ diff -NurpP --minimal linux-4.4.116/net/sunrpc/auth.c linux-4.4.116-vs2.3.9.7/ne
        };
  
        dprintk("RPC: %5u looking up %s cred\n",
        };
  
        dprintk("RPC: %5u looking up %s cred\n",
-diff -NurpP --minimal linux-4.4.116/net/sunrpc/auth_unix.c linux-4.4.116-vs2.3.9.7/net/sunrpc/auth_unix.c
---- linux-4.4.116/net/sunrpc/auth_unix.c       2016-07-05 04:12:45.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/sunrpc/auth_unix.c     2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/sunrpc/auth_unix.c linux-4.4.197-vs2.3.9.8/net/sunrpc/auth_unix.c
+--- linux-4.4.197/net/sunrpc/auth_unix.c       2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/net/sunrpc/auth_unix.c     2018-10-20 04:57:21.000000000 +0000
 @@ -13,11 +13,13 @@
  #include <linux/sunrpc/clnt.h>
  #include <linux/sunrpc/auth.h>
 @@ -13,11 +13,13 @@
  #include <linux/sunrpc/clnt.h>
  #include <linux/sunrpc/auth.h>
@@ -24681,9 +24701,9 @@ diff -NurpP --minimal linux-4.4.116/net/sunrpc/auth_unix.c linux-4.4.116-vs2.3.9
        hold = p++;
        for (i = 0; i < 16 && gid_valid(cred->uc_gids[i]); i++)
                *p++ = htonl((u32) from_kgid(&init_user_ns, cred->uc_gids[i]));
        hold = p++;
        for (i = 0; i < 16 && gid_valid(cred->uc_gids[i]); i++)
                *p++ = htonl((u32) from_kgid(&init_user_ns, cred->uc_gids[i]));
-diff -NurpP --minimal linux-4.4.116/net/sunrpc/clnt.c linux-4.4.116-vs2.3.9.7/net/sunrpc/clnt.c
---- linux-4.4.116/net/sunrpc/clnt.c    2018-02-22 21:20:07.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/sunrpc/clnt.c  2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/sunrpc/clnt.c linux-4.4.197-vs2.3.9.8/net/sunrpc/clnt.c
+--- linux-4.4.197/net/sunrpc/clnt.c    2019-10-22 12:34:47.108457897 +0000
++++ linux-4.4.197-vs2.3.9.8/net/sunrpc/clnt.c  2018-10-20 04:57:21.000000000 +0000
 @@ -31,6 +31,7 @@
  #include <linux/in.h>
  #include <linux/in6.h>
 @@ -31,6 +31,7 @@
  #include <linux/in.h>
  #include <linux/in6.h>
@@ -24702,9 +24722,9 @@ diff -NurpP --minimal linux-4.4.116/net/sunrpc/clnt.c linux-4.4.116-vs2.3.9.7/ne
        return clnt;
  }
  
        return clnt;
  }
  
-diff -NurpP --minimal linux-4.4.116/net/unix/af_unix.c linux-4.4.116-vs2.3.9.7/net/unix/af_unix.c
---- linux-4.4.116/net/unix/af_unix.c   2018-02-22 21:20:07.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/net/unix/af_unix.c 2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/unix/af_unix.c linux-4.4.197-vs2.3.9.8/net/unix/af_unix.c
+--- linux-4.4.197/net/unix/af_unix.c   2019-10-22 12:34:47.388453423 +0000
++++ linux-4.4.197-vs2.3.9.8/net/unix/af_unix.c 2019-10-05 14:35:43.842628692 +0000
 @@ -117,6 +117,8 @@
  #include <net/checksum.h>
  #include <linux/security.h>
 @@ -117,6 +117,8 @@
  #include <net/checksum.h>
  #include <linux/security.h>
@@ -24723,7 +24743,7 @@ diff -NurpP --minimal linux-4.4.116/net/unix/af_unix.c linux-4.4.116-vs2.3.9.7/n
                if (u->addr->len == len &&
                    !memcmp(u->addr->name, sunname, len))
                        goto found;
                if (u->addr->len == len &&
                    !memcmp(u->addr->name, sunname, len))
                        goto found;
-@@ -2741,6 +2745,8 @@ static struct sock *unix_from_bucket(str
+@@ -2748,6 +2752,8 @@ static struct sock *unix_from_bucket(str
        for (sk = sk_head(&unix_socket_table[bucket]); sk; sk = sk_next(sk)) {
                if (sock_net(sk) != seq_file_net(seq))
                        continue;
        for (sk = sk_head(&unix_socket_table[bucket]); sk; sk = sk_next(sk)) {
                if (sock_net(sk) != seq_file_net(seq))
                        continue;
@@ -24732,7 +24752,7 @@ diff -NurpP --minimal linux-4.4.116/net/unix/af_unix.c linux-4.4.116-vs2.3.9.7/n
                if (++count == offset)
                        break;
        }
                if (++count == offset)
                        break;
        }
-@@ -2758,6 +2764,8 @@ static struct sock *unix_next_socket(str
+@@ -2765,6 +2771,8 @@ static struct sock *unix_next_socket(str
                sk = sk_next(sk);
                if (!sk)
                        goto next_bucket;
                sk = sk_next(sk);
                if (!sk)
                        goto next_bucket;
@@ -24741,9 +24761,29 @@ diff -NurpP --minimal linux-4.4.116/net/unix/af_unix.c linux-4.4.116-vs2.3.9.7/n
                if (sock_net(sk) == seq_file_net(seq))
                        return sk;
        }
                if (sock_net(sk) == seq_file_net(seq))
                        return sk;
        }
-diff -NurpP --minimal linux-4.4.116/scripts/checksyscalls.sh linux-4.4.116-vs2.3.9.7/scripts/checksyscalls.sh
---- linux-4.4.116/scripts/checksyscalls.sh     2015-10-29 09:21:46.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/scripts/checksyscalls.sh   2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/net/unix/diag.c linux-4.4.197-vs2.3.9.8/net/unix/diag.c
+--- linux-4.4.197/net/unix/diag.c      2019-10-22 12:34:47.388453423 +0000
++++ linux-4.4.197-vs2.3.9.8/net/unix/diag.c    2019-10-05 14:35:43.902627739 +0000
+@@ -4,6 +4,7 @@
+ #include <linux/unix_diag.h>
+ #include <linux/skbuff.h>
+ #include <linux/module.h>
++#include <linux/vs_network.h>
+ #include <net/netlink.h>
+ #include <net/af_unix.h>
+ #include <net/tcp_states.h>
+@@ -200,6 +201,8 @@ static int unix_diag_dump(struct sk_buff
+               sk_for_each(sk, &unix_socket_table[slot]) {
+                       if (!net_eq(sock_net(sk), net))
+                               continue;
++                      if (!nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT))
++                              continue;
+                       if (num < s_num)
+                               goto next;
+                       if (!(req->udiag_states & (1 << sk->sk_state)))
+diff -NurpP --minimal linux-4.4.197/scripts/checksyscalls.sh linux-4.4.197-vs2.3.9.8/scripts/checksyscalls.sh
+--- linux-4.4.197/scripts/checksyscalls.sh     2016-01-10 23:01:32.000000000 +0000
++++ linux-4.4.197-vs2.3.9.8/scripts/checksyscalls.sh   2018-10-20 04:57:21.000000000 +0000
 @@ -196,7 +196,6 @@ cat << EOF
  #define __IGNORE_afs_syscall
  #define __IGNORE_getpmsg
 @@ -196,7 +196,6 @@ cat << EOF
  #define __IGNORE_afs_syscall
  #define __IGNORE_getpmsg
@@ -24752,9 +24792,9 @@ diff -NurpP --minimal linux-4.4.116/scripts/checksyscalls.sh linux-4.4.116-vs2.3
  EOF
  }
  
  EOF
  }
  
-diff -NurpP --minimal linux-4.4.116/security/commoncap.c linux-4.4.116-vs2.3.9.7/security/commoncap.c
---- linux-4.4.116/security/commoncap.c 2018-02-22 21:20:08.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/security/commoncap.c       2018-01-09 16:36:34.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/security/commoncap.c linux-4.4.197-vs2.3.9.8/security/commoncap.c
+--- linux-4.4.197/security/commoncap.c 2019-10-22 12:34:49.458420344 +0000
++++ linux-4.4.197-vs2.3.9.8/security/commoncap.c       2018-10-20 04:57:21.000000000 +0000
 @@ -71,6 +71,7 @@ static void warn_setuid_and_fcaps_mixed(
  int cap_capable(const struct cred *cred, struct user_namespace *targ_ns,
                int cap, int audit)
 @@ -71,6 +71,7 @@ static void warn_setuid_and_fcaps_mixed(
  int cap_capable(const struct cred *cred, struct user_namespace *targ_ns,
                int cap, int audit)
@@ -24796,9 +24836,9 @@ diff -NurpP --minimal linux-4.4.116/security/commoncap.c linux-4.4.116-vs2.3.9.7
                return -EPERM;
        return 0;
  }
                return -EPERM;
        return 0;
  }
-diff -NurpP --minimal linux-4.4.116/security/selinux/hooks.c linux-4.4.116-vs2.3.9.7/security/selinux/hooks.c
---- linux-4.4.116/security/selinux/hooks.c     2018-02-22 21:20:08.000000000 +0000
-+++ linux-4.4.116-vs2.3.9.7/security/selinux/hooks.c   2018-02-10 15:16:50.000000000 +0000
+diff -NurpP --minimal linux-4.4.197/security/selinux/hooks.c linux-4.4.197-vs2.3.9.8/security/selinux/hooks.c
+--- linux-4.4.197/security/selinux/hooks.c     2019-10-22 12:34:49.928412834 +0000
++++ linux-4.4.197-vs2.3.9.8/security/selinux/hooks.c   2019-10-05 14:35:45.912595854 +0000
 @@ -67,7 +67,6 @@
  #include <linux/dccp.h>
  #include <linux/quota.h>
 @@ -67,7 +67,6 @@
  #include <linux/dccp.h>
  #include <linux/quota.h>
This page took 0.832422 seconds and 4 git commands to generate.