Linux 4.4.111
Greg KH
maintainerI'm announcing the release of the 4.4.111 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 +- arch/arc/include/asm/uaccess.h | 5 +++-- arch/parisc/include/asm/ldcw.h | 2 ++ arch/parisc/kernel/entry.S | 13 +++++++++++-- arch/parisc/kernel/pacache.S | 9 +++++++-- arch/s390/kernel/compat_linux.c | 1 + arch/x86/entry/vdso/vma.c | 1 + arch/x86/entry/vsyscall/vsyscall_64.c | 5 +++++ arch/x86/include/asm/vsyscall.h | 2 ++ arch/x86/kernel/cpu/microcode/amd.c | 4 ++++ arch/x86/mm/init.c | 2 +- arch/x86/mm/kaiser.c | 34 ++++++++++++++++++++++++++++++---- arch/x86/mm/kasan_init_64.c | 10 ++++++++-- crypto/chacha20poly1305.c | 6 +++++- crypto/pcrypt.c | 19 ++++++++++--------- drivers/bus/sunxi-rsb.c | 1 + drivers/crypto/n2_core.c | 3 +++ drivers/input/mouse/elantech.c | 2 +- fs/nfsd/auth.c | 3 +++ include/linux/cred.h | 1 + include/linux/fscache.h | 2 +- kernel/acct.c | 2 +- kernel/groups.c | 5 +++-- kernel/module.c | 26 +++++++++++++++++++++----- kernel/signal.c | 18 ++++++++++-------- kernel/uid16.c | 1 + mm/vmstat.c | 4 +++- net/sunrpc/auth_gss/gss_rpc_xdr.c | 1 + net/sunrpc/auth_gss/svcauth_gss.c | 1 + net/sunrpc/svcauth_unix.c | 2 ++ scripts/genksyms/genksyms.c | 6 ++++-- 31 files changed, 148 insertions(+), 45 deletions(-)
Aaron Ma (1):
Input: elantech - add new icbody type 15
Alexey Dobriyan (1):
proc: much faster /proc/vmstat
Andrey Ryabinin (1):
x86/kasan: Write protect kasan zero shadow
Borislav Petkov (1):
Map the vsyscall page with _PAGE_USER
David Howells (1):
fscache: Fix the default for fscache_maybe_release_page()
Eric Biggers (2):
crypto: chacha20poly1305 - validate the digest size
crypto: pcrypt - fix freeing pcrypt instances
Greg Kroah-Hartman (2):
Fix build error in vma.c
Linux 4.4.111
Helge Deller (1):
parisc: Fix alignment of pa_tlb_lock in assembly on 32-bit SMP kernel
Jan Engelhardt (1):
crypto: n2 - cure use after free
Libor Pechacek (1):
module: Issue warnings when tainting kernel
Michal Marek (1):
genksyms: Handle string literals with spaces in reference files
Miroslav Benes (1):
module: keep percpu symbols in module's symtab
Oleg Nesterov (4):
kernel/acct.c: fix the acct->needcheck check in check_free_space() kernel/signal.c: protect the traced SIGNAL_UNKILLABLE tasks from SIGKILL kernel/signal.c: protect the SIGNAL_UNKILLABLE tasks from !sig_kernel_only() signals kernel/signal.c: remove the no longer needed SIGNAL_UNKILLABLE check in complete_signal()
Stefan Brüns (1):
sunxi-rsb: Include OF based modalias in device uevent
Thiago Rafael Becker (1):
kernel: make groups_sort calling a responsibility group_info allocators
Thomas Gleixner (1):
x86/tlb: Drop the _GPL from the cpu_tlbstate export
Tom Lendacky (1):
x86/microcode/AMD: Add support for fam17h microcode loading
Vineet Gupta (1):
ARC: uaccess: dont use "l" gcc inline asm constraint modifier
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 110 +SUBLEVEL = 111 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arc/include/asm/uaccess.h +3 -2
@@ -673,6 +673,7 @@ __arc_strncpy_from_user(char *dst, const char __user *src, long count)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 char __user *src, long count)" .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; }
arch/parisc/include/asm/ldcw.h +2 -0
@@ -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"
arch/parisc/kernel/entry.S +11 -2
@@ -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
arch/parisc/kernel/pacache.S +7 -2
@@ -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
arch/s390/kernel/compat_linux.c +1 -0
@@ -263,6 +263,7 @@ COMPAT_SYSCALL_DEFINE2(s390_setgroups16, int, gidsetsize, u16 __user *, grouplisreturn retval; } +groups_sort (group_info); retval =set_current_groups (group_info);put_group_info (group_info);
arch/x86/entry/vdso/vma.c +1 -0
@@ -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>
arch/x86/entry/vsyscall/vsyscall_64.c +5 -0
@@ -66,6 +66,11 @@ static int __init vsyscall_setup(char *str) }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) {
arch/x86/include/asm/vsyscall.h +2 -0
@@ -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 */
arch/x86/kernel/cpu/microcode/amd.c +4 -0
@@ -580,6 +580,7 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,#define F14H_MPB_MAX_SIZE 1824#define F15H_MPB_MAX_SIZE 4096#define F16H_MPB_MAX_SIZE 3458 +#define F17H_MPB_MAX_SIZE 3200switch (family) {case 0x14 :
@@ -591,6 +592,9 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,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 ;
arch/x86/mm/init.c +1 -1
@@ -757,7 +757,7 @@ DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) = { .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) {
arch/x86/mm/kaiser.c +30 -4
@@ -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_mapping(unsigned long vaddr)* * 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(unsigned long address) }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(unsigned long address)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(unsigned long address)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 void *__start_addr, unsigned long size, 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);
arch/x86/mm/kasan_init_64.c +8 -2
@@ -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" );
crypto/chacha20poly1305.c +5 -1
@@ -600,6 +600,11 @@ static int chachapoly_create(struct crypto_template *tmpl, struct rtattr **tb, 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 crypto_template *tmpl, struct rtattr **tb, 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)
crypto/pcrypt.c +10 -9
@@ -254,6 +254,14 @@ static void pcrypt_aead_exit_tfm(struct crypto_aead *tfm)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 crypto_template *tmpl, struct rtattr **tb, 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_template *tmpl, struct rtattr **tb)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 padata_pcrypt *pcrypt)static struct crypto_template pcrypt_tmpl = { .name ="pcrypt" , .create = pcrypt_create, - .free = pcrypt_free, .module =THIS_MODULE , };
drivers/bus/sunxi-rsb.c +1 -0
@@ -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)
drivers/crypto/n2_core.c +3 -0
@@ -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)
drivers/input/mouse/elantech.c +1 -1
@@ -1613,7 +1613,7 @@ static int elantech_set_properties(struct elantech_data *etd)case 5 : etd->hw_version =3 ;break ; - case 6 ... 14: + case 6 ... 15: etd->hw_version =4 ;break ;default :
fs/nfsd/auth.c +3 -0
@@ -59,6 +59,9 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)GROUP_AT (gi, i) = exp->ex_anon_gid; elseGROUP_AT (gi ,i ) =GROUP_AT (rqgi, i); + +/* Each thread allocates its own gi, no race */ +groups_sort (gi); } }else { gi =get_group_info (rqgi);
include/linux/cred.h +1 -0
@@ -87,6 +87,7 @@ extern int set_current_groups(struct group_info *);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) \
include/linux/fscache.h +1 -1
@@ -764,7 +764,7 @@ bool fscache_maybe_release_page(struct fscache_cookie *cookie, {if (fscache_cookie_valid (cookie) &&PageFsCache (page))return __fscache_maybe_release_page (cookie, page, gfp); -return false; +return true; }/**
kernel/acct.c +1 -1
@@ -99,7 +99,7 @@ static int check_free_space(struct bsd_acct_struct *acct) {struct kstatfs sbuf; -if (time_is_before_jiffies (acct->needcheck)) +if (time_is_after_jiffies (acct->needcheck)) goto out;/* May block */
kernel/groups.c +3 -2
@@ -101,7 +101,7 @@ static int groups_from_user(struct group_info *group_info, }/* 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_info *group_info) 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_info *group_info, kgid_t grp)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, gidsetsize, gid_t __user *, grouplist)return retval; } +groups_sort (group_info); retval =set_current_groups (group_info);put_group_info (group_info);
kernel/module.c +21 -5
@@ -2404,7 +2404,7 @@ static char elf_type(const Elf_Sym *sym, const struct load_info *info) }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, const struct load_info *info) }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, const Elf_Shdr *sechdrs, || !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 *mod, struct load_info *info)/* 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 *mod, const struct load_info *info) 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 *mod, struct load_info *info, int flags)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 *mod, struct load_info *info)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_versions(struct module *mod)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)
kernel/signal.c +10 -8
@@ -72,7 +72,7 @@ static int sig_task_ignored(struct task_struct *t, int sig, bool force) 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_struct *t, int sig, bool force)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, struct task_struct *p, int group)* 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. */
kernel/uid16.c +1 -0
@@ -190,6 +190,7 @@ SYSCALL_DEFINE2(setgroups16, int, gidsetsize, old_gid_t __user *, grouplist)return retval; } +groups_sort (group_info); retval =set_current_groups (group_info);put_group_info (group_info);
mm/vmstat.c +3 -1
@@ -1351,7 +1351,9 @@ static int vmstat_show(struct seq_file *m, void *arg)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 ; }
net/sunrpc/auth_gss/gss_rpc_xdr.c +1 -0
@@ -231,6 +231,7 @@ static int gssx_dec_linux_creds(struct xdr_stream *xdr, goto out_free_groups;GROUP_AT (creds->cr_group_info, i) = kgid; } +groups_sort (creds->cr_group_info);return 0 ; out_free_groups:
net/sunrpc/auth_gss/svcauth_gss.c +1 -0
@@ -481,6 +481,7 @@ static int rsc_parse(struct cache_detail *cd, 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);
net/sunrpc/svcauth_unix.c +2 -0
@@ -520,6 +520,7 @@ static int unix_gid_parse(struct cache_detail *cd,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 *rqstp, __be32 *authp)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 ;
scripts/genksyms/genksyms.c +4 -2
@@ -423,13 +423,15 @@ static struct string_list *read_node(FILE *f)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 ;