1. 05 6月, 2017 1 次提交
  2. 03 6月, 2017 2 次提交
  3. 26 5月, 2017 1 次提交
  4. 18 5月, 2017 3 次提交
  5. 16 5月, 2017 2 次提交
  6. 13 5月, 2017 1 次提交
  7. 12 5月, 2017 6 次提交
  8. 09 5月, 2017 4 次提交
  9. 04 5月, 2017 6 次提交
  10. 03 5月, 2017 9 次提交
    • J
      tools/kvm: fix top level makefile · ee5f7d79
      Justin M. Forbes 提交于
      The top level tools/Makefile includes kvm_stat as a target in help, but
      the actual target is missing.
      Signed-off-by: NJustin M. Forbes <jforbes@fedoraproject.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ee5f7d79
    • A
      selftests/bpf: get rid of -D__x86_64__ · 1c2dd16a
      Alexei Starovoitov 提交于
      -D__x86_64__ workaround was used to make /usr/include/features.h
      to follow expected path through the system include headers.
      This is not portable.
      Instead define dummy stubs.h which is used by 'clang -target bpf'
      
      Fixes: 6882804c ("selftests/bpf: add a test for overlapping packet range checks")
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1c2dd16a
    • Y
      selftests/bpf: add a test case to check verifier pointer arithmetic · 6ead18fb
      Yonghong Song 提交于
      With clang/llvm 4.0+, the test case is able to generate
      the following pattern:
      ....
      440: (b7) r1 = 15
      441: (05) goto pc+73
      515: (79) r6 = *(u64 *)(r10 -152)
      516: (bf) r7 = r10
      517: (07) r7 += -112
      518: (bf) r2 = r7
      519: (0f) r2 += r1
      520: (71) r1 = *(u8 *)(r8 +0)
      521: (73) *(u8 *)(r2 +45) = r1
      ....
      
      commit 332270fd ("bpf: enhance verifier to understand stack
      pointer arithmetic") improved verifier to handle such a pattern.
      This patch adds a C test case to actually generate such a pattern.
      A dummy tracepoint interface is used to load the program
      into the kernel.
      Signed-off-by: NYonghong Song <yhs@fb.com>
      Acked-by: NMartin KaFai Lau <kafai@fb.com>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6ead18fb
    • T
      perf config: Refactor a duplicated code for obtaining config file name · 4341ec6b
      Taeung Song 提交于
      We were doing the same sequence to figure out what is the config
      pathname to use, fix it by doing it before those two uses.
      Signed-off-by: NTaeung Song <treeze.taeung@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/1493209268-5543-2-git-send-email-treeze.taeung@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4341ec6b
    • P
      perf symbols: Allow user probes on versioned symbols · d8040645
      Paul Clarke 提交于
      Symbol versioning, as in glibc, results in symbols being defined as:
      
        <real symbol>@[@]<version>
      
      (Note that "@@" identifies a default symbol, if the symbol name is
      repeated.)
      
      perf is currently unable to deal with this, and is unable to create user
      probes at such symbols:
      
        --
        $ nm /lib/powerpc64le-linux-gnu/libpthread.so.0 | grep pthread_create
        0000000000008d30 t __pthread_create_2_1
        0000000000008d30 T pthread_create@@GLIBC_2.17
        $ /usr/bin/sudo perf probe -v -x /lib/powerpc64le-linux-gnu/libpthread.so.0 pthread_create
        probe-definition(0): pthread_create
        symbol:pthread_create file:(null) line:0 offset:0 return:0 lazy:(null)
        0 arguments
        Open Debuginfo file: /usr/lib/debug/lib/powerpc64le-linux-gnu/libpthread-2.19.so
        Try to find probe point from debuginfo.
        Probe point 'pthread_create' not found.
           Error: Failed to add events. Reason: No such file or directory (Code: -2)
        --
      
      One is not able to specify the fully versioned symbol, either, due to
      syntactic conflicts with other uses of "@" by perf:
      
        --
        $ /usr/bin/sudo perf probe -v -x /lib/powerpc64le-linux-gnu/libpthread.so.0 pthread_create@@GLIBC_2.17
        probe-definition(0): pthread_create@@GLIBC_2.17
        Semantic error :SRC@SRC is not allowed.
        0 arguments
           Error: Command Parse Error. Reason: Invalid argument (Code: -22)
        --
      
      This patch ignores versioning for default symbols, thus allowing probes to be
      created for these symbols:
      
        --
        $ /usr/bin/sudo ./perf probe -x /lib/powerpc64le-linux-gnu/libpthread.so.0 pthread_create
        Added new event:
           probe_libpthread:pthread_create (on pthread_create in /lib/powerpc64le-linux-gnu/libpthread-2.19.so)
      
        You can now use it in all perf tools, such as:
      
                 perf record -e probe_libpthread:pthread_create -aR sleep 1
      
        $ /usr/bin/sudo ./perf record -e probe_libpthread:pthread_create -aR ./test 2
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.052 MB perf.data (2 samples) ]
        $ /usr/bin/sudo ./perf script
                     test  2915 [000] 19124.260729: probe_libpthread:pthread_create: (3fff99248d38)
                     test  2916 [000] 19124.260962: probe_libpthread:pthread_create: (3fff99248d38)
        $ /usr/bin/sudo ./perf probe --del=probe_libpthread:pthread_create
        Removed event: probe_libpthread:pthread_create
        --
      
      Committer note:
      
      Change the variable storing the result of strlen() to 'int', to fix the build
      on debian:experimental-x-mipsel, fedora:24-x-ARC-uClibc, ubuntu:16.04-x-arm,
      etc:
      
        util/symbol.c: In function 'symbol__match_symbol_name':
        util/symbol.c:422:11: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
           if (len < versioning - name)
                   ^
      Signed-off-by: NPaul A. Clarke <pc@us.ibm.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Link: http://lkml.kernel.org/r/c2b18d9c-17f8-9285-4868-f58b6359ccac@us.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d8040645
    • A
      perf symbols: Accept symbols starting at address 0 · b843f62a
      Arnaldo Carvalho de Melo 提交于
      That is the case of _text on s390, and we have some functions that return an
      address, using address zero to report problems, oops.
      
      This would lead the symbol loading routines to not use "_text" as the reference
      relocation symbol, or the first symbol for the kernel, but use instead
      "_stext", that is at the same address on x86_64 and others, but not on s390:
      
        [acme@localhost perf-4.11.0-rc6]$ head -15 /proc/kallsyms
        0000000000000000 T _text
        0000000000000418 t iplstart
        0000000000000800 T start
        000000000000080a t .base
        000000000000082e t .sk8x8
        0000000000000834 t .gotr
        0000000000000842 t .cmd
        0000000000000846 t .parm
        000000000000084a t .lowcase
        0000000000010000 T startup
        0000000000010010 T startup_kdump
        0000000000010214 t startup_kdump_relocated
        0000000000011000 T startup_continue
        00000000000112a0 T _ehead
        0000000000100000 T _stext
        [acme@localhost perf-4.11.0-rc6]$
      
      Which in turn would make 'perf test vmlinux' to fail because it wouldn't find
      the symbols before "_stext" in kallsyms.
      
      Fix it by using the return value only for errors and storing the
      address, when the symbol is successfully found, in a provided pointer
      arg.
      
      Before this patch:
      
      After:
      
        [acme@localhost perf-4.11.0-rc6]$ tools/perf/perf test -v 1
         1: vmlinux symtab matches kallsyms            :
        --- start ---
        test child forked, pid 40693
        Looking at the vmlinux_path (8 entries long)
        Using /usr/lib/debug/lib/modules/3.10.0-654.el7.s390x/vmlinux for symbols
        ERR : 0: _text not on kallsyms
        ERR : 0x418: iplstart not on kallsyms
        ERR : 0x800: start not on kallsyms
        ERR : 0x80a: .base not on kallsyms
        ERR : 0x82e: .sk8x8 not on kallsyms
        ERR : 0x834: .gotr not on kallsyms
        ERR : 0x842: .cmd not on kallsyms
        ERR : 0x846: .parm not on kallsyms
        ERR : 0x84a: .lowcase not on kallsyms
        ERR : 0x10000: startup not on kallsyms
        ERR : 0x10010: startup_kdump not on kallsyms
        ERR : 0x10214: startup_kdump_relocated not on kallsyms
        ERR : 0x11000: startup_continue not on kallsyms
        ERR : 0x112a0: _ehead not on kallsyms
        <SNIP warnings>
        test child finished with -1
        ---- end ----
        vmlinux symtab matches kallsyms: FAILED!
        [acme@localhost perf-4.11.0-rc6]$
      
      After:
      
        [acme@localhost perf-4.11.0-rc6]$ tools/perf/perf test -v 1
         1: vmlinux symtab matches kallsyms            :
        --- start ---
        test child forked, pid 47160
        <SNIP warnings>
        test child finished with 0
        ---- end ----
        vmlinux symtab matches kallsyms: Ok
        [acme@localhost perf-4.11.0-rc6]$
      Reported-by: NMichael Petlan <mpetlan@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-9x9bwgd3btwdk1u51xie93fz@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b843f62a
    • S
      tools/virtio: fix build breakage · 0a12ae40
      Sekhar Nori 提交于
      Previous commit ("virtio: add context flag to find vqs")
      added a new 'context' flag to vring_new_virtqueue(), but the
      corresponding API in tools/virtio/ is not updated causing
      build errors due to conflicting declarations.
      
      Bring code in tools/virtio in sync with that in kernel.
      
      I have used 'false' for the value of the new boolean 'context'
      flag as that seems to be the best way to preserve existing
      behavior.
      
      Tested with:
      
      $ make -C tools/virtio clean all ARCH=x86
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      0a12ae40
    • D
      ringtest: fix an assert statement · 4f6d9bfc
      Dan Carpenter 提交于
      There is an || vs && typo so the assert can never be triggered.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NJason Wang <jasowang@redhat.com>
      4f6d9bfc
    • T
      selftests: watchdog: accept multiple params on command line · 1dbdcc81
      Timur Tabi 提交于
      Watchdog drivers are not required to retain programming information,
      such as timeouts, after the watchdog device is closed.  Therefore,
      the watchdog test should be able to perform multiple actions after
      opening the watchdog device.
      
      For example, to set the timeout to 10s and ping every 5s:
      
      	watchdog-test -t 10 -p 5 -e
      
      Also, display the periodic decimal point only if the keep-alive call
      succeeds.
      Signed-off-by: NTimur Tabi <timur@codeaurora.org>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      1dbdcc81
  11. 02 5月, 2017 3 次提交
  12. 01 5月, 2017 1 次提交
  13. 29 4月, 2017 1 次提交
    • D
      bpf: provide a generic macro for percpu values for selftests · f3515b5d
      Daniel Borkmann 提交于
      To overcome bugs as described and fixed in 89087c45 ("bpf: Fix
      values type used in test_maps"), provide a generic BPF_DECLARE_PERCPU()
      and bpf_percpu() accessor macro for all percpu map values used in
      tests.
      
      Declaring variables works as follows (also works for structs):
      
        BPF_DECLARE_PERCPU(uint32_t, my_value);
      
      They can then be accessed normally as uint32_t type through:
      
        bpf_percpu(my_value, <cpu_nr>)
      
      For example:
      
        bpf_percpu(my_value, 0)++;
      
      Implicitly, we make sure that the passed type is allocated and aligned
      by gcc at least on a 8-byte boundary, so that it works together with
      the map lookup/update syscall for percpu maps. We use it as a usage
      example in test_maps, so that others are free to adapt this into their
      code when necessary.
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f3515b5d
新手
引导
客服 返回
顶部