Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libyuv /proc/cpuinfo detect within Chrome sandbox #345

Open
GoogleCodeExporter opened this issue Dec 31, 2015 · 3 comments
Open

libyuv /proc/cpuinfo detect within Chrome sandbox #345

GoogleCodeExporter opened this issue Dec 31, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Neon instruction set is optional and detection is via the file /proc/cpuinfo
This file can not be read within Chrome's sandbox.

r1037 attempts to read the file, but if it can not be read and the NEON code 
has been built in, Neon is assumed to be true.

Find a better way to detect Neon that is sandbox friendly.

Original issue reported on code.google.com by [email protected] on 22 Jul 2014 at 5:35

@GoogleCodeExporter
Copy link
Author

cross posting from crbug:

This CL provides a way to cache files and makes them available in the sandbox.
https://codereview.chromium.org/416473002/

This CL uses the sandbox file cache from the above CL to provide a weak 
implementation of getauxval, guaranteeing its availability in Chrome.
https://codereview.chromium.org/435533003

Now getauxval can be used inside the Chrome sandbox regardless of glibc 
version. Think that provides everything you need and you will have no 
Chrome-specific code in the libs.

How's this sound to the media guys?
fbarchard@ Could you test this with libyuv et el...you'd need to cherry pick 
the above CLs.

Original comment by [email protected] on 4 Aug 2014 at 9:39

@GoogleCodeExporter
Copy link
Author

Here's example code for using hwcaps

Original comment by [email protected] on 5 Nov 2014 at 11:26

@GoogleCodeExporter
Copy link
Author

We work around this for ffmpeg by initializing the cpu flags prior to sandbox 
startup, we could do the same for libyuv:

https://code.google.com/p/chromium/codesearch#chromium/src/media/base/media.cc&l
=30

Original comment by [email protected] on 23 Jul 2015 at 8:13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant