Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Issue 10690116: Add env var for GPU process sandbox. (Closed)

Created:
8 years, 5 months ago by Jorge Lucangeli Obes
Modified:
8 years, 5 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, apatrick_chromium
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Add env var for GPU process sandbox. Since the seccomp filter GPU sandbox blocks access to the file system, we need to set an env var with the config line found in /etc/drirc on Chrome OS. This allows games that use S3TC to work inside the sandbox. BUG=127664 TEST=Bastion works on Chrome OS with '--enable-gpu-sandbox'. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=145990

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -0 lines) Patch
M content/gpu/gpu_main.cc View 1 chunk +7 lines, -0 lines 1 comment Download

Messages

Total messages: 13 (0 generated)
Jorge Lucangeli Obes
PTAL cevans for actual change, apatrick for OWNERS stamp. Thanks!
8 years, 5 months ago (2012-07-10 18:41:31 UTC) #1
Chris Evans
LGTM (I recommend following up by replacing the ChromeOS /etc/drirc with an XML comment that ...
8 years, 5 months ago (2012-07-10 18:43:52 UTC) #2
apatrick_chromium
lgtm
8 years, 5 months ago (2012-07-10 20:24:14 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jorgelo@chromium.org/10690116/1
8 years, 5 months ago (2012-07-10 20:31:55 UTC) #4
commit-bot: I haz the power
Try job failure for 10690116-1 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 5 months ago (2012-07-10 22:15:18 UTC) #5
Jorge Lucangeli Obes
On 2012/07/10 22:15:18, I haz the power (commit-bot) wrote: > Try job failure for 10690116-1 ...
8 years, 5 months ago (2012-07-10 22:18:33 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jorgelo@chromium.org/10690116/1
8 years, 5 months ago (2012-07-10 22:19:32 UTC) #7
commit-bot: I haz the power
Change committed as 145990
8 years, 5 months ago (2012-07-10 23:39:56 UTC) #8
piman
https://chromiumcodereview.appspot.com/10690116/diff/1/content/gpu/gpu_main.cc File content/gpu/gpu_main.cc (right): https://chromiumcodereview.appspot.com/10690116/diff/1/content/gpu/gpu_main.cc#newcode103 content/gpu/gpu_main.cc:103: base::Environment::Create()->SetVar("force_s3tc_enable", "true"); Sigh... that file may be used to ...
8 years, 5 months ago (2012-07-10 23:53:05 UTC) #9
Jorge Lucangeli Obes
On 2012/07/10 23:53:05, piman wrote: > https://chromiumcodereview.appspot.com/10690116/diff/1/content/gpu/gpu_main.cc > File content/gpu/gpu_main.cc (right): > > https://chromiumcodereview.appspot.com/10690116/diff/1/content/gpu/gpu_main.cc#newcode103 > ...
8 years, 5 months ago (2012-07-10 23:58:06 UTC) #10
piman
On Tue, Jul 10, 2012 at 4:58 PM, <jorgelo@chromium.org> wrote: > On 2012/07/10 23:53:05, piman ...
8 years, 5 months ago (2012-07-11 00:28:59 UTC) #11
Jorge Lucangeli Obes
On 2012/07/11 00:28:59, piman wrote: > On Tue, Jul 10, 2012 at 4:58 PM, <mailto:jorgelo@chromium.org> ...
8 years, 5 months ago (2012-07-11 01:02:54 UTC) #12
piman
8 years, 5 months ago (2012-07-11 01:16:06 UTC) #13
On Tue, Jul 10, 2012 at 6:02 PM, <jorgelo@chromium.org> wrote:

> On 2012/07/11 00:28:59, piman wrote:
>
>  On Tue, Jul 10, 2012 at 4:58 PM, <mailto:jorgelo@chromium.org> wrote:
>>
>
>  > On 2012/07/10 23:53:05, piman wrote:
>> >
>> >>
https://chromiumcodereview.**a**ppspot.com/10690116/diff/1/**<http://appspot....
>> >>
>>
>
> content/gpu/gpu_main.cc<https:**//chromiumcodereview.appspot.**
>
com/10690116/diff/1/content/**gpu/gpu_main.cc<https://chromiumcodereview.appspot.com/10690116/diff/1/content/gpu/gpu_main.cc>
> >
>
>> >> File content/gpu/gpu_main.cc (right):
>> >>
>> >
>> >
>> >
https://chromiumcodereview.**a**ppspot.com/10690116/diff/1/**<http://appspot....
>> >
>>
>
> content/gpu/gpu_main.cc#****newcode103<https://**
> chromiumcodereview.appspot.**com/10690116/diff/1/content/**
>
gpu/gpu_main.cc#newcode103<https://chromiumcodereview.appspot.com/10690116/diff/1/content/gpu/gpu_main.cc#newcode103>
> >
>
>> >
>> >> content/gpu/gpu_main.cc:103:
>> >> base::Environment::Create()->****SetVar("force_s3tc_enable", "true");
>>
>> >> Sigh... that file may be used to do per-platform configuration. Is it
>> >> going to
>> >> leak all over the place here instead of in Chrome OS per-board overlay?
>> >>
>> >
>> >  Can't we change the driver to make sure that it reads that file early
>> >> (before
>> >>
>> > we
>> >
>> >> turn on the sandbox) instead?
>> >>
>> >
>> > I tried making the change outside of Chrome. The problem is that:
>> >
>> > src/third_party/mesa/MesaLib/****src/mesa/drivers/dri/i915/**
>>
>> > intel_context.c:
>> >
>> > GLboolean
>> > intelInitContext(struct intel_context *intel,
>> >                  int api,
>> >                  const __GLcontextModes * mesaVis,
>> >                  __DRIcontext * driContextPriv,
>> >                  void *sharedContextPrivate,
>> >                  struct dd_function_table *functions)
>> >
>> > Always calls open() to read /etc/drirc, and does not have any caching
>> > mechanism
>> > whatsoever. Every time a new context is created, we do the call to
>> open();
>> > we
>> > create contexts after the sandbox is on.
>> >
>>
>
>  I think it wouldn't be too hard to move the parsing to intelInitScreen2,
>> which should get called before the sandbox is on.
>>
>
> What's the policy for Mesa changes? Is it OK to carry local changes, or is
> it
> frowned upon?
>

We carry some, but it'd be better to upstream if possible.


>
>
>  >
>>
>
> https://chromiumcodereview.**a**ppspot.com/10690116/%3Chttps:/**
>
/chromiumcodereview.appspot.**com/10690116/<http://appspot.com/10690116/%3Chttps://chromiumcodereview.appspot.com/10690116/>
> >
>
>> >
>>
>
>
>
>
https://chromiumcodereview.**appspot.com/10690116/<https://chromiumcodereview...
>

Powered by Google App Engine
This is Rietveld 408576698