[Bug 217547] New: The shell example in time_namespaces doesn't behave as documented

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=217547

            Bug ID: 217547
           Summary: The shell example in time_namespaces doesn't behave as
                    documented
           Product: Documentation
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: man-pages
          Assignee: documentation_man-pages@xxxxxxxxxxxxxxxxxxxx
          Reporter: goeran@xxxxxxxxxxx
        Regression: No

Trying the shell example in the manual page for time_namespaces(7) does not
behave for me the way the manual page says it should. From what I can tell, it
appears that the new shell ITSELF immediately enters the new namespace, rather
than allowing for children to enter. This makes it impossible to write anything
to the time_for_children file.

Using the --boottime flag to unshare gives the expected behavior. Does an
exec() trigger entering the new time namespace nowadays? 

This was tested on a Fedora 38 system running kernel 6.2.14-300.fc38.

Example session:

kalle$$ readlink /proc/$$/ns/time
time:[4026531834]
kalle$$ LANG=en_US.utf8 PS1="ns2# " sudo unshare -T -- bash --norc
[sudo] password for göran: 
bash-5.2# echo "monotonic $((2*24*60*60)) 0" > /proc/$$/timens_offsets
bash: echo: write error: Permission denied
bash-5.2# readlink /proc/$$/ns/time
time:[4026532249]
bash-5.2# readlink /proc/$$/ns/time_for_children
time:[4026532249]

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux