This is the mail archive of the glibc-bugs@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]

[Bug libc/6816] Support for POWER7 VSX registers in *context routines


------- Additional Comments From sjmunroe at us dot ibm dot com  2008-10-16 19:36 -------
>I.e., the version value would have to be in the range of the original data
>structure and there must not be any ambiguity (i.e., you have to find a byte or
>four in the original structure which has a limited range and use one of the
>value which _never_ can happen in the real world).

As I explained before the size of the ucontext is implied in an unambiguous way
by the feature enable bits (FP,VMX,VSX) of the MSR saved with the GPRs in the
ucontext. The kernal swapcontext swapcontext has set these since kernel 2.6.0,
before that getcontext zeroed the MSR. I believe that is unambiguous enough.

So if you want to not change sizeof(ucontext), we can do that. Just anyone crazy
enough to try copying a ucontext from a signal frame has to know to check for
MSR:VSX and copy a little bit more. And then use the swapcontext syscall with
the larger length. The kernel should handle this!

I assume we still need the wrappers to handle the previous version changes
(adding VMX) and any future changes?

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6816

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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