Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79843
b: refs/heads/master
c: 36197c9
h: refs/heads/master
i:
  79841: 5eb7887
  79839: 56bf077
v: v3
  • Loading branch information
Roland McGrath authored and Ingo Molnar committed Jan 30, 2008
1 parent e0f8ae9 commit e2e9751
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 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: 0aa97fb22624f18e5925d702ab0364d3838cfd91
refs/heads/master: 36197c92a20c142fc2a068e0366053d770fa0096
7 changes: 3 additions & 4 deletions trunk/arch/x86/ia32/ia32entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <asm/ia32_unistd.h>
#include <asm/thread_info.h>
#include <asm/segment.h>
#include <asm/vsyscall32.h>
#include <asm/irqflags.h>
#include <linux/linkage.h>

Expand Down Expand Up @@ -104,7 +103,7 @@ ENTRY(ia32_sysenter_target)
pushfq
CFI_ADJUST_CFA_OFFSET 8
/*CFI_REL_OFFSET rflags,0*/
movl $VSYSCALL32_SYSEXIT, %r10d
movl 8*3-THREAD_SIZE+threadinfo_sysenter_return(%rsp), %r10d
CFI_REGISTER rip,r10
pushq $__USER32_CS
CFI_ADJUST_CFA_OFFSET 8
Expand Down Expand Up @@ -142,15 +141,15 @@ sysenter_do_call:
andl $~TS_COMPAT,threadinfo_status(%r10)
/* clear IF, that popfq doesn't enable interrupts early */
andl $~0x200,EFLAGS-R11(%rsp)
movl RIP-R11(%rsp),%edx /* User %eip */
CFI_REGISTER rip,rdx
RESTORE_ARGS 1,24,1,1,1,1
popfq
CFI_ADJUST_CFA_OFFSET -8
/*CFI_RESTORE rflags*/
popq %rcx /* User %esp */
CFI_ADJUST_CFA_OFFSET -8
CFI_REGISTER rsp,rcx
movl $VSYSCALL32_SYSEXIT,%edx /* User %eip */
CFI_REGISTER rip,rdx
TRACE_IRQS_ON
swapgs
sti /* sti only takes effect after the next instruction */
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/x86/ia32/syscall32.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ int syscall32_setup_pages(struct linux_binprm *bprm, int exstack)
VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC|
VM_ALWAYSDUMP,
syscall32_pages);
if (ret == 0) {
current->mm->context.vdso = (void __user *)VSYSCALL32_BASE;
current_thread_info()->sysenter_return = VSYSCALL32_SYSEXIT;
}
up_write(&mm->mmap_sem);
return ret;
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/x86/kernel/asm-offsets_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ int main(void)
ENTRY(addr_limit);
ENTRY(preempt_count);
ENTRY(status);
#ifdef CONFIG_IA32_EMULATION
ENTRY(sysenter_return);
#endif
BLANK();
#undef ENTRY
#define ENTRY(entry) DEFINE(pda_ ## entry, offsetof(struct x8664_pda, entry))
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/asm-x86/thread_info_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ struct thread_info {

mm_segment_t addr_limit;
struct restart_block restart_block;
#ifdef CONFIG_IA32_EMULATION
void __user *sysenter_return;
#endif
};
#endif

Expand Down

0 comments on commit e2e9751

Please sign in to comment.