09 Jan, 2015

2 commits

  • commit db86da7cb76f797a1a8b445166a15cb922c6ff85 upstream.

    A security fix in caused the way the unprivileged remount tests were
    using user namespaces to break. Tweak the way user namespaces are
    being used so the test works again.

    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • commit 4a44a19b470a886997d6647a77bb3e38dcbfa8c5 upstream.

    - MNT_NODEV should be irrelevant except when reading back mount flags,
    no longer specify MNT_NODEV on remount.

    - Test MNT_NODEV on devpts where it is meaningful even for unprivileged mounts.

    - Add a test to verify that remount of a prexisting mount with the same flags
    is allowed and does not change those flags.

    - Cleanup up the definitions of MS_REC, MS_RELATIME, MS_STRICTATIME that are used
    when the code is built in an environment without them.

    - Correct the test error messages when tests fail. There were not 5 tests
    that tested MS_RELATIME.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     

18 Sep, 2014

1 commit

  • commit db181ce011e3c033328608299cd6fac06ea50130 upstream.

    Kenton Varda discovered that by remounting a
    read-only bind mount read-only in a user namespace the
    MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user
    to the remount a read-only mount read-write.

    Upon review of the code in remount it was discovered that the code allowed
    nosuid, noexec, and nodev to be cleared. It was also discovered that
    the code was allowing the per mount atime flags to be changed.

    The first naive patch to fix these issues contained the flaw that using
    default atime settings when remounting a filesystem could be disallowed.

    To avoid this problems in the future add tests to ensure unprivileged
    remounts are succeeding and failing at the appropriate times.

    Acked-by: Serge E. Hallyn
    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     

10 Jul, 2014

1 commit

  • commit f35f71244da6e51db4e1f2c7e318581f498ececf upstream.

    It appears that no one ever run ffs-test on a big-endian machine,
    since it used cpu-endianess for fs_count and hs_count fields which
    should be in little-endian format. Fix by wrapping the numbers in
    cpu_to_le32.

    Signed-off-by: Michal Nazarewicz
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Michal Nazarewicz
     

01 Jun, 2014

1 commit

  • commit de04f8657de9d3351a2d5880f1f7080b23b798cf upstream.

    Commit 12e55569a244 "tools lib traceevent: Use helper trace-seq in print
    functions like kernel does" added a extra trace_seq helper to process
    string arguments like the kernel does it. But the difference between the
    kernel and the userspace library is that the kernel's trace_seq structure
    has a static allocated buffer. The userspace one has a dynamically
    allocated one. It requires a trace_seq_destroy(), otherwise it produces
    a nasty memory leak.

    Signed-off-by: Steven Rostedt
    Link: http://lkml.kernel.org/r/20140422192330.6bb09bf8@gandalf.local.home
    Signed-off-by: Jiri Olsa
    Signed-off-by: Greg Kroah-Hartman

    Steven Rostedt
     

13 May, 2014

1 commit

  • commit be40d5ccab34d579512d932fc1c6cfaffe9d1551 upstream.

    Fixes the following build failure:

    cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
    -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD
    -U_FORTIFY_SOURCE -c -o virtio_test.o virtio_test.c
    virtio_test.c: In function ‘run_test’:
    virtio_test.c:176:7: error: expected ‘)’ before ‘r’
    r = -1;
    ^

    Fixes: 53c18c9906441 (virtio_test: verify if virtqueue_kick() succeeded)
    Cc: Heinz Graalfs
    Signed-off-by: Joel Stanley
    Acked-by: Michael S. Tsirkin
    Signed-off-by: Rusty Russell
    Signed-off-by: Greg Kroah-Hartman

    Joel Stanley
     

18 Mar, 2014

1 commit

  • …it/acme/linux into perf/urgent

    Pull two 'perf bench' fixes from Arnaldo:

    * Make 'perf bench mem' (i.e. no args) mean 'run all tests' so that we can run
    all tests, not stopping at the numa ones. (Arnaldo Carvalho de Melo)

    * Fix NULL pointer dereference after last test in in "perf bench all" (Patrick Palka)

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     

17 Mar, 2014

1 commit


15 Mar, 2014

1 commit

  • The for_each_bench() macro must check that the "benchmarks" field of a
    collection is not NULL before dereferencing it because the "all"
    collection in particular has a NULL "benchmarks" field (signifying that
    it has no benchmarks to iterate over).

    This fixes this NULL pointer dereference when running "perf bench all":

    [root@ssdandy ~]# perf bench all

    # Running mem/memset benchmark...
    # Copying 1MB Bytes ...

    2.453675 GB/Sec
    12.056327 GB/Sec (with prefault)

    Segmentation fault (core dumped)
    [root@ssdandy ~]#

    Signed-off-by: Patrick Palka
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1394664051-6037-1-git-send-email-patrick@parcs.ath.cx
    Signed-off-by: Arnaldo Carvalho de Melo

    Patrick Palka
     

14 Mar, 2014

2 commits

  • If we call just:

    perf bench numa mem

    it will present the same output as:

    perf bench numa mem -h

    i.e. ask for instructions about what to run.

    While that is kinda ok, using 'run all tests' as the default, i.e.
    making 'no parms' be equivalent to:

    perf bench numa mem -a

    Will allow:

    perf bench numa all

    to actually do what is asked: i.e. run all the 'bench' tests, instead of
    responding to that by asking what to do.

    That, in turn, allows:

    perf bench all

    to actually complete, for the same reasons.

    And after that, the tests that come after that, and that at some point
    hit a NULL deref, will run, allowing me to reproduce a recently reported
    problem.

    That when you have the needed numa libraries, which wasn't the case for
    the reporter, making me a bit confused after trying to reproduce his
    report.

    So make no parms mean -a.

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

    Arnaldo Carvalho de Melo
     
  • Pull networking fixes from David Miller:
    "I know this is a bit more than you want to see, and I've told the
    wireless folks under no uncertain terms that they must severely scale
    back the extent of the fixes they are submitting this late in the
    game.

    Anyways:

    1) vmxnet3's netpoll doesn't perform the equivalent of an ISR, which
    is the correct implementation, like it should. Instead it does
    something like a NAPI poll operation. This leads to crashes.

    From Neil Horman and Arnd Bergmann.

    2) Segmentation of SKBs requires proper socket orphaning of the
    fragments, otherwise we might access stale state released by the
    release callbacks.

    This is a 5 patch fix, but the initial patches are giving
    variables and such significantly clearer names such that the
    actual fix itself at the end looks trivial.

    From Michael S. Tsirkin.

    3) TCP control block release can deadlock if invoked from a timer on
    an already "owned" socket. Fix from Eric Dumazet.

    4) In the bridge multicast code, we must validate that the
    destination address of general queries is the link local all-nodes
    multicast address. From Linus Lüssing.

    5) The x86 BPF JIT support for negative offsets puts the parameter
    for the helper function call in the wrong register. Fix from
    Alexei Starovoitov.

    6) The descriptor type used for RTL_GIGA_MAC_VER_17 chips in the
    r8169 driver is incorrect. Fix from Hayes Wang.

    7) The xen-netback driver tests skb_shinfo(skb)->gso_type bits to see
    if a packet is a GSO frame, but that's not the correct test. It
    should use skb_is_gso(skb) instead. Fix from Wei Liu.

    8) Negative msg->msg_namelen values should generate an error, from
    Matthew Leach.

    9) at86rf230 can deadlock because it takes the same lock from it's
    ISR and it's hard_start_xmit method, without disabling interrupts
    in the latter. Fix from Alexander Aring.

    10) The FEC driver's restart doesn't perform operations in the correct
    order, so promiscuous settings can get lost. Fix from Stefan
    Wahren.

    11) Fix SKB leak in SCTP cookie handling, from Daniel Borkmann.

    12) Reference count and memory leak fixes in TIPC from Ying Xue and
    Erik Hugne.

    13) Forced eviction in inet_frag_evictor() must strictly make sure all
    frags are deleted, otherwise module unload (f.e. 6lowpan) can
    crash. Fix from Florian Westphal.

    14) Remove assumptions in AF_UNIX's use of csum_partial() (which it
    uses as a hash function), which breaks on PowerPC. From Anton
    Blanchard.

    The main gist of the issue is that csum_partial() is defined only
    as a value that, once folded (f.e. via csum_fold()) produces a
    correct 16-bit checksum. It is legitimate, therefore, for
    csum_partial() to produce two different 32-bit values over the
    same data if their respective alignments are different.

    15) Fix endiannes bug in MAC address handling of ibmveth driver, also
    from Anton Blanchard.

    16) Error checks for ipv6 exthdrs offload registration are reversed,
    from Anton Nayshtut.

    17) Externally triggered ipv6 addrconf routes should count against the
    garbage collection threshold. Fix from Sabrina Dubroca.

    18) The PCI shutdown handler added to the bnx2 driver can wedge the
    chip if it was not brought up earlier already, which in particular
    causes the firmware to shut down the PHY. Fix from Michael Chan.

    19) Adjust the sanity WARN_ON_ONCE() in qdisc_list_add() because as
    currently coded it can and does trigger in legitimate situations.
    From Eric Dumazet.

    20) BNA driver fails to build on ARM because of a too large udelay()
    call, fix from Ben Hutchings.

    21) Fair-Queue qdisc holds locks during GFP_KERNEL allocations, fix
    from Eric Dumazet.

    22) The vlan passthrough ops added in the previous release causes a
    regression in source MAC address setting of outgoing headers in
    some circumstances. Fix from Peter Boström"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (70 commits)
    ipv6: Avoid unnecessary temporary addresses being generated
    eth: fec: Fix lost promiscuous mode after reconnecting cable
    bonding: set correct vlan id for alb xmit path
    at86rf230: fix lockdep splats
    net/mlx4_en: Deregister multicast vxlan steering rules when going down
    vmxnet3: fix building without CONFIG_PCI_MSI
    MAINTAINERS: add networking selftests to NETWORKING
    net: socket: error on a negative msg_namelen
    MAINTAINERS: Add tools/net to NETWORKING [GENERAL]
    packet: doc: Spelling s/than/that/
    net/mlx4_core: Load the IB driver when the device supports IBoE
    net/mlx4_en: Handle vxlan steering rules for mac address changes
    net/mlx4_core: Fix wrong dump of the vxlan offloads device capability
    xen-netback: use skb_is_gso in xenvif_start_xmit
    r8169: fix the incorrect tx descriptor version
    tools/net/Makefile: Define PACKAGE to fix build problems
    x86: bpf_jit: support negative offsets
    bridge: multicast: enable snooping on general queries only
    bridge: multicast: add sanity check for general query destination
    tcp: tcp_release_cb() should release socket ownership
    ...

    Linus Torvalds
     

12 Mar, 2014

1 commit

  • Fixes the following build problem with binutils-2.24

    gcc -Wall -O2 -c -o bpf_jit_disasm.o bpf_jit_disasm.c
    In file included from bpf_jit_disasm.c:25:0:
    /usr/include/bfd.h:35:2: error: #error config.h must be included
    before this header
    #error config.h must be included before this header

    This is similar to commit 3ce711a6abc27abce1554e1d671a8762b7187690
    "perf tools: bfd.h/libbfd detection fails with recent binutils"

    See: https://sourceware.org/bugzilla/show_bug.cgi?id=14243

    CC: David S. Miller
    CC: Daniel Borkmann
    CC: netdev@vger.kernel.org
    Acked-by: Daniel Borkmann
    Signed-off-by: Markos Chandras
    Signed-off-by: David S. Miller

    Markos Chandras
     

11 Mar, 2014

2 commits


10 Mar, 2014

3 commits

  • When trying to map a bunch of instruction addresses to their respective
    threads, I kept getting a lot of bogus entries [I forget the exact
    reason as I patched my code months ago].

    Looking through ip__resolve_ams, I noticed the check for

    if (al.sym)

    and realized, most times I have an al.map definition but sometimes an
    al.sym is undefined. In the cases where al.sym is undefined, the loop
    keeps going even though a valid al.map exists.

    Modify this check to use the more reliable al.map. This fixed my bogus
    entries.

    Signed-off-by: Don Zickus
    Cc: Jiri Olsa
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1393386227-149412-2-git-send-email-dzickus@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Don Zickus
     
  • Fixing crash in elf_section_by_name function caused by missing section
    name in elf binary.

    Reported-by: Albert Strasheim
    Signed-off-by: Jiri Olsa
    Cc: Albert Strasheim
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1393767127-599-1-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • SIGSTKFLT is not defined on alpha, mips or sparc.

    SIGEMT and SIGSWI are defined on some architectures and should be
    decoded here if so.

    Signed-off-by: Ben Hutchings
    Fixes: 8bad5b0abfdb ('perf trace: Beautify signal number arg in several syscalls')
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/1391648441.3003.101.camel@deadeye.wl.decadent.org.uk
    Signed-off-by: Arnaldo Carvalho de Melo

    Ben Hutchings
     

04 Mar, 2014

1 commit

  • Pull liblockdep fixes from Ingo Molnar:
    "A handful of build fixes for liblockdep"

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    tools/liblockdep: Use realpath for srctree and objtree
    tools/liblockdep: Add a stub for new rcu_is_watching
    tools/liblockdep: Mark runtests.sh as executable
    tools/liblockdep: Add include directory to allow tests to compile
    tools/liblockdep: Fix include of asm/hash.h
    tools/liblockdep: Fix initialization code path

    Linus Torvalds
     

28 Feb, 2014

2 commits

  • When compiling perf tool code with gcc 4.4.7 I'm getting
    following error:

    CC util/session.o
    cc1: warnings being treated as errors
    util/session.c: In function ‘perf_session_deliver_event’:
    tools/perf/util/include/linux/bitops.h:109: error: dereferencing pointer ‘p’ does break strict-aliasing rules
    tools/perf/util/include/linux/bitops.h:101: error: dereferencing pointer ‘p’ does break strict-aliasing rules
    util/session.c:697: note: initialized from here
    tools/perf/util/include/linux/bitops.h:101: note: initialized from here
    make[1]: *** [util/session.o] Error 1
    make: *** [util/session.o] Error 2

    The aliased types here are u64 and unsigned long pointers, which is safe
    for the find_first_bit processing.

    This error shows up for me only for gcc 4.4 on 32bit x86, even for
    -Wstrict-aliasing=3, while newer gcc are quiet and scream here for
    -Wstrict-aliasing={2,1}. Looks like newer gcc changed the rules for
    strict alias warnings.

    The gcc documentation offers workaround for valid aliasing by using
    __may_alias__ attribute:

    http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Type-Attributes.html

    Using this workaround for the find_first_bit function.

    Signed-off-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1393434867-20271-1-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • opensuse libbfd requires -lz -liberty to build. Add those to the BFD
    feature detection.

    Signed-off-by: Andi Kleen
    Acked-by: David Ahern
    Acked-by: Jiri Olsa
    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/1389469379-13340-2-git-send-email-andi@firstfloor.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Andi Kleen
     

27 Feb, 2014

8 commits


24 Feb, 2014

2 commits

  • Stephane reported that perf report and annotate failed to process data
    using lots of (> 500) shared libraries. It was because of the limit on
    number of open files (ulimit -n).

    Currently when perf loads a DSO, it'll look for normal and dynamic
    symbol tables. And if it fails to find out both tables, it'll iterate
    all of possible symtab types. But many of them are useless since they
    have no additional information and the problem is that it's not closing
    those files even though they're not used. Fix it.

    Reported-by: Stephane Eranian
    Signed-off-by: Namhyung Kim
    Cc: Cody P Schafer
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1392859976-32760-2-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The TUI of perf report and top support annotation, but stdio and GTK
    don't. So it should be checked before calling hist_entry__inc_addr_
    samples() to avoid wasting resources that will never be used.

    perf annotate need it regardless of UI and sort keys, so the check
    of whether to allocate resources should be on the tools that have
    annotate as an option in the TUI, 'report' and 'top', not on the
    function called by all of them.

    It caused perf annotate on ppc64 to produce zero output, since the
    buckets were not being allocated.

    Reported-by: Anton Blanchard
    Signed-off-by: Namhyung Kim
    Cc: Anton Blanchard
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1392859976-32760-1-git-send-email-namhyung@kernel.org
    [ Renamed (report,top)__needs_annotate() to ui__has_annotation() ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

23 Feb, 2014

1 commit

  • Pull perf fixes from Ingo Molnar:
    "Misc fixlets from all around the place"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86/uncore: Fix IVT/SNB-EP uncore CBOX NID filter table
    perf/x86: Correctly use FEATURE_PDCM
    perf, nmi: Fix unknown NMI warning
    perf trace: Fix ioctl 'request' beautifier build problems on !(i386 || x86_64) arches
    perf trace: Add fallback definition of EFD_SEMAPHORE
    perf list: Fix checking for supported events on older kernels
    perf tools: Handle PERF_RECORD_HEADER_EVENT_TYPE properly
    perf probe: Do not add offset twice to uprobe address
    perf/x86: Fix Userspace RDPMC switch
    perf/x86/intel/p6: Add userspace RDPMC quirk for PPro

    Linus Torvalds
     

14 Feb, 2014

1 commit

  • Supporting decoding the ioctl 'request' parameter needs more work to
    properly support more architectures, the current approach doesn't work
    on at least powerpc and sparc, as reported by Ben Hutchings in
    http://lkml.kernel.org/r/1391593985.3003.48.camel@deadeye.wl.decadent.org.uk .

    Work around that by making it to be ifdefed for the architectures known
    to work with the current, limited approach, i386 and x86_64 till better
    code is written.

    Reported-by: Ben Hutchings
    Acked-by: Ben Hutchings
    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: # 3.13 Fixes: 78645cf3ed32 ("perf trace: Initial beautifier for ioctl's 'cmd' arg")
    Link: http://lkml.kernel.org/n/tip-ss04k11insqlu329xh5g02q0@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

10 Feb, 2014

5 commits

  • glibc 2.17 is missing this on sparc, despite the fact that it's not
    architecture-specific.

    Signed-off-by: Ben Hutchings
    Fixes: 49af9e93adfa ('perf trace: Beautify eventfd2 'flags' arg')
    Cc:
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/1391648435.3003.100.camel@deadeye.wl.decadent.org.uk
    Signed-off-by: Arnaldo Carvalho de Melo

    Ben Hutchings
     
  • "perf list" listing of hardware events doesn't work on older ARM devices.
    The change enabling event detection:

    commit b41f1cec91c37eeea6fdb15effbfa24ea0a5536b
    Author: Namhyung Kim
    Date: Tue Aug 27 11:41:53 2013 +0900

    perf list: Skip unsupported events

    uses the following code in tools/perf/util/parse-events.c:

    struct perf_event_attr attr = {
    .type = type,
    .config = config,
    .disabled = 1,
    .exclude_kernel = 1,
    };

    On ARM machines pre-dating the Cortex-A15 this doesn't work, as these
    machines don't support .exclude_kernel. So starting with 3.12 "perf
    list" does not report any hardware events at all on older machines (seen
    on Rasp-Pi, Pandaboard, Beagleboard, etc).

    This version of the patch makes changes suggested by Namhyung Kim to
    check for EACCESS and retry (instead of just dropping the
    exclude_kernel) so we can properly handle machines where
    /proc/sys/kernel/perf_event_paranoid is set to 2.

    Reported-by: Chad Paradis
    Signed-off-by: Vince Weaver
    Acked-by: Namhyung Kim
    Cc: Chad Paradis
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1312301536150.28814@vincent-weaver-1.um.maine.edu
    Signed-off-by: Arnaldo Carvalho de Melo

    Vince Weaver
     
  • We removed event types from data file in following commits:

    6065210 perf tools: Remove event types framework completely
    44b3c57 perf tools: Remove event types from perf data file

    We no longer need this information, because we can get it directly from
    tracepoints.

    But we still need to handle PERF_RECORD_HEADER_EVENT_TYPE event for the
    sake of old perf data files created in pipe mode like:

    $ perf.3.4 record -o - foo >perf.data
    $ perf.312 report -i - < perf.data

    Reported-by: Stephane Eranian
    Signed-off-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1391524668-12546-1-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Fix perf-probe not to add offset value twice to uprobe probe address
    when post processing.

    The tevs[i].point.address struct member is the address of symbol+offset,
    but current perf-probe adjusts the point.address by adding the offset.

    As a result, the probe address becomes symbol+offset+offset. This may
    cause unexpected code corruption. Urgent fix is needed.

    Without this fix:
    ---
    # ./perf probe -x ./perf dso__load_vmlinux+4
    # ./perf probe -l
    probe_perf:dso__load_vmlinux (on 0x000000000006d2b8)
    # nm ./perf.orig | grep dso__load_vmlinux\$
    000000000046d0a0 T dso__load_vmlinux
    ---

    You can see the given offset is 3 but the actual probed address is
    dso__load_vmlinux+8.

    With this fix:
    ---
    # ./perf probe -x ./perf dso__load_vmlinux+4
    # ./perf probe -l
    probe_perf:dso__load_vmlinux (on 0x000000000006d2b4)
    ---

    Now the problem is fixed.

    Note: This bug is introduced by
    commit fb7345bbf7fad9bf72ef63a19c707970b9685812

    Signed-off-by: Masami Hiramatsu
    Cc: "David A. Long"
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Oleg Nesterov
    Cc: Srikar Dronamraju
    Cc: Steven Rostedt
    Cc: yrl.pp-manager.tt@hitachi.com
    Link: http://lkml.kernel.org/r/20140205051858.6519.27314.stgit@kbuild-fedora.yrl.intra.hitachi.co.jp
    Signed-off-by: Arnaldo Carvalho de Melo

    Masami Hiramatsu
     
  • Pull perf fixes from Ingo Molnar:
    "Tooling fixes, mostly related to the KASLR fallout, but also other
    fixes"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf buildid-cache: Check relocation when checking for existing kcore
    perf tools: Adjust kallsyms for relocated kernel
    perf tests: No need to set up ref_reloc_sym
    perf symbols: Prevent the use of kcore if the kernel has moved
    perf record: Get ref_reloc_sym from kernel map
    perf machine: Set up ref_reloc_sym in machine__create_kernel_maps()
    perf machine: Add machine__get_kallsyms_filename()
    perf tools: Add kallsyms__get_function_start()
    perf symbols: Fix symbol annotation for relocated kernel
    perf tools: Fix include for non x86 architectures
    perf tools: Fix AAAAARGH64 memory barriers
    perf tools: Demangle kernel and kernel module symbols too
    perf/doc: Remove mention of non-existent set_perf_event_pending() from design.txt

    Linus Torvalds
     

03 Feb, 2014

1 commit

  • Pull turbostat updates from Len Brown.

    * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
    tools/power turbostat: introduce -s to dump counters
    tools/power turbostat: remove unused command line option
    turbostat: Add option to report joules consumed per sample
    turbostat: run on HSX
    turbostat: Add a .gitignore to ignore the compiled turbostat binary
    turbostat: Clean up error handling; disambiguate error messages; use err and errx
    turbostat: Factor out common function to open file and exit on failure
    turbostat: Add a helper to parse a single int out of a file
    turbostat: Check return value of fscanf
    turbostat: Use GCC's CPUID functions to support PIC
    turbostat: Don't attempt to printf an off_t with %zx
    turbostat: Don't put unprocessed uapi headers in the include path

    Linus Torvalds
     

02 Feb, 2014

2 commits