21 Dec, 2012

2 commits

  • 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
     
  • Pull IOMMU updates from Joerg Roedel:
    "A few new features this merge-window. The most important one is
    probably, that dma-debug now warns if a dma-handle is not checked with
    dma_mapping_error by the device driver. This requires minor changes
    to some architectures which make use of dma-debug. Most of these
    changes have the respective Acks by the Arch-Maintainers.

    Besides that there are updates to the AMD IOMMU driver for refactor
    the IOMMU-Groups support and to make sure it does not trigger a
    hardware erratum.

    The OMAP changes (for which I pulled in a branch from Tony Lindgren's
    tree) have a conflict in linux-next with the arm-soc tree. The
    conflict is in the file arch/arm/mach-omap2/clock44xx_data.c which is
    deleted in the arm-soc tree. It is safe to delete the file too so
    solve the conflict. Similar changes are done in the arm-soc tree in
    the common clock framework migration. A missing hunk from the patch
    in the IOMMU tree will be submitted as a seperate patch when the
    merge-window is closed."

    * tag 'iommu-updates-v3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (29 commits)
    ARM: dma-mapping: support debug_dma_mapping_error
    ARM: OMAP4: hwmod data: ipu and dsp to use parent clocks instead of leaf clocks
    iommu/omap: Adapt to runtime pm
    iommu/omap: Migrate to hwmod framework
    iommu/omap: Keep mmu enabled when requested
    iommu/omap: Remove redundant clock handling on ISR
    iommu/amd: Remove obsolete comment
    iommu/amd: Don't use 512GB pages
    iommu/tegra: smmu: Move bus_set_iommu after probe for multi arch
    iommu/tegra: gart: Move bus_set_iommu after probe for multi arch
    iommu/tegra: smmu: Remove unnecessary PTC/TLB flush all
    tile: dma_debug: add debug_dma_mapping_error support
    sh: dma_debug: add debug_dma_mapping_error support
    powerpc: dma_debug: add debug_dma_mapping_error support
    mips: dma_debug: add debug_dma_mapping_error support
    microblaze: dma-mapping: support debug_dma_mapping_error
    ia64: dma_debug: add debug_dma_mapping_error support
    c6x: dma_debug: add debug_dma_mapping_error support
    ARM64: dma_debug: add debug_dma_mapping_error support
    intel-iommu: Prevent devices with RMRRs from being placed into SI Domain
    ...

    Linus Torvalds
     

20 Dec, 2012

2 commits


19 Dec, 2012

5 commits

  • Pull module update from Rusty Russell:
    "Nothing all that exciting; a new module-from-fd syscall for those who
    want to verify the source of the module (ChromeOS) and/or use standard
    IMA on it or other security hooks."

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    MODSIGN: Fix kbuild output when using default extra_certificates
    MODSIGN: Avoid using .incbin in C source
    modules: don't hand 0 to vmalloc.
    module: Remove a extra null character at the top of module->strtab.
    ASN.1: Use the ASN1_LONG_TAG and ASN1_INDEFINITE_LENGTH constants
    ASN.1: Define indefinite length marker constant
    moduleparam: use __UNIQUE_ID()
    __UNIQUE_ID()
    MODSIGN: Add modules_sign make target
    powerpc: add finit_module syscall.
    ima: support new kernel module syscall
    add finit_module syscall to asm-generic
    ARM: add finit_module syscall to ARM
    security: introduce kernel_module_from_file hook
    module: add flags arg to sys_finit_module()
    module: add syscall to load module from fd

    Linus Torvalds
     
  • Pull tile updates from Chris Metcalf:
    "These are a smattering of minor changes from Tilera and other folks,
    mostly in the ptrace area."

    * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    arch/tile: set CORE_DUMP_USE_REGSET on tile
    arch/tile: implement arch_ptrace using user_regset on tile
    arch/tile: implement user_regset interface on tile
    arch/tile: clean up tile-specific PTRACE_SETOPTIONS
    arch/tile: provide PT_FLAGS_COMPAT value in pt_regs
    tile/PCI: use for_each_pci_dev to simplify the code
    tilegx: remove __init from pci fixup hook

    Linus Torvalds
     
  • Following the previous patch which adds support for user_regset, tile
    can now use this feature.

    Signed-off-by: Simon Marchi
    Signed-off-by: Chris Metcalf

    Simon Marchi
     
  • This patch changes arch_ptrace on tile so that it uses user_regset
    to implement the PTRACE_GETREGS and PTRACE_SETREGS operations.

    Signed-off-by: Simon Marchi
    Signed-off-by: Chris Metcalf

    Simon Marchi
     
  • This is a basic implementation of user_regset for the tile
    architecture. It reuses the basic blocks that were already there.

    Signed-off-by: Simon Marchi
    Signed-off-by: Chris Metcalf

    Simon Marchi
     

18 Dec, 2012

1 commit

  • This function is used by sparc, powerpc tile and arm64 for compat support.
    The patch adds a generic implementation with a wrapper for PowerPC to do
    the u32->int sign extension.

    The reason for a single patch covering powerpc, tile, sparc and arm64 is
    to keep it bisectable, otherwise kernel building may fail with mismatched
    function declarations.

    Signed-off-by: Catalin Marinas
    Acked-by: Chris Metcalf [for tile]
    Acked-by: David S. Miller
    Acked-by: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Alexander Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Catalin Marinas
     

16 Dec, 2012

1 commit


15 Dec, 2012

1 commit

  • Use the newer idioms for setting PTRACE_O_xxx and PT_TRACE_xxx flags.
    Only set/clear tile-specific flags if the generic routine returns
    success, since otherwise we want to avoid setting any flags at all.
    Atomically update the ptrace flags with the new values. Eliminate
    the PT_TRACE_MASK_TILE bitmask and just shift PTRACE_O_MASK_TILE.
    Add a BUILD_BUG_ON to avoid overlapping with generic bits.

    Acked-by: Oleg Nesterov
    Signed-off-by: Chris Metcalf

    Chris Metcalf
     

14 Dec, 2012

2 commits

  • In commit d0a21265dfb5fa8a David Rientjes unified various archs'
    module_alloc implementation (including x86) and removed the graduitous
    shortcut for size == 0.

    Then, in commit de7d2b567d040e3b, Joe Perches added a warning for
    zero-length vmallocs, which can happen without kallsyms on modules
    with no init sections (eg. zlib_deflate).

    Fix this once and for all; the module code has to handle zero length
    anyway, so get it right at the caller and remove the now-gratuitous
    checks within the arch-specific module_alloc implementations.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42608
    Reported-by: Conrad Kostecki
    Cc: David Rientjes
    Cc: Joe Perches
    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • This flag is set for ptrace GETREGS or PEEKUSER for processes
    that are COMPAT, i.e. 32-bit. This allows things like strace
    to easily discover what personality to use, for example.

    Acked-by: Oleg Nesterov
    Signed-off-by: Chris Metcalf

    Chris Metcalf
     

13 Dec, 2012

3 commits

  • Use for_each_pci_dev to simplify the code.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Chris Metcalf

    Wei Yongjun
     
  • Support having the PCI bus be removed at runtime and rediscovered.
    gregkh@linuxfoundation.org argued for removing __init rather
    than converting it to __devinit.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • Pull big execve/kernel_thread/fork unification series from Al Viro:
    "All architectures are converted to new model. Quite a bit of that
    stuff is actually shared with architecture trees; in such cases it's
    literally shared branch pulled by both, not a cherry-pick.

    A lot of ugliness and black magic is gone (-3KLoC total in this one):

    - kernel_thread()/kernel_execve()/sys_execve() redesign.

    We don't do syscalls from kernel anymore for either kernel_thread()
    or kernel_execve():

    kernel_thread() is essentially clone(2) with callback run before we
    return to userland, the callbacks either never return or do
    successful do_execve() before returning.

    kernel_execve() is a wrapper for do_execve() - it doesn't need to
    do transition to user mode anymore.

    As a result kernel_thread() and kernel_execve() are
    arch-independent now - they live in kernel/fork.c and fs/exec.c
    resp. sys_execve() is also in fs/exec.c and it's completely
    architecture-independent.

    - daemonize() is gone, along with its parts in fs/*.c

    - struct pt_regs * is no longer passed to do_fork/copy_process/
    copy_thread/do_execve/search_binary_handler/->load_binary/do_coredump.

    - sys_fork()/sys_vfork()/sys_clone() unified; some architectures
    still need wrappers (ones with callee-saved registers not saved in
    pt_regs on syscall entry), but the main part of those suckers is in
    kernel/fork.c now."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (113 commits)
    do_coredump(): get rid of pt_regs argument
    print_fatal_signal(): get rid of pt_regs argument
    ptrace_signal(): get rid of unused arguments
    get rid of ptrace_signal_deliver() arguments
    new helper: signal_pt_regs()
    unify default ptrace_signal_deliver
    flagday: kill pt_regs argument of do_fork()
    death to idle_regs()
    don't pass regs to copy_process()
    flagday: don't pass regs to copy_thread()
    bfin: switch to generic vfork, get rid of pointless wrappers
    xtensa: switch to generic clone()
    openrisc: switch to use of generic fork and clone
    unicore32: switch to generic clone(2)
    score: switch to generic fork/vfork/clone
    c6x: sanitize copy_thread(), get rid of clone(2) wrapper, switch to generic clone()
    take sys_fork/sys_vfork/sys_clone prototypes to linux/syscalls.h
    mn10300: switch to generic fork/vfork/clone
    h8300: switch to generic fork/vfork/clone
    tile: switch to generic clone()
    ...

    Conflicts:
    arch/microblaze/include/asm/Kbuild

    Linus Torvalds
     

12 Dec, 2012

2 commits

  • Pull perf updates from Ingo Molnar:
    "Lots of activity:

    211 files changed, 8328 insertions(+), 4116 deletions(-)

    most of it on the tooling side.

    Main changes:

    * ftrace enhancements and fixes from Steve Rostedt.

    * uprobes fixes, cleanups and preparation for the ARM port from Oleg
    Nesterov.

    * UAPI fixes, from David Howels - prepares the arch/x86 UAPI
    transition

    * Separate perf tests into multiple objects, one per test, from Jiri
    Olsa.

    * Make hardware event translations available in sysfs, from Jiri
    Olsa.

    * Fixes to /proc/pid/maps parsing, preparatory to supporting data
    maps, from Namhyung Kim

    * Implement ui_progress for GTK, from Namhyung Kim

    * Add framework for automated perf_event_attr tests, where tools with
    different command line options will be run from a 'perf test', via
    python glue, and the perf syscall will be intercepted to verify
    that the perf_event_attr fields set by the tool are those expected,
    from Jiri Olsa

    * Add a 'link' method for hists, so that we can have the leader with
    buckets for all the entries in all the hists. This new method is
    now used in the default 'diff' output, making the sum of the
    'baseline' column be 100%, eliminating blind spots.

    * libtraceevent fixes for compiler warnings trying to make perf it
    build on some distros, like fedora 14, 32-bit, some of the warnings
    really pointed to real bugs.

    * Add a browser for 'perf script' and make it available from the
    report and annotate browsers. It does filtering to find the
    scripts that handle events found in the perf.data file used. From
    Feng Tang

    * perf inject changes to allow showing where a task sleeps, from
    Andrew Vagin.

    * Makefile improvements from Namhyung Kim.

    * Add --pre and --post command hooks in 'stat', from Peter Zijlstra.

    * Don't stop synthesizing threads when one vanishes, this is for the
    existing threads when we start a tool like trace.

    * Use sched:sched_stat_runtime to provide a thread summary, this
    produces the same output as the 'trace summary' subcommand of
    tglx's original "trace" tool.

    * Support interrupted syscalls in 'trace'

    * Add an event duration column and filter in 'trace'.

    * There are references to the man pages in some tools, so try to
    build Documentation when installing, warning the user if that is
    not possible, from Borislav Petkov.

    * Give user better message if precise is not supported, from David
    Ahern.

    * Try to find cross-built objdump path by using the session
    environment information in the perf.data file header, from Irina
    Tirdea, original patch and idea by Namhyung Kim.

    * Diplays more output on features check for make V=1, so that one can
    figure out what is happening by looking at gcc output, etc. From
    Jiri Olsa.

    * Add on_exit implementation for systems without one, e.g. Android,
    from Bernhard Rosenkraenzer.

    * Only process events for vcpus of interest, helps handling large
    number of events, from David Ahern.

    * Cross compilation fixes for Android, from Irina Tirdea.

    * Add documentation on compiling for Android, from Irina Tirdea.

    * perf diff improvements from Jiri Olsa.

    * Target (task/user/cpu/syswide) handling improvements, from Namhyung
    Kim.

    * Add support in 'trace' for tracing workload given by command line,
    from Namhyung Kim.

    * ... and much more."

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (194 commits)
    uprobes: Use percpu_rw_semaphore to fix register/unregister vs dup_mmap() race
    perf evsel: Introduce is_group_member method
    perf powerpc: Use uapi/unistd.h to fix build error
    tools: Pass the target in descend
    tools: Honour the O= flag when tool build called from a higher Makefile
    tools: Define a Makefile function to do subdir processing
    perf ui: Always compile browser setup code
    perf ui: Add ui_progress__finish()
    perf ui gtk: Implement ui_progress functions
    perf ui: Introduce generic ui_progress helper
    perf ui tui: Move progress.c under ui/tui directory
    perf tools: Add basic event modifier sanity check
    perf tools: Omit group members from perf_evlist__disable/enable
    perf tools: Ensure single disable call per event in record comand
    perf tools: Fix 'disabled' attribute config for record command
    perf tools: Fix attributes for '{}' defined event groups
    perf tools: Use sscanf for parsing /proc/pid/maps
    perf tools: Add gtk. config option for launching GTK browser
    perf tools: Fix compile error on NO_NEWT=1 build
    perf hists: Initialize all of he->stat with zeroes
    ...

    Linus Torvalds
     
  • Update the tile hugetlb_get_unmapped_area function to make use of
    vm_unmapped_area() instead of implementing a brute force search.

    [akpm@linux-foundation.org: fix build]
    Signed-off-by: Michel Lespinasse
    Reviewed-by: Rik van Riel
    Cc: Hugh Dickins
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michel Lespinasse
     

29 Nov, 2012

7 commits


28 Nov, 2012

1 commit


17 Nov, 2012

1 commit


14 Nov, 2012

1 commit

  • In order to promote interoperability between userspace tracers and ftrace,
    add a trace_clock that reports raw TSC values which will then be recorded
    in the ring buffer. Userspace tracers that also record TSCs are then on
    exactly the same time base as the kernel and events can be unambiguously
    interlaced.

    Tested: Enabled a tracepoint and the "tsc" trace_clock and saw very large
    timestamp values.

    v2:
    Move arch-specific bits out of generic code.
    v3:
    Rename "x86-tsc", cleanups
    v7:
    Generic arch bits in Kbuild.

    Google-Bug-Id: 6980623
    Link: http://lkml.kernel.org/r/1352837903-32191-1-git-send-email-dhsharp@google.com

    Acked-by: Ingo Molnar
    Cc: Masami Hiramatsu
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: David Sharp
    Signed-off-by: Steven Rostedt

    David Sharp
     

25 Oct, 2012

1 commit


24 Oct, 2012

2 commits


23 Oct, 2012

2 commits


21 Oct, 2012

2 commits


17 Oct, 2012

2 commits

  • Move the header-y and generic-y lines for ucontext.h from
    arch/tile/include/asm/Kbuild to the uapi/ Kbuild as the asm-generic variant is
    used.

    Signed-off-by: David Howells
    cc: Chris Metcalf

    David Howells
     
  • Place comments in:

    arch/mips/include/asm/Kbuild
    arch/tile/include/arch/Kbuild

    to make them non-empty so that the patch program doesn't remove them when it
    reduces them to nothing.

    Possibly they should be just deleted, but it's possible that they'll acquire
    generic-y or genhdr-y lines in future, so I'm keeping them around for the
    moment.

    Note that MIPS will compile happily if the file is deleted instead. I haven't
    tested TILE, but I suspect it will be the same there.

    Signed-off-by: David Howells
    cc: Ralf Baechle
    cc: Chris Metcalf

    David Howells
     

15 Oct, 2012

1 commit

  • Pull module signing support from Rusty Russell:
    "module signing is the highlight, but it's an all-over David Howells frenzy..."

    Hmm "Magrathea: Glacier signing key". Somebody has been reading too much HHGTTG.

    * 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (37 commits)
    X.509: Fix indefinite length element skip error handling
    X.509: Convert some printk calls to pr_devel
    asymmetric keys: fix printk format warning
    MODSIGN: Fix 32-bit overflow in X.509 certificate validity date checking
    MODSIGN: Make mrproper should remove generated files.
    MODSIGN: Use utf8 strings in signer's name in autogenerated X.509 certs
    MODSIGN: Use the same digest for the autogen key sig as for the module sig
    MODSIGN: Sign modules during the build process
    MODSIGN: Provide a script for generating a key ID from an X.509 cert
    MODSIGN: Implement module signature checking
    MODSIGN: Provide module signing public keys to the kernel
    MODSIGN: Automatically generate module signing keys if missing
    MODSIGN: Provide Kconfig options
    MODSIGN: Provide gitignore and make clean rules for extra files
    MODSIGN: Add FIPS policy
    module: signature checking hook
    X.509: Add a crypto key parser for binary (DER) X.509 certificates
    MPILIB: Provide a function to read raw data into an MPI
    X.509: Add an ASN.1 decoder
    X.509: Add simple ASN.1 grammar compiler
    ...

    Linus Torvalds
     

13 Oct, 2012

1 commit

  • Pull tile arch update from Chris Metcalf:
    "The bulk of this change is the tile uapi disintegration. There is
    also a one-line change in here to enable interrupts in
    do_work_pending() to avoid a WARN_ON in _local_bh_enable_ip()."

    * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    arch/tile: enable interrupts in do_work_pending()
    UAPI: (Scripted) Disintegrate arch/tile/include/asm
    UAPI: (Scripted) Disintegrate arch/tile/include/arch

    Linus Torvalds