24 Nov, 2015

1 commit

  • Linux 4.4-rc2

    Several PCI media drivers got broken on Kernel 4.4-rc1, due to
    pci_set_dma_mask() regressions. So, we need to add those fixes back
    for the media drivers to work again.

    * tag 'v4.4-rc2': (335 commits)
    Linux 4.4-rc2
    slab/slub: adjust kmem_cache_alloc_bulk API
    slub: add missing kmem cgroup support to kmem_cache_free_bulk
    slub: fix kmem cgroup bug in kmem_cache_alloc_bulk
    slub: optimize bulk slowpath free by detached freelist
    slub: support for bulk free with SLUB freelists
    parisc: Map kernel text and data on huge pages
    parisc: Add Huge Page and HUGETLBFS support
    parisc: Use long branch to do_syscall_trace_exit
    parisc: Increase initial kernel mapping to 32MB on 64bit kernel
    parisc: Initialize the fault vector earlier in the boot process.
    parisc: Add defines for Huge page support
    parisc: Drop unused MADV_xxxK_PAGES flags from asm/mman.h
    serial: export fsl8250_handle_irq
    serial: 8250_mid: Add missing dependency
    tty: audit: Fix audit source
    serial: etraxfs-uart: Fix crash
    serial: fsl_lpuart: Fix earlycon support
    bcm63xx_uart: Use the device name when registering an interrupt
    tty: Fix direct use of tty buffer work
    ...

    Mauro Carvalho Chehab
     

23 Nov, 2015

4 commits

  • Pull USB fixes from Greg KH:
    "Here are a number of USB fixes and new device ids for 4.4-rc2. All
    have been in linux-next and the details are in the shortlog"

    * tag 'usb-4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (28 commits)
    usblp: do not set TASK_INTERRUPTIBLE before lock
    USB: MAINTAINERS: cxacru
    usb: kconfig: fix warning of select USB_OTG
    USB: option: add XS Stick W100-2 from 4G Systems
    xhci: Fix a race in usb2 LPM resume, blocking U3 for usb2 devices
    usb: xhci: fix checking ep busy for CFC
    xhci: Workaround to get Intel xHCI reset working more reliably
    usb: chipidea: imx: fix a possible NULL dereference
    usb: chipidea: usbmisc_imx: fix a possible NULL dereference
    usb: chipidea: otg: gadget module load and unload support
    usb: chipidea: debug: disable usb irq while role switch
    ARM: dts: imx27.dtsi: change the clock information for usb
    usb: chipidea: imx: refine clock operations to adapt for all platforms
    usb: gadget: atmel_usba_udc: Expose correct device speed
    usb: musb: enable usb_dma parameter
    usb: phy: phy-mxs-usb: fix a possible NULL dereference
    usb: dwc3: gadget: let us set lower max_speed
    usb: musb: fix tx fifo flush handling
    usb: gadget: f_loopback: fix the warning during the enumeration
    usb: dwc2: host: Fix remote wakeup when not in DWC2_L2
    ...

    Linus Torvalds
     
  • Pull MIPS fixes from Ralf Baechle:

    - Fix a flood of annoying build warnings

    - A number of fixes for Atheros 79xx platforms

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: ath79: Add a machine entry for booting OF machines
    MIPS: ath79: Fix the size of the MISC INTC registers in ar9132.dtsi
    MIPS: ath79: Fix the DDR control initialization on ar71xx and ar934x
    MIPS: Fix flood of warnings about comparsion being always true.

    Linus Torvalds
     
  • Pull parisc update from Helge Deller:
    "This patchset adds Huge Page and HUGETLBFS support for parisc"

    Honestly, the hugepage support should have gone through in the merge
    window, and is not really an rc-time fix. But it only touches
    arch/parisc, and I cannot find it in myself to care. If one of the
    three parisc users notices a breakage, I will point at Helge and make
    rude farting noises.

    * 'parisc-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Map kernel text and data on huge pages
    parisc: Add Huge Page and HUGETLBFS support
    parisc: Use long branch to do_syscall_trace_exit
    parisc: Increase initial kernel mapping to 32MB on 64bit kernel
    parisc: Initialize the fault vector earlier in the boot process.
    parisc: Add defines for Huge page support
    parisc: Drop unused MADV_xxxK_PAGES flags from asm/mman.h
    parisc: Drop definition of start_thread_som for HP-UX SOM binaries
    parisc: Fix wrong comment regarding first pmd entry flags

    Linus Torvalds
     
  • Pull x86 fixes from Thomas Gleixner:
    "This update contains:

    - MPX updates for handling 32bit processes

    - A fix for a long standing bug in 32bit signal frame handling
    related to FPU/XSAVE state

    - Handle get_xsave_addr() correctly in KVM

    - Fix SMAP check under paravirtualization

    - Add a comment to the static function trace entry to avoid further
    confusion about the difference to dynamic tracing"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/cpu: Fix SMAP check in PVOPS environments
    x86/ftrace: Add comment on static function tracing
    x86/fpu: Fix get_xsave_addr() behavior under virtualization
    x86/fpu: Fix 32-bit signal frame handling
    x86/mpx: Fix 32-bit address space calculation
    x86/mpx: Do proper get_user() when running 32-bit binaries on 64-bit kernels

    Linus Torvalds
     

22 Nov, 2015

7 commits

  • Adjust the linker script and map_pages() to map kernel text and data on
    physical 1MB huge/large pages.

    Signed-off-by: Helge Deller

    Helge Deller
     
  • This patch adds huge page support to allow userspace to allocate huge
    pages and to use hugetlbfs filesystem on 32- and 64-bit Linux kernels.
    A later patch will add kernel support to map kernel text and data on
    huge pages.

    The only requirement is, that the kernel needs to be compiled for a
    PA8X00 CPU (PA2.0 architecture). Older PA1.X CPUs do not support
    variable page sizes. 64bit Kernels are compiled for PA2.0 by default.

    Technically on parisc multiple physical huge pages may be needed to
    emulate standard 2MB huge pages.

    Signed-off-by: Helge Deller

    Helge Deller
     
  • Use the 22bit instead of the 17bit branch instruction on a 64bit kernel
    to reach the do_syscall_trace_exit function from the gateway page.
    A huge page enabled kernel may need the additional branch distance bits.

    Signed-off-by: Helge Deller

    Helge Deller
     
  • For the 64bit kernel the initially 16 MB kernel memory might become too
    small if you build a kernel with many modules built-in and with kernel
    text and data areas mapped on huge pages.

    This patch increases the initial mapping to 32MB for 64bit kernels and
    keeps 16MB for 32bit kernels.

    Signed-off-by: Helge Deller

    Helge Deller
     
  • A fault vector on parisc needs to be 2K aligned. Furthermore the
    checksum of the fault vector needs to sum up to 0 which is being
    calculated and written at runtime.

    Up to now we aligned both PA20 and PA11 fault vectors on the same 4K
    page in order to easily write the checksum after having mapped the
    kernel read-only (by mapping this page only as read-write).
    But when we want to map the kernel text and data on huge pages this
    makes things harder.
    So, simplify it by aligning both fault vectors on 2K boundries and write
    the checksum before we map the page read-only.

    Signed-off-by: Helge Deller

    Helge Deller
     
  • Huge pages on parisc will have the same size as one pmd table, which
    is on a 64bit kernel 2MB on a kernel with 4K kernel page sizes, and
    on a 32bit kernel 4MB when used with 4K kernel pages.

    Since parisc does not physically supports 2MB huge page sizes, emulate
    it with two consecutive 1MB page sizes instead. Keeping the same huge
    page size as one pmd will allow us to add transparent huge page support
    later on.

    Bit 21 in the pte flags was unused and will now be used to mark a page
    as huge page (_PAGE_HPAGE_BIT).

    Signed-off-by: Helge Deller

    Helge Deller
     
  • Drop the MADV_xxK_PAGES flags, which were never used and were from a proposed
    API which was never integrated into the generic Linux kernel code.

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

    Helge Deller
     

21 Nov, 2015

2 commits

  • Pull more power management and ACPI updates from Rafael Wysocki:
    "These are mostly fixes and cleanups (ACPI core, PM core, cpufreq, ACPI
    EC driver, device properties) including three reverts of recent
    intel_pstate driver commits due to a regression introduced by one of
    them plus support for Atom Airmont cores in intel_pstate (which really
    boils down to adding new frequency tables for Airmont) and additional
    turbostat updates.

    Specifics:

    - Revert three recent intel_pstate driver commits one of which
    introduced a regression and the remaining two depend on the
    problematic one (Rafael Wysocki).

    - Fix breakage related to the recently introduced ACPI _CCA object
    support in the PCI DMA setup code (Suravee Suthikulpanit).

    - Fix up the recently introduced ACPI CPPC support to only use the
    hardware-reduced version of the PCCT structure as the only
    architecture to support it (ARM64) will only use hardware-reduced
    ACPI anyway (Ashwin Chaugule).

    - Fix a cpufreq mediatek driver build problem (Arnd Bergmann).

    - Fix the SMBus transaction handling implementation in the ACPI core
    to avoid re-entrant calls to wait_event_timeout() which makes
    intermittent boot stalls related to the Smart Battery Subsystem
    initialization go away and revert a workaround of another problem
    with the same underlying root cause (Chris Bainbridge).

    - Fix the generic wakeup interrupts framework to avoid using invalid
    IRQ numbers (Dmitry Torokhov).

    - Remove a redundant check from the ACPI EC driver (Markus Elfring).

    - Modify the intel_pstate driver so it can support more Atom flavors
    than just one (Baytrail) and add support for Atom Airmont cores
    (which require new freqnency tables) to it (Philippe Longepe).

    - Clean up MSR-related symbols in turbostat (Len Brown)"

    * tag 'pm+acpi-4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    PCI: Fix OF logic in pci_dma_configure()
    Revert "Documentation: kernel_parameters for Intel P state driver"
    cpufreq: mediatek: fix build error
    cpufreq: intel_pstate: Add separate support for Airmont cores
    cpufreq: intel_pstate: Replace BYT with ATOM
    Revert "cpufreq: intel_pstate: Use ACPI perf configuration"
    Revert "cpufreq: intel_pstate: Avoid calculation for max/min"
    ACPI-EC: Drop unnecessary check made before calling acpi_ec_delete_query()
    Revert "ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook"
    ACPI / SMBus: Fix boot stalls / high CPU caused by reentrant code
    PM / wakeirq: check that wake IRQ is valid before accepting it
    ACPI / CPPC: Use h/w reduced version of the PCCT structure
    x86: remove unused definition of MSR_NHM_PLATFORM_INFO
    tools/power turbostat: use new name for MSR_PLATFORM_INFO

    Linus Torvalds
     
  • Pull powerpc fixlet from Michael Ellerman:
    "Wire up sys_mlock2()"

    * tag 'powerpc-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    powerpc: Wire up sys_mlock2()

    Linus Torvalds
     

20 Nov, 2015

7 commits

  • As I'm using a board with a broken old bootloader I hardcoded the
    mips_machtype and did't notice that the machine entry was still
    missing.

    [ralf@linux-mips.org: Fixed spelling message noticed by Sergei Shtylyov
    .]

    Signed-off-by: Alban Bedel
    Cc: Qais Yousef
    Cc: Felix Fietkau
    Cc: Andrew Bresticker
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/11503/
    Signed-off-by: Ralf Baechle

    Alban Bedel
     
  • There is 2 registers that is 8 bytes long, not 4.

    Signed-off-by: Alban Bedel
    Cc: Thomas Gleixner
    Cc: Jason Cooper
    Cc: Marc Zyngier
    Cc: Alexander Couzens
    Cc: Joel Porquet
    Cc: Andrew Bresticker
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/11508/
    Signed-off-by: Ralf Baechle

    Alban Bedel
     
  • The DDR control initialization needs to know the SoC type, however
    ath79_detect_sys_type() was called after ath79_ddr_ctrl_init().
    Reverse the order to fix the DDR control initialization on ar71xx and
    ar934x.

    Signed-off-by: Alban Bedel
    Cc: Felix Fietkau
    Cc: Qais Yousef
    Cc: Andrew Bresticker
    CC: stable@vger.kernel.org # v4.2+
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/11500/
    Signed-off-by: Ralf Baechle

    Alban Bedel
     
  • The definition of start_thread_som was planned to be used to execute
    HP-UX SOM binaries. Since HP-UX compatibility was dropped with kernel 4.0
    there is no need to carry it further.

    Signed-off-by: Helge Deller

    Helge Deller
     
  • The first pmd entry is marked with PxD_FLAG_ATTACHED instead of
    _PAGE_GATEWAY.

    Signed-off-by: Helge Deller

    Helge Deller
     
  • Pull arm64 fixes from Catalin Marinas:

    - Fix size alignment in __iommu_{alloc,free}_attrs

    - Kernel memory mapping fix with CONFIG_DEBUG_RODATA for page sizes
    other than 4KB and a fix of the mark_rodata_ro permissions

    - dma_get_ops() simplification and behaviour alignment between DT and
    ACPI

    - function_graph trace fix for cpu_suspend() (CPUs returning from deep
    sleep via a different path and confusing the tracer)

    - Use of non-global mappings for UEFI run-time services to avoid a
    (potentially theoretical) TLB conflict

    - Crypto priority reduction of core AES cipher (the accelerated
    asynchronous implementation is preferred when available)

    - Reverting an old commit that removed BogoMIPS from /proc/cpuinfo on
    arm64. Apparently, we had it for a relatively short time and libvirt
    started checking for its presence

    - Compiler warnings fixed (ptrace.h inclusion from compat.h,
    smp_load_acquire with const argument)

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: restore bogomips information in /proc/cpuinfo
    arm64: barriers: fix smp_load_acquire to work with const arguments
    arm64: Fix R/O permissions in mark_rodata_ro
    arm64: crypto: reduce priority of core AES cipher
    arm64: use non-global mappings for UEFI runtime regions
    arm64: kernel: pause/unpause function graph tracer in cpu_suspend()
    arm64: do not include ptrace.h from compat.h
    arm64: simplify dma_get_ops
    arm64: mm: use correct mapping granularity under DEBUG_RODATA
    arm64/dma-mapping: Fix sizes in __iommu_{alloc,free}_attrs

    Linus Torvalds
     
  • As previously reported, some userspace applications depend on bogomips
    showed by /proc/cpuinfo. Although there is much less legacy impact on
    aarch64 than arm, it does break libvirt.

    This patch reverts commit 326b16db9f69 ("arm64: delay: don't bother
    reporting bogomips in /proc/cpuinfo"), but with some tweak due to
    context change and without the pr_info().

    Fixes: 326b16db9f69 ("arm64: delay: don't bother reporting bogomips in /proc/cpuinfo")
    Signed-off-by: Yang Shi
    Acked-by: Will Deacon
    Cc: # 3.12+
    Signed-off-by: Catalin Marinas

    Yang Shi
     

19 Nov, 2015

5 commits

  • Now that media has its own subdirectory inside platform_data,
    let's move the headers that are already there to such subdir.

    After moving those files, the references were adjusted using this
    script:

    MAIN_DIR="linux/platform_data/"
    PREV_DIR="linux/platform_data/"
    DIRS="media/"

    echo "Checking affected files" >&2
    for i in $DIRS; do
    for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
    n=`basename $j`
    git grep -l $n
    done
    done|sort|uniq >files && (
    echo "Handling files..." >&2;
    echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
    (
    cd include/$MAIN_DIR;
    for j in $DIRS; do
    for i in $(ls $j); do
    echo "perl -ne 's,(include [\\\"\\&2;
    echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
    (
    cd include/$MAIN_DIR;
    for j in $DIRS; do
    for i in $(ls $j); do
    echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
    done;
    done;
    echo "cat > a && mv a \$i; done"
    );
    ) >script && . ./script

    Suggested-by: Arnd Bergmann
    Acked-by: Arnd Bergmann
    Acked-by: Mark Brown
    Acked-by: Robert Jarzmik
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • There appears to be no formal statement of what pv_irq_ops.save_fl() is
    supposed to return precisely. Native returns the full flags, while lguest and
    Xen only return the Interrupt Flag, and both have comments by the
    implementations stating that only the Interrupt Flag is looked at. This may
    have been true when initially implemented, but no longer is.

    To make matters worse, the Xen PVOP leaves the upper bits undefined, making
    the BUG_ON() undefined behaviour. Experimentally, this now trips for 32bit PV
    guests on Broadwell hardware. The BUG_ON() is consistent for an individual
    build, but not consistent for all builds. It has also been a sitting timebomb
    since SMAP support was introduced.

    Use native_save_fl() instead, which will obtain an accurate view of the AC
    flag.

    Signed-off-by: Andrew Cooper
    Reviewed-by: David Vrabel
    Tested-by: Rusty Russell
    Cc: Rusty Russell
    Cc: Konrad Rzeszutek Wilk
    Cc: Boris Ostrovsky
    Cc:
    Cc: Xen-devel
    CC: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/1433323874-6927-1-git-send-email-andrew.cooper3@citrix.com
    Signed-off-by: Thomas Gleixner

    Andrew Cooper
     
  • There was a confusion between update_ftrace_function() and static
    function tracing trampoline regarding 3rd parameter (ftrace_ops).
    Add a comment for clarification.

    Suggested-by: Steven Rostedt
    Signed-off-by: Namhyung Kim
    Cc: H. Peter Anvin
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1447721004-2551-1-git-send-email-namhyung@kernel.org
    Signed-off-by: Thomas Gleixner

    Namhyung Kim
     
  • A newly introduced function in include/net/sock.h passes a const
    argument to smp_load_acquire:

    static inline int sk_state_load(const struct sock *sk)
    {
    return smp_load_acquire(&sk->sk_state);
    }

    This cause an allmodconfig build failure, since our underlying
    load-acquire implementation does not handle const types correctly:

    include/net/sock.h: In function 'sk_state_load':
    ./arch/arm64/include/asm/barrier.h:71:3: error: read-only variable '___p1' used as 'asm' output
    asm volatile ("ldarb %w0, %1" \

    This patch fixes the problem by reusing the trick in READ_ONCE that
    loads via a non-const member of an anonymous union. This has the
    advantage of allowing us to use smp_load_acquire on packed structures
    (e.g. arch_spinlock_t) as well as primitive types.

    Cc: Arnd Bergmann
    Cc: David Daney
    Cc: Eric Dumazet
    Reported-by: Arnd Bergmann
    Reported-by: David Daney
    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon
     
  • Pull s390 fixes from Martin Schwidefsky:
    "Assorted bug fixes, the mlock2 system call gets added, and one
    improvement. The boot from dasd devices is now possible from a wider
    range of devices"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390: remove SALIPL loader
    s390: wire up mlock2 system call
    s390: remove g5 elf platform support
    s390: avoid cache aliasing under z/VM and KVM
    s390/sclp: _sclp_wait_int(): retain full PSW mask
    s390/zcrypt: Fix initialisation when zcrypt is built-in
    s390/zcrypt: Fix kernel crash on systems without AP bus support
    s390: add support for ipl devices in subchannel sets > 0
    s390/ipl: fix out of bounds access in scpdata_write
    s390/pci_dma: improve debugging of errors during dma map
    s390/pci_dma: handle dma table failures
    s390/pci_dma: unify label of invalid translation table entries
    s390/syscalls: remove system call number calculation
    s390/cio: simplify css_generate_pgid
    s390/diag: add a s390 prefix to the diagnose trace point
    s390/head: fix error message on unsupported hardware

    Linus Torvalds
     

18 Nov, 2015

10 commits

  • reset-gpios is more clear than rst-gpio.

    This change has been done as one atomic commit but it
    does breaks compatability with older dtbs.

    Signed-off-by: Peter Griffin
    Acked-by: Lee Jones
    Signed-off-by: Mauro Carvalho Chehab

    Peter Griffin
     
  • This patch adds in the required DT node for the c8sectpfe
    Linux DVB demux driver which allows the tsin channels
    to be used on an upstream kernel.

    Signed-off-by: Peter Griffin
    Acked-by: Lee Jones
    Signed-off-by: Mauro Carvalho Chehab

    Peter Griffin
     
  • Adding these properties makes the I2C bus to the demodulators much
    more reliable, and we no longer suffer from I2C errors when tuning.

    Signed-off-by: Peter Griffin
    Acked-by: Lee Jones
    Signed-off-by: Mauro Carvalho Chehab

    Peter Griffin
     
  • The permissions in mark_rodata_ro trigger a build error
    with STRICT_MM_TYPECHECKS. Fix this by introducing
    PAGE_KERNEL_ROX for the same reasons as PAGE_KERNEL_RO.
    From Ard:

    "PAGE_KERNEL_EXEC has PTE_WRITE set as well, making the range
    writeable under the ARMv8.1 DBM feature, that manages the
    dirty bit in hardware (writing to a page with the PTE_RDONLY
    and PTE_WRITE bits both set will clear the PTE_RDONLY bit in that case)"

    Signed-off-by: Laura Abbott
    Acked-by: Ard Biesheuvel
    Signed-off-by: Catalin Marinas

    Laura Abbott
     
  • The asynchronous, merged implementations of AES in CBC, CTR and XTS
    modes are preferred when available (i.e., when instantiating ablkciphers
    explicitly). However, the synchronous core AES cipher combined with the
    generic CBC mode implementation will produce a 'cbc(aes)' blkcipher that
    is callable asynchronously as well. To prevent this implementation from
    being used when the accelerated asynchronous implemenation is also
    available, lower its priority to 250 (i.e., below the asynchronous
    module's priority of 300).

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

    Ard Biesheuvel
     
  • As pointed out by Russell King in response to the proposed ARM version
    of this code, the sequence to switch between the UEFI runtime mapping
    and current's actual userland mapping (and vice versa) is potentially
    unsafe, since it leaves a time window between the switch to the new
    page tables and the TLB flush where speculative accesses may hit on
    stale global TLB entries.

    So instead, use non-global mappings, and perform the switch via the
    ordinary ASID-aware context switch routines.

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

    Ard Biesheuvel
     
  • For imx27, it needs three clocks to let the controller work,
    the old code is wrong, and usbmisc has not included clock handling
    code any more. Without this patch, it will cause below data
    abort when accessing usbmisc registers.

    usbcore: registered new interface driver usb-storage
    Unhandled fault: external abort on non-linefetch (0x008) at 0xf4424600
    pgd = c0004000
    [f4424600] *pgd=10000452(bad)
    Internal error: : 8 [#1] PREEMPT ARM
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper Not tainted 4.1.0-next-20150701-dirty #3089
    Hardware name: Freescale i.MX27 (Device Tree Support)
    task: c7832b60 ti: c783e000 task.ti: c783e000
    PC is at usbmisc_imx27_init+0x4c/0xbc
    LR is at usbmisc_imx27_init+0x40/0xbc
    pc : [] lr : [] psr: 60000093
    sp : c783fe08 ip : 00000000 fp : 00000000
    r10: c0576434 r9 : 0000009c r8 : c7a773a0
    r7 : 01000000 r6 : 60000013 r5 : c7a776f0 r4 : c7a773f0
    r3 : f4424600 r2 : 00000000 r1 : 00000001 r0 : 00000001
    Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
    Control: 0005317f Table: a0004000 DAC: 00000017
    Process swapper (pid: 1, stack limit = 0xc783e190)
    Stack: (0xc783fe08 to 0xc7840000)

    Signed-off-by: Peter Chen
    Reported-by: Fabio Estevam
    Tested-by: Fabio Estevam
    Cc: #v4.1+
    Acked-by: Shawn Guo

    Peter Chen
     
  • Pull networking fixes from David Miller:

    1) Fix list tests in netfilter ingress support, from Florian Westphal.

    2) Fix reversal of input and output interfaces in ingress hook
    invocation, from Pablo Neira Ayuso.

    3) We have a use after free in r8169, caught by Dave Jones, fixed by
    Francois Romieu.

    4) Splice use-after-free fix in AF_UNIX frmo Hannes Frederic Sowa.

    5) Three ipv6 route handling bug fixes from Martin KaFai Lau:
    a) Don't create clone routes not managed by the fib6 tree
    b) Don't forget to check expiration of DST_NOCACHE routes.
    c) Handle rt->dst.from == NULL properly.

    6) Several AF_PACKET fixes wrt transport header setting and SKB
    protocol setting, from Daniel Borkmann.

    7) Fix thunder driver crash on shutdown, from Pavel Fedin.

    8) Several Mellanox driver fixes (max MTU calculations, use of correct
    DMA unmap in TX path, etc.) from Saeed Mahameed, Tariq Toukan, Doron
    Tsur, Achiad Shochat, Eran Ben Elisha, and Noa Osherovich.

    9) Several mv88e6060 DSA driver fixes (wrong bit definitions for
    certain registers, etc.) from Neil Armstrong.

    10) Make sure to disable preemption while updating per-cpu stats of ip
    tunnels, from Jason A. Donenfeld.

    11) Various ARM64 bpf JIT fixes, from Yang Shi.

    12) Flush icache properly in ARM JITs, from Daniel Borkmann.

    13) Fix masking of RX and TX interrupts in ravb driver, from Masaru
    Nagai.

    14) Fix netdev feature propagation for devices not implementing
    ->ndo_set_features(). From Nikolay Aleksandrov.

    15) Big endian fix in vmxnet3 driver, from Shrikrishna Khare.

    16) RAW socket code increments incorrect SNMP counters, fix from Ben
    Cartwright-Cox.

    17) IPv6 multicast SNMP counters are bumped twice, fix from Neil Horman.

    18) Fix handling of VLAN headers on stacked devices when REORDER is
    disabled. From Vlad Yasevich.

    19) Fix SKB leaks and use-after-free in ipvlan and macvlan drivers, from
    Sabrina Dubroca.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (83 commits)
    MAINTAINERS: Update Mellanox's Eth NIC driver entries
    net/core: revert "net: fix __netdev_update_features return.." and add comment
    af_unix: take receive queue lock while appending new skb
    rtnetlink: fix frame size warning in rtnl_fill_ifinfo
    net: use skb_clone to avoid alloc_pages failure.
    packet: Use PAGE_ALIGNED macro
    packet: Don't check frames_per_block against negative values
    net: phy: Use interrupts when available in NOLINK state
    phy: marvell: Add support for 88E1540 PHY
    arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS
    macvlan: fix leak in macvlan_handle_frame
    ipvlan: fix use after free of skb
    ipvlan: fix leak in ipvlan_rcv_frame
    vlan: Do not put vlan headers back on bridge and macvlan ports
    vlan: Fix untag operations of stacked vlans with REORDER_HEADER off
    via-velocity: unconditionally drop frames with bad l2 length
    ipg: Remove ipg driver
    dl2k: Add support for IP1000A-based cards
    snmp: Remove duplicate OUTMCAST stat increment
    net: thunder: Check for driver data in nicvf_remove()
    ...

    Linus Torvalds
     
  • Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP
    in prologue in order to get the correct stack backtrace.

    However, ARM64 JIT used FP (x29) as eBPF fp register, FP is subjected to
    change during function call so it may cause the BPF prog stack base address
    change too.

    Use x25 to replace FP as BPF stack base register (fp). Since x25 is callee
    saved register, so it will keep intact during function call.
    It is initialized in BPF prog prologue when BPF prog is started to run
    everytime. Save and restore x25/x26 in BPF prologue and epilogue to keep
    them intact for the outside of BPF. Actually, x26 is unnecessary, but SP
    requires 16 bytes alignment.

    So, the BPF stack layout looks like:

    high
    original A64_SP => 0:+-----+ BPF prologue
    |FP/LR|
    current A64_FP => -16:+-----+
    | ... | callee saved registers
    +-----+
    | | x25/x26
    BPF fp register => -80:+-----+
    | |
    | ... | BPF prog stack
    | |
    | |
    current A64_SP => +-----+
    | |
    | ... | Function call stack
    | |
    +-----+
    low

    CC: Zi Shen Lim
    CC: Xi Wang
    Signed-off-by: Yang Shi
    Acked-by: Zi Shen Lim
    Signed-off-by: David S. Miller

    Yang Shi
     
  • The function graph tracer adds instrumentation that is required to trace
    both entry and exit of a function. In particular the function graph
    tracer updates the "return address" of a function in order to insert
    a trace callback on function exit.

    Kernel power management functions like cpu_suspend() are called
    upon power down entry with functions called "finishers" that are in turn
    called to trigger the power down sequence but they may not return to the
    kernel through the normal return path.

    When the core resumes from low-power it returns to the cpu_suspend()
    function through the cpu_resume path, which leaves the trace stack frame
    set-up by the function tracer in an incosistent state upon return to the
    kernel when tracing is enabled.

    This patch fixes the issue by pausing/resuming the function graph
    tracer on the thread executing cpu_suspend() (ie the function call that
    subsequently triggers the "suspend finishers"), so that the function graph
    tracer state is kept consistent across functions that enter power down
    states and never return by effectively disabling graph tracer while they
    are executing.

    Fixes: 819e50e25d0c ("arm64: Add ftrace support")
    Signed-off-by: Lorenzo Pieralisi
    Reported-by: Catalin Marinas
    Reported-by: AKASHI Takahiro
    Suggested-by: Steven Rostedt
    Acked-by: Steven Rostedt
    Cc: Will Deacon
    Cc: # 3.16+
    Signed-off-by: Catalin Marinas

    Lorenzo Pieralisi
     

17 Nov, 2015

4 commits

  • including ptrace.h brings a definition of BITS_PER_PAGE into device
    drivers and cause a build warning in allmodconfig builds:

    drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined
    #define BITS_PER_PAGE (1UL << (PAGE_SHIFT + 3))

    This uses a slightly different way to express current_pt_regs()
    that avoids the use of the header and gets away with the already
    included asm/ptrace.h.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Catalin Marinas

    Arnd Bergmann
     
  • Including linux/acpi.h from asm/dma-mapping.h causes tons of compile-time
    warnings, e.g.

    drivers/isdn/mISDN/dsp_ecdis.h:43:0: warning: "FALSE" redefined
    drivers/isdn/mISDN/dsp_ecdis.h:44:0: warning: "TRUE" redefined
    drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
    drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined

    However, it looks like the dependency should not even there as
    I do not see why __generic_dma_ops() cares about whether we have
    an ACPI based system or not.

    The current behavior is to fall back to the global dma_ops when
    a device has not set its own dma_ops, but only for DT based systems.
    This seems dangerous, as a random device might have different
    requirements regarding IOMMU or coherency, so we should really
    never have that fallback and just forbid DMA when we have not
    initialized DMA for a device.

    This removes the global dma_ops variable and the special-casing
    for ACPI, and just returns the dma ops that got set for the
    device, or the dummy_dma_ops if none were present.

    The original code has apparently been copied from arm32 where we
    rely on it for ISA devices things like the floppy controller, but
    we should have no such devices on ARM64.

    Signed-off-by: Arnd Bergmann
    [catalin.marinas@arm.com: removed acpi_disabled check in arch_setup_dma_ops()]
    Signed-off-by: Catalin Marinas

    Arnd Bergmann
     
  • When booting a 64k pages kernel that is built with CONFIG_DEBUG_RODATA
    and resides at an offset that is not a multiple of 512 MB, the rounding
    that occurs in __map_memblock() and fixup_executable() results in
    incorrect regions being mapped.

    The following snippet from /sys/kernel/debug/kernel_page_tables shows
    how, when the kernel is loaded 2 MB above the base of DRAM at 0x40000000,
    the first 2 MB of memory (which may be inaccessible from non-secure EL1
    or just reserved by the firmware) is inadvertently mapped into the end of
    the module region.

    ---[ Modules start ]---
    0xfffffdffffe00000-0xfffffe0000000000 2M RW NX ... UXN MEM/NORMAL
    ---[ Modules end ]---
    ---[ Kernel Mapping ]---
    0xfffffe0000000000-0xfffffe0000090000 576K RW NX ... UXN MEM/NORMAL
    0xfffffe0000090000-0xfffffe0000200000 1472K ro x ... UXN MEM/NORMAL
    0xfffffe0000200000-0xfffffe0000800000 6M ro x ... UXN MEM/NORMAL
    0xfffffe0000800000-0xfffffe0000810000 64K ro x ... UXN MEM/NORMAL
    0xfffffe0000810000-0xfffffe0000a00000 1984K RW NX ... UXN MEM/NORMAL
    0xfffffe0000a00000-0xfffffe00ffe00000 4084M RW NX ... UXN MEM/NORMAL

    The same issue is likely to occur on 16k pages kernels whose load
    address is not a multiple of 32 MB (i.e., SECTION_SIZE). So round to
    SWAPPER_BLOCK_SIZE instead of SECTION_SIZE.

    Fixes: da141706aea5 ("arm64: add better page protections to arm64")
    Signed-off-by: Ard Biesheuvel
    Acked-by: Mark Rutland
    Acked-by: Laura Abbott
    Cc: # 4.0+
    Signed-off-by: Catalin Marinas

    Ard Biesheuvel
     
  • Let's not mix platform_data headers with the core headers. Instead, let's
    create a subdir at linux/platform_data and move the headers to that
    common place, adding it to MAINTAINERS.

    The headers were moved with:
    mkdir include/linux/platform_data/media/; git mv include/media/gpio-ir-recv.h include/media/ir-rx51.h include/media/mmp-camera.h include/media/omap1_camera.h include/media/omap4iss.h include/media/s5p_hdmi.h include/media/si4713.h include/media/sii9234.h include/media/smiapp.h include/media/soc_camera.h include/media/soc_camera_platform.h include/media/timb_radio.h include/media/timb_video.h include/linux/platform_data/media/

    And the references fixed with this script:
    MAIN_DIR="linux/platform_data/"
    PREV_DIR="media/"
    DIRS="media/"

    echo "Checking affected files" >&2
    for i in $DIRS; do
    for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
    n=`basename $j`
    git grep -l $n
    done
    done|sort|uniq >files && (
    echo "Handling files..." >&2;
    echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
    (
    cd include/$MAIN_DIR;
    for j in $DIRS; do
    for i in $(ls $j); do
    echo "perl -ne 's,(include [\\\"\\&2;
    echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
    (
    cd include/$MAIN_DIR;
    for j in $DIRS; do
    for i in $(ls $j); do
    echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
    done;
    done;
    echo "cat > a && mv a \$i; done"
    );
    ) >script && . ./script

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Arnd Bergmann
    Acked-by: Lee Jones
    Acked-by: Krzysztof Kozlowski

    Mauro Carvalho Chehab