| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <sys/utsname.h> | 8 #include <sys/utsname.h> |
| 9 | 9 |
| 10 #include "native_client/src/shared/platform/nacl_log.h" | 10 #include "native_client/src/shared/platform/nacl_log.h" |
| 11 #include "native_client/src/trusted/platform_qualify/kernel_version.h" | 11 #include "native_client/src/trusted/platform_qualify/kernel_version.h" |
| 12 #include "native_client/src/trusted/platform_qualify/nacl_os_qualify.h" | 12 #include "native_client/src/trusted/platform_qualify/nacl_os_qualify.h" |
| 13 #include "native_client/src/trusted/platform_qualify/linux/sysv_shm_and_mmap.h" | |
| 14 | 13 |
| 15 | 14 |
| 16 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 && NACL_BUILD_SUBARCH == 32 | 15 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 && NACL_BUILD_SUBARCH == 32 |
| 17 | 16 |
| 18 static const char *kMinimumVersion = "2.6.27"; | 17 static const char *kMinimumVersion = "2.6.27"; |
| 19 | 18 |
| 20 /* | 19 /* |
| 21 * Checks for this bug: | 20 * Checks for this bug: |
| 22 * http://code.google.com/p/nativeclient/issues/detail?id=2032 | 21 * http://code.google.com/p/nativeclient/issues/detail?id=2032 |
| 23 */ | 22 */ |
| (...skipping 24 matching lines...) Expand all Loading... |
| 48 "old Linux kernel. This kernel version is buggy and " | 47 "old Linux kernel. This kernel version is buggy and " |
| 49 "Native Client's x86-32 sandbox might be insecure on " | 48 "Native Client's x86-32 sandbox might be insecure on " |
| 50 "this kernel. The fix is to upgrade the kernel to v2.6.27 " | 49 "this kernel. The fix is to upgrade the kernel to v2.6.27 " |
| 51 "or later, or, as a workaround, to switch using a 64-bit " | 50 "or later, or, as a workaround, to switch using a 64-bit " |
| 52 "Native Client sandbox. For more information, see " | 51 "Native Client sandbox. For more information, see " |
| 53 "http://code.google.com/p/nativeclient/issues/detail?id=2032\n"); | 52 "http://code.google.com/p/nativeclient/issues/detail?id=2032\n"); |
| 54 return 0; | 53 return 0; |
| 55 } | 54 } |
| 56 #endif | 55 #endif |
| 57 | 56 |
| 58 #if NACL_ANDROID | |
| 59 /* | |
| 60 * Android has no System V shared memory API, so we don't need qualification | |
| 61 * checks for that. | |
| 62 */ | |
| 63 return 1; | 57 return 1; |
| 64 #else | |
| 65 return !NaClPlatformQualifySysVShmAndMmapHasProblems(); | |
| 66 #endif | |
| 67 } | 58 } |
| 68 | 59 |
| 69 | 60 |
| 70 /* | 61 /* |
| 71 * Returns 1 if the operating system is a 64-bit version of | 62 * Returns 1 if the operating system is a 64-bit version of |
| 72 * Windows. For now, all of these versions are not supported. | 63 * Windows. For now, all of these versions are not supported. |
| 73 */ | 64 */ |
| 74 int NaClOsIs64BitWindows(void) { | 65 int NaClOsIs64BitWindows(void) { |
| 75 return 0; | 66 return 0; |
| 76 } | 67 } |
| OLD | NEW |