unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* is there plan to support 'linker namespace' in glib?
@ 2019-03-11 11:13 zhuao
  2019-03-11 12:31 ` Szabolcs Nagy
  2019-03-11 12:50 ` Florian Weimer
  0 siblings, 2 replies; 5+ messages in thread
From: zhuao @ 2019-03-11 11:13 UTC (permalink / raw)
  To: libc-alpha


Hi experts:


I notice that android bionic support 'linker namespace': https://source.android.com/devices/architecture/vndk/linker-namespace
it provides additional isolation among software components.
it may also benefit some usage: 
 - isolation prebuilt binaries with different toolchain (versioned glibc)
 - it may also give us opportunity to use android binary (HAL) with glibc, by isolating glib and bionic world in different namespace


do you think the above approach is possible?
 if yes, is it possible to add such feature to glibc?


thanks.


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

* Re: is there plan to support 'linker namespace' in glib?
  2019-03-11 11:13 is there plan to support 'linker namespace' in glib? zhuao
@ 2019-03-11 12:31 ` Szabolcs Nagy
  2019-03-11 12:50 ` Florian Weimer
  1 sibling, 0 replies; 5+ messages in thread
From: Szabolcs Nagy @ 2019-03-11 12:31 UTC (permalink / raw)
  To: zhuao, libc-alpha; +Cc: nd

On 11/03/2019 11:13, zhuao wrote:
> I notice that android bionic support 'linker namespace': https://source.android.com/devices/architecture/vndk/linker-namespace
> it provides additional isolation among software components.
> it may also benefit some usage: 
>  - isolation prebuilt binaries with different toolchain (versioned glibc)
>  - it may also give us opportunity to use android binary (HAL) with glibc, by isolating glib and bionic world in different namespace
> 
> 
> do you think the above approach is possible?
>  if yes, is it possible to add such feature to glibc?

glibc supports dlmopen

but i think such isolation does not work reliably
for the libc itself (or anything that tries to
manage application global state) if you need multiple
instances of that module (e.g. different versions of
the libc or a different libc implementations) in the
same process.

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

* Re: is there plan to support 'linker namespace' in glib?
  2019-03-11 11:13 is there plan to support 'linker namespace' in glib? zhuao
  2019-03-11 12:31 ` Szabolcs Nagy
@ 2019-03-11 12:50 ` Florian Weimer
  2019-03-11 20:38   ` Nicholas Miell
  1 sibling, 1 reply; 5+ messages in thread
From: Florian Weimer @ 2019-03-11 12:50 UTC (permalink / raw)
  To: zhuao; +Cc: libc-alpha

* zhuao:

> I notice that android bionic support 'linker namespace': https://source.android.com/devices/architecture/vndk/linker-namespace
> it provides additional isolation among software components.
> it may also benefit some usage: 
>  - isolation prebuilt binaries with different toolchain (versioned glibc)
>  - it may also give us opportunity to use android binary (HAL) with glibc, by isolating glib and bionic world in different namespace
>
>
> do you think the above approach is possible?
>  if yes, is it possible to add such feature to glibc?

There have been many discussions over the year.  The requirements are
quite diverse: some people want group support as in the Solaris linker.
Others want dlmopen with a shared malloc (and perhaps shared other
libraries; our implementation currently shares only the dynamic linker
and nothing else).  Again others want to load the same library multiple
times, disregarding its soname.  Then there is a desire to have some
sort of firewall between different linker namespaces, as a general
framework, so that you can load the same soname multiple times, and
still achieving consistent execution.

I think that anything that is fairly general and actually works is still
a major research effort, in addition to the work that would be needed to
implement it in the current dynamic linker.  While a lot of research has
been done on modules and how to compose them in the 80s, a lot of that
knowledge seems to have been lost or is simply not available to people
working on C/C++ implementations today.

Thanks,
Florian

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

* Re: is there plan to support 'linker namespace' in glib?
  2019-03-11 12:50 ` Florian Weimer
@ 2019-03-11 20:38   ` Nicholas Miell
  2019-03-12  0:27     ` zhuao
  0 siblings, 1 reply; 5+ messages in thread
From: Nicholas Miell @ 2019-03-11 20:38 UTC (permalink / raw)
  To: Florian Weimer, zhuao; +Cc: libc-alpha

On 3/11/19 5:50 AM, Florian Weimer wrote:
> * zhuao:
> 
>> I notice that android bionic support 'linker namespace': https://source.android.com/devices/architecture/vndk/linker-namespace
>> it provides additional isolation among software components.
>> it may also benefit some usage: 
>>  - isolation prebuilt binaries with different toolchain (versioned glibc)
>>  - it may also give us opportunity to use android binary (HAL) with glibc, by isolating glib and bionic world in different namespace
>>
>>
>> do you think the above approach is possible?
>>  if yes, is it possible to add such feature to glibc?
> 
> There have been many discussions over the year.  The requirements are
> quite diverse: some people want group support as in the Solaris linker.
> Others want dlmopen with a shared malloc (and perhaps shared other
> libraries; our implementation currently shares only the dynamic linker
> and nothing else).  Again others want to load the same library multiple
> times, disregarding its soname.  Then there is a desire to have some
> sort of firewall between different linker namespaces, as a general
> framework, so that you can load the same soname multiple times, and
> still achieving consistent execution.
> 
> I think that anything that is fairly general and actually works is still
> a major research effort, in addition to the work that would be needed to
> implement it in the current dynamic linker.  While a lot of research has
> been done on modules and how to compose them in the 80s, a lot of that
> knowledge seems to have been lost or is simply not available to people
> working on C/C++ implementations today.
> 
> Thanks,
> Florian
> 

And some people would like direct binding, especially because this is
how Windows and Mac OS already work.

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

* Re:Re: is there plan to support 'linker namespace' in glib?
  2019-03-11 20:38   ` Nicholas Miell
@ 2019-03-12  0:27     ` zhuao
  0 siblings, 0 replies; 5+ messages in thread
From: zhuao @ 2019-03-12  0:27 UTC (permalink / raw)
  To: Nicholas Miell; +Cc: Florian Weimer, libc-alpha



thanks you all for the valued information.

could you give me some link for the discussion?
some links for the experimental approach, and links for 'direct binding'.

I know little about linker, and would like to know more background.
thanks


发件人:Nicholas Miell <nmiell@gmail.com>
发送日期:2019-03-12 04:38:57
收件人:Florian Weimer <fweimer@redhat.com>,zhuao <zhuao@ustc.edu>
抄送人:libc-alpha <libc-alpha@sourceware.org>
主题:Re: is there plan to support 'linker namespace' in glib?>On 3/11/19 5:50 AM, Florian Weimer wrote:
>> * zhuao:
>> 
>>> I notice that android bionic support 'linker namespace': https://source.android.com/devices/architecture/vndk/linker-namespace
>>> it provides additional isolation among software components.
>>> it may also benefit some usage: 
>>>  - isolation prebuilt binaries with different toolchain (versioned glibc)
>>>  - it may also give us opportunity to use android binary (HAL) with glibc, by isolating glib and bionic world in different namespace
>>>
>>>
>>> do you think the above approach is possible?
>>>  if yes, is it possible to add such feature to glibc?
>> 
>> There have been many discussions over the year.  The requirements are
>> quite diverse: some people want group support as in the Solaris linker.
>> Others want dlmopen with a shared malloc (and perhaps shared other
>> libraries; our implementation currently shares only the dynamic linker
>> and nothing else).  Again others want to load the same library multiple
>> times, disregarding its soname.  Then there is a desire to have some
>> sort of firewall between different linker namespaces, as a general
>> framework, so that you can load the same soname multiple times, and
>> still achieving consistent execution.
>> 
>> I think that anything that is fairly general and actually works is still
>> a major research effort, in addition to the work that would be needed to
>> implement it in the current dynamic linker.  While a lot of research has
>> been done on modules and how to compose them in the 80s, a lot of that
>> knowledge seems to have been lost or is simply not available to people
>> working on C/C++ implementations today.
>> 
>> Thanks,
>> Florian
>> 
>
>And some people would like direct binding, especially because this is
>how Windows and Mac OS already work.


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

end of thread, other threads:[~2019-03-12  0:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-11 11:13 is there plan to support 'linker namespace' in glib? zhuao
2019-03-11 12:31 ` Szabolcs Nagy
2019-03-11 12:50 ` Florian Weimer
2019-03-11 20:38   ` Nicholas Miell
2019-03-12  0:27     ` zhuao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).