1. 31 7月, 2018 3 次提交
  2. 27 7月, 2018 2 次提交
  3. 26 7月, 2018 1 次提交
  4. 25 7月, 2018 2 次提交
  5. 24 7月, 2018 4 次提交
  6. 19 7月, 2018 1 次提交
  7. 18 7月, 2018 2 次提交
  8. 17 7月, 2018 3 次提交
  9. 15 7月, 2018 5 次提交
  10. 14 7月, 2018 7 次提交
  11. 13 7月, 2018 4 次提交
  12. 12 7月, 2018 6 次提交
    • L
      tools: build: Use HOSTLDFLAGS with fixdep · 8b247a92
      Laura Abbott 提交于
      The final link of fixdep uses LDFLAGS but not the existing HOSTLDFLAGS.
      Fix this.
      Signed-off-by: NLaura Abbott <labbott@redhat.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      8b247a92
    • L
      tools: build: Fixup host c flags · 6fdbd824
      Laura Abbott 提交于
      Commit 0c3b7e42 ("tools build: Add support for host programs format")
      introduced host_c_flags which referenced CHOSTFLAGS. The actual name of the
      variable is HOSTCFLAGS. Fix this up.
      
      Fixes: 0c3b7e42 ("tools build: Add support for host programs format")
      Signed-off-by: NLaura Abbott <labbott@redhat.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      6fdbd824
    • P
      tools build: fix # escaping in .cmd files for future Make · 9feeb638
      Paul Menzel 提交于
      In 2016 GNU Make made a backwards incompatible change to the way '#'
      characters were handled in Makefiles when used inside functions or
      macros:
      
      http://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b57
      
      Due to this change, when attempting to run `make prepare' I get a
      spurious make syntax error:
      
          /home/earnest/linux/tools/objtool/.fixdep.o.cmd:1: *** missing separator.  Stop.
      
      When inspecting `.fixdep.o.cmd' it includes two lines which use
      unescaped comment characters at the top:
      
          \# cannot find fixdep (/home/earnest/linux/tools/objtool//fixdep)
          \# using basic dep data
      
      This is because `tools/build/Build.include' prints these '\#'
      characters:
      
          printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
          printf '\# using basic dep data\n\n' >> $(dot-target).cmd;           \
      
      This completes commit 9564a8cf ("Kbuild: fix # escaping in .cmd files
      for future Make").
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=197847
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: stable@vger.kernel.org
      Signed-off-by: NPaul Menzel <pmenzel@molgen.mpg.de>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      9feeb638
    • P
      selftests: forwarding: mirror_gre_nh: Unset rp_filter on host VRF · 42801298
      Petr Machata 提交于
      The mirrored packets arrive at $h3 encapsulated in GRE/IPv4, with IP
      address from 192.0.2.128/28 network. However the interface is configured
      as a member of 192.0.2.160/28 and there's no route directing traffic
      from the former network through that interface. Correspondingly, the RP
      filter on the VRF rejects it.
      
      Therefore turn off the VRF's RP filter.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      42801298
    • D
      bpf: fix panic due to oob in bpf_prog_test_run_skb · 6e6fddc7
      Daniel Borkmann 提交于
      sykzaller triggered several panics similar to the below:
      
        [...]
        [  248.851531] BUG: KASAN: use-after-free in _copy_to_user+0x5c/0x90
        [  248.857656] Read of size 985 at addr ffff8808017ffff2 by task a.out/1425
        [...]
        [  248.865902] CPU: 1 PID: 1425 Comm: a.out Not tainted 4.18.0-rc4+ #13
        [  248.865903] Hardware name: Supermicro SYS-5039MS-H12TRF/X11SSE-F, BIOS 2.1a 03/08/2018
        [  248.865905] Call Trace:
        [  248.865910]  dump_stack+0xd6/0x185
        [  248.865911]  ? show_regs_print_info+0xb/0xb
        [  248.865913]  ? printk+0x9c/0xc3
        [  248.865915]  ? kmsg_dump_rewind_nolock+0xe4/0xe4
        [  248.865919]  print_address_description+0x6f/0x270
        [  248.865920]  kasan_report+0x25b/0x380
        [  248.865922]  ? _copy_to_user+0x5c/0x90
        [  248.865924]  check_memory_region+0x137/0x190
        [  248.865925]  kasan_check_read+0x11/0x20
        [  248.865927]  _copy_to_user+0x5c/0x90
        [  248.865930]  bpf_test_finish.isra.8+0x4f/0xc0
        [  248.865932]  bpf_prog_test_run_skb+0x6a0/0xba0
        [...]
      
      After scrubbing the BPF prog a bit from the noise, turns out it called
      bpf_skb_change_head() for the lwt_xmit prog with headroom of 2. Nothing
      wrong in that, however, this was run with repeat >> 0 in bpf_prog_test_run_skb()
      and the same skb thus keeps changing until the pskb_expand_head() called
      from skb_cow() keeps bailing out in atomic alloc context with -ENOMEM.
      So upon return we'll basically have 0 headroom left yet blindly do the
      __skb_push() of 14 bytes and keep copying data from there in bpf_test_finish()
      out of bounds. Fix to check if we have enough headroom and if pskb_expand_head()
      fails, bail out with error.
      
      Another bug independent of this fix (but related in triggering above) is
      that BPF_PROG_TEST_RUN should be reworked to reset the skb/xdp buffer to
      it's original state from input as otherwise repeating the same test in a
      loop won't work for benchmarking when underlying input buffer is getting
      changed by the prog each time and reused for the next run leading to
      unexpected results.
      
      Fixes: 1cf1cae9 ("bpf: introduce BPF_PROG_TEST_RUN command")
      Reported-by: syzbot+709412e651e55ed96498@syzkaller.appspotmail.com
      Reported-by: syzbot+54f39d6ab58f39720a55@syzkaller.appspotmail.com
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      6e6fddc7
    • J
      tools: bpftool: allow reuse of maps with bpftool prog load · 3ff5a4dc
      Jakub Kicinski 提交于
      Add map parameter to prog load which will allow reuse of existing
      maps instead of creating new ones.
      
      We need feature detection and compat code for reallocarray, since
      it's not available in many libc versions.
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: NQuentin Monnet <quentin.monnet@netronome.com>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      3ff5a4dc