Re: vn_open, EDUPFD, EMOVEFD

2021-06-28 Thread David Holland
On Tue, Jun 29, 2021 at 05:07:10AM -, Christos Zoulas wrote: > >* Does anyone know why dev/kloader.c calls namei and then vn_open on > >the same path? I remember seeing this before and leaving it alone > >because nobody I could find was sure what the deal was, but it's > >unlikely to work

vn_open, EDUPFD, EMOVEFD

2021-06-28 Thread David Holland
A couple days ago it came to my attention that the hack used for cloning devices (returning a magic error code and stuffing a file descriptor number in a magic field of struct lwp) is also used by /dev/stderr, and more importantly, every caller of vn_open in the kernel (there are many) needs to