public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* gzipped executables
@ 2001-02-13  5:09 Matt Stegman
  2001-02-13 21:09 ` Mike Castle
  2001-02-14 19:22 ` Pavel Machek
  0 siblings, 2 replies; 8+ messages in thread
From: Matt Stegman @ 2001-02-13  5:09 UTC (permalink / raw)
  To: linux-kernel

Is there any kernel patch that would allow Linux to properly recognize,
and execute gzipped executables?

I know I could use binfmt_misc to run a wrapper script:

    decompress to /tmp/prog.decompressed
    execute /tmp/prog.decompressed
    rm /tmp/prog.decompressed

But that's not as clean, secure, or fast as the kernel transparently
decompressing & executing.  Is there a better way to do this?

      -Matt


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://vger.kernel.org/lkml/

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

* Re: gzipped executables
@ 2001-02-13  8:40 ketil
  2001-02-13 12:09 ` Ingo Oeser
  0 siblings, 1 reply; 8+ messages in thread
From: ketil @ 2001-02-13  8:40 UTC (permalink / raw)
  To: mas9483, linux-kernel

On Mon, 12 Feb 2001 23:09:39 -0600 (CST) Matt Stegman <mas9483@ksu.edu> wrote:
>Is there any kernel patch that would allow Linux to properly recognize,
>and execute gzipped executables?
>
>I know I could use binfmt_misc to run a wrapper script:
>
>    decompress to /tmp/prog.decompressed
>    execute /tmp/prog.decompressed
>    rm /tmp/prog.decompressed
>
>But that's not as clean, secure, or fast as the kernel transparently
>decompressing & executing.  Is there a better way to do this?

Perhaps you could put it in the filesystem. Look at the "chattr" manpage, which
shows how this is meant to work with ext2. It seems not to have been implemented
yet. This way you could also compress any files, not just executables.

Ketil

-- 
Get your firstname@lastname email for FREE at http://Nameplanet.com/?su

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

* Re: gzipped executables
  2001-02-13  8:40 gzipped executables ketil
@ 2001-02-13 12:09 ` Ingo Oeser
  2001-02-13 13:08   ` Padraig Brady
  2001-02-13 13:58   ` Matt Stegman
  0 siblings, 2 replies; 8+ messages in thread
From: Ingo Oeser @ 2001-02-13 12:09 UTC (permalink / raw)
  To: ketil; +Cc: mas9483, linux-kernel

On Tue, Feb 13, 2001 at 08:40:31AM -0000, ketil@froyn.com wrote:
> On Mon, 12 Feb 2001 23:09:39 -0600 (CST) Matt Stegman <mas9483@ksu.edu> wrote:
> >Is there any kernel patch that would allow Linux to properly recognize,
> >and execute gzipped executables?
> 
> Perhaps you could put it in the filesystem. Look at the
> "chattr" manpage, which shows how this is meant to work with
> ext2. It seems not to have been implemented yet. This way you
> could also compress any files, not just executables.

A nice way already implemented in 2.4.x is cramfs. Many embedded
people (like me) use it to fill up their flash disks.

Look at linux/Documentation/filesystems/cramfs.txt for more info.

Regards

Ingo Oeser
-- 
10.+11.03.2001 - 3. Chemnitzer LinuxTag <http://www.tu-chemnitz.de/linux/tag>
         <<<<<<<<<<<<       come and join the fun       >>>>>>>>>>>>

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

* Re: gzipped executables
  2001-02-13 12:09 ` Ingo Oeser
@ 2001-02-13 13:08   ` Padraig Brady
  2001-02-13 13:58   ` Matt Stegman
  1 sibling, 0 replies; 8+ messages in thread
From: Padraig Brady @ 2001-02-13 13:08 UTC (permalink / raw)
  To: mas9483; +Cc: linux-kernel

You might consider UPX (http://upx.tsx.org)
Very cool. The beta version supports compressing the kernel
and "direct-to-memory" compression. I think it still
has the disadvantage of not sharing segments between many
instances of the same program. Is there any way of fixing
this? (probably would have to hack a bit with the loader?)

For a general solution I would look @ changing the filesystem
so that particular files (not just executables) can be compressed/
decompressed transparently. (I.E. for ext2 implement `chattr +c`).

Padraig.

Ingo Oeser wrote:

> On Tue, Feb 13, 2001 at 08:40:31AM -0000, ketil@froyn.com wrote:
> 
>> On Mon, 12 Feb 2001 23:09:39 -0600 (CST) Matt Stegman <mas9483@ksu.edu> wrote:
>> 
>>> Is there any kernel patch that would allow Linux to properly recognize,
>>> and execute gzipped executables?
>> 
>> Perhaps you could put it in the filesystem. Look at the
>> "chattr" manpage, which shows how this is meant to work with
>> ext2. It seems not to have been implemented yet. This way you
>> could also compress any files, not just executables.
> 
> 
> A nice way already implemented in 2.4.x is cramfs. Many embedded
> people (like me) use it to fill up their flash disks.
> 
> Look at linux/Documentation/filesystems/cramfs.txt for more info.
> 
> Regards
> 
> Ingo Oeser


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

* Re: gzipped executables
  2001-02-13 12:09 ` Ingo Oeser
  2001-02-13 13:08   ` Padraig Brady
@ 2001-02-13 13:58   ` Matt Stegman
  2001-02-13 14:09     ` Xavier Bestel
  1 sibling, 1 reply; 8+ messages in thread
From: Matt Stegman @ 2001-02-13 13:58 UTC (permalink / raw)
  To: linux-kernel

Hello,

Anything in 2.4 isn't an option right now.  I'm using, and am really happy
with, the ext3 journalling patch.  I'm not planning on a 2.4 upgrade until
ext3 has been ported.  Damn shame I don't have the skill to do that
myself...

ext2 compression would be great. First off, though, I'm already using the
ext3 patch.  Would ext2 compression be compatible, and take effect for
ext3 (ext3 support is a separate option in the kernel from ext2)?  Also, I
can't even get to the ext2 compression page
http://e2compr.memalpha.cx/e2compr/.

UPX looks interesting; I'll have to check it out in depth.  Thanks, all!

      -Matt



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

* Re: gzipped executables
  2001-02-13 13:58   ` Matt Stegman
@ 2001-02-13 14:09     ` Xavier Bestel
  0 siblings, 0 replies; 8+ messages in thread
From: Xavier Bestel @ 2001-02-13 14:09 UTC (permalink / raw)
  To: Matt Stegman; +Cc: linux-kernel

Le 13 Feb 2001 07:58:56 -0600, Matt Stegman a écrit :
> Hello,
> 
> Anything in 2.4 isn't an option right now.  I'm using, and am really happy
> with, the ext3 journalling patch.  I'm not planning on a 2.4 upgrade until
> ext3 has been ported.  Damn shame I don't have the skill to do that
> myself...
> 
> ext2 compression would be great. First off, though, I'm already using the
> ext3 patch.  Would ext2 compression be compatible, and take effect for
> ext3 (ext3 support is a separate option in the kernel from ext2)?  Also, I
> can't even get to the ext2 compression page
> http://e2compr.memalpha.cx/e2compr/.
> 
> UPX looks interesting; I'll have to check it out in depth.  Thanks, all!
> 
>       -Matt


If you're really adventurous, I've once done a patch for uClinux to
enable a compressed (gzip) executable format (not ELF, way lighter). It
should be at http://aplionet.aplio.fr/uclinux (the kernel loader is
linux/fs/binfmt_flat.c, the tools to generate the execs are in
tools/elf2flt)

Xav


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

* Re: gzipped executables
  2001-02-13  5:09 Matt Stegman
@ 2001-02-13 21:09 ` Mike Castle
  2001-02-14 19:22 ` Pavel Machek
  1 sibling, 0 replies; 8+ messages in thread
From: Mike Castle @ 2001-02-13 21:09 UTC (permalink / raw)
  To: linux-kernel

On Mon, Feb 12, 2001 at 11:09:39PM -0600, Matt Stegman wrote:
> Is there any kernel patch that would allow Linux to properly recognize,
> and execute gzipped executables?

What's wrong with using gzexe?

mrc
-- 
       Mike Castle       Life is like a clock:  You can work constantly
  dalgoda@ix.netcom.com  and be right all the time, or not work at all
www.netcom.com/~dalgoda/ and be right at least twice a day.  -- mrc
    We are all of us living in the shadow of Manhattan.  -- Watchmen

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

* Re: gzipped executables
  2001-02-13  5:09 Matt Stegman
  2001-02-13 21:09 ` Mike Castle
@ 2001-02-14 19:22 ` Pavel Machek
  1 sibling, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2001-02-14 19:22 UTC (permalink / raw)
  To: Matt Stegman, linux-kernel

Hi!

> Is there any kernel patch that would allow Linux to properly recognize,
> and execute gzipped executables?
> 
> I know I could use binfmt_misc to run a wrapper script:
> 
>     decompress to /tmp/prog.decompressed
>     execute /tmp/prog.decompressed
>     rm /tmp/prog.decompressed
> 
> But that's not as clean, secure, or fast as the kernel transparently
> decompressing & executing.  Is there a better way to do this?

You could do this with uservfs(.sourceforge.net):

ln -s /overlay/path/.../executable.gz#ugz executable

and let uservfs do it for you. It will essentially do what you
described, but it will work on any file.
								Pavel

-- 
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at discuss@linmodems.org

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

end of thread, other threads:[~2001-02-17 13:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-13  8:40 gzipped executables ketil
2001-02-13 12:09 ` Ingo Oeser
2001-02-13 13:08   ` Padraig Brady
2001-02-13 13:58   ` Matt Stegman
2001-02-13 14:09     ` Xavier Bestel
  -- strict thread matches above, loose matches on Subject: below --
2001-02-13  5:09 Matt Stegman
2001-02-13 21:09 ` Mike Castle
2001-02-14 19:22 ` Pavel Machek

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