lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 12 Jul 2009 14:10:39 +0930
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	Ingo Molnar <mingo@...e.hu>, Siarhei Liakh <sliakh.lkml@...il.com>,
	linux-kernel@...r.kernel.org,
	linux-security-module@...r.kernel.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>, linux-cris-kernel@...s.com
Subject: Re: [PATCH v5] RO/NX protection for loadable kernel modules

On Sun, 12 Jul 2009 01:19:58 am Arjan van de Ven wrote:
> Rusty Russell <rusty@...tcorp.com.au> wrote:
> > I have a question about this patch though: I think it's unsafe in
> > general to mark the last partial page as NX (we asked for executable
> > pages, this could remove executable from some unrelated allocation).
>
> we vmalloc / g_f_p modules right? so we don't share the last page.

Historically yes, but I don't think we should be counting on it.  It makes 
sense to kmalloc for small modules, and it's arch specific code.

OTOH, a quick grep shows currently only cris does kmalloc, and that's a config 
option.

It might be time to unify this code.  If we rename MODULE_START to 
MODULE_VADDR on MIPS, then ignoring CRIS there's only two real variants; 
vmalloc and __vmalloc.

(I like the idea of trying kmalloc and falling back, simply because it reduces 
TLB pressure, but that's probably best done after unification).

Thoughts?
Rusty.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ