Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory

From: Clemens Ladisch
Date: Wed Nov 25 2015 - 05:07:16 EST


Mathias Krause wrote:
> [...]
> So, prior extending the usage of the __read_only annotation some
> toolchain support is needed. Maybe a gcc plugin that'll warn/error on
> code that writes to such a variable but is not __init itself.

Or mark them as "const". This would require the initialization code to
cast it away, probably with a helper macro.


Regards,
Clemens
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/