-
gitomat
[illumos-gate] 16649 SATL support for REPORT SUPPORTED OPERATION CODES -- Jason King <jason.brian.king⊙gc>
-
paulf
Other than open are there any syscalls that return a file descriptor?
-
paulf
I see open, open64 and openat
-
alanc
also socket, pipe, dup2, dup3, and the equivalent fcntl() calls
-
alanc
oh, and dup()
-
paulf
thanks, I was getting to dup and pipe, might have missed fcntl
-
alanc
on Solaris & illumos, the dup*() functions in libc actually call the fcntl system call, they don't have their own entry points to the kernel
-
alanc
-
richlowe
door_create()?
-
sommerfeld
paulf: there are a number of ways to pass file descriptors over ipc. AF_UNIX lets you pass SCM_RIGHTS ancillary data (see socket.h(3HEAD))
-
sommerfeld
door_call() can pass descriptors as well.
-
sommerfeld
(and close them in the sending process, too!)
-
sommerfeld
(door_call can both send and receive descriptors; the server callback when a door is invoked can receive a descriptor, and door_return can send one and possibly close it)
-
paulf
I just want syscalls that return new file descriptors, at the syscall level
-
richlowe
then yes, door_create
-
sommerfeld
paulf: new in what sense? new to this process or new to the system?
-
richlowe
sommerfeld: if I recall, paulf works on valgrind so probably new to the process
-
paulf
sommerfeld new to the process
-
richlowe
and questions grittier than usual userland software
-
sommerfeld
in that case you need to be aware of the descriptor-passing syscalls
-
sommerfeld
because they can cause a descriptor to materialize in the process from outside.
-
paulf
richlowe yes this is for Valgrind, a new feature that checks that closed fds aren't being used inadvertently via a close then an open
-
alanc
oh, I forgot socketpair() in the list too
-
paulf
This feature is only a couple of days old, I don't think that we cover pipe and socketpair yet
-
paulf
thanks for the input, need to do the same for FreeBSD now
-
danmcd
@paulf I don't know your background but remember the spectrum of OS interface boundaries, and whether or not they need distros:
-
danmcd
-
danmcd
The illumos (and Solaris) interface boundary for programs is libc & friends, NOT the kernel syscall boundary.
-
richlowe
valgrind is special, and knows the problems
-
danmcd
I don't know FreeBSD's official stance per se.
-
paulf
danmcd we need to intercept all syscalls
-
paulf
as far as I know the FreeBSD interface is stable
-
danmcd
Very good!
-
alanc
right, I'd class valgrind with truss & dtrace in needing to know the underlying implementation, not just the stable API for programs to call
-
danmcd
Okay, I'm clearly missing the problem, and I take it you're from-or-working-with valgrind paulf -- sorry for muddying waters.
-
paulf
no worry
-
paulf
Valgrind 3.25 should be out soon, Illumos support should be a lot better
-
paulf
I haven't done as much for Solaris,I tried last week and there are some issues with reading ELF .data sections
-
paulf
I have one issue with Helgrind I wantr to fix, not sure that I'll have time before 3.25 is out
-
danmcd
WOW! THANK YOU VERY MUCH!
-
paulf
time for bed
-
danmcd
@andyf silly question: "go away" is an acceptable answer, and I expect it to be "not really, Dan"
-
danmcd
The new MDB enhancements for $C/::stack ==> would those be easily usable by pstack(1) ?
-
richlowe
oh that does remind me, andyf: You were going to email me diffs I think?
-
rmustacc
Not quite yet, but we talked about it.
-
andyf
I think at least the noreturn function handling should also be added to pstack, and at the same time the new heuristic functions for that should be moved somewhere common so they can be used in libproc as well as kmdb.
-
andyf
I haven't put much thought into adding the types to pstack output yet.
-
andyf
richlowe - ah yes, I'll email you what I have for the aarch64 heuristic function.
-
andyf
-
richlowe
thanks