Age | Commit message (Collapse) | Author |
|
to avoid possible use-after-free references when swapping ids in threaded
processes. "Do I have the right creds?" checks are always made with the
threads creds.
Inspired by FreeBSD and NetBSD
"right time" deraadt@
|
|
completely detached from the process before letting it exit, so that
sleeping in systrace_exit() doesn't reorder them and lead to a panic.
Panic reported by Fabian Raetz (fabian.raetz (at) gmail.com)
ok tedu@
|
|
Avoid the confusion by using an appropriate name for the variable.
Note that since routing domain IDs are a subset of the set of routing
table IDs, the following idiom is correct:
rtableid = rdomain
But to get the routing domain ID corresponding to a given routing table
ID, you must call rtable_l2(9).
claudio@ likes it, ok mikeb@
|
|
(race condition ?)
problem noticed by me, aja, sthen, brynet, rpe.
vanishing after this revert, okay aja@, sthen@
tedu, you probably want to look into re-checking the fcreate/fpublish addition
first, then if it's stable, see about tweaking doopenat ?
|
|
algorithms to be tested. in the process, drop support for unused B_AGE and
b_synctime options.
previous versions ok beck deraadt
|
|
localhost connections.
The plan is to always use the routing table for addresses and routes
resolutions, so there is no future for an option that wants to bypass
it. This option has never been implemented for IPv6 anyway, so let's
just remove the IPv4 bits that you weren't aware of.
Tested a least by lteo@, guenther@ and chrisz@, ok mikeb@, benno@
|
|
|
|
(then immediately reacquire it). this has the effect of giving interrupts
on other CPUs to a chance to run and reduces latency in many cases.
ok deraadt
|
|
|
|
this license change. We will remember that we all still like beer.
|
|
any context if they feel like it.
ok deraadt@, guenther@
(who both suggested we could probably grab it even earlier)
|
|
struct ucred; struct process then directly links to the ucred
Based on a discussion at c2k10 or so before noting that FreeBSD and
NetBSD did this too.
ok matthew@
|
|
ok dlg@ mpi@ deraadt@
|
|
<uvm/uvm.h> if possible and remove double inclusions.
ok beck@, mlarkin@, deraadt@
|
|
for localhost connections. discussed with deraadt@
|
|
use the routing table there's no future for an option that wants to
bypass it. This option has never been implemented for IPv6 anyway,
so let's just remove the IPv4 bits that you weren't aware of.
Tested by florian@, man pages inputs from jmc@, ok benno@
|
|
This is part of the plan to remove the ifp pointer from the packet
header that will allow us to stop garbage collecting mbuf(9)s when
an ifp is detached/destroyed.
ok mikeb@, lteo@, benno@
|
|
dropping the pcred argument. Fix handling of kill(-1, sig) from a
thread other than the original thread.
ok deraadt@
|
|
Tweak the handling of ktrace EMUL when changing ktracing: only
generate one per process (not one per thread) and pass the correct
proc pointer down to the VFS layer. Permit generating of NAMI and
CSW records inside ktrace(2) itself.
ok deraadt@ millert@
|
|
the inclusion of <dev/systrace.h>
|
|
included there
|
|
struct xucred becomes the structure for syscalls (mount(2) and nfssvc(2)).
ok deraadt@ beck@
|
|
testing help mpi@
|
|
nmea_timeout() is triggered introduced in rev 1.37.
ok sthen@
|
|
ok sthen@
|
|
PG_PMAPMASK as all the possible pmap-specific bits (similar to the other
PG_fooMASK) to make sure MI code does not need to be updated, the next time
more bits are allocated to greedy pmaps.
No functional change, soon to be used by the (greedy) mips64 pmap.
|
|
macro which is unaware that stacks may need larger alignment. This may
mean that some workarounds in crt0 can go away (here's looking at you
mips64..)
Tested on about half the architectures (the most special cases), so let's
see what happens.
with tobiasu
|
|
this hardware alive is becoming increasingly difficult, and I should heed the
message sent by the three disks which have died on me over the last few days.
Noone sane will mourn these ports anyway. So long, and thanks for the fish.
|
|
not in the original thread.
ok matthew@
|
|
pr->ps_mainproc->p_pid to get the PID.
ok matthew@
|
|
"mainbus" device. this breaks when mpath is enabled because it
attaches before mainbus and therefore takes the head position.
have autoconf provide device_mainbus() which looks up mainbus_cd,
and use that instead.
discussed with deraadt who just wants mpath stuff to move forward
despite there being many ways to shine this particular turd.
|
|
namespace, so stop changing behavior when it's #defined
ok beck@ krw@
|
|
the first part is likely to fail, but we can generally prevent the second
part from failing.
use these two functions to drop the fdp lock around vn_open in sys_open,
but still maintain the original semantics of allocate then open.
the goal here is to fix the blocked fifo deadlock in a threaded program.
testing volunteers in short supply, resorting to conscription
|
|
Linux-compat clone() syscall when *not* using CLONE_THREAD. pirofti@
confirms Opera runs in compat without this, so out it goes; one less hair
to choke on in kern_exit.c
ok tedu@ pirofti@
|
|
arithmetic so that PID_MAX can be reached.
ok otto@ zhuk@ miod@
|
|
multi-threaded processes when they receive a signal:
1. Make the parent of the process (the tracer) wait for all threads to be
stopped (in wait4(2)) instead of the thread that received the signal.
This prevents us from calling tsleep(9) recursively.
2. Assume that we already hold the kernel lock if the P_SINTR flag is set
(just like we already assumed we were holding the scheduler lock) and
don't try to grab it again.
This should fix the panic that many people reported when debugging
multi-threaded programs with gdb(1).
ok & lots of help from guenther@
|
|
|
|
lock for PCATCH and ktrace(CSW) handling
ok kettenis@
|
|
hibernate unpack - these were added a while ago when we were fighting
different issues that have now been solved.
Tested by myself and dcoppa on a variety of machines
|
|
microsecond in a 64-bit integer. Fixes the issue where ntpd loses sync
because the struct timeval currently used to hold the adjustment is not
properly normalized after the changes guenther@ made.
ok guenther@, millert@
|
|
a single target of used pages in the cache - so we don't to a ton of work
throwing away pages sporadically while holding the biglock - noticed by dlg.
ok dlg@ deraadt@
|
|
replace the OpenBSD bounds with the A6 MBR partition limits. Thus
preserving any changes the user makes with the 'b' command in
disklabel.
Reported, tested & ok blambert@, ok deraadt@
|
|
leaking values in the padding bytes on LP64. Also, vn_stat() was lacking
the zero-fill to clean its padding.
ok kettenis@ deraadt@ phessler@
|
|
and runtime to the process totals. Also, add ktracing of struct
rusage in wait4() and getrusage().
problem pointed out by tedu@
ok deraadt@
|
|
ok matthew@ phessler@ dlg@
|
|
to guarantee there isn't a window in which you can lose a wakeup. The
exception for tsleep() is when it's just being used to sleep for a period
of time, so permit that too.
ok jsing@ deraadt@
|
|
ok phessler@ deraadt@ jsing@ guenther@
|
|
For now and until 5.5 is cut, also read from current/incorrect spot
so people don't immediately lose their existing disklabels on such
devices.
Problem spotted by David Vasek.
|
|
bcopy() can be memcpy() because target is freshly malloced.
&array[n] is simpler than (char*)array + n*sizeof(array[0])
ok tedu@
|
|
going to copyout one, memset the structure and then set it member by member.
sys_adjtime() does that on copyin instead, as it already has to munge the
members as it goes.
ok deraadt@
|