Randomizing structure layout
Randomizing structure layout
Posted May 15, 2017 12:52 UTC (Mon) by tialaramex (subscriber, #21167)In reply to: Randomizing structure layout by mb
Parent article: Randomizing structure layout
The pointers are there because _if_ the corresponding function is used we need to follow the pointer, but their presence doesn't mean anybody is actually obliged to use the function. Furthermore, in some cases function pointers are invoked conditionally. The kernel doesn't do this for simple "If exists then..." tests, which are traditionally done just by checking if the pointer is non-NULL (which will work if you scribble over it) but it does do this in other places, and some people's C code may not follow that style even for "if exists then..." tests so they'd benefit from this feature too.