exec.c 871 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
  3. * Licensed under the GPL
  4. */
  5. #include "linux/kernel.h"
  6. #include "asm/current.h"
  7. #include "asm/page.h"
  8. #include "asm/signal.h"
  9. #include "asm/ptrace.h"
  10. #include "asm/uaccess.h"
  11. #include "asm/mmu_context.h"
  12. #include "tlb.h"
  13. #include "skas.h"
  14. #include "um_mmu.h"
  15. #include "os.h"
  16. void flush_thread_skas(void)
  17. {
  18. void *data = NULL;
  19. unsigned long end = proc_mm ? task_size : CONFIG_STUB_START;
  20. int ret;
  21. ret = unmap(&current->mm->context.skas.id, 0, end, 1, &data);
  22. if(ret){
  23. printk("flush_thread_skas - clearing address space failed, "
  24. "err = %d\n", ret);
  25. force_sig(SIGKILL, current);
  26. }
  27. switch_mm_skas(&current->mm->context.skas.id);
  28. }
  29. void start_thread_skas(struct pt_regs *regs, unsigned long eip,
  30. unsigned long esp)
  31. {
  32. set_fs(USER_DS);
  33. PT_REGS_IP(regs) = eip;
  34. PT_REGS_SP(regs) = esp;
  35. }