Commit 12ca3825 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Andrei Vagin

compel: remove not needed from uapi

Delete plugins/include/asm/std directory - let it be without plugin name.
Make symlinks to reuse criu's files, except those, which will
be deleted after libcompel from criu (like syscalls).
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 20d5bb14
../../../../../../criu/arch/x86/include/asm/linkage.h
\ No newline at end of file
/*
* call32.S - assembly helpers for mixed-bitness code
* From kernel selftests originally: tools/testing/selftests/x86/thunks.S
* Copyright (c) 2015 Andrew Lutomirski
*
* This program is free software; you can redistribute it and/or modify
* it under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* These are little helpers that make it easier to switch bitness on
* the fly.
*/
#include "asm/linkage.h"
#define __USER32_CS 0x23
#define __USER_CS 0x33
.text
/*
* @rdi: Stack to use
* @esi: Pointer to function for calling
*/
ENTRY(call32_from_64)
/* Callee-saving registers due to ABI */
pushq %rbx
pushq %rbp
pushq %r12
pushq %r13
pushq %r14
pushq %r15
pushfq
/* Switch stacks */
sub $8, %rdi
mov %rsp,(%rdi)
mov %rdi,%rsp
/* Switch into compatibility mode */
pushq $__USER32_CS
pushq $1f
lretq
1:
.code32
/* Run function and switch back */
call *%esi
jmp $__USER_CS,$1f
.code64
1:
/* Restore the stack */
mov (%rsp),%rsp
add $8, %rdi
/* Restore registers */
popfq
popq %r15
popq %r14
popq %r13
popq %r12
popq %rbp
popq %rbx
ret
END(call32_from_64)
../../../../../criu/arch/x86/call32.S
\ No newline at end of file
../../criu/include/asm-generic/int.h
\ No newline at end of file
#ifndef __CR_INT_H__
#define __CR_INT_H__
#include <stdint.h>
typedef uint64_t u64;
typedef int64_t s64;
typedef uint32_t u32;
typedef int32_t s32;
typedef uint16_t u16;
typedef int16_t s16;
typedef uint8_t u8;
typedef int8_t s8;
#endif /* __CR_INT_H__ */
...@@ -2,24 +2,27 @@ ...@@ -2,24 +2,27 @@
ARCH_DIR := compel/arch/$(ARCH)/plugins ARCH_DIR := compel/arch/$(ARCH)/plugins
ccflags-y += -iquote $(obj)/include/ # General compel includes
ccflags-y += -iquote $(obj)/include/uapi
ccflags-y += -iquote $(SRC_DIR)/criu/include
ccflags-y += -iquote $(SRC_DIR)/criu/arch/$(ARCH)/include
ccflags-y += -iquote $(SRC_DIR)/compel/include ccflags-y += -iquote $(SRC_DIR)/compel/include
ccflags-y += -iquote $(SRC_DIR)/$(ARCH_DIR)/include
asflags-y += -iquote $(SRC_DIR)/criu/arch/$(ARCH)/include # General compel/plugins includes
asflags-y += -iquote $(SRC_DIR)/compel/plugins/include/uapi ccflags-y += -iquote $(obj)/include
ccflags-y += -iquote $(obj)/include/uapi
asflags-y += -iquote $(obj)/include/uapi
# Arch compel/plugins includes
ccflags-y += -iquote $(SRC_DIR)/$(ARCH_DIR)/include
asflags-y += -iquote $(SRC_DIR)/$(ARCH_DIR)/include
asflags-y += -iquote $(SRC_DIR)/$(ARCH_DIR) asflags-y += -iquote $(SRC_DIR)/$(ARCH_DIR)
# #
# STD plugin # STD plugin
target += std target += std
std-obj-y += std/std.o std-obj-y += std/std.o
std-obj-y += std/string.o std-obj-y += std/string.o
std-obj-y += arch/$(ARCH)/plugins/std/syscalls-64.o std-obj-y += ./$(ARCH_DIR)/std/syscalls-64.o
std-obj-y += arch/$(ARCH)/plugins/std/calls32.o std-obj-y += ./$(ARCH_DIR)/std/call32.o
sys-proto-generic := $(obj)/include/uapi/std/syscall.h sys-proto-generic := $(obj)/include/uapi/std/syscall.h
sys-codes-generic := $(obj)/include/uapi/std/syscall-codes.h sys-codes-generic := $(obj)/include/uapi/std/syscall-codes.h
......
#ifndef COMPEL_PLUGIN_STD_STD_H__ #ifndef COMPEL_PLUGIN_STD_STD_H__
#define COMPEL_PLUGIN_STD_STD_H__ #define COMPEL_PLUGIN_STD_STD_H__
#include "uapi/plugins.h"
#include "uapi/std/syscall.h" #include "uapi/std/syscall.h"
struct prologue_init_args {
struct sockaddr *ctl_sock_addr;
socklen_t ctl_sock_addr_len;
unsigned int arg_s;
void *arg_p;
};
#endif /* COMPEL_PLUGIN_STD_STD_H__ */ #endif /* COMPEL_PLUGIN_STD_STD_H__ */
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include <fcntl.h> #include <fcntl.h>
#include <time.h> #include <time.h>
#include "int.h"
struct cap_header { struct cap_header {
u32 version; u32 version;
int pid; int pid;
...@@ -50,6 +52,6 @@ struct krlimit { ...@@ -50,6 +52,6 @@ struct krlimit {
/* Type of timers in the kernel. */ /* Type of timers in the kernel. */
typedef int kernel_timer_t; typedef int kernel_timer_t;
#include "asm/std/syscall-types.h" #include "asm/syscall-types.h"
#endif /* COMPEL_SYSCALL_TYPES_H__ */ #endif /* COMPEL_SYSCALL_TYPES_H__ */
#include <sys/types.h> #include <sys/types.h>
#include "uapi/int.h" #include "int.h"
#include "uapi/plugins.h" #include "uapi/plugins.h"
#include "uapi/plugin-std.h" #include "uapi/plugin-std.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment