15 Feb, 2016

4 commits

  • Pull irqchip fixes from Thomas Gleixner:
    "Another set of ARM SoC related irqchip fixes:
    - Plug a memory leak in gicv3-its
    - Limit features to the root gic interrupt controller
    - Add a missing barrier in the gic-v3 IAR access
    - Another compile test fix for sun4i"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    irqchip/gic-v3: Make sure read from ICC_IAR1_EL1 is visible on redestributor
    irqchip/gic: Only set the EOImodeNS bit for the root controller
    irqchip/gic: Only populate set_affinity for the root controller
    irqchip/gicv3-its: Fix memory leak in its_free_tables()
    irqchip/sun4i: Fix compilation outside of arch/arm

    Linus Torvalds
     
  • Pull x86 fixes from Thomas Gleixner:
    "Two small fixlets for x86:

    - Prevent a KASAN false positive in thread_saved_pc()

    - Fix a 32-bit truncation problem in the x86 numa code"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/mm/numa: Fix 32-bit memblock range truncation bug on 32-bit NUMA kernels
    x86: Fix KASAN false positives in thread_saved_pc()

    Linus Torvalds
     
  • Pull MIPS fixes from Ralf Baechle:
    "Here's the first round of MIPS fixes after the merge window:

    - Detect Octeon III's PCI correctly.
    - Fix return value of the MT7620 probing function.
    - Wire up the copy_file_range syscall.
    - Fix 64k page support on 32 bit kernels.
    - Fix the early Coherency Manager probe.
    - Allow only hardware-supported page sizes to be selected for R6000.
    - Fix corner cases for the RDHWR nstruction emulation on old hardware.
    - Fix FPU handling corner cases.
    - Remove stale entry for BCM33xx from the MAINTAINERS file.
    - 32 and 64 bit ELF headers are different, handle them correctly"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    mips: Differentiate between 32 and 64 bit ELF header
    MIPS: Octeon: Update OCTEON_FEATURE_PCIE for Octeon III
    MIPS: pci-mt7620: Fix return value check in mt7620_pci_probe()
    MIPS: Fix early CM probing
    MIPS: Wire up copy_file_range syscall.
    MIPS: Fix 64k page support for 32 bit kernels.
    MIPS: R6000: Don't allow 64k pages for R6000.
    MIPS: traps.c: Correct microMIPS RDHWR emulation
    MIPS: traps.c: Don't emulate RDHWR in the CpU #0 exception handler
    MAINTAINERS: Remove stale entry for BCM33xx chips
    MIPS: Fix FPU disable with preemption
    MIPS: Properly disable FPU in start_thread()
    MIPS: Fix buffer overflow in syscall_get_arguments()

    Linus Torvalds
     
  • Pull ARM fixes from Russell King:
    "A couple of ARM fixes from Linus for the ICST clock generator code"

    [ "Linus" here is Linus Walleij. Name-stealer.

    Linus "there can be only one" Torvalds ]

    * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
    ARM: 8519/1: ICST: try other dividends than 1
    ARM: 8517/1: ICST: avoid arithmetic overflow in icst_hz()

    Linus Torvalds
     

14 Feb, 2016

1 commit

  • Pull ARC fixes from Vineet Gupta:
    "I've been sitting on some of these fixes for a while.

    - Corner case of returning to delay slot from interrupt
    - Changing default interrupt prioiry level
    - Kconfig'ize support for super pages
    - Other minor fixes"

    * tag 'arc-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
    ARC: mm: Introduce explicit super page size support
    ARCv2: intc: Allow interruption by lowest priority interrupt
    ARCv2: Check for LL-SC livelock only if LLSC is enabled
    ARC: shrink cpuinfo by not saving full timer BCR
    ARCv2: clocksource: Rename GRTC -> GFRC ...
    ARCv2: STAR 9000950267: Handle return from intr to Delay Slot #2

    Linus Torvalds
     

13 Feb, 2016

2 commits

  • Merge fixes from Andrew Morton:
    "10 fixes"

    The lockdep hlist conversion is in the locking tree too, waiting for the
    next merge window. Andrew thought it should go in now. I'll take it,
    since it fixes a real problem and looks trivially correct (famous last
    words).

    * emailed patches from Andrew Morton :
    arch/x86/Kconfig: CONFIG_X86_UV should depend on CONFIG_EFI
    mm: fix pfn_t vs highmem
    kernel/locking/lockdep.c: convert hash tables to hlists
    mm,thp: fix spellos in describing __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
    mm,thp: khugepaged: call pte flush at the time of collapse
    mm/backing-dev.c: fix error path in wb_init()
    mm, dax: check for pmd_none() after split_huge_pmd()
    vsprintf: kptr_restrict is okay in IRQ when 2
    mm: fix filemap.c kernel doc warning
    ubsan: cosmetic fix to Kconfig text

    Linus Torvalds
     
  • Pull fbdev fixes from Tomi Valkeinen:
    - fix omap2plus_defconfig to enable omapfb as it was in v4.4
    - ocfb: fix timings for margins
    - s6e8ax0, da8xx-fb: fix compile warnings
    - mmp: fix build failure caused by bad printk parameters
    - imxfb: fix clock issue which kept the display off

    * tag 'fbdev-fixes-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
    video: fbdev: imxfb: Provide a reset mechanism
    fbdev: mmp: print IRQ resource using %pR format string
    fbdev: da8xx-fb: remove incorrect type cast
    fbdev: s6e8ax0: avoid unused function warnings
    ocfb: fix tgdel and tvdel timing parameters
    ARM: omap2plus_defconfig: update display configs

    Linus Torvalds
     

12 Feb, 2016

2 commits

  • MMUv4 supports 2 concurrent page sizes: Normal and Super [4K to 16M]

    So far Linux supported a single super page size for a given Normal page,
    depending on the software page walking address split.
    e.g. we had 11:8:13 address split for 8K page, which meant super page
    was 2 ^(8+13) = 2M (given that THP size has to be PMD_SHIFT)

    Now we turn this around, by allowing multiple Super Pages in Kconfig
    (currently 2M and 16M only) and forcing page walker address split to
    PGDIR_SHIFT and PAGE_SHIFT

    For configs without Super page, things are same as before and
    PGDIR_SHIFT can be hacked to get non default address split

    The motivation for this change is a customer who needs 16M super page
    and a 8K Normal page combo.

    Signed-off-by: Vineet Gupta

    Vineet Gupta
     
  • arch/x86/built-in.o: In function `uv_bios_call':
    (.text+0xeba00): undefined reference to `efi_call'

    Reported-by: kbuild test robot
    Suggested-by: "H. Peter Anvin"
    Cc: Ingo Molnar
    Reviewed-by: Matt Fleming
    Acked-by: Alex Thorlton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

11 Feb, 2016

3 commits

  • Since the dawn of time the ICST code has only supported divide
    by one or hang in an eternal loop. Luckily we were always dividing
    by one because the reference frequency for the systems using
    the ICSTs is 24MHz and the [min,max] values for the PLL input
    if [10,320] MHz for ICST307 and [6,200] for ICST525, so the loop
    will always terminate immediately without assigning any divisor
    for the reference frequency.

    But for the code to make sense, let's insert the missing i++

    Reported-by: David Binderman
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Walleij
    Signed-off-by: Russell King

    Linus Walleij
     
  • Depending on the configuration either the 32 or 64 bit version of
    elf_check_arch() is defined. parse_crash_elf{32|64}_headers() does
    some basic verification of the ELF header via
    vmcore_elf{32|64}_check_arch() which happen to map to elf_check_arch().
    Since the implementation 32 and 64 bit version of elf_check_arch()
    differ, we use the wrong type:

    In file included from include/linux/elf.h:4:0,
    from fs/proc/vmcore.c:13:
    fs/proc/vmcore.c: In function 'parse_crash_elf64_headers':
    >> arch/mips/include/asm/elf.h:228:23: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    struct elfhdr *__h = (hdr); \
    ^
    include/linux/crash_dump.h:41:37: note: in expansion of macro 'elf_check_arch'
    #define vmcore_elf64_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x))
    ^
    fs/proc/vmcore.c:1015:4: note: in expansion of macro 'vmcore_elf64_check_arch'
    !vmcore_elf64_check_arch(&ehdr) ||
    ^

    Therefore, we rather define vmcore_elf{32|64}_check_arch() as a
    basic machine check and use it also in binfm_elf?32.c as well.

    Signed-off-by: Daniel Wagner
    Suggested-by: Maciej W. Rozycki
    Reviewed-by: Maciej W. Rozycki
    Reported-by: Fengguang Wu
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/12529/
    Signed-off-by: Ralf Baechle

    Daniel Wagner
     
  • The ARM GICv3 specification mentions the need for dsb after a read
    from the ICC_IAR1_EL1 register:

    4.1.1 Physical CPU Interface:
    The effects of reading ICC_IAR0_EL1 and ICC_IAR1_EL1
    on the state of a returned INTID are not guaranteed
    to be visible until after the execution of a DSB.

    Not having this could result in missed interrupts, so let's add the
    required barrier.

    [Marc: fixed commit message]

    Acked-by: Marc Zyngier
    Signed-off-by: Tirumalesh Chalamarla
    Signed-off-by: Marc Zyngier

    Tirumalesh Chalamarla
     

10 Feb, 2016

4 commits

  • Currently the driver tries to probe the pci driver and oops.

    Add CN7XXX to case so that driver probes the pcie driver.

    Signed-off-by: Zubair Lutfullah Kakakhel
    Cc: david.daney@cavium.com
    Cc: matt.redfearn@imgtec.com
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/12530/
    Signed-off-by: Ralf Baechle

    Zubair Lutfullah Kakakhel
     
  • In case of error, the function devm_ioremap_resource() returns
    ERR_PTR() and never returns NULL. The NULL test in the return
    value check should be replaced with IS_ERR().

    Signed-off-by: Wei Yongjun
    Acked-by: John Crispin
    Cc: Matthias Brugger
    Cc: linux-mips@linux-mips.org
    Cc: linux-mediatek@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/12451/
    Signed-off-by: Ralf Baechle

    Wei Yongjun
     
  • ARC HS Cores support configurable multiple interrupt priorities of upto
    16 levels.

    There is processor "interrupt preemption threshhold" in STATUS32.E[4:1]
    And several places need to set this up:
    1. seed value as kernel is booting
    2. seed value for user space programs
    3. Arg to SLEEP instruction in idle task (what interrupt prio can wake)
    4. Per-IRQ line prioirty (i.e. what is the priority of interrupt
    raised by a peripheral or timer or perf counter...

    Currently above sites use the highest priority 0. This can be potential
    problem when multiple priorities are supported. e.g. user space could
    only be interrupted by P0 interrupt, not others...
    So turn this over and instead make default interruption level to be
    the lowest priority possible 15. This should be fine even if there are
    fewer priority levels configured (say two: P0 HIGH, P1 LOW)

    This feature also effectively disables FIRQ feature if present in
    hardware config. With old code, a P0 interrupt would be FIRQ, needing
    special handling (ISR or Register Banks) which is NOT supported yet.
    Now it not be P0 (P15 or whatever is lowest prio) so FIRQ is not
    triggered.

    Signed-off-by: Vineet Gupta

    Vineet Gupta
     
  • Commit c014d164f21d ("MIPS: Add platform callback before initializing
    the L2 cache") added a platform_early_l2_init function in order to allow
    platforms to probe for the CM before L2 initialisation is performed, so
    that CM GCRs are available to mips_sc_probe.

    That commit actually fails to do anything useful, since it checks
    mips_cm_revision to determine whether it should call mips_cm_probe but
    the result of mips_cm_revision will always be 0 until mips_cm_probe has
    been called. Thus the "early" mips_cm_probe call never occurs.

    Fix this & drop the useless weak platform_early_l2_init function by
    simply calling mips_cm_probe from setup_arch. For platforms that don't
    select CONFIG_MIPS_CM this will be a no-op, and for those that do it
    removes the requirement for them to call mips_cm_probe manually
    (although doing so isn't harmful for now).

    Signed-off-by: Paul Burton
    Reviewed-by: Alexander Sverdlin
    Cc: Andrzej Hajda
    Cc: Aaro Koskinen
    Cc: Masahiro Yamada
    Cc: Rob Herring
    Cc: Peter Hurley
    Cc: Leonid Yegoshin
    Cc: Jaedon Shin
    Cc: James Hogan
    Cc: Jonas Gorski
    Cc: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/12475/
    Signed-off-by: Ralf Baechle

    Paul Burton
     

09 Feb, 2016

3 commits

  • Pull KVM fixes from Paolo Bonzini:
    "KVM-ARM fixes, mostly coming from the PMU work"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    arm64: KVM: Fix guest dead loop when register accessor returns false
    arm64: KVM: Fix comments of the CP handler
    arm64: KVM: Fix wrong use of the CPSR MODE mask for 32bit guests
    arm64: KVM: Obey RES0/1 reserved bits when setting CPTR_EL2
    arm64: KVM: Fix AArch64 guest userspace exception injection

    Linus Torvalds
     
  • …nel/git/broonie/regmap

    Pull regmap fix from Mark Brown:
    "A single revert back to v4.4 endianness handling.

    Commit 29bb45f25ff3 ("regmap-mmio: Use native endianness for
    read/write") attempted to fix some long standing bugs in the MMIO
    implementation for big endian systems caused by duplicate byte
    swapping in both regmap and readl()/writel(). Sadly the fix makes
    things worse rather than better, so revert it for now"

    * tag 'regmap-fix-v4.5-big-endian' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
    regmap: mmio: Revert to v4.4 endianness handling

    Linus Torvalds
     
  • When trying to set the ICST 307 clock to 25174000 Hz I ran into
    this arithmetic error: the icst_hz_to_vco() correctly figure out
    DIVIDE=2, RDW=100 and VDW=99 yielding a frequency of
    25174000 Hz out of the VCO. (I replicated the icst_hz() function
    in a spreadsheet to verify this.)

    However, when I called icst_hz() on these VCO settings it would
    instead return 4122709 Hz. This causes an error in the common
    clock driver for ICST as the common clock framework will call
    .round_rate() on the clock which will utilize icst_hz_to_vco()
    followed by icst_hz() suggesting the erroneous frequency, and
    then the clock gets set to this.

    The error did not manifest in the old clock framework since
    this high frequency was only used by the CLCD, which calls
    clk_set_rate() without first calling clk_round_rate() and since
    the old clock framework would not call clk_round_rate() before
    setting the frequency, the correct values propagated into
    the VCO.

    After some experimenting I figured out that it was due to a simple
    arithmetic overflow: the divisor for 24Mhz reference frequency
    as reference becomes 24000000*2*(99+8)=0x132212400 and the "1"
    in bit 32 overflows and is lost.

    But introducing an explicit 64-by-32 bit do_div() and casting
    the divisor into (u64) we get the right frequency back, and the
    right frequency gets set.

    Tested on the ARM Versatile.

    Cc: stable@vger.kernel.org
    Cc: linux-clk@vger.kernel.org
    Cc: Pawel Moll
    Signed-off-by: Linus Walleij
    Signed-off-by: Russell King

    Linus Walleij
     

08 Feb, 2016

3 commits

  • …/kvmarm/kvmarm into kvm-master

    KVM/ARM fixes for v4.5-rc2

    A few random fixes, mostly coming from the PMU work by Shannon:

    - fix for injecting faults coming from the guest's userspace
    - cleanup for our CPTR_EL2 accessors (reserved bits)
    - fix for a bug impacting perf (user/kernel discrimination)
    - fix for a 32bit sysreg handling bug

    Paolo Bonzini
     
  • The following commit:

    a0acda917284 ("acpi, numa, mem_hotplug: mark all nodes the kernel resides un-hotpluggable")

    Introduced numa_clear_kernel_node_hotplug(), which function is executed
    during early bootup, and which marks all currently reserved memblock
    regions as hot-memory-unswappable as well.

    y14sg1 reported that when running 32-bit NUMA kernels,
    the grsecurity/PAX kernel patch flagged a size overflow in this function:

    PAX: size overflow detected in function x86_numa_init arch/x86/mm/numa.c:691 [...]

    ... the reason for the overflow is that memblock_clear_hotplug() takes physical
    addresses as arguments, while the start/end variables used by
    numa_clear_kernel_node_hotplug() are 'unsigned long', which is 32-bit on PAE
    kernels, but which has 64-bit physical addresses.

    So on 32-bit PAE kernels that have physical memory above the 4GB boundary,
    we truncate a 64-bit physical address range to 32 bits and pass it to
    memblock_clear_hotplug(), which at minimum prevents the original memory-hotplug
    bugfix from working, but might have other side effects as well.

    The fix is to use the proper type to handle physical addresses, phys_addr_t.

    Reported-by: y14sg1
    Cc: Andrew Morton
    Cc: Brad Spengler
    Cc: Chen Tang
    Cc: "H. Peter Anvin"
    Cc: Lai Jiangshan
    Cc: Linus Torvalds
    Cc: PaX Team
    Cc: Taku Izumi
    Cc: Tang Chen
    Cc: Thomas Gleixner
    Cc: Wen Congyang
    Cc: Yasuaki Ishimatsu
    Cc: Zhang Yanfei
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Pull ARM SoC fixes from Olof Johansson:
    "The first real batch of fixes for this release cycle, so there are a
    few more than usual.

    Most of these are fixes and tweaks to board support (DT bugfixes,
    etc). I've also picked up a couple of small cleanups that seemed
    innocent enough that there was little reason to wait (const/
    __initconst and Kconfig deps).

    Quite a bit of the changes on OMAP were due to fixes to no longer
    write to rodata from assembly when ARM_KERNMEM_PERMS was enabled, but
    there were also other fixes.

    Kirkwood had a bunch of gpio fixes for some boards. OMAP had RTC
    fixes on OMAP5, and Nomadik had changes to MMC parameters in DT.

    All in all, mostly the usual mix of various fixes"

    * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (46 commits)
    ARM: multi_v7_defconfig: enable DW_WATCHDOG
    ARM: nomadik: fix up SD/MMC DT settings
    ARM64: tegra: Add chosen node for tegra132 norrin
    ARM: realview: use "depends on" instead of "if" after prompt
    ARM: tango: use "depends on" instead of "if" after prompt
    ARM: tango: use const and __initconst for smp_operations
    ARM: realview: use const and __initconst for smp_operations
    bus: uniphier-system-bus: revive tristate prompt
    arm64: dts: Add missing DMA Abort interrupt to Juno
    bus: vexpress-config: Add missing of_node_put
    ARM: dts: am57xx: sbc-am57x: correct Eth PHY settings
    ARM: dts: am57xx: cl-som-am57x: fix CPSW EMAC pinmux
    ARM: dts: am57xx: sbc-am57x: fix UART3 pinmux
    ARM: dts: am57xx: cl-som-am57x: update SPI Flash frequency
    ARM: dts: am57xx: cl-som-am57x: set HOST mode for USB2
    ARM: dts: am57xx: sbc-am57x: fix SB-SOM EEPROM I2C address
    ARM: dts: LogicPD Torpedo: Revert Duplicative Entries
    ARM: dts: am437x: pixcir_tangoc: use correct flags for irq types
    ARM: dts: am4372: fix irq type for arm twd and global timer
    ARM: dts: at91: sama5d4 xplained: fix phy0 IRQ type
    ...

    Linus Torvalds
     

06 Feb, 2016

4 commits

  • Commit 16da306849d0 ("um: kill pfn_t") introduced a compile warning for
    defconfig (SUBARCH=i386):

    arch/um/kernel/skas/mmu.c:38:206:
    warning: right shift count >= width of type [-Wshift-count-overflow]

    Aforementioned patch changes the definition of the phys_to_pfn() macro
    from

    ((pfn_t) ((p) >> PAGE_SHIFT))

    to

    ((p) >> PAGE_SHIFT)

    This effectively changes the phys_to_pfn() expansion's type from
    unsigned long long to unsigned long.

    Through the callchain init_stub_pte() => mk_pte(), the expansion of
    phys_to_pfn() is (indirectly) fed into the 'phys' argument of the
    pte_set_val(pte, phys, prot) macro, eventually leading to

    (pte).pte_high = (phys) >> 32;

    This results in the warning from above.

    Since UML only deals with 32 bit addresses, the upper 32 bits from
    'phys' used to be always zero anyway. Also, all page protection flags
    defined by UML don't use any bits beyond bit 9. Since the contents of a
    PTE are defined within architecture scope only, the ->pte_high member
    can be safely removed.

    Remove the ->pte_high member from struct pte_t.
    Rename ->pte_low to ->pte.
    Adapt the pte helper macros in arch/um/include/asm/page.h.

    Noteworthy is the pte_copy() macro where a smp_wmb() gets dropped. This
    write barrier doesn't seem to be paired with any read barrier though and
    thus, was useless anyway.

    Fixes: 16da306849d0 ("um: kill pfn_t")
    Signed-off-by: Nicolai Stange
    Cc: Dan Williams
    Cc: Richard Weinberger
    Cc: Nicolai Stange
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nicolai Stange
     
  • Commit 944d9fec8d7a ("hugetlb: add support for gigantic page allocation
    at runtime") has added the runtime gigantic page allocation via
    alloc_contig_range(), making this support available only when CONFIG_CMA
    is enabled. Because it doesn't depend on MIGRATE_CMA pageblocks and the
    associated infrastructure, it is possible with few simple adjustments to
    require only CONFIG_MEMORY_ISOLATION instead of full CONFIG_CMA.

    After this patch, alloc_contig_range() and related functions are
    available and used for gigantic pages with just CONFIG_MEMORY_ISOLATION
    enabled. Note CONFIG_CMA selects CONFIG_MEMORY_ISOLATION. This allows
    supporting runtime gigantic pages without the CMA-specific checks in
    page allocator fastpaths.

    Signed-off-by: Vlastimil Babka
    Cc: Luiz Capitulino
    Cc: Kirill A. Shutemov
    Cc: Zhang Yanfei
    Cc: Yasuaki Ishimatsu
    Cc: Joonsoo Kim
    Cc: Naoya Horiguchi
    Cc: Mel Gorman
    Cc: Davidlohr Bueso
    Cc: Hillf Danton
    Cc: Mike Kravetz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vlastimil Babka
     
  • One of the randconfig build failed with the error:

    arch/m32r/kernel/smp.c: In function 'smp_flush_tlb_mm':
    arch/m32r/kernel/smp.c:283:20: error: subscripted value is neither array nor pointer nor vector
    mmc = &mm->context[cpu_id];
    ^
    arch/m32r/kernel/smp.c: In function 'smp_flush_tlb_page':
    arch/m32r/kernel/smp.c:353:20: error: subscripted value is neither array nor pointer nor vector
    mmc = &mm->context[cpu_id];
    ^
    arch/m32r/kernel/smp.c: In function 'smp_invalidate_interrupt':
    arch/m32r/kernel/smp.c:479:41: error: subscripted value is neither array nor pointer nor vector
    unsigned long *mmc = &flush_mm->context[cpu_id];

    It turned out that CONFIG_SMP was defined but CONFIG_MMU was not
    defined. But arch/m32r/include/asm/mmu.h only defines mm_context_t as
    an array when both CONFIG_SMP and CONFIG_MMU are defined. And
    arch/m32r/kernel/smp.c is always using context as an array. So without
    MMU SMP can not work.

    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sudip Mukherjee
     
  • Signed-off-by: Ralf Baechle

    Ralf Baechle
     

05 Feb, 2016

5 commits

  • Commit 29bb45f25ff3 (regmap-mmio: Use native endianness for read/write)
    attempted to fix some long standing bugs in the MMIO implementation for
    big endian systems caused by duplicate byte swapping in both regmap and
    readl()/writel() which affected MIPS systems as when they are in big
    endian mode they flip the endianness of all registers in the system, not
    just the CPU. MIPS systems had worked around this by declaring regmap
    using IPs as little endian which is inaccurate, unfortunately the issue
    had not been reported.

    Sadly the fix makes things worse rather than better. By changing the
    behaviour to match the documentation it caused behaviour changes for
    other IPs which broke them and by using the __raw I/O accessors to avoid
    the endianness swapping in readl()/writel() it removed some memory
    ordering guarantees and could potentially generate unvirtualisable
    instructions on some architectures.

    Unfortunately sorting out all this mess in any half way sensible fashion
    was far too invasive to go in during an -rc cycle so instead let's go
    back to the old broken behaviour for v4.5, the better fixes are already
    queued for v4.6. This does mean that we keep the broken MIPS DTs for
    another release but that seems the least bad way of handling the
    situation.

    Reported-by: Johannes Berg
    Signed-off-by: Mark Brown

    Mark Brown
     
  • thread_saved_pc() reads stack of a potentially running task.
    This can cause false KASAN stack-out-of-bounds reports,
    because the running task concurrently poisons and unpoisons
    own stack.

    The same happens in get_wchan(), and get get_wchan() was fixed
    by using READ_ONCE_NOCHECK(). Do the same here.

    Example KASAN report triggered by sysrq-t:

    BUG: KASAN: out-of-bounds in sched_show_task+0x306/0x3b0 at addr ffff880043c97c18
    Read of size 8 by task syz-executor/23839
    [...]
    page dumped because: kasan: bad access detected
    [...]
    Call Trace:
    [] __asan_report_load8_noabort+0x3e/0x40
    [] sched_show_task+0x306/0x3b0
    [] show_state_filter+0x124/0x1a0
    [] fn_show_state+0x10/0x20
    [] k_spec+0xa8/0xe0
    [] kbd_event+0xb9f/0x4000
    [] input_to_handler+0x3a7/0x4b0
    [] input_pass_values.part.5+0x554/0x6b0
    [] input_handle_event+0x2ac/0x1070
    [] input_inject_event+0x237/0x280
    [] evdev_write+0x478/0x680
    [] __vfs_write+0x113/0x480
    [] vfs_write+0x167/0x4a0
    [] SyS_write+0x111/0x220

    Signed-off-by: Dmitry Vyukov
    Acked-by: Andrey Ryabinin
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: glider@google.com
    Cc: kasan-dev@googlegroups.com
    Cc: kcc@google.com
    Cc: linux-kernel@vger.kernel.org
    Cc: ryabinin.a.a@gmail.com
    Signed-off-by: Ingo Molnar

    Dmitry Vyukov
     
  • Pull arm64 fixes from Will Deacon:
    "Nothing particularly interesting here, but all important fixes
    nonetheless:

    - Add missing PAN toggling in the futex code

    - Fix missing #include that briefly caused issues in -next

    - Allow changing of vmalloc permissions with set_memory_* (used by
    bpf)"

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: asm: Explicitly include linux/personality.h in asm/page.h
    arm64: futex.h: Add missing PAN toggling
    arm64: allow vmalloc regions to be set with set_memory_*

    Linus Torvalds
     
  • The watchdog timer on the SoCFPGA platform is the Synopsys Designware watchdog.
    Enable CONFIG_DW_WATCHDOG for the driver to get built.

    Signed-off-by: Dinh Nguyen
    Tested-by: Kevin Hilman
    Signed-off-by: Olof Johansson

    Dinh Nguyen
     
  • The DTSI file for the Nomadik does not properly specify how the
    PL180 levelshifter is connected: the Nomadik actually needs all
    the five st,sig-dir-* flags set to properly control all lines out.

    Further this board supports full power cycling of the card, and
    since this variant has no hardware clock gating, it needs a
    ridiculously low frequency setting to keep up with the ever
    overflowing FIFO.

    The pin configuration set-up is a bit of a mystery, because of
    course these pins are a mix of inputs and outputs. However the
    reference implementation sets all pins to "output" with
    unspecified initial value, so let's do that here as well.

    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Walleij
    Acked-by: Ulf Hansson
    Signed-off-by: Olof Johansson

    Linus Walleij
     

04 Feb, 2016

2 commits


03 Feb, 2016

1 commit


02 Feb, 2016

6 commits

  • futex.h's futex_atomic_cmpxchg_inatomic() does not use the
    __futex_atomic_op() macro and needs its own PAN toggling. This was missed
    when the feature was implemented.

    Fixes: 338d4f49d6f ("arm64: kernel: Add support for Privileged Access Never")
    Signed-off-by: James Morse
    Signed-off-by: Will Deacon

    James Morse
     
  • The range of set_memory_* is currently restricted to the module address
    range because of difficulties in breaking down larger block sizes.
    vmalloc maps PAGE_SIZE pages so it is safe to use as well. Update the
    function ranges and add a comment explaining why the range is restricted
    the way it is.

    Suggested-by: Laura Abbott
    Acked-by: Mark Rutland
    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Will Deacon

    Ard Biesheuvel
     
  • Fix the code to fetch and decode the whole 32-bit instruction. This
    only really matters with the `noulri' kernel parameter as all microMIPS
    processors are supposed to have all the hardware registers we support.

    Signed-off-by: Maciej W. Rozycki
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/12281/
    Signed-off-by: Ralf Baechle

    Maciej W. Rozycki
     
  • In the regular MIPS instruction set RDHWR is encoded with the SPECIAL3
    (011111) major opcode. Therefore it cannot trigger the CpU (Coprocessor
    Unusable) exception, and certainly not for coprocessor 0, as the opcode
    does not overlap with any of the older ISA reservations, i.e. LWC0
    (110000), SWC0 (111000), LDC0 (110100) or SDC0 (111100). The closest
    match might be SDC3 (111111), possibly causing a CpU #3 exception,
    however our code does not handle it anyway. A quick check with a MIPS I
    and a MIPS III processor:

    CPU0 revision is: 00000220 (R3000)
    CPU0 revision is: 00000440 (R4400SC)

    indeed indicates that the RI (Reserved Instruction) exception is
    triggered. It's only LL and SC that require emulation in the CpU #0
    exception handler as they reuse the LWC0 and SWC0 opcodes respectively.

    In the microMIPS instruction set RDHWR is mandatory and triggering the
    RI exception is required on unimplemented or disabled register accesses.
    Therefore emulating the microMIPS instruction in the CpU #0 exception
    handler is not required either.

    Signed-off-by: Maciej W. Rozycki
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/12280/
    Signed-off-by: Ralf Baechle

    Maciej W. Rozycki
     
  • Pull networking fixes from David Miller:
    "This looks like a lot but it's a mixture of regression fixes as well
    as fixes for longer standing issues.

    1) Fix on-channel cancellation in mac80211, from Johannes Berg.

    2) Handle CHECKSUM_COMPLETE properly in xt_TCPMSS netfilter xtables
    module, from Eric Dumazet.

    3) Avoid infinite loop in UDP SO_REUSEPORT logic, also from Eric
    Dumazet.

    4) Avoid a NULL deref if we try to set SO_REUSEPORT after a socket is
    bound, from Craig Gallek.

    5) GRO key comparisons don't take lightweight tunnels into account,
    from Jesse Gross.

    6) Fix struct pid leak via SCM credentials in AF_UNIX, from Eric
    Dumazet.

    7) We need to set the rtnl_link_ops of ipv6 SIT tunnels before we
    register them, otherwise the NEWLINK netlink message is missing
    the proper attributes. From Thadeu Lima de Souza Cascardo.

    8) Several Spectrum chip bug fixes for mlxsw switch driver, from Ido
    Schimmel

    9) Handle fragments properly in ipv4 easly socket demux, from Eric
    Dumazet.

    10) Don't ignore the ifindex key specifier on ipv6 output route
    lookups, from Paolo Abeni"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (128 commits)
    tcp: avoid cwnd undo after receiving ECN
    irda: fix a potential use-after-free in ircomm_param_request
    net: tg3: avoid uninitialized variable warning
    net: nb8800: avoid uninitialized variable warning
    net: vxge: avoid unused function warnings
    net: bgmac: clarify CONFIG_BCMA dependency
    net: hp100: remove unnecessary #ifdefs
    net: davinci_cpdma: use dma_addr_t for DMA address
    ipv6/udp: use sticky pktinfo egress ifindex on connect()
    ipv6: enforce flowi6_oif usage in ip6_dst_lookup_tail()
    netlink: not trim skb for mmaped socket when dump
    vxlan: fix a out of bounds access in __vxlan_find_mac
    net: dsa: mv88e6xxx: fix port VLAN maps
    fib_trie: Fix shift by 32 in fib_table_lookup
    net: moxart: use correct accessors for DMA memory
    ipv4: ipconfig: avoid unused ic_proto_used symbol
    bnxt_en: Fix crash in bnxt_free_tx_skbs() during tx timeout.
    bnxt_en: Exclude rx_drop_pkts hw counter from the stack's rx_dropped counter.
    bnxt_en: Ring free response from close path should use completion ring
    net_sched: drr: check for NULL pointer in drr_dequeue
    ...

    Linus Torvalds
     
  • Pull crypto fixes from Herbert Xu:
    "This fixes the following issues:

    API:
    - algif_hash needs to wait for init operations to complete.
    - The has_key setting for shash was always true.

    Algorithms:
    - Add missing selections of CRYPTO_HASH.
    - Fix pkcs7 authentication.

    Drivers:
    - Fix stack alignment bug in chacha20-ssse3.
    - Fix performance regression in caam due to incorrect setting.
    - Fix potential compile-only build failure of stm32"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: atmel-aes - remove calls of clk_prepare() from atomic contexts
    crypto: algif_hash - wait for crypto_ahash_init() to complete
    crypto: shash - Fix has_key setting
    hwrng: stm32 - Fix dependencies for !HAS_IOMEM archs
    crypto: ghash,poly1305 - select CRYPTO_HASH where needed
    crypto: chacha20-ssse3 - Align stack pointer to 64 bytes
    PKCS#7: Don't require SpcSpOpusInfo in Authenticode pkcs7 signatures
    crypto: caam - make write transactions bufferable on PPC platforms

    Linus Torvalds