17 Apr, 2015

1 commit

  • Pull powerpc updates from Michael Ellerman:

    - Numerous minor fixes, cleanups etc.

    - More EEH work from Gavin to remove its dependency on device_nodes.

    - Memory hotplug implemented entirely in the kernel from Nathan
    Fontenot.

    - Removal of redundant CONFIG_PPC_OF by Kevin Hao.

    - Rewrite of VPHN parsing logic & tests from Greg Kurz.

    - A fix from Nish Aravamudan to reduce memory usage by clamping
    nodes_possible_map.

    - Support for pstore on powernv from Hari Bathini.

    - Removal of old powerpc specific byte swap routines by David Gibson.

    - Fix from Vasant Hegde to prevent the flash driver telling you it was
    flashing your firmware when it wasn't.

    - Patch from Ben Herrenschmidt to add an OPAL heartbeat driver.

    - Fix for an oops causing get/put_cpu_var() imbalance in perf by Jan
    Stancek.

    - Some fixes for migration from Tyrel Datwyler.

    - A new syscall to switch the cpu endian by Michael Ellerman.

    - Large series from Wei Yang to implement SRIOV, reviewed and acked by
    Bjorn.

    - A fix for the OPAL sensor driver from Cédric Le Goater.

    - Fixes to get STRICT_MM_TYPECHECKS building again by Michael Ellerman.

    - Large series from Daniel Axtens to make our PCI hooks per PHB rather
    than per machine.

    - Small patch from Sam Bobroff to explicitly abort non-suspended
    transactions on syscalls, plus a test to exercise it.

    - Numerous reworks and fixes for the 24x7 PMU from Sukadev Bhattiprolu.

    - Small patch to enable the hard lockup detector from Anton Blanchard.

    - Fix from Dave Olson for missing L2 cache information on some CPUs.

    - Some fixes from Michael Ellerman to get Cell machines booting again.

    - Freescale updates from Scott: Highlights include BMan device tree
    nodes, an MSI erratum workaround, a couple minor performance
    improvements, config updates, and misc fixes/cleanup.

    * tag 'powerpc-4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: (196 commits)
    powerpc/powermac: Fix build error seen with powermac smp builds
    powerpc/pseries: Fix compile of memory hotplug without CONFIG_MEMORY_HOTREMOVE
    powerpc: Remove PPC32 code from pseries specific find_and_init_phbs()
    powerpc/cell: Fix iommu breakage caused by controller_ops change
    powerpc/eeh: Fix crash in eeh_add_device_early() on Cell
    powerpc/perf: Cap 64bit userspace backtraces to PERF_MAX_STACK_DEPTH
    powerpc/perf/hv-24x7: Fail 24x7 initcall if create_events_from_catalog() fails
    powerpc/pseries: Correct memory hotplug locking
    powerpc: Fix missing L2 cache size in /sys/devices/system/cpu
    powerpc: Add ppc64 hard lockup detector support
    oprofile: Disable oprofile NMI timer on ppc64
    powerpc/perf/hv-24x7: Add missing put_cpu_var()
    powerpc/perf/hv-24x7: Break up single_24x7_request
    powerpc/perf/hv-24x7: Define update_event_count()
    powerpc/perf/hv-24x7: Whitespace cleanup
    powerpc/perf/hv-24x7: Define add_event_to_24x7_request()
    powerpc/perf/hv-24x7: Rename hv_24x7_event_update
    powerpc/perf/hv-24x7: Move debug prints to separate function
    powerpc/perf/hv-24x7: Drop event_24x7_request()
    powerpc/perf/hv-24x7: Use pr_devel() to log message
    ...

    Conflicts:
    tools/testing/selftests/powerpc/Makefile
    tools/testing/selftests/powerpc/tm/Makefile

    Linus Torvalds
     

15 Apr, 2015

4 commits

  • The arch_randomize_brk() function is used on several architectures,
    even those that don't support ET_DYN ASLR. To avoid bulky extern/#define
    tricks, consolidate the support under CONFIG_ARCH_HAS_ELF_RANDOMIZE for
    the architectures that support it, while still handling CONFIG_COMPAT_BRK.

    Signed-off-by: Kees Cook
    Cc: Hector Marco-Gisbert
    Cc: Russell King
    Reviewed-by: Ingo Molnar
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Alexander Viro
    Cc: Oleg Nesterov
    Cc: Andy Lutomirski
    Cc: "David A. Long"
    Cc: Andrey Ryabinin
    Cc: Arun Chandran
    Cc: Yann Droneaud
    Cc: Min-Hua Chen
    Cc: Paul Burton
    Cc: Alex Smith
    Cc: Markos Chandras
    Cc: Vineeth Vijayan
    Cc: Jeff Bailey
    Cc: Michael Holzheu
    Cc: Ben Hutchings
    Cc: Behan Webster
    Cc: Ismael Ripoll
    Cc: Jan-Simon Mller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     
  • When an architecture fully supports randomizing the ELF load location,
    a per-arch mmap_rnd() function is used to find a randomized mmap base.
    In preparation for randomizing the location of ET_DYN binaries
    separately from mmap, this renames and exports these functions as
    arch_mmap_rnd(). Additionally introduces CONFIG_ARCH_HAS_ELF_RANDOMIZE
    for describing this feature on architectures that support it
    (which is a superset of ARCH_BINFMT_ELF_RANDOMIZE_PIE, since s390
    already supports a separated ET_DYN ASLR from mmap ASLR without the
    ARCH_BINFMT_ELF_RANDOMIZE_PIE logic).

    Signed-off-by: Kees Cook
    Cc: Hector Marco-Gisbert
    Cc: Russell King
    Reviewed-by: Ingo Molnar
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Alexander Viro
    Cc: Oleg Nesterov
    Cc: Andy Lutomirski
    Cc: "David A. Long"
    Cc: Andrey Ryabinin
    Cc: Arun Chandran
    Cc: Yann Droneaud
    Cc: Min-Hua Chen
    Cc: Paul Burton
    Cc: Alex Smith
    Cc: Markos Chandras
    Cc: Vineeth Vijayan
    Cc: Jeff Bailey
    Cc: Michael Holzheu
    Cc: Ben Hutchings
    Cc: Behan Webster
    Cc: Ismael Ripoll
    Cc: Jan-Simon Mller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     
  • Add ioremap_pud_enabled() and ioremap_pmd_enabled(), which return 1 when
    I/O mappings with pud/pmd are enabled on the kernel.

    ioremap_huge_init() calls arch_ioremap_pud_supported() and
    arch_ioremap_pmd_supported() to initialize the capabilities at boot-time.

    A new kernel option "nohugeiomap" is also added, so that user can disable
    the huge I/O map capabilities when necessary.

    Signed-off-by: Toshi Kani
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Arnd Bergmann
    Cc: Dave Hansen
    Cc: Robert Elliott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Toshi Kani
     
  • By this time all architectures which support more than two page table
    levels should be covered. This patch add default definiton of
    PGTABLE_LEVELS equal 2.

    We also add assert to detect inconsistence between CONFIG_PGTABLE_LEVELS
    and __PAGETABLE_PMD_FOLDED/__PAGETABLE_PUD_FOLDED.

    Signed-off-by: Kirill A. Shutemov
    Tested-by: Guenter Roeck
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: "David S. Miller"
    Cc: "H. Peter Anvin"
    Cc: "James E.J. Bottomley"
    Cc: Benjamin Herrenschmidt
    Cc: Catalin Marinas
    Cc: Chris Metcalf
    Cc: David Howells
    Cc: Fenghua Yu
    Cc: Geert Uytterhoeven
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: Ingo Molnar
    Cc: Jeff Dike
    Cc: Kirill A. Shutemov
    Cc: Koichi Yasutake
    Cc: Martin Schwidefsky
    Cc: Michael Ellerman
    Cc: Paul Mackerras
    Cc: Ralf Baechle
    Cc: Richard Weinberger
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Will Deacon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

11 Apr, 2015

1 commit

  • We want to enable the hard lockup detector on ppc64, but right now
    that enables the oprofile NMI timer too.

    We'd prefer not to enable the oprofile NMI timer, it adds another
    element to our PMU testing and it requires us to increase our
    exported symbols (eg cpu_khz).

    Modify the config entry for OPROFILE_NMI_TIMER to disable it on PPC64.

    Signed-off-by: Anton Blanchard
    Acked-by: Robert Richter
    Signed-off-by: Michael Ellerman

    Anton Blanchard
     

04 Sep, 2014

1 commit


19 Jul, 2014

1 commit

  • This adds the new "seccomp" syscall with both an "operation" and "flags"
    parameter for future expansion. The third argument is a pointer value,
    used with the SECCOMP_SET_MODE_FILTER operation. Currently, flags must
    be 0. This is functionally equivalent to prctl(PR_SET_SECCOMP, ...).

    In addition to the TSYNC flag later in this patch series, there is a
    non-zero chance that this syscall could be used for configuring a fixed
    argument area for seccomp-tracer-aware processes to pass syscall arguments
    in the future. Hence, the use of "seccomp" not simply "seccomp_add_filter"
    for this syscall. Additionally, this syscall uses operation, flags,
    and user pointer for arguments because strictly passing arguments via
    a user pointer would mean seccomp itself would be unable to trivially
    filter the seccomp syscall itself.

    Signed-off-by: Kees Cook
    Reviewed-by: Oleg Nesterov
    Reviewed-by: Andy Lutomirski

    Kees Cook
     

19 Mar, 2014

1 commit


20 Dec, 2013

2 commits

  • This changes the stack protector config option into a choice of
    "None", "Regular", and "Strong":

    CONFIG_CC_STACKPROTECTOR_NONE
    CONFIG_CC_STACKPROTECTOR_REGULAR
    CONFIG_CC_STACKPROTECTOR_STRONG

    "Regular" means the old CONFIG_CC_STACKPROTECTOR=y option.

    "Strong" is a new mode introduced by this patch. With "Strong" the
    kernel is built with -fstack-protector-strong (available in
    gcc 4.9 and later). This option increases the coverage of the stack
    protector without the heavy performance hit of -fstack-protector-all.

    For reference, the stack protector options available in gcc are:

    -fstack-protector-all:
    Adds the stack-canary saving prefix and stack-canary checking
    suffix to _all_ function entry and exit. Results in substantial
    use of stack space for saving the canary for deep stack users
    (e.g. historically xfs), and measurable (though shockingly still
    low) performance hit due to all the saving/checking. Really not
    suitable for sane systems, and was entirely removed as an option
    from the kernel many years ago.

    -fstack-protector:
    Adds the canary save/check to functions that define an 8
    (--param=ssp-buffer-size=N, N=8 by default) or more byte local
    char array. Traditionally, stack overflows happened with
    string-based manipulations, so this was a way to find those
    functions. Very few total functions actually get the canary; no
    measurable performance or size overhead.

    -fstack-protector-strong
    Adds the canary for a wider set of functions, since it's not
    just those with strings that have ultimately been vulnerable to
    stack-busting. With this superset, more functions end up with a
    canary, but it still remains small compared to all functions
    with only a small change in performance. Based on the original
    design document, a function gets the canary when it contains any
    of:

    - local variable's address used as part of the right hand side
    of an assignment or function argument
    - local variable is an array (or union containing an array),
    regardless of array type or length
    - uses register local variables

    https://docs.google.com/a/google.com/document/d/1xXBH6rRZue4f296vGt9YQcuLVQHeE516stHwt8M9xyU

    Find below a comparison of "size" and "objdump" output when built with
    gcc-4.9 in three configurations:

    - defconfig
    11430641 kernel text size
    36110 function bodies

    - defconfig + CONFIG_CC_STACKPROTECTOR_REGULAR
    11468490 kernel text size (+0.33%)
    1015 of 36110 functions are stack-protected (2.81%)

    - defconfig + CONFIG_CC_STACKPROTECTOR_STRONG via this patch
    11692790 kernel text size (+2.24%)
    7401 of 36110 functions are stack-protected (20.5%)

    With -strong, ARM's compressed boot code now triggers stack
    protection, so a static guard was added. Since this is only used
    during decompression and was never used before, the exposure
    here is very small. Once it switches to the full kernel, the
    stack guard is back to normal.

    Chrome OS has been using -fstack-protector-strong for its kernel
    builds for the last 8 months with no problems.

    Signed-off-by: Kees Cook
    Cc: Arjan van de Ven
    Cc: Michal Marek
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: Paul Mundt
    Cc: James Hogan
    Cc: Stephen Rothwell
    Cc: Shawn Guo
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-mips@linux-mips.org
    Cc: linux-arch@vger.kernel.org
    Link: http://lkml.kernel.org/r/1387481759-14535-3-git-send-email-keescook@chromium.org
    [ Improved the changelog and descriptions some more. ]
    Signed-off-by: Ingo Molnar

    Kees Cook
     
  • Instead of duplicating the CC_STACKPROTECTOR Kconfig and
    Makefile logic in each architecture, switch to using
    HAVE_CC_STACKPROTECTOR and keep everything in one place. This
    retains the x86-specific bug verification scripts.

    Signed-off-by: Kees Cook
    Cc: Arjan van de Ven
    Cc: Michal Marek
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: Paul Mundt
    Cc: James Hogan
    Cc: Stephen Rothwell
    Cc: Shawn Guo
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-mips@linux-mips.org
    Cc: linux-arch@vger.kernel.org
    Link: http://lkml.kernel.org/r/1387481759-14535-2-git-send-email-keescook@chromium.org
    Signed-off-by: Ingo Molnar

    Kees Cook
     

15 Nov, 2013

1 commit


12 Nov, 2013

1 commit

  • Pull timer changes from Ingo Molnar:
    "Main changes in this cycle were:

    - Updated full dynticks support.

    - Event stream support for architected (ARM) timers.

    - ARM clocksource driver updates.

    - Move arm64 to using the generic sched_clock framework & resulting
    cleanup in the generic sched_clock code.

    - Misc fixes and cleanups"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (50 commits)
    x86/time: Honor ACPI FADT flag indicating absence of a CMOS RTC
    clocksource: sun4i: remove IRQF_DISABLED
    clocksource: sun4i: Report the minimum tick that we can program
    clocksource: sun4i: Select CLKSRC_MMIO
    clocksource: Provide timekeeping for efm32 SoCs
    clocksource: em_sti: convert to clk_prepare/unprepare
    time: Fix signedness bug in sysfs_get_uname() and its callers
    timekeeping: Fix some trivial typos in comments
    alarmtimer: return EINVAL instead of ENOTSUPP if rtcdev doesn't exist
    clocksource: arch_timer: Do not register arch_sys_counter twice
    timer stats: Add a 'Collection: active/inactive' line to timer usage statistics
    sched_clock: Remove sched_clock_func() hook
    arch_timer: Move to generic sched_clock framework
    clocksource: tcb_clksrc: Remove IRQF_DISABLED
    clocksource: tcb_clksrc: Improve driver robustness
    clocksource: tcb_clksrc: Replace clk_enable/disable with clk_prepare_enable/disable_unprepare
    clocksource: arm_arch_timer: Use clocksource for suspend timekeeping
    clocksource: dw_apb_timer_of: Mark a few more functions as __init
    clocksource: Put nodes passed to CLOCKSOURCE_OF_DECLARE callbacks centrally
    arm: zynq: Enable arm_global_timer
    ...

    Linus Torvalds
     

01 Oct, 2013

1 commit

  • If irq_exit() is called on the arch's specified irq stack,
    it should be safe to run softirqs inline under that same
    irq stack as it is near empty by the time we call irq_exit().

    For example if we use the same stack for both hard and soft irqs here,
    the worst case scenario is:
    hardirq -> softirq -> hardirq. But then the softirq supersedes the
    first hardirq as the stack user since irq_exit() is called in
    a mostly empty stack. So the stack merge in this case looks acceptable.

    Stack overrun still have a chance to happen if hardirqs have more
    opportunities to nest, but then it's another problem to solve.

    So lets adapt the irq exit's softirq stack on top of a new Kconfig symbol
    that can be defined when irq_exit() runs on the irq stack. That way
    we can spare some stack switch on irq processing and all the cache
    issues that come along.

    Acked-by: Linus Torvalds
    Signed-off-by: Frederic Weisbecker
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Paul Mackerras
    Cc: James Hogan
    Cc: James E.J. Bottomley
    Cc: Helge Deller
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: David S. Miller
    Cc: Andrew Morton

    Frederic Weisbecker
     

30 Sep, 2013

1 commit

  • With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit. In order
    to use that feature, arch code should be audited to ensure there are no
    races in concurrent read/write of cputime_t. For example,
    reading/writing 64-bit cputime_t on some 32-bit arches may require
    multiple accesses for low and high value parts, so proper locking
    is needed to protect against concurrent accesses.

    Therefore, add CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN which arches can
    enable after they've been audited for potential races.

    This option is automatically enabled on 64-bit platforms.

    Feature requested by Frederic Weisbecker.

    Signed-off-by: Kevin Hilman
    Cc: Ingo Molnar
    Cc: Russell King
    Cc: Paul E. McKenney
    Cc: Arm Linux
    Signed-off-by: Frederic Weisbecker

    Kevin Hilman
     

28 Sep, 2013

1 commit

  • Linus suggested to replace

    #ifndef CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX
    #define arch_mutex_cpu_relax() cpu_relax()
    #endif

    with just a simple

    #ifndef arch_mutex_cpu_relax
    # define arch_mutex_cpu_relax() cpu_relax()
    #endif

    to get rid of CONFIG_HAVE_CPU_RELAX_SIMPLE. So architectures can
    simply define arch_mutex_cpu_relax if they want an architecture
    specific function instead of having to add a select statement in
    their Kconfig in addition.

    Suggested-by: Linus Torvalds
    Signed-off-by: Heiko Carstens

    Heiko Carstens
     

14 Aug, 2013

1 commit

  • Fix inadvertent breakage in the clone syscall ABI for Microblaze that
    was introduced in commit f3268edbe6fe ("microblaze: switch to generic
    fork/vfork/clone").

    The Microblaze syscall ABI for clone takes the parent tid address in the
    4th argument; the third argument slot is used for the stack size. The
    incorrectly-used CLONE_BACKWARDS type assigned parent tid to the 3rd
    slot.

    This commit restores the original ABI so that existing userspace libc
    code will work correctly.

    All kernel versions from v3.8-rc1 were affected.

    Signed-off-by: Michal Simek
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Simek
     

04 Jul, 2013

1 commit

  • The soft-dirty is a bit on a PTE which helps to track which pages a task
    writes to. In order to do this tracking one should

    1. Clear soft-dirty bits from PTEs ("echo 4 > /proc/PID/clear_refs)
    2. Wait some time.
    3. Read soft-dirty bits (55'th in /proc/PID/pagemap2 entries)

    To do this tracking, the writable bit is cleared from PTEs when the
    soft-dirty bit is. Thus, after this, when the task tries to modify a
    page at some virtual address the #PF occurs and the kernel sets the
    soft-dirty bit on the respective PTE.

    Note, that although all the task's address space is marked as r/o after
    the soft-dirty bits clear, the #PF-s that occur after that are processed
    fast. This is so, since the pages are still mapped to physical memory,
    and thus all the kernel does is finds this fact out and puts back
    writable, dirty and soft-dirty bits on the PTE.

    Another thing to note, is that when mremap moves PTEs they are marked
    with soft-dirty as well, since from the user perspective mremap modifies
    the virtual memory at mremap's new address.

    Signed-off-by: Pavel Emelyanov
    Cc: Matt Mackall
    Cc: Xiao Guangrong
    Cc: Glauber Costa
    Cc: Marcelo Tosatti
    Cc: KOSAKI Motohiro
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     

16 May, 2013

1 commit


06 May, 2013

1 commit

  • Pull mudule updates from Rusty Russell:
    "We get rid of the general module prefix confusion with a binary config
    option, fix a remove/insert race which Never Happens, and (my
    favorite) handle the case when we have too many modules for a single
    commandline. Seriously, the kernel is full, please go away!"

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    modpost: fix unwanted VMLINUX_SYMBOL_STR expansion
    X.509: Support parse long form of length octets in Authority Key Identifier
    module: don't unlink the module until we've removed all exposure.
    kernel: kallsyms: memory override issue, need check destination buffer length
    MODSIGN: do not send garbage to stderr when enabling modules signature
    modpost: handle huge numbers of modules.
    modpost: add -T option to read module names from file/stdin.
    modpost: minor cleanup.
    genksyms: pass symbol-prefix instead of arch
    module: fix symbol versioning with symbol prefixes
    CONFIG_SYMBOL_PREFIX: cleanup.

    Linus Torvalds
     

05 May, 2013

1 commit

  • commit d1669912 (idle: Implement generic idle function) added a new
    generic idle along with support for hlt/nohlt command line options to
    override default idle loop behavior. However, the command-line
    processing is never compiled.

    The command-line handling is wrapped by CONFIG_GENERIC_IDLE_POLL_SETUP
    and arches that use this feature select it in their Kconfigs.
    However, no Kconfig definition was created for this option, so it is
    never enabled, and therefore command-line override of the idle-loop
    behavior is broken after migrating to the generic idle loop.

    To fix, add a Kconfig definition for GENERIC_IDLE_POLL_SETUP.

    Tested on ARM (OMAP4/Panda) which enables the command-line overrides
    by default.

    Signed-off-by: Kevin Hilman
    Reviewed-by: Srivatsa S. Bhat
    Cc: Linus Torvalds
    Cc: Rusty Russell
    Cc: Paul McKenney
    Cc: Peter Zijlstra
    Cc: Magnus Damm
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linaro-kernel@lists.linaro.org
    Link: http://lkml.kernel.org/r/1366849153-25564-1-git-send-email-khilman@linaro.org
    Signed-off-by: Thomas Gleixner

    Kevin Hilman
     

01 May, 2013

1 commit

  • Pull compat cleanup from Al Viro:
    "Mostly about syscall wrappers this time; there will be another pile
    with patches in the same general area from various people, but I'd
    rather push those after both that and vfs.git pile are in."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
    syscalls.h: slightly reduce the jungles of macros
    get rid of union semop in sys_semctl(2) arguments
    make do_mremap() static
    sparc: no need to sign-extend in sync_file_range() wrapper
    ppc compat wrappers for add_key(2) and request_key(2) are pointless
    x86: trim sys_ia32.h
    x86: sys32_kill and sys32_mprotect are pointless
    get rid of compat_sys_semctl() and friends in case of ARCH_WANT_OLD_COMPAT_IPC
    merge compat sys_ipc instances
    consolidate compat lookup_dcookie()
    convert vmsplice to COMPAT_SYSCALL_DEFINE
    switch getrusage() to COMPAT_SYSCALL_DEFINE
    switch epoll_pwait to COMPAT_SYSCALL_DEFINE
    convert sendfile{,64} to COMPAT_SYSCALL_DEFINE
    switch signalfd{,4}() to COMPAT_SYSCALL_DEFINE
    make SYSCALL_DEFINE-generated wrappers do asmlinkage_protect
    make HAVE_SYSCALL_WRAPPERS unconditional
    consolidate cond_syscall and SYSCALL_ALIAS declarations
    teach SYSCALL_DEFINE how to deal with long long/unsigned long long
    get rid of duplicate logics in __SC_....[1-6] definitions

    Linus Torvalds
     

15 Mar, 2013

1 commit

  • We have CONFIG_SYMBOL_PREFIX, which three archs define to the string
    "_". But Al Viro broke this in "consolidate cond_syscall and
    SYSCALL_ALIAS declarations" (in linux-next), and he's not the first to
    do so.

    Using CONFIG_SYMBOL_PREFIX is awkward, since we usually just want to
    prefix it so something. So various places define helpers which are
    defined to nothing if CONFIG_SYMBOL_PREFIX isn't set:

    1) include/asm-generic/unistd.h defines __SYMBOL_PREFIX.
    2) include/asm-generic/vmlinux.lds.h defines VMLINUX_SYMBOL(sym)
    3) include/linux/export.h defines MODULE_SYMBOL_PREFIX.
    4) include/linux/kernel.h defines SYMBOL_PREFIX (which differs from #7)
    5) kernel/modsign_certificate.S defines ASM_SYMBOL(sym)
    6) scripts/modpost.c defines MODULE_SYMBOL_PREFIX
    7) scripts/Makefile.lib defines SYMBOL_PREFIX on the commandline if
    CONFIG_SYMBOL_PREFIX is set, so that we have a non-string version
    for pasting.

    (arch/h8300/include/asm/linkage.h defines SYMBOL_NAME(), too).

    Let's solve this properly:
    1) No more generic prefix, just CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX.
    2) Make linux/export.h usable from asm.
    3) Define VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR().
    4) Make everyone use them.

    Signed-off-by: Rusty Russell
    Reviewed-by: James Hogan
    Tested-by: James Hogan (metag)

    Rusty Russell
     

13 Mar, 2013

1 commit

  • In commit 887cbce0adea ("arch Kconfig: centralise ARCH_NO_VIRT_TO_BUS")
    I introduced the config sybmol HAVE_VIRT_TO_BUS and selected that where
    needed. I am not sure what I was thinking. Instead, just directly
    select VIRT_TO_BUS where it is needed.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     

04 Mar, 2013

2 commits

  • Signed-off-by: Al Viro

    Al Viro
     
  • Pull new ImgTec Meta architecture from James Hogan:
    "This adds core architecture support for Imagination's Meta processor
    cores, followed by some later miscellaneous arch/metag cleanups and
    fixes which I kept separate to ease review:

    - Support for basic Meta 1 (ATP) and Meta 2 (HTP) core architecture
    - A few fixes all over, particularly for symbol prefixes
    - A few privilege protection fixes
    - Several cleanups (setup.c includes, split out a lot of
    metag_ksyms.c)
    - Fix some missing exports
    - Convert hugetlb to use vm_unmapped_area()
    - Copy device tree to non-init memory
    - Provide dma_get_sgtable()"

    * tag 'metag-v3.9-rc1-v4' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag: (61 commits)
    metag: Provide dma_get_sgtable()
    metag: prom.h: remove declaration of metag_dt_memblock_reserve()
    metag: copy devicetree to non-init memory
    metag: cleanup metag_ksyms.c includes
    metag: move mm/init.c exports out of metag_ksyms.c
    metag: move usercopy.c exports out of metag_ksyms.c
    metag: move setup.c exports out of metag_ksyms.c
    metag: move kick.c exports out of metag_ksyms.c
    metag: move traps.c exports out of metag_ksyms.c
    metag: move irq enable out of irqflags.h on SMP
    genksyms: fix metag symbol prefix on crc symbols
    metag: hugetlb: convert to vm_unmapped_area()
    metag: export clear_page and copy_page
    metag: export metag_code_cache_flush_all
    metag: protect more non-MMU memory regions
    metag: make TXPRIVEXT bits explicit
    metag: kernel/setup.c: sort includes
    perf: Enable building perf tools for Meta
    metag: add boot time LNKGET/LNKSET check
    metag: add __init to metag_cache_probe()
    ...

    Linus Torvalds
     

03 Mar, 2013

1 commit

  • On 64 bit architectures with no efficient unaligned access, padding and
    explicit alignment must be added in various places to prevent unaligned
    64bit accesses (such as taskstats and trace ring buffer).

    However this also needs to apply to 32 bit architectures with 64 bit
    accesses requiring alignment such as metag.

    This is solved by adding a new Kconfig symbol HAVE_64BIT_ALIGNED_ACCESS
    which defaults to 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS, and can be
    explicitly selected by METAG and any other relevant architectures. This
    can be used in various places to determine whether 64bit alignment is
    required.

    Signed-off-by: James Hogan
    Cc: Al Viro
    Cc: Ingo Molnar
    Cc: Andrew Morton
    Cc: Eric Paris
    Cc: Will Drewry

    James Hogan
     

28 Feb, 2013

1 commit

  • Change it to CONFIG_HAVE_VIRT_TO_BUS and set it in all architecures
    that already provide virt_to_bus().

    Signed-off-by: Stephen Rothwell
    Reviewed-by: James Hogan
    Cc: Bjorn Helgaas
    Cc: H Hartley Sweeten
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: "David S. Miller"
    Cc: Paul Mundt
    Cc: Vineet Gupta
    Cc: James Bottomley
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     

24 Feb, 2013

1 commit

  • Pull signal handling cleanups from Al Viro:
    "This is the first pile; another one will come a bit later and will
    contain SYSCALL_DEFINE-related patches.

    - a bunch of signal-related syscalls (both native and compat)
    unified.

    - a bunch of compat syscalls switched to COMPAT_SYSCALL_DEFINE
    (fixing several potential problems with missing argument
    validation, while we are at it)

    - a lot of now-pointless wrappers killed

    - a couple of architectures (cris and hexagon) forgot to save
    altstack settings into sigframe, even though they used the
    (uninitialized) values in sigreturn; fixed.

    - microblaze fixes for delivery of multiple signals arriving at once

    - saner set of helpers for signal delivery introduced, several
    architectures switched to using those."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (143 commits)
    x86: convert to ksignal
    sparc: convert to ksignal
    arm: switch to struct ksignal * passing
    alpha: pass k_sigaction and siginfo_t using ksignal pointer
    burying unused conditionals
    make do_sigaltstack() static
    arm64: switch to generic old sigaction() (compat-only)
    arm64: switch to generic compat rt_sigaction()
    arm64: switch compat to generic old sigsuspend
    arm64: switch to generic compat rt_sigqueueinfo()
    arm64: switch to generic compat rt_sigpending()
    arm64: switch to generic compat rt_sigprocmask()
    arm64: switch to generic sigaltstack
    sparc: switch to generic old sigsuspend
    sparc: COMPAT_SYSCALL_DEFINE does all sign-extension as well as SYSCALL_DEFINE
    sparc: kill sign-extending wrappers for native syscalls
    kill sparc32_open()
    sparc: switch to use of generic old sigaction
    sparc: switch sys_compat_rt_sigaction() to COMPAT_SYSCALL_DEFINE
    mips: switch to generic sys_fork() and sys_clone()
    ...

    Linus Torvalds
     

14 Feb, 2013

1 commit

  • __ARCH_WANT_SYS_RT_SIGACTION,
    __ARCH_WANT_SYS_RT_SIGSUSPEND,
    __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND,
    __ARCH_WANT_COMPAT_SYS_SCHED_RR_GET_INTERVAL - not used anymore
    CONFIG_GENERIC_{SIGALTSTACK,COMPAT_RT_SIG{ACTION,QUEUEINFO,PENDING,PROCMASK}} -
    can be assumed always set.

    Al Viro
     

04 Feb, 2013

7 commits


22 Jan, 2013

1 commit

  • Split ftrace-based kprobes code from kprobes, and introduce
    CONFIG_(HAVE_)KPROBES_ON_FTRACE Kconfig flags.
    For the cleanup reason, this also moves kprobe_ftrace check
    into skip_singlestep.

    Link: http://lkml.kernel.org/r/20120928081520.3560.25624.stgit@ltc138.sdl.hitachi.co.jp

    Cc: Ingo Molnar
    Cc: Ananth N Mavinakayanahalli
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Frederic Weisbecker
    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt

    Masami Hiramatsu
     

21 Dec, 2012

1 commit

  • Pull signal handling cleanups from Al Viro:
    "sigaltstack infrastructure + conversion for x86, alpha and um,
    COMPAT_SYSCALL_DEFINE infrastructure.

    Note that there are several conflicts between "unify
    SS_ONSTACK/SS_DISABLE definitions" and UAPI patches in mainline;
    resolution is trivial - just remove definitions of SS_ONSTACK and
    SS_DISABLED from arch/*/uapi/asm/signal.h; they are all identical and
    include/uapi/linux/signal.h contains the unified variant."

    Fixed up conflicts as per Al.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
    alpha: switch to generic sigaltstack
    new helpers: __save_altstack/__compat_save_altstack, switch x86 and um to those
    generic compat_sys_sigaltstack()
    introduce generic sys_sigaltstack(), switch x86 and um to it
    new helper: compat_user_stack_pointer()
    new helper: restore_altstack()
    unify SS_ONSTACK/SS_DISABLE definitions
    new helper: current_user_stack_pointer()
    missing user_stack_pointer() instances
    Bury the conditionals from kernel_thread/kernel_execve series
    COMPAT_SYSCALL_DEFINE: infrastructure

    Linus Torvalds
     

20 Dec, 2012

1 commit