linux - symbols in kernel module -
i built linux kernel module ssp support mips architecture. added -fstack-protector-all compilation flags. after loading module i've got undefined references __stack_chk_guard , __stack_chk_fail. added libssp.so linker. looks should export symbols in kernel this:
export_symbol(__stack_chk_guard); because kernel old , didn't contain them yet. unfortunately should use version.
my question is: why user space can use symbols toolchain library, kernel space don't ?
i think, missed linux kernel essentials.
you can't link kernel shared libraries. if have static library of libssp, may work - require library isn't calling else cause problems in kernel.
in general, stack-checking isn't should doing on kernel - i'm pretty sure serves no particularly purpose [i'm pretty sure kernel uses "guard page" each kernel stack].
Comments
Post a Comment