Skip to content
Snippets Groups Projects
Select Git revision
  • 7005cade1bdbb423413f8aafcbf17a1ec614a585
  • openEuler-1.0-LTS default protected
  • openEuler-22.09
  • OLK-5.10
  • openEuler-22.03-LTS
  • openEuler-22.03-LTS-Ascend
  • master
  • openEuler-22.03-LTS-LoongArch-NW
  • openEuler-22.09-HCK
  • openEuler-20.03-LTS-SP3
  • openEuler-21.09
  • openEuler-21.03
  • openEuler-20.09
  • 4.19.90-2210.5.0
  • 5.10.0-123.0.0
  • 5.10.0-60.63.0
  • 5.10.0-60.62.0
  • 4.19.90-2210.4.0
  • 5.10.0-121.0.0
  • 5.10.0-60.61.0
  • 4.19.90-2210.3.0
  • 5.10.0-60.60.0
  • 5.10.0-120.0.0
  • 5.10.0-60.59.0
  • 5.10.0-119.0.0
  • 4.19.90-2210.2.0
  • 4.19.90-2210.1.0
  • 5.10.0-118.0.0
  • 5.10.0-106.19.0
  • 5.10.0-60.58.0
  • 4.19.90-2209.6.0
  • 5.10.0-106.18.0
  • 5.10.0-106.17.0
33 results

arch

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Daniel Borkmann authored and David S. Miller committed
    Will reported that in BPF_XADD we must use a different register in stxr
    instruction for the status flag due to otherwise CONSTRAINED UNPREDICTABLE
    behavior per architecture. Reference manual says [1]:
    
      If s == t, then one of the following behaviors must occur:
    
       * The instruction is UNDEFINED.
       * The instruction executes as a NOP.
       * The instruction performs the store to the specified address, but
         the value stored is UNKNOWN.
    
    Thus, use a different temporary register for the status flag to fix it.
    
    Disassembly extract from test 226/STX_XADD_DW from test_bpf.ko:
    
      [...]
      0000003c:  c85f7d4b  ldxr x11, [x10]
      00000040:  8b07016b  add x11, x11, x7
      00000044:  c80c7d4b  stxr w12, x11, [x10]
      00000048:  35ffffac  cbnz w12, 0x0000003c
      [...]
    
      [1] https://static.docs.arm.com/ddi0487/b/DDI0487B_a_armv8_arm.pdf
    
    , p.6132
    
    Fixes: 85f68fe8 ("bpf, arm64: implement jiting of BPF_XADD")
    Reported-by: default avatarWill Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Acked-by: default avatarWill Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7005cade
    History
    Name Last commit Last update
    ..