Skip to content
  1. Aug 31, 2015
  2. Aug 30, 2015
  3. Aug 29, 2015
    • Linus Torvalds's avatar
      Merge branch 'for-4.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata · 5e7fec29
      Linus Torvalds authored
      Pull libata fixlet from Tejun Heo:
       "Simple blacklist entry addition"
      
      * 'for-4.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
        Add factory recertified Crucial M500s to blacklist
      5e7fec29
    • Linus Torvalds's avatar
      Merge tag 'sound-fix-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · b29083c5
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Here are stable fixes that have been gathered since rc8: fixes for
        HD-audio widget power control regressions since 4.1, a NULL fix for
        HD-audio HDMI, a noise fix for Conexant codecs and a quirk addition
        for USB-Audio DSD"
      
      * tag 'sound-fix-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Fix path power activation
        ALSA: hda - Check all inputs for is_active_nid_for_any()
        ALSA: hda: fix possible NULL dereference
        ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noises
        ALSA: usb: Add native DSD support for Gustard DAC-X20U
      b29083c5
    • Kan Liang's avatar
      perf evlist: Add backpointer for perf_env to evlist · 2c07144d
      Kan Liang authored
      
      
      Add backpointer to perf_env in evlist, so we can easily access env when
      processing something where we have a evsel or evlist.
      
      Suggested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarKan Liang <kan.liang@intel.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1440755289-30939-5-git-send-email-kan.liang@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2c07144d
    • Kan Liang's avatar
      perf tools: Rename perf_session_env to perf_env · ce80d3be
      Kan Liang authored
      
      
      As it is not necessarily tied to a perf.data file and needs using in
      places where a perf_session is not required.
      
      Suggested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarKan Liang <kan.liang@intel.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1440755289-30939-4-git-send-email-kan.liang@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ce80d3be
    • Jiri Olsa's avatar
      perf tools: Do not change lib/api/fs/debugfs directly · 9f30fffc
      Jiri Olsa authored
      
      
      The tracing_events_path is the variable we want to change via
      --debugfs-dir option, not the debugfs_mountpoint.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Reviewed-by: default avatarMatt Fleming <matt@codeblueprint.co.uk>
      Cc: Raphael Beamonte <raphael.beamonte@gmail.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1440596813-12844-4-git-send-email-jolsa@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9f30fffc
    • Jiri Olsa's avatar
      perf tools: Add tracing_path and remove unneeded functions · 9f44f0cc
      Jiri Olsa authored
      
      
      There's no need for find_tracing_dir, because perf already searches for
      debugfs/tracefs mount on start and populate tracing_events_path.
      
      Adding tracing_path to carry tracing dir string to be used in
      get_tracing_file instead of calling find_tracing_dir.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Raphael Beamonte <raphael.beamonte@gmail.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1440596813-12844-3-git-send-email-jolsa@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9f44f0cc
    • Masami Hiramatsu's avatar
      perf buildid: Introduce sysfs/filename__sprintf_build_id · 0b5a7935
      Masami Hiramatsu authored
      
      
      Introduce sysfs/filename__sprintf_build_id for consolidating similar
      code.
      
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20150815114259.13642.34685.stgit@localhost.localdomain
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0b5a7935
    • Arnaldo Carvalho de Melo's avatar
      perf evsel: Add a backpointer to the evlist a evsel is in · d49e4695
      Arnaldo Carvalho de Melo authored
      
      
      So that functions that deal primarily with an evsel to access
      information that concerns the whole evlist it is in.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1440677263-21954-5-git-send-email-kan.liang@intel.com
      Signed-off-by: default avatarKan Liang <kan.liang@intel.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d49e4695
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Add header with copyright and background info · a598bb5e
      Arnaldo Carvalho de Melo authored
      
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-5yqtfs728r1j1u8zmg8ufxwm@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a598bb5e
    • Tony Jones's avatar
      perf scripts python: Add new compaction-times script · 84e5d89a
      Tony Jones authored
      
      
      This patch creates a new script (compaction-times) to report time
      spent in mm compaction. It is possible to report times in nanoseconds
      (default) or microseconds (-u).
      
      The option -p will break down results by process id, -pv will further
      decompose by each compaction entry/exit.
      
      For each compaction entry/exit what is reported is controlled by the
      options:
      
        -t   report only timing
        -m   report migration stats
        -ms  report migration scanner stats
        -fs  report free scanner stats
      
      The default is to report all.
      
      Entries may be further filtered by pid, pid-range or comm (regex).
      
      The script is useful when analysing workloads that compact memory. The
      most common example will be THP allocations on systems with a lot of
      uptime that has fragmented memory.
      
      This is an example of using the script to analyse a thpscale from
      mmtests which deliberately fragments memory and allocates THP in 4
      separate threads
      
        # Recording step, one of the following;
        $ perf record -e 'compaction:mm_compaction_*' ./workload
        # or:
        $ perf script record compaction-times
      
        # Reporting: basic
        total: 2444505743ns migration: moved=357738 failed=39275
        free_scanner: scanned=2705578 isolated=387875
        migration_scanner: scanned=414426 isolated=397013
      
        # Reporting: Per task stall times
        $ perf script report compaction-times -- -t -p
        total: 2444505743ns
        6384[thpscale]: 740800017ns
        6385[thpscale]: 274119512ns
        6386[thpscale]: 832961337ns
        6383[thpscale]: 596624877ns
      
        # Reporting: Per-compaction attempts for task 6385
        $ perf script report compaction-times -- -m -pv 6385
        total: 274119512ns migration: moved=14893 failed=24285
        6385[thpscale]: 274119512ns migration: moved=14893 failed=24285
        6385[thpscale].1: 3033277ns migration: moved=511 failed=1
        6385[thpscale].2: 9592094ns migration: moved=1524 failed=12
        6385[thpscale].3: 2495587ns migration: moved=512 failed=0
        6385[thpscale].4: 2561766ns migration: moved=512 failed=0
        6385[thpscale].5: 2523521ns migration: moved=512 failed=0
        ..... output continues ...
      
      Changes since v1:
      - report stats for isolate_migratepages and isolate_freepages
        (Vlastimil Babka)
      - refactor code to achieve above
      - add help text
      - output to stdout/stderr explicitly
      
      Signed-off-by: default avatarTony Jones <tonyj@suse.com>
      Cc: Mel Gorman <mgorman@suse.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Link: http://lkml.kernel.org/r/1439840932-8933-1-git-send-email-tonyj@suse.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      84e5d89a
  4. Aug 28, 2015
    • Kan Liang's avatar
      perf stat: Get correct cpu id for print_aggr · 601083cf
      Kan Liang authored
      print_aggr() fails to print per-core/per-socket statistics after commit
      582ec082
      
       ("perf stat: Fix per-socket output bug for uncore events")
      if events have differnt cpus. Because in print_aggr(), aggr_get_id needs
      index (not cpu id) to find core/pkg id. Also, evsel cpu maps should be
      used to get aggregated id.
      
      Here is an example:
      
      Counting events cycles,uncore_imc_0/cas_count_read/. (Uncore event has
      cpumask 0,18)
      
        $ perf stat -e cycles,uncore_imc_0/cas_count_read/ -C0,18 --per-core sleep 2
      
      Without this patch, it failes to get CPU 18 result.
      
         Performance counter stats for 'CPU(s) 0,18':
      
        S0-C0           1            7526851      cycles
        S0-C0           1               1.05 MiB  uncore_imc_0/cas_count_read/
        S1-C0           0      <not counted>      cycles
        S1-C0           0      <not counted> MiB  uncore_imc_0/cas_count_read/
      
      With this patch, it can get both CPU0 and CPU18 result.
      
         Performance counter stats for 'CPU(s) 0,18':
      
        S0-C0           1            6327768      cycles
        S0-C0           1               0.47 MiB  uncore_imc_0/cas_count_read/
        S1-C0           1             330228      cycles
        S1-C0           1               0.29 MiB  uncore_imc_0/cas_count_read/
      
      Signed-off-by: default avatarKan Liang <kan.liang@intel.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Acked-by: default avatarStephane Eranian <eranian@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Fixes: 582ec082
      
       ("perf stat: Fix per-socket output bug for uncore events")
      Link: http://lkml.kernel.org/r/1435820925-51091-1-git-send-email-kan.liang@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      601083cf
    • Steven Rostedt's avatar
      tools lib traceeveent: Allow for negative numbers in print format · 1d945012
      Steven Rostedt authored
      
      
      It was reported that "%-8s" does not parse well when used in the printk
      format. The '-' is what is throwing it off. Allow that to be included.
      
      Reporter note:
      
      Example before:
      
        transhuge-stres-10730 [004]  5897.713989: mm_compaction_finished: node=0
        zone=>-<8s order=-2119871790 ret=
      
      Example after:
      
        transhuge-stres-4235  [000]   453.149280: mm_compaction_finished: node=0
        zone=ffffffff81815d7a order=9 ret=
      
      (I will send patches to fix the string handling in the tracepoints so
      it's on par with in-kernel printing via trace_pipe:)
      
        transhuge-stres-10921 [007] ...1  6307.140205: mm_compaction_finished: node=0
        zone=Normal   order=9 ret=partial
      
      Reported-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Tested-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/20150827094601.46518bcc@gandalf.local.home
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1d945012
    • Mark Drayton's avatar
      perf script: Add --[no-]-demangle/--[no-]-demangle-kernel · 77e0070d
      Mark Drayton authored
      
      
      Sometimes when post-processing output from `perf script` one does not
      want to demangle C++ symbol names. Add an option to allow this.
      
      Also add --[no-]demangle-kernel to be consistent with top/report/probe.
      
      Signed-off-by: default avatarMark Drayton <mbd@fb.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Link: http://lkml.kernel.org/r/1440616695-32340-1-git-send-email-scientist@fb.com
      Signed-off-by: default avatarYannick Brosseau <scientist@fb.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      77e0070d
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · d1ee8bc1
      Ingo Molnar authored
      
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      User visible changes:
      
        - Add support for using several Intel PT features (CYC, MTC packets), the
          relevant documentation was updated: tools/perf/Documentation/intel-pt.txt,
          briefly describing those packets, its purposes, how to configure them in
          the event config terms and relevant external documentation for further
          reading. (Adrian Hunter)
      
        - Introduce support for probing at an absolute address, for user and kernel
          'perf probe's, useful when one have the symbol maps on a developer machine
          but not on an embedded system. (Wang Nan)
      
        - Fix 'perf probe' list results when a symbol can't be found or the
          address is zero and when an offset is provided without a function (Wang Nan)
      
        - Do not print '0x (null)' in uprobes when offset is zero (Wang Nan)
      
        - Clear the progress bar at the end of a ordered_events flush, fixing
          an UI artifact when, after ordering the events the screen doesn't get
          completely redraw, for instance, when an error window covers just the
          center of the screen and waits for user input. (Arnaldo Carvalho de Melo)
      
        - Fix 'annotate' segfault by resetting the dso find_symbol cache when removing
          symbols. (Arnaldo Carvalho de Melo)
      
      Infrastructure changes:
      
        - Allow duplicate objects in the object list, just like it is possible to have
          things like this, in the kernel:
      
            drivers/Makefile:obj-$(CONFIG_PCI)        += usb/
            drivers/Makefile:obj-$(CONFIG_USB_GADGET) += usb/
      
          (Jiri Olsa)
      
        - Fix Intel PT 'instructions' sample period. (Adrian Hunter)
      
        - Prevent segfault when reading probe point with absolute address. (Wang Nan)
      
      Build fixes:
      
        - Fix tarball build broken by pt/bts. (Adrian Hunter)
      
        - Remove export.h from MANIFEST, fixing the perf tarball make target. (Jiri Olsa)
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      d1ee8bc1
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 4941b8f0
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Fix MSI/MSI-X on pseries from Guilherme"
      
      * tag 'powerpc-4.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/PCI: Disable MSI/MSI-X interrupts at PCI probe time in OF case
        PCI: Make pci_msi_setup_pci_dev() non-static for use by arch code
      4941b8f0
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · e001d708
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "Some straggler bug fixes here:
      
         1) Netlink_sendmsg() doesn't check iterator type properly in mmap
            case, from Ken-ichirou MATSUZAWA.
      
         2) Don't sleep in atomic context in bcmgenet driver, from Florian
            Fainelli.
      
         3) The pfkey_broadcast() code patch can't actually ever use anything
            other than GFP_ATOMIC.  And the cases that right now pass
            GFP_KERNEL or similar will currently trigger an RCU splat.  Just
            use GFP_ATOMIC unconditionally.  From David Ahern.
      
         4) Fix FD bit timings handling in pcan_usb driver, from Marc
            Kleine-Budde.
      
         5) Cache dst leaked in ip6_gre tunnel removal, fix from Huaibin Wang.
      
         6) Traversal into drivers/net/ethernet/renesas should be triggered by
            CONFIG_NET_VENDOR_RENESAS, not a particular driver's config
            option.  From Kazuya Mizuguchi.
      
         7) Fix regression in handling of igmp_join errors in vxlan, from
            Marcelo Ricardo Leitner.
      
         8) Make phy_{read,write}_mmd_indirect() properly take the mdio_lock
            mutex when programming the registers.  From Russell King.
      
         9) Fix non-forced handling in u32_destroy(), from WANG Cong.
      
        10) Test the EVENT_NO_RUNTIME_PM flag before it is cleared in
            usbnet_stop(), from Eugene Shatokhin.
      
        11) In sfc driver, don't fetch statistics firmware isn't capable of,
            from Bert Kenward.
      
        12) Verify ASCONF address parameter location in SCTP, from Xin Long"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        sctp: donot reset the overall_error_count in SHUTDOWN_RECEIVE state
        sctp: asconf's process should verify address parameter is in the beginning
        sfc: only use vadaptor stats if firmware is capable
        net: phy: fixed: propagate fixed link values to struct
        usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared
        drivers: net: xgene: fix: Oops in linkwatch_fire_event
        cls_u32: complete the check for non-forced case in u32_destroy()
        net: fec: use reinit_completion() in mdio accessor functions
        net: phy: add locking to phy_read_mmd_indirect()/phy_write_mmd_indirect()
        vxlan: re-ignore EADDRINUSE from igmp_join
        net: compile renesas directory if NET_VENDOR_RENESAS is configured
        ip6_gre: release cached dst on tunnel removal
        phylib: Make PHYs children of their MDIO bus, not the bus' parent.
        can: pcan_usb: don't provide CAN FD bittimings by non-FD adapters
        net: Fix RCU splat in af_key
        net: bcmgenet: fix uncleaned dma flags
        net: bcmgenet: Avoid sleeping in bcmgenet_timeout
        netlink: mmap: fix tx type check
      e001d708
    • Linus Torvalds's avatar
      Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 5c98bcce
      Linus Torvalds authored
      Pull nvdimm fixlet from Dan Williams:
       "This is a libnvdimm ABI fixup.
      
        I pushed back on this change quite hard given the late date, that it
        appears to be purely cosmetic, sysfs is not necessarily meant to be a
        user friendly UI, and the kernel interprets the reversed polarity of
        the ACPI_NFIT_MEM_ARMED flag correctly.  When this flag is set, the
        energy source of an NVDIMM is not armed and any new writes to the DIMM
        may not be preserved.
      
        However, Bob Moore warned me that it is important to get these things
        named correctly wherever they appear otherwise we run the risk of a
        less than cautious firmware engineer implementing the polarity the
        wrong way.  Once a mistake like that escapes into production platforms
        the flag becomes useless and we need to move to a new bit position.
      
        Bob has agreed to take a change through ACPICA to rename
        ACPI_NFIT_MEM_ARMED to ACPI_NFIT_MEM_NOT_ARMED, and the patch below
        from Toshi brings the sysfs representation of these flags in line with
        their respective polarities.
      
        Please pull for 4.2 as this is the first kernel to expose the ACPI
        NFIT sysfs representation, and this is likely a kernel that firmware
        developers will be using for checking out their NVDIMM enabling"
      
      * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        nfit: Clarify memory device state flags strings
      5c98bcce
    • lucien's avatar
      sctp: donot reset the overall_error_count in SHUTDOWN_RECEIVE state · f648f807
      lucien authored
      Commit f8d96052 ("sctp: Enforce retransmission limit during shutdown")
      fixed a problem with excessive retransmissions in the SHUTDOWN_PENDING by not
      resetting the association overall_error_count.  This allowed the association
      to better enforce assoc.max_retrans limit.
      
      However, the same issue still exists when the association is in SHUTDOWN_RECEIVED
      state.  In this state, HB-ACKs will continue to reset the overall_error_count
      for the association would extend the lifetime of association unnecessarily.
      
      This patch solves this by resetting the overall_error_count whenever the current
      state is small then SCTP_STATE_SHUTDOWN_PENDING.  As a small side-effect, we
      end up also handling SCTP_STATE_SHUTDOWN_ACK_SENT and SCTP_STATE_SHUTDOWN_SENT
      states, but they are not really impacted because we disable Heartbeats in those
      states.
      
      Fixes: Commit f8d96052
      
       ("sctp: Enforce retransmission limit during shutdown")
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Acked-by: default avatarVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f648f807
    • lucien's avatar
      sctp: asconf's process should verify address parameter is in the beginning · ce7b4ccc
      lucien authored
      
      
      in sctp_process_asconf(), we get address parameter from the beginning of
      the addip params. but we never check if it's really there. if the addr
      param is not there, it still can pass sctp_verify_asconf(), then to be
      handled by sctp_process_asconf(), it will not be safe.
      
      so add a code in sctp_verify_asconf() to check the address parameter is in
      the beginning, or return false to send abort.
      
      note that this can also detect multiple address parameters, and reject it.
      
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <mleitner@redhat.com>
      Acked-by: default avatarVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ce7b4ccc
    • Toshi Kani's avatar
      nfit: Clarify memory device state flags strings · 402bae59
      Toshi Kani authored
      
      
      ACPI 6.0 NFIT Memory Device State Flags in Table 5-129 defines
      NVDIMM status as follows.  These bits indicate multiple info,
      such as failures, pending event, and capability.
      
        Bit [0] set to 1 to indicate that the previous SAVE to the
        Memory Device failed.
        Bit [1] set to 1 to indicate that the last RESTORE from the
        Memory Device failed.
        Bit [2] set to 1 to indicate that platform flush of data to
        Memory Device failed. As a result, the restored data content
        may be inconsistent even if SAVE and RESTORE do not indicate
        failure.
        Bit [3] set to 1 to indicate that the Memory Device is observed
        to be not armed prior to OSPM hand off. A Memory Device is
        considered armed if it is able to accept persistent writes.
        Bit [4] set to 1 to indicate that the Memory Device observed
        SMART and health events prior to OSPM handoff.
      
      /sys/bus/nd/devices/nmemX/nfit/flags shows this flags info.
      The output strings associated with the bits are "save", "restore",
      "smart", etc., which can be confusing as they may be interpreted
      as positive status, i.e. save succeeded.
      
      Change also the dev_info() message in acpi_nfit_register_dimms()
      to be consistent with the sysfs flags strings.
      
      Reported-by: default avatarRobert Elliott <elliott@hp.com>
      Signed-off-by: default avatarToshi Kani <toshi.kani@hp.com>
      [ross: rename 'not_arm' to 'not_armed']
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      [djbw: defer adding bit5, HEALTH_ENABLED, for now]
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      402bae59
    • Bert Kenward's avatar
      sfc: only use vadaptor stats if firmware is capable · fbe4307e
      Bert Kenward authored
      
      
      Some of the stats handling code differs based on SR-IOV support,
      and SRIOV support is only available if full-featured firmware is
      used.
      Do not use vadaptor stats if firmware mode is not set to
      full-featured.
      
      Signed-off-by: default avatarShradha Shah <sshah@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fbe4307e
    • Madalin Bucur's avatar
      net: phy: fixed: propagate fixed link values to struct · 4b195360
      Madalin Bucur authored
      
      
      The fixed link values parsed from the device tree are stored in
      the struct fixed_phy member status. The struct phy_device members
      speed, duplex were not updated.
      
      Signed-off-by: default avatarMadalin Bucur <madalin.bucur@freescale.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4b195360
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 95803812
      Linus Torvalds authored
      Pull amr64 kvm fix from Will Deacon:
       "We've uncovered a nasty bug in the arm64 KVM code which allows a badly
        behaved 32-bit guest to bring down the host.  The fix is simple (it's
        what I believe we call a "brown paper bag" bug) and I don't think it
        makes sense to sit on this, particularly as Russell ended up
        triggering this rather than just somebody noticing a potential problem
        by inspection.
      
        Usually arm64 KVM changes would go via Paolo's tree, but he's on
        holiday at the moment and the deal is that anything urgent gets
        shuffled via the arch trees, so here it is.
      
        Summary:
      
        Fix arm64 KVM issue when injecting an abort into a 32-bit guest, which
        would lead to an illegal exception return at EL2 and a subsequent host
        crash"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: KVM: Fix host crash when injecting a fault into a 32bit guest
      95803812
  5. Aug 27, 2015
    • Marc Zyngier's avatar
      arm64: KVM: Fix host crash when injecting a fault into a 32bit guest · 126c69a0
      Marc Zyngier authored
      
      
      When injecting a fault into a misbehaving 32bit guest, it seems
      rather idiotic to also inject a 64bit fault that is only going
      to corrupt the guest state. This leads to a situation where we
      perform an illegal exception return at EL2 causing the host
      to crash instead of killing the guest.
      
      Just fix the stupid bug that has been there from day 1.
      
      Cc: <stable@vger.kernel.org>
      Reported-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Tested-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      126c69a0
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · f9ed72dd
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Two fixes in this pull request:
      
         - The writeback regression fix from Tejun, which has been weeks in
           the making.  This fixes a case where we would sometimes not issue
           writeback when we should have.
      
         - An older fix for a memory corruption issue in mtip32xx.  It was
           deferred since we wanted a better fix for this (driver should not
           have to handle that case), but given the timing, it's better to put
           the simple fix in for 4.2 release"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        mtip32x: fix regression introduced by blk-mq per-hctx flush
        writeback: sync_inodes_sb() must write out I_DIRTY_TIME inodes and always call wait_sb_inodes()
      f9ed72dd
  6. Aug 26, 2015
    • Guillermo A. Amaral's avatar
      Add factory recertified Crucial M500s to blacklist · 7a7184b0
      Guillermo A. Amaral authored
      
      
      The Crucial M500 is known to have issues with queued TRIM commands, the
      factory recertified SSDs use a different model number naming convention
      which causes them to get ignored by the blacklist.
      
      The new naming convention boils down to: s/Crucial_/FC/
      
      Signed-off-by: default avatarGuillermo A. Amaral <g@maral.me>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org
      7a7184b0
    • Wang Nan's avatar
      tracing/uprobes: Do not print '0x (null)' when offset is 0 · a2fb3382
      Wang Nan authored
      
      
      When manually added uprobe point with zero address, 'uprobe_events'
      output '(null)' instead of 0x00000000:
      
        # echo p:probe_libc/abs_0 /path/to/lib.bin:0x0 arg1=%ax > \
                  /sys/kernel/debug/tracing/uprobe_events
      
        # cat /sys/kernel/debug/tracing/uprobe_events
          p:probe_libc/abs_0 /path/to/lib.bin:0x          (null) arg1=%ax
      
       This patch fixes this behavior:
      
        # cat /sys/kernel/debug/tracing/uprobe_events
        p:probe_libc/abs_0 /path/to/lib.bin:0x0000000000000000
      
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1440586666-235233-8-git-send-email-wangnan0@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a2fb3382
    • Wang Nan's avatar
      perf probe: Support probing at absolute address · da15bd9d
      Wang Nan authored
      
      
      It should be useful to allow 'perf probe' probe at absolute offset of a
      target. For example, when (u)probing at a instruction of a shared object
      in a embedded system where debuginfo is not avaliable but we know the
      offset of that instruction by manually digging.
      
      This patch enables following perf probe command syntax:
      
        # perf probe 0xffffffff811e6615
      
      And
      
        # perf probe /lib/x86_64-linux-gnu/libc-2.19.so 0xeb860
      
      In the above example, we don't need a anchor symbol, so it is possible
      to compute absolute addresses using other methods and then use 'perf
      probe' to create the probing points.
      
      v1 -> v2:
        Drop the leading '+' in cmdline;
        Allow uprobing at offset 0x0;
        Improve 'perf probe -l' result when uprobe at area without debuginfo.
      
      v2 -> v3:
        Split bugfix to a separated patch.
      
      Test result:
      
        # perf probe 0xffffffff8119d175 %ax
        # perf probe sys_write %ax
        # perf probe /lib64/libc-2.18.so 0x0 %ax
        # perf probe /lib64/libc-2.18.so 0x5 %ax
        # perf probe /lib64/libc-2.18.so 0xd8e40 %ax
        # perf probe /lib64/libc-2.18.so __write %ax
        # perf probe /lib64/libc-2.18.so 0xd8e49 %ax
        # cat /sys/kernel/debug/tracing/uprobe_events
      
        p:probe_libc/abs_0 /lib64/libc-2.18.so:0x          (null) arg1=%ax
        p:probe_libc/abs_5 /lib64/libc-2.18.so:0x0000000000000005 arg1=%ax
        p:probe_libc/abs_d8e40 /lib64/libc-2.18.so:0x00000000000d8e40 arg1=%ax
        p:probe_libc/__write /lib64/libc-2.18.so:0x00000000000d8e40 arg1=%ax
        p:probe_libc/abs_d8e49 /lib64/libc-2.18.so:0x00000000000d8e49 arg1=%ax
      
        # cat /sys/kernel/debug/tracing/kprobe_events
      
        p:probe/abs_ffffffff8119d175 0xffffffff8119d175 arg1=%ax
        p:probe/sys_write _text+1692016 arg1=%ax
      
        # perf probe -l
      
        Failed to find debug information for address 5
          probe:abs_ffffffff8119d175 (on sys_write+5 with arg1)
          probe:sys_write      (on sys_write with arg1)
          probe_libc:__write   (on @unix/syscall-template.S:81 in /lib64/libc-2.18.so with arg1)
          probe_libc:abs_0     (on 0x0 in /lib64/libc-2.18.so with arg1)
          probe_libc:abs_5     (on 0x5 in /lib64/libc-2.18.so with arg1)
          probe_libc:abs_d8e40 (on @unix/syscall-template.S:81 in /lib64/libc-2.18.so with arg1)
          probe_libc:abs_d8e49 (on __GI___libc_write+9 in /lib64/libc-2.18.so with arg1)
      
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1440586666-235233-7-git-send-email-wangnan0@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      da15bd9d
    • Wang Nan's avatar
      perf probe: Fix error reported when offset without function · 6c6e024f
      Wang Nan authored
      
      
      This patch fixes a bug that, when offset is provided but function is
      lost, parse_perf_probe_point() will give a "" string as function name,
      so the checking code at the end of parse_perf_probe_point() become
      useless.  For example:
      
        # perf probe +0x1234
        Failed to find symbol  in kernel
          Error: Failed to add events.
      
      After this patch:
      
        # perf probe +0x1234
        Semantic error :Offset requires an entry function.
          Error: Command Parse Error.
      
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1440586666-235233-6-git-send-email-wangnan0@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6c6e024f
    • Wang Nan's avatar
      perf probe: Fix list result when address is zero · be07afe9
      Wang Nan authored
      
      
      When manually added uprobe point with zero address, 'perf probe -l'
      reports error. For example:
      
        # echo p:probe_libc/abs_0 /path/to/lib.bin:0x0 arg1=%ax > \
                 /sys/kernel/debug/tracing/uprobe_events
      
        # perf probe -l
        Error: Failed to show event list.
      
      Probing at 0x0 is possible and useful when lib.bin is not a normal
      shared object but is manually mapped. However, in this case kernel
      report:
      
        # cat /sys/kernel/debug/tracing/uprobe_events
        p:probe_libc/abs_0 /path/to/lib.bin:0x          (null) arg1=%ax
      
      This patch supports the above kernel output.
      
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1440586666-235233-5-git-send-email-wangnan0@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      be07afe9
    • Wang Nan's avatar
      perf probe: Fix list result when symbol can't be found · 614e2fdb
      Wang Nan authored
      
      
      'perf probe -l' reports error if it is unable find symbol through
      address. Here is an example.
      
        # echo 'p:probe_libc/abs_5 /lib64/libc.so.6:0x5' >
                /sys/kernel/debug/tracing/uprobe_events
        # cat /sys/kernel/debug/tracing/uprobe_events
         p:probe_libc/abs_5 /lib64/libc.so.6:0x0000000000000005
        # perf probe -l
          Error: Failed to show event list
      
      Also, this situation triggers a logical inconsistency in
      convert_to_perf_probe_point() that, it returns ENOMEM but actually it
      never try strdup().
      
      This patch removes !tp->module && !is_kprobe condition, so it always
      uses address to build function name if symbol not found.
      
      Test result:
      
        # perf probe -l
          probe_libc:abs_5     (on 0x5 in /lib64/libc.so.6)
      
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1440586666-235233-4-git-send-email-wangnan0@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      614e2fdb
    • Jiri Olsa's avatar
      tools build: Allow duplicate objects in the object list · 0bdede8a
      Jiri Olsa authored
      
      
      It's sometimes useful to specify the object affiliation to multiple
      config options like:
      
        libperf-$(CONFIG_X86) += tsc.o
        libperf-$(CONFIG_AUXTRACE) += tsc.o
      
      while the object itself is linked only once. Adding the support for this
      and ignoring duplicate objects in the object list.
      
      Suggested-by: default avatarArnaldo Carvalho de Melo <acme@kernel.org>
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/20150826130103.GF22670@krava.redhat.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0bdede8a
    • Jiri Olsa's avatar
      perf tools: Remove export.h from MANIFEST · 18b9a058
      Jiri Olsa authored
      
      
      We don't carry an export.h wrapper anymore, remove it from the MANIFEST
      file to avoid breaking the make perf-tar targets.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/20150826080750.GD22670@krava.redhat.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      18b9a058
    • Wang Nan's avatar
      perf probe: Prevent segfault when reading probe point with absolute address · e486367f
      Wang Nan authored
      
      
      'perf probe -l' panic if there is a manually inserted probing point with
      absolute address. For example:
      
        # echo 'p:probe/abs_ffffffff811e6615 0xffffffff811e6615' > /sys/kernel/debug/tracing/kprobe_events
        # perf probe -l
        Segmentation fault (core dumped)
      
      This patch fix this problem by considering the situation that
      "tp->symbol == NULL" in find_perf_probe_point_from_dwarf() and
      find_perf_probe_point_from_map().
      
      After this patch:
      
        # perf probe -l
        probe:abs_ffffffff811e6615 (on SyS_write+5@fs/read_write.c)
      
      And when debug info is missing:
      
        # rm -rf ~/.debug
        # mv /lib/modules/4.2.0-rc1+/build/vmlinux /lib/modules/4.2.0-rc1+/build/vmlinux.bak
        # perf probe -l
        probe:abs_ffffffff811e6615 (on sys_write+5)
      
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1440509256-193590-1-git-send-email-wangnan0@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e486367f
    • Guilherme G. Piccoli's avatar
      powerpc/PCI: Disable MSI/MSI-X interrupts at PCI probe time in OF case · 4d9aac39
      Guilherme G. Piccoli authored
      Since commit 1851617c ("PCI/MSI: Disable MSI at enumeration even if
      kernel doesn't support MSI"), the setup of dev->msi_cap/msix_cap and the
      disable of MSI/MSI-X interrupts isn't being done at PCI probe time, as
      the logic responsible for this was moved in the aforementioned commit
      from pci_device_add() to pci_setup_device(). The latter function is not
      reachable on PowerPC pseries platform during Open Firmware PCI probing
      time.
      
      This exhibits as drivers not being able to enable MSI, eg:
      
        bnx2x 0000:01:00.0: no msix capability found
      
      This patch calls pci_msi_setup_pci_dev() explicitly to disable MSI/MSI-X
      during PCI probe time on pSeries platform.
      
      Fixes: 1851617c
      
       ("PCI/MSI: Disable MSI at enumeration even if kernel doesn't support MSI")
      [mpe: Flesh out change log and clarify comment]
      Signed-off-by: default avatarGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      4d9aac39