Esempio n. 1
0
int main(void) {
  NaClLogModuleInit();

  if (NaClOsIsSupported() != 1) return -1;
  printf("OS is supported\n");

  if (NaCl_ThisCPUIsBlacklisted()) return -1;
  printf("CPU is not blacklisted\n");

  TestDEPCheckFailurePath();

  if (NaClCheckDEP() != 1) return -1;
  printf("DEP is either working or not required\n");

  if (!CPUIDImplIsValid()) return -1;
  printf("CPUID implementation looks okay\n");

  /*
   * don't use the white list for now
   * if (NaCl_CPUIsWhitelisted() == 0) return -1;
   * printf("CPU is whitelisted\n");
   */

  printf("platform_qual_test: PASS\n");
  return 0;
}
Esempio n. 2
0
void NaClRunSelQualificationTests()
{
  /* fail if Operating system platform is not supported */
  ZLOGFAIL(!NaClOsIsSupported(), EFAULT, "os not supported");

  /* fail if Data Execution Prevention is required but is not supported */
  ZLOGFAIL(!NaClCheckDEP(), EFAULT, "dep not supported");
}
NaClErrorCode NaClRunSelQualificationTests() {
  if (!NaClOsIsSupported()) {
    return LOAD_UNSUPPORTED_OS_PLATFORM;
  }

  if (!NaClCheckDEP()) {
    return LOAD_DEP_UNSUPPORTED;
  }

  return LOAD_OK;
}
Esempio n. 4
0
NaClErrorCode NaClRunSelQualificationTests() {
  if (!NaClOsIsSupported()) {
    return LOAD_UNSUPPORTED_OS_PLATFORM;
  }

  if (!NaClCheckDEP()) {
    return LOAD_DEP_UNSUPPORTED;
  }

#if NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm
  if (!NaClQualifyReadTp()) {
    return LOAD_UNSUPPORTED_OS_PLATFORM;
  }
#endif

  return LOAD_OK;
}
Esempio n. 5
0
NaClErrorCode NaClRunSelQualificationTests(void) {
  if (!NaClOsIsSupported()) {
    return LOAD_UNSUPPORTED_OS_PLATFORM;
  }

  if (!NaClCheckDEP()) {
    return LOAD_DEP_UNSUPPORTED;
  }

#if NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86
  if (NaCl_ThisCPUIsBlacklisted()) {
    return LOAD_UNSUPPORTED_CPU;
  }
#endif

#if NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm
  if (!NaClQualifyFpu()) {
    return LOAD_UNSUPPORTED_CPU;
  }
#endif

  return LOAD_OK;
}