#include <unistd.h>
#include <attribute.h>
-#include <verify.h>
#ifndef ARCH_CET_STATUS
#define ARCH_CET_STATUS 0x3001
set_attribute (SCMP_FLTATR_CTL_NNP, 1);
set_attribute (SCMP_FLTATR_CTL_TSYNC, 1);
- verify (CHAR_BIT == 8);
- verify (sizeof (int) == 4 && INT_MIN == INT32_MIN
- && INT_MAX == INT32_MAX);
- verify (sizeof (long) == 8 && LONG_MIN == INT64_MIN
- && LONG_MAX == INT64_MAX);
- verify (sizeof (void *) == 8);
+ static_assert (CHAR_BIT == 8);
+ static_assert (sizeof (int) == 4 && INT_MIN == INT32_MIN
+ && INT_MAX == INT32_MAX);
+ static_assert (sizeof (long) == 8 && LONG_MIN == INT64_MIN
+ && LONG_MAX == INT64_MAX);
+ static_assert (sizeof (void *) == 8);
assert ((uintptr_t) NULL == 0);
/* Allow a clean exit. */
/* Allow `mmap' and friends. This is necessary for dynamic loading,
reading the portable dump file, and thread creation. We don't
allow pages to be both writable and executable. */
- verify (MAP_PRIVATE != 0);
- verify (MAP_SHARED != 0);
+ static_assert (MAP_PRIVATE != 0);
+ static_assert (MAP_SHARED != 0);
RULE (SCMP_ACT_ALLOW, SCMP_SYS (mmap),
SCMP_A2_32 (SCMP_CMP_MASKED_EQ,
~(PROT_NONE | PROT_READ | PROT_WRITE)),
/* Allow opening files, assuming they are only opened for
reading. */
- verify (O_WRONLY != 0);
- verify (O_RDWR != 0);
- verify (O_CREAT != 0);
+ static_assert (O_WRONLY != 0);
+ static_assert (O_RDWR != 0);
+ static_assert (O_CREAT != 0);
RULE (SCMP_ACT_ALLOW, SCMP_SYS (open),
SCMP_A1_32 (SCMP_CMP_MASKED_EQ,
~(O_RDONLY | O_BINARY | O_CLOEXEC | O_PATH