zephyr/include/linker
Andrew Boie 945af95f42 kernel: introduce object validation mechanism
All system calls made from userspace which involve pointers to kernel
objects (including device drivers) will need to have those pointers
validated; userspace should never be able to crash the kernel by passing
it garbage.

The actual validation with _k_object_validate() will be in the system
call receiver code, which doesn't exist yet.

- CONFIG_USERSPACE introduced. We are somewhat far away from having an
  end-to-end implementation, but at least need a Kconfig symbol to
  guard the incoming code with. Formal documentation doesn't exist yet
  either, but will appear later down the road once the implementation is
  mostly finalized.

- In the memory region for RAM, the data section has been moved last,
  past bss and noinit. This ensures that inserting generated tables
  with addresses of kernel objects does not change the addresses of
  those objects (which would make the table invalid)

- The DWARF debug information in the generated ELF binary is parsed to
  fetch the locations of all kernel objects and pass this to gperf to
  create a perfect hash table of their memory addresses.

- The generated gperf code doesn't know that we are exclusively working
  with memory addresses and uses memory inefficently. A post-processing
  script process_gperf.py adjusts the generated code before it is
  compiled to work with pointer values directly and not strings
  containing them.

- _k_object_init() calls inserted into the init functions for the set of
  kernel object types we are going to support so far

Issue: ZEP-2187
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:33:33 -07:00
..
common-ram.ld kernel: introduce object validation mechanism 2017-09-07 16:33:33 -07:00
common-rom.ld net: Renaming net_l2_init sections to net_l2 2016-12-02 12:40:53 +02:00
intlist.ld build: simplfy how extra build steps are specified 2017-05-13 14:07:09 -04:00
kobject-rom.ld kernel: introduce object validation mechanism 2017-09-07 16:33:33 -07:00
kobject-text.ld kernel: introduce object validation mechanism 2017-09-07 16:33:33 -07:00
kobject.ld kernel: introduce object validation mechanism 2017-09-07 16:33:33 -07:00
linker-defs.h arm: armv6-m: Support relocating vector table 2017-08-09 18:13:29 -04:00
linker-tool-gcc.h linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
linker-tool.h linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
section_tags.h linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
sections.h sections.h: define application-level sections 2017-06-29 07:46:58 -04:00