dtrace: ensure pdata and sdt_tab handling works on module reload
The handling of the sdt_tab member in pdata caused crashes when the sdt
module was unloaded and then reloaded. This member holds the trampolines
for SDT probe points in kernel modules, and is allocated when a module is
loaded and resides in modules-only address space). This memory block was
incorrectly free'd from the sdt module code when sdt was unloaded.
This commit also adds verification that the anticipated trampoline max
size as used in the kernel is sufficient for what the sdt module needs.
This commit also adds verification (at runtime, with an assert) that the
reserved allocation to hold the pdata for a module is of a sufficient
size.
Orabug:
23331667
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: Nick Alcock <nick.alcock@oracle.com>