lkml.org 
[lkml]   [2015]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory
From
Date
On 11/29/15 00:05, Ingo Molnar wrote:
>
> * Andy Lutomirski <luto@amacapital.net> wrote:
>
>>>> - print a warning and a backtrace, and just mark the page read-write
>>>> so that the machine survives, but we get notified and can fix whatever
>>>> broken code
>>>
>>> This seems very easy to add. Should I basically reverse the effects of
>>> mark_rodata_ro(), or should I only make the new ro-after-init section as RW?
>>> (I think the former would be easier.)
>>
>> I'd suggest verifying that the page in question is .data..ro_after_init and, if
>> so, marking that one page RW.
>
> Yes, this was PaX's suggestion as well, and I agree: doing that turns a quite
> possibly unrecoverable boot/shutdown time or suspend/resume time (suspend is
> really a special category of 'bootup') crasher oops into a more informative stack
> dump.
>
> These ro related faults tend to trigger when init/deinit is running, and oopsing
> in those sequences is typically a lot less survivable than say oopsing in a high
> level system call while not holding locks.
>

I think what should do is have a debug option which can be set to "rw",
"log" or "oops"; the latter should probably be the default.

-hpa




\
 
 \ /
  Last update: 2015-11-30 22:41    [W:0.065 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site