[uClibc] Bug in (probably) shm, cause: IPC patch of 2005.04.24

Joakim Tjernlund joakim.tjernlund at lumentis.se
Sat May 7 22:27:39 UTC 2005



> -----Original Message-----
> From: uclibc-bounces at uclibc.org [mailto:uclibc-bounces at uclibc.org]On
> Behalf Of Peter S. Mazinger
> Sent: 07 May 2005 19:53
> To: uclibc at uclibc.org
> Subject: [uClibc] Bug in (probably) shm, cause: IPC patch of 2005.04.24
> 
> 
> Hello!
> 
> The patch that was added on 2005.04.14 (IPC_64) killed all apps that make 
> use of shared memory.
> I am using grsecurity patched kernels (tested both 2.4.30 and 2.6.11)
> 
> The apps: icewm, xfwm4, mozilla, xfdesktop, xfce4-session, xfce4-panel.
> 
> If the apps are rebuilt against the current uclibc, they trigger a stack 
> smash protection in X (xorg-x11-6.8.2) in ProtShmAttach(). It is not 
> relevant if X is rebuilt or not.
> If I undo the above named patch, none of the apps trigger ssp in X, but 
> fail themselves until they are rebuilt again against the non-IPC uclibc 
> version.
> I can't even tell what happens, my box hanged, only the ssp entry is in 
> the logs.

Looks like the shm.h files needed to be updated to the newer IPC_64 interface as well.
I have commited an update with those files, but not tested it. Please report
how this works out for you.

> 
> As a side-note, speaking about the current state of uclibc:
> 
> Forced by the above bug I have rebuilt 312 apps against the current 
> (2005.05.02) version of uclibc (w/o IPC patch).
> 
> It is poerforming really fine, thanks.
> 
> All the c++ stuff was built against uclibc++-svn, binutils-2.15.96.0.2 
> and gcc-3.4.3. The build is based on gentoo, with additional patches 
> to support uclibc better/in more apps. All the patches that were proposed 
> in bugs (for gcc4, math, main moved to crt0.S) were used, the only feature 
> not enabled (due to incompat) was moving fini.

hmm, did you do anything to the code to leave it out? You should not need
to do that since I havn't activated that change yet. Now apps(x86 and PPC) are only prepared
for the switch ower but doesn't use it yet.

> 
> Not solved issues I have found:
> 1. argument handling (if there are probably more than 4) fails, the 
> ordering of args is relevant (bug opened: ex. rpm)
> 2. string handling has some trouble:
> configure of some apps has
> PACKAGE_STRING='abiword 2.2' like entry
> after running configure it gets added to Makefile/GNUmakefile as
> DEFS = -DPACKAGE_STRING=\"abiword\ 2.2\" # left out the others
> if now make is run gcc/g++ misses the second '\' so 2.2 is not part of 
> PACKAGE_STRING and fails.
> 
> The move of main to crt0.S produces 2 failures:
> - subversion fails the tests (the app itself is ok)
> - sysvinit: can't build init (but this is related to PIE creation, if I 
> build it as ET_EXEC, it succeeds, it seems a combination of relocation 
> -GOTOFF- and main not supported by linker)
> 
> Thanks for the good work,
> 
> Peter
> 
> -- 
> Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
> Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2
> 
> 



More information about the uClibc mailing list