20 Dec, 2014

1 commit

  • Pull perf fixes and cleanups from Ingo Molnar:
    "A kernel fix plus mostly tooling fixes, but also some tooling
    restructuring and cleanups"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (39 commits)
    perf: Fix building warning on ARM 32
    perf symbols: Fix use after free in filename__read_build_id
    perf evlist: Use roundup_pow_of_two
    tools: Adopt roundup_pow_of_two
    perf tools: Make the mmap length autotuning more robust
    tools: Adopt rounddown_pow_of_two and deps
    tools: Adopt fls_long and deps
    tools: Move bitops.h from tools/perf/util to tools/
    tools: Introduce asm-generic/bitops.h
    tools lib: Move asm-generic/bitops/find.h code to tools/include and tools/lib
    tools: Whitespace prep patches for moving bitops.h
    tools: Move code originally from asm-generic/atomic.h into tools/include/asm-generic/
    tools: Move code originally from linux/log2.h to tools/include/linux/
    tools: Move __ffs implementation to tools/include/asm-generic/bitops/__ffs.h
    perf evlist: Do not use hard coded value for a mmap_pages default
    perf trace: Let the perf_evlist__mmap autosize the number of pages to use
    perf evlist: Improve the strerror_mmap method
    perf evlist: Clarify sterror_mmap variable names
    perf evlist: Fixup brown paper bag on "hint" for --mmap-pages cmdline arg
    perf trace: Provide a better explanation when mmap fails
    ...

    Linus Torvalds
     

19 Dec, 2014

5 commits

  • Commit 85c116a6cb91 ("perf callchain: Make get_srcline fall back to sym+offset")
    introduces asprintf() call and matches '%ld' to a u64 argument, which is
    incorrect on ARM:

    CC /home/wn/util/srcline.o
    util/srcline.c: In function 'get_srcline':
    util/srcline.c:297:6: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'u64' [-Werror=format]
    cc1: all warnings being treated as errors
    make[1]: *** [/home/wn/util/srcline.o] Error 1

    In addition, all users of get_srcline() use u64 addr, and libbfd
    also use 64 bit bfd_vma as address. This patch also fix
    prototype of get_srcline() and addr2line() to use u64 addr
    instead of unsigned long.

    Signed-off-by: Wang Nan
    Acked-by: Namhyung Kim
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Link: http://lkml.kernel.org/r/1418710746-35943-1-git-send-email-wangnan0@huawei.com
    Signed-off-by: Ingo Molnar

    Wang Nan
     
  • Pull virtio fixes from Michael S Tsirkin:
    "virtio 1.0 related fixes

    Most importantly, this fixes using virtio_pci as a module.

    Further, the big virtio 1.0 conversion missed a couple of places.
    This fixes them up.

    This isn't 100% sparse-clean yet because on many architectures
    get_user triggers sparse warnings when used with __bitwise tag (when
    same tag is on both pointer and value read).

    I posted a patchset to fix it up by adding __force on all arches that
    don't already have it (many do), when that's merged these warnings
    will go away"

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    virtio_pci: restore module attributes
    mic/host: fix up virtio 1.0 APIs
    vringh: update for virtio 1.0 APIs
    vringh: 64 bit features
    tools/virtio: add virtio 1.0 in vringh_test
    tools/virtio: add virtio 1.0 in virtio_test
    tools/virtio: enable -Werror
    tools/virtio: 64 bit features
    tools/virtio: fix vringh test
    tools/virtio: more stubs
    virtio: core support for config generation
    virtio_pci: add VIRTIO_PCI_NO_LEGACY
    virtio_pci: move probe to common file
    virtio_pci_common.h: drop VIRTIO_PCI_NO_LEGACY
    virtio_config: fix virtio_cread_bytes
    virtio: set VIRTIO_CONFIG_S_FEATURES_OK on restore

    Linus Torvalds
     
  • Pull more ACPI and power management updates from Rafael Wysocki:
    "These are regression fixes (leds-gpio, ACPI backlight driver,
    operating performance points library, ACPI device enumeration
    messages, cpupower tool), other bug fixes (ACPI EC driver, ACPI device
    PM), some cleanups in the operating performance points (OPP)
    framework, continuation of CONFIG_PM_RUNTIME elimination, a couple of
    minor intel_pstate driver changes, a new MAINTAINERS entry for it and
    an ACPI fan driver change needed for better support of thermal
    management in user space.

    Specifics:

    - Fix a regression in leds-gpio introduced by a recent commit that
    inadvertently changed the name of one of the properties used by the
    driver (Fabio Estevam).

    - Fix a regression in the ACPI backlight driver introduced by a
    recent fix that missed one special case that had to be taken into
    account (Aaron Lu).

    - Drop the level of some new kernel messages from the ACPI core
    introduced by a recent commit to KERN_DEBUG which they should have
    used from the start and drop some other unuseful KERN_ERR messages
    printed by ACPI (Rafael J Wysocki).

    - Revert an incorrect commit modifying the cpupower tool (Prarit
    Bhargava).

    - Fix two regressions introduced by recent commits in the OPP library
    and clean up some existing minor issues in that code (Viresh
    Kumar).

    - Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout the
    tree (or drop it where that can be done) in order to make it
    possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki, Ulf
    Hansson, Ludovic Desroches).

    There will be one more "CONFIG_PM_RUNTIME removal" batch after this
    one, because some new uses of it have been introduced during the
    current merge window, but that should be sufficient to finally get
    rid of it.

    - Make the ACPI EC driver more robust against race conditions related
    to GPE handler installation failures (Lv Zheng).

    - Prevent the ACPI device PM core code from attempting to disable
    GPEs that it has not enabled which confuses ACPICA and makes it
    report errors unnecessarily (Rafael J Wysocki).

    - Add a "force" command line switch to the intel_pstate driver to
    make it possible to override the blacklisting of some systems in
    that driver if needed (Ethan Zhao).

    - Improve intel_pstate code documentation and add a MAINTAINERS entry
    for it (Kristen Carlson Accardi).

    - Make the ACPI fan driver create cooling device interfaces witn
    names that reflect the IDs of the ACPI device objects they are
    associated with, except for "generic" ACPI fans (PNP ID "PNP0C0B").

    That's necessary for user space thermal management tools to be able
    to connect the fans with the parts of the system they are supposed
    to be cooling properly. From Srinivas Pandruvada"

    * tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits)
    MAINTAINERS: add entry for intel_pstate
    ACPI / video: update the skip case for acpi_video_device_in_dod()
    power / PM: Eliminate CONFIG_PM_RUNTIME
    NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    ACPI / EC: Fix unexpected ec_remove_handlers() invocations
    Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()"
    tracing / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    x86 / PM: Replace CONFIG_PM_RUNTIME in io_apic.c
    PM: Remove the SET_PM_RUNTIME_PM_OPS() macro
    mmc: atmel-mci: use SET_RUNTIME_PM_OPS() macro
    PM / Kconfig: Replace PM_RUNTIME with PM in dependencies
    ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    phy / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    tty / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    ACPI / PM: Do not disable wakeup GPEs that have not been enabled
    ACPI / utils: Drop error messages from acpi_evaluate_reference()
    ...

    Linus Torvalds
     
  • This list is supposed to be sorted, to reduce patch collisions.

    Cc: Shuah Khan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • * pm-opp:
    PM / OPP: do error handling at the bottom of dev_pm_opp_add_dynamic()
    PM / OPP: handle allocation of device_opp in a separate routine
    PM / OPP: reuse find_device_opp() instead of duplicating code
    PM / OPP: Staticize __dev_pm_opp_remove()
    PM / OPP: replace kfree with kfree_rcu while freeing 'struct device_opp'

    * pm-cpufreq:
    MAINTAINERS: add entry for intel_pstate
    intel_pstate: Add a few comments
    intel_pstate: add kernel parameter to force loading

    * pm-tools:
    Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()"

    Rafael J. Wysocki
     

18 Dec, 2014

1 commit

  • Pull user namespace related fixes from Eric Biederman:
    "As these are bug fixes almost all of thes changes are marked for
    backporting to stable.

    The first change (implicitly adding MNT_NODEV on remount) addresses a
    regression that was created when security issues with unprivileged
    remount were closed. I go on to update the remount test to make it
    easy to detect if this issue reoccurs.

    Then there are a handful of mount and umount related fixes.

    Then half of the changes deal with the a recently discovered design
    bug in the permission checks of gid_map. Unix since the beginning has
    allowed setting group permissions on files to less than the user and
    other permissions (aka ---rwx---rwx). As the unix permission checks
    stop as soon as a group matches, and setgroups allows setting groups
    that can not later be dropped, results in a situtation where it is
    possible to legitimately use a group to assign fewer privileges to a
    process. Which means dropping a group can increase a processes
    privileges.

    The fix I have adopted is that gid_map is now no longer writable
    without privilege unless the new file /proc/self/setgroups has been
    set to permanently disable setgroups.

    The bulk of user namespace using applications even the applications
    using applications using user namespaces without privilege remain
    unaffected by this change. Unfortunately this ix breaks a couple user
    space applications, that were relying on the problematic behavior (one
    of which was tools/selftests/mount/unprivileged-remount-test.c).

    To hopefully prevent needing a regression fix on top of my security
    fix I rounded folks who work with the container implementations mostly
    like to be affected and encouraged them to test the changes.

    > So far nothing broke on my libvirt-lxc test bed. :-)
    > Tested with openSUSE 13.2 and libvirt 1.2.9.
    > Tested-by: Richard Weinberger

    > Tested on Fedora20 with libvirt 1.2.11, works fine.
    > Tested-by: Chen Hanxiao

    > Ok, thanks - yes, unprivileged lxc is working fine with your kernels.
    > Just to be sure I was testing the right thing I also tested using
    > my unprivileged nsexec testcases, and they failed on setgroup/setgid
    > as now expected, and succeeded there without your patches.
    > Tested-by: Serge Hallyn

    > I tested this with Sandstorm. It breaks as is and it works if I add
    > the setgroups thing.
    > Tested-by: Andy Lutomirski # breaks things as designed :("

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
    userns: Unbreak the unprivileged remount tests
    userns; Correct the comment in map_write
    userns: Allow setting gid_maps without privilege when setgroups is disabled
    userns: Add a knob to disable setgroups on a per user namespace basis
    userns: Rename id_map_mutex to userns_state_mutex
    userns: Only allow the creator of the userns unprivileged mappings
    userns: Check euid no fsuid when establishing an unprivileged uid mapping
    userns: Don't allow unprivileged creation of gid mappings
    userns: Don't allow setgroups until a gid mapping has been setablished
    userns: Document what the invariant required for safe unprivileged mappings.
    groups: Consolidate the setgroups permission checks
    mnt: Clear mnt_expire during pivot_root
    mnt: Carefully set CL_UNPRIVILEGED in clone_mnt
    mnt: Move the clear of MNT_LOCKED from copy_tree to it's callers.
    umount: Do not allow unmounting rootfs.
    umount: Disallow unprivileged mount force
    mnt: Update unprivileged remount test
    mnt: Implicitly add MNT_NODEV on remount when it was implicitly added by mount

    Linus Torvalds
     

17 Dec, 2014

19 commits

  • In filename__read_build_id, phdr points to memory in buf, which gets realloced
    before a call to fseek that uses phdr->p_offset. This change stores the value
    of p_offset before buf is realloced, so the fseek can use the value safely.

    Signed-off-by: Mitchell Krome
    Cc: Jiri Olsa
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20141216021612.GA7199@mitchell
    Signed-off-by: Arnaldo Carvalho de Melo

    Mitchell Krome
     
  • And remove the equivalent next_pow2{_l} functions.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-hl9ct3wcbs5deai3v5ljmuws@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To replace equivalent code used in the mmap_pages command line
    parameter handling in tools/perf.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-i44zs02xt4zexfxywpklo7km@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • If /proc/sys/kernel/perf_event_mlock_kb is not (power of 2 + PAGE_SIZE_in_kb)
    and we let the perf tools do mmap length autosizing based on that, then, for
    non-CAP_IPC_LOCK users when /proc/sys/kernel/perf_event_paranoid is > -1, then
    we get an -EINVAL that ends up in:

    [acme@ssdandy linux]$ trace usleep 1
    Invalid argument
    [acme@ssdandy linux]$ perf record usleep 1
    failed to mmap with 22 (Invalid argument)

    After this fix:

    [acme@ssdandy linux]$ trace usleep 1

    0.806 ( 0.006 ms): munmap(addr: 0x7f7e4740a000, len: 66467) = 0
    0.869 ( 0.002 ms): brk( ) = 0x7bb000
    0.873 ( 0.003 ms): brk(brk: 0x7dc000 ) = 0x7dc000
    0.877 ( 0.001 ms): brk( ) = 0x7dc000
    0.953 ( 0.058 ms): nanosleep(rqtp: 0x7fff26ab9420 ) = 0
    0.959 ( 0.000 ms): exit_group(
    [acme@ssdandy linux]$ perf record usleep 1
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.017 MB perf.data (~759 samples) ]
    [acme@ssdandy linux]$

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-6p6l5ou6jev6o7ymc4nn1n2a@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Will be used to make sure we pass a power of two when automatically
    setting up the perf_mmap addr range length, as the kernel code
    validating input on /proc/sys/kernel/perf_event_mlock_kb accepts any
    integer, if we plain use it to set up the mmap lenght, we may get an
    EINVAL when passing a non power of two.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-zflvep0q01dmkruf4o291l4p@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Will be used when adopting rounddown_pow_of_two.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-9m0tt5300q1ygv51hejjas82@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • So that we better mirror the kernel sources and make it available for
    other tools.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-mvfu6x753tksnto3t6412m93@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • In preparation for moving linux/bitops.h from tools/perf/util/ to
    tools/include/.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-2wuk8vahl7voz0ie55f07c9k@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To match the Linux kernel source code structure from where this code came from.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-fkbma1h04ki0zzdmp0dpgfyy@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-6xmwcvgm2rvoayv2mf9n5sf8@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To match the Linux kernel source code structure from where this code came from.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-1ldjhvioch1uczilno5e1epl@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • From tools/perf/util/include/linux, so that it becomes accessible to
    other tools/.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-uqohgzilp3ebd3cbybnf3luc@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To match the Linux kernel source code structure from where this code came from.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-gubysnp4a8hd98lxoeruak13@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • …l/git/shuah/linux-kselftest

    Pull kselftest update from Shuah Khan:
    "kselftest updates for 3.19-rc1:

    - kcmp test include file cleanup
    - kcmp change to build on all architectures
    - A light weight kselftest framework that provides a set of
    interfaces for tests to use to report results. In addition,
    several tests are updated to use the framework.
    - A new runtime system size test that prints the amount of RAM that
    the currently running system is using"

    * tag 'linux-kselftest-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
    selftest: size: Add size test for Linux kernel
    selftests/kcmp: Always try to build the test
    selftests/kcmp: Don't include kernel headers
    kcmp: Move kcmp.h into uapi
    selftests/timers: change test to use ksft framework
    selftests/kcmp: change test to use ksft framework
    selftests/ipc: change test to use ksft framework
    selftests/breakpoints: change test to use ksft framework
    selftests: add kselftest framework for uniform test reporting
    selftests/user: move test out of Makefile into a shell script
    selftests/net: move test out of Makefile into a shell script

    Linus Torvalds
     
  • So far what is in there by default is what we were using: 512KB + the
    control page, but the admin may change that, and if it does to a smaller
    value, all calls to tooling for non root users start failing, requiring
    that the user manually set --mmap_pages/-m.

    Use instead what is in /proc/sys/kernel/perf_event_mlock_kb.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-2f6mtm8xu3wo5lhkql6jdblh@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • So that normal users can run 'trace', we were using a hardcoded 1024
    pages value that was more than the default /proc/sys/kernel/perf_event_mlock_kb
    setting.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-3banj3yh0sjz41obxtgiel3a@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Considering the per user locked pages limit, improve the message when a
    user uses multiple simultaneous perf mmap calls:

    When the request is more than the current maximum:

    [acme@ssdandy linux]$ trace -m 128 usleep 1
    Error: Operation not permitted.
    Hint: Check /proc/sys/kernel/perf_event_mlock_kb (516 kB) setting.
    Hint: Tried using 516 kB.
    Hint: Try 'sudo sh -c "echo 1032 > /proc/sys/kernel/perf_event_mlock_kb"', or
    Hint: Try using a smaller -m/--mmap-pages value.
    [acme@ssdandy linux]$

    And when the limit is less than that:

    [acme@ssdandy linux]$ trace -m 512 usleep 1
    Error: Operation not permitted.
    Hint: Check /proc/sys/kernel/perf_event_mlock_kb (2056 kB) setting.
    Hint: Tried using 2052 kB.
    Hint: Try using a smaller -m/--mmap-pages value.
    [acme@ssdandy linux]$

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-yqdie3c8qvdgenwleri267d4@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Prep patch for doing further checks like when the number of pages that
    is being attempted is actually below /proc/sys/kernel/perf_event_mlock_kb but
    the operation fails because the user doesn't have CAP_IPC_LOCK.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-wetzlux7mzvofu5cuji5i71i@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • When failing due to asking for a number of mmap pages that is more than
    the max, it was suggesting that an even bigger number of mmap pages
    should be specified, doh, au contraire!

    Before:

    [acme@ssdandy linux]$ trace -m 128 usleep 1
    Error: Operation not permitted.
    Hint: Check /proc/sys/kernel/perf_event_mlock_kb (516 kB) setting.
    Hint: Tried using 516 kB.
    Hint: Try using a bigger -m/--mmap-pages value.
    [acme@ssdandy linux]$

    After:

    [acme@ssdandy linux]$ trace -m 128 usleep 1
    Error: Operation not permitted.
    Hint: Check /proc/sys/kernel/perf_event_mlock_kb (516 kB) setting.
    Hint: Tried using 516 kB.
    Hint: Try using a smaller -m/--mmap-pages value.
    [acme@ssdandy linux]$

    And to (really) clarify what happens above, when what the user requests
    is
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-8qope8lxb898narnq5kmu2gf@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

16 Dec, 2014

6 commits


15 Dec, 2014

3 commits

  • Pull char/misc driver updates from Greg KH:
    "Here's the big char/misc driver update for 3.19-rc1

    Lots of little things all over the place in different drivers, and a
    new subsystem, "coresight" has been added. Full details are in the
    shortlog"

    * tag 'char-misc-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (73 commits)
    parport: parport_pc, do not remove parent devices early
    spmi: Remove shutdown/suspend/resume kernel-doc
    carma-fpga-program: drop videobuf dependency
    carma-fpga: drop videobuf dependency
    carma-fpga-program.c: fix compile errors
    i8k: Fix temperature bug handling in i8k_get_temp()
    cxl: Name interrupts in /proc/interrupt
    CXL: Return error to PSL if IRQ demultiplexing fails & print clearer warning
    coresight-replicator: remove .owner field for driver
    coresight: fixed comments in coresight.h
    coresight: fix typo in comment in coresight-priv.h
    coresight: bindings for coresight drivers
    coresight: Adding ABI documentation
    w1: support auto-load of w1_bq27000 module.
    w1: avoid potential u16 overflow
    cn: verify msg->len before making callback
    mei: export fw status registers through sysfs
    mei: read and print all six FW status registers
    mei: txe: add cherrytrail device id
    mei: kill cached host and me csr values
    ...

    Linus Torvalds
     
  • Pull USB updates from Greg KH:
    "Here's the big set of USB and PHY patches for 3.19-rc1.

    The normal churn in the USB gadget area is in here, as well as xhci
    and other individual USB driver updates. The PHY tree is also in
    here, as there were dependancies on the USB tree.

    All of these have been in linux-next"

    * tag 'usb-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (351 commits)
    arm: omap3: twl: remove usb phy init data
    usbip: fix error handling in stub_probe()
    usb: gadget: udc: missing curly braces
    USB: mos7720: delete some unneeded code
    wusb: replace memset by memzero_explicit
    usbip: remove unneeded structure
    usb: xhci: fix comment for PORT_DEV_REMOVE
    xhci: don't use the same variable for stopped and halted rings current TD
    xhci: clear extra bits from slot context when setting max exit latency
    xhci: cleanup finish_td function
    USB: adutux: NULL dereferences on disconnect
    usb: chipidea: fix platform_no_drv_owner.cocci warnings
    usb: chipidea: Fixed a few typos in comments
    Documentation: bindings: add doc for the USB2 ChipIdea USB driver
    usb: chipidea: add a usb2 driver for ci13xxx
    usb: chipidea: fix phy handling
    usb: chipidea: remove duplicate dev_set_drvdata for host_start
    usb: chipidea: parameter 'mode' isn't needed for hw_device_reset
    usb: chipidea: add controller reset API
    usb: chipidea: remove flag CI_HDRC_REQUIRE_TRANSCEIVER
    ...

    Linus Torvalds
     
  • This reverts commit 16b7c275c055cc36218404b5d147be7f76575087.

    My previous commit 16b7c275c055 ("tools: cpupower: fix return checks for
    sysfs_get_idlestate_count()") was not correct. After looking
    at the changelog for cpupower I noticed that Thomas had changed the return of
    sysfs_get_idlestate_count() to an unsigned int to simplify the code. The
    problem is really that both he (in his original change) and I (in my new
    change) missed the obvious that sysfs_get_idlestate_count()
    can't return -ENODEV. It should just return 0 for "no c-states".

    Fixes: 16b7c275c055 (tools: cpupower: fix return checks for ...)
    Signed-off-by: Prarit Bhargava
    Signed-off-by: Rafael J. Wysocki

    Prarit Bhargava
     

14 Dec, 2014

3 commits

  • Merge second patchbomb from Andrew Morton:
    - the rest of MM
    - misc fs fixes
    - add execveat() syscall
    - new ratelimit feature for fault-injection
    - decompressor updates
    - ipc/ updates
    - fallocate feature creep
    - fsnotify cleanups
    - a few other misc things

    * emailed patches from Andrew Morton : (99 commits)
    cgroups: Documentation: fix trivial typos and wrong paragraph numberings
    parisc: percpu: update comments referring to __get_cpu_var
    percpu: update local_ops.txt to reflect this_cpu operations
    percpu: remove __get_cpu_var and __raw_get_cpu_var macros
    fsnotify: remove destroy_list from fsnotify_mark
    fsnotify: unify inode and mount marks handling
    fallocate: create FAN_MODIFY and IN_MODIFY events
    mm/cma: make kmemleak ignore CMA regions
    slub: fix cpuset check in get_any_partial
    slab: fix cpuset check in fallback_alloc
    shmdt: use i_size_read() instead of ->i_size
    ipc/shm.c: fix overly aggressive shmdt() when calls span multiple segments
    ipc/msg: increase MSGMNI, remove scaling
    ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM
    ipc/sem.c: change memory barrier in sem_lock() to smp_rmb()
    lib/decompress.c: consistency of compress formats for kernel image
    decompress_bunzip2: off by one in get_next_block()
    usr/Kconfig: make initrd compression algorithm selection not expert
    fault-inject: add ratelimit option
    ratelimit: add initialization macro
    ...

    Linus Torvalds
     
  • Signed-off-by: David Drysdale
    Cc: Meredydd Luff
    Cc: Shuah Khan
    Cc: "Eric W. Biederman"
    Cc: Andy Lutomirski
    Cc: Alexander Viro
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Kees Cook
    Cc: Arnd Bergmann
    Cc: Rich Felker
    Cc: Christoph Hellwig
    Cc: Michael Kerrisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Drysdale
     
  • This is the page owner tracking code which is introduced so far ago. It
    is resident on Andrew's tree, though, nobody tried to upstream so it
    remain as is. Our company uses this feature actively to debug memory leak
    or to find a memory hogger so I decide to upstream this feature.

    This functionality help us to know who allocates the page. When
    allocating a page, we store some information about allocation in extra
    memory. Later, if we need to know status of all pages, we can get and
    analyze it from this stored information.

    In previous version of this feature, extra memory is statically defined in
    struct page, but, in this version, extra memory is allocated outside of
    struct page. It enables us to turn on/off this feature at boottime
    without considerable memory waste.

    Although we already have tracepoint for tracing page allocation/free,
    using it to analyze page owner is rather complex. We need to enlarge the
    trace buffer for preventing overlapping until userspace program launched.
    And, launched program continually dump out the trace buffer for later
    analysis and it would change system behaviour with more possibility rather
    than just keeping it in memory, so bad for debug.

    Moreover, we can use page_owner feature further for various purposes. For
    example, we can use it for fragmentation statistics implemented in this
    patch. And, I also plan to implement some CMA failure debugging feature
    using this interface.

    I'd like to give the credit for all developers contributed this feature,
    but, it's not easy because I don't know exact history. Sorry about that.
    Below is people who has "Signed-off-by" in the patches in Andrew's tree.

    Contributor:
    Alexander Nyberg
    Mel Gorman
    Dave Hansen
    Minchan Kim
    Michal Nazarewicz
    Andrew Morton
    Jungsoo Son

    Signed-off-by: Joonsoo Kim
    Cc: Mel Gorman
    Cc: Johannes Weiner
    Cc: Minchan Kim
    Cc: Dave Hansen
    Cc: Michal Nazarewicz
    Cc: Jungsoo Son
    Cc: Ingo Molnar
    Cc: Joonsoo Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joonsoo Kim
     

13 Dec, 2014

2 commits

  • Pull documentation update from Jonathan Corbet:
    "Here's my set of accumulated documentation changes for 3.19.

    It includes a couple of additions to the coding style document, some
    fixes for minor build problems within the documentation tree, the
    relocation of the kselftest docs, and various tweaks and additions.

    A couple of changes reach outside of Documentation/; they only make
    trivial comment changes and I did my best to get the required acks.

    Complete with a shiny signed tag this time around"

    * tag 'docs-for-linus' of git://git.lwn.net/linux-2.6:
    kobject: grammar fix
    Input: xpad - update docs to reflect current state
    Documentation: Build mic/mpssd only for x86_64
    cgroups: Documentation: fix wrong cgroupfs paths
    Documentation/email-clients.txt: add info about Claws Mail
    CodingStyle: add some more error handling guidelines
    kselftest: Move the docs to the Documentation dir
    Documentation: fix formatting to make 's' happy
    Documentation: power: Fix typo in Documentation/power
    Documentation: vm: Add 1GB large page support information
    ipv4: add kernel parameter tcpmhash_entries
    Documentation: Fix a typo in mailbox.txt
    treewide: Fix typo in Documentation/DocBook/device-drivers
    CodingStyle: Add a chapter on conditional compilation

    Linus Torvalds
     
  • Pull trivial tree update from Jiri Kosina:
    "Usual stuff: documentation updates, printk() fixes, etc"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (24 commits)
    intel_ips: fix a type in error message
    cpufreq: cpufreq-dt: Move newline to end of error message
    ps3rom: fix error return code
    treewide: fix typo in printk and Kconfig
    ARM: dts: bcm63138: change "interupts" to "interrupts"
    Replace mentions of "list_struct" to "list_head"
    kernel: trace: fix printk message
    scsi: mpt2sas: fix ioctl in comment
    zbud, zswap: change module author email
    clocksource: Fix 'clcoksource' typo in comment
    arm: fix wording of "Crotex" in CONFIG_ARCH_EXYNOS3 help
    gpio: msm-v1: make boolean argument more obvious
    usb: Fix typo in usb-serial-simple.c
    PCI: Fix comment typo 'COMFIG_PM_OPS'
    powerpc: Fix comment typo 'CONIFG_8xx'
    powerpc: Fix comment typos 'CONFiG_ALTIVEC'
    clk: st: Spelling s/stucture/structure/
    isci: Spelling s/stucture/structure/
    usb: gadget: zero: Spelling s/infrastucture/infrastructure/
    treewide: Fix company name in module descriptions
    ...

    Linus Torvalds