This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH glibc 1/4] glibc: Perform rseq(2) registration at C startup and thread creation (v6)


* Zack Weinberg:

> In that case, is there any reason not to use the same value on _all_
> architectures?  Or maybe the same value on all 32-bit architectures,
> and another one on all 64-bit architectures?

I think the intent here is to use a value that would be extremely
unlikely to appear in the instruction stream, so that jump target
pointer in struct rseq_cs can be somewhat validated before the program
counter is updated.

This doesn't have to be a trapping instruction (in fact, the default
trapping instruction would probably be a bad choice because the
instruction does appear in the text segment quite frequently).  But even
if we choose an optimal value for all currently supported architectures,
we might add an architecture in the future which prefers a different
value.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]