Re: [PATCH v2 2/2] unshare: load binfmt_misc interpreter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 18, 2024 at 12:13:50PM +0200, Laurent Vivier wrote:
> Le 18/06/2024 à 11:51, Karel Zak a écrit :
> > 
> >   Hi Laurent,
> > 
> 
> Hi Karel,
> 
> > On Tue, Jun 11, 2024 at 10:43:14AM +0200, Laurent Vivier wrote:
> > > +*-l*, **--load-interp=**__file__::
> > > +Load binfmt_misc definition in the namespace (implies *--mount-binfmt*).
> > 
> > Is it actually a file, or does the argument have a more complex
> > format? If there is something more that it should be described here.
> > It fine describe in the man page more about the interpreters.
> 
> Your right the format here is not actually a file, but it defines how to use
> the file provided in the parameter as an interpreter.
> 
> We provide here what we will write in /proc/sys/fs/binfmt_misc/register and
> the format is described in
> https://www.kernel.org/doc/Documentation/admin-guide/binfmt-misc.rst:
> 
> "To actually register a new binary type, you have to set up a string looking
> like ``:name:type:offset:magic:mask:interpreter:flags``

 I guess we can use something like:

 -l*, **--load-interp=**string

 Load binfmt_misc definition in the namespace. The __string__ argument
 is ``:name:type:offset:magic:mask:interpreter:flags``. For more
 details about new binary type registration see
 https://www.kernel.org/doc/Documentation/admin-guide/binfmt-misc.rst.


> > As an uneducated reader, I am confused by the flags. Where is the 'F'
> > flag? Perhaps you could provide more explanation to make it easier for
> > readers to understand.
> 
> I think this option should be used by educated user that is aware of binfmt_misc format.
> 
> Do you want I copy a part of the binfmt_misc documentation in the unshare documentation?

It's probably overkill copy all the text.

> I'll update the man page accordingly.

Thanks!

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com





[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux