All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ns: Fix time_for_children symlink
@ 2020-04-03 12:11 Michael Kerrisk (man-pages)
  2020-04-03 12:34 ` Christian Brauner
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-04-03 12:11 UTC (permalink / raw)
  To: Dmitry Safonov, Andrei Vagin
  Cc: mtk.manpages, Adrian Reber, Eric W. Biederman, Andrei Vagin,
	linux-kernel, linux-api, Dmitry Safonov, Thomas Gleixner,
	Vincenzo Frascino, Andy Lutomirski, Cyrill Gorcunov, Containers

Dmitry, Andrei,

Looking at the contents of the /proc/PID/ns/time_for_children
symlink shows an anomaly:

$ ls -l /proc/self/ns/* |awk '{print $9, $10, $11}'
...
/proc/self/ns/pid -> pid:[4026531836]
/proc/self/ns/pid_for_children -> pid:[4026531836]
/proc/self/ns/time -> time:[4026531834]
/proc/self/ns/time_for_children -> time_for_children:[4026531834]
/proc/self/ns/user -> user:[4026531837]
...

The reference for 'time_for_children' should be a 'time' namespace,
just as the reference for 'pid_for_children' is a 'pid' namespace.
In other words, I think the above time_for_children link should read:

/proc/self/ns/time_for_children -> time:[4026531834]

If you agree with this patch, then it should be marked for
stable@vger.kernel.org.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>

---
 kernel/time/namespace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/time/namespace.c b/kernel/time/namespace.c
index e6ba064ce773..3b30288793fe 100644
--- a/kernel/time/namespace.c
+++ b/kernel/time/namespace.c
@@ -447,6 +447,7 @@ const struct proc_ns_operations timens_operations = {
 
 const struct proc_ns_operations timens_for_children_operations = {
 	.name		= "time_for_children",
+	.real_ns_name	= "time",
 	.type		= CLONE_NEWTIME,
 	.get		= timens_for_children_get,
 	.put		= timens_put,
-- 
2.25.1

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

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

* Re: [PATCH] ns: Fix time_for_children symlink
  2020-04-03 12:11 [PATCH] ns: Fix time_for_children symlink Michael Kerrisk (man-pages)
@ 2020-04-03 12:34 ` Christian Brauner
  2020-04-03 12:49   ` Dmitry Safonov
  2020-04-07  3:33 ` Andrei Vagin
  2020-04-07 10:42 ` [tip: timers/urgent] time/namespace: " tip-bot2 for Michael Kerrisk (man-pages)
  2 siblings, 1 reply; 5+ messages in thread
From: Christian Brauner @ 2020-04-03 12:34 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages)
  Cc: Dmitry Safonov, Andrei Vagin, Adrian Reber, Eric W. Biederman,
	Andrei Vagin, linux-kernel, linux-api, Dmitry Safonov,
	Thomas Gleixner, Vincenzo Frascino, Andy Lutomirski,
	Cyrill Gorcunov, Containers

On Fri, Apr 03, 2020 at 02:11:39PM +0200, Michael Kerrisk (man-pages) wrote:
> Dmitry, Andrei,
> 
> Looking at the contents of the /proc/PID/ns/time_for_children
> symlink shows an anomaly:
> 
> $ ls -l /proc/self/ns/* |awk '{print $9, $10, $11}'
> ...
> /proc/self/ns/pid -> pid:[4026531836]
> /proc/self/ns/pid_for_children -> pid:[4026531836]
> /proc/self/ns/time -> time:[4026531834]
> /proc/self/ns/time_for_children -> time_for_children:[4026531834]
> /proc/self/ns/user -> user:[4026531837]
> ...
> 
> The reference for 'time_for_children' should be a 'time' namespace,
> just as the reference for 'pid_for_children' is a 'pid' namespace.
> In other words, I think the above time_for_children link should read:
> 
> /proc/self/ns/time_for_children -> time:[4026531834]
> 
> If you agree with this patch, then it should be marked for
> stable@vger.kernel.org.
> 
> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>

Yeah, that just seems like an oversight.

Acked-by: Christian Brauner <christian.brauner@ubuntu.com>

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

* Re: [PATCH] ns: Fix time_for_children symlink
  2020-04-03 12:34 ` Christian Brauner
@ 2020-04-03 12:49   ` Dmitry Safonov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Safonov @ 2020-04-03 12:49 UTC (permalink / raw)
  To: Christian Brauner, Michael Kerrisk (man-pages)
  Cc: Andrei Vagin, Adrian Reber, Eric W. Biederman, Andrei Vagin,
	linux-kernel, linux-api, Dmitry Safonov, Thomas Gleixner,
	Vincenzo Frascino, Andy Lutomirski, Cyrill Gorcunov, Containers,
	stable

On 4/3/20 1:34 PM, Christian Brauner wrote:
> On Fri, Apr 03, 2020 at 02:11:39PM +0200, Michael Kerrisk (man-pages) wrote:
>> Dmitry, Andrei,
>>
>> Looking at the contents of the /proc/PID/ns/time_for_children
>> symlink shows an anomaly:
>>
>> $ ls -l /proc/self/ns/* |awk '{print $9, $10, $11}'
>> ...
>> /proc/self/ns/pid -> pid:[4026531836]
>> /proc/self/ns/pid_for_children -> pid:[4026531836]
>> /proc/self/ns/time -> time:[4026531834]
>> /proc/self/ns/time_for_children -> time_for_children:[4026531834]
>> /proc/self/ns/user -> user:[4026531837]
>> ...
>>
>> The reference for 'time_for_children' should be a 'time' namespace,
>> just as the reference for 'pid_for_children' is a 'pid' namespace.
>> In other words, I think the above time_for_children link should read:
>>
>> /proc/self/ns/time_for_children -> time:[4026531834]
>>
>> If you agree with this patch, then it should be marked for
>> stable@vger.kernel.org.
>>
>> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
> 
> Yeah, that just seems like an oversight.
> 
> Acked-by: Christian Brauner <christian.brauner@ubuntu.com>

Thanks,

Reviewed-by: Dmitry Safonov <dima@arista.com>
Fixes: 769071ac9f20 ("ns: Introduce Time Namespace")
+Cc: stable # v5.6

-- 
          Dmitry

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

* Re: [PATCH] ns: Fix time_for_children symlink
  2020-04-03 12:11 [PATCH] ns: Fix time_for_children symlink Michael Kerrisk (man-pages)
  2020-04-03 12:34 ` Christian Brauner
@ 2020-04-07  3:33 ` Andrei Vagin
  2020-04-07 10:42 ` [tip: timers/urgent] time/namespace: " tip-bot2 for Michael Kerrisk (man-pages)
  2 siblings, 0 replies; 5+ messages in thread
From: Andrei Vagin @ 2020-04-07  3:33 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages)
  Cc: Dmitry Safonov, Andrei Vagin, Adrian Reber, Eric W. Biederman,
	linux-kernel, linux-api, Dmitry Safonov, Thomas Gleixner,
	Vincenzo Frascino, Andy Lutomirski, Cyrill Gorcunov, Containers

On Fri, Apr 03, 2020 at 02:11:39PM +0200, Michael Kerrisk (man-pages) wrote:
> Dmitry, Andrei,
> 
> Looking at the contents of the /proc/PID/ns/time_for_children
> symlink shows an anomaly:
> 
> $ ls -l /proc/self/ns/* |awk '{print $9, $10, $11}'
> ...
> /proc/self/ns/pid -> pid:[4026531836]
> /proc/self/ns/pid_for_children -> pid:[4026531836]
> /proc/self/ns/time -> time:[4026531834]
> /proc/self/ns/time_for_children -> time_for_children:[4026531834]
> /proc/self/ns/user -> user:[4026531837]
> ...
> 
> The reference for 'time_for_children' should be a 'time' namespace,
> just as the reference for 'pid_for_children' is a 'pid' namespace.
> In other words, I think the above time_for_children link should read:
> 
> /proc/self/ns/time_for_children -> time:[4026531834]
> 
> If you agree with this patch, then it should be marked for
> stable@vger.kernel.org.
>

Acked-by: Andrei Vagin <avagin@gmail.com>
 
> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>

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

* [tip: timers/urgent] time/namespace: Fix time_for_children symlink
  2020-04-03 12:11 [PATCH] ns: Fix time_for_children symlink Michael Kerrisk (man-pages)
  2020-04-03 12:34 ` Christian Brauner
  2020-04-07  3:33 ` Andrei Vagin
@ 2020-04-07 10:42 ` tip-bot2 for Michael Kerrisk (man-pages)
  2 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Michael Kerrisk (man-pages) @ 2020-04-07 10:42 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Michael Kerrisk, Thomas Gleixner, Dmitry Safonov,
	Christian Brauner, Andrei Vagin, stable, x86, LKML

The following commit has been merged into the timers/urgent branch of tip:

Commit-ID:     b801f1e22c23c259d6a2c955efddd20370de19a6
Gitweb:        https://git.kernel.org/tip/b801f1e22c23c259d6a2c955efddd20370de19a6
Author:        Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
AuthorDate:    Fri, 03 Apr 2020 14:11:39 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 07 Apr 2020 12:37:21 +02:00

time/namespace: Fix time_for_children symlink

Looking at the contents of the /proc/PID/ns/time_for_children symlink shows
an anomaly:

$ ls -l /proc/self/ns/* |awk '{print $9, $10, $11}'
...
/proc/self/ns/pid -> pid:[4026531836]
/proc/self/ns/pid_for_children -> pid:[4026531836]
/proc/self/ns/time -> time:[4026531834]
/proc/self/ns/time_for_children -> time_for_children:[4026531834]
/proc/self/ns/user -> user:[4026531837]
...

The reference for 'time_for_children' should be a 'time' namespace, just as
the reference for 'pid_for_children' is a 'pid' namespace.  In other words,
the above time_for_children link should read:

/proc/self/ns/time_for_children -> time:[4026531834]

Fixes: 769071ac9f20 ("ns: Introduce Time Namespace")
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Dmitry Safonov <dima@arista.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Acked-by: Andrei Vagin <avagin@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/a2418c48-ed80-3afe-116e-6611cb799557@gmail.com
---
 kernel/time/namespace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/time/namespace.c b/kernel/time/namespace.c
index e6ba064..3b30288 100644
--- a/kernel/time/namespace.c
+++ b/kernel/time/namespace.c
@@ -447,6 +447,7 @@ const struct proc_ns_operations timens_operations = {
 
 const struct proc_ns_operations timens_for_children_operations = {
 	.name		= "time_for_children",
+	.real_ns_name	= "time",
 	.type		= CLONE_NEWTIME,
 	.get		= timens_for_children_get,
 	.put		= timens_put,

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

end of thread, other threads:[~2020-04-07 10:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03 12:11 [PATCH] ns: Fix time_for_children symlink Michael Kerrisk (man-pages)
2020-04-03 12:34 ` Christian Brauner
2020-04-03 12:49   ` Dmitry Safonov
2020-04-07  3:33 ` Andrei Vagin
2020-04-07 10:42 ` [tip: timers/urgent] time/namespace: " tip-bot2 for Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.