Rev 6934 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6934 | Rev 7143 | ||
---|---|---|---|
Line 254... | Line 254... | ||
254 | __u64 ip; |
254 | __u64 ip; |
255 | __u64 flags; |
255 | __u64 flags; |
256 | __u16 cs; |
256 | __u16 cs; |
257 | __u16 gs; |
257 | __u16 gs; |
258 | __u16 fs; |
258 | __u16 fs; |
259 | __u16 __pad0; |
259 | __u16 ss; |
260 | __u64 err; |
260 | __u64 err; |
261 | __u64 trapno; |
261 | __u64 trapno; |
262 | __u64 oldmask; |
262 | __u64 oldmask; |
263 | __u64 cr2; |
263 | __u64 cr2; |
Line 339... | Line 339... | ||
339 | __u64 rcx; |
339 | __u64 rcx; |
340 | __u64 rsp; |
340 | __u64 rsp; |
341 | __u64 rip; |
341 | __u64 rip; |
342 | __u64 eflags; /* RFLAGS */ |
342 | __u64 eflags; /* RFLAGS */ |
343 | __u16 cs; |
343 | __u16 cs; |
- | 344 | ||
- | 345 | /* |
|
- | 346 | * Prior to 2.5.64 ("[PATCH] x86-64 updates for 2.5.64-bk3"), |
|
- | 347 | * Linux saved and restored fs and gs in these slots. This |
|
- | 348 | * was counterproductive, as fsbase and gsbase were never |
|
- | 349 | * saved, so arch_prctl was presumably unreliable. |
|
- | 350 | * |
|
- | 351 | * These slots should never be reused without extreme caution: |
|
- | 352 | * |
|
- | 353 | * - Some DOSEMU versions stash fs and gs in these slots manually, |
|
- | 354 | * thus overwriting anything the kernel expects to be preserved |
|
- | 355 | * in these slots. |
|
- | 356 | * |
|
- | 357 | * - If these slots are ever needed for any other purpose, |
|
- | 358 | * there is some risk that very old 64-bit binaries could get |
|
- | 359 | * confused. I doubt that many such binaries still work, |
|
- | 360 | * though, since the same patch in 2.5.64 also removed the |
|
- | 361 | * 64-bit set_thread_area syscall, so it appears that there |
|
- | 362 | * is no TLS API beyond modify_ldt that works in both pre- |
|
- | 363 | * and post-2.5.64 kernels. |
|
- | 364 | * |
|
- | 365 | * If the kernel ever adds explicit fs, gs, fsbase, and gsbase |
|
- | 366 | * save/restore, it will most likely need to be opt-in and use |
|
- | 367 | * different context slots. |
|
- | 368 | */ |
|
344 | __u16 gs; |
369 | __u16 gs; |
345 | __u16 fs; |
370 | __u16 fs; |
- | 371 | union { |
|
346 | __u16 __pad0; |
372 | __u16 ss; /* If UC_SIGCONTEXT_SS */ |
- | 373 | __u16 __pad0; /* Alias name for old (!UC_SIGCONTEXT_SS) user-space */ |
|
- | 374 | }; |
|
347 | __u64 err; |
375 | __u64 err; |
348 | __u64 trapno; |
376 | __u64 trapno; |
349 | __u64 oldmask; |
377 | __u64 oldmask; |
350 | __u64 cr2; |
378 | __u64 cr2; |
351 | struct _fpstate __user *fpstate; /* Zero when no FPU context */ |
379 | struct _fpstate __user *fpstate; /* Zero when no FPU context */ |