From 61a4f3d7d6f65945e81aaffe701da75c60c3ff2d Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Mon, 30 Mar 2020 11:48:38 -0400 Subject: [PATCH] mac: kern.nx is not present in 10.14.5 et seq, but NX is always enabled This updates the comment from d3859d91fde0, which referred to 10.14.4 as the OS version where kern.nx stoppoed working. Testing indicates that kern.nx works in 10.13.6 17G12034 and 10.14.4 18E226. It does not work in 10.14.5 18F132 or 10.15.4 19E266. Bug: crashpad:295 Change-Id: Id2f222700fb626de707d60980fedbd79e62990e6 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2127566 Reviewed-by: Justin Cohen Commit-Queue: Mark Mentovai --- snapshot/mac/system_snapshot_mac.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/snapshot/mac/system_snapshot_mac.cc b/snapshot/mac/system_snapshot_mac.cc index 1ece8166..586aabea 100644 --- a/snapshot/mac/system_snapshot_mac.cc +++ b/snapshot/mac/system_snapshot_mac.cc @@ -350,12 +350,12 @@ bool SystemSnapshotMac::NXEnabled() const { if (ReadIntSysctlByName_NoLog("kern.nx", &value) != 0) { { // Support for the kern.nx sysctlbyname is compiled out of production - // kernels on macOS 10.14.4 and later, although it’s available in + // kernels on macOS 10.14.5 and later, although it’s available in // development and debug kernels. Compare 10.14.3 // xnu-4903.241.1/bsd/kern/kern_sysctl.c to 10.15.0 - // xnu-6153.11.26/bsd/kern/kern_sysctl.c (10.14.4 xnu source is not yet - // available). In newer production kernels, NX is always enabled. See - // 10.15.0 xnu-6153.11.26/osfmk/x86_64/pmap.c nx_enabled. + // xnu-6153.11.26/bsd/kern/kern_sysctl.c (10.14.4 and 10.14.5 xnu source + // are not yet available). In newer production kernels, NX is always + // enabled. See 10.15.0 xnu-6153.11.26/osfmk/x86_64/pmap.c nx_enabled. #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_14 const bool nx_always_enabled = true; #else // DT >= 10.14