lkml.org 
[lkml]   [2009]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] RO/NX protection for loadable kernel modules
From
On Tue, Jun 30, 2009 at 9:29 AM, Arjan van de Ven<arjan@infradead.org> wrote:
> On Tue, 30 Jun 2009 09:11:33 -0400
> Siarhei Liakh <sliakh.lkml@gmail.com> wrote:
>
>> > (and one can still argue that making this an option is not even
>> > worth that, and just always do it unconditional)
>> >
>>
>> I can make NX unconditional. However, it will not reduce the number
>> of #ifdefs. There are two of them in the patch right now: one
>> controls the inclusion of two extra fields (init_ro_size,
>> core_ro_size) in struct module, and the other one controls the
>> inclusion of ALL patch code. The *_ro_size fields are used only for
>> RO, and are not used to set NX. Therefore, this #ifdef will stay even
>> if NX is unconditional. Since the second #ifdef controls ALL of the
>> patch's code it will also stay (to control RO part) when NX becomes
>> unconditional.
>>
>> Given that it will not reduce the number of #ifdefs, do you still
>> think that NX should be made unconditional?
>
> I think that not only NX should be made unconditional, I also think
> that the RO code should be unconditional.

So, the only conditional part would be the page-alignment of each of the
three parts of a module. Is that correct understanding?


\
 
 \ /
  Last update: 2009-06-30 16:47    [W:0.038 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site