]> git.proxmox.com Git - mirror_lxcfs.git/log
mirror_lxcfs.git
23 months agoMerge pull request #568 from mihalicyn/cg_proc_stat_use_after_free
Christian Brauner [Mon, 5 Dec 2022 15:15:56 +0000 (16:15 +0100)]
Merge pull request #568 from mihalicyn/cg_proc_stat_use_after_free

[RFC] cpuview: fix possible use-after-free in find_proc_stat_node

23 months agocpuview: fix possible use-after-free in find_proc_stat_node
Alexander Mikhalitsyn [Fri, 2 Dec 2022 11:57:33 +0000 (12:57 +0100)]
cpuview: fix possible use-after-free in find_proc_stat_node

Our current lock design uses 2 sync primitives.
First (pthread_rwlock) protects hash table buckets.
Second (pthread_mutex) protects each struct cg_proc_stat
from concurrent modification. But the problem is that function
find_proc_stat_node() can return a pointer to the node
(struct cg_proc_stat) which can be freed by prune_proc_stat_history()
call *before* we take pthread_mutex. Moreover, we perform
memory release of (struct cg_proc_stat) in prune_proc_stat_list()
without any protection like refcounter or mutex on (struct cg_proc_stat).

An attempt to guess what happens in:
https://github.com/lxc/lxcfs/issues/565
https://discuss.linuxcontainers.org/t/number-of-cpus-reported-by-proc-stat-fluctuates-causing-issues/15780/14

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
23 months agoMerge pull request #567 from mihalicyn/cpuinfo_with_personality
Christian Brauner [Thu, 1 Dec 2022 09:16:45 +0000 (10:16 +0100)]
Merge pull request #567 from mihalicyn/cpuinfo_with_personality

cpuinfo with personality

23 months agocpuview: paththrough personality when reading cpuinfo
Alexander Mikhalitsyn [Mon, 28 Nov 2022 13:54:56 +0000 (14:54 +0100)]
cpuview: paththrough personality when reading cpuinfo

Let's change processing thread personality if caller personality
is different. It allows to read /proc/cpuinfo properly in
some cases (arm64 rely on current->personality inside Linux kernel).

https://github.com/lxc/lxcfs/issues/553

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
23 months agoutils: add get_task_personality helper
Alexander Mikhalitsyn [Mon, 28 Nov 2022 13:51:24 +0000 (14:51 +0100)]
utils: add get_task_personality helper

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
23 months agomacro.h: add strnprintf macro
Alexander Mikhalitsyn [Wed, 30 Nov 2022 22:57:37 +0000 (23:57 +0100)]
macro.h: add strnprintf macro

Stolen from LXC

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
23 months agoutils: add safe_uint32() helper
Alexander Mikhalitsyn [Wed, 30 Nov 2022 16:25:24 +0000 (17:25 +0100)]
utils: add safe_uint32() helper

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
23 months agoMerge pull request #564 from blue-troy/master
Stéphane Graber [Thu, 24 Nov 2022 04:04:26 +0000 (23:04 -0500)]
Merge pull request #564 from blue-troy/master

doc: guide for mount /sys/devices/system/cpu in docker demo

23 months agodoc: guide for mount /sys/devices/system/cpu in docker demo
blue-troy [Wed, 23 Nov 2022 07:51:50 +0000 (15:51 +0800)]
doc: guide for mount /sys/devices/system/cpu in docker demo

Signed-off-by: blue-troy <12729455+blue-troy@users.noreply.github.com>
2 years agoMerge pull request #563 from gibmat/fix-ia64-build
Stéphane Graber [Thu, 17 Nov 2022 23:55:41 +0000 (18:55 -0500)]
Merge pull request #563 from gibmat/fix-ia64-build

Fix build on ia64

2 years agoFix build on ia64
Mathias Gibbens [Thu, 17 Nov 2022 21:57:58 +0000 (21:57 +0000)]
Fix build on ia64

The relevant code was added in commit 35acc24, but the function/macro
prctl_arg() didn't seem to be defined anywhere in the repo. lxc
currently has a corresponding macro defined in src/lxc/macro.h that
casts the value to an unsigned long. But 0 doesn't require any special
handling, so remove the call to prctl_arg().

Verified that the code compiles properly on Debian's ia64 porterbox
(yttrium).

Signed-off-by: Mathias Gibbens <gibmat@debian.org>
2 years agoMerge pull request #552 from bytedance/set-oom-score-adj
Stéphane Graber [Tue, 23 Aug 2022 21:06:24 +0000 (17:06 -0400)]
Merge pull request #552 from bytedance/set-oom-score-adj

set oom_score_adj of lxcfs process to -1000

2 years agoset oom_score_adj of lxcfs process to -1000
Teng Hu [Tue, 23 Aug 2022 09:31:58 +0000 (17:31 +0800)]
set oom_score_adj of lxcfs process to -1000

Disable oom killing entirely to minimize the hassle comes from
lxcfs exiting unexpectedly, e.g. the mountpoint got lost.

Signed-off-by: Teng Hu <huteng.ht@bytedance.com>
2 years agoMerge pull request #550 from Blub/bindings-reinit-fuse3-fixup
Stéphane Graber [Fri, 29 Jul 2022 14:56:01 +0000 (10:56 -0400)]
Merge pull request #550 from Blub/bindings-reinit-fuse3-fixup

fix reinitialization with fuse3

2 years agofix reinitialization with fuse3
Wolfgang Bumiller [Fri, 29 Jul 2022 07:30:10 +0000 (09:30 +0200)]
fix reinitialization with fuse3

With fuse3 `fuse_get_context` returns NULL before fuse was
fully initialized, so we must not access it.

Futher, we call 'do_reload' for normal initialization as
well, so let's prevent that from re-initializing the
bindings initially and only do this on actual reloads,
otherwise we do it twice on startup.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fixes #549

2 years agoMerge pull request #545 from Blub/init-lib-at-reload-drop-fuse-init-return
Stéphane Graber [Tue, 5 Jul 2022 21:44:19 +0000 (17:44 -0400)]
Merge pull request #545 from Blub/init-lib-at-reload-drop-fuse-init-return

re-initialize library after reload

2 years agoMerge pull request #547 from stgraber/master
Christian Brauner [Tue, 5 Jul 2022 21:33:10 +0000 (23:33 +0200)]
Merge pull request #547 from stgraber/master

Complete Github Actions migration

2 years agogithub: Validate target branch
Stéphane Graber [Tue, 5 Jul 2022 21:26:42 +0000 (17:26 -0400)]
github: Validate target branch

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2 years agogithub: Restrict permissions
Stéphane Graber [Tue, 5 Jul 2022 21:26:30 +0000 (17:26 -0400)]
github: Restrict permissions

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2 years agoMerge pull request #546 from Blub/sys-cpu-cpu-readdir
Christian Brauner [Tue, 5 Jul 2022 12:47:02 +0000 (14:47 +0200)]
Merge pull request #546 from Blub/sys-cpu-cpu-readdir

replace opathdir with opendir_flags

2 years agoreplace opathdir with opendir_flags
Wolfgang Bumiller [Tue, 5 Jul 2022 11:55:20 +0000 (13:55 +0200)]
replace opathdir with opendir_flags

`opathdir` was used to replace `opendir` in order to ensure
`O_NOFOLLOW` and `O_CLOEXEC` were set, however it also added
`O_PATH` which prevents `readdir`/`getdents` to be used on
it, causing the `/sys/devices/system/cpu/<subdir>`
directories to be empty.

Instead, let's have an `opendir_flags` utility which simply
passed additional flags to the `open(..., O_DIRECTORY)` call
preceding `fdopendir()`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agore-initialize library after reload
Wolfgang Bumiller [Tue, 5 Jul 2022 08:26:26 +0000 (10:26 +0200)]
re-initialize library after reload

When introducing versioned options, we started using fuse's
"init" callback in order to tell the library to set
`can_use_sys_cpu` and `has_versioned_opts` accordingly.

However, we forgot to also do this on a reload. Fix this by
simply calling `lxcfs_fuse_init()` in `do_reload()` as well.

Additionaly: ignore lxcfs_fuse_init()'s return value.
We just "passed through" the private_data from fuse which is
set via the `fuse_main()` call.

It's better to not leave this up to the library anyway in
order to make it easier to be fuse version agnostic in the
future.

Without this, issuing a reload to lxcfs would cause
files in `/sys/devices/system/cpu/` to be visible via
`readdir`, but accessing them would fail:

    ~ # ls /sys/devices/system/cpu/
    ls: /sys/devices/system/cpu/cpuidle: No such file or directory
    ls: /sys/devices/system/cpu/uevent: No such file or directory
    (...)

    ~ # echo /sys/devices/system/cpu/*
    /sys/devices/system/cpu/cpu0 /sys/devices/system/cpu/cpu1 (...)

    ~ # strace stat /sys/devices/system/cpu/cpu0
    lstat("/sys/devices/system/cpu/cpu0", 0x7ffdb2c57a00) = -1 ENOENT (No such file or directory)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoMerge pull request #544 from mchtech/cgoup-v2-cpu-count
Christian Brauner [Tue, 5 Jul 2022 05:25:32 +0000 (07:25 +0200)]
Merge pull request #544 from mchtech/cgoup-v2-cpu-count

cgroup v2: /sys/devices/system/cpu/online returns zero

2 years agocgroup v2: return cpuset cpu count when no quota is set
michuan [Mon, 4 Jul 2022 02:49:49 +0000 (10:49 +0800)]
cgroup v2: return cpuset cpu count when no quota is set

Signed-off-by: michuan <michu_an@126.com>
2 years agoMerge pull request #541 from bytedance/cleanup-getsize
Christian Brauner [Tue, 24 May 2022 12:31:06 +0000 (14:31 +0200)]
Merge pull request #541 from bytedance/cleanup-getsize

sysfs: cleanup sys_devices_system_cpu_online_getsize

2 years agosysfs: cleanup sys_devices_system_cpu_online_getsize
huteng.ht [Tue, 24 May 2022 05:13:01 +0000 (13:13 +0800)]
sysfs: cleanup sys_devices_system_cpu_online_getsize

cleanup useless parameters and local variables, meanwhile,
a compiler warning resolved.

Signed-off-by: huteng.ht <huteng.ht@bytedance.com>
2 years agoMerge pull request #539 from bytedance/calc-online-file-size
Christian Brauner [Mon, 23 May 2022 08:13:01 +0000 (10:13 +0200)]
Merge pull request #539 from bytedance/calc-online-file-size

sysfs: correct file size of /sys/devices/system/cpu/online.

2 years agosysfs: correct file size of /sys/devices/system/cpu/online.
huteng.ht [Sat, 21 May 2022 11:39:14 +0000 (19:39 +0800)]
sysfs: correct file size of /sys/devices/system/cpu/online.

Calculate accurate size of 'online' file in sys_getattr routine.

Signed-off-by: huteng.ht <huteng.ht@bytedance.com>
2 years agoMerge pull request #537 from dasteihn/sta/commentfix
Christian Brauner [Mon, 16 May 2022 12:10:47 +0000 (14:10 +0200)]
Merge pull request #537 from dasteihn/sta/commentfix

util: remove doubled comment

2 years agoutil: remove doubled comment
Philipp Stanner [Mon, 16 May 2022 11:12:29 +0000 (13:12 +0200)]
util: remove doubled comment

Signed-off-by: Philipp Stanner <stanner@posteo.de>
2 years agoMerge pull request #536 from yrhki/extra-space
Christian Brauner [Fri, 13 May 2022 10:09:28 +0000 (12:09 +0200)]
Merge pull request #536 from yrhki/extra-space

proc_fuse: extra space in /proc/stat

2 years agoproc_fuse: extra space in /proc/stat
Tuomas Yrjölä [Thu, 12 May 2022 22:24:47 +0000 (01:24 +0300)]
proc_fuse: extra space in /proc/stat

Signed-off-by: Tuomas Yrjölä <mail@yrhki.fi>
2 years agoMerge pull request #535 from stgraber/master
Christian Brauner [Fri, 29 Apr 2022 07:52:16 +0000 (09:52 +0200)]
Merge pull request #535 from stgraber/master

meson: Syntax nit

2 years agomeson: Syntax nit
Stéphane Graber [Fri, 29 Apr 2022 00:13:38 +0000 (20:13 -0400)]
meson: Syntax nit

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2 years agoMerge pull request #533 from stgraber/master
Christian Brauner [Mon, 11 Apr 2022 19:26:50 +0000 (21:26 +0200)]
Merge pull request #533 from stgraber/master

Meson tweaks for init systems

2 years agomeson: Support multiple init systems
Stéphane Graber [Mon, 11 Apr 2022 18:31:07 +0000 (14:31 -0400)]
meson: Support multiple init systems

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2 years agoinit: Fix install paths for sysvinit and openrc
Stéphane Graber [Mon, 11 Apr 2022 14:54:02 +0000 (10:54 -0400)]
init: Fix install paths for sysvinit and openrc

Closes #532

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2 years agoMerge pull request #531 from stgraber/master
Christian Brauner [Fri, 8 Apr 2022 05:22:15 +0000 (07:22 +0200)]
Merge pull request #531 from stgraber/master

Fix tests

2 years agotests: Skip sysfs test on older FUSE versions
Stéphane Graber [Thu, 7 Apr 2022 23:51:23 +0000 (19:51 -0400)]
tests: Skip sysfs test on older FUSE versions

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2 years agogithub: Re-organize Github Actions
Stéphane Graber [Thu, 7 Apr 2022 23:48:52 +0000 (19:48 -0400)]
github: Re-organize Github Actions

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2 years agoMerge pull request #530 from Blub/2022-01-17/optional-fuse-2
Christian Brauner [Mon, 4 Apr 2022 15:19:26 +0000 (17:19 +0200)]
Merge pull request #530 from Blub/2022-01-17/optional-fuse-2

support explicit fuse version choice

2 years agosupport explicit fuse version choice
Wolfgang Bumiller [Mon, 4 Apr 2022 12:10:00 +0000 (14:10 +0200)]
support explicit fuse version choice

We'd like to provide an easy upgrade path which doesn't
cause an lxcfs-reload to crash because the new library was
built against the wrong version.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoMerge pull request #526 from brauner/2022-03-13.fixes
Stéphane Graber [Sun, 13 Mar 2022 17:09:32 +0000 (18:09 +0100)]
Merge pull request #526 from brauner/2022-03-13.fixes

sysfs_fuse: fixes

2 years agoMerge pull request #528 from thmo/unitdir
Christian Brauner [Sun, 13 Mar 2022 14:58:44 +0000 (15:58 +0100)]
Merge pull request #528 from thmo/unitdir

Query systemd system unit dir.

2 years agoQuery systemd system unit dir.
Thomas Moschny [Sun, 13 Mar 2022 12:00:56 +0000 (13:00 +0100)]
Query systemd system unit dir.

Signed-off-by: Thomas Moschny <thomas.moschny@gmx.de>
2 years agoMerge pull request #527 from Foxboron/morten/fix-libdir
Christian Brauner [Sun, 13 Mar 2022 12:01:05 +0000 (13:01 +0100)]
Merge pull request #527 from Foxboron/morten/fix-libdir

init/meson: Use libdir instead of hardcoded /lib path

2 years agoinit/meson: Use libdir instead of hardcoded /lib path
Morten Linderud [Sun, 13 Mar 2022 11:36:50 +0000 (12:36 +0100)]
init/meson: Use libdir instead of hardcoded /lib path

Hardcoding `/lib` makes meson create a directory which would conflict on
distros with usrmerge as `/lib` is a symlink. We define `libdir` in the
top-level so we should be using that instead.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2 years agomeson: handle fuse versions with buggy dt_type handling
Christian Brauner (Microsoft) [Sun, 13 Mar 2022 11:00:34 +0000 (12:00 +0100)]
meson: handle fuse versions with buggy dt_type handling

Link: https://github.com/libfuse/libfuse/pull/591
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2 years agogithub: add fuse3 tests
Christian Brauner (Microsoft) [Sun, 13 Mar 2022 10:37:42 +0000 (11:37 +0100)]
github: add fuse3 tests

Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2 years agomeson: bump fuse version
Christian Brauner (Microsoft) [Sun, 13 Mar 2022 10:36:51 +0000 (11:36 +0100)]
meson: bump fuse version

Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2 years agosysfs_fuse: generate file info for cpu<nr> entries as well
Christian Brauner (Microsoft) [Sun, 13 Mar 2022 09:06:02 +0000 (10:06 +0100)]
sysfs_fuse: generate file info for cpu<nr> entries as well

Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2 years agosysfs_fuse: fix indendation
Christian Brauner (Microsoft) [Sun, 13 Mar 2022 08:48:27 +0000 (09:48 +0100)]
sysfs_fuse: fix indendation

Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2 years agoutils: add and use opathdir()
Christian Brauner (Microsoft) [Sun, 13 Mar 2022 08:46:37 +0000 (09:46 +0100)]
utils: add and use opathdir()

Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2 years agoMerge pull request #525 from stgraber/master
Christian Brauner [Sun, 13 Mar 2022 08:17:57 +0000 (09:17 +0100)]
Merge pull request #525 from stgraber/master

More sysfs fixes

2 years agotests: Fix sysfs test
Stéphane Graber [Sun, 13 Mar 2022 03:35:37 +0000 (22:35 -0500)]
tests: Fix sysfs test

For the sysfs test to be useful, we need /sys/devices/system/cpu/ to
actually be mounted.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2 years agosysfs: Don't incorrectly filter entries
Stéphane Graber [Sun, 13 Mar 2022 03:34:15 +0000 (22:34 -0500)]
sysfs: Don't incorrectly filter entries

The filtering logic was completely skipping any entry which was 3
characters or shorter. Instead change the logic to only attempt to parse
those entries longer than 3 characters.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2 years agoMerge pull request #524 from Foxboron/morten/docs
Stéphane Graber [Sat, 12 Mar 2022 16:14:00 +0000 (17:14 +0100)]
Merge pull request #524 from Foxboron/morten/docs

meson: Include documentation

2 years agoMerge pull request #523 from brauner/2022-03-12.fixes
Stéphane Graber [Sat, 12 Mar 2022 16:12:24 +0000 (17:12 +0100)]
Merge pull request #523 from brauner/2022-03-12.fixes

fuse: set file info for fuse2

2 years agoworkflows: disable documentation generation
Morten Linderud [Sat, 12 Mar 2022 14:58:27 +0000 (15:58 +0100)]
workflows: disable documentation generation

Signed-off-by: Morten Linderud <morten@linderud.pw>
2 years agomeson: Include documentation
Morten Linderud [Sat, 12 Mar 2022 14:53:51 +0000 (15:53 +0100)]
meson: Include documentation

Documentation was removed from the build system with the migration to
meson. This implements the help2man generation which existed in the
autoconf setup.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2 years agotests: add test for issue #522
Christian Brauner (Microsoft) [Sat, 12 Mar 2022 10:54:41 +0000 (11:54 +0100)]
tests: add test for issue #522

Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2 years agotree-wide: ensure that file information is set even with legacy fuse
Christian Brauner (Microsoft) [Sat, 12 Mar 2022 10:38:06 +0000 (11:38 +0100)]
tree-wide: ensure that file information is set even with legacy fuse

Fixes: #522
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2 years agotree-wide: remove struct stat argument from DIR_FILLER and make it static inline
Christian Brauner (Microsoft) [Sat, 12 Mar 2022 09:55:10 +0000 (10:55 +0100)]
tree-wide: remove struct stat argument from DIR_FILLER and make it static inline

Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2 years agolxcfs_fuse: ensure lxcfs_fuse_compat.h is included after including fuse header
Christian Brauner (Microsoft) [Sat, 12 Mar 2022 09:51:58 +0000 (10:51 +0100)]
lxcfs_fuse: ensure lxcfs_fuse_compat.h is included after including fuse header

Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2 years agoRelease LXCFS 5.0.0 lxcfs-5.0.0
Stéphane Graber [Wed, 9 Mar 2022 16:58:08 +0000 (11:58 -0500)]
Release LXCFS 5.0.0

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2 years agoMerge pull request #521 from stgraber/master
Christian Brauner [Wed, 9 Mar 2022 17:20:31 +0000 (18:20 +0100)]
Merge pull request #521 from stgraber/master

Makefile: Fix ordering and add PHONY

2 years agoMakefile: Fix ordering and add PHONY
Stéphane Graber [Wed, 9 Mar 2022 17:18:06 +0000 (12:18 -0500)]
Makefile: Fix ordering and add PHONY

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2 years agoMerge pull request #520 from stgraber/master
Christian Brauner [Wed, 9 Mar 2022 17:14:14 +0000 (18:14 +0100)]
Merge pull request #520 from stgraber/master

More meson tweaks

2 years agoMakefile: Tweak for meson (add dist target)
Stéphane Graber [Wed, 9 Mar 2022 17:09:59 +0000 (12:09 -0500)]
Makefile: Tweak for meson (add dist target)

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2 years agomeson: Set check argument on run_command
Stéphane Graber [Wed, 9 Mar 2022 17:04:30 +0000 (12:04 -0500)]
meson: Set check argument on run_command

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2 years agoMerge pull request #519 from stgraber/master
Christian Brauner [Wed, 9 Mar 2022 16:56:25 +0000 (17:56 +0100)]
Merge pull request #519 from stgraber/master

meson: Cleanup build files

2 years agomeson: Cleanup build files
Stéphane Graber [Wed, 9 Mar 2022 16:48:12 +0000 (11:48 -0500)]
meson: Cleanup build files

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2 years agoMerge pull request #518 from brauner/2022-03-07.fixes
Stéphane Graber [Mon, 7 Mar 2022 15:09:24 +0000 (16:09 +0100)]
Merge pull request #518 from brauner/2022-03-07.fixes

proc_fuse: improve error message

2 years agoproc_fuse: improve error message
Christian Brauner (Microsoft) [Mon, 7 Mar 2022 14:23:24 +0000 (15:23 +0100)]
proc_fuse: improve error message

Fixes: #516
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2 years agoMerge pull request #515 from phanhuy1502/preserve-cpu-sum-when-cpu-set-changes
Christian Brauner [Mon, 31 Jan 2022 12:43:38 +0000 (13:43 +0100)]
Merge pull request #515 from phanhuy1502/preserve-cpu-sum-when-cpu-set-changes

Preseve cpu sum in /proc/stat when cpuset changes

2 years agoPreseve cpu sum in /proc/stat when cpuset changes
Nguyen Phan Huy [Thu, 27 Jan 2022 11:31:47 +0000 (19:31 +0800)]
Preseve cpu sum in /proc/stat when cpuset changes

Signed-off-by: Nguyen Phan Huy <phanhuy1502@gmail.com>
2 years agoMerge pull request #514 from Blub/2022-01-17/fix-and-reformat-format-strings
Stéphane Graber [Mon, 17 Jan 2022 13:46:03 +0000 (08:46 -0500)]
Merge pull request #514 from Blub/2022-01-17/fix-and-reformat-format-strings

fix and reformat format strings

2 years agofix and reformat format strings
Wolfgang Bumiller [Mon, 17 Jan 2022 09:20:33 +0000 (10:20 +0100)]
fix and reformat format strings

Some of these missed the spaces in between and in order to
make this more readable and apparent, put one field per line
and add comments matching the field names.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoMerge pull request #509 from brauner/2021-12-13.fixes
Stéphane Graber [Mon, 13 Dec 2021 15:40:17 +0000 (10:40 -0500)]
Merge pull request #509 from brauner/2021-12-13.fixes

tree-wide: use PRIu64 to print uint64_t

2 years agoproc_loadavg: use PRIu64 to print uint64_t
Christian Brauner [Mon, 13 Dec 2021 15:35:10 +0000 (16:35 +0100)]
proc_loadavg: use PRIu64 to print uint64_t

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2 years agoproc_fuse: use PRIu64 to print uint64_t
Christian Brauner [Mon, 13 Dec 2021 15:32:32 +0000 (16:32 +0100)]
proc_fuse: use PRIu64 to print uint64_t

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2 years agoproc_cpuview: use PRIu64 to print uint64_t
Christian Brauner [Mon, 13 Dec 2021 15:27:33 +0000 (16:27 +0100)]
proc_cpuview: use PRIu64 to print uint64_t

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2 years agoproc_fuse: use correct type for swap variables
Christian Brauner [Mon, 13 Dec 2021 15:18:08 +0000 (16:18 +0100)]
proc_fuse: use correct type for swap variables

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2 years agobuild: move global options further up
Christian Brauner [Mon, 13 Dec 2021 15:16:46 +0000 (16:16 +0100)]
build: move global options further up

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2 years agoMerge pull request #508 from Blub/2021-12-09/cgv2-swap-meminfo
Christian Brauner [Thu, 9 Dec 2021 14:12:55 +0000 (15:12 +0100)]
Merge pull request #508 from Blub/2021-12-09/cgv2-swap-meminfo

make meminfo and swaps cgroupv2 aware

2 years agomake meminfo and swaps cgroupv2 aware
Wolfgang Bumiller [Thu, 9 Dec 2021 10:37:04 +0000 (11:37 +0100)]
make meminfo and swaps cgroupv2 aware

and deduplicate the corresponding code

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoMerge pull request #506 from Sn0rt/empty-cgroup-if-set-unified_cgroup_hierarchy=1
Christian Brauner [Tue, 7 Dec 2021 09:08:48 +0000 (10:08 +0100)]
Merge pull request #506 from Sn0rt/empty-cgroup-if-set-unified_cgroup_hierarchy=1

empty cgroup dir if set unified_cgroup_hierarchy=1

2 years agoempty cgroup dir if set unified_cgroup_hierarchy=1
Guohao Wang [Sun, 5 Dec 2021 08:45:00 +0000 (16:45 +0800)]
empty cgroup dir if set unified_cgroup_hierarchy=1

Signed-off-by: Guohao Wang <wangguohao.2009@gmail.com>
3 years agoMerge pull request #501 from phanhuy1502/detect-disable-cfs-quota
Christian Brauner [Tue, 9 Nov 2021 12:51:25 +0000 (13:51 +0100)]
Merge pull request #501 from phanhuy1502/detect-disable-cfs-quota

Skip cpu revise when cfs quota is disable

3 years agoSkip cpu revise when cfs quota is disable
Nguyen Phan Huy [Tue, 9 Nov 2021 10:58:28 +0000 (18:58 +0800)]
Skip cpu revise when cfs quota is disable

Signed-off-by: Nguyen Phan Huy <phanhuy1502@gmail.com>
3 years agoMerge pull request #499 from brauner/2021-11-05.fixes
Stéphane Graber [Fri, 5 Nov 2021 13:34:18 +0000 (09:34 -0400)]
Merge pull request #499 from brauner/2021-11-05.fixes

build: fixes

3 years agobuild: use jinja2 templating
Christian Brauner [Fri, 5 Nov 2021 12:30:28 +0000 (13:30 +0100)]
build: use jinja2 templating

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
3 years agobuild: add LXCFSTARGETDIR to configuration data
Christian Brauner [Fri, 5 Nov 2021 09:49:38 +0000 (10:49 +0100)]
build: add LXCFSTARGETDIR to configuration data

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
3 years agoMerge pull request #496 from Foxboron/morten/fix-src
Christian Brauner [Wed, 20 Oct 2021 18:13:01 +0000 (20:13 +0200)]
Merge pull request #496 from Foxboron/morten/fix-src

meson: Include lxcfs_fuse.h into source files

3 years agomeson: Include lxcfs_fuse.h into source files
Morten Linderud [Wed, 20 Oct 2021 17:46:25 +0000 (19:46 +0200)]
meson: Include lxcfs_fuse.h into source files

Signed-off-by: Morten Linderud <morten@linderud.pw>
3 years agoMerge pull request #495 from brauner/2021-10-20.fixes
Stéphane Graber [Wed, 20 Oct 2021 12:44:04 +0000 (08:44 -0400)]
Merge pull request #495 from brauner/2021-10-20.fixes

build: fixes

3 years agogithub/workflows: meson compile -C build everywhere
Christian Brauner [Wed, 20 Oct 2021 08:37:13 +0000 (10:37 +0200)]
github/workflows: meson compile -C build everywhere

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
3 years agobuild: add share/ directory
Christian Brauner [Wed, 20 Oct 2021 08:28:50 +0000 (10:28 +0200)]
build: add share/ directory

This was somehow missing until now.

Fixes: #494
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
3 years agobuild: remove newline
Christian Brauner [Wed, 20 Oct 2021 08:16:31 +0000 (10:16 +0200)]
build: remove newline

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
3 years agoMerge pull request #493 from brauner/2021-10-19.fixes.2
Stéphane Graber [Tue, 19 Oct 2021 15:04:13 +0000 (11:04 -0400)]
Merge pull request #493 from brauner/2021-10-19.fixes.2

sysfs: fix cpumasks