2003-08-14 09:02:50

by Zach, Yoav

[permalink] [raw]
Subject: [PATCH]: RO binaries - binfmt_misc, linux-2.6.0-test3

The proposed patch solves a problem for interpreters that need to
execute a non-readable file, which cannot be read in userland. To handle
such cases the interpreter must have the kernel load the binary on its
behalf. The proposed patch handles this case by telling binfmt_misc, by
a special flag in the registration string, to open the binary for
reading and pass its descriptor as argv[1], instead of passing the
binary's path. Old behavior of binfmt_misc is kept for interpreters
which do not specify this special flag.

The patch is against linux-2.6.0-test3

========================================================================
=============
Yoav Zach
Performance Tools Lab
Intel Corp.



Attachments:
2.4.binfmt_misc_open_binary.ZIP (1.00 kB)
2.4.binfmt_misc_open_binary.ZIP

2003-08-14 09:25:48

by Muli Ben-Yehuda

[permalink] [raw]
Subject: Re: [PATCH]: RO binaries - binfmt_misc, linux-2.6.0-test3

On Thu, Aug 14, 2003 at 12:02:44PM +0300, Zach, Yoav wrote:
> The proposed patch solves a problem for interpreters that need to
> execute a non-readable file, which cannot be read in userland. To handle
> such cases the interpreter must have the kernel load the binary on its
> behalf.

In what scenarios does this occur?

> The patch is against linux-2.6.0-test3

Please send patches as inline text, unless they're really big. Thank
you.
--
Muli Ben-Yehuda
http://www.mulix.org


Attachments:
(No filename) (484.00 B)
(No filename) (189.00 B)
Download all attachments

2003-08-14 10:46:04

by Zach, Yoav

[permalink] [raw]
Subject: RE: [PATCH]: RO binaries - binfmt_misc, linux-2.6.0-test3

We are running IA-32 binaries on IPF machines using a SW translator.
We have problems with binaries that are non-readable ( it's
execute-only not read-only. sorry for the misleading subject line )
that reside on an NFS drive. There is no way for the translator
to load these files, even if it had root permissions, because these
permissions are squashed on the remote drive; so giving the translator
setuid/root permissions does not work.

Thanks,
Yoav.

> -----Original Message-----
> From: Muli Ben-Yehuda [mailto:[email protected]]
> Sent: Thursday, August 14, 2003 12:26
> To: Zach, Yoav
> Cc: [email protected]; Sharma, Arun; Mallick, Asit K
> Subject: Re: [PATCH]: RO binaries - binfmt_misc, linux-2.6.0-test3
>
>
> On Thu, Aug 14, 2003 at 12:02:44PM +0300, Zach, Yoav wrote:
> > The proposed patch solves a problem for interpreters that need to
> > execute a non-readable file, which cannot be read in
> userland. To handle
> > such cases the interpreter must have the kernel load the
> binary on its
> > behalf.
>
> In what scenarios does this occur?
>
> > The patch is against linux-2.6.0-test3
>
> Please send patches as inline text, unless they're really big. Thank
> you.
> --
> Muli Ben-Yehuda
> http://www.mulix.org
>
>