vdso.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Copyright (C) 2015 Imagination Technologies
  3. * Author: Alex Smith <alex.smith@imgtec.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License as published by the
  7. * Free Software Foundation; either version 2 of the License, or (at your
  8. * option) any later version.
  9. */
  10. #ifndef __ASM_VDSO_H
  11. #define __ASM_VDSO_H
  12. #include <linux/mm_types.h>
  13. /**
  14. * struct mips_vdso_image - Details of a VDSO image.
  15. * @data: Pointer to VDSO image data (page-aligned).
  16. * @size: Size of the VDSO image data (page-aligned).
  17. * @off_sigreturn: Offset of the sigreturn() trampoline.
  18. * @off_rt_sigreturn: Offset of the rt_sigreturn() trampoline.
  19. * @mapping: Special mapping structure.
  20. *
  21. * This structure contains details of a VDSO image, including the image data
  22. * and offsets of certain symbols required by the kernel. It is generated as
  23. * part of the VDSO build process, aside from the mapping page array, which is
  24. * populated at runtime.
  25. */
  26. struct mips_vdso_image {
  27. void *data;
  28. unsigned long size;
  29. unsigned long off_sigreturn;
  30. unsigned long off_rt_sigreturn;
  31. struct vm_special_mapping mapping;
  32. };
  33. /*
  34. * The following structures are auto-generated as part of the build for each
  35. * ABI by genvdso, see arch/mips/vdso/Makefile.
  36. */
  37. extern struct mips_vdso_image vdso_image;
  38. #ifdef CONFIG_MIPS32_O32
  39. extern struct mips_vdso_image vdso_image_o32;
  40. #endif
  41. #ifdef CONFIG_MIPS32_N32
  42. extern struct mips_vdso_image vdso_image_n32;
  43. #endif
  44. /**
  45. * union mips_vdso_data - Data provided by the kernel for the VDSO.
  46. *
  47. * This structure contains data needed by functions within the VDSO. It is
  48. * populated by the kernel and mapped read-only into user memory.
  49. *
  50. * Note: Care should be taken when modifying as the layout must remain the same
  51. * for both 64- and 32-bit (for 32-bit userland on 64-bit kernel).
  52. */
  53. union mips_vdso_data {
  54. struct {
  55. };
  56. u8 page[PAGE_SIZE];
  57. };
  58. #endif /* __ASM_VDSO_H */