mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
Convert spaces to tabs
There are a few places where spaces have been used instead of tabs for indentation. This patch converts the spaces to tabs for consistency with the rest of the code base. Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
This commit is contained in:
parent
6d66dd5d89
commit
4662315fc4
30 changed files with 212 additions and 212 deletions
|
|
@ -3,25 +3,25 @@
|
|||
#endif
|
||||
|
||||
#ifndef __ARM_NR_BASE
|
||||
# define __ARM_NR_BASE 0x0f0000
|
||||
# define __ARM_NR_BASE 0x0f0000
|
||||
#endif
|
||||
|
||||
#ifndef __ARM_NR_breakpoint
|
||||
# define __ARM_NR_breakpoint (__ARM_NR_BASE+1)
|
||||
# define __ARM_NR_breakpoint (__ARM_NR_BASE+1)
|
||||
#endif
|
||||
|
||||
#ifndef __ARM_NR_cacheflush
|
||||
# define __ARM_NR_cacheflush (__ARM_NR_BASE+2)
|
||||
# define __ARM_NR_cacheflush (__ARM_NR_BASE+2)
|
||||
#endif
|
||||
|
||||
#ifndef __ARM_NR_usr26
|
||||
# define __ARM_NR_usr26 (__ARM_NR_BASE+3)
|
||||
# define __ARM_NR_usr26 (__ARM_NR_BASE+3)
|
||||
#endif
|
||||
|
||||
#ifndef __ARM_NR_usr32
|
||||
# define __ARM_NR_usr32 (__ARM_NR_BASE+4)
|
||||
# define __ARM_NR_usr32 (__ARM_NR_BASE+4)
|
||||
#endif
|
||||
|
||||
#ifndef __ARM_NR_set_tls
|
||||
# define __ARM_NR_set_tls (__ARM_NR_BASE+5)
|
||||
# define __ARM_NR_set_tls (__ARM_NR_BASE+5)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,37 +6,37 @@
|
|||
/*
|
||||
* PSR bits
|
||||
*/
|
||||
#define USR26_MODE 0x00000000
|
||||
#define FIQ26_MODE 0x00000001
|
||||
#define IRQ26_MODE 0x00000002
|
||||
#define SVC26_MODE 0x00000003
|
||||
#define USR_MODE 0x00000010
|
||||
#define FIQ_MODE 0x00000011
|
||||
#define IRQ_MODE 0x00000012
|
||||
#define SVC_MODE 0x00000013
|
||||
#define ABT_MODE 0x00000017
|
||||
#define UND_MODE 0x0000001b
|
||||
#define SYSTEM_MODE 0x0000001f
|
||||
#define MODE32_BIT 0x00000010
|
||||
#define MODE_MASK 0x0000001f
|
||||
#define PSR_T_BIT 0x00000020
|
||||
#define PSR_F_BIT 0x00000040
|
||||
#define PSR_I_BIT 0x00000080
|
||||
#define PSR_A_BIT 0x00000100
|
||||
#define PSR_E_BIT 0x00000200
|
||||
#define PSR_J_BIT 0x01000000
|
||||
#define PSR_Q_BIT 0x08000000
|
||||
#define PSR_V_BIT 0x10000000
|
||||
#define PSR_C_BIT 0x20000000
|
||||
#define PSR_Z_BIT 0x40000000
|
||||
#define PSR_N_BIT 0x80000000
|
||||
#define USR26_MODE 0x00000000
|
||||
#define FIQ26_MODE 0x00000001
|
||||
#define IRQ26_MODE 0x00000002
|
||||
#define SVC26_MODE 0x00000003
|
||||
#define USR_MODE 0x00000010
|
||||
#define FIQ_MODE 0x00000011
|
||||
#define IRQ_MODE 0x00000012
|
||||
#define SVC_MODE 0x00000013
|
||||
#define ABT_MODE 0x00000017
|
||||
#define UND_MODE 0x0000001b
|
||||
#define SYSTEM_MODE 0x0000001f
|
||||
#define MODE32_BIT 0x00000010
|
||||
#define MODE_MASK 0x0000001f
|
||||
#define PSR_T_BIT 0x00000020
|
||||
#define PSR_F_BIT 0x00000040
|
||||
#define PSR_I_BIT 0x00000080
|
||||
#define PSR_A_BIT 0x00000100
|
||||
#define PSR_E_BIT 0x00000200
|
||||
#define PSR_J_BIT 0x01000000
|
||||
#define PSR_Q_BIT 0x08000000
|
||||
#define PSR_V_BIT 0x10000000
|
||||
#define PSR_C_BIT 0x20000000
|
||||
#define PSR_Z_BIT 0x40000000
|
||||
#define PSR_N_BIT 0x80000000
|
||||
|
||||
/*
|
||||
* Groups of PSR bits
|
||||
*/
|
||||
#define PSR_f 0xff000000 /* Flags */
|
||||
#define PSR_s 0x00ff0000 /* Status */
|
||||
#define PSR_x 0x0000ff00 /* Extension */
|
||||
#define PSR_c 0x000000ff /* Control */
|
||||
#define PSR_f 0xff000000 /* Flags */
|
||||
#define PSR_s 0x00ff0000 /* Status */
|
||||
#define PSR_x 0x0000ff00 /* Extension */
|
||||
#define PSR_c 0x000000ff /* Control */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
static inline int ptrace_set_breakpoint(pid_t pid, void *addr)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int ptrace_flush_breakpoints(pid_t pid)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ struct xsave_hdr_struct {
|
|||
* The high 128 bits are stored here.
|
||||
*/
|
||||
struct ymmh_struct {
|
||||
uint32_t ymmh_space[64];
|
||||
uint32_t ymmh_space[64];
|
||||
} __packed;
|
||||
|
||||
/* Intel MPX support: */
|
||||
|
|
|
|||
|
|
@ -481,15 +481,15 @@ int arch_fetch_sas(struct parasite_ctl *ctl, struct rt_sigframe *s)
|
|||
/* Copied from the gdb header gdb/nat/x86-dregs.h */
|
||||
|
||||
/* Debug registers' indices. */
|
||||
#define DR_FIRSTADDR 0
|
||||
#define DR_LASTADDR 3
|
||||
#define DR_NADDR 4 /* The number of debug address registers. */
|
||||
#define DR_STATUS 6 /* Index of debug status register (DR6). */
|
||||
#define DR_CONTROL 7 /* Index of debug control register (DR7). */
|
||||
#define DR_FIRSTADDR 0
|
||||
#define DR_LASTADDR 3
|
||||
#define DR_NADDR 4 /* The number of debug address registers. */
|
||||
#define DR_STATUS 6 /* Index of debug status register (DR6). */
|
||||
#define DR_CONTROL 7 /* Index of debug control register (DR7). */
|
||||
|
||||
#define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit. */
|
||||
#define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit. */
|
||||
#define DR_ENABLE_SIZE 2 /* Two enable bits per debug register. */
|
||||
#define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit. */
|
||||
#define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit. */
|
||||
#define DR_ENABLE_SIZE 2 /* Two enable bits per debug register. */
|
||||
|
||||
/* Locally enable the break/watchpoint in the I'th debug register. */
|
||||
#define X86_DR_LOCAL_ENABLE(i) (1 << (DR_LOCAL_ENABLE_SHIFT + DR_ENABLE_SIZE * (i)))
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ struct rt_ucontext {
|
|||
rt_stack_t uc_stack;
|
||||
struct rt_sigcontext uc_mcontext;
|
||||
k_rtsigset_t uc_sigmask; /* mask last for extensibility */
|
||||
int _unused[32 - (sizeof (k_rtsigset_t) / sizeof (int))];
|
||||
unsigned long uc_regspace[128] __attribute__((aligned(8)));
|
||||
int _unused[32 - (sizeof (k_rtsigset_t) / sizeof (int))];
|
||||
unsigned long uc_regspace[128] __attribute__((aligned(8)));
|
||||
};
|
||||
|
||||
extern int sigreturn_prep_fpu_frame(struct rt_sigframe *frame,
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ static int arch_get_user_desc(user_desc_t *desc)
|
|||
* };
|
||||
*/
|
||||
asm volatile (
|
||||
" mov %0,%%eax \n"
|
||||
" mov %1,%%rbx \n"
|
||||
" mov %0,%%eax \n"
|
||||
" mov %1,%%rbx \n"
|
||||
" int $0x80 \n"
|
||||
" mov %%eax,%0 \n"
|
||||
: "+m"(ret)
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@ static inline int set_compat_robust_list(uint32_t head_ptr, uint32_t len)
|
|||
}
|
||||
#endif /* !CONFIG_COMPAT */
|
||||
|
||||
#define RUN_CLONE_RESTORE_FN(ret, clone_flags, new_sp, parent_tid, \
|
||||
thread_args, clone_restore_fn) \
|
||||
#define RUN_CLONE_RESTORE_FN(ret, clone_flags, new_sp, parent_tid, \
|
||||
thread_args, clone_restore_fn) \
|
||||
asm volatile( \
|
||||
"clone_emul: \n" \
|
||||
"movq %2, %%rsi \n" \
|
||||
"subq $16, %%rsi \n" \
|
||||
"subq $16, %%rsi \n" \
|
||||
"movq %6, %%rdi \n" \
|
||||
"movq %%rdi, 8(%%rsi) \n" \
|
||||
"movq %5, %%rdi \n" \
|
||||
|
|
@ -39,16 +39,16 @@ static inline int set_compat_robust_list(uint32_t head_ptr, uint32_t len)
|
|||
"movq %3, %%rdx \n" \
|
||||
"movq %4, %%r10 \n" \
|
||||
"movl $"__stringify(__NR_clone)", %%eax \n" \
|
||||
"syscall \n" \
|
||||
"syscall \n" \
|
||||
\
|
||||
"testq %%rax,%%rax \n" \
|
||||
"testq %%rax,%%rax \n" \
|
||||
"jz thread_run \n" \
|
||||
\
|
||||
"movq %%rax, %0 \n" \
|
||||
"jmp clone_end \n" \
|
||||
\
|
||||
"thread_run: \n" \
|
||||
"xorq %%rbp, %%rbp \n" \
|
||||
"xorq %%rbp, %%rbp \n" \
|
||||
"popq %%rax \n" \
|
||||
"popq %%rdi \n" \
|
||||
"callq *%%rax \n" \
|
||||
|
|
|
|||
|
|
@ -468,7 +468,7 @@ err:
|
|||
}
|
||||
|
||||
#ifndef SO_GET_FILTER
|
||||
#define SO_GET_FILTER SO_ATTACH_FILTER
|
||||
#define SO_GET_FILTER SO_ATTACH_FILTER
|
||||
#endif
|
||||
|
||||
static int check_so_gets(void)
|
||||
|
|
|
|||
|
|
@ -390,10 +390,10 @@ static int populate_root_fd_off(void)
|
|||
struct ns_id *mntns = NULL;
|
||||
int ret;
|
||||
|
||||
if (root_ns_mask & CLONE_NEWNS) {
|
||||
mntns = lookup_ns_by_id(root_item->ids->mnt_ns_id, &mnt_ns_desc);
|
||||
BUG_ON(!mntns);
|
||||
}
|
||||
if (root_ns_mask & CLONE_NEWNS) {
|
||||
mntns = lookup_ns_by_id(root_item->ids->mnt_ns_id, &mnt_ns_desc);
|
||||
BUG_ON(!mntns);
|
||||
}
|
||||
|
||||
ret = mntns_get_root_fd(mntns);
|
||||
if (ret < 0)
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ static int parse_binfmt_misc_entry(struct bfd *f, BinfmtMiscEntry *bme)
|
|||
char *str;
|
||||
|
||||
str = breadline(f);
|
||||
if (IS_ERR(str))
|
||||
if (IS_ERR(str))
|
||||
return -1;
|
||||
if (!str)
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -13,18 +13,18 @@ struct task_restore_args;
|
|||
int prepare_aios(struct pstree_item *t, struct task_restore_args *ta);
|
||||
|
||||
struct aio_ring {
|
||||
unsigned id; /* kernel internal index number */
|
||||
unsigned nr; /* number of io_events */
|
||||
unsigned head; /* Written to by userland or under ring_lock
|
||||
unsigned id; /* kernel internal index number */
|
||||
unsigned nr; /* number of io_events */
|
||||
unsigned head; /* Written to by userland or under ring_lock
|
||||
* mutex by aio_read_events_ring(). */
|
||||
unsigned tail;
|
||||
unsigned tail;
|
||||
|
||||
unsigned magic;
|
||||
unsigned compat_features;
|
||||
unsigned incompat_features;
|
||||
unsigned header_length; /* size of aio_ring */
|
||||
unsigned magic;
|
||||
unsigned compat_features;
|
||||
unsigned incompat_features;
|
||||
unsigned header_length; /* size of aio_ring */
|
||||
|
||||
struct io_event io_events[0];
|
||||
struct io_event io_events[0];
|
||||
};
|
||||
|
||||
struct rst_aio_ring {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef __CR_ASM_GENERIC_VDSO_H__
|
||||
#define __CR_ASM_GENERIC_VDSO_H__
|
||||
|
||||
#define VDSO_PROT (PROT_READ | PROT_EXEC)
|
||||
#define VVAR_PROT (PROT_READ)
|
||||
#define VDSO_PROT (PROT_READ | PROT_EXEC)
|
||||
#define VVAR_PROT (PROT_READ)
|
||||
|
||||
/* Just in case of LPAE system PFN is u64. */
|
||||
#define VDSO_BAD_PFN (-1ull)
|
||||
|
|
|
|||
|
|
@ -20,70 +20,70 @@ int autofs_mount(struct mount_info *mi, const char *source, const
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#define AUTOFS_DEVICE_NAME "autofs"
|
||||
#define AUTOFS_DEVICE_NAME "autofs"
|
||||
|
||||
#define AUTOFS_DEV_IOCTL_VERSION_MAJOR 1
|
||||
#define AUTOFS_DEV_IOCTL_VERSION_MINOR 0
|
||||
|
||||
#define AUTOFS_DEVID_LEN 16
|
||||
#define AUTOFS_DEVID_LEN 16
|
||||
|
||||
#define AUTOFS_DEV_IOCTL_SIZE sizeof(struct autofs_dev_ioctl)
|
||||
#define AUTOFS_DEV_IOCTL_SIZE sizeof(struct autofs_dev_ioctl)
|
||||
|
||||
/*
|
||||
* An ioctl interface for autofs mount point control.
|
||||
*/
|
||||
|
||||
struct args_protover {
|
||||
__u32 version;
|
||||
__u32 version;
|
||||
};
|
||||
|
||||
struct args_protosubver {
|
||||
__u32 sub_version;
|
||||
__u32 sub_version;
|
||||
};
|
||||
|
||||
struct args_openmount {
|
||||
__u32 devid;
|
||||
__u32 devid;
|
||||
};
|
||||
|
||||
struct args_ready {
|
||||
__u32 token;
|
||||
__u32 token;
|
||||
};
|
||||
|
||||
struct args_fail {
|
||||
__u32 token;
|
||||
__s32 status;
|
||||
__u32 token;
|
||||
__s32 status;
|
||||
};
|
||||
|
||||
struct args_setpipefd {
|
||||
__s32 pipefd;
|
||||
__s32 pipefd;
|
||||
};
|
||||
|
||||
struct args_timeout {
|
||||
__u64 timeout;
|
||||
__u64 timeout;
|
||||
};
|
||||
|
||||
struct args_requester {
|
||||
__u32 uid;
|
||||
__u32 gid;
|
||||
__u32 uid;
|
||||
__u32 gid;
|
||||
};
|
||||
|
||||
struct args_expire {
|
||||
__u32 how;
|
||||
__u32 how;
|
||||
};
|
||||
|
||||
|
||||
struct args_askumount {
|
||||
__u32 may_umount;
|
||||
__u32 may_umount;
|
||||
};
|
||||
|
||||
struct args_ismountpoint {
|
||||
union {
|
||||
struct args_in {
|
||||
__u32 type;
|
||||
__u32 type;
|
||||
} in;
|
||||
struct args_out {
|
||||
__u32 devid;
|
||||
__u32 magic;
|
||||
__u32 devid;
|
||||
__u32 magic;
|
||||
} out;
|
||||
};
|
||||
};
|
||||
|
|
@ -98,24 +98,24 @@ struct args_ismountpoint {
|
|||
struct autofs_dev_ioctl {
|
||||
__u32 ver_major;
|
||||
__u32 ver_minor;
|
||||
__u32 size; /* total size of data passed in
|
||||
__u32 size; /* total size of data passed in
|
||||
* including this struct */
|
||||
__s32 ioctlfd; /* automount command fd */
|
||||
__s32 ioctlfd; /* automount command fd */
|
||||
|
||||
/* Command parameters */
|
||||
|
||||
union {
|
||||
struct args_protover protover;
|
||||
struct args_protosubver protosubver;
|
||||
struct args_openmount openmount;
|
||||
struct args_ready ready;
|
||||
struct args_fail fail;
|
||||
struct args_setpipefd setpipefd;
|
||||
struct args_timeout timeout;
|
||||
struct args_requester requester;
|
||||
struct args_expire expire;
|
||||
struct args_askumount askumount;
|
||||
struct args_ismountpoint ismountpoint;
|
||||
struct args_protover protover;
|
||||
struct args_protosubver protosubver;
|
||||
struct args_openmount openmount;
|
||||
struct args_ready ready;
|
||||
struct args_fail fail;
|
||||
struct args_setpipefd setpipefd;
|
||||
struct args_timeout timeout;
|
||||
struct args_requester requester;
|
||||
struct args_expire expire;
|
||||
struct args_askumount askumount;
|
||||
struct args_ismountpoint ismountpoint;
|
||||
};
|
||||
|
||||
char path[0];
|
||||
|
|
|
|||
|
|
@ -12,18 +12,18 @@ struct packet_diag_req {
|
|||
__u32 pdiag_cookie[2];
|
||||
};
|
||||
|
||||
#define PACKET_SHOW_INFO 0x00000001 /* Basic packet_sk information */
|
||||
#define PACKET_SHOW_MCLIST 0x00000002 /* A set of packet_diag_mclist-s */
|
||||
#define PACKET_SHOW_INFO 0x00000001 /* Basic packet_sk information */
|
||||
#define PACKET_SHOW_MCLIST 0x00000002 /* A set of packet_diag_mclist-s */
|
||||
#define PACKET_SHOW_RING_CFG 0x00000004 /* Rings configuration parameters */
|
||||
#define PACKET_SHOW_FANOUT 0x00000008
|
||||
|
||||
struct packet_diag_msg {
|
||||
__u8 pdiag_family;
|
||||
__u8 pdiag_type;
|
||||
__u16 pdiag_num;
|
||||
__u8 pdiag_family;
|
||||
__u8 pdiag_type;
|
||||
__u16 pdiag_num;
|
||||
|
||||
__u32 pdiag_ino;
|
||||
__u32 pdiag_cookie[2];
|
||||
__u32 pdiag_ino;
|
||||
__u32 pdiag_cookie[2];
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
@ -37,18 +37,18 @@ enum {
|
|||
};
|
||||
|
||||
struct packet_diag_info {
|
||||
__u32 pdi_index;
|
||||
__u32 pdi_version;
|
||||
__u32 pdi_reserve;
|
||||
__u32 pdi_copy_thresh;
|
||||
__u32 pdi_tstamp;
|
||||
__u32 pdi_flags;
|
||||
__u32 pdi_index;
|
||||
__u32 pdi_version;
|
||||
__u32 pdi_reserve;
|
||||
__u32 pdi_copy_thresh;
|
||||
__u32 pdi_tstamp;
|
||||
__u32 pdi_flags;
|
||||
|
||||
#define PDI_RUNNING 0x1
|
||||
#define PDI_AUXDATA 0x2
|
||||
#define PDI_ORIGDEV 0x4
|
||||
#define PDI_VNETHDR 0x8
|
||||
#define PDI_LOSS 0x10
|
||||
#define PDI_RUNNING 0x1
|
||||
#define PDI_AUXDATA 0x2
|
||||
#define PDI_ORIGDEV 0x4
|
||||
#define PDI_VNETHDR 0x8
|
||||
#define PDI_LOSS 0x10
|
||||
};
|
||||
|
||||
#ifndef MAX_ADDR_LEN
|
||||
|
|
@ -56,21 +56,21 @@ struct packet_diag_info {
|
|||
#endif
|
||||
|
||||
struct packet_diag_mclist {
|
||||
__u32 pdmc_index;
|
||||
__u32 pdmc_count;
|
||||
__u16 pdmc_type;
|
||||
__u16 pdmc_alen;
|
||||
__u8 pdmc_addr[MAX_ADDR_LEN];
|
||||
__u32 pdmc_index;
|
||||
__u32 pdmc_count;
|
||||
__u16 pdmc_type;
|
||||
__u16 pdmc_alen;
|
||||
__u8 pdmc_addr[MAX_ADDR_LEN];
|
||||
};
|
||||
|
||||
struct packet_diag_ring {
|
||||
__u32 pdr_block_size;
|
||||
__u32 pdr_block_nr;
|
||||
__u32 pdr_frame_size;
|
||||
__u32 pdr_frame_nr;
|
||||
__u32 pdr_retire_tmo;
|
||||
__u32 pdr_sizeof_priv;
|
||||
__u32 pdr_features;
|
||||
__u32 pdr_block_size;
|
||||
__u32 pdr_block_nr;
|
||||
__u32 pdr_frame_size;
|
||||
__u32 pdr_frame_nr;
|
||||
__u32 pdr_retire_tmo;
|
||||
__u32 pdr_sizeof_priv;
|
||||
__u32 pdr_features;
|
||||
};
|
||||
|
||||
#endif /* __CR_PACKET_DIAG_H__ */
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
#define PAGE_ALLOC_COSTLY_ORDER 3 /* from the kernel source code */
|
||||
struct kernel_pipe_buffer {
|
||||
struct page *page;
|
||||
unsigned int offset, len;
|
||||
const struct pipe_buf_operations *ops;
|
||||
unsigned int flags;
|
||||
unsigned long private;
|
||||
struct page *page;
|
||||
unsigned int offset, len;
|
||||
const struct pipe_buf_operations *ops;
|
||||
unsigned int flags;
|
||||
unsigned long private;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
#ifndef CONFIG_HAS_PTRACE_PEEKSIGINFO
|
||||
struct ptrace_peeksiginfo_args {
|
||||
__u64 off; /* from which siginfo to start */
|
||||
__u32 flags;
|
||||
__u32 nr; /* how may siginfos to take */
|
||||
__u64 off; /* from which siginfo to start */
|
||||
__u32 flags;
|
||||
__u32 nr; /* how may siginfos to take */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ static inline int sk_decode_shutdown(int val)
|
|||
extern int set_netns(uint32_t ns_id);
|
||||
|
||||
#ifndef SIOCGSKNS
|
||||
#define SIOCGSKNS 0x894C /* get socket network namespace */
|
||||
#define SIOCGSKNS 0x894C /* get socket network namespace */
|
||||
#endif
|
||||
|
||||
extern int kerndat_socket_netns(void);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef SO_PEEK_OFF
|
||||
#define SO_PEEK_OFF 42
|
||||
#define SO_PEEK_OFF 42
|
||||
#endif
|
||||
|
||||
#include "common/scm.h"
|
||||
|
|
|
|||
|
|
@ -222,5 +222,5 @@ int __wrap_nlmsg_parse(struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[],
|
|||
|
||||
int32_t nla_get_s32(const struct nlattr *nla)
|
||||
{
|
||||
return *(const int32_t *) nla_data(nla);
|
||||
return *(const int32_t *) nla_data(nla);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2325,8 +2325,8 @@ out:
|
|||
* mi->shared_id && !shared - create a new shared group
|
||||
*/
|
||||
if (restore_shared_options(mi, private,
|
||||
mi->shared_id && !shared,
|
||||
mi->master_id && !master))
|
||||
mi->shared_id && !shared,
|
||||
mi->master_id && !master))
|
||||
return -1;
|
||||
|
||||
mi->mounted = true;
|
||||
|
|
|
|||
24
criu/net.c
24
criu/net.c
|
|
@ -344,7 +344,7 @@ static int ipv6_conf_op(char *tgt, SysctlEntry **conf, int n, int op, SysctlEntr
|
|||
* the kernel, simply write DEVCONFS_UNUSED
|
||||
* into the image so we would skip it.
|
||||
*/
|
||||
#define DEVCONFS_UNUSED (-1u)
|
||||
#define DEVCONFS_UNUSED (-1u)
|
||||
|
||||
static int ipv4_conf_op_old(char *tgt, int *conf, int n, int op, int *def_conf)
|
||||
{
|
||||
|
|
@ -2765,7 +2765,7 @@ static int prep_ns_sockets(struct ns_id *ns, bool for_dump)
|
|||
freecon(ctx);
|
||||
if (ret < 0) {
|
||||
pr_perror("Setting SELinux socket context for PID %d failed",
|
||||
root_item->pid->real);
|
||||
root_item->pid->real);
|
||||
goto err_sq;
|
||||
}
|
||||
}
|
||||
|
|
@ -3019,22 +3019,22 @@ int move_veth_to_bridge(void)
|
|||
#ifndef NETNSA_MAX
|
||||
/* Attributes of RTM_NEWNSID/RTM_GETNSID messages */
|
||||
enum {
|
||||
NETNSA_NONE,
|
||||
NETNSA_NONE,
|
||||
#define NETNSA_NSID_NOT_ASSIGNED -1
|
||||
NETNSA_NSID,
|
||||
NETNSA_PID,
|
||||
NETNSA_FD,
|
||||
__NETNSA_MAX,
|
||||
NETNSA_NSID,
|
||||
NETNSA_PID,
|
||||
NETNSA_FD,
|
||||
__NETNSA_MAX,
|
||||
};
|
||||
|
||||
#define NETNSA_MAX (__NETNSA_MAX - 1)
|
||||
#define NETNSA_MAX (__NETNSA_MAX - 1)
|
||||
#endif
|
||||
|
||||
static struct nla_policy rtnl_net_policy[NETNSA_MAX + 1] = {
|
||||
[NETNSA_NONE] = { .type = NLA_UNSPEC },
|
||||
[NETNSA_NSID] = { .type = NLA_S32 },
|
||||
[NETNSA_PID] = { .type = NLA_U32 },
|
||||
[NETNSA_FD] = { .type = NLA_U32 },
|
||||
[NETNSA_NONE] = { .type = NLA_UNSPEC },
|
||||
[NETNSA_NSID] = { .type = NLA_S32 },
|
||||
[NETNSA_PID] = { .type = NLA_U32 },
|
||||
[NETNSA_FD] = { .type = NLA_U32 },
|
||||
};
|
||||
|
||||
static int nsid_cb(struct nlmsghdr *msg, struct ns_id *ns, void *arg)
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ static int pmc_fill_cache(pmc_t *pmc, const struct vma_area *vma)
|
|||
* is to walk page tables less.
|
||||
*/
|
||||
if (!pagemap_cache_disabled &&
|
||||
len < PMC_SIZE && (vma->e->start - low) < PMC_SIZE_GAP) {
|
||||
len < PMC_SIZE && (vma->e->start - low) < PMC_SIZE_GAP) {
|
||||
size_t size_cov = len;
|
||||
size_t nr_vmas = 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
struct sk_packet {
|
||||
struct list_head list;
|
||||
SkPacketEntry *entry;
|
||||
char *data;
|
||||
char *data;
|
||||
unsigned scm_len;
|
||||
int *scm;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
|
|||
"teq %1, %4\n"
|
||||
"it eq\n"
|
||||
"strexeq %0, %5, [%3]\n"
|
||||
: "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter)
|
||||
: "r" (&ptr->counter), "Ir" (old), "r" (new)
|
||||
: "cc");
|
||||
: "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter)
|
||||
: "r" (&ptr->counter), "Ir" (old), "r" (new)
|
||||
: "cc");
|
||||
} while (res);
|
||||
|
||||
smp_mb();
|
||||
|
|
@ -47,13 +47,13 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
|
|||
|
||||
static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
|
||||
{
|
||||
int ret;
|
||||
int ret;
|
||||
|
||||
ret = v->counter;
|
||||
if (ret == old)
|
||||
v->counter = new;
|
||||
ret = v->counter;
|
||||
if (ret == old)
|
||||
v->counter = new;
|
||||
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else
|
||||
|
|
@ -88,7 +88,7 @@ static inline int atomic_add_return(int i, atomic_t *v)
|
|||
" teq %1, #0\n"
|
||||
" bne 1b\n"
|
||||
: "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
|
||||
: "r" (&v->counter), "Ir" (i)
|
||||
: "r" (&v->counter), "Ir" (i)
|
||||
: "cc");
|
||||
|
||||
smp_mb();
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
typedef struct {
|
||||
int counter;
|
||||
int counter;
|
||||
} atomic_t;
|
||||
|
||||
#include "common/arch/ppc64/asm/cmpxchg.h"
|
||||
|
|
|
|||
|
|
@ -261,38 +261,38 @@
|
|||
#define N_SLINE 68
|
||||
#define N_SO 100
|
||||
|
||||
#define __REG_R0 0
|
||||
#define __REG_R1 1
|
||||
#define __REG_R2 2
|
||||
#define __REG_R3 3
|
||||
#define __REG_R4 4
|
||||
#define __REG_R5 5
|
||||
#define __REG_R6 6
|
||||
#define __REG_R7 7
|
||||
#define __REG_R8 8
|
||||
#define __REG_R9 9
|
||||
#define __REG_R10 10
|
||||
#define __REG_R11 11
|
||||
#define __REG_R12 12
|
||||
#define __REG_R13 13
|
||||
#define __REG_R14 14
|
||||
#define __REG_R15 15
|
||||
#define __REG_R16 16
|
||||
#define __REG_R17 17
|
||||
#define __REG_R18 18
|
||||
#define __REG_R19 19
|
||||
#define __REG_R20 20
|
||||
#define __REG_R21 21
|
||||
#define __REG_R22 22
|
||||
#define __REG_R23 23
|
||||
#define __REG_R24 24
|
||||
#define __REG_R25 25
|
||||
#define __REG_R26 26
|
||||
#define __REG_R27 27
|
||||
#define __REG_R28 28
|
||||
#define __REG_R29 29
|
||||
#define __REG_R30 30
|
||||
#define __REG_R31 31
|
||||
#define __REG_R0 0
|
||||
#define __REG_R1 1
|
||||
#define __REG_R2 2
|
||||
#define __REG_R3 3
|
||||
#define __REG_R4 4
|
||||
#define __REG_R5 5
|
||||
#define __REG_R6 6
|
||||
#define __REG_R7 7
|
||||
#define __REG_R8 8
|
||||
#define __REG_R9 9
|
||||
#define __REG_R10 10
|
||||
#define __REG_R11 11
|
||||
#define __REG_R12 12
|
||||
#define __REG_R13 13
|
||||
#define __REG_R14 14
|
||||
#define __REG_R15 15
|
||||
#define __REG_R16 16
|
||||
#define __REG_R17 17
|
||||
#define __REG_R18 18
|
||||
#define __REG_R19 19
|
||||
#define __REG_R20 20
|
||||
#define __REG_R21 21
|
||||
#define __REG_R22 22
|
||||
#define __REG_R23 23
|
||||
#define __REG_R24 24
|
||||
#define __REG_R25 25
|
||||
#define __REG_R26 26
|
||||
#define __REG_R27 27
|
||||
#define __REG_R28 28
|
||||
#define __REG_R29 29
|
||||
#define __REG_R30 30
|
||||
#define __REG_R31 31
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
#define __xchg_op(ptr, arg, op, lock) \
|
||||
({ \
|
||||
__typeof__ (*(ptr)) __ret = (arg); \
|
||||
__typeof__ (*(ptr)) __ret = (arg); \
|
||||
switch (sizeof(*(ptr))) { \
|
||||
case __X86_CASE_B: \
|
||||
asm volatile (lock #op "b %b0, %1\n" \
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ void criu_free_service(criu_opts *opts)
|
|||
case CRIU_COMM_SK:
|
||||
free((void*)(opts->service_address));
|
||||
break;
|
||||
case CRIU_COMM_BIN:
|
||||
case CRIU_COMM_BIN:
|
||||
free((void*)(opts->service_binary));
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,13 +158,13 @@ void libsoccr_release(struct libsoccr_sk *sk)
|
|||
}
|
||||
|
||||
struct soccr_tcp_info {
|
||||
__u8 tcpi_state;
|
||||
__u8 tcpi_ca_state;
|
||||
__u8 tcpi_retransmits;
|
||||
__u8 tcpi_probes;
|
||||
__u8 tcpi_backoff;
|
||||
__u8 tcpi_options;
|
||||
__u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
|
||||
__u8 tcpi_state;
|
||||
__u8 tcpi_ca_state;
|
||||
__u8 tcpi_retransmits;
|
||||
__u8 tcpi_probes;
|
||||
__u8 tcpi_backoff;
|
||||
__u8 tcpi_options;
|
||||
__u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
|
||||
};
|
||||
|
||||
static int refresh_sk(struct libsoccr_sk *sk,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue