Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 240352 - >=media-libs/x264-0.0.20081006: position independant code support has been dropped upstream
Summary: >=media-libs/x264-0.0.20081006: position independant code support has been dr...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
: 357159 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-07 06:08 UTC by Alexis Ballier
Modified: 2011-03-04 11:39 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Ballier gentoo-dev 2008-10-07 06:08:36 UTC
This shouldn't be a too big issue considering x264 useflag is still masked on hardened (I think), that x264 is a small cpu intensive library (so the memory and time wasted in relocations are probably negligible in front of the time wasted in indirect addressing); but still this should be fixed to have clean page permissions.

See: http://mailman.videolan.org/pipermail/x264-devel/2008-August/004834.html

If you want this back, please work with upstream and fix the bugs with them, I'll be very happy to add a new snapshot once proper support is re-added. This will probably require more work than just reverting that commit since some new asm has been added since.
Comment 1 PaX Team 2008-10-07 07:00:59 UTC
jeez, what kind of idiots are writing x264? it's not at all about the amount of wasted memory due to COW, it's about the security impact. and it's not specific to PaX, SELinux users will also cry bloody murder as well as they'll have to adjust the policies too to allow textrels. someone please hit these devs with a clue stick, this is 2008 and you don't intentionally put textrels into anything, especially not revert already working code!

Alexis, can you please put the reverted patch into portage and i'll take care of any new changes.
Comment 2 Alexis Ballier gentoo-dev 2008-10-07 07:24:44 UTC
(In reply to comment #1)
> Alexis, can you please put the reverted patch into portage and i'll take care
> of any new changes.


Please contact Loren directly; he said PIC code will be broken at some point and I'm not skilled enough to do the work (and esp. since I consider x86 and its too few registers, making pic code slow and its 20 years old design is a dying arch).

See:
http://mailman.videolan.org/pipermail/x264-devel/2008-August/004838.html

maybe you could convince him to do c) for him and git would make it easy.
Comment 3 Attila Tóth 2008-12-28 18:10:48 UTC
I have just became aware of the intentional TEXTRELs in this library.
Here's a snippet of the changes just to provide a clue on their essential beliefs:
-; - picgetgot computes the GOT address into the given register in PIC
-;   mode, otherwise does nothing. You need to do this before using GLOBAL.
-;   Before in both execution order and compiled code order (so GLOBAL knows
-;   which register the GOT is in).
+; x86_32 doesn't require PIC.
+; Some distros prefer shared objects to be PIC, but nothing breaks if
+; the code contains a few textrels, so we'll skip that complexity.

Unfortunately I'm in lack of time and skill for maintaining a TEXTREL free version of the library. I think only the Spanish inquisition could remedy this issue. If a group of adventurers would decide to start a quest on evangelizing the developers, they can count on a mountain dwarf warrior priest to join their party.
However I still hope, that this disease won't infect vlc, since x264 is a project running alongside with the well-known media player.

Regards,
Dw.
Comment 4 Christian Faulhammer (RETIRED) gentoo-dev 2009-07-02 10:06:46 UTC
x86 does not have time to maintain that either...so maybe we should force upstream to change it somehow-
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2009-09-09 09:29:32 UTC
The ebuild has now,

#       if use x86 && use pic; then
#               myconf="${myconf} --disable-asm"
#       fi

I know it will be slow but better than having nothing, at least those hardened users with fast machine could use it. It's commented, as you can see... up to hardened to make use of it.
Comment 6 Raymond Jennings 2009-12-19 00:18:09 UTC
I just emerged x264 and got hit with a QA notice for TEXTREL:

Offending package: media-libs/x264-0.0.20090908
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2010-01-14 19:26:29 UTC
*** Bug 301013 has been marked as a duplicate of this bug. ***
Comment 8 David J Cozatt 2010-08-31 22:01:22 UTC
 media-libs/x264-0.0.20100605 - 08/31/2010 

installed with USE flag pic ...no reported TEXTRELS
system is ~amd64 with "CFLAGS="-march=native -O2 -pipe"
Comment 9 Alexis Ballier gentoo-dev 2010-10-25 00:49:06 UTC
seems everything is fine now, the pic asm should be worked with upstream if ever.
Comment 10 Alexis Ballier gentoo-dev 2011-03-04 11:39:13 UTC
*** Bug 357159 has been marked as a duplicate of this bug. ***