[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090921214046.GA17243@redhat.com>
Date: Mon, 21 Sep 2009 17:40:47 -0400
From: Dave Jones <davej@...hat.com>
To: Siarhei Liakh <sliakh.lkml@...il.com>
Cc: linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org, linux-next@...r.kernel.org,
Arjan van de Ven <arjan@...radead.org>,
James Morris <jmorris@...ei.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Andi Kleen <ak@....de>, Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...e.hu>,
Rusty Russell <rusty@...tcorp.com.au>,
Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH v6] RO/NX protection for loadable kernel modules
On Thu, Sep 10, 2009 at 10:50:47PM -0400, Siarhei Liakh wrote:
> This patch is a logical extension of the protection provided by
> CONFIG_DEBUG_RODATA to LKMs. The protection is provided by splitting
> module_core and module_init into three logical parts each and setting
> appropriate page access permissions for each individual section:
>
> 1. Code: RO+X
> 2. RO data: RO+NX
> 3. RW data: RW+NX
Hi Siarhei,
I tried out this patch on 2.6.31, and got the following trace during bootup..
------------[ cut here ]------------
WARNING: at kernel/trace/ftrace.c:1003 ftrace_bug+0x198/0x27e() (Not tainted)
Hardware name: VGN-Z540N
Modules linked in: output(+)
Pid: 115, comm: modprobe Not tainted 2.6.31-23.fc12.x86_64 #1
Call Trace:
[<ffffffff81064244>] warn_slowpath_common+0x95/0xc3
[<ffffffffa0000193>] ? video_output_register+0x11/0x10a [output]
[<ffffffff81064299>] warn_slowpath_null+0x27/0x3d
[<ffffffff810d4a0e>] ftrace_bug+0x198/0x27e
[<ffffffffa0000193>] ? video_output_register+0x11/0x10a [output]
[<ffffffff810d5c66>] ftrace_convert_nops+0x201/0x2b9
[<ffffffffa0000193>] ? video_output_register+0x11/0x10a [output]
[<ffffffff810d5d6a>] ftrace_module_notify+0x4c/0x7f
[<ffffffff815099c5>] notifier_call_chain+0x72/0xba
[<ffffffff81086db1>] ? __blocking_notifier_call_chain+0x4c/0x8e
[<ffffffff81086dc8>] __blocking_notifier_call_chain+0x63/0x8e
[<ffffffff81086e1a>] blocking_notifier_call_chain+0x27/0x3d
[<ffffffff810a466a>] sys_init_module+0xb7/0x249
[<ffffffff81011f42>] system_call_fastpath+0x16/0x1b
---[ end trace 95b33ebf87286ae6 ]---
ftrace faulted on writing [<ffffffffa0000193>] video_output_register+0x11/0x10a [output]
I guess ftrace is trying to NOP out something in the modules which
are marked read-only ?
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists