kvmarm.lists.cs.columbia.edu archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] kvm/selftests: Two rseq_test fixes
@ 2022-08-09  6:06 Gavin Shan
  2022-08-09  6:06 ` [PATCH 1/2] KVM: selftests: Make rseq compatible with glibc-2.35 Gavin Shan
  2022-08-09  6:06 ` [PATCH 2/2] KVM: selftests: Use getcpu() instead of sched_getcpu() in rseq_test Gavin Shan
  0 siblings, 2 replies; 25+ messages in thread
From: Gavin Shan @ 2022-08-09  6:06 UTC (permalink / raw)
  To: kvmarm
  Cc: fweimer, shan.gavin, kvm, maz, linux-kernel, andrew.jones,
	mathieu.desnoyers, yihyu, linux-kselftest, pbonzini

There are two issues in current rseq_test implementation and the
series intends to fix them:

- From glibc-2.35, rseq information is registered by TLS. It means
  rseq_test is unable to register its own rseq information. PATCH[01]
  fixes the issue by reuse TLS's rseq information if needed.

- sched_getcpu() relies on glibc's implementation and it can simply
  returns the CPU ID cached in the rseq information. In this case,
  it's pointless to compare the return value from sched_getcpu()
  and that fetched from rseq information. PATCH[02] fixes the issue
  by replacing sched_getcpu() with getcpu().

Gavin Shan (2):
  KVM: selftests: Make rseq compatible with glibc-2.35
  KVM: selftests: Use getcpu() instead of sched_getcpu() in rseq_test

 tools/testing/selftests/kvm/rseq_test.c | 62 ++++++++++++++++++-------
 1 file changed, 44 insertions(+), 18 deletions(-)

-- 
2.23.0

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2022-08-10 23:53 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-09  6:06 [PATCH 0/2] kvm/selftests: Two rseq_test fixes Gavin Shan
2022-08-09  6:06 ` [PATCH 1/2] KVM: selftests: Make rseq compatible with glibc-2.35 Gavin Shan
2022-08-09  6:33   ` Florian Weimer
2022-08-09  8:45     ` Gavin Shan
2022-08-09  7:16       ` Florian Weimer
2022-08-09  9:27         ` Gavin Shan
2022-08-09 12:21           ` Mathieu Desnoyers
2022-08-09 13:44             ` Mathieu Desnoyers
2022-08-09 21:38               ` Sean Christopherson
2022-08-10  0:37                 ` Gavin Shan
2022-08-10 12:29                   ` Mathieu Desnoyers
2022-08-10 12:35                     ` Paolo Bonzini
2022-08-10 12:13                 ` Mathieu Desnoyers
2022-08-10 23:52                   ` Gavin Shan
2022-08-10  9:14             ` Paolo Bonzini
2022-08-10  9:59               ` Gavin Shan
2022-08-10 12:17               ` Mathieu Desnoyers
2022-08-10 12:19                 ` Paolo Bonzini
2022-08-10 23:34                   ` Gavin Shan
2022-08-09  6:06 ` [PATCH 2/2] KVM: selftests: Use getcpu() instead of sched_getcpu() in rseq_test Gavin Shan
2022-08-09  6:35   ` Florian Weimer
2022-08-09  7:17     ` Florian Weimer
2022-08-09  8:46       ` Gavin Shan
2022-08-09 20:53         ` Sean Christopherson
2022-08-10  0:45           ` Gavin Shan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).