1. 24 1月, 2019 1 次提交
  2. 09 1月, 2019 4 次提交
    • A
      tools include uapi: Sync linux/if_link.h copy with the kernel sources · 498c203d
      Arnaldo Carvalho de Melo 提交于
      To pick the changes from:
      
        a428afe8 ("net: bridge: add support for user-controlled bool options")
        a025fb5f ("geneve: Allow configuration of DF behaviour")
        b4d30697 ("vxlan: Allow configuration of DF behaviour")
      
      Silencing this tools/ build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h'
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Cc: Stefano Brivio <sbrivio@redhat.com>
      Link: https://lkml.kernel.org/n/tip-wq410s2wuqv5k980bidw0ju8@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      498c203d
    • A
      tools include uapi: Sync linux/vhost.h with the kernel sources · ee412f14
      Arnaldo Carvalho de Melo 提交于
      To get the changes in:
      
        4b867132 ("vhost: split structs into a separate header file")
      
      Silencing this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/vhost.h' differs from latest version at 'include/uapi/linux/vhost.h'
        diff -u tools/include/uapi/linux/vhost.h include/uapi/linux/vhost.h
      
      Those didn't touch things used in tools, i.e. the following continues
      working:
      
        $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh
        static const char *vhost_virtio_ioctl_cmds[] = {
                [0x00] = "SET_FEATURES",
                [0x01] = "SET_OWNER",
                [0x02] = "RESET_OWNER",
                [0x03] = "SET_MEM_TABLE",
                [0x04] = "SET_LOG_BASE",
                [0x07] = "SET_LOG_FD",
                [0x10] = "SET_VRING_NUM",
                [0x11] = "SET_VRING_ADDR",
                [0x12] = "SET_VRING_BASE",
                [0x13] = "SET_VRING_ENDIAN",
                [0x14] = "GET_VRING_ENDIAN",
                [0x20] = "SET_VRING_KICK",
                [0x21] = "SET_VRING_CALL",
                [0x22] = "SET_VRING_ERR",
                [0x23] = "SET_VRING_BUSYLOOP_TIMEOUT",
                [0x24] = "GET_VRING_BUSYLOOP_TIMEOUT",
                [0x25] = "SET_BACKEND_FEATURES",
                [0x30] = "NET_SET_BACKEND",
                [0x40] = "SCSI_SET_ENDPOINT",
                [0x41] = "SCSI_CLEAR_ENDPOINT",
                [0x42] = "SCSI_GET_ABI_VERSION",
                [0x43] = "SCSI_SET_EVENTS_MISSED",
                [0x44] = "SCSI_GET_EVENTS_MISSED",
                [0x60] = "VSOCK_SET_GUEST_CID",
                [0x61] = "VSOCK_SET_RUNNING",
        };
        static const char *vhost_virtio_ioctl_read_cmds[] = {
                [0x00] = "GET_FEATURES",
                [0x12] = "GET_VRING_BASE",
                [0x26] = "GET_BACKEND_FEATURES",
        };
        $
      
      At some point in the eBPFication of perf, using something like:
      
      	# perf trace -e ioctl(cmd=VHOST_VRING*)
      
      Will setup a BPF filter right at the raw_syscalls:sys_enter tracepoint,
      i.e. filtering at the origin.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-g28usrt7l59lwq3wuh8vzbig@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ee412f14
    • A
      tools include uapi: Sync linux/fs.h copy with the kernel sources · fdc42ca1
      Arnaldo Carvalho de Melo 提交于
      To get the changes in:
      
        e262e32d ("vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled")
      
      That made the mount flags string table generator to switch to using
      mount.h instead.
      
      This silences the following perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/fs.h' differs from latest version at 'include/uapi/linux/fs.h'
        diff -u tools/include/uapi/linux/fs.h include/uapi/linux/fs.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-mosz81pa6iwxko4p2owbm3ss@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fdc42ca1
    • A
      tools include uapi: Grab a copy of linux/mount.h · 250bfc87
      Arnaldo Carvalho de Melo 提交于
      We were using a copy of uapi/linux/fs.h to create the mount syscall
      'flags' string table to use in 'perf trace', to convert from the number
      obtained via the raw_syscalls:sys_enter into a string, using
      tools/perf/trace/beauty/mount_flags.sh, but in e262e32d ("vfs:
      Suppress MS_* flag defs within the kernel unless explicitly enabled")
      those defines got moved to linux/mount.h, so grab a copy of mount.h too.
      
      Keep the uapi/linux/fs.h as we'll use it for the SEEK_ constants.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-i2ricmpwpdrpukfq3298jr1z@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      250bfc87
  3. 04 1月, 2019 3 次提交
  4. 29 12月, 2018 1 次提交
  5. 19 12月, 2018 2 次提交
  6. 18 12月, 2018 2 次提交
  7. 15 12月, 2018 1 次提交
  8. 13 12月, 2018 1 次提交
  9. 12 12月, 2018 1 次提交
  10. 11 12月, 2018 1 次提交
  11. 10 12月, 2018 2 次提交
  12. 06 12月, 2018 1 次提交
  13. 05 12月, 2018 1 次提交
  14. 04 12月, 2018 1 次提交
  15. 01 12月, 2018 4 次提交
    • D
      bpf: Add BPF_F_ANY_ALIGNMENT. · e9ee9efc
      David Miller 提交于
      Often we want to write tests cases that check things like bad context
      offset accesses.  And one way to do this is to use an odd offset on,
      for example, a 32-bit load.
      
      This unfortunately triggers the alignment checks first on platforms
      that do not set CONFIG_EFFICIENT_UNALIGNED_ACCESS.  So the test
      case see the alignment failure rather than what it was testing for.
      
      It is often not completely possible to respect the original intention
      of the test, or even test the same exact thing, while solving the
      alignment issue.
      
      Another option could have been to check the alignment after the
      context and other validations are performed by the verifier, but
      that is a non-trivial change to the verifier.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      e9ee9efc
    • J
      bpf: Improve socket lookup reuseport documentation · d74286d2
      Joe Stringer 提交于
      Improve the wording around socket lookup for reuseport sockets, and
      ensure that both bpf.h headers are in sync.
      Signed-off-by: NJoe Stringer <joe@wand.net.nz>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      d74286d2
    • J
      bpf: Support sk lookup in netns with id 0 · f71c6143
      Joe Stringer 提交于
      David Ahern and Nicolas Dichtel report that the handling of the netns id
      0 is incorrect for the BPF socket lookup helpers: rather than finding
      the netns with id 0, it is resolving to the current netns. This renders
      the netns_id 0 inaccessible.
      
      To fix this, adjust the API for the netns to treat all negative s32
      values as a lookup in the current netns (including u64 values which when
      truncated to s32 become negative), while any values with a positive
      value in the signed 32-bit integer space would result in a lookup for a
      socket in the netns corresponding to that id. As before, if the netns
      with that ID does not exist, no socket will be found. Any netns outside
      of these ranges will fail to find a corresponding socket, as those
      values are reserved for future usage.
      Signed-off-by: NJoe Stringer <joe@wand.net.nz>
      Acked-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: NJoey Pabalinas <joeypabalinas@gmail.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      f71c6143
    • D
      bpf: fix pointer offsets in context for 32 bit · b7df9ada
      Daniel Borkmann 提交于
      Currently, pointer offsets in three BPF context structures are
      broken in two scenarios: i) 32 bit compiled applications running
      on 64 bit kernels, and ii) LLVM compiled BPF programs running
      on 32 bit kernels. The latter is due to BPF target machine being
      strictly 64 bit. So in each of the cases the offsets will mismatch
      in verifier when checking / rewriting context access. Fix this by
      providing a helper macro __bpf_md_ptr() that will enforce padding
      up to 64 bit and proper alignment, and for context access a macro
      bpf_ctx_range_ptr() which will cover full 64 bit member range on
      32 bit archs. For flow_keys, we additionally need to force the
      size check to sizeof(__u64) as with other pointer types.
      
      Fixes: d58e468b ("flow_dissector: implements flow dissector BPF hook")
      Fixes: 4f738adb ("bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data")
      Fixes: 2dbb9b9e ("bpf: Introduce BPF_PROG_TYPE_SK_REUSEPORT")
      Reported-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Tested-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      b7df9ada
  16. 29 11月, 2018 1 次提交
  17. 28 11月, 2018 1 次提交
    • T
      x86/speculation: Add prctl() control for indirect branch speculation · 9137bb27
      Thomas Gleixner 提交于
      Add the PR_SPEC_INDIRECT_BRANCH option for the PR_GET_SPECULATION_CTRL and
      PR_SET_SPECULATION_CTRL prctls to allow fine grained per task control of
      indirect branch speculation via STIBP and IBPB.
      
      Invocations:
       Check indirect branch speculation status with
       - prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, 0, 0, 0);
      
       Enable indirect branch speculation with
       - prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_ENABLE, 0, 0);
      
       Disable indirect branch speculation with
       - prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_DISABLE, 0, 0);
      
       Force disable indirect branch speculation with
       - prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_FORCE_DISABLE, 0, 0);
      
      See Documentation/userspace-api/spec_ctrl.rst.
      Signed-off-by: NTim Chen <tim.c.chen@linux.intel.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NIngo Molnar <mingo@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: David Woodhouse <dwmw@amazon.co.uk>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Casey Schaufler <casey.schaufler@intel.com>
      Cc: Asit Mallick <asit.k.mallick@intel.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Jon Masters <jcm@redhat.com>
      Cc: Waiman Long <longman9394@gmail.com>
      Cc: Greg KH <gregkh@linuxfoundation.org>
      Cc: Dave Stewart <david.c.stewart@intel.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: stable@vger.kernel.org
      Link: https://lkml.kernel.org/r/20181125185005.866780996@linutronix.de
      9137bb27
  18. 23 11月, 2018 1 次提交
  19. 21 11月, 2018 2 次提交
  20. 20 11月, 2018 1 次提交
  21. 09 11月, 2018 1 次提交
  22. 31 10月, 2018 6 次提交
  23. 30 10月, 2018 1 次提交