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

Bug#334119: Patch to prevent open_not_cancel etc. from being inlined; needed for Plash's modified glibc



On Sat, Oct 15, 2005 at 06:51:19PM +0100, Mark Seaborn wrote:
> Package: glibc
> Version: 2.3.5-6
> Severity: wishlist
> Tags: patch
> 
> Usually, glibc inlines calls to non-cancellable versions of some
> system calls, such as open_not_cancel.  The macro definitions are in
> sysdeps/unix/sysv/linux/not-cancel.h.
> 
> This patch prevents those definitions from being inlined.  It moves
> them into separate *.c files.

No way.  Two problems: this patch would present an ongoing maintenance
burden for the Debian glibc maintainers, and it would have a
performance impact on all Debian applications on all architectures.

I fail to see why the core glibc package should be responsible for
building this rather mauled library.

What's Plash's CPU versions target?  For x86, you could probably do
this by:
 - replacing the dynamic linker instead of all of glibc
 - mapping a fake vsyscall page which checked the syscall number, and
   diverted to plash's code if appropriate
 - modifying the auxv vector to point at the modified vsyscall dso
   instead of the original
 - chaining to glibc's standard dynamic linker

Then you can do it with pristine binaries.  Should work on any
architecture which can indirect syscalls through a VDSO (at least ia64,
amd64, possibly soon ppc/ppc64).

> This patch isn't quite as essential for putting Plash into Debian as
> the other one I filed in the BTS.

I am a little dubious about the other Plash bug, but I'll
think about it.  It seems marginally within the purview of the
libc6-pic package and affects nothing else.

But it seems like it would be randomly crippled without this patch.

-- 
Daniel Jacobowitz
CodeSourcery, LLC



Reply to: