public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: "Ryan C. Gordon" <icculus@icculus.org>
Cc: "Måns Rullgård" <mans@mansr.com>, linux-kernel@vger.kernel.org
Subject: Re: FatELF patches...
Date: Tue, 03 Nov 2009 09:54:17 -0500	[thread overview]
Message-ID: <151663.1257260057@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Mon, 02 Nov 2009 10:14:15 EST." <alpine.OSX.1.10.0911020012500.56087@caridad.local>

[-- Attachment #1: Type: text/plain, Size: 3051 bytes --]

On Mon, 02 Nov 2009 10:14:15 EST, "Ryan C. Gordon" said:

> I probably wasn't clear when I said "distribution-wide policy" followed by 
> a "then again." I meant there would be backlash if the distribution glued 
> the whole system together, instead of just binaries that made sense to do 
> it to.

OK.. I'll bite - which binaries does it make sense to do so?  Remember in
your answer to address the very valid point that any binaries you *don't*
do this for will still need equivalent hand-holding by the package manager.
So if you're not doing all of them, you need to address the additional
maintenance overhead of "which way is this package supposed to be built?"
and all the derivative headaches.

It might be instructive to not do a merge of *everything* in Ubuntu as you
did, but only select a random 20% or so of the packages and convert them
to FatELF, and see what breaks. (If our experience with 'make randconfig'
in the kernel is any indication, you'll hit a *lot* of corner cases and
pre-reqs you didn't know about...)

> > Actually, they can't nuke the /lib{32,64} directories unless *all* binaries
> > are using FatELF - as long as there's any binaries doing things The Old Way,
> > you need to keep the supporting binaries around.
> 
> Binaries don't refer directly to /libXX, they count on ld.so to tapdance 
> on their behalf. My virtual machine example left the dirs there as 
> symlinks to /lib, but they could probably just go away directly.

Only if all your shared libs (which are binaries too) have migrated to FatELF.

On my box, I have:

% ls -l /usr/lib{,64}/libX11.so.6.3.0
-rwxr-xr-x 1 root root 1274156 2009-10-06 13:49 /usr/lib/libX11.so.6.3.0
-rwxr-xr-x 1 root root 1308600 2009-10-06 13:49 /usr/lib64/libX11.so.6.3.0

You can't dump them both into /usr/lib without making it a FatElf or doing
some name mangling. You probably didn't notice because you merged *all* of
an ubuntu distro into FatELF.

> > Don't forget you take that hit once for each shared library involved.  Plus
> 
> That happens in user space in ld.so, so it's not a kernel problem in any 
> case, but still...we're talking about, what? Twenty more branch 
> instructions per-process?

No, a lot more than that - you already identified an extra 128-byte read
as needing to happen.  Plus syscall overhead.

> > Or will a FatELF glibc.so screw up somebody's refcounts if it's mapped
> > in both 32 and 64 bit modes?
> 
> Whose refcounts would this screw up? If there's a possible bug, I'd like 
> to make sure it gets resolved, of course.

That's the point - nobody's done an audit for such things.  Does the kernel
DTRT when counting mapped pages (probably close-to-right, if you got it to boot)?
Where are the corresponding patches, if any, for tools like perf and oprofile?
Does lsof DTRT? /proc/<pid>/pagemap?  Any other tools that may break because
the make an assumption that executable files are mapped as 32-bit or 64-bit,
but not both (most likely choking if they see a 64-bit address someplace
after they've decided the binary is a 32-bit)?

[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]

  reply	other threads:[~2009-11-03 14:54 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-30  2:19 FatELF patches Ryan C. Gordon
2009-10-30  5:42 ` Rayson Ho
2009-10-30 14:54   ` Ryan C. Gordon
2009-11-01 19:20 ` David Hagood
2009-11-01 20:28   ` Måns Rullgård
2009-11-01 20:59     ` Ryan C. Gordon
2009-11-01 21:15       ` Måns Rullgård
2009-11-01 21:35         ` Ryan C. Gordon
2009-11-02  4:58           ` Valdis.Kletnieks
2009-11-02 15:14             ` Ryan C. Gordon
2009-11-03 14:54               ` Valdis.Kletnieks [this message]
2009-11-03 18:30                 ` Matt Thrailkill
2009-11-01 22:08         ` Rayson Ho
2009-11-02  1:17           ` Ryan C. Gordon
2009-11-02  3:27             ` Rayson Ho
2009-11-02  0:01       ` Alan Cox
2009-11-02  2:21         ` Ryan C. Gordon
2009-11-02  6:17           ` Julien BLACHE
2009-11-02 18:18             ` Ryan C. Gordon
2009-11-02 18:59               ` Julien BLACHE
2009-11-02 19:08               ` Jesús Guerrero
2009-11-02  6:27           ` David Miller
2009-11-02 15:32             ` Ryan C. Gordon
2009-11-02  9:16           ` Alan Cox
2009-11-02 17:39             ` david
2009-11-02 17:44               ` Alan Cox
2009-11-02 19:56               ` Krzysztof Halasa
2009-11-02 20:11                 ` david
2009-11-02 20:33                   ` Krzysztof Halasa
2009-11-03  1:35                   ` Mikael Pettersson
2009-11-02 15:40           ` Diego Calleja
2009-11-04 16:40           ` package managers [was: FatELF patches...] Mikulas Patocka
2009-11-04 16:54             ` Alan Cox
2009-11-04 17:25               ` Mikulas Patocka
2009-11-04 17:48                 ` Martin Nybo Andersen
2009-11-04 18:46                   ` Mikulas Patocka
2009-11-04 19:46                     ` Alan Cox
2009-11-04 20:04                       ` Mikulas Patocka
2009-11-04 20:27                         ` david
2009-11-04 20:02                     ` Valdis.Kletnieks
2009-11-04 20:08                       ` Mikulas Patocka
2009-11-04 20:41                         ` Valdis.Kletnieks
2009-11-04 21:11                           ` Mikulas Patocka
2009-11-04 21:32                             ` kevin granade
2009-11-04 22:05                               ` Mikulas Patocka
2009-11-04 22:19                                 ` Marcin Letyns
2009-11-04 22:28                                   ` david
2009-11-04 22:43                                 ` Martin Nybo Andersen
2009-11-04 23:55                                   ` Mikulas Patocka
2009-11-05  2:24                                     ` Valdis.Kletnieks
2009-11-05  2:52                                       ` Mikulas Patocka
     [not found]                                         ` <f42384a10911050134t37a0a812hd85ff5541423dc9f@mail.gmail.com>
2009-11-05  9:35                                           ` Fwd: " Marcin Letyns
2009-11-10 11:40                                         ` Enrico Weigelt
2009-11-04 23:11                             ` Valdis.Kletnieks
2009-11-05  0:05                               ` Mikulas Patocka
2009-11-10 11:57                     ` Enrico Weigelt
2009-11-04 17:36             ` Valdis.Kletnieks
2009-11-04 20:28             ` Ryan C. Gordon
2009-11-02 17:52         ` FatELF patches Ryan C. Gordon
2009-11-02 18:53           ` Alan Cox
2009-11-02 20:13             ` Ryan C. Gordon
2009-11-04  1:09               ` Ryan C. Gordon
2009-11-10 11:27           ` Enrico Weigelt
2009-11-10 12:40             ` Bernd Petrovitsch
2009-11-10 13:00               ` Enrico Weigelt
2009-11-10 13:19                 ` Alan Cox
2009-11-02 16:11       ` Chris Adams
2009-11-01 20:40   ` Ryan C. Gordon
2009-11-10 10:04   ` Enrico Weigelt
  -- strict thread matches above, loose matches on Subject: below --
2009-11-03  6:43 Eric Windisch
2009-11-03 11:21 ` Bernd Petrovitsch
2009-11-10 10:10   ` Enrico Weigelt
2009-11-10 12:15     ` Bernd Petrovitsch
2009-11-10 10:21 ` Enrico Weigelt
     [not found] <dAPfP-5R6-1@gated-at.bofh.it>
     [not found] ` <dBOhH-uY-9@gated-at.bofh.it>

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=151663.1257260057@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=icculus@icculus.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mans@mansr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox