Skip to content

Commit

Permalink
Remove lockdown mode related ENABLE macro
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=263693

Reviewed by Sihui Liu.

* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:

Canonical link: https://commits.webkit.org/269832@main
  • Loading branch information
pvollan committed Oct 27, 2023
1 parent d9d71c7 commit 96e257a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
4 changes: 0 additions & 4 deletions Source/WTF/wtf/PlatformEnableCocoa.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,6 @@
#define ENABLE_LOCKDOWN_MODE_API 1
#endif

#if !defined(ENABLE_LOCKDOWN_MODE_TELEMETRY) && PLATFORM(MAC)
#define ENABLE_LOCKDOWN_MODE_TELEMETRY 1
#endif

#if !defined(ENABLE_MEDIA_SOURCE) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
#define ENABLE_MEDIA_SOURCE 1
#endif
Expand Down
18 changes: 0 additions & 18 deletions Source/WebKit/WebProcess/com.apple.WebProcess.sb.in
Original file line number Diff line number Diff line change
Expand Up @@ -2037,18 +2037,11 @@
(allow syscall-unix (syscall-unix-downlevels-blocked-in-lockdown-mode)))
#endif

#if ENABLE(LOCKDOWN_MODE_TELEMETRY)
(with-filter (require-not (lockdown-mode))
(allow syscall-unix (syscall-unix-blocked-in-lockdown-mode))
(when (equal? (param "CPU") "arm64")
(allow syscall-unix (syscall-unix-apple-silicon)))
(allow syscall-unix (with report) (with telemetry) (syscalls-rarely-used-blocked-in-lockdown-mode)))
#else
(allow syscall-unix (syscall-unix-blocked-in-lockdown-mode))
(when (equal? (param "CPU") "arm64")
(allow syscall-unix (syscall-unix-apple-silicon)))
(allow syscall-unix (syscalls-rarely-used-blocked-in-lockdown-mode))
#endif

(when (defined? 'SYS_objc_bp_assist_cfg_np)
(allow syscall-unix (syscall-number SYS_objc_bp_assist_cfg_np)))
Expand All @@ -2063,13 +2056,11 @@
(allow syscall-unix (syscall-number SYS_quotactl)))
#endif

#if ENABLE(LOCKDOWN_MODE_TELEMETRY)
(with-filter (lockdown-mode)
(deny syscall-unix (with telemetry) (syscall-unix-blocked-in-lockdown-mode))
(deny syscall-unix (with telemetry) (syscalls-rarely-used-blocked-in-lockdown-mode))
(when (equal? (param "CPU") "arm64")
(deny syscall-unix (with telemetry) (syscall-unix-apple-silicon))))
#endif

#if HAVE(ADDITIONAL_APPLE_CAMERA_SERVICE)
(if (equal? (param "CPU") "arm64")
Expand Down Expand Up @@ -2196,17 +2187,12 @@
(allow mach-kernel-endpoint
(apply-message-filter
(deny mach-message-send)
#if ENABLE(LOCKDOWN_MODE_TELEMETRY)
(with-filter (require-not (lockdown-mode))
(allow mach-message-send (kernel-mig-routines-blocked-in-lockdown-mode))
(allow mach-message-send (kernel-mig-routines-blocked-in-lockdown-mode-avoid-telemetry)))
(with-filter (lockdown-mode)
(deny mach-message-send (with telemetry) (kernel-mig-routines-blocked-in-lockdown-mode))
(deny mach-message-send (with telemetry) (kernel-mig-routines-blocked-in-lockdown-mode-avoid-telemetry)))
#else
(allow mach-message-send (kernel-mig-routines-blocked-in-lockdown-mode))
(allow mach-message-send (kernel-mig-routines-blocked-in-lockdown-mode-avoid-telemetry))
#endif

(allow mach-message-send (kernel-mig-routines-in-use))
#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED <= 140000
Expand Down Expand Up @@ -2293,14 +2279,10 @@
(with-filter (require-not (lockdown-mode))
(allow syscall-mach (syscall-mach-downlevels-blocked-in-lockdown-mode)))
#endif
#if ENABLE(LOCKDOWN_MODE_TELEMETRY)
(with-filter (require-not (lockdown-mode))
(allow syscall-mach (syscall-mach-blocked-in-lockdown-mode)))
(with-filter (lockdown-mode)
(deny syscall-mach (with telemetry) (syscall-mach-blocked-in-lockdown-mode)))
#else
(allow syscall-mach (syscall-mach-blocked-in-lockdown-mode))
#endif
(when (defined? 'MSC_mach_msg2_trap)
(allow syscall-mach (machtrap-number MSC_mach_msg2_trap))))
#endif // HAVE(SANDBOX_MESSAGE_FILTERING)
Expand Down

0 comments on commit 96e257a

Please sign in to comment.