[CRIU] [PATCH 5/6] Redesign of syscalls

Cyrill Gorcunov gorcunov at openvz.org
Tue Mar 27 10:45:16 EDT 2012


This patch fixes long standing bug with syscalls description.
Before we've had syscalls described inline in syscall.h with
move parameters as "long" with "g" specificator, which sometime
makes gcc to put direct addresses of memory operands instead of
relative offsets. Moreover, the way we generate binary blobs was
a bit wrong, the blob must be one-sectioned .text file and offsets
should be taked from a file where relocations are already applied.

So now we generate syscalls from syscall.def template file.
This forced to redesign the Makefiles and the order of files
building, but after all the amount of code shrinks and become
more readable I think.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 Makefile                |    9 +-
 Makefile.inc            |    1 +
 Makefile.pie            |   16 +-
 Makefile.syscall        |   39 +++++
 cr-restore.c            |    8 +-
 include/syscall-codes.h |   62 -------
 include/syscall-types.h |   51 ++++++
 include/syscall.def     |   57 ++++++
 include/syscall.h       |  435 -----------------------------------------------
 parasite.c              |   17 +-
 restorer.c              |   43 ++++--
 syscall-common.S        |   16 ++
 syscalls.pl             |   51 ++++++
 13 files changed, 272 insertions(+), 533 deletions(-)
 create mode 100644 Makefile.syscall
 delete mode 100644 include/syscall-codes.h
 create mode 100644 include/syscall-types.h
 create mode 100644 include/syscall.def
 delete mode 100644 include/syscall.h
 create mode 100644 syscall-common.S
 create mode 100644 syscalls.pl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Redesign-of-syscalls.patch
Type: text/x-patch
Size: 32209 bytes
Desc: not available
Url : http://openvz.org/pipermail/criu/attachments/20120327/d3ae2fc9/0005-Redesign-of-syscalls-0001.bin


More information about the CRIU mailing list