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-next>] [day] [month] [year] [list]
Message-ID: <4E52CC63.5070201@nod.at>
Date:	Mon, 22 Aug 2011 23:38:43 +0200
From:	Richard Weinberger <richard@....at>
To:	linux-kernel@...r.kernel.org
CC:	x86@...nel.org, rostedt@...dmis.org, jbaron@...hat.com,
	akpm@...ux-foundation.org, rusty@...tcorp.com.au,
	vapier@...too.org, user-mode-linux-devel@...ts.sourceforge.net
Subject: [RFC] UML/x86_64 module loader

Hi!

UserModeLinux is using the arch specific module functions from 
arch/x86/kernel/module.c.
On i386 this works perfectly fine but on x86_64 it causes problems.

apply_relocate_add() assumes modules compiled with -mcmodel=kernel 
because the kernel lives in the negative 2GiB of the address space.
This assumption is not true for UML.
On an UML instance with more than 512MiB of memory no modules can be 
loaded because vmalloc() locates the module near the 2GiB limit and the
ELF relocations causes an overflow. (Detected by "if ((s64)val != *(s32 
*)loc)" in apply_relocate_add()).

Now I'm not sure how to fix this.
Mostly because I'm not a module loader nor an ELF expert. 8-)

Is there an easy way to adjust the current x86_64 module loader to deal 
with UML "positive" relocations?

Thanks,
//richard

P.s: Just removing the overflow-check does not fix the problem. ;-)
--
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