Home | History | Annotate | Download | only in src
      1 /*
      2  * seccomp-compat.h - seccomp defines for bad headers
      3  * Copyright (c) 2013 The Chromium Authors. All rights reserved.
      4  * Use of this source code is governed by a BSD-style license that can be
      5  * found in the LICENSE file.
      6  */
      7 #ifndef SECCOMP_COMPAT_H
      8 #define SECCOMP_COMPAT_H
      9 
     10 #include <stdint.h>
     11 
     12 #ifndef PR_SET_NO_NEW_PRIVS
     13 #  define PR_SET_NO_NEW_PRIVS 38
     14 #endif
     15 
     16 #ifndef SECCOMP_MODE_FILTER
     17 #define SECCOMP_MODE_FILTER 2 /* uses user-supplied filter. */
     18 #define SECCOMP_RET_KILL 0x00000000U /* kill the task immediately */
     19 #define SECCOMP_RET_TRAP 0x00030000U /* disallow and force a SIGSYS */
     20 #define SECCOMP_RET_ALLOW 0x7fff0000U /* allow */
     21 #define SECCOMP_RET_ERRNO 0x00050000U /* returns an errno */
     22 
     23 struct seccomp_data
     24 {
     25   int nr;
     26   uint32_t arch;
     27   uint64_t instruction_pointer;
     28   uint64_t args[6];
     29 };
     30 #endif  /* !SECCOMP_MODE_FILTER */
     31 
     32 #endif
     33