summaryrefslogtreecommitdiffstats
path: root/sys/sys (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* regendoug2015-08-262-5/+5
|
* Convert paths argument of tame(2) to const char **.doug2015-08-262-4/+4
| | | | | | The path will not be modified and this reduces casts. Discussed with many. ok deraadt@
* Typos; ok kettenis@jca2015-08-241-3/+3
|
* Remove obsolete fields in struct unpcb. In the past they were usedbluhm2015-08-241-3/+1
| | | | | | for flow control with unix domain sockets, this is now done by filling the send buffer with fake data counters. OK naddy@; no fallout in a bulk build
* Rename M_RTABLE bucket into "rtable" to match the code and kill unusedmpi2015-08-241-5/+4
| | | | | | M_BWMETER. ok mikeb@
* Move to tame(int flags, char *paths[]) API/ABI.deraadt2015-08-225-30/+45
| | | | | | | | | | | | The pathlist is a whitelist of dirs and files; anything else returns ENOENT. Recommendation is to use a narrowly defined list. Also add TAME_FATTR, which permits explicit change operations against "struct stat" fields. Some other TAME_ flags are refined slightly. Not cranking libc now, since nothing commited in base uses this and the timing is uncomfortable for others. Discussed with many; thanks for a few bug fixes from semarie, doug, guenther. ok guenther
* typosmiod2015-08-181-2/+2
|
* The disktab attribute 'ty' was used to set D_REMOVEABLE and D_RAMDISKkrw2015-08-141-1/+3
| | | | | | | | | | | | | flags in the disklabel. These flags were discarded in 2006. Remove documentation for and instances of 'ty'. Add instances of 'dt' that were missing. Use 'floppy' as the value of 'dt' for all floppies and 'rdroot' for all boot images/miniroots. Add 'rdroot' to dktypenames and an associated #define DTYPE_RDROOT, since 'dt' values are parsed by matching entries in dktypenames[]. Slightly tweaked part of larger cleanup diff previously ok deraadt@.
* provide ml_requeue and mq_requeue for prepending mbufs on lists/queuesdlg2015-08-141-1/+3
| | | | ok mpi@ claudio@
* Add the AUDIO_GETPOS ioctl() to fetch a snapshot of the 4 countersratchov2015-07-281-1/+9
| | | | | | returned by AUDIO_GETxOFFS and AUDIO_xERROR ioctls. ok deraadt
* normalize disclaimer to license.template; noted by reykderaadt2015-07-281-4/+4
|
* Add ktracing of structs iovec, msghdr, and cmsghdr for {,p}{read,write}v(),guenther2015-07-281-1/+7
| | | | | | | sendmsg(), and recvmsg(). For cmsghdr, the len, level, and type are always shown, and for SOL_SOCKET,SCM_RIGHTS the fd numbers being passed are shown. ok millert@ deraadt@
* Rather than disabling tame to coredump, leave it enabled but flag thatderaadt2015-07-271-1/+2
| | | | | a coredump is happening. This improves behaviour while threaded. ok semarie
* typoderaadt2015-07-271-2/+2
|
* Revert attempted GPT code cleanup. Too much code, too little testing.krw2015-07-231-7/+7
| | | | Requested by deraadt@
* Fix ioctl number conflict and sort ioctl numbers.rzalamena2015-07-211-7/+7
| | | | ok mpi@.
* Indent.uebayasi2015-07-201-2/+2
|
* Move `ticks' declaration to sys/kernel.h.uebayasi2015-07-201-1/+2
|
* Fix tty hiwat handling a bitsf2015-07-201-1/+3
| | | | | | | | | | | | | - Introduce new defines TTHIWATMINSPACE, TTMINHIWAT for some magic values that are used in tty.c. - Remove hiwat adjustments in ttwrite(). This fixes this codepath not being interrupt safe. - Change ttysetwater() to keep at least TTHIWATMINSPACE space above the high water mark. This makes it consistent with ttycheckoutq(). Without this change, the hiwat adjustment change above causes deadlocks in pty. ok kspillner@ commit it now deraadt@
* Implemented MPLS pseudowire (mpw(4)) to be used with VPLS and VPWS.rzalamena2015-07-201-1/+4
| | | | ok mpi@, claudio@.
* rebuildguenther2015-07-202-5/+14
|
* Add kbind, a syscall for ld.so to use to securely and efficiently updateguenther2015-07-202-2/+13
| | | | | | memory for lazy binding ok deraadt@
* Use two 2q caches for the buffer cache, moving previously warm buffers from thebeck2015-07-191-5/+22
| | | | | | | first queue to the second. Mark the first queue as DMA in preparation for being able to use more memory by flipping. Flipper code currently only sets and clears the flag. ok tedu@ guenther@
* Make KTR_SYSRET records variables variables sized, leaving out theguenther2015-07-192-10/+11
| | | | | | | | | | | | | retval on error, including a long long retval on successful lseek(), and including a register_t retval for other successes. This fixes lseek reporting on ILP32 archs. While here, reworking internal kern_ktrace.c bits to be able to pass two buffers to ktrwriteraw(), so we can avoid mallocing a buffer in some cases and so that KTR_GENIO logs are split at PAGE_SIZE, not PAGE_SIZE-sizeof(struct ktrgenio) ok miod@
* syncderaadt2015-07-192-5/+12
|
* tame(2) is a subsystem which restricts programs into a "reduced featurederaadt2015-07-193-25/+140
| | | | | | operating model". This is the kernel component; various changes should proceed in-tree for a while before userland programs start using it. ok miod, discussions and help from many
* Abstract the routing table internals behind an rtable_* API.mpi2015-07-181-3/+3
| | | | | | | | | | Code abusing the radix internals for the routing table should now includes <net/rtable.h> and only deal with "struct rtentry". Code using a radix tree for another purpose can still include <net/radix.h>. Inputs from and ok claudio@, mikeb@
* Change unp_scan() and its callbacks to pass the array of struct file **guenther2015-07-182-24/+22
| | | | | | | | and a count instead of calling the callback on each one, while also renders the 'dispose' argument superfluous. Move unp_*() prototypes from <sys/un.h> to <sys/unpcb.h> ok claudio@ mpi@
* Kill emul left-over.mpi2015-07-181-4/+1
| | | | From Martin Natano
* In socketpair(), need to mask the type argument when testing for dgram.guenther2015-07-171-1/+4
| | | | | based on jeremy@'s diff ok jeremy@ deraadt@
* MFREE(9) is dead, long live m_freem(9)!mpi2015-07-081-8/+1
| | | | ok bluhm@, claudio@, dlg@
* disksort is dead, and now so is any code that relied on its compatdlg2015-07-061-12/+1
| | | | | | | | in bufqs. it's only taken us 6 years. ok millert@ krw@
* introduce srp, which according to the manpage i wrote is short fordlg2015-07-022-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "shared reference pointers". srp allows concurrent access to a data structure by multiple cpus while avoiding interlocking cpu opcodes. it manages its own reference counts and the garbage collection of those data structure to avoid use after frees. internally srp is a twisted version of hazard pointers, which are a relative of RCU. jmatthew wrote the bulk of a hazard pointer implementation and changed bpf to use it to allow mpsafe access to bpfilters. however, at s2k15 we were trying to apply it to other data structures but the memory overhead of every hazard pointer would have blown out significantly in several uses cases. a bulk of our time at s2k15 was spent reworking hazard pointers into srp. this diff adds the srp api and adds the necessary metadata to struct cpuinfo on our MP architectures. srp on uniprocessor platforms has alternate code that is optimised because it knows there'll be no concurrent access to data by multiple cpus. srp is made available to the system via param.h, so it should be available everywhere in the kernel. the docs likely need improvement cos im too close to the implementation. ok mpi@
* Get rid of the undocumented & temporary* m_copy() macro added formpi2015-06-301-4/+1
| | | | | | | | compatibility with 4.3BSD in September 1989. *Pick your own definition for "temporary". ok bluhm@, claudio@, dlg@
* Move brige(4)'s output hook outside of ether_output().mpi2015-06-251-2/+1
| | | | | | | | | | | This fix some weird bridge(4) configurations involving pseudo-drivers stacked on top of interfaces in a bridge. Also simplifies the loop prevention logic to match bridge's input path. Instead of using a tag per port/bridge simply flag output mbufs to make sure only one copy per bridge go through bridge_output(). ok bluhm@, claudio@
* Reimplement the audio driver in a simpler way, removing unused/unusableratchov2015-06-252-62/+9
| | | | | | functionality. Same API and ABI except for the removed bits and no behaviour change for programs using libsndio. With help from armani@ and mpi@, thanks.
* Make it possible to create write combing mappings through /dev/mem. This iskettenis2015-06-221-1/+4
| | | | | | | | done by introducining a magic offset. Pages below this offset are mapped with default memory attributes. Above this offset pages are mapped write combining. ok mlarkin@
* my keyboard is conspiring against mederaadt2015-06-171-2/+2
|
* crank to 5.8-betaderaadt2015-06-171-3/+3
|
* Store a unique ID, an interface index, rather than a pointer to thempi2015-06-161-3/+3
| | | | | | | | | | | | | | | receiving interface in the packet header of every mbuf. The interface pointer should now be retrieved when necessary with if_get(). If a NULL pointer is returned by if_get(), the interface has probably been destroy/removed and the mbuf should be freed. Such mechanism will simplify garbage collection of mbufs and limit problems with dangling ifp pointers. Tested by jmatthew@ and krw@, discussed with many. ok mikeb@, bluhm@, dlg@
* Move hzto(9) to the attic; OK dlgmikeb2015-06-111-2/+1
|
* a dreaded whitespace; Kyle Milzderaadt2015-05-251-2/+2
|
* remove PACKET_TAG_IPSEC_PENDING_TDB, it is never set; ok mikeb@markus2015-05-231-2/+1
|
* for decades, wsdisplay has acted in one way like it is not a ttyderaadt2015-05-171-2/+2
|
* isatty() is used by stdio to determine the buffering mode. Add a F_ISATTYderaadt2015-05-171-1/+4
| | | | | | | option to fcntl(), so that isatty() can use this rather than than the bloated ioctl() interface. Reducing uses of ioctl() by libc makes it easier to constrain programs with various kinds of systrace sandboxes. ok guenther, previously discussed as a concept with nicm
* Set POLLHUP even if no valid events were specified as per POSIX.millert2015-05-101-1/+4
| | | | | | | | Since we use the poll backend for select(2), care must be taken not to set the fd's bit in writefds in this case. A kernel-only flag, POLLNOHUP, is used by selscan() to tell the poll backend not to return POLLHUP on EOF. This is currently only used by fifo_poll(). The fifofs regress now passes. OK guenther@
* Cleanup/rejig GPT code to be more readable, support different endiankrw2015-05-091-7/+7
| | | | | | | | | archs and different sized disk sectors. Make MBR have higher priority than GPT. Add many paranoia checks and associated DPRINTF's to make further development easier. Keep everything hidden behind #ifdef GPT. Tested and ok doug@ mpi@. Nothing bad seen by millert@.
* Pass a thread pointer instead of its file descriptor table to getvnode(9).mpi2015-05-071-2/+2
| | | | Input and ok millert@
* regenjsg2015-05-062-4/+4
|
* Pass a thread pointer instead of its file descriptor table to getsock(9).mpi2015-05-061-2/+2
| | | | | | Diff from Vitaliy Makkoveev. Manpage tweak and ok millert@