On Wed, Nov 14, 2018 at 08:33:06AM -0700, Jens Axboe wrote:
> It's measurable. It doesn't defeat the const at all, the mq_ops
> is still const and is never modified outside of when the queue
> is allocated. The only difference is of course that it is no
> longer residing in a read only mapped section, which is a shame.

And the separate section is very much the point of the const.

Without it attackers can easily overwrite the function pointer and
use it for exploits, as the C const attribute by itself doesn't
protect from that in any way.  But once it is in a read-only section
it can't easily be modified.

Reply via email to