From: Linus Torvalds Date: Sun, 14 Oct 2012 20:39:34 +0000 (-0700) Subject: Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty... X-Git-Tag: accepted/tizen/common/20141203.182822~3569 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d25282d1c9b9bc4cda7f9d3c0205108e99aa7a9d;p=platform%2Fkernel%2Flinux-arm64.git Merge branch 'modules-next' of git://git./linux/kernel/git/rusty/linux Pull module signing support from Rusty Russell: "module signing is the highlight, but it's an all-over David Howells frenzy..." Hmm "Magrathea: Glacier signing key". Somebody has been reading too much HHGTTG. * 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (37 commits) X.509: Fix indefinite length element skip error handling X.509: Convert some printk calls to pr_devel asymmetric keys: fix printk format warning MODSIGN: Fix 32-bit overflow in X.509 certificate validity date checking MODSIGN: Make mrproper should remove generated files. MODSIGN: Use utf8 strings in signer's name in autogenerated X.509 certs MODSIGN: Use the same digest for the autogen key sig as for the module sig MODSIGN: Sign modules during the build process MODSIGN: Provide a script for generating a key ID from an X.509 cert MODSIGN: Implement module signature checking MODSIGN: Provide module signing public keys to the kernel MODSIGN: Automatically generate module signing keys if missing MODSIGN: Provide Kconfig options MODSIGN: Provide gitignore and make clean rules for extra files MODSIGN: Add FIPS policy module: signature checking hook X.509: Add a crypto key parser for binary (DER) X.509 certificates MPILIB: Provide a function to read raw data into an MPI X.509: Add an ASN.1 decoder X.509: Add simple ASN.1 grammar compiler ... --- d25282d1c9b9bc4cda7f9d3c0205108e99aa7a9d diff --cc Makefile index 5d8e7f2,e70ebfe..2d3daf7 --- a/Makefile +++ b/Makefile @@@ -996,8 -993,12 +996,11 @@@ CLEAN_DIRS += $(MODVERDIR # Directories & files removed with 'make mrproper' MRPROPER_DIRS += include/config usr/include include/generated \ arch/*/include/generated -MRPROPER_FILES += .config .config.old .version .old_version \ - include/linux/version.h \ +MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \ - Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS + Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ + signing_key.priv signing_key.x509 x509.genkey \ + extra_certificates signing_key.x509.keyid \ + signing_key.x509.signer # clean - Delete most, but leave enough to build external modules # diff --cc arch/Kconfig index a79a1ad,3450115..366ec06 --- a/arch/Kconfig +++ b/arch/Kconfig @@@ -300,26 -281,23 +300,45 @@@ config SECCOMP_FILTE See Documentation/prctl/seccomp_filter.txt for details. +config HAVE_RCU_USER_QS + bool + help + Provide kernel entry/exit hooks necessary for userspace + RCU extended quiescent state. Syscalls need to be wrapped inside + rcu_user_exit()-rcu_user_enter() through the slow path using + TIF_NOHZ flag. Exceptions handlers must be wrapped as well. Irqs + are already protected inside rcu_irq_enter/rcu_irq_exit() but + preemption or signal handling on irq exit still need to be protected. + +config HAVE_VIRT_CPU_ACCOUNTING + bool + +config HAVE_IRQ_TIME_ACCOUNTING + bool + help + Archs need to ensure they use a high enough resolution clock to + support irq time accounting and then call enable_sched_clock_irqtime(). + +config HAVE_ARCH_TRANSPARENT_HUGEPAGE + bool + + config HAVE_MOD_ARCH_SPECIFIC + bool + help + The arch uses struct mod_arch_specific to store data. Many arches + just need a simple module loader without arch specific data - those + should not enable this. + + config MODULES_USE_ELF_RELA + bool + help + Modules only use ELF RELA relocations. Modules with ELF REL + relocations will give an error. + + config MODULES_USE_ELF_REL + bool + help + Modules only use ELF REL relocations. Modules with ELF RELA + relocations will give an error. + source "kernel/gcov/Kconfig" diff --cc arch/alpha/Kconfig index 7a08cfb,7e3710c..5dd7f5d --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@@ -20,8 -20,8 +20,10 @@@ config ALPH select GENERIC_CMOS_UPDATE select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER + select GENERIC_KERNEL_THREAD + select GENERIC_KERNEL_EXECVE + select HAVE_MOD_ARCH_SPECIFIC + select MODULES_USE_ELF_RELA help The Alpha is a 64-bit general-purpose processor designed and marketed by the Digital Equipment Corporation of blessed memory, diff --cc arch/arm/Kconfig index 261fdd0,7a08b3a..73067ef --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@@ -22,37 -16,41 +22,39 @@@ config AR select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL select HAVE_ARCH_KGDB select HAVE_ARCH_TRACEHOOK - select HAVE_KPROBES if !XIP_KERNEL - select HAVE_KRETPROBES if (HAVE_KPROBES) - select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) - select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL) + select HAVE_BPF_JIT + select HAVE_C_RECORDMCOUNT + select HAVE_DEBUG_KMEMLEAK + select HAVE_DMA_API_DEBUG + select HAVE_DMA_ATTRS + select HAVE_DMA_CONTIGUOUS if MMU select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL) + select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL) select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL) - select ARCH_BINFMT_ELF_RANDOMIZE_PIE + select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) select HAVE_GENERIC_DMA_COHERENT + select HAVE_GENERIC_HARDIRQS + select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)) + select HAVE_IDE if PCI || ISA || PCMCIA + select HAVE_IRQ_WORK select HAVE_KERNEL_GZIP - select HAVE_KERNEL_LZO select HAVE_KERNEL_LZMA + select HAVE_KERNEL_LZO select HAVE_KERNEL_XZ - select HAVE_IRQ_WORK + select HAVE_KPROBES if !XIP_KERNEL + select HAVE_KRETPROBES if (HAVE_KPROBES) + select HAVE_MEMBLOCK + select HAVE_OPROFILE if (HAVE_PERF_EVENTS) select HAVE_PERF_EVENTS - select PERF_USE_VMALLOC select HAVE_REGS_AND_STACK_ACCESS_API - select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)) - select HAVE_C_RECORDMCOUNT - select HAVE_GENERIC_HARDIRQS - select HARDIRQS_SW_RESEND - select GENERIC_IRQ_PROBE - select GENERIC_IRQ_SHOW - select ARCH_WANT_IPC_PARSE_VERSION - select HARDIRQS_SW_RESEND - select CPU_PM if (SUSPEND || CPU_IDLE) - select GENERIC_PCI_IOMAP - select HAVE_BPF_JIT - select GENERIC_SMP_IDLE_THREAD + select HAVE_SYSCALL_TRACEPOINTS + select HAVE_UID16 select KTIME_SCALAR - select GENERIC_CLOCKEVENTS_BROADCAST if SMP - select GENERIC_STRNCPY_FROM_USER - select GENERIC_STRNLEN_USER - select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN + select PERF_USE_VMALLOC + select RTC_LIB + select SYS_SUPPORTS_APM_EMULATION + select HAVE_MOD_ARCH_SPECIFIC if ARM_UNWIND + select MODULES_USE_ELF_REL help The ARM series is a line of low-power-consumption RISC chip designs licensed by ARM Ltd and targeted at embedded applications and diff --cc arch/c6x/Kconfig index 45268b5,f6a3648..aee1b56 --- a/arch/c6x/Kconfig +++ b/arch/c6x/Kconfig @@@ -17,7 -17,7 +17,8 @@@ config C6 select OF select OF_EARLY_FLATTREE select GENERIC_CLOCKEVENTS + select GENERIC_KERNEL_THREAD + select MODULES_USE_ELF_RELA config MMU def_bool n diff --cc arch/cris/include/asm/Kbuild index ff1bf7f,28b690d..6d43a95 --- a/arch/cris/include/asm/Kbuild +++ b/arch/cris/include/asm/Kbuild @@@ -8,5 -8,4 +8,6 @@@ header-y += etraxgpio. header-y += rs485.h header-y += sync_serial.h +generic-y += clkdev.h +generic-y += exec.h + generic-y += module.h diff --cc arch/h8300/include/asm/Kbuild index fccd81e,871382d..50bbf38 --- a/arch/h8300/include/asm/Kbuild +++ b/arch/h8300/include/asm/Kbuild @@@ -1,4 -1,3 +1,5 @@@ include include/asm-generic/Kbuild.asm -generic-y += module.h +generic-y += clkdev.h +generic-y += exec.h ++generic-y += module.h diff --cc arch/ia64/Kconfig index 4c10e60,6881464..3279646 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@@ -39,7 -38,9 +39,9 @@@ config IA6 select ARCH_TASK_STRUCT_ALLOCATOR select ARCH_THREAD_INFO_ALLOCATOR select ARCH_CLOCKSOURCE_DATA - select GENERIC_TIME_VSYSCALL + select GENERIC_TIME_VSYSCALL_OLD + select HAVE_MOD_ARCH_SPECIFIC + select MODULES_USE_ELF_RELA default y help The Itanium Processor Family is Intel's 64-bit successor to diff --cc arch/m32r/include/asm/Kbuild index fccd81e,871382d..50bbf38 --- a/arch/m32r/include/asm/Kbuild +++ b/arch/m32r/include/asm/Kbuild @@@ -1,4 -1,3 +1,5 @@@ include include/asm-generic/Kbuild.asm -generic-y += module.h +generic-y += clkdev.h +generic-y += exec.h ++generic-y += module.h diff --cc arch/m68k/Kconfig index 76fd6e2,0df07ce..e7c1614 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@@ -15,7 -13,9 +15,10 @@@ config M68 select FPU if MMU select ARCH_WANT_IPC_PARSE_VERSION select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE + select GENERIC_KERNEL_THREAD + select HAVE_MOD_ARCH_SPECIFIC + select MODULES_USE_ELF_REL + select MODULES_USE_ELF_RELA config RWSEM_GENERIC_SPINLOCK bool diff --cc arch/mn10300/Kconfig index ddbdc33,aa03f2e..04669fa --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig @@@ -8,7 -8,7 +8,8 @@@ config MN1030 select HAVE_ARCH_KGDB select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER select GENERIC_CLOCKEVENTS + select GENERIC_KERNEL_THREAD + select MODULES_USE_ELF_RELA config AM33_2 def_bool n diff --cc arch/powerpc/Kconfig index 969f3d9,74f8478..a902a5c --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@@ -141,7 -139,8 +141,9 @@@ config PP select GENERIC_CLOCKEVENTS select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER + select GENERIC_KERNEL_THREAD + select HAVE_MOD_ARCH_SPECIFIC + select MODULES_USE_ELF_RELA config EARLY_PRINTK bool diff --cc arch/s390/Kconfig index e5dac12,c76a052..3f3d9ca --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@@ -135,7 -125,8 +135,9 @@@ config S39 select GENERIC_CLOCKEVENTS select KTIME_SCALAR if 32BIT select HAVE_ARCH_SECCOMP_FILTER + select GENERIC_KERNEL_THREAD + select HAVE_MOD_ARCH_SPECIFIC + select MODULES_USE_ELF_RELA config SCHED_OMIT_FRAME_POINTER def_bool y diff --cc arch/x86/Kconfig index 70071b1,01726cb..46c3bff --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@@ -106,14 -97,11 +106,16 @@@ config X8 select KTIME_SCALAR if X86_32 select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER + select HAVE_RCU_USER_QS if X86_64 + select HAVE_IRQ_TIME_ACCOUNTING + select GENERIC_KERNEL_THREAD + select GENERIC_KERNEL_EXECVE + select MODULES_USE_ELF_REL if X86_32 + select MODULES_USE_ELF_RELA if X86_64 config INSTRUCTION_DECODER - def_bool (KPROBES || PERF_EVENTS || UPROBES) + def_bool y + depends on KPROBES || PERF_EVENTS || UPROBES config OUTPUT_FORMAT string diff --cc arch/x86/um/Kconfig index 9fa950d,a4b0c10..0761175 --- a/arch/x86/um/Kconfig +++ b/arch/x86/um/Kconfig @@@ -23,7 -21,7 +23,8 @@@ config 64BI config X86_32 def_bool !64BIT select HAVE_AOUT + select ARCH_WANT_IPC_PARSE_VERSION + select MODULES_USE_ELF_REL config X86_64 def_bool 64BIT diff --cc init/Kconfig index 89e4cf6,abc6e63..6fdd6e3 --- a/init/Kconfig +++ b/init/Kconfig @@@ -1601,10 -1672,12 +1661,18 @@@ config PADAT depends on SMP bool +# Can be selected by architectures with broken toolchains +# that get confused by correct const<->read_only section +# mappings +config BROKEN_RODATA + bool + + config ASN1 + tristate + help + Build a simple ASN.1 grammar compiler that produces a bytecode output + that can be interpreted by the ASN.1 stream decoder and used to + inform it as to what tags are to be expected in a stream and what + functions to call on what tags. + source "kernel/Kconfig.locks" diff --cc lib/Makefile index 3128e35,ca856b6..821a162 --- a/lib/Makefile +++ b/lib/Makefile @@@ -140,11 -140,8 +140,13 @@@ $(foreach file, $(libfdt_files), $(eval CFLAGS_$(file) = -I$(src)/../scripts/dtc/libfdt)) lib-$(CONFIG_LIBFDT) += $(libfdt_files) +obj-$(CONFIG_RBTREE_TEST) += rbtree_test.o +obj-$(CONFIG_INTERVAL_TREE_TEST) += interval_tree_test.o + +interval_tree_test-objs := interval_tree_test_main.o interval_tree.o + + obj-$(CONFIG_ASN1) += asn1_decoder.o + hostprogs-y := gen_crc32table clean-files := crc32table.h diff --cc security/keys/trusted.c index 3f163d0,42036c7..e13fcf7 --- a/security/keys/trusted.c +++ b/security/keys/trusted.c @@@ -903,9 -936,8 +904,9 @@@ static int trusted_instantiate(struct k char *datablob; int ret = 0; int key_cmd; + size_t key_len; - if (datalen <= 0 || datalen > 32767 || !data) + if (datalen <= 0 || datalen > 32767 || !prep->data) return -EINVAL; datablob = kmalloc(datalen + 1, GFP_KERNEL);