Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25343
b: refs/heads/master
c: 97c2803
h: refs/heads/master
i:
  25341: d3cbd5a
  25339: b381421
  25335: 0110315
  25327: 03b4815
  25311: 8a1bbad
  25279: dcc88a5
  25215: 00b7f90
  25087: 51d08bd
v: v3
  • Loading branch information
John Blackwood authored and Linus Torvalds committed Apr 9, 2006
1 parent 01fc64a commit 67c423f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e48c4729d23a026f3711d5e36add5cce894b4913
refs/heads/master: 97c2803c9c694cafbd9f5e43a25903e0abf25188
10 changes: 8 additions & 2 deletions trunk/arch/x86_64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,10 +781,16 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr)
}
case ARCH_GET_GS: {
unsigned long base;
unsigned gsindex;
if (task->thread.gsindex == GS_TLS_SEL)
base = read_32bit_tls(task, GS_TLS);
else if (doit)
rdmsrl(MSR_KERNEL_GS_BASE, base);
else if (doit) {
asm("movl %%gs,%0" : "=r" (gsindex));
if (gsindex)
rdmsrl(MSR_KERNEL_GS_BASE, base);
else
base = task->thread.gs;
}
else
base = task->thread.gs;
ret = put_user(base, (unsigned long __user *)addr);
Expand Down

0 comments on commit 67c423f

Please sign in to comment.