crashpad/third_party/xnu/README.crashpad

23 lines
890 B
Plaintext
Raw Normal View History

compat: Provide <elf.h> and <mach-o/loader.h> for everyone I’m working on something that I’m not ready to share, but maintaining these compat headers in my local branch is becoming annoying because “git cl format” keeps reformatting them since they were added since my local branch point. Because these headers are non-trivial, they’re brought nearly unmodified from upstream into third_party, with forwarding from the appropriate locations in compat. <elf.h> comes from glibc 2.29 (2019-01-31) and was modified to remove the #include of <features.h> and to replace the use of __BEGIN_DECLS and __END_DECLS with the proper conditional extern "C" construct. <mach-o/loader.h> comes from xnu 4903.221.2 (macOS 10.14.1, 2018-10-30) and was modified to remove the unused #includes of <mach/machine/thread_status.h> and <architecture/byte_order.h>. Rather than taking <mach/machine.h> and <mach/vm_prot.h> with a spider web of other dependencies from xnu, compat has cut-back versions of these headers that provide only the required typedefs. This also includes an update of apple_cf to 1153.18 (OS X 10.10.3, 2015-04-08), the last public release of CF-Lite. The change doesn’t do much for our purposes, but it restores the file to an Apple-shipped state, trailing whitespace and all. This also canonically formats BUILD.gn. 48ee086ca4c4c didn’t format it. Change-Id: Ib4f28ad53d9757bd0eed838e148c51172bfe30b1 Reviewed-on: https://chromium-review.googlesource.com/c/1489795 Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
2019-02-26 16:59:46 -05:00
Name: XNU
Short Name: xnu
URL: https://opensource.apple.com/source/xnu/
URL: https://opensource.apple.com/tarballs/xnu/
ios: Provide a copy of exc.defs and run mig on it to generate exc stubs The iOS SDK doesn’t include a copy of <mach/exc.defs>. It only provides <mach/exc.h>, which is just the user-side header. To obtain declarations and implementations of the server-side stubs, a current copy of <mach/exc.defs> is added to third_party, and the mig action in util is updated to use it on iOS. The three other mig subsystems that Crashpad uses are not brought to iOS: - mach_exc is identical to exc except it always uses 64-bit quantities for addresses in place of exc’s use of quantiies sized for native pointers. Because all iOS work is limited to a single process, there is no need to consider cross-process operation with variable bitness, so mach_exc is unnecessary. We’re also only targeting 64-bit for iOS, so exc will always suffice. This follows the spirit of other mach_-prefixed routines on iOS, where Apple forbids mach_vm_read to user applications but permits vm_read. - notify is primarily used on macOS in the Crashpad handler process to receive a no-senders notification, which is used to trigger handler shutdown when it has no more clients. This is not believed to be useful to Crashpad on iOS, which is restricted to single-process operation. - child_port is a Crashpad-specific subsystem used to pass Mach rights between processes, but is similarly useless when restricted to single-process operation as on iOS. Bug: crashpad:31 Change-Id: Id4cb3cdd529814438d378c20702c82c1e89dd2be Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2154530 Commit-Queue: Mark Mentovai <mark@chromium.org> Reviewed-by: Justin Cohen <justincohen@chromium.org>
2020-04-17 16:43:39 -04:00
Version: 6153.11.26 (from macOS 10.15.0)
compat: Provide <elf.h> and <mach-o/loader.h> for everyone I’m working on something that I’m not ready to share, but maintaining these compat headers in my local branch is becoming annoying because “git cl format” keeps reformatting them since they were added since my local branch point. Because these headers are non-trivial, they’re brought nearly unmodified from upstream into third_party, with forwarding from the appropriate locations in compat. <elf.h> comes from glibc 2.29 (2019-01-31) and was modified to remove the #include of <features.h> and to replace the use of __BEGIN_DECLS and __END_DECLS with the proper conditional extern "C" construct. <mach-o/loader.h> comes from xnu 4903.221.2 (macOS 10.14.1, 2018-10-30) and was modified to remove the unused #includes of <mach/machine/thread_status.h> and <architecture/byte_order.h>. Rather than taking <mach/machine.h> and <mach/vm_prot.h> with a spider web of other dependencies from xnu, compat has cut-back versions of these headers that provide only the required typedefs. This also includes an update of apple_cf to 1153.18 (OS X 10.10.3, 2015-04-08), the last public release of CF-Lite. The change doesn’t do much for our purposes, but it restores the file to an Apple-shipped state, trailing whitespace and all. This also canonically formats BUILD.gn. 48ee086ca4c4c didn’t format it. Change-Id: Ib4f28ad53d9757bd0eed838e148c51172bfe30b1 Reviewed-on: https://chromium-review.googlesource.com/c/1489795 Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
2019-02-26 16:59:46 -05:00
License: APSL 2.0
License File: APPLE_LICENSE
Security Critical: no
Description:
XNU is the operating system kernel used on macOS and other Apple systems.
Local Modifications:
ios: Provide a copy of exc.defs and run mig on it to generate exc stubs The iOS SDK doesn’t include a copy of <mach/exc.defs>. It only provides <mach/exc.h>, which is just the user-side header. To obtain declarations and implementations of the server-side stubs, a current copy of <mach/exc.defs> is added to third_party, and the mig action in util is updated to use it on iOS. The three other mig subsystems that Crashpad uses are not brought to iOS: - mach_exc is identical to exc except it always uses 64-bit quantities for addresses in place of exc’s use of quantiies sized for native pointers. Because all iOS work is limited to a single process, there is no need to consider cross-process operation with variable bitness, so mach_exc is unnecessary. We’re also only targeting 64-bit for iOS, so exc will always suffice. This follows the spirit of other mach_-prefixed routines on iOS, where Apple forbids mach_vm_read to user applications but permits vm_read. - notify is primarily used on macOS in the Crashpad handler process to receive a no-senders notification, which is used to trigger handler shutdown when it has no more clients. This is not believed to be useful to Crashpad on iOS, which is restricted to single-process operation. - child_port is a Crashpad-specific subsystem used to pass Mach rights between processes, but is similarly useless when restricted to single-process operation as on iOS. Bug: crashpad:31 Change-Id: Id4cb3cdd529814438d378c20702c82c1e89dd2be Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2154530 Commit-Queue: Mark Mentovai <mark@chromium.org> Reviewed-by: Justin Cohen <justincohen@chromium.org>
2020-04-17 16:43:39 -04:00
- EXTERNAL_HEADERS/mach-o/loader.h is present. Its #includes of
compat: Provide <elf.h> and <mach-o/loader.h> for everyone I’m working on something that I’m not ready to share, but maintaining these compat headers in my local branch is becoming annoying because “git cl format” keeps reformatting them since they were added since my local branch point. Because these headers are non-trivial, they’re brought nearly unmodified from upstream into third_party, with forwarding from the appropriate locations in compat. <elf.h> comes from glibc 2.29 (2019-01-31) and was modified to remove the #include of <features.h> and to replace the use of __BEGIN_DECLS and __END_DECLS with the proper conditional extern "C" construct. <mach-o/loader.h> comes from xnu 4903.221.2 (macOS 10.14.1, 2018-10-30) and was modified to remove the unused #includes of <mach/machine/thread_status.h> and <architecture/byte_order.h>. Rather than taking <mach/machine.h> and <mach/vm_prot.h> with a spider web of other dependencies from xnu, compat has cut-back versions of these headers that provide only the required typedefs. This also includes an update of apple_cf to 1153.18 (OS X 10.10.3, 2015-04-08), the last public release of CF-Lite. The change doesn’t do much for our purposes, but it restores the file to an Apple-shipped state, trailing whitespace and all. This also canonically formats BUILD.gn. 48ee086ca4c4c didn’t format it. Change-Id: Ib4f28ad53d9757bd0eed838e148c51172bfe30b1 Reviewed-on: https://chromium-review.googlesource.com/c/1489795 Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
2019-02-26 16:59:46 -05:00
<mach/machine/thread_status.h> and <architecture/byte_order.h> have been
ios: Provide a copy of exc.defs and run mig on it to generate exc stubs The iOS SDK doesn’t include a copy of <mach/exc.defs>. It only provides <mach/exc.h>, which is just the user-side header. To obtain declarations and implementations of the server-side stubs, a current copy of <mach/exc.defs> is added to third_party, and the mig action in util is updated to use it on iOS. The three other mig subsystems that Crashpad uses are not brought to iOS: - mach_exc is identical to exc except it always uses 64-bit quantities for addresses in place of exc’s use of quantiies sized for native pointers. Because all iOS work is limited to a single process, there is no need to consider cross-process operation with variable bitness, so mach_exc is unnecessary. We’re also only targeting 64-bit for iOS, so exc will always suffice. This follows the spirit of other mach_-prefixed routines on iOS, where Apple forbids mach_vm_read to user applications but permits vm_read. - notify is primarily used on macOS in the Crashpad handler process to receive a no-senders notification, which is used to trigger handler shutdown when it has no more clients. This is not believed to be useful to Crashpad on iOS, which is restricted to single-process operation. - child_port is a Crashpad-specific subsystem used to pass Mach rights between processes, but is similarly useless when restricted to single-process operation as on iOS. Bug: crashpad:31 Change-Id: Id4cb3cdd529814438d378c20702c82c1e89dd2be Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2154530 Commit-Queue: Mark Mentovai <mark@chromium.org> Reviewed-by: Justin Cohen <justincohen@chromium.org>
2020-04-17 16:43:39 -04:00
commented out as unnecessary. Note that its #includes of <mach/machine.h> and
compat: Provide <elf.h> and <mach-o/loader.h> for everyone I’m working on something that I’m not ready to share, but maintaining these compat headers in my local branch is becoming annoying because “git cl format” keeps reformatting them since they were added since my local branch point. Because these headers are non-trivial, they’re brought nearly unmodified from upstream into third_party, with forwarding from the appropriate locations in compat. <elf.h> comes from glibc 2.29 (2019-01-31) and was modified to remove the #include of <features.h> and to replace the use of __BEGIN_DECLS and __END_DECLS with the proper conditional extern "C" construct. <mach-o/loader.h> comes from xnu 4903.221.2 (macOS 10.14.1, 2018-10-30) and was modified to remove the unused #includes of <mach/machine/thread_status.h> and <architecture/byte_order.h>. Rather than taking <mach/machine.h> and <mach/vm_prot.h> with a spider web of other dependencies from xnu, compat has cut-back versions of these headers that provide only the required typedefs. This also includes an update of apple_cf to 1153.18 (OS X 10.10.3, 2015-04-08), the last public release of CF-Lite. The change doesn’t do much for our purposes, but it restores the file to an Apple-shipped state, trailing whitespace and all. This also canonically formats BUILD.gn. 48ee086ca4c4c didn’t format it. Change-Id: Ib4f28ad53d9757bd0eed838e148c51172bfe30b1 Reviewed-on: https://chromium-review.googlesource.com/c/1489795 Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
2019-02-26 16:59:46 -05:00
<mach/vm_prot.h> have been retained but these headers have not been provided.
External headers must be made available to provide the cpu_type_t,
cpu_subtype_t, and vm_prot_t types.
ios: Provide a copy of exc.defs and run mig on it to generate exc stubs The iOS SDK doesn’t include a copy of <mach/exc.defs>. It only provides <mach/exc.h>, which is just the user-side header. To obtain declarations and implementations of the server-side stubs, a current copy of <mach/exc.defs> is added to third_party, and the mig action in util is updated to use it on iOS. The three other mig subsystems that Crashpad uses are not brought to iOS: - mach_exc is identical to exc except it always uses 64-bit quantities for addresses in place of exc’s use of quantiies sized for native pointers. Because all iOS work is limited to a single process, there is no need to consider cross-process operation with variable bitness, so mach_exc is unnecessary. We’re also only targeting 64-bit for iOS, so exc will always suffice. This follows the spirit of other mach_-prefixed routines on iOS, where Apple forbids mach_vm_read to user applications but permits vm_read. - notify is primarily used on macOS in the Crashpad handler process to receive a no-senders notification, which is used to trigger handler shutdown when it has no more clients. This is not believed to be useful to Crashpad on iOS, which is restricted to single-process operation. - child_port is a Crashpad-specific subsystem used to pass Mach rights between processes, but is similarly useless when restricted to single-process operation as on iOS. Bug: crashpad:31 Change-Id: Id4cb3cdd529814438d378c20702c82c1e89dd2be Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2154530 Commit-Queue: Mark Mentovai <mark@chromium.org> Reviewed-by: Justin Cohen <justincohen@chromium.org>
2020-04-17 16:43:39 -04:00
- osfmk/mach/exc.defs is present, to fill in for <mach/exc.defs> on iOS, where
it is missing.
- Anything not listed above is omitted.