Skip to content

RFC rseq cpu_id ABI fix

Mathieu Desnoyers linux-api linux-kselftest lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4sched: Fix unreliable rseq cpu_id for new taskskernel/sched/core.c+2 -02 replies
2/4rseq: Introduce RSEQ_FLAG_REGISTERinclude/uapi/linux/rseq.h kernel/rseq.c+51 -360 replies
3/4rseq: Introduce RSEQ_FLAG_RELIABLE_CPU_IDinclude/uapi/linux/rseq.h kernel/rseq.c+9 -016 replies
4/4rseq: selftests: Expect reliable cpu_id fieldtools/testing/selftests/rseq/rseq.c+9 -10 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchFlorian Weimer
1/4T-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH for 5.8 0/4] rseq cpu_id ABI fix

Hi,

Recent integration of rseq into glibc unearthed an issue with inaccurate cpu_id field for newly created tasks. This series includes a fix for the underlying issue (meant to be backported to stable), as well as new rseq flags to let user-space know that the kernel implements this fix, so glibc and other rseq users can use this flag to know whether they can safely use rseq without risk of corrupting their per-cpu data. This new flag could either be added only to the master branch (no stable backport) or backported to stable, depending on what seems the most appropriate.

This is an RFC aiming for quick inclusion into the Linux kernel, unless we prefer reverting the entire rseq glibc integration and try again in 6 months. Their upcoming release is on August 3rd, so we need to take a decision on this matter quickly.

Thanks,

Mathieu

Mathieu Desnoyers (4):
sched: Fix unreliable rseq cpu_id for new tasks
rseq: Introduce RSEQ_FLAG_REGISTER
rseq: Introduce RSEQ_FLAG_RELIABLE_CPU_ID
rseq: selftests: Expect reliable cpu_id field

 include/uapi/linux/rseq.h           | 15 +++++-
 kernel/rseq.c                       | 81 ++++++++++++++++-------------
 kernel/sched/core.c                 |  2 +
 tools/testing/selftests/rseq/rseq.c | 10 +++-
 4 files changed, 71 insertions(+), 37 deletions(-)
Signature · 1 line
2.17.1