Summary: | [iOS] [GPU] The UI process should issue the mach sandbox extension to 'com.apple.AGXCompilerService' | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> | ||||||||||||||
Component: | WebKit Misc. | Assignee: | Brent Fulgham <bfulgham> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Normal | CC: | bfulgham, darin, pvollan, webkit-bug-importer | ||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||
OS: | Unspecified | ||||||||||||||||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=203915 https://bugs.webkit.org/show_bug.cgi?id=210616 |
||||||||||||||||
Attachments: |
|
Description
Brent Fulgham
2021-04-23 15:45:42 PDT
Created attachment 426959 [details]
Patch
Comment on attachment 426959 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426959&action=review Great! R=me. > Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:975 > + (xpc-service-name-prefix "com.apple.AGXCompilerService"))) Is the prefix part needed? Created attachment 426965 [details]
Patch
(In reply to Per Arne Vollan from comment #2) > Comment on attachment 426959 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=426959&action=review > > Great! R=me. > > > Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:975 > > + (xpc-service-name-prefix "com.apple.AGXCompilerService"))) > > Is the prefix part needed? Yes. This is right out of the WCP rules. There are two flavors of AGXCompilerService (one has a postfix). Created attachment 426967 [details]
Patch
Comment on attachment 426967 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426967&action=review > Source/WebCore/platform/cocoa/AGXCompilerService.h:36 > +namespace WTF { > + > +class ASCIILiteral; > + > +} This isn’t needed or helpful. If we include <wtf/Forward.h>, then this is taken care of. If we don’t, then we have to write WTF::ASCIILiteral below. > Source/WebCore/platform/cocoa/AGXCompilerService.h:43 > +WEBCORE_EXPORT const Vector<ASCIILiteral>& agxCompilerServices(); > +WEBCORE_EXPORT const Vector<ASCIILiteral>& agxCompilerClasses(); Would be slightly more efficient to move to something that doesn’t require any memory allocation. To cite one example, maybe not the most elegant, these could return std::initializer_list<ASCIILiteral>, if all we need to do is iterate them. No reason to keep a Vector around in memory forever just because we need to call createHandlesForMachLookup. Sadly, right now SandboxExtension is specifically tied to Vector. So doing this might require a bit of refactoring, and is not urgent. Just slightly better memory use and I suppose a better idiom. Comment on attachment 426967 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426967&action=review > Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp:48 > +#include <WebCore/AGXCompilerService.h> Adding this broke the WinCairo build. Created attachment 427061 [details]
Patch
Comment on attachment 426967 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426967&action=review >> Source/WebCore/platform/cocoa/AGXCompilerService.h:36 >> +} > > This isn’t needed or helpful. If we include <wtf/Forward.h>, then this is taken care of. If we don’t, then we have to write WTF::ASCIILiteral below. Ah, will fix. >> Source/WebCore/platform/cocoa/AGXCompilerService.h:43 >> +WEBCORE_EXPORT const Vector<ASCIILiteral>& agxCompilerClasses(); > > Would be slightly more efficient to move to something that doesn’t require any memory allocation. To cite one example, maybe not the most elegant, these could return std::initializer_list<ASCIILiteral>, if all we need to do is iterate them. No reason to keep a Vector around in memory forever just because we need to call createHandlesForMachLookup. > > Sadly, right now SandboxExtension is specifically tied to Vector. So doing this might require a bit of refactoring, and is not urgent. Just slightly better memory use and I suppose a better idiom. I filed Bug 225059 to remember to do this. Comment on attachment 427061 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427061&action=review > Source/WebCore/platform/cocoa/AGXCompilerService.h:31 > +#include <wtf/Forward.h> > +#include <wtf/Vector.h> Probably not worth another round of patch revision, but Vector.h already includes Forward.h so an explicit include of Forward.h probably is not needed. I should have made that clear in my earlier comment. Oh, and now,. on reflection, only Forward.h needs to be included here. Created attachment 427111 [details]
Patch
Comment on attachment 427061 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427061&action=review >> Source/WebCore/platform/cocoa/AGXCompilerService.h:31 >> +#include <wtf/Vector.h> > > Probably not worth another round of patch revision, but Vector.h already includes Forward.h so an explicit include of Forward.h probably is not needed. I should have made that clear in my earlier comment. > > Oh, and now,. on reflection, only Forward.h needs to be included here. I'll fix it -- fewer includes are better! Created attachment 427112 [details]
Patch for landing
Committed r276644 (237071@main): <https://commits.webkit.org/237071@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 427112 [details]. |