05 Apr, 2016

1 commit

  • PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
    ago with promise that one day it will be possible to implement page
    cache with bigger chunks than PAGE_SIZE.

    This promise never materialized. And unlikely will.

    We have many places where PAGE_CACHE_SIZE assumed to be equal to
    PAGE_SIZE. And it's constant source of confusion on whether
    PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
    especially on the border between fs and mm.

    Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
    breakage to be doable.

    Let's stop pretending that pages in page cache are special. They are
    not.

    The changes are pretty straight-forward:

    - << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> ;

    - >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> ;

    - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};

    - page_cache_get() -> get_page();

    - page_cache_release() -> put_page();

    This patch contains automated changes generated with coccinelle using
    script below. For some reason, coccinelle doesn't patch header files.
    I've called spatch for them manually.

    The only adjustment after coccinelle is revert of changes to
    PAGE_CAHCE_ALIGN definition: we are going to drop it later.

    There are few places in the code where coccinelle didn't reach. I'll
    fix them manually in a separate patch. Comments and documentation also
    will be addressed with the separate patch.

    virtual patch

    @@
    expression E;
    @@
    - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
    + E

    @@
    expression E;
    @@
    - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
    + E

    @@
    @@
    - PAGE_CACHE_SHIFT
    + PAGE_SHIFT

    @@
    @@
    - PAGE_CACHE_SIZE
    + PAGE_SIZE

    @@
    @@
    - PAGE_CACHE_MASK
    + PAGE_MASK

    @@
    expression E;
    @@
    - PAGE_CACHE_ALIGN(E)
    + PAGE_ALIGN(E)

    @@
    expression E;
    @@
    - page_cache_get(E)
    + get_page(E)

    @@
    expression E;
    @@
    - page_cache_release(E)
    + put_page(E)

    Signed-off-by: Kirill A. Shutemov
    Acked-by: Michal Hocko
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

31 Mar, 2016

6 commits

  • Pull parisc fixes from Helge Deller:
    "Fix seccomp filter support and SIGSYS signals on compat kernel.

    Both patches are tagged for v4.5 stable kernel"

    * 'parisc-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Fix and enable seccomp filter support
    parisc: Fix SIGSYS signals in compat case

    Linus Torvalds
     
  • Pull nvdimm mcsafe_memcpy use from Dan Williams:
    "Now that mcsafe_memcpy() has landed, and the return value was been
    clarified in commit cbf8b5a2b649 ("x86/mm, x86/mce: Fix return
    type/value for memcpy_mcsafe()"), let's hook up its primary usage in
    the pmem driver.

    The compilation problems from the initial posting have been fixed,
    this has appeared in a -next release with no reported issues, and it
    picked up an ack from Ingo. There is no pressing need to merge this
    in 4.6- rc2. However, if we wait until 4.7 the new memcpy_mcsafe()
    capability will ship without a user in 4.6-final"

    * 'libnvdimm-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
    x86, pmem: use memcpy_mcsafe() for memcpy_from_pmem()

    Linus Torvalds
     
  • The seccomp filter support requires careful handling of task registers. This
    includes reloading of the return value (%r28) and proper syscall exit if
    secure_computing() returned -1.

    Additionally we need to sign-extend the syscall number from signed 32bit to
    signed 64bit in do_syscall_trace_enter() since the ptrace interface only allows
    storing 32bit values in compat mode.

    Signed-off-by: Helge Deller
    Cc: stable@vger.kernel.org # v4.5

    Helge Deller
     
  • Signed-off-by: Helge Deller
    Cc: stable@vger.kernel.org # v4.5

    Helge Deller
     
  • Pull nios2 fix from Ley Foon Tan:
    "Replace fdt_translate_address with of_flat_dt_translate_address"

    Fixes a build failure.

    * tag 'nios2-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
    nios2: Replace fdt_translate_address with of_flat_dt_translate_address

    Linus Torvalds
     
  • nios2 builds fail with the following build error.

    arch/nios2/kernel/prom.c: In function 'early_init_dt_scan_serial':
    arch/nios2/kernel/prom.c:100:2: error:
    implicit declaration of function 'fdt_translate_address'

    Commit c90fe9c0394b ("of: earlycon: Move address translation to
    of_setup_earlycon()") replaced fdt_translate_address() with
    of_flat_dt_translate_address() but missed updating the nios2 code.

    Fixes: c90fe9c0394b ("of: earlycon: Move address translation to of_setup_earlycon()")
    Cc: Peter Hurley
    Cc: Rob Herring
    Signed-off-by: Guenter Roeck
    Acked-by: Ley Foon Tan

    Guenter Roeck
     

29 Mar, 2016

3 commits

  • Update the definition of memcpy_from_pmem() to return 0 or a negative
    error code. Implement x86/arch_memcpy_from_pmem() with memcpy_mcsafe().

    Cc: Borislav Petkov
    Cc: Tony Luck
    Cc: Thomas Gleixner
    Cc: Andy Lutomirski
    Cc: Peter Zijlstra
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Acked-by: Ingo Molnar
    Reviewed-by: Ross Zwisler
    Signed-off-by: Dan Williams

    Dan Williams
     
  • Pull sparc fixes from David Miller:
    "Minor typing cleanup from Joe Perches, and some comment typo fixes
    from Adam Buchbinder"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
    sparc: Convert naked unsigned uses to unsigned int
    sparc: Fix misspellings in comments.

    Linus Torvalds
     
  • Pull arch/tile bugfixes from Chris Metcalf:
    "These include updates to MAINTAINERS, some comment spelling fixes, and
    a bugfix to the tile kgdb.c support"

    * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    tile: Fix misspellings in comments.
    MAINTAINERS: update web link for tile architecture
    MAINTAINERS: update arch/tile maintainer email domain
    tile kgdb: fix bug in copy to gdb regs, and optimize memset

    Linus Torvalds
     

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

10 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