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:	Tue, 12 Dec 2006 07:23:17 -0500
From:	Kyle Moffett <mrmacman_g4@....com>
To:	LKML Kernel <linux-kernel@...r.kernel.org>
Cc:	Andrew Morton <akpm@...l.org>, Linus Torvalds <torvalds@...l.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: Mach-O binary format support and Darwin syscall personality [Was: uts banner changes]

On Dec 11, 2006, at 13:26:13, Linus Torvalds wrote:
> On Mon, 11 Dec 2006, Olaf Hering wrote:
>> Hmm, even moving this to linux_banner doesnt work, just because  
>> __initdata is in a different section.
>
> Heh. Let's just change the "version_read_proc" string to not trigger.
>
> Something like this instead (which replaces the "Linux" with "%s"  
> in /proc, and just takes it from "utsname()->sysname" instead. So  
> now you can lie and call yourself "OS X" in your virtual partition  
> if you want to ;)

Funny you should mention that...  I'm currently tinkering with a  
binfmt_mach_o kernel module and associated Darwin syscall personality  
to try to load and run console Mach-O binaries natively under PPC or  
X86 linux (depending on what architectures the Mach-O binary supports).

I've basically got the binary loader part working; the Mach-O dynamic  
loader gets mapped into memory at the appropriate location, the  
kernel jumps to the specified location in the code... and then the  
program comes crashing to a halt when it starts calling invalid  
syscalls with bogus arguments.

So now I have to figure out how to set up a new syscall personality  
with a bunch of wrapper syscalls which reorder arguments and  
translate constant values before calling into the rest of the Linux  
code.  I'm fairly sure it's possible because you can run some Solaris  
binaries under Linux if you turn on the appropriate BINFMT_* config  
option(s), but I'm totally unsure as to _how_.

I'd much appreciate any advice you can give!

Cheers,
Kyle Moffett

-
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