12 Jan, 2015

2 commits

  • Pull x86 fixes from Ingo Molnar:
    "Misc fixes: two vdso fixes, two kbuild fixes and a boot failure fix
    with certain odd memory mappings"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, vdso: Use asm volatile in __getcpu
    x86/build: Clean auto-generated processor feature files
    x86: Fix mkcapflags.sh bash-ism
    x86: Fix step size adjustment during initial memory mapping
    x86_64, vdso: Fix the vdso address randomization algorithm

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "Mostly tooling fixes, but also some kernel side fixes: uncore PMU
    driver fix, user regs sampling fix and an instruction decoder fix that
    unbreaks PEBS precise sampling"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86/uncore/hsw-ep: Handle systems with only two SBOXes
    perf/x86_64: Improve user regs sampling
    perf: Move task_pt_regs sampling into arch code
    x86: Fix off-by-one in instruction decoder
    perf hists browser: Fix segfault when showing callchain
    perf callchain: Free callchains when hist entries are deleted
    perf hists: Fix children sort key behavior
    perf diff: Fix to sort by baseline field by default
    perf list: Fix --raw-dump option
    perf probe: Fix crash in dwarf_getcfi_elf
    perf probe: Fix to fall back to find probe point in symbols
    perf callchain: Append callchains only when requested
    perf ui/tui: Print backtrace symbols when segfault occurs
    perf report: Show progress bar for output resorting

    Linus Torvalds
     

10 Jan, 2015

2 commits

  • Pull arm64 fixes from Will Deacon:
    "Here is a handful of minor arm64 fixes discovered and fixed over the
    Christmas break. The main part is adding some missing #includes that
    we seem to be getting transitively but have started causing problems
    in -next.

    - Fix early mapping fixmap corruption by EFI runtime services
    - Fix __NR_compat_syscalls off-by-one
    - Add missing sanity checks for some 32-bit registers
    - Add some missing #includes which we get transitively
    - Remove unused prepare_to_copy() macro"

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64/efi: add missing call to early_ioremap_reset()
    arm64: fix missing asm/io.h include in kernel/smp_spin_table.c
    arm64: fix missing asm/alternative.h include in kernel/module.c
    arm64: fix missing linux/bug.h include in asm/arch_timer.h
    arm64: fix missing asm/pgtable-hwdef.h include in asm/processor.h
    arm64: sanity checks: add missing AArch32 registers
    arm64: Remove unused prepare_to_copy()
    arm64: Correct __NR_compat_syscalls for bpf

    Linus Torvalds
     
  • Merge misc fixes from Andrew Morton:
    "12 fixes"

    * emailed patches from Andrew Morton :
    mm, vmscan: prevent kswapd livelock due to pfmemalloc-throttled process being killed
    memcg: fix destination cgroup leak on task charges migration
    mm: memcontrol: switch soft limit default back to infinity
    mm/debug_pagealloc: remove obsolete Kconfig options
    vfs: renumber FMODE_NONOTIFY and add to uniqueness check
    arch/blackfin/mach-bf533/boards/stamp.c: add linux/delay.h
    ocfs2: fix the wrong directory passed to ocfs2_lookup_ino_from_name() when link file
    MAINTAINERS: update rydberg's addresses
    mm: protect set_page_dirty() from ongoing truncation
    mm: prevent endless growth of anon_vma hierarchy
    exit: fix race between wait_consider_task() and wait_task_zombie()
    ocfs2: remove bogus check in dlm_process_recovery_data

    Linus Torvalds
     

09 Jan, 2015

7 commits

  • There was another report of a boot failure with a #GP fault in the
    uncore SBOX initialization. The earlier work around was not enough
    for this system.

    The boot was failing while trying to initialize the third SBOX.

    This patch detects parts with only two SBOXes and limits the number
    of SBOX units to two there.

    Stable material, as it affects boot problems on 3.18.

    Tested-by: Andreas Oehler
    Signed-off-by: Andi Kleen
    Signed-off-by: Peter Zijlstra (Intel)
    Cc:
    Cc: Arnaldo Carvalho de Melo
    Cc: Stephane Eranian
    Cc: Yan, Zheng
    Link: http://lkml.kernel.org/r/1420583675-9163-1-git-send-email-andi@firstfloor.org
    Signed-off-by: Ingo Molnar

    Andi Kleen
     
  • Perf reports user regs for kernel-mode samples so that samples can
    be backtraced through user code. The old code was very broken in
    syscall context, resulting in useless backtraces.

    The new code, in contrast, is still dangerously racy, but it should
    at least work most of the time.

    Tested-by: Jiri Olsa
    Signed-off-by: Andy Lutomirski
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Stephane Eranian
    Cc: Andrew Morton
    Cc: chenggang.qcg@taobao.com
    Cc: Wu Fengguang
    Cc: Namhyung Kim
    Cc: Mike Galbraith
    Cc: Arjan van de Ven
    Cc: David Ahern
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/r/243560c26ff0f739978e2459e203f6515367634d.1420396372.git.luto@amacapital.net
    Signed-off-by: Ingo Molnar

    Andy Lutomirski
     
  • On x86_64, at least, task_pt_regs may be only partially initialized
    in many contexts, so x86_64 should not use it without extra care
    from interrupt context, let alone NMI context.

    This will allow x86_64 to override the logic and will supply some
    scratch space to use to make a cleaner copy of user regs.

    Tested-by: Jiri Olsa
    Signed-off-by: Andy Lutomirski
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Stephane Eranian
    Cc: chenggang.qcg@taobao.com
    Cc: Wu Fengguang
    Cc: Namhyung Kim
    Cc: Mike Galbraith
    Cc: Arjan van de Ven
    Cc: David Ahern
    Cc: Arnaldo Carvalho de Melo
    Cc: Catalin Marinas
    Cc: Jean Pihet
    Cc: Linus Torvalds
    Cc: Mark Salter
    Cc: Russell King
    Cc: Will Deacon
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/e431cd4c18c2e1c44c774f10758527fb2d1025c4.1420396372.git.luto@amacapital.net
    Signed-off-by: Ingo Molnar

    Andy Lutomirski
     
  • Stephane reported that the PEBS fixup was broken by the recent commit to
    the instruction decoder. The thing had an off-by-one which resulted in
    not being able to decode the last instruction and always bail.

    Reported-by: Stephane Eranian
    Fixes: 6ba48ff46f76 ("x86: Remove arbitrary instruction size limit in instruction decoder")
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: stable@vger.kernel.org # 3.18
    Cc:
    Cc: Jiri Olsa
    Cc: Liang Kan
    Cc: Arnaldo Carvalho de Melo
    Cc: Dave Hansen
    Cc: Jim Keniston
    Cc: Linus Torvalds
    Cc: Masami Hiramatsu
    Link: http://lkml.kernel.org/r/20141216104614.GV3337@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • build error

    arch/blackfin/mach-bf533/boards/stamp.c:834:2: error: implicit declaration of function 'mdelay'

    Signed-off-by: Oleg Nesterov
    Reported-by: Wu Fengguang
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Pull power management and ACPI fixes from Rafael Wysocki:
    "These are an ACPI device power management initialization fix (-stable
    material), two commits renaming stuff in the ACPI processor driver to
    make it more suitable for ARM64 processors and a new ACPI backlight
    blacklist entry.

    Specifics:

    - Fix ACPI power management intialization for device objects
    corresponding to devices that are not present at the init time (the
    _STA control method returns 0 for them) and therefore should not be
    regarded as power manageable (Rafael J Wysocki).

    - Rename a structure field and two functions used by the ACPI
    processor driver to make them less tied to architectures that use
    APICs (both x86 and ia64) and more suitable for ARM64 processors
    (Hanjun Guo).

    - Add a disable_native_backlight quirk for Dell XPS15 L521X designed
    in an unusual way preventing native backlight from working on that
    machine (Hans de Goede)"

    * tag 'pm+acpi-3.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI / video: Add disable_native_backlight quirk for Dell XPS15 L521X
    ACPI / processor: Rename acpi_(un)map_lsapic() to acpi_(un)map_cpu()
    ACPI / processor: Convert apic_id to phys_id to make it arch agnostic
    ACPI / PM: Fix PM initialization for devices that are not present

    Linus Torvalds
     
  • Pull crypto fixes from Herbert Xu:
    "This fixes a build problem with sha-mb with old toolchains and an
    implementation bug in the ctr(aes)/by8 branch of aesni-intel that's
    enabled when AVX is available"

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: sha-mb - Add avx2_supported check.
    crypto: aesni - fix "by8" variant for 128 bit keys

    Linus Torvalds
     

08 Jan, 2015

1 commit

  • The early ioremap support introduced by patch bf4b558eba92
    ("arm64: add early_ioremap support") failed to add a call to
    early_ioremap_reset() at an appropriate time. Without this call,
    invocations of early_ioremap etc. that are done too late will go
    unnoticed and may cause corruption.

    This is exactly what happened when the first user of this feature
    was added in patch f84d02755f5a ("arm64: add EFI runtime services").
    The early mapping of the EFI memory map is unmapped during an early
    initcall, at which time the early ioremap support is long gone.

    Fix by adding the missing call to early_ioremap_reset() to
    setup_arch(), and move the offending early_memunmap() to right after
    the point where the early mapping of the EFI memory map is last used.

    Fixes: f84d02755f5a ("arm64: add EFI runtime services")
    Cc:
    Signed-off-by: Leif Lindholm
    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Will Deacon

    Ard Biesheuvel
     

07 Jan, 2015

8 commits

  • On next-20150105, defconfig compilation breaks with:

    arch/arm64/kernel/smp_spin_table.c:80:2: error: implicit declaration of function ‘ioremap_cache’ [-Werror=implicit-function-declaration]
    arch/arm64/kernel/smp_spin_table.c:92:2: error: implicit declaration of function ‘writeq_relaxed’ [-Werror=implicit-function-declaration]
    arch/arm64/kernel/smp_spin_table.c:101:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]

    Fix by including asm/io.h, which contains definitions or prototypes
    for these macros or functions.

    This second version incorporates a comment from Mark Rutland
    to keep the includes in alphabetical order
    by filename.

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

    Paul Walmsley
     
  • On next-20150105, defconfig compilation breaks with:

    arch/arm64/kernel/module.c:408:4: error: implicit declaration of function ‘apply_alternatives’ [-Werror=implicit-function-declaration]

    Fix by including asm/alternative.h, where the apply_alternatives()
    prototype is declared.

    This second version incorporates a comment from Mark Rutland
    to keep the includes in alphabetical order
    by filename.

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

    Paul Walmsley
     
  • On next-20150105, defconfig compilation breaks with:

    ./arch/arm64/include/asm/arch_timer.h:112:2: error: implicit declaration of function ‘BUG’ [-Werror=implicit-function-declaration]

    Fix by including linux/bug.h, where the BUG macro is defined.

    This second version incorporates a comment from Mark Rutland
    to keep the includes in alphabetical order
    by filename.

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

    Paul Walmsley
     
  • On next-20150105, defconfig compilation breaks with:

    ./arch/arm64/include/asm/processor.h:47:32: error: ‘PHYS_MASK’ undeclared (first use in this function)

    Fix by including asm/pgtable-hwdef.h, where PHYS_MASK is defined.

    This second version incorporates a comment from Mark Rutland
    to keep the includes in alphabetical order
    by filename.

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

    Paul Walmsley
     
  • We don't currently check a number of registers exposed to AArch32 guests
    (MVFR{0,1,2}_EL1 and ID_DFR0_EL1), despite the fact these describe
    AArch32 feature support exposed to userspace and KVM guests similarly to
    AArch64 registers which we do check. We do not expect these registers to
    vary across a set of CPUs.

    This patch adds said registers to the cpuinfo framework and sanity
    checks. No sanity check failures have been observed on a current ARMv8
    big.LITTLE platform (Juno).

    Cc: Catalin Marinas
    Reported-by: Suzuki K. Poulose
    Signed-off-by: Suzuki K. Poulose
    Signed-off-by: Mark Rutland
    Signed-off-by: Will Deacon

    Mark Rutland
     
  • prepare_to_copy() was removed from all architectures supported at that
    time in commit 55ccf3fe3f9a ("fork: move the real prepare_to_copy()
    users to arch_dup_task_struct()"). Remove it from arm64 as well.

    Signed-off-by: Tobias Klauser
    Signed-off-by: Will Deacon

    Tobias Klauser
     
  • Commit 97b56be10352a70c (arm64: compat: Enable bpf syscall) made the
    usual mistake of forgetting to update __NR_compat_syscalls. Due to this,
    when el0_sync_compat calls el0_svc_naked, the test against sc_nr
    (__NR_compat_syscalls) will fail, and we'll call ni_sys, returning
    -ENOSYS to userspace.

    This patch bumps __NR_compat_syscalls appropriately, enabling the use of
    the bpf syscall from compat tasks.

    Due to the reorganisation of unistd{,32}.h as part of commit
    f3e5c847ec3d12b4 (arm64: Add __NR_* definitions for compat syscalls) it
    is not currently possible to include both headers and sanity-check the
    value of __NR_compat_syscalls at build-time to prevent this from
    happening again. Additional rework is required to make such niceties a
    possibility.

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

    Mark Rutland
     
  • * acpi-pm:
    ACPI / PM: Fix PM initialization for devices that are not present

    * acpi-processor:
    ACPI / processor: Rename acpi_(un)map_lsapic() to acpi_(un)map_cpu()
    ACPI / processor: Convert apic_id to phys_id to make it arch agnostic

    * acpi-video:
    ACPI / video: Add disable_native_backlight quirk for Dell XPS15 L521X

    Rafael J. Wysocki
     

06 Jan, 2015

3 commits

  • Pull powerpc fixes from Michael Ellerman:

    - Wire up sys_execveat(). Tested on 32 & 64 bit.

    - Fix for kdump on LE systems with cpus hot unplugged.

    - Revert Anton's fix for "kernel BUG at kernel/smpboot.c:134!", this
    broke other platforms, we'll do a proper fix for 3.20.

    * tag 'powerpc-3.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux:
    Revert "powerpc: Secondary CPUs must set cpu_callin_map after setting active and online"
    powerpc/kdump: Ignore failure in enabling big endian exception during crash
    powerpc: Wire up sys_execveat() syscall

    Linus Torvalds
     
  • acpi_map_lsapic() will allocate a logical CPU number and map it to
    physical CPU id (such as APIC id) for the hot-added CPU, it will also
    do some mapping for NUMA node id and etc, acpi_unmap_lsapic() will
    do the reverse.

    We can see that the name of the function is a little bit confusing and
    arch (IA64) dependent so rename them as acpi_(un)map_cpu() to make arch
    agnostic and explicit.

    Signed-off-by: Hanjun Guo
    Signed-off-by: Rafael J. Wysocki

    Hanjun Guo
     
  • See commit 51f39a1f0cea1cacf8c787f652f26dfee9611874
    syscalls: implement execveat() system call

    Signed-off-by: Tony Luck

    Tony Luck
     

05 Jan, 2015

4 commits

  • This patch fixes this allyesconfig target build error with older
    binutils.

    LD arch/x86/crypto/built-in.o
    ld: arch/x86/crypto/sha-mb/built-in.o: No such file: No such file or directory

    Cc: stable@vger.kernel.org # 3.18+
    Signed-off-by: Vinson Lee
    Signed-off-by: Herbert Xu

    Vinson Lee
     
  • The "by8" counter mode optimization is broken for 128 bit keys with
    input data longer than 128 bytes. It uses the wrong key material for
    en- and decryption.

    The key registers xkey0, xkey4, xkey8 and xkey12 need to be preserved
    in case we're handling more than 128 bytes of input data -- they won't
    get reloaded after the initial load. They must therefore be (a) loaded
    on the first iteration and (b) be preserved for the latter ones. The
    implementation for 128 bit keys does not comply with (a) nor (b).

    Fix this by bringing the implementation back to its original source
    and correctly load the key registers and preserve their values by
    *not* re-using the registers for other purposes.

    Kudos to James for reporting the issue and providing a test case
    showing the discrepancies.

    Reported-by: James Yonan
    Cc: Chandramouli Narayanan
    Cc: # v3.18
    Signed-off-by: Mathias Krause
    Signed-off-by: Herbert Xu

    Mathias Krause
     
  • Pull UML fixes from Richard Weinberger:
    "Two fixes for UML regressions. Nothing exciting"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
    x86, um: actually mark system call tables readonly
    um: Skip futex_atomic_cmpxchg_inatomic() test

    Linus Torvalds
     
  • Commit 9fc2105aeaaf ("ARM: 7830/1: delay: don't bother reporting
    bogomips in /proc/cpuinfo") breaks audio in python, and probably
    elsewhere, with message

    FATAL: cannot locate cpu MHz in /proc/cpuinfo

    I'm not the first one to hit it, see for example

    https://theredblacktree.wordpress.com/2014/08/10/fatal-cannot-locate-cpu-mhz-in-proccpuinfo/
    https://devtalk.nvidia.com/default/topic/765800/workaround-for-fatal-cannot-locate-cpu-mhz-in-proc-cpuinf/?offset=1

    Reading original changelog, I have to say "Stop breaking working setups.
    You know who you are!".

    Signed-off-by: Pavel Machek
    Signed-off-by: Linus Torvalds

    Pavel Machek
     

04 Jan, 2015

2 commits

  • Commit a074335a370e ("x86, um: Mark system call tables readonly") was
    supposed to mark the sys_call_table in UML as RO by adding the const,
    but it doesn't have the desired effect as it's nevertheless being placed
    into the data section since __cacheline_aligned enforces sys_call_table
    being placed into .data..cacheline_aligned instead. We need to use
    the ____cacheline_aligned version instead to fix this issue.

    Before:

    $ nm -v arch/x86/um/sys_call_table_64.o | grep -1 "sys_call_table"
    U sys_writev
    0000000000000000 D sys_call_table
    0000000000000000 D syscall_table_size

    After:

    $ nm -v arch/x86/um/sys_call_table_64.o | grep -1 "sys_call_table"
    U sys_writev
    0000000000000000 R sys_call_table
    0000000000000000 D syscall_table_size

    Fixes: a074335a370e ("x86, um: Mark system call tables readonly")
    Cc: H. Peter Anvin
    Cc: Andrew Morton
    Signed-off-by: Daniel Borkmann
    Signed-off-by: Richard Weinberger

    Daniel Borkmann
     
  • futex_atomic_cmpxchg_inatomic() does not work on UML because
    it triggers a copy_from_user() in kernel context.
    On UML copy_from_user() can only be used if the kernel was called
    by a real user space process such that UML can use ptrace()
    to fetch the value.

    Reported-by: Miklos Szeredi
    Suggested-by: Geert Uytterhoeven
    Signed-off-by: Richard Weinberger
    Tested-by: Daniel Walter

    Richard Weinberger
     

02 Jan, 2015

1 commit

  • …t/luto/linux into x86/urgent

    Pull VDSO fix from Andy Lutomirski:

    "This is hopefully the last vdso fix for 3.19. It should be very
    safe (it just adds a volatile).

    I don't think it fixes an actual bug (the __getcpu calls in the
    pvclock code may not have been needed in the first place), but
    discussion on that point is ongoing.

    It also fixes a big performance issue in 3.18 and earlier in which
    the lsl instructions in vclock_gettime got hoisted so far up the
    function that they happened even when the function they were in was
    never called. n 3.19, the performance issue seems to be gone due to
    the whims of my compiler and some interaction with a branch that's
    now gone.

    I'll hopefully have a much bigger overhaul of the pvclock code
    for 3.20, but it needs careful review."

    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     

01 Jan, 2015

1 commit


31 Dec, 2014

3 commits

  • Follow aa0d53260596 ("ia64: Use preempt_schedule_irq") and use
    preempt_schedule_irq instead of enabling/disabling interrupts and
    messing around with PREEMPT_ACTIVE in the nios2 low-level preemption
    code ourselves. Also get rid of the now needless re-check for
    TIF_NEED_RESCHED, preempt_schedule_irq will already take care of
    rescheduling.

    This also fixes the following build error when building with
    CONFIG_PREEMPT:

    arch/nios2/kernel/built-in.o: In function `need_resched':
    arch/nios2/kernel/entry.S:374: undefined reference to `PREEMPT_ACTIVE'

    Cc: Thomas Gleixner
    Signed-off-by: Tobias Klauser
    Acked-by: Ley Foon Tan

    Tobias Klauser
     
  • This patch initializes the mmu field of the cpuinfo structure to the
    value supplied by the devicetree.

    Signed-off-by: Walter Goossens
    Acked-by: Ley Foon Tan

    Walter Goossens
     
  • Pull ARM SoC fixes from Arnd Bergmann:
    "A very small set of fixes for 3.19, as everyone was out.

    The clocksource patch was something I missed for the merge window
    after the change that broke arm64 was merged through arm-soc. The
    other two patches are a fix for an undetected merge problem in mvebu
    and a defconfig change to make some exynos boards work with the normal
    multi_v7_defconfig"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    Add USB_EHCI_EXYNOS to multi_v7_defconfig
    ARM: mvebu: Fix pinctrl configuration for Armada 370 DB
    clocksource: arch_timer: Only use the virtual counter (CNTVCT) on arm64

    Linus Torvalds
     

30 Dec, 2014

1 commit

  • Currently we enable Exynos devices in the multi v7 defconfig, however, when
    testing on my ODROID-U3, I noticed that USB was not working. Enabling this
    option causes USB to work, which enables networking support as well since the
    ODROID-U3 has networking on the USB bus.

    [arnd] Support for odroid-u3 was added in 3.10, so it would be nice to
    backport this fix at least that far.

    Signed-off-by: Steev Klimaszewski
    Cc: stable@vger.kernel.org # 3.10
    Signed-off-by: Arnd Bergmann

    Steev Klimaszewski
     

29 Dec, 2014

4 commits

  • This reverts commit 7c5c92ed56d932b2c19c3f8aea86369509407d33.

    Although this did fix the bug it was aimed at, it also broke secondary
    startup on platforms that use give/take_timebase(). Unfortunately we
    didn't detect that while it was in next.

    Signed-off-by: Michael Ellerman

    Michael Ellerman
     
  • In LE kernel, we currently have a hack for kexec that resets the exception
    endian before starting a new kernel as the kernel that is loaded could be a
    big endian or a little endian kernel. In kdump case, resetting exception
    endian fails when one or more cpus is disabled. But we can ignore the failure
    and still go ahead, as in most cases crashkernel will be of same endianess
    as primary kernel and reseting endianess is not even needed in those cases.
    This patch adds a new inline function to say if this is kdump path. This
    function is used at places where such a check is needed.

    Signed-off-by: Hari Bathini
    [mpe: Rename to kdump_in_progress(), use bool, and edit comment]
    Signed-off-by: Michael Ellerman

    Hari Bathini
     
  • Wire up sys_execveat(). This passes the selftests for the system call.

    Check success of execveat(3, '../execveat', 0)... [OK]
    Check success of execveat(5, 'execveat', 0)... [OK]
    Check success of execveat(6, 'execveat', 0)... [OK]
    Check success of execveat(-100, '/home/pranith/linux/...ftests/exec/execveat', 0)... [OK]
    Check success of execveat(99, '/home/pranith/linux/...ftests/exec/execveat', 0)... [OK]
    Check success of execveat(8, '', 4096)... [OK]
    Check success of execveat(17, '', 4096)... [OK]
    Check success of execveat(9, '', 4096)... [OK]
    Check success of execveat(14, '', 4096)... [OK]
    Check success of execveat(14, '', 4096)... [OK]
    Check success of execveat(15, '', 4096)... [OK]
    Check failure of execveat(8, '', 0) with ENOENT... [OK]
    Check failure of execveat(8, '(null)', 4096) with EFAULT... [OK]
    Check success of execveat(5, 'execveat.symlink', 0)... [OK]
    Check success of execveat(6, 'execveat.symlink', 0)... [OK]
    Check success of execveat(-100, '/home/pranith/linux/...xec/execveat.symlink', 0)... [OK]
    Check success of execveat(10, '', 4096)... [OK]
    Check success of execveat(10, '', 4352)... [OK]
    Check failure of execveat(5, 'execveat.symlink', 256) with ELOOP... [OK]
    Check failure of execveat(6, 'execveat.symlink', 256) with ELOOP... [OK]
    Check failure of execveat(-100, '/home/pranith/linux/tools/testing/selftests/exec/execveat.symlink', 256) with ELOOP... [OK]
    Check success of execveat(3, '../script', 0)... [OK]
    Check success of execveat(5, 'script', 0)... [OK]
    Check success of execveat(6, 'script', 0)... [OK]
    Check success of execveat(-100, '/home/pranith/linux/...elftests/exec/script', 0)... [OK]
    Check success of execveat(13, '', 4096)... [OK]
    Check success of execveat(13, '', 4352)... [OK]
    Check failure of execveat(18, '', 4096) with ENOENT... [OK]
    Check failure of execveat(7, 'script', 0) with ENOENT... [OK]
    Check success of execveat(16, '', 4096)... [OK]
    Check success of execveat(16, '', 4096)... [OK]
    Check success of execveat(4, '../script', 0)... [OK]
    Check success of execveat(4, 'script', 0)... [OK]
    Check success of execveat(4, '../script', 0)... [OK]
    Check failure of execveat(4, 'script', 0) with ENOENT... [OK]
    Check failure of execveat(5, 'execveat', 65535) with EINVAL... [OK]
    Check failure of execveat(5, 'no-such-file', 0) with ENOENT... [OK]
    Check failure of execveat(6, 'no-such-file', 0) with ENOENT... [OK]
    Check failure of execveat(-100, 'no-such-file', 0) with ENOENT... [OK]
    Check failure of execveat(5, '', 4096) with EACCES... [OK]
    Check failure of execveat(5, 'Makefile', 0) with EACCES... [OK]
    Check failure of execveat(11, '', 4096) with EACCES... [OK]
    Check failure of execveat(12, '', 4096) with EACCES... [OK]
    Check failure of execveat(99, '', 4096) with EBADF... [OK]
    Check failure of execveat(99, 'execveat', 0) with EBADF... [OK]
    Check failure of execveat(8, 'execveat', 0) with ENOTDIR... [OK]
    Invoke copy of 'execveat' via filename of length 4093:
    Check success of execveat(19, '', 4096)... [OK]
    Check success of execveat(5, 'xxxxxxxxxxxxxxxxxxxx...yyyyyyyyyyyyyyyyyyyy', 0)... [OK]
    Invoke copy of 'script' via filename of length 4093:
    Check success of execveat(20, '', 4096)... [OK]
    /bin/sh: 0: Can't open /dev/fd/5/xxxxxxx(... a long line of x's and y's, 0)... [OK]
    Check success of execveat(5, 'xxxxxxxxxxxxxxxxxxxx...yyyyyyyyyyyyyyyyyyyy', 0)... [OK]

    Tested on a 32-bit powerpc system.

    Signed-off-by: Pranith Kumar
    Signed-off-by: Michael Ellerman

    Pranith Kumar
     
  • Pull KVM fixes from Paolo Bonzini:
    "The important fixes are for two bugs introduced by the merge window.

    On top of this, add a couple of WARN_ONs and stop spamming dmesg on
    pretty much every boot of a virtual machine"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    kvm: warn on more invariant breakage
    kvm: fix sorting of memslots with base_gfn == 0
    kvm: x86: drop severity of "generation wraparound" message
    kvm: x86: vmx: reorder some msr writing

    Linus Torvalds
     

28 Dec, 2014

1 commit