more, the dynamic_dname() method will only allow you to access the dentry
itself and not a struct path which would contain the vfsmount information. In
any case, here is my patch, when applied the fd returned by ioctl(fd,
TIOCGPTPEER) will have the correct content ("/dev/pts/"):
Christian Brauner (1):
devpts: use dynamic_dname() to generate proc name
fs/devpts/inode.c | 13 +
1 file changed, 13 insertions(+)
--
2.13.3
; although it should likely be "/mnt/" into their
implementation of ptsname{_r}() and so wouldn't be affected by this change at
all. Furthermore, mounting devpts somewhere other than "/dev/pts" (e.g. "/mnt")
doesn't seem to work and from what I gather fro
On Wed, Aug 16, 2017 at 11:48:48AM -0700, Linus Torvalds wrote:
> On Wed, Aug 16, 2017 at 11:26 AM, Linus Torvalds
> wrote:
> >
> > Hardcoding "/dev/pts/%d" is something that user space can already do.
> > The kernel can and should do better.
>
> Put another way: there's no point in applying the
On Wed, Aug 16, 2017 at 11:03 PM, Linus Torvalds
wrote:
> On Wed, Aug 16, 2017 at 1:30 PM, Linus Torvalds
> wrote:
>>
>> I suspect the easiest fix is to just add a "mnt" argument to
>> devpts_acquire(), It shouldn't be too painful. Let me try.
>
> Ok, here's a *very* lightly tested patch. It mig
On Wed, Aug 16, 2017 at 11:55 PM, Linus Torvalds
wrote:
> On Wed, Aug 16, 2017 at 2:45 PM, Linus Torvalds
> wrote:
>>
>> But it would be good to just test this in general too, and make sure I
>> didn't screw up some reference count or something. The patch *looks*
>> obviously correct, but ...
>
>
On Wed, Aug 16, 2017 at 11:45 PM, Linus Torvalds
wrote:
> On Wed, Aug 16, 2017 at 2:37 PM, Christian Brauner
> wrote:
>>> And Christian, if you can beat on this, that would be good.
>>
>> Yes, I can pound on this nicely with liblxc. We have patch
>> ( https://
< sizeof(fd) / sizeof(fd[0]); i++)
close(fd[i]);
if (ret < 0)
exit(EXIT_FAILURE);
for (k = 0; k < 1000; k++) {
sum += times[k];
}
printf("Mean time per file in nanoseconds: %" PRIu64 "\n"
This is preparation for bumping the {g,u}idmap limits for usernamespaces.
Signed-off-by: Christian Brauner
---
include/linux/user_namespace.h | 18 +-
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
This is preparation for bumping the {g,u}idmap limits for usernamespaces.
Signed-off-by: Christian Brauner
---
Changelog 2017-10-16:
* Trivial: fix email addresses in CC: lines
---
include/linux/user_namespace.h | 18 +-
1 file changed, 13 insertions(+), 5 deletions(-)
diff
< sizeof(fd) / sizeof(fd[0]); i++)
close(fd[i]);
if (ret < 0)
exit(EXIT_FAILURE);
for (k = 0; k < 1000; k++) {
sum += times[k];
}
printf("Mean time per file in nanoseconds: %" PRIu64 &qu
Please disregard v2 - It messed up the email addresses for Serge and Eric. v3
with the correct email addresses is already sent out.
On Mon, Oct 16, 2017 at 05:30:53PM +0200, Christian Brauner wrote:
> This is preparation for bumping the {g,u}idmap limits for usernamespaces.
>
> Sign
On Tue, Oct 31, 2017 at 06:46:32PM -0500, Eric W. Biederman wrote:
>
> Christian I have looked through your code and I have found one real
> issue and of things I want to twak
Cool, thanks for taking a close look Eric.
>
> The real issue is reading nr_extents multiple times when reading a map.
>
On Wed, Nov 01, 2017 at 06:15:53AM -0500, Eric W. Biederman wrote:
> Christian Brauner writes:
>
> > On Tue, Oct 31, 2017 at 06:46:32PM -0500, Eric W. Biederman wrote:
> >>
> >> Christian I have looked through your code and I have found one real
> >
On Wed, Nov 01, 2017 at 02:05:39PM +0100, Peter Zijlstra wrote:
> On Wed, Nov 01, 2017 at 06:08:35AM -0500, Eric W. Biederman wrote:
> > Nikolay Borisov writes:
> >
> > > On 1.11.2017 01:48, Eric W. Biederman wrote:
> > >>
> > >> This is important so reading /proc//{uid_map,gid_map,projid_map}
On Wed, Nov 01, 2017 at 03:16:54PM +0100, Peter Zijlstra wrote:
> On Wed, Nov 01, 2017 at 03:01:45PM +0100, Christian Brauner wrote:
> > Tbf, this isn't solely Eric's fault. I'm to blame here too since I didn't
> > document the already existing smb_rmb()
On Wed, Nov 01, 2017 at 02:05:39PM +0100, Peter Zijlstra wrote:
> On Wed, Nov 01, 2017 at 06:08:35AM -0500, Eric W. Biederman wrote:
> > Nikolay Borisov writes:
> >
> > > On 1.11.2017 01:48, Eric W. Biederman wrote:
> > >>
> > >> This is important so reading /proc//{uid_map,gid_map,projid_map}
This is a version of the suggested memory barrier patch. I've made it to apply
cleanly against Eric's for-next tree as discussed with Peter.
Christian
Christian Brauner (1):
userns: Fix/clarify memory ordering
kernel/user_namespace.c | 74 +++---
()/READ_ONCE()s.
CC: Eric Biederman
Cc: Linux Containers
Reported-by: Nikolay Borisov
Signed-off-by: Peter Zijlstra (Intel)
Signed-off-by: Christian Brauner
---
kernel/user_namespace.c | 74 +++--
1 file changed, 47 insertions(+), 27 deletions(-)
diff
members in order to please gcc <= 4.4.
Signed-off-by: Christian Brauner
---
Changelog 2017-10-24:
* no changes
Changelog 2017-10-19:
* kernel/user.c: Use brackets around anonymous union when using designated
initializers to initialize members. This is done to please gcc <= 4.4.
---
---
include
",
(time_in_mcs * 1000) / 100);
times[k] = (time_in_mcs * 1000) / 100;
}
close_all:
for (i = 0; i < sizeof(fd) / sizeof(fd[0]); i++)
close(fd[i]);
if (ret < 0)
exit(EXIT_FAILURE);
for (k
On Thu, Oct 26, 2017 at 02:12:01PM -0400, Waiman Long wrote:
> On 10/26/2017 10:39 AM, Tejun Heo wrote:
> > Hello, Waiman.
> >
> > On Wed, Oct 25, 2017 at 11:50:34AM -0400, Waiman Long wrote:
> >> Ping! Any comment on this patch?
Fwiw, I just saw this patch today for some weird reason.
> > Sorry
stian,
>
> [auto build test ERROR on linus/master]
> [also build test ERROR on v4.14-rc5 next-20171017]
> [if your patch is applied to the wrong git tree, please drop us a note to
> help improve the system]
>
> url:
> https://github.com/0day-ci/linux/commits/Christia
On Wed, Oct 18, 2017 at 07:48:14PM -0500, Eric W. Biederman wrote:
> Christian Brauner writes:
>
> > I'm not sure why the build is complaining about how the union is initialized
> > here. This looks legitimate to me and I can't reproduce this locally with or
> >
members in order to please gcc <= 4.4.
Signed-off-by: Christian Brauner
---
Changelog 2017-10-19:
* kernel/user.c: Use brackets around anonymous union when using designated
initializers to initialize members. This is done to please gcc <= 4.4.
---
include/linux/user_namespace.
",
(time_in_mcs * 1000) / 100);
times[k] = (time_in_mcs * 1000) / 100;
}
close_all:
for (i = 0; i < sizeof(fd) / sizeof(fd[0]); i++)
close(fd[i]);
if (ret < 0)
exit(EXIT_FAILURE);
for (k
On Mon, Jul 30, 2018 at 10:41:09PM +0100, Al Viro wrote:
> On Mon, Jul 30, 2018 at 10:28:40PM +0200, Christian Brauner wrote:
> > On Mon, Jul 30, 2018 at 01:19:47PM -0700, Matthew Wilcox wrote:
> > > On Mon, Jul 30, 2018 at 10:12:24PM +0200, Christian Brauner wrote:
> > &
On Mon, Aug 06, 2018 at 08:44:42PM -0600, Tycho Andersen wrote:
> Hi all,
>
> Dinesh Subhraveti has claimed that some part of this series might be
> patented. While he has not furnished me with anything to confirm this
> claim, I'll put this series on hold.
Hey man,
Sorry to hear that your faced
On Mon, Aug 06, 2018 at 09:19:04PM -0700, Andy Lutomirski wrote:
> On Mon, Aug 6, 2018 at 8:30 PM, Christian Brauner
> wrote:
> > On Mon, Aug 06, 2018 at 08:44:42PM -0600, Tycho Andersen wrote:
> >> Hi all,
> >>
> >> Dinesh Subhraveti has claimed
gt; * add signalled field to struct seccomp_notif (Jann)
> * switch to using ioctls instead of read()/write() for struct passing
> (Jann)
> * add an ioctl to ensure an id is still valid
>
> Signed-off-by: Tycho Andersen
> CC: Kees Cook
> CC: Andy Lutomi
v3: no changes
> v4: no changes
> v5: switch to CHECKPOINT_RESTORE || USER_NOTIFICATION to avoid warning when
> only CONFIG_SECCOMP_FILTER is enabled.
>
> Signed-off-by: Tycho Andersen
> CC: Kees Cook
> CC: Andy Lutomirski
> CC: Oleg Nesterov
> CC: Eric W. Biederman
bprm_caps_from_vfs_caps() never returned -EINVAL so remove the
rc == -EINVAL check.
Signed-off-by: Christian Brauner
---
v0 -> v1
- non-functional changes:
adapt commit message to reflect the fact that
bprm_caps_from_vfs_caps() never actuall returned -EINVAL.
---
security/commoncap.c
The Android binder driver will be turned into a module. Since it uses
__alloc_fd() we need to export this function.
Signed-off-by: Christian Brauner
Cc: Todd Kjos
Cc: Robert Love
Cc: Ben Hutching
Cc: Martijn Coenen
Cc: Arve Hjønnevåg
---
fs/file.c | 1 +
1 file changed, 1 insertion
The Android binder driver will be turned into a module. Since it uses
put_files_struct() we need to export this function.
Signed-off-by: Christian Brauner
Cc: Todd Kjos
Cc: Robert Love
Cc: Ben Hutching
Cc: Martijn Coenen
Cc: Arve Hjønnevåg
---
fs/file.c | 1 +
1 file changed, 1 insertion
binder seems like a reasonable user of these functions.
I don't expect this patch to be mergeable but rather to kick-off a
discussion if we can either simply export them as they are or how we can
get supportable exports that allow access to struct files_struct.
Thanks!
Christian
Christian Br
The Android binder driver will be turned into a module. Since it uses
get_files_struct() we need to export this function.
Signed-off-by: Christian Brauner
Cc: Todd Kjos
Cc: Robert Love
Cc: Ben Hutching
Cc: Martijn Coenen
Cc: Arve Hjønnevåg
---
fs/file.c | 1 +
1 file changed, 1 insertion
The Android binder driver will be turned into a module. Since it
uses __fd_install() we need to export this function.
Signed-off-by: Christian Brauner
Cc: Todd Kjos
Cc: Robert Love
Cc: Ben Hutching
Cc: Martijn Coenen
Cc: Arve Hjønnevåg
---
fs/file.c | 1 +
1 file changed, 1 insertion
On Mon, Jul 30, 2018 at 09:34:52AM -0700, Christoph Hellwig wrote:
> On Mon, Jul 30, 2018 at 04:37:06PM +0200, Christian Brauner wrote:
> > Hey,
> >
> > We currently plan on turning the Android binder and ashmem driver into a
> > module. We have seen more and more requ
On Mon, Jul 30, 2018 at 01:19:47PM -0700, Matthew Wilcox wrote:
> On Mon, Jul 30, 2018 at 10:12:24PM +0200, Christian Brauner wrote:
> > > I don't expect this patch to be mergeable but rather to kick-off a
> > > discussion if we can either simply export them as they a
On Wed, Jun 13, 2018 at 05:07:02PM +0200, Christian Brauner wrote:
> On Wed, Jun 13, 2018 at 04:24:54PM +0200, Greg KH wrote:
> > On Wed, Jun 13, 2018 at 04:06:25PM +0200, Christian Brauner wrote:
> > > On Fri, May 25, 2018 at 02:48:19PM +0200, Christian Brauner wrote:
>
On Tue, Jul 31, 2018 at 10:44:33AM +0200, Martijn Coenen wrote:
> On Mon, Jul 30, 2018 at 10:36 PM, Matthew Wilcox wrote:
> > I'm not entirely sure I understand the binder code (... does anyone?)
> > but from what I can see, it intends to open a file descriptor in the
> > process which is the targ
On Wed, Jun 13, 2018 at 10:45:37AM -0500, Serge Hallyn wrote:
> On Thu, Jun 07, 2018 at 01:43:48PM +0200, Christian Brauner wrote:
> > When running in a container with a user namespace, if you call getxattr
> > with name = "system.posix_acl_access" and size % 8 != 4, t
Hi,
Based on the previous discussion this enables passing a IFLA_IF_NETNSID
property along with RTM_SETLINK and RTM_DELLINK requests. The patch for
RTM_NEWLINK will be sent out in a separate patch since there are more
corner-cases to think about.
Best,
Christian
Christian Brauner (3
retrieval for
RTM_* requests that already support IFLA_NET_NS_{FD,PID} but get extended
to IFLA_IF_NETNSID. To perserve backwards compatibility the helpers look
for IFLA_NET_NS_{FD,PID} properties first before checking for
IFLA_IF_NETNSID.
Signed-off-by: Christian Brauner
---
net/core/rtnetlink.c
: Christian Brauner
---
net/core/rtnetlink.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 54134187485b..a4d4409685e3 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2546,9 +2546,6 @@ static int rtnl_setlink(struct sk_buff
. Userpace should then fallback to other means.
- Security:
Callers must have CAP_NET_ADMIN in the owning user namespace of the
target network namespace.
Signed-off-by: Christian Brauner
---
net/core/rtnetlink.c | 40 +---
1 file changed, 29 insertions(+), 11
. Userpace should then fallback to other means.
- Security:
Callers must have CAP_NET_ADMIN in the owning user namespace of the
target network namespace.
Signed-off-by: Christian Brauner
---
Changelog 2018-01-24:
* Preserve old behavior and report -ENODEV when either ifindex or ifname is
provided
old behavior and report -ENODEV when either ifindex or ifname is
provided and IFLA_GROUP is set. Spotted by Wolfgang Bumiller.
Christian Brauner (3):
rtnetlink: enable IFLA_IF_NETNSID in do_setlink()
rtnetlink: enable IFLA_IF_NETNSID for RTM_SETLINK
rtnetlink: enable IFLA_IF_NETNSID for
: Christian Brauner
---
net/core/rtnetlink.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 54134187485b..a4d4409685e3 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2546,9 +2546,6 @@ static int rtnl_setlink(struct sk_buff
retrieval for
RTM_* requests that already support IFLA_NET_NS_{FD,PID} but get extended
to IFLA_IF_NETNSID. To perserve backwards compatibility the helpers look
for IFLA_NET_NS_{FD,PID} properties first before checking for
IFLA_IF_NETNSID.
Signed-off-by: Christian Brauner
---
net/core/rtnetlink.c
On Wed, Jan 24, 2018 at 03:26:31PM +0100, Christian Brauner wrote:
> Hi,
>
> Based on the previous discussion this enables passing a IFLA_IF_NETNSID
> property along with RTM_SETLINK and RTM_DELLINK requests. The patch for
> RTM_NEWLINK will be sent out in a separate patch since
On Wed, Jan 31, 2018 at 12:13:11AM +0800, kbuild test robot wrote:
> Hi Christian,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on net-next/master]
>
> url:
> https://github.com/0day-ci/linux/commits/Christian-Brauner/rtnetlin
On Wed, Jan 31, 2018 at 10:30:44AM -0500, David Miller wrote:
> From: Christian Brauner
> Date: Mon, 29 Jan 2018 18:07:20 +0100
>
> > - Backwards Compatibility:
> > If userspace wants to determine whether RTM_NEWLINK supports the
> > IFLA_IF_NETNSID propert
On Wed, Jan 31, 2018 at 08:03:00AM +0100, Dominik Brodowski wrote:
> On Tue, Jan 30, 2018 at 02:39:45PM -0800, tip-bot for Tim Chen wrote:
> > Commit-ID: 18bf3c3ea8ece8f03b6fc58508f2dfd23c7711c7
> > Gitweb:
> > https://git.kernel.org/tip/18bf3c3ea8ece8f03b6fc58508f2dfd23c7711c7
> > Author:
RTM_NEWLINK supports the IFLA_IF_NETNSID property since
5bb8ed075428b71492734af66230aa0c07fcc515 so we should not error out
when it is passed.
Signed-off-by: Christian Brauner
---
net/core/rtnetlink.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/core/rtnetlink.c b/net/core
o if I missed a very
obvious point why this wasn't possible so far, I'm sorry.
Christian
Christian Brauner (1):
rtnetlink: request RTM_GETLINK by pid or fd
net/core/rtnetlink.c | 63 +---
1 file changed, 50 insertions(+), 13 deletions(-)
--
2.14.1
userspace
set the IFLA_NET_NS_{FD,PID} property to identify a target network
namespace where the device in question is to be queried.
Signed-off-by: Christian Brauner
---
net/core/rtnetlink.c | 63 +---
1 file changed, 50 insertions(+), 13 deletions
On Thu, Jan 18, 2018 at 09:29:14PM +0100, Jiri Benc wrote:
> On Thu, 18 Jan 2018 21:21:24 +0100, Christian Brauner wrote:
> > In such scenarios setting a netns id property is
> > not really wanted
>
> Why? I think that's what you should do if you want to avoid setns. J
On Mon, Jan 22, 2018 at 10:00:46PM +0100, Jiri Benc wrote:
> On Thu, 18 Jan 2018 21:55:53 +0100, Christian Brauner wrote:
> > A more concrete scenario is creating a network namespace, moving a
> > device into it via RTM_SETLINK which also supports IFLA_NET_NS_{FD,PID}
> > and
On Mon, Jan 22, 2018 at 11:06:16PM +0100, Jiri Benc wrote:
> On Mon, 22 Jan 2018 22:23:54 +0100, Christian Brauner wrote:
> > That is certainly a good idea and I'm happy to send a follow-up patch
> > for that!
>
> Note that I haven't looked into that and I do
. Userpace should then fallback to other means.
- Security:
Callers must have CAP_NET_ADMIN in the owning user namespace of the
target network namespace.
Signed-off-by: Christian Brauner
---
net/core/rtnetlink.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/core
Hi,
Based on the previous discussion this enables passing a IFLA_IF_NETNSID
property along with RTM_NEWLINK requests. The latter patch was missing from my
previous series to allow for some more time to test this.
Best,
Christian
Christian Brauner (1):
rtnetlink: enable IFLA_IF_NETNSID for
On Mon, Jan 29, 2018 at 11:31:57AM -0500, David Miller wrote:
> From: Christian Brauner
> Date: Wed, 24 Jan 2018 15:26:31 +0100
>
> > Based on the previous discussion this enables passing a IFLA_IF_NETNSID
> > property along with RTM_SETLINK and RTM_DELLINK re
On Fri, Mar 09, 2018 at 10:37:34AM -0800, Linus Torvalds wrote:
> Hmm. This hunk annoys me and makes me go "Whaa?":
>
> On Fri, Mar 9, 2018 at 2:57 AM, Christian Brauner
> wrote:
> > @@ -163,6 +159,26 @@ struct vfsmount *devpts_mntget(struct file *filp,
Hoist the check whether we have already found a suitable devpts filesystem
out of devpts_ptmx_path() in preparation for the devpts bind-mount
resolution patch. This is a non-functional change.
Signed-off-by: Christian Brauner
---
ChangeLog v1->v2:
* patch added
ChangeLog v0->v1:
* pat
This adds a simple test to check whether /proc//fd/ symlinks are
correctly pointing to /dev/pts/ devices when attached to a terminal.
Signed-off-by: Christian Brauner
---
ChangeLog v1->v2:
* patch added
ChangeLog v0->v1:
* patch not present
---
tools/testing/selftests/Ma
es a libc that uses TIOCGPTPEER in
its openpty() implementation:
unshare --mount
mount --bind /dev/pts/ptmx /dev/ptmx
chmod 666 /dev/ptmx
script
ls -al /proc/self/fd/0
with output:
lrwx-- 1 chb chb 64 Mar 7 16:41 /proc/self/fd/0 -> /
Christian Brauner (3):
devpts: hoist out check
pts/ptmx /dev/ptmx
chmod 666 /dev/ptmx
script
ls -al /proc/self/fd/0
with output:
lrwx-- 1 chb chb 64 Mar 7 16:41 /proc/self/fd/0 -> /
Signed-off-by: Christian Brauner
Suggested-by: Eric Biederman
Suggested-by: Linus Torvalds
---
ChangeLog v1->v2:
* move removal of if (path->m
On Sun, Mar 11, 2018 at 02:46:26PM -0700, Linus Torvalds wrote:
> On Sun, Mar 11, 2018 at 2:05 PM, Christian Brauner
> wrote:
> >
> > This is the second iteration of this patch.
>
> This looks good to me. Just wondering how this should be merged, and
> whether we shou
This adds a simple test to check whether /proc//fd/ symlinks are
correctly pointing to /dev/pts/ devices when attached to a terminal.
Signed-off-by: Christian Brauner
---
ChangeLog v2->v3:
* extend test for non-standard devpts mounts such as
mount -t devpts e devpts /mnt
ChangeLog v1-
Hoist the check whether we have already found a suitable devpts filesystem
out of devpts_ptmx_path() in preparation for the devpts bind-mount
resolution patch. This is a non-functional change.
Signed-off-by: Christian Brauner
---
ChangeLog v2->v3:
* patch unchanged
ChangeLog v1->v2:
*
ty() implementation:
unshare --mount
mount --bind /dev/pts/ptmx /dev/ptmx
chmod 666 /dev/ptmx
script
ls -al /proc/self/fd/0
with output:
lrwx-- 1 chb chb 64 Mar 7 16:41 /proc/self/fd/0 -> /
Signed-off-by: Christian Brauner
Suggested-by: Eric Biederman
Suggested-by: Linus Torvalds
--
account
for this.
Here's a little reproducer that presupposes a libc that uses TIOCGPTPEER in
its openpty() implementation:
unshare --mount
mount --bind /dev/pts/ptmx /dev/ptmx
chmod 666 /dev/ptmx
script
ls -al /proc/self/fd/0
with output:
lrwx-- 1 chb chb 64 Mar 7 16:41 /proc/self/fd/
On Mon, Mar 12, 2018 at 02:52:53PM -0500, Eric W. Biederman wrote:
> Christian Brauner writes:
>
> > Most libcs will still look at /dev/ptmx when opening the master fd of a pty
> > device. When /dev/ptmx is a bind-mount of /dev/pts/ptmx and the TIOCGPTPEER
> > ioctl() is
bc that uses TIOCGPTPEER in
its openpty() implementation:
unshare --mount
mount --bind /dev/pts/ptmx /dev/ptmx
chmod 666 /dev/ptmx
script
ls -al /proc/self/fd/0
with output:
lrwx-- 1 chb chb 64 Mar 7 16:41 /proc/self/fd/0 -> /
Christian Brauner (3):
devpts: hoist out check for DEVPTS_S
This adds tests to check:
- bind-mounts from /dev/pts/ptmx to /dev/ptmx work
- non-standard mounts of devpts work
- bind-mounts of /dev/pts/ptmx to locations that do not resolve to a valid
slave pty path under the originating devpts mount fail
Signed-off-by: Christian Brauner
---
ChangeLog v3
ty() implementation:
unshare --mount
mount --bind /dev/pts/ptmx /dev/ptmx
chmod 666 /dev/ptmx
script
ls -al /proc/self/fd/0
with output:
lrwx-- 1 chb chb 64 Mar 7 16:41 /proc/self/fd/0 -> /
Signed-off-by: Christian Brauner
Suggested-by: Eric Biederman
Suggested-by: Linus Torvalds
---
C
Hoist the check whether we have already found a suitable devpts filesystem
out of devpts_ptmx_path() in preparation for the devpts bind-mount
resolution patch. This is a non-functional change.
Signed-off-by: Christian Brauner
---
ChangeLog v3->v4:
* patch unchanged
ChangeLog v2->v3:
*
Hey,
We discovered a potential bug in the devpts implementation via
TIOCGPTPEER ioctl()s today. We've tackled a similar problem already in:
commit 311fc65c9fb9c966bca8e6f3ff8132ce57344ab9
Author: Eric W. Biederman
Date: Thu Aug 24 15:13:29 2017 -0500
pty: Repair TIOCGPTPEER
Most libcs wi
On Thu, Apr 05, 2018 at 07:45:15PM +0200, Christian Brauner wrote:
> On Thu, Apr 05, 2018 at 09:28:56AM -0700, Linus Torvalds wrote:
> > On Thu, Apr 5, 2018 at 3:51 AM, Christian Brauner
> > wrote:
> > >
> > > This series adds:
> > > - follow_up_bind
On Thu, Apr 05, 2018 at 10:59:49PM -0500, Eric W. Biederman wrote:
> Christian Brauner writes:
>
> > On Thu, Apr 05, 2018 at 05:26:59PM +0300, Kirill Tkhai wrote:
> >> On 05.04.2018 17:07, Christian Brauner wrote:
> >> > On Thu, Apr 05, 2018 at 04:01:03PM +030
On Fri, Apr 06, 2018 at 09:45:41AM -0500, Eric W. Biederman wrote:
> Christian Brauner writes:
>
> > On Thu, Apr 05, 2018 at 10:59:49PM -0500, Eric W. Biederman wrote:
> >> Christian Brauner writes:
> >>
> >> > On Thu, Apr 05, 2018 at 05:26:59PM +0300,
On Tue, Apr 10, 2018 at 10:04:46AM -0500, Eric W. Biederman wrote:
> Christian Brauner writes:
>
> > On Mon, Apr 09, 2018 at 06:21:31PM -0500, Eric W. Biederman wrote:
> >> Christian Brauner writes:
> >>
> >> > On Thu, Apr 05, 2018 at
On Wed, Apr 11, 2018 at 11:40:14AM -0500, Eric W. Biederman wrote:
> Christian Brauner writes:
>
> > On Tue, Apr 10, 2018 at 10:04:46AM -0500, Eric W. Biederman wrote:
> >> Christian Brauner writes:
> >>
> >> > On Mon, Apr 09, 2018 at
On Wed, Apr 11, 2018 at 01:37:18PM -0500, Eric W. Biederman wrote:
> Christian Brauner writes:
>
> > On Wed, Apr 11, 2018 at 11:40:14AM -0500, Eric W. Biederman wrote:
> >> Christian Brauner writes:
> >> > Yeah, agreed.
> >> > But I think the pa
On Wed, Apr 11, 2018 at 02:16:23PM -0500, Eric W. Biederman wrote:
> Christian Brauner writes:
>
> > On Wed, Apr 11, 2018 at 01:37:18PM -0500, Eric W. Biederman wrote:
> >> Christian Brauner writes:
> >>
> >> > On Wed, Apr 11, 2018 at
On Thu, Apr 05, 2018 at 10:59:49PM -0500, Eric W. Biederman wrote:
> Christian Brauner writes:
>
> > On Thu, Apr 05, 2018 at 05:26:59PM +0300, Kirill Tkhai wrote:
> >> On 05.04.2018 17:07, Christian Brauner wrote:
> >> > On Thu, Apr 05, 2018 at 04:01:03PM +030
On Tue, Apr 10, 2018 at 04:20:44PM +1000, Michael Ellerman wrote:
> Hi Christian,
>
> Christian Brauner writes:
> > diff --git a/tools/testing/selftests/Makefile
> > b/tools/testing/selftests/Makefile
> > index 7442dfb73b7f..dbda89c9d9b9 100644
> > --- a
On Tue, Apr 10, 2018 at 07:34:36PM +1000, Michael Ellerman wrote:
> Christian Brauner writes:
> > On Tue, Apr 10, 2018 at 04:20:44PM +1000, Michael Ellerman wrote:
> >> Christian Brauner writes:
> >> > diff --git a/tools/testing/selftests/Makefile
> >&g
rule.
>
> Fixes: ce290a19609d ("selftests: add devpts selftests")
> Signed-off-by: Michael Ellerman
I'm not sure if I should've made it to be built given that it wasn't
before but it probably doesn't hurt. It's either that or remove it I
guess.
Acked-by
On Mon, Apr 09, 2018 at 06:21:31PM -0500, Eric W. Biederman wrote:
> Christian Brauner writes:
>
> > On Thu, Apr 05, 2018 at 10:59:49PM -0500, Eric W. Biederman wrote:
> >> Christian Brauner writes:
> >>
> >> > On Thu, Apr 05, 2018 at 05:26:59PM +0300,
On Wed, Mar 07, 2018 at 11:44:35AM -0800, Linus Torvalds wrote:
> On Wed, Mar 7, 2018 at 8:17 AM, Christian Brauner
> wrote:
> >
> > unshare --mount
> > mount --bind /dev/pts/ptmx /dev/ptmx
> > chmod 666 /dev/ptmx
>
> Oh. Why are you using a bind mount in th
On Wed, Mar 07, 2018 at 01:30:52PM -0600, Eric W. Biederman wrote:
> Christian Brauner writes:
>
> > Hey,
> >
> > We discovered a potential bug in the devpts implementation via
> > TIOCGPTPEER ioctl()s today. We've tackled a similar
On Thu, Mar 08, 2018 at 09:22:29AM +0100, Christian Brauner wrote:
> On Wed, Mar 07, 2018 at 01:30:52PM -0600, Eric W. Biederman wrote:
> > Christian Brauner writes:
> >
> > > Hey,
> > >
> > > We discovered a potential bug in the devpts implementation v
supposes a libc that uses TIOCGPTPEER in its
openpty() implementation:
unshare --mount
mount --bind /dev/pts/ptmx /dev/ptmx
chmod 666 /dev/ptmx
script
ls -al /proc/self/fd/0
with output:
lrwx-- 1 chb chb 64 Mar 7 16:41 /proc/self/fd/0 -> /
Signed-off-by: Christian Brauner
Sugge
--- 1 chb chb 64 Mar 7 16:41 /proc/self/fd/0 -> /
Signed-off-by: Christian Brauner
Suggested-by: Eric Biederman
Suggested-by: Linus Torvalds
---
ChangeLog v0->v1:
- remove
/* Has the devpts filesystem already been found? */
if (path->mnt->mnt_sb->s_magic == DEV
--- 1 chb chb 64 Mar 7 16:41 /proc/self/fd/0 -> /
Signed-off-by: Christian Brauner
Suggested-by: Eric Biederman
Suggested-by: Linus Torvalds
---
ChangeLog v0->v1:
- remove
/* Has the devpts filesystem already been found? */
if (path->mnt->mnt_sb->s_magic == DEV
dev/pts/ptmx
bind-mounts to /dev/ptmx and non-standard devpts mounts such as
mount -t devpts devpts /mnt
ChangeLog v1->v2:
* see individual patches
ChangeLog v0->v1:
* see individual patches
Christian Brauner (4):
devpts: hoist out check for DEVPTS_SUPER_MAGIC
devpts: resolve d
This adds tests to check:
- bind-mounts from /dev/pts/ptmx to /dev/ptmx work
- non-standard mounts of devpts work
- bind-mounts of /dev/pts/ptmx to locations that do not resolve to a valid
slave pty path under the originating devpts mount fail
Signed-off-by: Christian Brauner
---
ChangeLog v4
ices located outside the devpts mount without a
common ancestor directory:
mount -t devpts devpts /dev/pts
mount --bind /dev/pts/ptmx /ptmx
master = open("/ptmx", ...);
slave = ioctl(master, TIOCGPTPEER, ...);
in which case save path generation cannot be guaranteed.
Signed-off-by
Hoist the check whether we have already found a suitable devpts filesystem
out of devpts_ptmx_path() in preparation for the devpts bind-mount
resolution patch. This is a non-functional change.
Signed-off-by: Christian Brauner
---
ChangeLog v4->v5:
* dput() dentry
ChangeLog v3->v4:
*
1 - 100 of 1946 matches
Mail list logo