lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 15 Feb 2017 12:34:24 +0000
From:   Ian Campbell <ian.campbell@...ker.com>
To:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Zhao Lei <zhaolei@...fujitsu.com>
Cc:     linux-kernel@...r.kernel.org,
        Justin Cormack <justin.cormack@...ker.com>
Subject: "sched/cpuacct: Show all possible CPUs in cpuacct output" broke
 Docker CPU usage accounting

Hello,

It seems that the changes to cpuacct.usage(_percpu) in 5ca3726af7f6
("sched/cpuacct: Show all possible CPUs in cpuacct output") have
broken CPU usage accounting in Docker
(https://github.com/docker/docker/issues/28941).

The issue is the code at
https://github.com/docker/docker/blob/master/cli/command/container/stats_helpers.go#L184
which multiplies by the length of the array on those files which has
gone from being the number of online cpus to the number of possible
cpus, hence inflating the numbers.

I'm not entirely sure what the answer is, mainly because I've not been
able to figure out what the units presented in the cpuacct files are
which would justify multiplying by any version of number of CPUs,
although it does appear to have been (AFAICT) producing the correct
numbers with the old code.

I'm more than happy to code up a fix on whichever side of the boundary
is appropriate given a hint in the correct direction to take...

Thanks,
Ian.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ