linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] time namespace fixes for v5.11
@ 2020-12-14 11:57 Christian Brauner
  2020-12-15  0:49 ` pr-tracker-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Brauner @ 2020-12-14 11:57 UTC (permalink / raw)
  To: Linus Torvalds, Linux Kernel Mailing List

Hi Linus,

Here are some time namespace fixes for v5.11.

/* Summary */
When time namespaces were introduced we missed to virtualize the "btime" field
in /proc/stat. This confuses tasks which are in another time namespace with a
virtualized boottime which is common in some container workloads. This pr
contains Michael's series to fix "btime" which Thomas asked me to take through
my tree.
To fix "btime" virtualization we simply subtract the offset of the time
namespace's boottime from btime before printing the stats. Note that since
start_boottime of processes are seconds since boottime and the boottime stamp
is now shifted according to the time namespace's offset, the offset of the time
namespace also needs to be applied before the process stats are given to
userspace. This avoids that processes shown by tools such as "ps" appear as
time travelers in the corresponding time namespace. Selftests are included to
verify that btime virtualization in /proc/stat works as expected.

The following changes since commit 3cea11cd5e3b00d91caf0b4730194039b45c5891:

  Linux 5.10-rc2 (2020-11-01 14:43:51 -0800)

are available in the Git repository at:

  git@gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux tags/time-namespace-v5.11

for you to fetch changes up to 5c62634fc65101d350cbd47722fb76f02693059d:

  namespace: make timens_on_fork() return nothing (2020-11-18 11:06:47 +0100)

/* Testing */
All patches are based on v5.10-rc2. All old and new tests are passing.
Please note that I missed to merge these fixes into my for-next branch and so
linux-next has not contained the commits in this pr.
I'm still sending this pr because these are fairly trivial bugfixes and have
seen vetting from multiple people. I have also now merged this tag into my
for-next branch so these commits will show up in linux-next soon. If you feel
more comfortable with this sitting in linux-next for a while please just ignore
this pr and I'll resend after rc1 has been released.

/* Conflicts */
At the time of creating this PR no merge conflicts were reported from
linux-next and no merge 2c85ebc57b3e ("Linux 5.10").

Please consider pulling these changes from the signed time-namespace-v5.11 tag.

Thanks!
Christian

----------------------------------------------------------------
time-namespace-v5.11

----------------------------------------------------------------
Hui Su (1):
      namespace: make timens_on_fork() return nothing

Michael Weiß (3):
      timens: additional helper functions for boottime offset handling
      fs/proc: apply the time namespace offset to /proc/stat btime
      selftests/timens: added selftest for /proc/stat btime

 fs/proc/array.c                         |  6 ++--
 fs/proc/stat.c                          |  3 ++
 include/linux/time_namespace.h          | 28 ++++++++++++++--
 kernel/nsproxy.c                        |  7 +---
 kernel/time/namespace.c                 |  6 ++--
 tools/testing/selftests/timens/procfs.c | 58 ++++++++++++++++++++++++++++++++-
 6 files changed, 92 insertions(+), 16 deletions(-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [GIT PULL] time namespace fixes for v5.11
  2020-12-14 11:57 [GIT PULL] time namespace fixes for v5.11 Christian Brauner
@ 2020-12-15  0:49 ` pr-tracker-bot
  0 siblings, 0 replies; 2+ messages in thread
From: pr-tracker-bot @ 2020-12-15  0:49 UTC (permalink / raw)
  To: Christian Brauner; +Cc: Linus Torvalds, Linux Kernel Mailing List

The pull request you sent on Mon, 14 Dec 2020 12:57:44 +0100:

> git@gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux tags/time-namespace-v5.11

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/6d93a1971a0ded67887eeab8d00a02074490f071

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-15  0:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 11:57 [GIT PULL] time namespace fixes for v5.11 Christian Brauner
2020-12-15  0:49 ` pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).