[lkml]   [2018]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/1] rseq/selftests: add __rseq_abi misalignment check
----- On Aug 6, 2018, at 7:47 AM, gor wrote:

> While implementing rseq selftest for s390 a glibc problem with tls
> variables alignment has been discovered. It turned out to be a general
> problem affecting several architectures. The bug opened for this problem:
> There is no fix yet. On s390 __rseq_abi ends up aligned to 0x10 instead
> of 0x20 which makes rseq selftest fail every time.
> The change proposed adds __rseq_abi misalignment check, produces user
> friendly message and skips the test.

That's a very unfortunate situation. I'm concerned about adding glibc-specific
error messages in rseq selftests though. I'm curious to hear what others think
about this.

I would have thought simply improving rseq registration error handling from
having the test program return nonzero to add a perror() in there would be
a more generic way to handle this.

Regarding the message printed by your check: "you need a fixed version of glibc to
run this test". I disagree with it. Someone can effectively run the test on
a bogus glibc and it serves its purpose: it reports that glibc is buggy.

I would understand adding this kind of test in an user-facing application or
library to detect bogus glibc (in fact I've used similar approaches in lttng-ust
to detect bogus compilers), but why add this to skip a selftest program, which
sole purpose is to test the stack underneath it ?



> Vasily Gorbik (1):
> rseq/selftests: add __rseq_abi misalignment check
> tools/testing/selftests/rseq/rseq.c | 19 +++++++++++++++++++
> .../testing/selftests/rseq/ | 4 ++--
> 2 files changed, 21 insertions(+), 2 deletions(-)
> --

Mathieu Desnoyers
EfficiOS Inc.

 \ /
  Last update: 2018-08-08 00:23    [W:0.072 / U:9.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site