mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-08-02 14:52:19 +00:00
headers: Move prctl constants to prctl.h
Move prctl constants into own header. They are arch independent. The x86 specific ARCH_SET_GS should be fetched from <asm/prctl.h> (instead of defining own ones). Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
f8ddc74283
commit
ed20cef6a0
7 changed files with 45 additions and 56 deletions
|
|
@ -9,33 +9,8 @@
|
|||
#include "asm/bitops.h"
|
||||
#include "asm/int.h"
|
||||
|
||||
/* prctl.h */
|
||||
#define PR_SET_NAME 15
|
||||
#define PR_GET_NAME 16
|
||||
|
||||
#define PR_CAPBSET_DROP 24
|
||||
#define PR_GET_SECUREBITS 27
|
||||
#define PR_SET_SECUREBITS 28
|
||||
|
||||
#define SECURE_NO_SETUID_FIXUP 2
|
||||
|
||||
#define PR_SET_MM 35
|
||||
# define PR_SET_MM_START_CODE 1
|
||||
# define PR_SET_MM_END_CODE 2
|
||||
# define PR_SET_MM_START_DATA 3
|
||||
# define PR_SET_MM_END_DATA 4
|
||||
# define PR_SET_MM_START_STACK 5
|
||||
# define PR_SET_MM_START_BRK 6
|
||||
# define PR_SET_MM_BRK 7
|
||||
# define PR_SET_MM_ARG_START 8
|
||||
# define PR_SET_MM_ARG_END 9
|
||||
# define PR_SET_MM_ENV_START 10
|
||||
# define PR_SET_MM_ENV_END 11
|
||||
# define PR_SET_MM_AUXV 12
|
||||
# define PR_SET_MM_EXE_FILE 13
|
||||
|
||||
#define PR_GET_TID_ADDRESS 40
|
||||
|
||||
#define CLONE_CHILD_USEPID 0x02000000
|
||||
#define CLONE_VFORK 0x00004000
|
||||
|
||||
|
|
|
|||
|
|
@ -10,42 +10,11 @@
|
|||
|
||||
#include "protobuf/core.pb-c.h"
|
||||
|
||||
/* prctl */
|
||||
#define ARCH_SET_GS 0x1001
|
||||
#define ARCH_SET_FS 0x1002
|
||||
#define ARCH_GET_FS 0x1003
|
||||
#define ARCH_GET_GS 0x1004
|
||||
|
||||
#define FS_TLS 0
|
||||
#define GS_TLS 1
|
||||
|
||||
/* prctl.h */
|
||||
#define PR_SET_NAME 15
|
||||
#define PR_GET_NAME 16
|
||||
|
||||
#define PR_CAPBSET_DROP 24
|
||||
#define PR_GET_SECUREBITS 27
|
||||
#define PR_SET_SECUREBITS 28
|
||||
|
||||
#define SECURE_NO_SETUID_FIXUP 2
|
||||
|
||||
#define PR_SET_MM 35
|
||||
# define PR_SET_MM_START_CODE 1
|
||||
# define PR_SET_MM_END_CODE 2
|
||||
# define PR_SET_MM_START_DATA 3
|
||||
# define PR_SET_MM_END_DATA 4
|
||||
# define PR_SET_MM_START_STACK 5
|
||||
# define PR_SET_MM_START_BRK 6
|
||||
# define PR_SET_MM_BRK 7
|
||||
# define PR_SET_MM_ARG_START 8
|
||||
# define PR_SET_MM_ARG_END 9
|
||||
# define PR_SET_MM_ENV_START 10
|
||||
# define PR_SET_MM_ENV_END 11
|
||||
# define PR_SET_MM_AUXV 12
|
||||
# define PR_SET_MM_EXE_FILE 13
|
||||
|
||||
#define PR_GET_TID_ADDRESS 40
|
||||
|
||||
#define CLONE_CHILD_USEPID 0x02000000
|
||||
#define CLONE_VFORK 0x00004000
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#include <asm/prctl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "restorer.h"
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include "log.h"
|
||||
#include "util-pie.h"
|
||||
#include "syscall.h"
|
||||
#include "prctl.h"
|
||||
#include "files.h"
|
||||
#include "sk-inet.h"
|
||||
#include "proc_parse.h"
|
||||
|
|
|
|||
41
include/prctl.h
Normal file
41
include/prctl.h
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#ifndef __CR_PRCTL_H__
|
||||
#define __CR_PRCTL_H__
|
||||
|
||||
#ifndef PR_SET_NAME
|
||||
# define PR_SET_NAME 15
|
||||
#endif
|
||||
#ifndef PR_GET_NAME
|
||||
# define PR_GET_NAME 16
|
||||
#endif
|
||||
#ifndef PR_CAPBSET_DROP
|
||||
# define PR_CAPBSET_DROP 24
|
||||
#endif
|
||||
#ifndef PR_GET_SECUREBITS
|
||||
# define PR_GET_SECUREBITS 27
|
||||
#endif
|
||||
#ifndef PR_SET_SECUREBITS
|
||||
# define PR_SET_SECUREBITS 28
|
||||
#endif
|
||||
|
||||
#ifndef PR_SET_MM
|
||||
#define PR_SET_MM 35
|
||||
# define PR_SET_MM_START_CODE 1
|
||||
# define PR_SET_MM_END_CODE 2
|
||||
# define PR_SET_MM_START_DATA 3
|
||||
# define PR_SET_MM_END_DATA 4
|
||||
# define PR_SET_MM_START_STACK 5
|
||||
# define PR_SET_MM_START_BRK 6
|
||||
# define PR_SET_MM_BRK 7
|
||||
# define PR_SET_MM_ARG_START 8
|
||||
# define PR_SET_MM_ARG_END 9
|
||||
# define PR_SET_MM_ENV_START 10
|
||||
# define PR_SET_MM_ENV_END 11
|
||||
# define PR_SET_MM_AUXV 12
|
||||
# define PR_SET_MM_EXE_FILE 13
|
||||
#endif
|
||||
|
||||
#ifndef PR_GET_TID_ADDRESS
|
||||
# define PR_GET_TID_ADDRESS 40
|
||||
#endif
|
||||
|
||||
#endif /* __CR_PRCTL_H__ */
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
#include "syscall.h"
|
||||
#include "parasite.h"
|
||||
#include "fcntl.h"
|
||||
#include "prctl.h"
|
||||
#include "lock.h"
|
||||
#include "vdso.h"
|
||||
#include "log.h"
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include "compiler.h"
|
||||
#include "asm/types.h"
|
||||
#include "syscall.h"
|
||||
#include "prctl.h"
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
#include "image.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue