No description
Find a file
Kir Kolyshkin 1fe09eb358 Makefiles: move -Wa,--noexecstack out of CFLAGS
The problem is, -Wa is a flag for assembler, but CFLAGS are also used
to generate dependencies, and clang complains loudly when it is used
for deps:

> >   DEP      compel/arch/x86/plugins/std/syscalls-64.d
> >  clang-3.8: error: argument unused during compilation:
> > '-Wa,--noexecstack'

This patch moved the noexecflag from assembler to linker. I am not
100% sure but the end result seems to be the same.

This fixes dependency generation when using clang instead of gcc.

I surely have done my research before proposing this change, and
I have tested this change as good as I could.
Sorry, I should have provided more background in the commit message.
Here it goes.

There are a few ways to have non-executable stack:
1. mark the assembler source file (.S) with .section
.note.GNU-stack,"",%progbits
2. pass the -Wa,--noexecstack to compiler
3. pass the -z execstack to linker

All three ways are fine, let's see them in greater details.

Some people say (1) is the best way, but we have way too many
.S files now (23 of them, to be exact). Anyway, I can certainly do it
this way if you like, just let me know. It would look like this:

    --- a/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.S
    +++ b/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.S
    @@ -3,6 +3,8 @@
     * that are not implemented in the AArch64 Linux kernel
     */

    +.section .note.GNU-stack,"",%progbits
    +
     ENTRY(sys_open)
     mov x3, x2
     mov x2, x1

Way (2) is what is currently used. Unfortunately it breaks dependency
generation with clang. One way to fix it would be to filter-out the bad
flag when we're generating deps. I tried experimenting with
$(filter-out) function in Makefiles today but it's complicated and I failed
to make it work.

Way (3) is what this commit offers. It seem to work fine while being
the least intrusive.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:55 +03:00
compel Makefiles: move -Wa,--noexecstack out of CFLAGS 2017-03-15 00:05:55 +03:00
contrib scripts/install-debian-packages: add libnet-dev 2017-01-16 11:04:49 +03:00
coredump coredump: Rename dir to coredump 2016-06-28 13:04:58 +03:00
crit crit/decode: set default opts['nopl'] to False 2016-05-30 13:47:54 +03:00
criu Makefiles: move -Wa,--noexecstack out of CFLAGS 2017-03-15 00:05:55 +03:00
Documentation .gitignore: update to recent changes 2017-03-14 21:03:22 +03:00
images criu: arch, x86 -- Rename registers mode 2017-03-14 23:58:07 +03:00
include/common compel: criu -- Start using uapi/std syscalls stubs 2017-03-14 23:58:20 +03:00
lib Makefiles: move -Wa,--noexecstack out of CFLAGS 2017-03-15 00:05:55 +03:00
scripts compel: travis -- Disable exec tests 2017-03-14 23:58:20 +03:00
soccr soccr: add one more test to check libsoccr_save/libsoccr_restore 2017-02-01 18:41:29 +03:00
test zdtm: add compatible tests building 2017-03-14 23:58:06 +03:00
.gitignore Add compel-host to .gitignore 2017-03-14 23:58:21 +03:00
.mailmap repo: Add mailmap file 2012-03-25 23:31:20 +04:00
.travis.yml travis: execute tests on Alpine 2017-03-02 00:19:03 +03:00
COPYING COPYING: fix a typo in a preamble 2016-08-11 16:18:43 +03:00
CREDITS Add the CREDITS file 2012-07-30 13:52:37 +04:00
INSTALL.md Makefile.install: rm unused vars/target 2017-02-06 13:48:49 +03:00
Makefile compel: plugins,std -- Implement syscalls in std plugin 2017-03-14 23:58:20 +03:00
Makefile.compel compel: Define separate targtes for plugins 2017-03-14 23:58:11 +03:00
Makefile.config compel: plugins,std -- Add syscall-types.h header 2017-03-14 23:58:11 +03:00
Makefile.install Makefile.install: fix uninstall target 2017-03-06 20:44:08 +03:00
Makefile.versions compel: build -- Add @sublevel 2017-03-14 23:58:08 +03:00
README.md Add ascciinema tour on basic criu features. 2016-06-16 16:37:06 +03:00

CRIU (Checkpoint and Restore in Userspace)

An utility to checkpoint/restore tasks. Using this tool, you can freeze a running application (or part of it) and checkpoint it to a hard drive as a collection of files. You can then use the files to restore and run the application from the point it was frozen at. The distinctive feature of the CRIU project is that it is mainly implemented in user space.

The project home is at http://criu.org.

Pages worth starting with are:

A video tour on basic CRIU features

CRIU introduction

How to contribute