[Toybox] Impact of global struct size

Mouse mouse at Rodents-Montreal.ORG
Thu Jan 4 10:50:03 PST 2024


>>> (The line between PIE and dynamic linking confuses even me.  How
>>> does static PIE relocate itself?
>> It may not.  It could get relocated by in-kernel ASLR or the like.

(This, incidentally, was an OS-agnostic remark.  I suspect doing ASLR
for statically linked executables is relatively rare.)

> I want https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
> but a walkthrough for the kernel's ELF loader.

I suspect you may have to read the source for the kernel you care
about.  That's what I did when I was implementing a userland-only
emulator and needed to mimic what the kernel I cared about did when
loading an executable.

>>> Luckily X11 has "detach and restart" plumbing that lets it reopen a
>>> process's network pipe without killing the window or the process,
>> ...?  When did it grow that, and where can I find out more about it?
> Um... A) Before Scale 2011, B) ask Kir Kolyshkin?  He said it was
> something old.  (I think the program can just detect that the
> connection closed and dial out to the server again, opening a new
> window and repopulating it?  It's just most programs don't bother.)

Yes, it can, but that's not "without killing the window"; that's
recreating it after it gets killed.  (You can set the connection's
close-down mode so it doesn't get killed, but then it will stick around
until someone explicitly kills it even if the client never reconnects.
Depending on your use case, that might be useful or might be an even
bigger headache.  And, strictly speaking, I should add "or until server
reset"....)

Also, depending on your X interface software (Xlib etc), it can be
difficult to handle connection death without killing the process
holding your end of the connection.  This can be worked around by using
helper processes, but it's ugly.

> What OpenVZ was doing was [...]

Okay, I guess I wasn't missing as much as I thought.  (That's not so
much reopening the connection as never closing it in the first place.)

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse at rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


More information about the Toybox mailing list