Stéphane Graber
1c39a913df
Merge pull request #3996 from tych0/fix-criu-log
...
criu: fix error message
2021-10-14 13:02:36 -04:00
Tycho Andersen
bdb8aeda72
criu: fix error message
...
as of 59d8a539d1
("criu: massage exec_criu()") I see:
In file included from criu.c:22:
criu.c: In function 'exec_criu':
log.h:376:2: error: '%s' directive argument is null [-Werror=format-overflow=]
376 | LXC_ERROR(&locinfo, format, ##__VA_ARGS__); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
log.h:457:3: note: in expansion of macro 'ERROR'
457 | ERROR("%s - " format, ptr, ##__VA_ARGS__); \
| ^~~~~
log.h:491:3: note: in expansion of macro 'SYSERROR'
491 | SYSERROR(format, ##__VA_ARGS__); \
| ^~~~~~~~
criu.c:325:11: note: in expansion of macro 'log_error_errno'
325 | return log_error_errno(-ENOMEM, ENOMEM, "Failed to remove extraneous slashes from \"%s\"", tmp);
| ^~~~~~~~~~~~~~~
it looks like we should be logging the string that failed, vs. tmp here.
(my log was taken from stable-4.0, but the same issue exists on master it
seems.)
Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
2021-10-14 10:41:36 -06:00
Stéphane Graber
b2668c872f
Merge pull request #3995 from brauner/2021-10-13.fixes
...
tree-wide: capability tests and fixes
2021-10-14 10:38:18 -04:00
Christian Brauner
8a0de7e7cc
test: fix nested capability tests
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-14 14:03:49 +02:00
Christian Brauner
401b1364b3
attach: improve error logging for drop_capabilities()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-14 13:26:15 +02:00
Christian Brauner
09f2a3ef8a
tests: expand capability tests
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-14 11:17:15 +02:00
Christian Brauner
7418b27f12
tree-wide: use __u32 for capabilities
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-14 11:04:06 +02:00
Christian Brauner
c5e7fbcadb
cgroups: use __u32 for cpumasks
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-13 18:30:00 +02:00
Stéphane Graber
f64fa52667
Merge pull request #3994 from brauner/2021-10-12.fixes
...
conf: improve and fix lxc.cap.keep
2021-10-13 09:25:59 -04:00
Christian Brauner
623f47b00c
conf: improve capability handling
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-13 13:38:14 +02:00
Christian Brauner
634b43e1f2
tests: add test for lxc.cap.keep
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-13 13:08:01 +02:00
Christian Brauner
cafcd2a751
conf: fix lxc.cap.keep behavior
...
Fixes: ##3993
Fixes: 20ab75789e
("conf: simplify and port caps to new list type")
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-12 16:33:14 +02:00
Stéphane Graber
8305ff8ab0
Merge pull request #3992 from brauner/2021-10-11.fixes
...
terminal: log at warning message
2021-10-11 10:30:46 -04:00
Christian Brauner
0cf017f071
terminal: log at warning message
...
The lxc_devpts_terminal() helper is called in contexts where it can fail
due to various reasons but where we safely fallback to allocating
terminal devices on the host. Logging error messages irritates users so
just log warning messages.
Link: https://discuss.linuxcontainers.org/t/lxc-attach-error-failed-to-open-terminal-multiplexer-device
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-11 15:22:52 +02:00
Stéphane Graber
15f29e6fb7
Merge pull request #3988 from brauner/2021-10-04.fixes
...
log: improve %m handling on musl
2021-10-04 09:14:18 -04:00
Christian Brauner
316b8d0589
log: improve %m handling on musl
...
Fixes : #3961
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-04 11:24:19 +02:00
Stéphane Graber
d63b84d89b
Merge pull request #3987 from brauner/2021-10-01.fixes
...
start: make failure to apply core scheduling fatal
2021-10-01 10:33:23 -04:00
Christian Brauner
ffd98e8c2e
start: make failure to apply core scheduling fatal
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-01 15:35:03 +02:00
Stéphane Graber
b8b2e1f331
Merge pull request #3986 from brauner/2021-10-01.fixes
...
lxc: core scheduling tweaks
2021-10-01 08:52:01 -04:00
Christian Brauner
f18a595926
start: use core scheduling error helper
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-01 10:14:08 +02:00
Christian Brauner
565b6e92d3
start: don't fail when core scheduling isn't supported
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-01 10:12:43 +02:00
Christian Brauner
47bfecf510
syscall_wrappers: fix core scheduling creation helper naming
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-01 10:12:17 +02:00
Stéphane Graber
15e9cc882f
Merge pull request #3985 from brauner/2021-09-30.fixes.2
...
tree-wide: cast to core scheduling cookie to llu
2021-09-30 17:17:07 -04:00
Christian Brauner
2e9aa14628
tree-wide: cast to core scheduling cookie to llu
...
Link: https://launchpadlibrarian.net/561086365/buildlog_ubuntu-focal-ppc64el.lxc_1%3A4.0.10+master~20210930-1812-0ubuntu1~focal_BUILDING.txt.gz
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-30 22:48:29 +02:00
Stéphane Graber
187560436a
Merge pull request #3984 from brauner/2021-09-29.core_scheduling
...
lxc: core scheduling support
2021-09-30 13:56:25 -04:00
Christian Brauner
c958a332d2
attach: handle core scheduling
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-30 17:43:22 +02:00
Stéphane Graber
177f5c95dc
Merge pull request #3983 from brauner/2021-09-29.fixes
...
build: compiler attribute improvements
2021-09-29 12:45:09 -04:00
Christian Brauner
09996a4821
lxc: add lxc.sched.core
...
Core scheduling defines if the container payload is marked as being
schedulable on the same core. Doing so will cause the kernel scheduler
to ensure that tasks that are not in the same group never run
simultaneously on a core. This can serve as an extra security measure to
prevent the container payload from using cross hyper thread attacks.
The only allowed values are 0 and 1. Set this to 1 to create a core
scheduling domain for the container or 0 to not create one. If not set
explicitly no core scheduling domain will be created for the container.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-29 14:07:41 +02:00
Christian Brauner
b371ad51bb
initutils: add missing prctl include
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-29 13:16:05 +02:00
Christian Brauner
ae13cb3b1b
build: compiler attribute improvements
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-29 10:17:33 +02:00
Christian Brauner
6187bcb810
Merge pull request #3982 from stgraber/master
...
github: Drop 16.04 tests
2021-09-28 23:09:44 +02:00
Stéphane Graber
b502fdabad
Merge pull request #3981 from brauner/2021-09-28.fixes
...
build: check whether compiler supports nonnull and returns_nonnull at…
2021-09-28 16:58:59 -04:00
Stéphane Graber
afef261bdf
github: Drop 16.04 tests
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2021-09-28 16:58:44 -04:00
Christian Brauner
5c26176d58
build: check whether compiler supports nonnull and returns_nonnull attributes
...
Fixes : #3980
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-28 11:49:26 +02:00
Stéphane Graber
553b7a0332
Merge pull request #3979 from brauner/2021-09-27.fixes
...
build: add commands, hooks, and templates
2021-09-27 09:39:39 -04:00
Christian Brauner
7af71c9416
hooks: fix quoting
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-27 12:51:18 +02:00
Christian Brauner
3cc0ec841e
templates: don't double quote
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-27 12:42:22 +02:00
Christian Brauner
7172b98c77
build: add templates
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-27 12:39:10 +02:00
Christian Brauner
c597905e2f
build: fix remaining HAVE_* generations
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-27 12:22:12 +02:00
Christian Brauner
34498deaa3
tree-wide: fix HAVE_* checks
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-27 12:19:23 +02:00
Christian Brauner
afdad1798e
cmds: fix includes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-27 12:09:17 +02:00
Christian Brauner
98775a4cc9
cmds: fix integer conversions
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-27 12:07:51 +02:00
Christian Brauner
69f5d68a5c
lxc-monitord: use {} around ;
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-27 12:03:20 +02:00
Christian Brauner
72f1c44ab2
build: add cmd builds
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-27 12:03:04 +02:00
Christian Brauner
659611a36d
build: add hooks
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-27 11:39:52 +02:00
Christian Brauner
75e9b2e604
build: build hooks directly in their folder
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-27 10:48:29 +02:00
Stéphane Graber
498ef0b7a1
Merge pull request #3978 from brauner/2021-09-23.fixes
...
build: improve meson build
2021-09-23 17:14:05 -04:00
Christian Brauner
db4af8c57e
build: improve meson build
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-23 14:05:24 +02:00
Stéphane Graber
ad447e353d
Merge pull request #3977 from brauner/2021-09-16.fixes
...
build: fixes
2021-09-16 10:45:44 -04:00
Christian Brauner
8d9420ff8a
build: use dummy config data
...
to avoid having to rely on newer meson features.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-16 16:04:33 +02:00