summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2015-10-13allow getsockopt IP_RECVDSTPORT & IPV6_RECVDSTPORT for an "inet" pledgeTheo de Raadt
2015-10-13Make use of rtisvalid(9) to check if local route entries match existingMartin Pieuchot
configured addressses. ok mikeb@
2015-10-13Simplify arptfree() to no longer look at the route entry's refcounter.Martin Pieuchot
ARP entries with an expired timeout are now removed from the tree even if they are cached somehwere else. This also reduces differences with NDP. ok bluhm@
2015-10-13Use rtisivalid(9) to check if the given (cached) route can be used.Martin Pieuchot
Note that after calling rtalloc(9) we only check if a route has been returned or not and do not check for its validity. This cannot be improved without a massive refactoring. The kernel currently *do* use !RTF_UP route due to a mismatch between the value of ifp->if_link_state and the IFF_UP|IFF_RUNNING code. I'd explain the RTF_UP flag as follow: . If a cached route entry w/o RTF_UP is passed to ip{6,}_output(), . call rtalloc(9) to see if a better entry is present in the tree. This is enough to support MPATH and route cache invalidation. ok bluhm@
2015-10-13Make sure RTF_LOCAL route entries are UP when added to the tree.Martin Pieuchot
This is required to maintain the original BSD behavior of locally configured addresses being always reacheable. Some interfaces are^w^W^Wem(4) is special and generally has a DOWN link state when configured by netstart(8). As a result all the route entries cloned/added before its link state goes to UP are also marked as DOWN. Note that this problem was not present when local addresses were attached to lo0. ok mikeb@
2015-10-13Initialize va_filerev in vattr_null() to avoid leaking stack garbage;Philip Guenther
problem pointed out by Martin Natano (natano (at) natano.net) Also, stop chaining assignments (foo = bar = baz) in vattr_null(). The exact meaning of those depends on the order of the sizes-and- signednesses of the lvalues, making them fragile: a statement here mixed *six* types, but managed to get them in a safe order. Delete a 20+ year old XXX comment that was almost certainly bemoaning a bug from when they were in an unsafe order. ok deraadt@ miod@
2015-10-13Add some newer DT_* and DF_* constantsPhilip Guenther
ok kettenis@ miod@
2015-10-13Pledge "fattr" request should allow fchflags().Doug Hogan
"add it" deraadt@
2015-10-12pledge "proc" request should allow setsid()Theo de Raadt
2015-10-12Remove the "cmsg" attribute, as promised. Use "sendfd" or "recvfd",Theo de Raadt
depending on what you need. inet/inet6 cmsg's come through unmolested -- that is something to consider later.
2015-10-12the pattr argument to IFQ_ENQUEUE is unused, so let's get rid of it.David Gwynne
also the comment above IFQ_ENQUEUE that says the pattr argument is unused. ok mpi@
2015-10-12Unify link state change notification.Martin Pieuchot
ok mikeb@
2015-10-12dont need to do suser checks in ioctl paths cos if.c does them for us.David Gwynne
ok mikeb@ mpi@
2015-10-12protect SIOCSLIFPHYTTL, SIOCSVNETID so only root can call them, andDavid Gwynne
return EPNOTSUPP for SIOCGLIFPHYTTL and SIOCGVNETID. all so drivers dont have to do these checks themselves. ok mikeb@ mpi@
2015-10-12Introduce bridge_ifinput() to handle some repeated logic beforeReyk Floeter
if_input() and to have a counterpart for bridge_ifenqueue() that helps to understand the traffic/code flow in bridge better. The bridge currently only puts a single packet on the input mbuf list, and changing will need to undo part of this commit, but it still makes sense to have a well-defined call for the ports receive path. No functional change. OK mpi@
2015-10-12Always initialise the index into iwm's tx queue array, fixing aStefan Sperling
potential crash. This must have somehow been working by magic. Fruther cleanup of QoS support in this driver is very much needed. ok mpi@
2015-10-11pledge_ioctl_check() will do the killing if neccessary; if it returns,Theo de Raadt
that is an errno to pass up to the calling system call instead. test case is "who < /dev/null", via ttyname().
2015-10-11add a missed check for PLEDGE_RPATH when reading a file.Sebastien Marie
ok deraadt@
2015-10-11sigaltstack is directly used by setjmp on some architectures. it onlyTheo de Raadt
refers to the process itself. pledge should allow it.
2015-10-11put TIOCSWINSZ in the right block "tty", not in "ioctl". this happenedTheo de Raadt
because the "route' tests were placed between the two, creating confusion. fix that while here.
2015-10-11In pledge "tty", allow TIOCSWINSZ. stty(1) is the obvious silly use.Theo de Raadt
The more important use will be tmux(1) and other active window size controlling programs. There seems little risk in exposing this small tty setting alongside the tcsetattr() family. ok millert
2015-10-11Add a symbolic name for the special '-1' value of iwm's sc_wantresp.Stefan Sperling
ok phessler
2015-10-11__get_tcb() is needed for errno access in threaded programs on some archs.Philip Guenther
Make it always available. ok deraadt@
2015-10-11Always set the timeout at least one tick in the future for EVFILT_TIMERPhilip Guenther
to avoid looping in softclock() based on diff by sthen@ ok sthen@
2015-10-10For pledge, sigsuspend() should is affecting the behaviour a process itself,Theo de Raadt
so we should allow it for 'self'. ok djm
2015-10-10pid 0 also implies self, so allow that for the pledge case. Found inTheo de Raadt
a refactoring being done for the bc/dc relationship with otto.
2015-10-10In iwm(4), set mbuf pointers to NULL after freeing mbufs.Stefan Sperling
ok phessler mpi zhuk
2015-10-10shuffle #ifdef TIOCSTI block to avoid a future /*FALLTHROUGH*/ mistake.Theo de Raadt
2015-10-10allow sysctl of kern.clockrateTheo de Raadt
2015-10-10I forgot execve would go through the namei codepath, so a program markedTheo de Raadt
"stdio rpath" this would fail to execve. pre-indicate exec actions to the namei checker to allow them through. ok semarie
2015-10-10add location to the fan descriptionJoerg Jung
2015-10-10fix wrong brackets in if statementJoerg Jung
2015-10-10Add macros for A-MPDU and MCS data, both found in HT capabilities element.Stefan Sperling
typo fix + ok sthen@
2015-10-09Allow kill(self, sig) in pledge SELF also. the stack protector, abort(),Theo de Raadt
and readpassphrase() in particular use this. ok millert tedu semarie
2015-10-09Have not come up with a great pattern for flock() yet. flock() is permittedTheo de Raadt
by "getpw" because libc getpw*/getgr* use open() of /var/run/ypbind.lock plus flock() to detect YP running. The kernel observes this dance to "open up" the YP door (ugliness should drive us to rewrite this mechanism from SunOS later). however, flock is also used independently. Current users are htpasswd mail skeyinit tmux authpf pwd_mkdb ldapd smtpd ypbind login_token mail.local lockspool Let's enable flock() for "cpath", and see if that helps these programs, otherwise we'll try "wpath" next.
2015-10-09Remove evil hack. I've never seen the printf fire, and xenocara no longerMark Kettenis
contains any code that can manipulate the affected register directly. ok jsg@
2015-10-09oops, snuck into a syscalls sync; spotted by sthenTheo de Raadt
2015-10-09another stray )Theo de Raadt
2015-10-09shortcircuit TIOCGETA to directly return ENOTTY for non-ttys. It couldTheo de Raadt
be called against a non-tty fd, so as to test "is this a tty". Discovered by sthen and rob pierce at the same time.
2015-10-09stardate 93370.16: a whitespace appears to have entered our quadrant...Theo de Raadt
2015-10-09multicast test backwards; noted by renatoTheo de Raadt
2015-10-09Rename tame() to pledge(). This fairly interface has evolved to be moreTheo de Raadt
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.
2015-10-09syncTheo de Raadt
2015-10-09Rename tame() to pledge(). This fairly interface has evolved to be moreTheo de Raadt
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.
2015-10-08After replacement alloca() with alloc(), out-of-heap happened when bootingYASUOKA Masahiko
on a large block size (32K) partition. Increase the HEAP_LIMIT from 0x90000 to 0xA0000. try this, deraadt
2015-10-08Expose a small set of multicast join operators under the request "mcast".Theo de Raadt
This will be used by a few daemons. If they lack this feature, then they would need to operate without tame. Discussed with renato
2015-10-08Lock the page queues by turning uvm_lock_pageq() and uvm_unlock_pageq() intoMark Kettenis
mtx_enter() and mtx_leave() operations. Not 100% this won't blow up but there is only one way to find out, and we need this to make progress on further unlocking uvm. prodded by deraadt@
2015-10-0816 years after E801 memprobe was disabled, probably safe to delete it.Ted Unangst
ok deraadt jung kettenis ratchov
2015-10-08Remove the sc_soft_req_cnt field because the number of tx requests isVisa Hankala
already tracked in sc_sendq. Replace the sc_flush logic with a simple Fetch-and-Add store that avoids an unnecessary IOBDMA transaction. ok uebayasi@
2015-10-08Make sure that when trunk_port_ioctl is called to set a newMike Belopuhov
lladdr the trunk port is already on the list. OK mpi