diff -druNp --no-dereference linux-libre-4.4.110-gnu/arch/arc/include/asm/uaccess.h linux-libre-4.4.111-gnu/arch/arc/include/asm/uaccess.h
--- linux-libre-4.4.110-gnu/arch/arc/include/asm/uaccess.h	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/arch/arc/include/asm/uaccess.h	2018-01-10 03:27:15.000000000 -0500
@@ -673,6 +673,7 @@ __arc_strncpy_from_user(char *dst, const
 		return 0;
 
 	__asm__ __volatile__(
+	"	mov	lp_count, %5		\n"
 	"	lp	3f			\n"
 	"1:	ldb.ab  %3, [%2, 1]		\n"
 	"	breq.d	%3, 0, 3f               \n"
@@ -689,8 +690,8 @@ __arc_strncpy_from_user(char *dst, const
 	"	.word   1b, 4b			\n"
 	"	.previous			\n"
 	: "+r"(res), "+r"(dst), "+r"(src), "=r"(val)
-	: "g"(-EFAULT), "l"(count)
-	: "memory");
+	: "g"(-EFAULT), "r"(count)
+	: "lp_count", "lp_start", "lp_end", "memory");
 
 	return res;
 }
diff -druNp --no-dereference linux-libre-4.4.110-gnu/arch/parisc/include/asm/ldcw.h linux-libre-4.4.111-gnu/arch/parisc/include/asm/ldcw.h
--- linux-libre-4.4.110-gnu/arch/parisc/include/asm/ldcw.h	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/arch/parisc/include/asm/ldcw.h	2018-01-10 03:27:15.000000000 -0500
@@ -11,6 +11,7 @@
    for the semaphore.  */
 
 #define __PA_LDCW_ALIGNMENT	16
+#define __PA_LDCW_ALIGN_ORDER	4
 #define __ldcw_align(a) ({					\
 	unsigned long __ret = (unsigned long) &(a)->lock[0];	\
 	__ret = (__ret + __PA_LDCW_ALIGNMENT - 1)		\
@@ -28,6 +29,7 @@
    ldcd). */
 
 #define __PA_LDCW_ALIGNMENT	4
+#define __PA_LDCW_ALIGN_ORDER	2
 #define __ldcw_align(a) (&(a)->slock)
 #define __LDCW	"ldcw,co"
 
diff -druNp --no-dereference linux-libre-4.4.110-gnu/arch/parisc/kernel/entry.S linux-libre-4.4.111-gnu/arch/parisc/kernel/entry.S
--- linux-libre-4.4.110-gnu/arch/parisc/kernel/entry.S	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/arch/parisc/kernel/entry.S	2018-01-10 03:27:15.000000000 -0500
@@ -35,6 +35,7 @@
 #include <asm/pgtable.h>
 #include <asm/signal.h>
 #include <asm/unistd.h>
+#include <asm/ldcw.h>
 #include <asm/thread_info.h>
 
 #include <linux/linkage.h>
@@ -46,6 +47,14 @@
 #endif
 
 	.import		pa_tlb_lock,data
+	.macro  load_pa_tlb_lock reg
+#if __PA_LDCW_ALIGNMENT > 4
+	load32	PA(pa_tlb_lock) + __PA_LDCW_ALIGNMENT-1, \reg
+	depi	0,31,__PA_LDCW_ALIGN_ORDER, \reg
+#else
+	load32	PA(pa_tlb_lock), \reg
+#endif
+	.endm
 
 	/* space_to_prot macro creates a prot id from a space id */
 
@@ -457,7 +466,7 @@
 	.macro		tlb_lock	spc,ptp,pte,tmp,tmp1,fault
 #ifdef CONFIG_SMP
 	cmpib,COND(=),n	0,\spc,2f
-	load32		PA(pa_tlb_lock),\tmp
+	load_pa_tlb_lock \tmp
 1:	LDCW		0(\tmp),\tmp1
 	cmpib,COND(=)	0,\tmp1,1b
 	nop
@@ -480,7 +489,7 @@
 	/* Release pa_tlb_lock lock. */
 	.macro		tlb_unlock1	spc,tmp
 #ifdef CONFIG_SMP
-	load32		PA(pa_tlb_lock),\tmp
+	load_pa_tlb_lock \tmp
 	tlb_unlock0	\spc,\tmp
 #endif
 	.endm
diff -druNp --no-dereference linux-libre-4.4.110-gnu/arch/parisc/kernel/pacache.S linux-libre-4.4.111-gnu/arch/parisc/kernel/pacache.S
--- linux-libre-4.4.110-gnu/arch/parisc/kernel/pacache.S	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/arch/parisc/kernel/pacache.S	2018-01-10 03:27:15.000000000 -0500
@@ -36,6 +36,7 @@
 #include <asm/assembly.h>
 #include <asm/pgtable.h>
 #include <asm/cache.h>
+#include <asm/ldcw.h>
 #include <linux/linkage.h>
 
 	.text
@@ -333,8 +334,12 @@ ENDPROC(flush_data_cache_local)
 
 	.macro	tlb_lock	la,flags,tmp
 #ifdef CONFIG_SMP
-	ldil		L%pa_tlb_lock,%r1
-	ldo		R%pa_tlb_lock(%r1),\la
+#if __PA_LDCW_ALIGNMENT > 4
+	load32		pa_tlb_lock + __PA_LDCW_ALIGNMENT-1, \la
+	depi		0,31,__PA_LDCW_ALIGN_ORDER, \la
+#else
+	load32		pa_tlb_lock, \la
+#endif
 	rsm		PSW_SM_I,\flags
 1:	LDCW		0(\la),\tmp
 	cmpib,<>,n	0,\tmp,3f
diff -druNp --no-dereference linux-libre-4.4.110-gnu/arch/s390/kernel/compat_linux.c linux-libre-4.4.111-gnu/arch/s390/kernel/compat_linux.c
--- linux-libre-4.4.110-gnu/arch/s390/kernel/compat_linux.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/arch/s390/kernel/compat_linux.c	2018-01-10 03:27:15.000000000 -0500
@@ -263,6 +263,7 @@ COMPAT_SYSCALL_DEFINE2(s390_setgroups16,
 		return retval;
 	}
 
+	groups_sort(group_info);
 	retval = set_current_groups(group_info);
 	put_group_info(group_info);
 
diff -druNp --no-dereference linux-libre-4.4.110-gnu/arch/x86/entry/vdso/vma.c linux-libre-4.4.111-gnu/arch/x86/entry/vdso/vma.c
--- linux-libre-4.4.110-gnu/arch/x86/entry/vdso/vma.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/arch/x86/entry/vdso/vma.c	2018-01-10 03:27:15.000000000 -0500
@@ -12,6 +12,7 @@
 #include <linux/random.h>
 #include <linux/elf.h>
 #include <linux/cpu.h>
+#include <asm/pvclock.h>
 #include <asm/vgtod.h>
 #include <asm/proto.h>
 #include <asm/vdso.h>
diff -druNp --no-dereference linux-libre-4.4.110-gnu/arch/x86/entry/vsyscall/vsyscall_64.c linux-libre-4.4.111-gnu/arch/x86/entry/vsyscall/vsyscall_64.c
--- linux-libre-4.4.110-gnu/arch/x86/entry/vsyscall/vsyscall_64.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/arch/x86/entry/vsyscall/vsyscall_64.c	2018-01-10 03:27:15.000000000 -0500
@@ -66,6 +66,11 @@ static int __init vsyscall_setup(char *s
 }
 early_param("vsyscall", vsyscall_setup);
 
+bool vsyscall_enabled(void)
+{
+	return vsyscall_mode != NONE;
+}
+
 static void warn_bad_vsyscall(const char *level, struct pt_regs *regs,
 			      const char *message)
 {
diff -druNp --no-dereference linux-libre-4.4.110-gnu/arch/x86/include/asm/vsyscall.h linux-libre-4.4.111-gnu/arch/x86/include/asm/vsyscall.h
--- linux-libre-4.4.110-gnu/arch/x86/include/asm/vsyscall.h	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/arch/x86/include/asm/vsyscall.h	2018-01-10 03:27:15.000000000 -0500
@@ -12,12 +12,14 @@ extern void map_vsyscall(void);
  * Returns true if handled.
  */
 extern bool emulate_vsyscall(struct pt_regs *regs, unsigned long address);
+extern bool vsyscall_enabled(void);
 #else
 static inline void map_vsyscall(void) {}
 static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
 {
 	return false;
 }
+static inline bool vsyscall_enabled(void) { return false; }
 #endif
 
 #endif /* _ASM_X86_VSYSCALL_H */
diff -druNp --no-dereference linux-libre-4.4.110-gnu/arch/x86/kernel/cpu/microcode/amd.c linux-libre-4.4.111-gnu/arch/x86/kernel/cpu/microcode/amd.c
--- linux-libre-4.4.110-gnu/arch/x86/kernel/cpu/microcode/amd.c	2018-01-05 19:07:06.000000000 -0500
+++ linux-libre-4.4.111-gnu/arch/x86/kernel/cpu/microcode/amd.c	2018-01-10 05:17:01.000000000 -0500
@@ -580,6 +580,7 @@ static unsigned int verify_patch_size(u8
 #define F14H_MPB_MAX_SIZE 1824
 #define F15H_MPB_MAX_SIZE 4096
 #define F16H_MPB_MAX_SIZE 3458
+#define F17H_MPB_MAX_SIZE 3200
 
 	switch (family) {
 	case 0x14:
@@ -591,6 +592,9 @@ static unsigned int verify_patch_size(u8
 	case 0x16:
 		max_size = F16H_MPB_MAX_SIZE;
 		break;
+	case 0x17:
+		max_size = F17H_MPB_MAX_SIZE;
+		break;
 	default:
 		max_size = F1XH_MPB_MAX_SIZE;
 		break;
diff -druNp --no-dereference linux-libre-4.4.110-gnu/arch/x86/mm/init.c linux-libre-4.4.111-gnu/arch/x86/mm/init.c
--- linux-libre-4.4.110-gnu/arch/x86/mm/init.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/arch/x86/mm/init.c	2018-01-10 03:27:15.000000000 -0500
@@ -757,7 +757,7 @@ DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb
 	.state = 0,
 	.cr4 = ~0UL,	/* fail hard if we screw up cr4 shadow initialization */
 };
-EXPORT_SYMBOL_GPL(cpu_tlbstate);
+EXPORT_PER_CPU_SYMBOL(cpu_tlbstate);
 
 void update_cache_mode_entry(unsigned entry, enum page_cache_mode cache)
 {
diff -druNp --no-dereference linux-libre-4.4.110-gnu/arch/x86/mm/kaiser.c linux-libre-4.4.111-gnu/arch/x86/mm/kaiser.c
--- linux-libre-4.4.110-gnu/arch/x86/mm/kaiser.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/arch/x86/mm/kaiser.c	2018-01-10 03:27:15.000000000 -0500
@@ -20,6 +20,7 @@
 #include <asm/pgalloc.h>
 #include <asm/desc.h>
 #include <asm/cmdline.h>
+#include <asm/vsyscall.h>
 
 int kaiser_enabled __read_mostly = 1;
 EXPORT_SYMBOL(kaiser_enabled);	/* for inlined TLB flush functions */
@@ -111,12 +112,13 @@ static inline unsigned long get_pa_from_
  *
  * Returns a pointer to a PTE on success, or NULL on failure.
  */
-static pte_t *kaiser_pagetable_walk(unsigned long address)
+static pte_t *kaiser_pagetable_walk(unsigned long address, bool user)
 {
 	pmd_t *pmd;
 	pud_t *pud;
 	pgd_t *pgd = native_get_shadow_pgd(pgd_offset_k(address));
 	gfp_t gfp = (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO);
+	unsigned long prot = _KERNPG_TABLE;
 
 	if (pgd_none(*pgd)) {
 		WARN_ONCE(1, "All shadow pgds should have been populated");
@@ -124,6 +126,17 @@ static pte_t *kaiser_pagetable_walk(unsi
 	}
 	BUILD_BUG_ON(pgd_large(*pgd) != 0);
 
+	if (user) {
+		/*
+		 * The vsyscall page is the only page that will have
+		 *  _PAGE_USER set. Catch everything else.
+		 */
+		BUG_ON(address != VSYSCALL_ADDR);
+
+		set_pgd(pgd, __pgd(pgd_val(*pgd) | _PAGE_USER));
+		prot = _PAGE_TABLE;
+	}
+
 	pud = pud_offset(pgd, address);
 	/* The shadow page tables do not use large mappings: */
 	if (pud_large(*pud)) {
@@ -136,7 +149,7 @@ static pte_t *kaiser_pagetable_walk(unsi
 			return NULL;
 		spin_lock(&shadow_table_allocation_lock);
 		if (pud_none(*pud)) {
-			set_pud(pud, __pud(_KERNPG_TABLE | __pa(new_pmd_page)));
+			set_pud(pud, __pud(prot | __pa(new_pmd_page)));
 			__inc_zone_page_state(virt_to_page((void *)
 						new_pmd_page), NR_KAISERTABLE);
 		} else
@@ -156,7 +169,7 @@ static pte_t *kaiser_pagetable_walk(unsi
 			return NULL;
 		spin_lock(&shadow_table_allocation_lock);
 		if (pmd_none(*pmd)) {
-			set_pmd(pmd, __pmd(_KERNPG_TABLE | __pa(new_pte_page)));
+			set_pmd(pmd, __pmd(prot | __pa(new_pte_page)));
 			__inc_zone_page_state(virt_to_page((void *)
 						new_pte_page), NR_KAISERTABLE);
 		} else
@@ -192,7 +205,7 @@ static int kaiser_add_user_map(const voi
 			ret = -EIO;
 			break;
 		}
-		pte = kaiser_pagetable_walk(address);
+		pte = kaiser_pagetable_walk(address, flags & _PAGE_USER);
 		if (!pte) {
 			ret = -ENOMEM;
 			break;
@@ -319,6 +332,19 @@ void __init kaiser_init(void)
 
 	kaiser_init_all_pgds();
 
+	/*
+	 * Note that this sets _PAGE_USER and it needs to happen when the
+	 * pagetable hierarchy gets created, i.e., early. Otherwise
+	 * kaiser_pagetable_walk() will encounter initialized PTEs in the
+	 * hierarchy and not set the proper permissions, leading to the
+	 * pagefaults with page-protection violations when trying to read the
+	 * vsyscall page. For example.
+	 */
+	if (vsyscall_enabled())
+		kaiser_add_user_map_early((void *)VSYSCALL_ADDR,
+					  PAGE_SIZE,
+					   __PAGE_KERNEL_VSYSCALL);
+
 	for_each_possible_cpu(cpu) {
 		void *percpu_vaddr = __per_cpu_user_mapped_start +
 				     per_cpu_offset(cpu);
diff -druNp --no-dereference linux-libre-4.4.110-gnu/arch/x86/mm/kasan_init_64.c linux-libre-4.4.111-gnu/arch/x86/mm/kasan_init_64.c
--- linux-libre-4.4.110-gnu/arch/x86/mm/kasan_init_64.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/arch/x86/mm/kasan_init_64.c	2018-01-10 03:27:15.000000000 -0500
@@ -126,10 +126,16 @@ void __init kasan_init(void)
 
 	/*
 	 * kasan_zero_page has been used as early shadow memory, thus it may
-	 * contain some garbage. Now we can clear it, since after the TLB flush
-	 * no one should write to it.
+	 * contain some garbage. Now we can clear and write protect it, since
+	 * after the TLB flush no one should write to it.
 	 */
 	memset(kasan_zero_page, 0, PAGE_SIZE);
+	for (i = 0; i < PTRS_PER_PTE; i++) {
+		pte_t pte = __pte(__pa(kasan_zero_page) | __PAGE_KERNEL_RO);
+		set_pte(&kasan_zero_pte[i], pte);
+	}
+	/* Flush TLBs again to be sure that write protection applied. */
+	__flush_tlb_all();
 
 	init_task.kasan_depth = 0;
 	pr_info("KernelAddressSanitizer initialized\n");
diff -druNp --no-dereference linux-libre-4.4.110-gnu/crypto/chacha20poly1305.c linux-libre-4.4.111-gnu/crypto/chacha20poly1305.c
--- linux-libre-4.4.110-gnu/crypto/chacha20poly1305.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/crypto/chacha20poly1305.c	2018-01-10 03:27:15.000000000 -0500
@@ -600,6 +600,11 @@ static int chachapoly_create(struct cryp
 			       CRYPTO_ALG_TYPE_AHASH_MASK);
 	if (IS_ERR(poly))
 		return PTR_ERR(poly);
+	poly_hash = __crypto_hash_alg_common(poly);
+
+	err = -EINVAL;
+	if (poly_hash->digestsize != POLY1305_DIGEST_SIZE)
+		goto out_put_poly;
 
 	err = -ENOMEM;
 	inst = kzalloc(sizeof(*inst) + sizeof(*ctx), GFP_KERNEL);
@@ -608,7 +613,6 @@ static int chachapoly_create(struct cryp
 
 	ctx = aead_instance_ctx(inst);
 	ctx->saltlen = CHACHAPOLY_IV_SIZE - ivsize;
-	poly_hash = __crypto_hash_alg_common(poly);
 	err = crypto_init_ahash_spawn(&ctx->poly, poly_hash,
 				      aead_crypto_instance(inst));
 	if (err)
diff -druNp --no-dereference linux-libre-4.4.110-gnu/crypto/pcrypt.c linux-libre-4.4.111-gnu/crypto/pcrypt.c
--- linux-libre-4.4.110-gnu/crypto/pcrypt.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/crypto/pcrypt.c	2018-01-10 03:27:15.000000000 -0500
@@ -254,6 +254,14 @@ static void pcrypt_aead_exit_tfm(struct
 	crypto_free_aead(ctx->child);
 }
 
+static void pcrypt_free(struct aead_instance *inst)
+{
+	struct pcrypt_instance_ctx *ctx = aead_instance_ctx(inst);
+
+	crypto_drop_aead(&ctx->spawn);
+	kfree(inst);
+}
+
 static int pcrypt_init_instance(struct crypto_instance *inst,
 				struct crypto_alg *alg)
 {
@@ -319,6 +327,8 @@ static int pcrypt_create_aead(struct cry
 	inst->alg.encrypt = pcrypt_aead_encrypt;
 	inst->alg.decrypt = pcrypt_aead_decrypt;
 
+	inst->free = pcrypt_free;
+
 	err = aead_register_instance(tmpl, inst);
 	if (err)
 		goto out_drop_aead;
@@ -349,14 +359,6 @@ static int pcrypt_create(struct crypto_t
 	return -EINVAL;
 }
 
-static void pcrypt_free(struct crypto_instance *inst)
-{
-	struct pcrypt_instance_ctx *ctx = crypto_instance_ctx(inst);
-
-	crypto_drop_aead(&ctx->spawn);
-	kfree(inst);
-}
-
 static int pcrypt_cpumask_change_notify(struct notifier_block *self,
 					unsigned long val, void *data)
 {
@@ -469,7 +471,6 @@ static void pcrypt_fini_padata(struct pa
 static struct crypto_template pcrypt_tmpl = {
 	.name = "pcrypt",
 	.create = pcrypt_create,
-	.free = pcrypt_free,
 	.module = THIS_MODULE,
 };
 
diff -druNp --no-dereference linux-libre-4.4.110-gnu/drivers/bus/sunxi-rsb.c linux-libre-4.4.111-gnu/drivers/bus/sunxi-rsb.c
--- linux-libre-4.4.110-gnu/drivers/bus/sunxi-rsb.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/drivers/bus/sunxi-rsb.c	2018-01-10 03:27:15.000000000 -0500
@@ -178,6 +178,7 @@ static struct bus_type sunxi_rsb_bus = {
 	.match		= sunxi_rsb_device_match,
 	.probe		= sunxi_rsb_device_probe,
 	.remove		= sunxi_rsb_device_remove,
+	.uevent		= of_device_uevent_modalias,
 };
 
 static void sunxi_rsb_dev_release(struct device *dev)
diff -druNp --no-dereference linux-libre-4.4.110-gnu/drivers/crypto/n2_core.c linux-libre-4.4.111-gnu/drivers/crypto/n2_core.c
--- linux-libre-4.4.110-gnu/drivers/crypto/n2_core.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/drivers/crypto/n2_core.c	2018-01-10 03:27:15.000000000 -0500
@@ -1641,6 +1641,7 @@ static int queue_cache_init(void)
 					  CWQ_ENTRY_SIZE, 0, NULL);
 	if (!queue_cache[HV_NCS_QTYPE_CWQ - 1]) {
 		kmem_cache_destroy(queue_cache[HV_NCS_QTYPE_MAU - 1]);
+		queue_cache[HV_NCS_QTYPE_MAU - 1] = NULL;
 		return -ENOMEM;
 	}
 	return 0;
@@ -1650,6 +1651,8 @@ static void queue_cache_destroy(void)
 {
 	kmem_cache_destroy(queue_cache[HV_NCS_QTYPE_MAU - 1]);
 	kmem_cache_destroy(queue_cache[HV_NCS_QTYPE_CWQ - 1]);
+	queue_cache[HV_NCS_QTYPE_MAU - 1] = NULL;
+	queue_cache[HV_NCS_QTYPE_CWQ - 1] = NULL;
 }
 
 static int spu_queue_register(struct spu_queue *p, unsigned long q_type)
diff -druNp --no-dereference linux-libre-4.4.110-gnu/drivers/input/mouse/elantech.c linux-libre-4.4.111-gnu/drivers/input/mouse/elantech.c
--- linux-libre-4.4.110-gnu/drivers/input/mouse/elantech.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/drivers/input/mouse/elantech.c	2018-01-10 03:27:15.000000000 -0500
@@ -1613,7 +1613,7 @@ static int elantech_set_properties(struc
 		case 5:
 			etd->hw_version = 3;
 			break;
-		case 6 ... 14:
+		case 6 ... 15:
 			etd->hw_version = 4;
 			break;
 		default:
diff -druNp --no-dereference linux-libre-4.4.110-gnu/fs/nfsd/auth.c linux-libre-4.4.111-gnu/fs/nfsd/auth.c
--- linux-libre-4.4.110-gnu/fs/nfsd/auth.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/fs/nfsd/auth.c	2018-01-10 03:27:15.000000000 -0500
@@ -59,6 +59,9 @@ int nfsd_setuser(struct svc_rqst *rqstp,
 				GROUP_AT(gi, i) = exp->ex_anon_gid;
 			else
 				GROUP_AT(gi, i) = GROUP_AT(rqgi, i);
+
+			/* Each thread allocates its own gi, no race */
+			groups_sort(gi);
 		}
 	} else {
 		gi = get_group_info(rqgi);
diff -druNp --no-dereference linux-libre-4.4.110-gnu/include/linux/cred.h linux-libre-4.4.111-gnu/include/linux/cred.h
--- linux-libre-4.4.110-gnu/include/linux/cred.h	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/include/linux/cred.h	2018-01-10 03:27:15.000000000 -0500
@@ -87,6 +87,7 @@ extern int set_current_groups(struct gro
 extern void set_groups(struct cred *, struct group_info *);
 extern int groups_search(const struct group_info *, kgid_t);
 extern bool may_setgroups(void);
+extern void groups_sort(struct group_info *);
 
 /* access the groups "array" with this macro */
 #define GROUP_AT(gi, i) \
diff -druNp --no-dereference linux-libre-4.4.110-gnu/include/linux/fscache.h linux-libre-4.4.111-gnu/include/linux/fscache.h
--- linux-libre-4.4.110-gnu/include/linux/fscache.h	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/include/linux/fscache.h	2018-01-10 03:27:15.000000000 -0500
@@ -764,7 +764,7 @@ bool fscache_maybe_release_page(struct f
 {
 	if (fscache_cookie_valid(cookie) && PageFsCache(page))
 		return __fscache_maybe_release_page(cookie, page, gfp);
-	return false;
+	return true;
 }
 
 /**
diff -druNp --no-dereference linux-libre-4.4.110-gnu/kernel/acct.c linux-libre-4.4.111-gnu/kernel/acct.c
--- linux-libre-4.4.110-gnu/kernel/acct.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/kernel/acct.c	2018-01-10 03:27:15.000000000 -0500
@@ -99,7 +99,7 @@ static int check_free_space(struct bsd_a
 {
 	struct kstatfs sbuf;
 
-	if (time_is_before_jiffies(acct->needcheck))
+	if (time_is_after_jiffies(acct->needcheck))
 		goto out;
 
 	/* May block */
diff -druNp --no-dereference linux-libre-4.4.110-gnu/kernel/groups.c linux-libre-4.4.111-gnu/kernel/groups.c
--- linux-libre-4.4.110-gnu/kernel/groups.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/kernel/groups.c	2018-01-10 03:27:15.000000000 -0500
@@ -101,7 +101,7 @@ static int groups_from_user(struct group
 }
 
 /* a simple Shell sort */
-static void groups_sort(struct group_info *group_info)
+void groups_sort(struct group_info *group_info)
 {
 	int base, max, stride;
 	int gidsetsize = group_info->ngroups;
@@ -128,6 +128,7 @@ static void groups_sort(struct group_inf
 		stride /= 3;
 	}
 }
+EXPORT_SYMBOL(groups_sort);
 
 /* a simple bsearch */
 int groups_search(const struct group_info *group_info, kgid_t grp)
@@ -159,7 +160,6 @@ int groups_search(const struct group_inf
 void set_groups(struct cred *new, struct group_info *group_info)
 {
 	put_group_info(new->group_info);
-	groups_sort(group_info);
 	get_group_info(group_info);
 	new->group_info = group_info;
 }
@@ -243,6 +243,7 @@ SYSCALL_DEFINE2(setgroups, int, gidsetsi
 		return retval;
 	}
 
+	groups_sort(group_info);
 	retval = set_current_groups(group_info);
 	put_group_info(group_info);
 
diff -druNp --no-dereference linux-libre-4.4.110-gnu/kernel/module.c linux-libre-4.4.111-gnu/kernel/module.c
--- linux-libre-4.4.110-gnu/kernel/module.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/kernel/module.c	2018-01-10 03:27:15.000000000 -0500
@@ -2404,7 +2404,7 @@ static char elf_type(const Elf_Sym *sym,
 	}
 	if (sym->st_shndx == SHN_UNDEF)
 		return 'U';
-	if (sym->st_shndx == SHN_ABS)
+	if (sym->st_shndx == SHN_ABS || sym->st_shndx == info->index.pcpu)
 		return 'a';
 	if (sym->st_shndx >= SHN_LORESERVE)
 		return '?';
@@ -2433,7 +2433,7 @@ static char elf_type(const Elf_Sym *sym,
 }
 
 static bool is_core_symbol(const Elf_Sym *src, const Elf_Shdr *sechdrs,
-			unsigned int shnum)
+			unsigned int shnum, unsigned int pcpundx)
 {
 	const Elf_Shdr *sec;
 
@@ -2442,6 +2442,11 @@ static bool is_core_symbol(const Elf_Sym
 	    || !src->st_name)
 		return false;
 
+#ifdef CONFIG_KALLSYMS_ALL
+	if (src->st_shndx == pcpundx)
+		return true;
+#endif
+
 	sec = sechdrs + src->st_shndx;
 	if (!(sec->sh_flags & SHF_ALLOC)
 #ifndef CONFIG_KALLSYMS_ALL
@@ -2479,7 +2484,8 @@ static void layout_symtab(struct module
 	/* Compute total space required for the core symbols' strtab. */
 	for (ndst = i = 0; i < nsrc; i++) {
 		if (i == 0 ||
-		    is_core_symbol(src+i, info->sechdrs, info->hdr->e_shnum)) {
+		    is_core_symbol(src+i, info->sechdrs, info->hdr->e_shnum,
+				   info->index.pcpu)) {
 			strtab_size += strlen(&info->strtab[src[i].st_name])+1;
 			ndst++;
 		}
@@ -2537,7 +2543,8 @@ static void add_kallsyms(struct module *
 	src = mod->kallsyms->symtab;
 	for (ndst = i = 0; i < mod->kallsyms->num_symtab; i++) {
 		if (i == 0 ||
-		    is_core_symbol(src+i, info->sechdrs, info->hdr->e_shnum)) {
+		    is_core_symbol(src+i, info->sechdrs, info->hdr->e_shnum,
+				   info->index.pcpu)) {
 			dst[ndst] = src[i];
 			dst[ndst++].st_name = s - mod->core_kallsyms.strtab;
 			s += strlcpy(s, &mod->kallsyms->strtab[src[i].st_name],
@@ -2881,8 +2888,12 @@ static int check_modinfo(struct module *
 		return -ENOEXEC;
 	}
 
-	if (!get_modinfo(info, "intree"))
+	if (!get_modinfo(info, "intree")) {
+		if (!test_taint(TAINT_OOT_MODULE))
+			pr_warn("%s: loading out-of-tree module taints kernel.\n",
+				mod->name);
 		add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
+	}
 
 	if (get_modinfo(info, "staging")) {
 		add_taint_module(mod, TAINT_CRAP, LOCKDEP_STILL_OK);
@@ -3047,6 +3058,8 @@ static int move_module(struct module *mo
 
 static int check_module_license_and_versions(struct module *mod)
 {
+	int prev_taint = test_taint(TAINT_PROPRIETARY_MODULE);
+
 	/*
 	 * ndiswrapper is under GPL by itself, but loads proprietary modules.
 	 * Don't use add_taint_module(), as it would prevent ndiswrapper from
@@ -3065,6 +3078,9 @@ static int check_module_license_and_vers
 		add_taint_module(mod, TAINT_PROPRIETARY_MODULE,
 				 LOCKDEP_NOW_UNRELIABLE);
 
+	if (!prev_taint && test_taint(TAINT_PROPRIETARY_MODULE))
+		pr_warn("%s: module license taints kernel.\n", mod->name);
+
 #ifdef CONFIG_MODVERSIONS
 	if ((mod->num_syms && !mod->crcs)
 	    || (mod->num_gpl_syms && !mod->gpl_crcs)
diff -druNp --no-dereference linux-libre-4.4.110-gnu/kernel/signal.c linux-libre-4.4.111-gnu/kernel/signal.c
--- linux-libre-4.4.110-gnu/kernel/signal.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/kernel/signal.c	2018-01-10 03:27:15.000000000 -0500
@@ -72,7 +72,7 @@ static int sig_task_ignored(struct task_
 	handler = sig_handler(t, sig);
 
 	if (unlikely(t->signal->flags & SIGNAL_UNKILLABLE) &&
-			handler == SIG_DFL && !force)
+	    handler == SIG_DFL && !(force && sig_kernel_only(sig)))
 		return 1;
 
 	return sig_handler_ignored(handler, sig);
@@ -88,13 +88,15 @@ static int sig_ignored(struct task_struc
 	if (sigismember(&t->blocked, sig) || sigismember(&t->real_blocked, sig))
 		return 0;
 
-	if (!sig_task_ignored(t, sig, force))
-		return 0;
-
 	/*
-	 * Tracers may want to know about even ignored signals.
+	 * Tracers may want to know about even ignored signal unless it
+	 * is SIGKILL which can't be reported anyway but can be ignored
+	 * by SIGNAL_UNKILLABLE task.
 	 */
-	return !t->ptrace;
+	if (t->ptrace && sig != SIGKILL)
+		return 0;
+
+	return sig_task_ignored(t, sig, force);
 }
 
 /*
@@ -917,9 +919,9 @@ static void complete_signal(int sig, str
 	 * then start taking the whole group down immediately.
 	 */
 	if (sig_fatal(p, sig) &&
-	    !(signal->flags & (SIGNAL_UNKILLABLE | SIGNAL_GROUP_EXIT)) &&
+	    !(signal->flags & SIGNAL_GROUP_EXIT) &&
 	    !sigismember(&t->real_blocked, sig) &&
-	    (sig == SIGKILL || !t->ptrace)) {
+	    (sig == SIGKILL || !p->ptrace)) {
 		/*
 		 * This signal will be fatal to the whole group.
 		 */
diff -druNp --no-dereference linux-libre-4.4.110-gnu/kernel/uid16.c linux-libre-4.4.111-gnu/kernel/uid16.c
--- linux-libre-4.4.110-gnu/kernel/uid16.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/kernel/uid16.c	2018-01-10 03:27:15.000000000 -0500
@@ -190,6 +190,7 @@ SYSCALL_DEFINE2(setgroups16, int, gidset
 		return retval;
 	}
 
+	groups_sort(group_info);
 	retval = set_current_groups(group_info);
 	put_group_info(group_info);
 
diff -druNp --no-dereference linux-libre-4.4.110-gnu/Makefile linux-libre-4.4.111-gnu/Makefile
--- linux-libre-4.4.110-gnu/Makefile	2018-01-05 19:06:29.000000000 -0500
+++ linux-libre-4.4.111-gnu/Makefile	2018-01-10 05:13:34.000000000 -0500
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 110
+SUBLEVEL = 111
 EXTRAVERSION = -gnu
 NAME = Blurry Fish Butt
 
diff -druNp --no-dereference linux-libre-4.4.110-gnu/mm/vmstat.c linux-libre-4.4.111-gnu/mm/vmstat.c
--- linux-libre-4.4.110-gnu/mm/vmstat.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/mm/vmstat.c	2018-01-10 03:27:15.000000000 -0500
@@ -1351,7 +1351,9 @@ static int vmstat_show(struct seq_file *
 	unsigned long *l = arg;
 	unsigned long off = l - (unsigned long *)m->private;
 
-	seq_printf(m, "%s %lu\n", vmstat_text[off], *l);
+	seq_puts(m, vmstat_text[off]);
+	seq_put_decimal_ull(m, ' ', *l);
+	seq_putc(m, '\n');
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.4.110-gnu/net/sunrpc/auth_gss/gss_rpc_xdr.c linux-libre-4.4.111-gnu/net/sunrpc/auth_gss/gss_rpc_xdr.c
--- linux-libre-4.4.110-gnu/net/sunrpc/auth_gss/gss_rpc_xdr.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/net/sunrpc/auth_gss/gss_rpc_xdr.c	2018-01-10 03:27:15.000000000 -0500
@@ -231,6 +231,7 @@ static int gssx_dec_linux_creds(struct x
 			goto out_free_groups;
 		GROUP_AT(creds->cr_group_info, i) = kgid;
 	}
+	groups_sort(creds->cr_group_info);
 
 	return 0;
 out_free_groups:
diff -druNp --no-dereference linux-libre-4.4.110-gnu/net/sunrpc/auth_gss/svcauth_gss.c linux-libre-4.4.111-gnu/net/sunrpc/auth_gss/svcauth_gss.c
--- linux-libre-4.4.110-gnu/net/sunrpc/auth_gss/svcauth_gss.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/net/sunrpc/auth_gss/svcauth_gss.c	2018-01-10 03:27:15.000000000 -0500
@@ -481,6 +481,7 @@ static int rsc_parse(struct cache_detail
 				goto out;
 			GROUP_AT(rsci.cred.cr_group_info, i) = kgid;
 		}
+		groups_sort(rsci.cred.cr_group_info);
 
 		/* mech name */
 		len = qword_get(&mesg, buf, mlen);
diff -druNp --no-dereference linux-libre-4.4.110-gnu/net/sunrpc/svcauth_unix.c linux-libre-4.4.111-gnu/net/sunrpc/svcauth_unix.c
--- linux-libre-4.4.110-gnu/net/sunrpc/svcauth_unix.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/net/sunrpc/svcauth_unix.c	2018-01-10 03:27:15.000000000 -0500
@@ -520,6 +520,7 @@ static int unix_gid_parse(struct cache_d
 		GROUP_AT(ug.gi, i) = kgid;
 	}
 
+	groups_sort(ug.gi);
 	ugp = unix_gid_lookup(cd, uid);
 	if (ugp) {
 		struct cache_head *ch;
@@ -827,6 +828,7 @@ svcauth_unix_accept(struct svc_rqst *rqs
 		kgid_t kgid = make_kgid(&init_user_ns, svc_getnl(argv));
 		GROUP_AT(cred->cr_group_info, i) = kgid;
 	}
+	groups_sort(cred->cr_group_info);
 	if (svc_getu32(argv) != htonl(RPC_AUTH_NULL) || svc_getu32(argv) != 0) {
 		*authp = rpc_autherr_badverf;
 		return SVC_DENIED;
diff -druNp --no-dereference linux-libre-4.4.110-gnu/scripts/genksyms/genksyms.c linux-libre-4.4.111-gnu/scripts/genksyms/genksyms.c
--- linux-libre-4.4.110-gnu/scripts/genksyms/genksyms.c	2018-01-05 09:44:27.000000000 -0500
+++ linux-libre-4.4.111-gnu/scripts/genksyms/genksyms.c	2018-01-10 03:27:15.000000000 -0500
@@ -423,13 +423,15 @@ static struct string_list *read_node(FIL
 	struct string_list node = {
 		.string = buffer,
 		.tag = SYM_NORMAL };
-	int c;
+	int c, in_string = 0;
 
 	while ((c = fgetc(f)) != EOF) {
-		if (c == ' ') {
+		if (!in_string && c == ' ') {
 			if (node.string == buffer)
 				continue;
 			break;
+		} else if (c == '"') {
+			in_string = !in_string;
 		} else if (c == '\n') {
 			if (node.string == buffer)
 				return NULL;
