059-mcfv4e_vdso_headers.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. From a05af27aec00eacf533ff111ba8eb3dec328d9af Mon Sep 17 00:00:00 2001
  2. From: Kurt Mahan <[email protected]>
  3. Date: Thu, 22 May 2008 11:20:53 -0600
  4. Subject: [PATCH] Initial vDSO header changes.
  5. LTIBName: mcfv4e-vdso-headers
  6. Signed-off-by: Kurt Mahan <[email protected]>
  7. ---
  8. include/asm-m68k/auxvec.h | 9 +++++++++
  9. include/asm-m68k/elf.h | 31 +++++++++++++++++++++++++++++++
  10. include/asm-m68k/page.h | 5 +++++
  11. 3 files changed, 45 insertions(+), 0 deletions(-)
  12. --- a/include/asm-m68k/auxvec.h
  13. +++ b/include/asm-m68k/auxvec.h
  14. @@ -1,4 +1,13 @@
  15. #ifndef __ASMm68k_AUXVEC_H
  16. #define __ASMm68k_AUXVEC_H
  17. +/*
  18. + * Architecture-neutral AT_ values in 0-17, leave some room
  19. + * for more of them.
  20. + */
  21. +
  22. +#ifdef CONFIG_VSYSCALL
  23. +/* Entry point to the vsyscall page */
  24. +#define AT_SYSINFO_EHDR 33
  25. +#endif
  26. #endif
  27. --- a/include/asm-m68k/elf.h
  28. +++ b/include/asm-m68k/elf.h
  29. @@ -136,4 +136,35 @@ typedef struct user_m68kfp_struct elf_fp
  30. #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
  31. +/*
  32. + * VDSO
  33. + */
  34. +#ifdef CONFIG_VSYSCALL
  35. +extern unsigned int vdso_enabled;
  36. +
  37. +#define VDSO_BASE ((unsigned long)current->mm->context.vdso)
  38. +#define VDSO_SYM(x) (VDSO_BASE + (unsigned long)(x))
  39. +
  40. +#define VSYSCALL_AUX_ENT \
  41. + if (vdso_enabled) \
  42. + NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE);
  43. +
  44. +/* additional pages */
  45. +#define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
  46. +
  47. +struct linux_binprm;
  48. +extern int arch_setup_additional_pages(struct linux_binprm *bprm,
  49. + int executable_stack);
  50. +
  51. +#else
  52. +/* no VSYSCALL_AUX_ENT */
  53. +#define VSYSCALL_AUX_ENT
  54. +#endif
  55. +
  56. +#define ARCH_DLINFO \
  57. +do { \
  58. + /* vsyscall entry */ \
  59. + VSYSCALL_AUX_ENT; \
  60. +} while (0);
  61. +
  62. #endif
  63. --- a/include/asm-m68k/page.h
  64. +++ b/include/asm-m68k/page.h
  65. @@ -252,4 +252,9 @@ static inline __attribute_const__ int __
  66. #include <asm-generic/page.h>
  67. +#ifdef CONFIG_VSYSCALL
  68. +/* vDSO support */
  69. +#define __HAVE_ARCH_GATE_AREA
  70. +#endif
  71. +
  72. #endif /* _M68K_PAGE_H */