tech-kern archive

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

Re: Enhance ptyfs to handle multiple instances.



On Fri, Mar 14, 2014 at 1:29 PM, Ilya Zykov <netbsd%izyk.ru@localhost> wrote:
>>
>> | I have few questions about project.
>> | Christos, can I ask you about this?
>> | Please, if anybody has objections or already doing it, tell me know.
>>
>> Nobody is already doing it, and if you have questions, you came to the right
>> place.
>>
>> christos
>>
>
> Ok.
>
> 1. The main problem and question in this project(IMHO), it's how get access 
> for every instance through one driver ptm[x].
>         First version.
> We can do it as well "Linux devpts" do. Inside every ptyfs we can create not 
> only slave side files,
> but ptm[x] too for this instance. But who must create(kernel mount function 
> or userspace helper) and what permissions will assign?
>         One more version.
> We can do many ptm[x] minor numbers(165:0 165:1 for first instance, 165:2 
> 165:3 for second ...) this can be anywhere in fs.
> But then for every mount we must pass for what instance it's mount doing. We 
> can do it with new mount option "instance=#"(for example).
> Every version has advantages and disadvantage. I think first version more 
> clear. What do you think?
>
> 2. Mount without new option "minstance"(for example) must keep old behavior. 
> Is it necessarily?
> Or every new mount will mount new instance?

Looking at Linux, it is a little odd, my system does create a ptmx
inside /dev/pts/ but there are no read or write permissions set, and
everything is actually using the standard /dev/ptmx outside the mount.
So the one inside is not much use. All mounted instances (even for
namespaces, though have been proposals for device namespaces eg see
https://lwn.net/Articles/564854/) are identical, ie have the same
slave devices.

I can see the advantages in the other options, but I think there may
be added complexity, and it might be better to do the first option
unless there are strong use cases for multiple instances. Just having
multiple mounts is useful.

Justin


Home | Main Index | Thread Index | Old Index