Re: [PATCH V9] RO/NX protection for loadable kernel modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> But not compile tested:
[...]
> The casts here should cause a warning.

I did compile it prior to submission and the resulting kernel boots.
However, you are right about the warnings as they scrolled off the
screen when I did not pay attention.
Will fix.

>> +     if (total_size > text_size) {
>> +             begin_pfn = PFN_UP((unsigned long)base + text_size);
>> +             end_pfn = PFN_UP((unsigned long)base + total_size);
>> +             if (end_pfn > begin_pfn)
>> +                     set_memory_nx(begin_pfn << PAGE_SHIFT,
>> +                                             end_pfn - begin_pfn);
>
> Use the helper here too?

No, not really. The helper uses PFN_DUWN, and we need PFN_UP here.
This is the only place where I use PFN_UP, so another helper would not
make much sense.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux