1. 28 Nov, 2023 2 commits
  2. 27 Nov, 2023 1 commit
    • Yonghong Song's avatar
      bpf: Fix a few selftest failures due to llvm18 change · b16904fd
      Yonghong Song authored
      With latest upstream llvm18, the following test cases failed:
      
        $ ./test_progs -j
        #13/2    bpf_cookie/multi_kprobe_link_api:FAIL
        #13/3    bpf_cookie/multi_kprobe_attach_api:FAIL
        #13      bpf_cookie:FAIL
        #77      fentry_fexit:FAIL
        #78/1    fentry_test/fentry:FAIL
        #78      fentry_test:FAIL
        #82/1    fexit_test/fexit:FAIL
        #82      fexit_test:FAIL
        #112/1   kprobe_multi_test/skel_api:FAIL
        #112/2   kprobe_multi_test/link_api_addrs:FAIL
        [...]
        #112     kprobe_multi_test:FAIL
        #356/17  test_global_funcs/global_func17:FAIL
        #356     test_global_funcs:FAIL
      
      Further analysis shows llvm upstream patch [1] is responsible for the above
      failures. For example, for function bpf_fentry_test7() in net/bpf/test_run.c,
      without [1], the asm code is:
      
        0000000000000400 <bpf_fentry_test7>:
           400: f3 0f 1e fa                   endbr64
           404: e8 00 00 00 00                callq   0x409 <bpf_fentry_test7+0x9>
           409: 48 89 f8                      movq    %rdi, %rax
           40c: c3                            retq
           40d: 0f 1f 00                      nopl    (%rax)
      
      ... and with [1], the asm code is:
      
        0000000000005d20 <bpf_fentry_test7.specialized.1>:
          5d20: e8 00 00 00 00                callq   0x5d25 <bpf_fentry_test7.specialized.1+0x5>
          5d25: c3                            retq
      
      ... and <bpf_fentry_test7.specialized.1> is called instead of <bpf_fentry_test7>
      and this caused test failures for #13/#77 etc. except #356.
      
      For test case #356/17, with [1] (progs/test_global_func17.c)), the main prog
      looks like:
      
        0000000000000000 <global_func17>:
             0:       b4 00 00 00 2a 00 00 00 w0 = 0x2a
             1:       95 00 00 00 00 00 00 00 exit
      
      ... which passed verification while the test itself expects a verification
      failure.
      
      Let us add 'barrier_var' style asm code in both places to prevent function
      specialization which caused selftests failure.
      
        [1] https://github.com/llvm/llvm-project/pull/72903Signed-off-by: default avatarYonghong Song <yonghong.song@linux.dev>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Link: https://lore.kernel.org/bpf/20231127050342.1945270-1-yonghong.song@linux.dev
      b16904fd
  3. 24 Nov, 2023 3 commits
  4. 23 Nov, 2023 28 commits
  5. 22 Nov, 2023 6 commits
    • Linus Torvalds's avatar
      Merge tag 'loongarch-fixes-6.7-1' of... · 9b6de136
      Linus Torvalds authored
      Merge tag 'loongarch-fixes-6.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
      
      Pull LoongArch fixes from Huacai Chen:
       "Fix several build errors, a potential kernel panic, a cpu hotplug
        issue and update links in documentations"
      
      * tag 'loongarch-fixes-6.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
        Docs/zh_CN/LoongArch: Update links in LoongArch introduction.rst
        Docs/LoongArch: Update links in LoongArch introduction.rst
        LoongArch: Implement constant timer shutdown interface
        LoongArch: Mark {dmw,tlb}_virt_to_page() exports as non-GPL
        LoongArch: Silence the boot warning about 'nokaslr'
        LoongArch: Add __percpu annotation for __percpu_read()/__percpu_write()
        LoongArch: Record pc instead of offset in la_abs relocation
        LoongArch: Explicitly set -fdirect-access-external-data for vmlinux
        LoongArch: Add dependency between vmlinuz.efi and vmlinux.efi
      9b6de136
    • Linus Torvalds's avatar
      Merge tag 'hyperv-fixes-signed-20231121' of... · 05c8c94e
      Linus Torvalds authored
      Merge tag 'hyperv-fixes-signed-20231121' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux
      
      Pull hyperv fixes from Wei Liu:
      
       - One fix for the KVP daemon (Ani Sinha)
      
       - Fix for the detection of E820_TYPE_PRAM in a Gen2 VM (Saurabh Sengar)
      
       - Micro-optimization for hv_nmi_unknown() (Uros Bizjak)
      
      * tag 'hyperv-fixes-signed-20231121' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
        x86/hyperv: Use atomic_try_cmpxchg() to micro-optimize hv_nmi_unknown()
        x86/hyperv: Fix the detection of E820_TYPE_PRAM in a Gen2 VM
        hv/hv_kvp_daemon: Some small fixes for handling NM keyfiles
      05c8c94e
    • Linus Torvalds's avatar
      asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation · 125b0bb9
      Linus Torvalds authored
      We really don't want to do atomic_read() or anything like that, since we
      already have the value, not the lock.  The whole point of this is that
      we've loaded the lock from memory, and we want to check whether the
      value we loaded was a locked one or not.
      
      The main use of this is the lockref code, which loads both the lock and
      the reference count in one atomic operation, and then works on that
      combined value.  With the atomic_read(), the compiler would pointlessly
      spill the value to the stack, in order to then be able to read it back
      "atomically".
      
      This is the qspinlock version of commit c6f4a900 ("asm-generic:
      ticket-lock: Optimize arch_spin_value_unlocked()") which fixed this same
      bug for ticket locks.
      
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Waiman Long <longman@redhat.com>
      Link: https://lore.kernel.org/all/CAHk-=whNRv0v6kQiV5QO6DJhjH4KEL36vWQ6Re8Csrnh4zbRkQ@mail.gmail.com/Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      125b0bb9
    • Heiner Kallweit's avatar
      Revert "net: r8169: Disable multicast filter for RTL8168H and RTL8107E" · 6a263102
      Heiner Kallweit authored
      This reverts commit efa5f131.
      
      I couldn't reproduce the reported issue. What I did, based on a pcap
      packet log provided by the reporter:
      - Used same chip version (RTL8168h)
      - Set MAC address to the one used on the reporters system
      - Replayed the EAPOL unicast packet that, according to the reporter,
        was filtered out by the mc filter.
      The packet was properly received.
      
      Therefore the root cause of the reported issue seems to be somewhere
      else. Disabling mc filtering completely for the most common chip
      version is a quite big hammer. Therefore revert the change and wait
      for further analysis results from the reporter.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6a263102
    • D. Wythe's avatar
      net/smc: avoid data corruption caused by decline · e6d71b43
      D. Wythe authored
      We found a data corruption issue during testing of SMC-R on Redis
      applications.
      
      The benchmark has a low probability of reporting a strange error as
      shown below.
      
      "Error: Protocol error, got "\xe2" as reply type byte"
      
      Finally, we found that the retrieved error data was as follows:
      
      0xE2 0xD4 0xC3 0xD9 0x04 0x00 0x2C 0x20 0xA6 0x56 0x00 0x16 0x3E 0x0C
      0xCB 0x04 0x02 0x01 0x00 0x00 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00
      0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xE2
      
      It is quite obvious that this is a SMC DECLINE message, which means that
      the applications received SMC protocol message.
      We found that this was caused by the following situations:
      
      client                  server
              ¦  clc proposal
              ------------->
              ¦  clc accept
              <-------------
              ¦  clc confirm
              ------------->
      wait llc confirm
      			send llc confirm
              ¦failed llc confirm
              ¦   x------
      (after 2s)timeout
                              wait llc confirm rsp
      
      wait decline
      
      (after 1s) timeout
                              (after 2s) timeout
              ¦   decline
              -------------->
              ¦   decline
              <--------------
      
      As a result, a decline message was sent in the implementation, and this
      message was read from TCP by the already-fallback connection.
      
      This patch double the client timeout as 2x of the server value,
      With this simple change, the Decline messages should never cross or
      collide (during Confirm link timeout).
      
      This issue requires an immediate solution, since the protocol updates
      involve a more long-term solution.
      
      Fixes: 0fb0b02b ("net/smc: adapt SMC client code to use the LLC flow")
      Signed-off-by: default avatarD. Wythe <alibuda@linux.alibaba.com>
      Reviewed-by: default avatarWen Gu <guwen@linux.alibaba.com>
      Reviewed-by: default avatarWenjia Zhang <wenjia@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6d71b43
    • Nguyen Dinh Phi's avatar
      nfc: virtual_ncidev: Add variable to check if ndev is running · 84d2db91
      Nguyen Dinh Phi authored
      syzbot reported an memory leak that happens when an skb is add to
      send_buff after virtual nci closed.
      This patch adds a variable to track if the ndev is running before
      handling new skb in send function.
      Signed-off-by: default avatarNguyen Dinh Phi <phind.uet@gmail.com>
      Reported-by: syzbot+6eb09d75211863f15e3e@syzkaller.appspotmail.com
      Closes: https://lore.kernel.org/lkml/00000000000075472b06007df4fb@google.com
      Reviewed-by: Bongsu Jeon
      Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84d2db91