[PW_SID:1089900] [v2] riscv/futex: Bound number of LL/SC retries in cmpxchg#1869
[PW_SID:1089900] [v2] riscv/futex: Bound number of LL/SC retries in cmpxchg#1869linux-riscv-bot wants to merge 2 commits into
Conversation
futex_atomic_cmpxchg_inatomic() does an unbounded LR/SC retry loop while (minimally) holding the hb lock + pf disabled. This can lead to pathological cases from unpriviledged userspace pi operations. Bound the retry loop to (arbitrarily) 128 iterations and bail: drop locks, rechedule and retry the operation, similar to the arm64 variant, as of 03110a5 ("arm64: futex: Bound number of LDXR/STXR loops in FUTEX_WAKE_OP"). Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v2] riscv/futex: Bound number of LL/SC retries in cmpxchg" |
|
Patch 1: "[v2] riscv/futex: Bound number of LL/SC retries in cmpxchg" |
|
Patch 1: "[v2] riscv/futex: Bound number of LL/SC retries in cmpxchg" |
|
Patch 1: "[v2] riscv/futex: Bound number of LL/SC retries in cmpxchg" |
|
Patch 1: "[v2] riscv/futex: Bound number of LL/SC retries in cmpxchg" |
|
Patch 1: "[v2] riscv/futex: Bound number of LL/SC retries in cmpxchg" |
|
Patch 1: "[v2] riscv/futex: Bound number of LL/SC retries in cmpxchg" |
|
Patch 1: "[v2] riscv/futex: Bound number of LL/SC retries in cmpxchg" |
|
Patch 1: "[v2] riscv/futex: Bound number of LL/SC retries in cmpxchg" |
|
Patch 1: "[v2] riscv/futex: Bound number of LL/SC retries in cmpxchg" |
|
Patch 1: "[v2] riscv/futex: Bound number of LL/SC retries in cmpxchg" |
|
Patch 1: "[v2] riscv/futex: Bound number of LL/SC retries in cmpxchg" |
2c3b264 to
2d4fcdd
Compare
PR for series 1089900 applied to workflow__riscv__fixes
Name: [v2] riscv/futex: Bound number of LL/SC retries in cmpxchg
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1089900
Version: 2