Bug 154503 - [WK2][Mac] Allow processes to set "fast-dev-casheable" bit
Summary: [WK2][Mac] Allow processes to set "fast-dev-casheable" bit
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Mac All
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-02-20 12:30 PST by Brent Fulgham
Modified: 2016-03-08 13:39 PST (History)
4 users (show)

See Also:


Attachments
Patch (4.72 KB, patch)
2016-02-20 12:37 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (2.75 KB, patch)
2016-02-21 18:58 PST, Brent Fulgham
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2016-02-20 12:30:21 PST
We are getting some console spam due to Sandboxing blocking processes from using system-fctl (via Foundation) to mark various things as "hot" for caching purposes.

We need to tell our sandbox profiles that this fctl operation is okay.
Comment 1 Brent Fulgham 2016-02-20 12:33:26 PST
<rdar://problem/22920815>
Comment 2 Brent Fulgham 2016-02-20 12:37:25 PST
Created attachment 271866 [details]
Patch
Comment 3 Alexey Proskuryakov 2016-02-20 14:23:43 PST
Comment on attachment 271866 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=271866&action=review

> Source/WebKit2/ChangeLog:4
> +        https://bugs.webkit.org/show_bug.cgi?id=154503

Please add a radar link here.

> Source/WebKit2/ChangeLog:16
> +        * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
> +        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
> +        * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
> +        * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
> +        * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:

Individual plugin profiles don't need to be modified, as they are always combined with com.apple.WebKit.plugin-common.sb.

> Source/WebKit2/ChangeLog:17
> +        * WebProcess/com.apple.WebProcess.sb.in:

Is this needed in Networking and Databases processes?

> Source/WebKit2/Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:66
> +(allow system-fsctl (fsctl-command (_IO "h" 47)))
> +
>  (allow network-bind (local ip))
> +(allow system-fsctl (fsctl-command (_IO "h" 47)))

Why twice?
Comment 4 Brent Fulgham 2016-02-21 18:56:09 PST
(In reply to comment #3)
> > +        * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
> 
> Individual plugin profiles don't need to be modified, as they are always
> combined with com.apple.WebKit.plugin-common.sb.

Oh, excellent! I'll get rid of the redundancy.
 
> > Source/WebKit2/ChangeLog:17
> > +        * WebProcess/com.apple.WebProcess.sb.in:
> 
> Is this needed in Networking and Databases processes?

It doesn't seem to be, but I could easily see the Database process wanting to notify the caching system that certain files are 'hot'. So I'll add it to the Database process.

The Networking process should not need this itself. 

> > Source/WebKit2/Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:66
> > +(allow system-fsctl (fsctl-command (_IO "h" 47)))
> > +
> >  (allow network-bind (local ip))
> > +(allow system-fsctl (fsctl-command (_IO "h" 47)))
> 
> Why twice?

:-(
Comment 5 Brent Fulgham 2016-02-21 18:58:22 PST
Created attachment 271896 [details]
Patch
Comment 6 Alexey Proskuryakov 2016-02-21 22:12:18 PST
Comment on attachment 271896 [details]
Patch

> The Networking process should not need this itself. 

Why not? It does caching, accesses keychains and preferences.

sudo fs_usage com.apple.WebKit.Networking | grep /
Comment 7 Brent Fulgham 2016-02-22 09:50:29 PST
Committed r196939: <http://trac.webkit.org/changeset/196939>
Comment 8 Brent Fulgham 2016-03-08 13:33:54 PST
(In reply to comment #6)
> Comment on attachment 271896 [details]
> Patch
> 
> > The Networking process should not need this itself. 
> 
> Why not? It does caching, accesses keychains and preferences.
> 
> sudo fs_usage com.apple.WebKit.Networking | grep /

You are right. I'll modify that as well.