Age | Commit message (Collapse) | Author |
|
when opening /dev/fd/* (i.e., UF_EXCLOSE is now set iff O_CLOEXEC is
set, rather than copying UF_EXCLOSE from the file descriptor being
dup'd).
Also, add support for O_CLOEXEC and O_DIRECTORY to fhopen().
ok krw, guenther; feedback from millert; testing and bug finding by krw
|
|
was used by the now defunct portalfs. Zero out fd_ofileflags[fd]
when allocating an fd instead of when releasing it.
ok krw@ matthew@
|
|
also no need to protect that and the setting of the AFORK accounting flag
with the scheduler lock.
ok mikeb@
|
|
getpeername() to return the untruncated address length in *addrlen
instead of the number of bytes copied out. This matches POSIX's
requirements and allows userland applications to detect when the
returned address was truncated.
ok guenther
|
|
and buffers; ok guenther
|
|
committed; roll them back.
|
|
at the top of closef() until all in-progress calls finish, just do the
advisory locking bits required of close() by POSIX and let whichever
thread has the last reference do the call to the file's fo_close()
method and the final cleanup.
lots of discussion with deraadt@ and others; worked out with and ok krw@
|
|
the process.
noted and ok markus@
|
|
- Require sun_family to be set to AF_UNIX (also in unp_connect())
- Ensure internal sockaddr_un's always have their length set to
sizeof(struct sockaddr_un) regardless of the user specified length,
implicitly extending with NUL characters as necessary.
- Normalize sun_path to never contain a non-NUL character after a
NUL character.
Lack of NUL termination on truncated sockaddrs issue pointed out by
Michael Kerrisk on the Austin Group mailing list.
ok millert
|
|
the size (internalized ones can be larger on some architectures) for
fitting into the socket. Avoid getting confused by sb_hiwat as well.
This fixes a variety of issues where sendmsg() would fail to deliver
a fd set or fail to wait; even leading to file leakage.
Worked on this with claudio for about a week...
|
|
ok deraadt, miod, guenther
|
|
anticipation of further changes to closef(). No binary change.
ok krw@ miod@ deraadt@
|
|
ok deraadt@
|
|
thread information.
Add a KERN_PROC_SHOW_THREADS flag that has to be set in order to get the
thread info and make it off by default. This creates backwards compatibility
for applications that relied on a given size/number of items to be returned.
Modify ps(1) and top(1) accordingly.
Okay guenther@.
|
|
traced processes to the active thread, otherwise we will deadlock resulting
in an unkillable stopped process.
ok guenther@
|
|
that leaks all the file pointers. Instead make sure that the exit path via
restart: -> out: does not free the uninitialized pointer.
OK deraadt@ guenther@
|
|
|
|
ok deraadt@
|
|
|
|
stop, just like we do for PT_CONTINUE/PT_STEP. The current code isn't
ready for directing signals to other threads yet.
|
|
valid after that. Copy the data into a temp buffer and then copy it back
into the shiny new cluster. Problem found by deraadt@. Ok deraadt@
|
|
exit1() is wrong, since single_thread_check() already decrements it and may
call exit1() after that. I can't reproduce the hang that this was supposed
to fix anyway.
|
|
|
|
losing them.
ok claudio
|
|
It implements a full-stop model where all threads are stopped before handing
over control to the debugger. Events are reported as before through wait(2);
you will have to call ptrace(PT_GET_PROCESS_STATE, ...) to find out which
thread hit the event. Since this changes the size of struct ptrace_state,
you will have to recompile gdb.
ok guenther@
|
|
|
|
selected fd is automatically fd_used(). We need to fd_unused() it,
because it will be fd_used() again in finishdup(). spotted by guenther
ok miod
|
|
This expands the already bloated FILL_KPROC macro to take an extra
parameter that indicates if the callee is a thread or a process.
The userland bits are adjusted accordingly and ps(1) and top(1) now
display per thread usage times when -H is used.
Also pkill(1) had to be adjusted so that duplicates don't pop up.
libkvm does basically the same thing as the kernel bits.
Okay guenther@.
|
|
Unlock missed an 'f', which caused it to unlock the in-use pageqs, rather
than the free pageqs as it was supposed to.
|
|
threads list. Calling TAILQ_NEXT on them is a bad idea and will panic
the kernel. So check the P_WEXIT flag and pretend the thread doesn't
exist if it is set. Also make PT_GET_THREAD_FIRST return the first
thread on the threads list instead of the "main" thread, such that you
can actually keep enumerating the threads in this case.
ok guenther@, miod@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
descriptors the process currently has open.
ok guenther miod gilles ...
|
|
the dup and dup2 cases. with guenther
ok miod
|
|
|
|
ok guenther@
|
|
during CMSG_DATA SCM_RIGHTS fd transfers. If this is exceeded,
return EMFILE.
ok claudio guenther gilles
|
|
compatibility with FreeBSD/NetBSD.
Also rename SIMPLEQ_REMOVE_NEXT to SIMPLEQ_REMOVE_AFTER.
ok mikeb@ guenther@
|
|
to identify ktrace files. kdump(1) will now refuse to operate on
trace data without the start record and as a bonus will print only
PID, unless an -H flag is specified to print PID/TID pairs. Initial
diff, input from and ok deraadt, guenther.
|
|
count processes instead of threads. New sysctl()s KERN_NTHREADS and
KERN_MAXTHREAD count and limit threads. The nprocs and maxproc kernel
variables are replaced by nprocess, maxprocess, nthreads, and maxthread.
ok tedu@ mikeb@
|
|
for the tick that we're already in the middle of.
noted and tested by aja; ok kurt@
|
|
|
|
the 0x55aa signature. Don't try FAT detection if we have found an
OpenBSD MBR partition. Don't try to read a disklabel from 'bare'
FAT media. There can't be one.
Finally, don't allow the writing of a disklabel on 'bare' FAT media.
There is no safe spot for it, and splatting it in the middle of the
FAT structures has not proved helpful.
|
|
ok miod@
|
|
results in bogus total times, as reported by numerous ports people.
ok miod@
|
|
'fattest' to 'mbrtest'. No change to .o.
|