Bug 195484 - [iOS] Block access to backboardd service
Summary: [iOS] Block access to backboardd service
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords: InRadar
Depends on: 195606
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-08 14:50 PST by Per Arne Vollan
Modified: 2019-03-12 11:51 PDT (History)
4 users (show)

See Also:


Attachments
Patch (8.77 KB, patch)
2019-03-08 15:00 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (9.23 KB, patch)
2019-03-08 15:16 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (9.91 KB, patch)
2019-03-11 12:21 PDT, Per Arne Vollan
bfulgham: review+
Details | Formatted Diff | Diff
Patch (10.26 KB, patch)
2019-03-11 13:53 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (10.44 KB, patch)
2019-03-12 11:08 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2019-03-08 14:50:15 PST
This bug is addressing blocking the backboardd service "com.apple.backboard.hid.services".
Comment 1 Radar WebKit Bug Importer 2019-03-08 14:51:05 PST
<rdar://problem/48726709>
Comment 2 Per Arne Vollan 2019-03-08 15:00:37 PST
Created attachment 364076 [details]
Patch
Comment 3 Per Arne Vollan 2019-03-08 15:16:53 PST
Created attachment 364081 [details]
Patch
Comment 4 Brent Fulgham 2019-03-11 09:47:31 PDT
In file included from /Volumes/Data/EWS/WebKit/WebKitBuild/Release-iphoneos/DerivedSources/WebKit2/unified-sources/UnifiedSource31-mm.mm:7:
/Volumes/Data/EWS/WebKit/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:405:134: error: use of undeclared identifier 'UIBacklightLevelChangedNotification'
    CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, backlightLevelDidChangeCallback, (CFStringRef)UIBacklightLevelChangedNotification, nullptr, CFNotificationSuspensionBehaviorCoalesce);
                                                                                                                                     ^
/Volumes/Data/EWS/WebKit/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:457:104: error: use of undeclared identifier 'UIBacklightLevelChangedNotification'
    CFNotificationCenterRemoveObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, (CFStringRef)UIBacklightLevelChangedNotification, nullptr);
Comment 5 Brent Fulgham 2019-03-11 09:48:46 PDT
Comment on attachment 364081 [details]
Patch

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

> Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:403
> +    CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, backlightLevelDidChangeCallback, (CFStringRef)UIBacklightLevelChangedNotification, nullptr, CFNotificationSuspensionBehaviorCoalesce);

You might need to forward declare UIBacklightLevelChangedNotification, perhaps in an SPI file. Or you might just be missing a relevant include.
Comment 6 Per Arne Vollan 2019-03-11 12:21:19 PDT
Created attachment 364275 [details]
Patch
Comment 7 Per Arne Vollan 2019-03-11 12:21:58 PDT
(In reply to Brent Fulgham from comment #5)
> Comment on attachment 364081 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=364081&action=review
> 
> > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:403
> > +    CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, backlightLevelDidChangeCallback, (CFStringRef)UIBacklightLevelChangedNotification, nullptr, CFNotificationSuspensionBehaviorCoalesce);
> 
> You might need to forward declare UIBacklightLevelChangedNotification,
> perhaps in an SPI file. Or you might just be missing a relevant include.

Thanks! I have updated the patch.
Comment 8 Brent Fulgham 2019-03-11 12:28:45 PDT
Comment on attachment 364275 [details]
Patch

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

> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:711
> +

I think you should have a FIXME comment referencing the radar where the relevant backlight code will be improved in the future so we don't have to do this silly swizzling.
Comment 9 Per Arne Vollan 2019-03-11 13:53:01 PDT
Created attachment 364284 [details]
Patch
Comment 10 Per Arne Vollan 2019-03-11 13:55:03 PDT
(In reply to Brent Fulgham from comment #8)
> Comment on attachment 364275 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=364275&action=review
> 
> > Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:711
> > +
> 
> I think you should have a FIXME comment referencing the radar where the
> relevant backlight code will be improved in the future so we don't have to
> do this silly swizzling.

Done. Thanks for reviewing!
Comment 11 WebKit Commit Bot 2019-03-11 15:15:57 PDT
Comment on attachment 364284 [details]
Patch

Clearing flags on attachment: 364284

Committed r242745: <https://trac.webkit.org/changeset/242745>
Comment 12 Ryan Haddad 2019-03-11 22:25:07 PDT
Rolled out in https://trac.webkit.org/r242775 because it broke internal builds. Details in radar.
Comment 13 Per Arne Vollan 2019-03-12 11:08:52 PDT
Created attachment 364411 [details]
Patch
Comment 14 WebKit Commit Bot 2019-03-12 11:51:18 PDT
Comment on attachment 364411 [details]
Patch

Clearing flags on attachment: 364411

Committed r242807: <https://trac.webkit.org/changeset/242807>