Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 26 Nov 2015 10:23:34 -0500
From: Daniel Micay <danielmicay@...il.com>
To: kernel-hardening@...ts.openwall.com
Subject: Re: [PATCH 0/2] introduce post-init read-only
 memory

On 25/11/15 05:06 AM, Clemens Ladisch wrote:
> 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
> 

That would be undefined. It would only be safe if you exposed a const
pointer as the only way of accessing a non-const variable. It would be
silly to mangle the code simply to get a warning as it should be easy
enough to add to GCC. The usefulness isn't just limited to the kernel
either.


Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.