26 Mar, 2016

4 commits

  • Merge fourth patch-bomb from Andrew Morton:
    "A lot more stuff than expected, sorry. A bunch of ocfs2 reviewing was
    finished off.

    - mhocko's oom-reaper out-of-memory-handler changes

    - ocfs2 fixes and features

    - KASAN feature work

    - various fixes"

    * emailed patches from Andrew Morton : (42 commits)
    thp: fix typo in khugepaged_scan_pmd()
    MAINTAINERS: fill entries for KASAN
    mm/filemap: generic_file_read_iter(): check for zero reads unconditionally
    kasan: test fix: warn if the UAF could not be detected in kmalloc_uaf2
    mm, kasan: stackdepot implementation. Enable stackdepot for SLAB
    arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections
    mm, kasan: add GFP flags to KASAN API
    mm, kasan: SLAB support
    kasan: modify kmalloc_large_oob_right(), add kmalloc_pagealloc_oob_right()
    include/linux/oom.h: remove undefined oom_kills_count()/note_oom_kill()
    mm/page_alloc: prevent merging between isolated and other pageblocks
    drivers/memstick/host/r592.c: avoid gcc-6 warning
    ocfs2: extend enough credits for freeing one truncate record while replaying truncate records
    ocfs2: extend transaction for ocfs2_remove_rightmost_path() and ocfs2_update_edge_lengths() before to avoid inconsistency between inode and et
    ocfs2/dlm: move lock to the tail of grant queue while doing in-place convert
    ocfs2: solve a problem of crossing the boundary in updating backups
    ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local
    ocfs2/dlm: fix BUG in dlm_move_lockres_to_recovery_list
    ocfs2/dlm: fix race between convert and recovery
    ocfs2: fix a deadlock issue in ocfs2_dio_end_io_write()
    ...

    Linus Torvalds
     
  • Implement the stack depot and provide CONFIG_STACKDEPOT. Stack depot
    will allow KASAN store allocation/deallocation stack traces for memory
    chunks. The stack traces are stored in a hash table and referenced by
    handles which reside in the kasan_alloc_meta and kasan_free_meta
    structures in the allocated memory chunks.

    IRQ stack traces are cut below the IRQ entry point to avoid unnecessary
    duplication.

    Right now stackdepot support is only enabled in SLAB allocator. Once
    KASAN features in SLAB are on par with those in SLUB we can switch SLUB
    to stackdepot as well, thus removing the dependency on SLUB stack
    bookkeeping, which wastes a lot of memory.

    This patch is based on the "mm: kasan: stack depots" patch originally
    prepared by Dmitry Chernenkov.

    Joonsoo has said that he plans to reuse the stackdepot code for the
    mm/page_owner.c debugging facility.

    [akpm@linux-foundation.org: s/depot_stack_handle/depot_stack_handle_t]
    [aryabinin@virtuozzo.com: comment style fixes]
    Signed-off-by: Alexander Potapenko
    Signed-off-by: Andrey Ryabinin
    Cc: Christoph Lameter
    Cc: Pekka Enberg
    Cc: David Rientjes
    Cc: Joonsoo Kim
    Cc: Andrey Konovalov
    Cc: Dmitry Vyukov
    Cc: Steven Rostedt
    Cc: Konstantin Serebryany
    Cc: Dmitry Chernenkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Potapenko
     
  • KASAN needs to know whether the allocation happens in an IRQ handler.
    This lets us strip everything below the IRQ entry point to reduce the
    number of unique stack traces needed to be stored.

    Move the definition of __irq_entry to so that the
    users don't need to pull in . Also introduce the
    __softirq_entry macro which is similar to __irq_entry, but puts the
    corresponding functions to the .softirqentry.text section.

    Signed-off-by: Alexander Potapenko
    Acked-by: Steven Rostedt
    Cc: Christoph Lameter
    Cc: Pekka Enberg
    Cc: David Rientjes
    Cc: Joonsoo Kim
    Cc: Andrey Konovalov
    Cc: Dmitry Vyukov
    Cc: Andrey Ryabinin
    Cc: Konstantin Serebryany
    Cc: Dmitry Chernenkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Potapenko
     
  • New system calls added in:
    f17d8b35452cab31a70d224964cd583fb2845449
    vfs: vfs: Define new syscalls preadv2,pwritev2

    Signed-off-by: Tony Luck

    Tony Luck
     

25 Mar, 2016

16 commits

  • Pull asm-generic updates from Arnd Bergmann:
    "There are only three patches this time, most other changes to files in
    include/asm-generic tend to go through the tree of whoever depends on
    the change.

    Two patches are cleanups for stuff that is no longer needed, the main
    change is to adapt the generic version of BUG_ON() for CONFIG_BUG=n to
    make it behave consistently with BUG().

    This avoids undefined behavior along with a number of warnings about
    that undefined behavior in randconfig builds when we keep going on
    after hitting a BUG_ON()"

    * tag 'asm-generic-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
    asm-generic: remove old nonatomic-io wrapper files
    asm-generic: default BUG_ON(x) to if(x)BUG()
    asm-generic: page.h: Remove useless get_user_page and free_user_page

    Linus Torvalds
     
  • Pull MTD updates from Brian Norris:
    "NAND:
    - Add sunxi_nand randomizer support
    - begin refactoring NAND ecclayout structs
    - fix pxa3xx_nand dmaengine usage
    - brcmnand: fix support for v7.1 controller
    - add Qualcomm NAND controller driver

    SPI NOR:
    - add new ls1021a, ls2080a support to Freescale QuadSPI
    - add new flash ID entries
    - support bottom-block protection for Winbond flash
    - support Status Register Write Protect
    - remove broken QPI support for Micron SPI flash

    JFFS2:
    - improve post-mount CRC scan efficiency

    General:
    - refactor bcm63xxpart parser, to later extend for NAND
    - add writebuf size parameter to mtdram

    Other minor code quality improvements"

    * tag 'for-linus-20160324' of git://git.infradead.org/linux-mtd: (72 commits)
    mtd: nand: remove kerneldoc for removed function parameter
    mtd: nand: Qualcomm NAND controller driver
    dt/bindings: qcom_nandc: Add DT bindings
    mtd: nand: don't select chip in nand_chip's block_bad op
    mtd: spi-nor: support lock/unlock for a few Winbond chips
    mtd: spi-nor: add TB (Top/Bottom) protect support
    mtd: spi-nor: add SPI_NOR_HAS_LOCK flag
    mtd: spi-nor: use BIT() for flash_info flags
    mtd: spi-nor: disallow further writes to SR if WP# is low
    mtd: spi-nor: make lock/unlock bounds checks more obvious and robust
    mtd: spi-nor: silently drop lock/unlock for already locked/unlocked region
    mtd: spi-nor: wait for SR_WIP to clear on initial unlock
    mtd: nand: simplify nand_bch_init() usage
    mtd: mtdswap: remove useless if (!mtd->ecclayout) test
    mtd: create an mtd_oobavail() helper and make use of it
    mtd: kill the ecclayout->oobavail field
    mtd: nand: check status before reporting timeout
    mtd: bcm63xxpart: give width specifier an 'int', not 'size_t'
    mtd: mtdram: Add parameter for setting writebuf size
    mtd: nand: pxa3xx_nand: kill unused field 'drcmr_cmd'
    ...

    Linus Torvalds
     
  • Pull parisc updates from Helge Deller:
    "This patchset adds stack usage debug info for parisc and metag (on
    both the stack grows upwards), switches to the new generic realative
    extable search and sort routines, drops the long time ago removed
    syscalls alloc_hugepages and free_hugepages and wires up the new
    preadv2 and pwritev2 syscalls"

    * 'parisc-4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Wire up preadv2 and pwritev2 syscalls
    parisc: Use generic extable search and sort routines
    parisc: Panic immediately when panic_on_oops
    parisc,metag: Implement CONFIG_DEBUG_STACK_USAGE option
    parisc: Drop alloc_hugepages and free_hugepages syscalls

    Linus Torvalds
     
  • Pull second set of arm64 updates from Catalin Marinas:

    - KASLR bug fixes: use callee-saved register, boot-time I-cache
    maintenance

    - inv_entry asm macro fix (EL0 check typo)

    - pr_notice("Virtual kernel memory layout...") splitting

    - Clean-ups: use p?d_set_huge consistently, allow preemption around
    copy_to_user_page, remove unused __local_flush_icache_all()

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: mm: allow preemption in copy_to_user_page
    arm64: consistently use p?d_set_huge
    arm64: kaslr: use callee saved register to preserve SCTLR across C call
    arm64: Split pr_notice("Virtual kernel memory layout...") into multiple pr_cont()
    arm64: drop unused __local_flush_icache_all()
    arm64: fix KASLR boot-time I-cache maintenance
    arm64/kernel: fix incorrect EL0 check in inv_entry macro

    Linus Torvalds
     
  • Pull more ARM DT changes from Arnd Bergmann:
    "Here are some final updates for ARM SoC specific dts files:

    - The i.MX changes were sent relatively late, and had a dependency on
    the clk tree, so I delayed that a bit. Support for the new i.MX6qp
    SoC and a couple of new boards is added in this branch.

    - Uniphier renames a few files to match the final product names that
    were decided by the company, kudos to the kernel developer(s) for
    getting support upstream before the product release. Also two
    boards are added. The patches were posted early enough and nice
    overall, but we forgot to apply them and decided to give it some
    more time in linux-next

    - at91 has two small bug fixes"

    * tag 'armsoc-dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (83 commits)
    ARM: dts: at91: sama5d4 Xplained: don't disable hsmci regulator
    ARM: dts: at91: sama5d3 Xplained: don't disable hsmci regulator
    ARM: dts: uniphier: add pinmux node for I2C ch4
    ARM: dts: uniphier: add @{address} to EEPROM node
    ARM: dts: uniphier: add PH1-Pro4 Sanji board support
    ARM: dts: uniphier: add PH1-Pro4 Ace board support
    ARM: dts: uniphier: enable I2C channel 2 of ProXstream2 Gentil board
    ARM: dts: uniphier: add EEPROM node for ProXstream2 Gentil board
    ARM: dts: uniphier: add reference clock nodes
    ARM: dts: uniphier: rework UniPhier System Bus nodes
    ARM: dts: uniphier: factor out ranges property of support card
    arm64: dts: uniphier: rename PH1-LD10 to PH1-LD20
    ARM: dts: imx53-qsb: Fix gpio button polarity
    ARM: dts: vfxxx: Add DAC node for Vybrid SoC
    ARM: dts: imx6q: add missing links between ipu2 and mipi dsi
    ARM: dts: imx: Add support for Advantech/GE B850v3
    ARM: dts: imx: Add support for Advantech/GE B650v3
    ARM: dts: imx: Add support for Advantech/GE B450v3
    ARM: dts: imx: Add support for Advantech/GE Bx50v3
    ARM: dts: imx: Add Advantech BA-16 Qseven module
    ...

    Linus Torvalds
     
  • Pull h8300 updates from Yoshinori Sato:
    "Various h8300 fixes"

    * tag 'for-4.6' of git://git.osdn.jp/gitroot/uclinux-h8/linux:
    h8300: switch EARLYCON
    h8300: dts: Rename the serial port clock to fck

    Linus Torvalds
     
  • Pull tracing updates from Steven Rostedt:
    "Nothing major this round. Mostly small clean ups and fixes.

    Some visible changes:

    - A new flag was added to distinguish traces done in NMI context.

    - Preempt tracer now shows functions where preemption is disabled but
    interrupts are still enabled.

    Other notes:

    - Updates were done to function tracing to allow better performance
    with perf.

    - Infrastructure code has been added to allow for a new histogram
    feature for recording live trace event histograms that can be
    configured by simple user commands. The feature itself was just
    finished, but needs a round in linux-next before being pulled.

    This only includes some infrastructure changes that will be needed"

    * tag 'trace-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (22 commits)
    tracing: Record and show NMI state
    tracing: Fix trace_printk() to print when not using bprintk()
    tracing: Remove redundant reset per-CPU buff in irqsoff tracer
    x86: ftrace: Fix the misleading comment for arch/x86/kernel/ftrace.c
    tracing: Fix crash from reading trace_pipe with sendfile
    tracing: Have preempt(irqs)off trace preempt disabled functions
    tracing: Fix return while holding a lock in register_tracer()
    ftrace: Use kasprintf() in ftrace_profile_tracefs()
    ftrace: Update dynamic ftrace calls only if necessary
    ftrace: Make ftrace_hash_rec_enable return update bool
    tracing: Fix typoes in code comment and printk in trace_nop.c
    tracing, writeback: Replace cgroup path to cgroup ino
    tracing: Use flags instead of bool in trigger structure
    tracing: Add an unreg_all() callback to trigger commands
    tracing: Add needs_rec flag to event triggers
    tracing: Add a per-event-trigger 'paused' field
    tracing: Add get_syscall_name()
    tracing: Add event record param to trigger_ops.func()
    tracing: Make event trigger functions available
    tracing: Make ftrace_event_field checking functions available
    ...

    Linus Torvalds
     
  • Pull irq fixes from Thomas Gleixner:
    "A small set of fixes for the usual ARM/SOC irqchip drivers

    - A set of fixes for mbigen to handle multiple devices in a hardware
    module proper

    - A cleanup for the mbigen config option which was pointlessly user
    configurable.

    - A cleanup for tegra replacing open coded functionality by the
    proper core function

    The config cleanup touches arch/arm64/Kconfig.platforms to select the
    irq chip for the related platform"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    irqchip/mbigen: Make CONFIG_HISILICON_IRQ_MBIGEN a hidden option
    ARM64: Kconfig: Select mbigen interrupt controller on Hisilicon platform
    irqchip/mbigen: Handle multiple device nodes in a mbigen module
    irqchip/mbigen: Adjust DT bindings to handle multiple devices in a module
    irqchip/tegra: Switch to use irq_domain_free_irqs_common

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "This tree contains various perf fixes on the kernel side, plus three
    hw/event-enablement late additions:

    - Intel Memory Bandwidth Monitoring events and handling
    - the AMD Accumulated Power Mechanism reporting facility
    - more IOMMU events

    ... and a final round of perf tooling updates/fixes"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (44 commits)
    perf llvm: Use strerror_r instead of the thread unsafe strerror one
    perf llvm: Use realpath to canonicalize paths
    perf tools: Unexport some methods unused outside strbuf.c
    perf probe: No need to use formatting strbuf method
    perf help: Use asprintf instead of adhoc equivalents
    perf tools: Remove unused perf_pathdup, xstrdup functions
    perf tools: Do not include stringify.h from the kernel sources
    tools include: Copy linux/stringify.h from the kernel
    tools lib traceevent: Remove redundant CPU output
    perf tools: Remove needless 'extern' from function prototypes
    perf tools: Simplify die() mechanism
    perf tools: Remove unused DIE_IF macro
    perf script: Remove lots of unused arguments
    perf thread: Rename perf_event__preprocess_sample_addr to thread__resolve
    perf machine: Rename perf_event__preprocess_sample to machine__resolve
    perf tools: Add cpumode to struct perf_sample
    perf tests: Forward the perf_sample in the dwarf unwind test
    perf tools: Remove misplaced __maybe_unused
    perf list: Fix documentation of :ppp
    perf bench numa: Fix assertion for nodes bitfield
    ...

    Linus Torvalds
     
  • …inux-at91 into next/dt2

    Merge "First fixes batch for AT91 on 4.6 - DT only fixes" from Nicolas Ferre:
    - prevent the boards from having glitches when inserting/removing SD card on
    sama5d3/d4 Xplained. The regulators should be kept on.

    * tag 'at91-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91:
    ARM: dts: at91: sama5d4 Xplained: don't disable hsmci regulator
    ARM: dts: at91: sama5d3 Xplained: don't disable hsmci regulator
    ARM: dts: at91: sama5d2 Xplained: add leds node
    ARM: dts: at91: sama5d2 Xplained: add user push button
    ARM: dts: at91: sama5d2 Xplained: set pin muxing for usb gadget and usb host
    ARM: dts: at91: sama5d2: add nand0 and nfc0 nodes
    ARM: dts: at91: sama5d2: add dma properties to UART nodes
    ARM: dts: at91: sama5d2 Xplained: Correct the macb irq pinctrl node

    Arnd Bergmann
     
  • Pull x86 fixes from Ingo Molnar:
    "Misc fixes:

    - fix hotplug bugs
    - fix irq live lock
    - fix various topology handling bugs
    - fix APIC ACK ordering
    - fix PV iopl handling
    - fix speling
    - fix/tweak memcpy_mcsafe() return value
    - fix fbcon bug
    - remove stray prototypes"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/msr: Remove unused native_read_tscp()
    x86/apic: Remove declaration of unused hw_nmi_is_cpu_stuck
    x86/oprofile/nmi: Add missing hotplug FROZEN handling
    x86/hpet: Use proper mask to modify hotplug action
    x86/apic/uv: Fix the hotplug notifier
    x86/apb/timer: Use proper mask to modify hotplug action
    x86/topology: Use total_cpus not nr_cpu_ids for logical packages
    x86/topology: Fix Intel HT disable
    x86/topology: Fix logical package mapping
    x86/irq: Cure live lock in fixup_irqs()
    x86/tsc: Prevent NULL pointer deref in calibrate_delay_is_known()
    x86/apic: Fix suspicious RCU usage in smp_trace_call_function_interrupt()
    x86/iopl: Fix iopl capability check on Xen PV
    x86/iopl/64: Properly context-switch IOPL on Xen PV
    selftests/x86: Add an iopl test
    x86/mm, x86/mce: Fix return type/value for memcpy_mcsafe()
    x86/video: Don't assume all FB devices are PCI devices
    arch/x86/irq: Purge useless handler declarations from hw_irq.h
    x86: Fix misspellings in comments

    Linus Torvalds
     
  • earlyprintk is architecture specific option.
    earlycon is generic and small footprint.

    Signed-off-by: Yoshinori Sato

    Yoshinori Sato
     
  • The clock is really the device functional clock, not the interface
    clock. Rename it.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Laurent Pinchart

    Geert Uytterhoeven
     
  • Currently we disable preemption in copy_to_user_page; a behaviour that
    we inherited from the 32-bit arm code. This was necessary for older
    cores without broadcast data cache maintenance, and ensured that cache
    lines were dirtied and cleaned by the same CPU. On these systems dirty
    cache line migration was not possible, so this was sufficient to
    guarantee coherency.

    On contemporary systems, cache coherence protocols permit (dirty) cache
    lines to migrate between CPUs as a result of speculation, prefetching,
    and other behaviours. To account for this, in ARMv8 data cache
    maintenance operations are broadcast and affect all data caches in the
    domain associated with the VA (i.e. ISH for kernel and user mappings).

    In __switch_to we ensure that tasks can be safely migrated in the middle
    of a maintenance sequence, using a dsb(ish) to ensure prior explicit
    memory accesses are observed and cache maintenance operations are
    completed before a task can be run on another CPU.

    Given the above, it is not necessary to disable preemption in
    copy_to_user_page. This patch removes the preempt_{disable,enable}
    calls, permitting preemption.

    Signed-off-by: Mark Rutland
    Cc: Will Deacon
    Signed-off-by: Catalin Marinas

    Mark Rutland
     
  • Commit 324420bf91f60582 ("arm64: add support for ioremap() block
    mappings") added new p?d_set_huge functions which do the hard work to
    generate and set a correct block entry.

    These differ from open-coded huge page creation in the early page table
    code by explicitly setting the P?D_TYPE_SECT bits (which are implicitly
    retained by mk_sect_prot() for any valid prot), but are otherwise
    identical (and cannot fail on arm64).

    For simplicity and consistency, make use of these in the initial page
    table creation code.

    Signed-off-by: Mark Rutland
    Cc: Ard Biesheuvel
    Cc: Will Deacon
    Signed-off-by: Catalin Marinas

    Mark Rutland
     
  • The KASLR code incorrectly expects the contents of x18 to be preserved
    across a call into C code, and uses it to stash the contents of SCTLR_EL1
    before enabling the MMU. If the MMU needs to be disabled again to create
    the randomized kernel mapping, x18 is written back to SCTLR_EL1, which is
    likely to crash the system if x18 has been clobbered by kasan_early_init()
    or kaslr_early_init(). So use x22 instead, which is not in use so far in
    head.S

    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Catalin Marinas

    Ard Biesheuvel
     

23 Mar, 2016

20 commits

  • Signed-off-by: Helge Deller

    Helge Deller
     
  • Switch to the generic extable search and sort routines which were introduced
    with commit a272858 from Ard Biesheuvel. This saves quite some memory in the
    vmlinux binary with the 64bit kernel.

    Signed-off-by: Helge Deller

    Helge Deller
     
  • PA-RISC wants to sleep 5 seconds before panicking when panic_on_oops
    is set, with no apparent reason. Remove this feature, since some users
    may want their systems to fail as quickly as possible.

    Users who want to delay reboot after panic can use PANIC_TIMEOUT.

    Signed-off-by: Aaro Koskinen
    Acked-by: Helge Deller
    Signed-off-by: Helge Deller

    Aaro Koskinen
     
  • The system calls alloc_hugepages() and free_hugepages() were introduced
    in Linux 2.5.36 and removed again in 2.5.54. They were never implemented
    on parisc, so let's drop them now.

    Signed-off-by: Helge Deller

    Helge Deller
     
  • Pull clk updates from Stephen Boyd:
    "The clk changes for this release cycle are mostly dominated by new
    device support in terms of LoC, but there has been some cleanup in the
    core as well as the usual minor clk additions to various drivers.

    Core:
    - parent tracking has been simplified
    - CLK_IS_ROOT is now a no-op flag, cleaning up drivers has started
    - of_clk_init() doesn't consider disabled DT nodes anymore
    - clk_unregister() had an error path bug squashed
    - of_clk_get_parent_count() has been fixed to only return unsigned ints
    - HAVE_MACH_CLKDEV is removed now that the last arch user (ARM) is gone

    New Drivers:
    - NXP LPC18xx creg
    - QCOM IPQ4019 GCC
    - TI dm814x ADPLL
    - i.MX6QP

    Updates:
    - Cyngus audio clks found on Broadcom iProc devices
    - Non-critical fixes for BCM2385 PLLs
    - Samsung exynos5433 updates for clk id errors, HDMI support,
    suspend/resume simplifications
    - USB, CAN, LVDS, and FCP clks on shmobile devices
    - sunxi got support for more clks on new SoCs and went through a
    minor refactoring/rewrite to use a simpler factor clk construct
    - rockchip added some more clk ids and added suport for fraction
    dividers
    - QCOM GDSCs in msm8996
    - A new devm helper to make adding custom actions simpler (acked by Greg)"

    * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (197 commits)
    clk: bcm2835: fix check of error code returned by devm_ioremap_resource()
    clk: renesas: div6: use RENESAS for #define
    clk: renesas: Rename header file renesas.h
    clk: max77{686,802}: Remove CLK_IS_ROOT
    clk: versatile: Remove CLK_IS_ROOT
    clk: sunxi: Remove use of variable length array
    clk: fixed-rate: Remove CLK_IS_ROOT
    clk: qcom: Remove CLK_IS_ROOT
    doc: dt: add documentation for lpc1850-creg-clk driver
    clk: add lpc18xx creg clk driver
    clk: lpc32xx: fix compilation warning
    clk: xgene: Add missing parenthesis when clearing divider value
    clk: mb86s7x: Remove CLK_IS_ROOT
    clk: x86: Remove clkdev.h and clk.h includes
    clk: x86: Remove CLK_IS_ROOT
    clk: mvebu: Remove CLK_IS_ROOT
    clk: renesas: move drivers to renesas directory
    clk: si5{14,351,70}: Remove CLK_IS_ROOT
    clk: scpi: Remove CLK_IS_ROOT
    clk: s2mps11: Remove CLK_IS_ROOT
    ...

    Linus Torvalds
     
  • After e76b027 ("x86,vdso: Use LSL unconditionally for vgetcpu")
    native_read_tscp() is unused in the kernel. The function can be removed like
    native_read_tsc() was.

    Signed-off-by: Prarit Bhargava
    Acked-by: Andy Lutomirski
    Cc: Borislav Petkov
    Link: http://lkml.kernel.org/r/1458687968-9106-1-git-send-email-prarit@redhat.com
    Signed-off-by: Thomas Gleixner

    Prarit Bhargava
     
  • As a interrupt controller used on some of hisilicon SOCs(660,1610 etc.),
    mbigen driver should be enabled when CONFIG_ARCH_HISI is enabled.

    Signed-off-by: Ma Jun
    Cc: mark.rutland@arm.com
    Cc: jason@lakedaemon.net
    Cc: marc.zyngier@arm.com
    Cc: Catalin.Marinas@arm.com
    Cc: guohanjun@huawei.com
    Cc: Will.Deacon@arm.com
    Cc: huxinwei@huawei.com
    Cc: lizefan@huawei.com
    Cc: dingtianhong@huawei.com
    Cc: zhaojunhua@hisilicon.com
    Cc: liguozhu@hisilicon.com
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1458723993-21044-2-git-send-email-majun258@huawei.com
    Signed-off-by: Thomas Gleixner

    MaJun
     
  • Merge third patch-bomb from Andrew Morton:

    - more ocfs2 changes

    - a few hotfixes

    - Andy's compat cleanups

    - misc fixes to fatfs, ptrace, coredump, cpumask, creds, eventfd,
    panic, ipmi, kgdb, profile, kfifo, ubsan, etc.

    - many rapidio updates: fixes, new drivers.

    - kcov: kernel code coverage feature. Like gcov, but not
    "prohibitively expensive".

    - extable code consolidation for various archs

    * emailed patches from Andrew Morton : (81 commits)
    ia64/extable: use generic search and sort routines
    x86/extable: use generic search and sort routines
    s390/extable: use generic search and sort routines
    alpha/extable: use generic search and sort routines
    kernel/...: convert pr_warning to pr_warn
    drivers: dma-coherent: use memset_io for DMA_MEMORY_IO mappings
    drivers: dma-coherent: use MEMREMAP_WC for DMA_MEMORY_MAP
    memremap: add MEMREMAP_WC flag
    memremap: don't modify flags
    kernel/signal.c: add compile-time check for __ARCH_SI_PREAMBLE_SIZE
    mm/mprotect.c: don't imply PROT_EXEC on non-exec fs
    ipc/sem: make semctl setting sempid consistent
    ubsan: fix tree-wide -Wmaybe-uninitialized false positives
    kfifo: fix sparse complaints
    scripts/gdb: account for changes in module data structure
    scripts/gdb: add cmdline reader command
    scripts/gdb: add version command
    kernel: add kcov code coverage
    profile: hide unused functions when !CONFIG_PROC_FS
    hpwdt: use nmi_panic() when kernel panics in NMI handler
    ...

    Linus Torvalds
     
  • Pull more KVM updates from Paolo Bonzini:
    "Second round of KVM changes for 4.6:

    - build fixes for PPC KVM
    - miscellaneous bugfixes for ARM KVM
    - cleanup of memory barrier and removal of redundant barriers
    - x86 fixes: page tracking oops, support for old buggy KVM nested on 4.5
    - support for protection keys in guests
    - lockdep fix
    - another conversion to simple wait queues and raw spinlocks,
    backported from PREEMPT_RT"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (27 commits)
    KVM: page_track: fix access to NULL slot
    KVM: PPC: do not compile in vfio.o unconditionally
    kvm, rt: change async pagefault code locking for PREEMPT_RT
    KVM/PPC: update the comment of memory barrier in the kvmppc_prepare_to_enter()
    KVM/x86: update the comment of memory barrier in the vcpu_enter_guest()
    KVM: Replace smp_mb() with smp_load_acquire() in the kvm_flush_remote_tlbs()
    KVM/x86: Call smp_wmb() before increasing tlbs_dirty
    KVM: Replace smp_mb() with smp_mb_after_atomic() in the kvm_make_all_cpus_request()
    KVM/x86: Replace smp_mb() with smp_store_mb/release() in the walk_shadow_page_lockless_begin/end()
    KVM: Remove redundant smp_mb() in the kvm_mmu_commit_zap_page()
    KVM, pkeys: expose CPUID/CR4 to guest
    KVM, pkeys: add pkeys support for permission_fault
    KVM, pkeys: introduce pkru_mask to cache conditions
    KVM, pkeys: save/restore PKRU when guest/host switches
    x86: pkey: introduce write_pkru() for KVM
    KVM, pkeys: add pkeys support for xsave state
    KVM, pkeys: disable pkeys for guests in non-paging mode
    KVM: x86: remove magic number with enum cpuid_leafs
    KVM: MMU: return page fault error code from permission_fault
    KVM: fix spin_lock_init order on x86
    ...

    Linus Torvalds
     
  • Replace the arch specific versions of search_extable() and
    sort_extable() with calls to the generic ones, which now support
    relative exception tables as well.

    Signed-off-by: Ard Biesheuvel
    Acked-by: Tony Luck
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ard Biesheuvel
     
  • Replace the arch specific versions of search_extable() and
    sort_extable() with calls to the generic ones, which now support
    relative exception tables as well.

    Signed-off-by: Ard Biesheuvel
    Acked-by: H. Peter Anvin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ard Biesheuvel
     
  • Replace the arch specific versions of search_extable() and
    sort_extable() with calls to the generic ones, which now support
    relative exception tables as well.

    Signed-off-by: Ard Biesheuvel
    Acked-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ard Biesheuvel
     
  • Replace the arch specific versions of search_extable() and
    sort_extable() with calls to the generic ones, which now support
    relative exception tables as well.

    Signed-off-by: Ard Biesheuvel
    Acked-by: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ard Biesheuvel
     
  • kcov provides code coverage collection for coverage-guided fuzzing
    (randomized testing). Coverage-guided fuzzing is a testing technique
    that uses coverage feedback to determine new interesting inputs to a
    system. A notable user-space example is AFL
    (http://lcamtuf.coredump.cx/afl/). However, this technique is not
    widely used for kernel testing due to missing compiler and kernel
    support.

    kcov does not aim to collect as much coverage as possible. It aims to
    collect more or less stable coverage that is function of syscall inputs.
    To achieve this goal it does not collect coverage in soft/hard
    interrupts and instrumentation of some inherently non-deterministic or
    non-interesting parts of kernel is disbled (e.g. scheduler, locking).

    Currently there is a single coverage collection mode (tracing), but the
    API anticipates additional collection modes. Initially I also
    implemented a second mode which exposes coverage in a fixed-size hash
    table of counters (what Quentin used in his original patch). I've
    dropped the second mode for simplicity.

    This patch adds the necessary support on kernel side. The complimentary
    compiler support was added in gcc revision 231296.

    We've used this support to build syzkaller system call fuzzer, which has
    found 90 kernel bugs in just 2 months:

    https://github.com/google/syzkaller/wiki/Found-Bugs

    We've also found 30+ bugs in our internal systems with syzkaller.
    Another (yet unexplored) direction where kcov coverage would greatly
    help is more traditional "blob mutation". For example, mounting a
    random blob as a filesystem, or receiving a random blob over wire.

    Why not gcov. Typical fuzzing loop looks as follows: (1) reset
    coverage, (2) execute a bit of code, (3) collect coverage, repeat. A
    typical coverage can be just a dozen of basic blocks (e.g. an invalid
    input). In such context gcov becomes prohibitively expensive as
    reset/collect coverage steps depend on total number of basic
    blocks/edges in program (in case of kernel it is about 2M). Cost of
    kcov depends only on number of executed basic blocks/edges. On top of
    that, kernel requires per-thread coverage because there are always
    background threads and unrelated processes that also produce coverage.
    With inlined gcov instrumentation per-thread coverage is not possible.

    kcov exposes kernel PCs and control flow to user-space which is
    insecure. But debugfs should not be mapped as user accessible.

    Based on a patch by Quentin Casasnovas.

    [akpm@linux-foundation.org: make task_struct.kcov_mode have type `enum kcov_mode']
    [akpm@linux-foundation.org: unbreak allmodconfig]
    [akpm@linux-foundation.org: follow x86 Makefile layout standards]
    Signed-off-by: Dmitry Vyukov
    Reviewed-by: Kees Cook
    Cc: syzkaller
    Cc: Vegard Nossum
    Cc: Catalin Marinas
    Cc: Tavis Ormandy
    Cc: Will Deacon
    Cc: Quentin Casasnovas
    Cc: Kostya Serebryany
    Cc: Eric Dumazet
    Cc: Alexander Potapenko
    Cc: Kees Cook
    Cc: Bjorn Helgaas
    Cc: Sasha Levin
    Cc: David Drysdale
    Cc: Ard Biesheuvel
    Cc: Andrey Ryabinin
    Cc: Kirill A. Shutemov
    Cc: Jiri Slaby
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Vyukov
     
  • Add new Port Write handler registration interfaces that attach PW
    handlers to local mport device objects. This is different from old
    interface that attaches PW callback to individual RapidIO device. The
    new interfaces are intended for use for common event handling (e.g.
    hot-plug notifications) while the old interface is available for
    individual device drivers.

    This patch is based on patch proposed by Andre van Herk but preserves
    existing per-device interface and adds lock protection for list
    handling.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Change mport object initialization/registration sequence to match
    reworked version of rio_register_mport() in the core code.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Benjamin Herrenschmidt
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • This commit fixes the following security hole affecting systems where
    all of the following conditions are fulfilled:

    - The fs.suid_dumpable sysctl is set to 2.
    - The kernel.core_pattern sysctl's value starts with "/". (Systems
    where kernel.core_pattern starts with "|/" are not affected.)
    - Unprivileged user namespace creation is permitted. (This is
    true on Linux >=3.8, but some distributions disallow it by
    default using a distro patch.)

    Under these conditions, if a program executes under secure exec rules,
    causing it to run with the SUID_DUMP_ROOT flag, then unshares its user
    namespace, changes its root directory and crashes, the coredump will be
    written using fsuid=0 and a path derived from kernel.core_pattern - but
    this path is interpreted relative to the root directory of the process,
    allowing the attacker to control where a coredump will be written with
    root privileges.

    To fix the security issue, always interpret core_pattern for dumps that
    are written under SUID_DUMP_ROOT relative to the root directory of init.

    Signed-off-by: Jann Horn
    Acked-by: Kees Cook
    Cc: Al Viro
    Cc: "Eric W. Biederman"
    Cc: Andy Lutomirski
    Cc: Oleg Nesterov
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jann Horn
     
  • x86's is_compat_task always checked the current syscall type, not the
    task type. It has no non-arch users any more, so just remove it to
    avoid confusion.

    On x86, nothing should really be checking the task ABI. There are
    legitimate users for the syscall ABI and for the mm ABI.

    Signed-off-by: Andy Lutomirski
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Lutomirski
     
  • Sparc's syscall_get_arch was buggy: it returned the task arch, not the
    syscall arch. This could confuse seccomp and audit.

    I don't think this is as bad for seccomp as it looks: sparc's 32-bit and
    64-bit syscalls are numbered the same.

    Signed-off-by: Andy Lutomirski
    Cc: David S. Miller
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Lutomirski
     
  • On sparc64 compat-enabled kernels, any task can make 32-bit and 64-bit
    syscalls. is_compat_task returns true in 32-bit tasks, which does not
    necessarily imply that the current syscall is 32-bit.

    Provide an in_compat_syscall implementation that checks whether the
    current syscall is compat.

    As far as I know, sparc is the only architecture on which is_compat_task
    checks the compat status of the task and on which the compat status of a
    syscall can differ from the compat status of the task. On x86,
    is_compat_task checks the syscall type, not the task type.

    [akpm@linux-foundation.org: add comment, per Sam]
    [akpm@linux-foundation.org: update comment, per Andy]
    Signed-off-by: Andy Lutomirski
    Acked-by: David S. Miller
    Cc: Sam Ravnborg
    Cc: Andy Lutomirski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Lutomirski