| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
came out of a discussion regarding "sort foo -o foo".
ok semarie
|
|
|
|
| |
ok kettenis@ miod@
|
|
|
|
|
|
| |
"stdio rpath" this would fail to execve. pre-indicate exec actions to the
namei checker to allow them through.
ok semarie
|
|
|
|
|
|
| |
strict than anticipated. It allows a programmer to pledge/promise/covenant
that their program will operate within an easily defined subset of the
Unix environment, or it pays the price.
|
| |
|
|
|
|
|
|
| |
strict than anticipated. It allows a programmer to pledge/promise/covenant
that their program will operate within an easily defined subset of the
Unix environment, or it pays the price.
|
|
|
|
|
|
| |
This will be used by a few daemons. If they lack this feature, then
they would need to operate without tame.
Discussed with renato
|
|
|
|
|
|
|
|
|
| |
the flowid roughly identifies a flow or connection that the mbuf
is a part of, and can be used instead of hashing contents of the
packet (like src+dst mac and ip addresses) to decide which path a
packet should take.
ok mpi@ mikeb@ sthen@
|
|
|
|
|
|
|
|
| |
new tame "route" request. Now routing daemons and tools (such as arp),
can narrowly ask for either feature. One thing remains available in
both cases -- support for getifaddr()'s, since libc and programs often
use that in close association with socket creation.
ok benno sthen beck, some discussion with renato
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The routing table is not an optional component of the network stack
and initializing it inside the "routing domain" requires some ugly
introspection in the domain interface.
This put the rtable* layer at the same level of the if* level. These
two subsystem are organized around the two global data structure used
in the network stack:
- the global &ifnet list, to be used in process context only, and
- the routing table which can be read in interrupt context.
This change makes the rtable_* layer domain-aware and extends the
"struct domain" such that INET, INET6 and MPLS can specify the length
of the binary key used in lookups. This allows us to keep, or move
towards, AF-free route and rtable layers.
While here stop the madness and pass the size of the maximum key length
in *byte* to rn_inithead0().
ok claudio@, mikeb@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"exec" to call execve(2), potentially fork(2) beforehands if they
asked for "proc". Calling execve is what "shells" (ksh, tmux, etc)
have as their primary purpose. But meantime, if such a shell has a
nasty bug, we want to mitigate the process from opening a socket or
calling 100+ other system calls. Unfortunately silver bullets are in
short supply, so if our goal is to stay in a POSIX-y environment, we
have to let shells call execve(). POSIX ate the world, so choices do
we all have?
Warning for many: silver bullets are even more rare in other OS
ecosystems, so please accept this as a narrow lowering of the bar in a
very raised environment.
Commited from a machine running tame "proc exec" ksh, make, etc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TIOCSBRK, TIOCCDTR, TIOCSETA, TIOCSETAW, and TIOCSETAF on tty
vnodes. This helps programs which call tcsetattr(), tcgetattr(), or
readpassphrase(). Especially the latter - tame's goal is to satisfy
the libc requirements of security-sensitive programs.
Remove TIOCSETAF from the basic "ioctl" request, because it is a "set"
option. "ioctl" is slowly turning into a "request information, cannot
set options" package.
Split the "cmsg" request into "sendfd" and "recvfd". Non-SCM_RIGHTS
messages are currently flowing through freely and we'll need to think
about that. This split lets us more strictly describe what our many
fd-passing programs will do.
|
|
|
|
|
|
| |
mbuf blob with all the cmsgs inside while on send cmsgs in an mbuf chain,
one mbuf per message. Adjust the calls accordingly.
Putting it in so deraadt@ can move forward.
|
|
|
|
| |
ok deraadt@
|
| |
|
|
|
|
| |
ok tedu@ deraadt@
|
|
|
|
|
|
|
|
|
|
|
| |
- by default, a tamed-program don't have the possibility to use PROT_EXEC for
mmap(2) or mprotect(2)
- for that, use the request "prot_exec" (that could be dropped later)
initial idea from deraadt@ and kettenis@
"make complete sense" beck@
ok deraadt@
|
|
|
|
| |
ok guenther tedu
|
| |
|
|
|
|
|
|
|
| |
available to other areas of the kernel suffering from an overburden
of buf tweaking to read a disk sector.
ok mpi@
|
| |
|
|
|
|
| |
i thought id committed this at l2k15. sorry for the delay.
|
| |
|
| |
|
|
|
|
|
| |
It's a helper function for readdoslabel(). Not something called
outside of subr_disk.c.
|
|
|
|
|
|
|
| |
really want it to do. Handle all the actual disklabel reading in
readdoslabel(). Makes the code much simpler to understand.
ok deraadt@
|
|
|
|
|
|
|
|
| |
the sense that it guarantees that the specified CPU went through the
scheduler. This also guarantees that interrupt handlers running on that CPU
will have finished when sched_barrier() returns.
ok miod@, guenther@
|
| |
|
|
|
|
|
| |
include param.h/systm.h/proc.h themselves (and already do).
ok guenther
|
|
|
|
|
|
| |
over the tree.
much encouragement from l2k15
|
|
|
|
| |
sleep_setup/sleep_finish.
|
|
|
|
| |
refcnt(9) can be used.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
its basically atomic inc/dec, but it includes magical sleep code
in refcnt_finalise that is better written once than many times.
refcnt_finalise sleeps until all references are released and does
so with sleep_setup and sleep_finalize, which is fairly subtle.
putting this in now so i we can get on with work in the stack, a
proper discussion about visibility and how available intrinsics
should be in the kernel can happen after next week.
with help from guenther@
ok guenther@ deraadt@ mpi@
|
|
|
|
|
|
| |
layer because the strings select the right options. Mechanical
conversion.
ok guenther
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes numbers of the SIOCSIFMEDIA and SIOCGIFMEDIA ioctls and
grows struct ifmediareq.
Old ifconfig and dhclient binaries can still assign addresses, however
the 'media' subcommand stops working. Recompiling ifconfig and dhclient
with new headers before a reboot should not be necessary unless in very
special circumstances where non-default media settings must be used to
get link and console access is not available.
There may be some MD fallout but that will be cleared up later.
ok deraadt miod
with help and suggestions from several sharks attending l2k15
|
|
|
|
| |
ok deraadt@ miod@
|
|
|
|
|
|
|
|
|
| |
without proper device trees.
Be sure to build and install config(8) and rerun it before attempting to build
a kernel.
ok kettenis@ deraadt@ jasper@ visa@
|
|
|
|
|
|
| |
Needed for libinput port.
ok guenther@, miod@
|
|
|
|
|
|
|
|
|
|
| |
accidentally capture disks ...
Eliminate kernel option GPT and associated #ifdef GPT/#endif. Let
everybody get on the GPT bandwagon and we'll see what wheels fly
off.
Requested by & ok deraadt@
|
| |
|
|
|
|
|
|
|
|
| |
which results in tame() code placements being much more recognizeable.
tame() can be moved to unistd.h and does not need cpp symbols to turn the
bits on and off. The resulting API is a bit unexpected, but simplifies the
mapping to enabling bits in the kernel substantially.
vague ok's from various including guenther doug semarie
|
|
|
|
|
|
|
| |
this allows us to build lists of things that can be followed by
multiple cpus.
ok mpi@ claudio@
|
|
|
|
|
|
|
|
| |
* pool_allocator_single: single page allocator, always interrupt safe
* pool_allocator_multi: multi-page allocator, interrupt safe
* pool_allocator_multi_ni: multi-page allocator, not interrupt-safe
ok deraadt@, dlg@
|
|
|
|
|
|
|
| |
and doing VOP_WRITE() from inside tsleep/msleep makes the locking too
complicated, making it harder to move forward on MP changes.
ok deraadt@ kettenis@
|
|
|
|
|
|
|
|
| |
for upcoming CompCert port.
Final version of the diff is from kettenis@ with input from jsg@ and tedu@.
ok kettenis@, jsg@, "I agree" millert@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
length of the key as argument.
This way every consumer of the radix tree has a chance to explicitly
initialize the shared data structures and no longer rely on another
subsystem to do the initialization.
As a bonus ``dom_maxrtkey'' is no longer used an die.
ART kernels should now be fully usable because pf(4) and IPSEC properly
initialized the radix tree.
ok chris@, reyk@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hazard pointers were becoming corrupt and therefore panics.
the problem turned out to be that bridge_input calls if_input on
behalf of a hardware interface which then calls bpf_mtap at splsoftnet,
while the actual hardware nic calls if_input and bpf_mtap at splnet.
the hardware interrupts ran in the middle of the bpf calls bridge
runs at softnet. this means the same srps are being entered and
left on the same cpu at different ipls, which led to races because
of the order of operations on the per cpu hazard pointers.
after a lot of experimentation, jmatthew@ figured out how to deal
with this problem without introducing per cpu critical sections
(ie, splhigh) calls in srp_enter and srp_leave, and without introducing
atomic operations.
the solution is to iterate forward through the array of hazard
pointers in srp_enter, and backward in srp_leave to clear. if you
guarantee that you leave srps in the reverse order to entering them,
then you can use the same set of SRPs at different IPLs on the same
CPU.
the ordering requirement is a problem if we want to build linked
data structures out of srps because you need to hold a ref to the
current element containing the next srp to use it, before giving
up the current ref. we're adding srp_follow() to support taking the
next ref and giving up the current one while preserving the structure
of the hazard pointer list. srp_follow() does this by reusing the
hazard pointer for the current reference for the next ref.
both mattieu baptiste and jmatthew@ have been hitting this pretty
hard with a tweaked version of srp+bpf that uses srp_follow instead
of interleaved srp_enter/srp_leave sequences. neither can reproduce
the panics anymore.
thanks to mattieu for the report and tests
ok jmatthew@
|
|
|
|
|
|
|
| |
As a side effect there's no need to run if_attachdomain() after the
list of domains has been built.
ok claudio@, reyk@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
{Free,Net}BSD
- when a socket is closed with fds in its input, defer closing them to
a task to avoid recursing. This eliminates the complicated extra
reference taking which had a 37 line(!) comment explanation
- move flags, counts, and links only needed for this from struct file to
struct unpcb
- document the flow of the mark/sweep collector
much help from claudio@ who made me explain the GC to him until we trusted it
ok claudio@ mpi@ deraadt@
|