WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
220595
[GPUP][iOS] Create sandbox extensions for cache and temp directory
https://bugs.webkit.org/show_bug.cgi?id=220595
Summary
[GPUP][iOS] Create sandbox extensions for cache and temp directory
Per Arne Vollan
Reported
2021-01-13 09:53:02 PST
Create sandbox extensions for GPU process access to cache and temp directory.
Attachments
Patch
(5.14 KB, patch)
2021-01-13 09:57 PST
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Patch
(5.14 KB, patch)
2021-01-13 10:43 PST
,
Per Arne Vollan
cdumez
: review+
Details
Formatted Diff
Diff
Patch
(6.51 KB, patch)
2021-01-13 14:10 PST
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Patch
(7.25 KB, patch)
2021-01-14 06:02 PST
,
Per Arne Vollan
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(7.32 KB, patch)
2021-01-14 06:25 PST
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Per Arne Vollan
Comment 1
2021-01-13 09:53:46 PST
<
rdar://problem/72450307
>
Per Arne Vollan
Comment 2
2021-01-13 09:57:07 PST
Created
attachment 417544
[details]
Patch
Simon Fraser (smfr)
Comment 3
2021-01-13 10:01:16 PST
Comment on
attachment 417544
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=417544&action=review
> Source/WebKit/GPUProcess/GPUProcessCreationParameters.cpp:57 > +#if PLATFORM(IOS_FAMILY) > + encoder << containerCachesDirectoryExtensionHandle; > + encoder << containerTemporaryDirectoryExtensionHandle; > +#endif
Why is this iOS only?
Chris Dumez
Comment 4
2021-01-13 10:03:16 PST
(In reply to Simon Fraser (smfr) from
comment #3
)
> Comment on
attachment 417544
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=417544&action=review
> > > Source/WebKit/GPUProcess/GPUProcessCreationParameters.cpp:57 > > +#if PLATFORM(IOS_FAMILY) > > + encoder << containerCachesDirectoryExtensionHandle; > > + encoder << containerTemporaryDirectoryExtensionHandle; > > +#endif > > Why is this iOS only?
When GPUProcess is disabled and we pass those to the WebProcess, the code is for IOS_FAMILY only too, so at least it is consistent. The patch does not build on iOS EWS though.
Per Arne Vollan
Comment 5
2021-01-13 10:43:14 PST
Created
attachment 417547
[details]
Patch
Per Arne Vollan
Comment 6
2021-01-13 10:54:32 PST
(In reply to Simon Fraser (smfr) from
comment #3
)
> Comment on
attachment 417544
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=417544&action=review
> > > Source/WebKit/GPUProcess/GPUProcessCreationParameters.cpp:57 > > +#if PLATFORM(IOS_FAMILY) > > + encoder << containerCachesDirectoryExtensionHandle; > > + encoder << containerTemporaryDirectoryExtensionHandle; > > +#endif > > Why is this iOS only?
This works a little different on macOS, where confstr is used in the UI process to determine the cache and temp directory. The cache and temp directories are then passed as sandbox parameters, and sandbox rules will allow access to these directories. Thanks for reviewing!
Per Arne Vollan
Comment 7
2021-01-13 10:55:08 PST
(In reply to Chris Dumez from
comment #4
)
> (In reply to Simon Fraser (smfr) from
comment #3
) > > Comment on
attachment 417544
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=417544&action=review
> > > > > Source/WebKit/GPUProcess/GPUProcessCreationParameters.cpp:57 > > > +#if PLATFORM(IOS_FAMILY) > > > + encoder << containerCachesDirectoryExtensionHandle; > > > + encoder << containerTemporaryDirectoryExtensionHandle; > > > +#endif > > > > Why is this iOS only? > > When GPUProcess is disabled and we pass those to the WebProcess, the code is > for IOS_FAMILY only too, so at least it is consistent. > > The patch does not build on iOS EWS though.
Should be fixed in latest patch. Thanks for reviewing!
Simon Fraser (smfr)
Comment 8
2021-01-13 11:03:25 PST
(In reply to Per Arne Vollan from
comment #6
)
> (In reply to Simon Fraser (smfr) from
comment #3
) > > Comment on
attachment 417544
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=417544&action=review
> > > > > Source/WebKit/GPUProcess/GPUProcessCreationParameters.cpp:57 > > > +#if PLATFORM(IOS_FAMILY) > > > + encoder << containerCachesDirectoryExtensionHandle; > > > + encoder << containerTemporaryDirectoryExtensionHandle; > > > +#endif > > > > Why is this iOS only? > > This works a little different on macOS, where confstr is used in the UI > process to determine the cache and temp directory. The cache and temp > directories are then passed as sandbox parameters, and sandbox rules will > allow access to these directories.
It would be nicer to use a HAVE_FOO or USE_FOO macro then. We should avoid sprinkling platform #ifdefs around.
Per Arne Vollan
Comment 9
2021-01-13 11:11:22 PST
(In reply to Simon Fraser (smfr) from
comment #8
)
> (In reply to Per Arne Vollan from
comment #6
) > > (In reply to Simon Fraser (smfr) from
comment #3
) > > > Comment on
attachment 417544
[details]
> > > Patch > > > > > > View in context: > > >
https://bugs.webkit.org/attachment.cgi?id=417544&action=review
> > > > > > > Source/WebKit/GPUProcess/GPUProcessCreationParameters.cpp:57 > > > > +#if PLATFORM(IOS_FAMILY) > > > > + encoder << containerCachesDirectoryExtensionHandle; > > > > + encoder << containerTemporaryDirectoryExtensionHandle; > > > > +#endif > > > > > > Why is this iOS only? > > > > This works a little different on macOS, where confstr is used in the UI > > process to determine the cache and temp directory. The cache and temp > > directories are then passed as sandbox parameters, and sandbox rules will > > allow access to these directories. > > It would be nicer to use a HAVE_FOO or USE_FOO macro then. We should avoid > sprinkling platform #ifdefs around.
Sounds good, I will use a USE macro!
Per Arne Vollan
Comment 10
2021-01-13 14:10:32 PST
Created
attachment 417564
[details]
Patch
Per Arne Vollan
Comment 11
2021-01-14 06:02:37 PST
Created
attachment 417612
[details]
Patch
Per Arne Vollan
Comment 12
2021-01-14 06:25:46 PST
Created
attachment 417614
[details]
Patch
EWS
Comment 13
2021-01-14 07:31:23 PST
Committed
r271482
: <
https://trac.webkit.org/changeset/271482
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 417614
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug