mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC] Only a.out QMAGIC format is working
@ 2014-04-01 12:47 Geyslan Gregório Bem
  2014-04-19 16:15 ` Pavel Machek
  0 siblings, 1 reply; 7+ messages in thread
From: Geyslan Gregório Bem @ 2014-04-01 12:47 UTC (permalink / raw)
  To: LKML, Alexander Viro
  Cc: open list:FILESYSTEMS (VFS...),
	linux-kernel@vger.kernel.org (open list),
	kernel-br, kernelnewbies

Sirs,

I was researching about old binary formats and did some tests.
Meantime, I was able to run sucessfully only the QMAGIC format.
Nonetheless, the OMAGIC, NMAGIC and ZMAGIC didn't work anymore.

The test occurred using old slackware binaries and some new, the
latter compiled by me, using cross-compiled as and ld. In any case,
the QMAGIC was the only functional.

After some debugging I identified (when loading a OMAGIC) that the
kernel sigkill the current after this checking:

http://lxr.linux.no/linux+v3.13.5/arch/x86/ia32/ia32_aout.c#L325

 325                error = vm_brk(text_addr & PAGE_MASK, map_size);
 326
 327                if (error != (text_addr & PAGE_MASK)) {
 328                        send_sig(SIGKILL, current, 0);
 329                        return error;
 330                }

I suppose this happens due to changes made, in the course of time, in
the memory mapping (vm_brk/do_brk), therefore the only one that still
works is the QMAGIC (the aligned one). Or maybe, it's purposely. [RFC]

Is important to note that when a ZMAGIC is loaded what happens is a
"Segmentation fault" and not "SIGKILL".

That was reported by others too:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/966472

-- 
Regards,

Geyslan G. Bem
hackingbits.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-04-28  3:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-01 12:47 [RFC] Only a.out QMAGIC format is working Geyslan Gregório Bem
2014-04-19 16:15 ` Pavel Machek
2014-04-19 16:37   ` [Kernel-BR] " Geyslan Gregório Bem
2014-04-19 18:33     ` Valdis.Kletnieks
2014-04-19 19:19       ` Geyslan Gregório Bem
2014-04-20 11:45     ` Pavel Machek
     [not found]       ` <CAGG-pUSyxxa=vyNBDABf8J1BNuzY8UTA9g3r35g2O4=XK1OYXA@mail.gmail.com>
2014-04-28  3:23         ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome