Skip to contentSkip to conversation

Some fixes for v5.11

GIT PULL Merged Christian Brauner 4 participants 6 messages Dec 14, 2020 – Dec 15, 2020

lore
Share & tools
lore
#0 lore raw

Hi Linus,

Here are some fixes for v5.11.

/* Summary */
This contains several fixes which felt worth being combined into a single pr:
- Use put_nsproxy() instead of open-coding it switch_task_namespaces().
- Kirill's work to unify lifecycle management for all namespaces. The lifetime counters are used identically for all namespaces types. Namespaces may of course have additional unrelated counters and these are not altered. This work allows us to unify the type of the counters and reduces maintenance cost by moving the counter in one place and indicating that basic lifetime management is identical for all namespaces.
- Peilin's fix adding 3 byte padding to Dmitry's PTRACE_GET_SYSCALL_INFO uapi struct to prevent an info leak.
- Two smal patches to convert from the /* fall through */ comment annotation to the fallthrough keyword annotation which I had taken into my branch and into -next before df561f6688fe ("treewide: Use fallthrough pseudo-keyword") made it upstream which fixed this tree-wide. Since I didn't want to invalidate all testing for other commits I didn't rebase and kept them.

The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5:

Linux 5.9-rc1 (2020-08-16 13:04:57 -0700)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/brauner/linux tags/fixes-v5.11

for you to fetch changes up to aabe19b8279340c43294688b4d9527a893c60463:

nsproxy: use put_nsproxy() in switch_task_namespaces() (2020-11-19 10:57:02 +0100)

/* Testing */
Most of the patches here have been sitting in -next since v5.9-rc1; so a rather long time. Especially for the ns counter changes and the uapi change to the ptrace_get_syscall_info() struct it seemed worth waiting for a while to be confident there aren't any subtle regressions we missed. No build failures or warnings were observed. All old and new tests are passing.

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

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

Thanks!
Christian

----------------------------------------------------------------
fixes-v5.11

----------------------------------------------------------------
Christian Brauner (2):
ns: Add a common refcount into ns_common
net: Use generic ns_common::count

Hui Su (1):
nsproxy: use put_nsproxy() in switch_task_namespaces()

Kirill Tkhai (7):
uts: Use generic ns_common::count
ipc: Use generic ns_common::count
pid: Use generic ns_common::count
user: Use generic ns_common::count
mnt: Use generic ns_common::count
cgroup: Use generic ns_common::count
time: Use generic ns_common::count

Miaohe Lin (2):
signal: Convert to the new fallthrough notation
sys: Convert to the new fallthrough notation

Peilin Ye (1):
ptrace: Prevent kernel-infoleak in ptrace_get_syscall_info()

 fs/mount.h                     |  3 +--
 fs/namespace.c                 |  4 ++--
 include/linux/cgroup.h         |  5 ++---
 include/linux/ipc_namespace.h  |  3 +--
 include/linux/ns_common.h      |  3 +++
 include/linux/pid_namespace.h  |  4 +---
 include/linux/time_namespace.h |  9 ++++-----
 include/linux/user_namespace.h |  5 ++---
 include/linux/utsname.h        |  9 ++++-----
 include/net/net_namespace.h    | 11 ++++-------
 include/uapi/linux/ptrace.h    |  3 ++-
 init/version.c                 |  2 +-
 ipc/msgutil.c                  |  2 +-
 ipc/namespace.c                |  4 ++--
 kernel/cgroup/cgroup.c         |  2 +-
 kernel/cgroup/namespace.c      |  2 +-
 kernel/nsproxy.c               |  6 +++---
 kernel/pid.c                   |  2 +-
 kernel/pid_namespace.c         | 13 +++----------
 kernel/signal.c                |  2 +-
 kernel/sys.c                   |  2 +-
 kernel/time/namespace.c        |  9 +++------
 kernel/user.c                  |  2 +-
 kernel/user_namespace.c        |  4 ++--
 kernel/utsname.c               |  7 ++-----
 net/core/net-sysfs.c           |  6 +++---
 net/core/net_namespace.c       |  6 +++---
 net/ipv4/inet_timewait_sock.c  |  4 ++--
 net/ipv4/tcp_metrics.c         |  2 +-
 29 files changed, 58 insertions(+), 78 deletions(-)
#1 lore raw
Quoted 5 lines · Christian Brauner

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

Really? It conflicted with your own time namespace fixes.. Was one or the other not in linux-next?

Not that the conflicts were big or bad (free_time_ns() prototype changed right next to timens_on_fork() prototype), I'm just surprised you saw no conflicts..

It may be that Stephen didn't even bother reporting them as trivial.

Linus

#2 lore raw

Hi Linus,

Quoted 9 lines · On Mon, 14 Dec 2020 16:45:50 -0800 Linus Torvalds…
Quoted 5 lines · Christian Brauner

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

Quoted 6 lines

Really? It conflicted with your own time namespace fixes.. Was one or the other not in linux-next?

Not that the conflicts were big or bad (free_time_ns() prototype changed right next to timens_on_fork() prototype), I'm just surprised you saw no conflicts..

The time namespace changes appear in linux-next for the first time today - where I reported that 3 of them have no Signed-off-by from their committer :-(.

Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw
Quoted 15 lines · Stephen Rothwell

Hi Linus,

Quoted 12 lines · On Mon, 14 Dec 2020 16:45:50 -0800 Linus Torvalds…
Quoted 5 lines · Christian Brauner

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

Really? It conflicted with your own time namespace fixes.. Was one or the other not in linux-next?

Quoted 7 lines
Quoted 3 lines

Not that the conflicts were big or bad (free_time_ns() prototype changed right next to timens_on_fork() prototype), I'm just surprised you saw no conflicts..

The time namespace changes appear in linux-next for the first time today - where I reported that 3 of them have no Signed-off-by from their committer :-(.

This was my bad. I'm adding a script to verify that all commits are signed-off by me when I commit them.

Christian

#4 lore raw
In reply to Linus Torvalds
Quoted 10 lines · Linus Torvalds
Quoted 5 lines · Christian Brauner

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

Really? It conflicted with your own time namespace fixes.. Was one or the other not in linux-next?

Oh sorry, I guess you didn't see that. The simple time namespace fixes didn't make it into -next because I missed to merge them into my for-next branch when I took them. I did mention it in the time-namespace-v5.11 pull-request in the /* Testing */ section but apparently this wasn't prominent enough.

"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."

Quoted 4 lines

Not that the conflicts were big or bad (free_time_ns() prototype changed right next to timens_on_fork() prototype), I'm just surprised you saw no conflicts..

Hm, I did pull linux-next 20201214 and then did a pull from my tag. And as usual I always do a test-pull based on v5.* releaste tag and they didn't show any merge conflicts.

Quoted 2 lines

It may be that Stephen didn't even bother reporting them as trivial.

No, this was definitely my fault. I'll try to make sure this won't repeat. Thanks for still pulling.

Christian

merge bot Merged
#5 lore raw
In reply to Christian Brauner
The pull request you sent on Mon, 14 Dec 2020 14:27:45 +0100:

The pull request you sent on Mon, 14 Dec 2020 14:27:45 +0100:

Quoted 1 line

[email protected]:pub/scm/linux/kernel/git/brauner/linux tags/fixes-v5.11

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

Thank you!

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