summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Modify `uvmexp.swpgonly' atomically, required for uvm_fault() w/o KERNEL_LOCK()mpi2021-03-046-17/+24
| | | | ok kettenis@
* Bring back previous fix for UVM vnode deadlock.mpi2021-03-043-49/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | tb@ reports that refaulting when there's contention on the vnode makes firefox start very slowly on his machine. To revisit when the fault handler will be unlocked. ok anton@ Original commit message: Fix a deadlock between uvn_io() and uvn_flush(). While faulting on a page backed by a vnode, uvn_io() will end up being called in order to populate newly allocated pages using I/O on the backing vnode. Before performing the I/O, newly allocated pages are flagged as busy by uvn_get(), that is before uvn_io() tries to lock the vnode. Such pages could then end up being flushed by uvn_flush() which already has acquired the vnode lock. Since such pages are flagged as busy, uvn_flush() will wait for them to be flagged as not busy. This will never happens as uvn_io() cannot make progress until the vnode lock is released. Instead, grab the vnode lock before allocating and flagging pages as busy in uvn_get(). This does extend the scope in uvn_get() in which the vnode is locked but resolves the deadlock. ok mpi@ Reported-by: syzbot+e63407b35dff08dbee02@syzkaller.appspotmail.com
* remove extra argument to printfjsg2021-03-041-2/+2
|
* Notice when link-timeout expires even if istty(STDERR) hints that dhclient haskrw2021-03-041-5/+5
| | | | | | | | | | | already gone daemon. Sometimes it's just that 2>/dev/null or something has been done. Should fix problem with sysupgrade when an interface (e.g. a wired interface that has no cable plugged in) never comes up. Problem reported and debug info from kettenis@, Jean-Philippe Luigi, Thomas L. and Markus Lude. Thanks!
* Never automatically rewrite perl/dist/Devel-PPPort/t/01_test.tafresh12021-03-041-1/+1
| | | | | | | | | We are never going to update the files that generate this test and the interaction with "cvs up" means we can accidentally hit it when they hange between releases but permissions when building the system prevent us from writing the update and breaks the build. Found by naddy@, krw@, and deraadt@
* off by onejsg2021-03-031-2/+2
| | | | ok claudio@ deraadt@
* don't sshbuf_get_u32() into an enum; reported by goetze ATdjm2021-03-031-4/+4
| | | | dovetail.com via bz3269
* Free sc_vroute on shutdown.tobhe2021-03-031-1/+2
|
* Remove bogus (and pointless) pmap_activate(9) call.kettenis2021-03-031-3/+1
| | | | ok drahn@
* typo in other_hostkeys_message() display output, ok djmsthen2021-03-031-2/+2
|
* s/byte/charactermartijn2021-03-031-8/+8
| | | | | Discussed with claudio@ Feedback jmc@
* Add a configurable button mapping for tap gestures on touchpads.bru2021-03-034-36/+104
| | | | | | Thanks to RJ Johnson for this work! ok mpi@
* sndiod: Move MTC/MMC state to its own global structureratchov2021-03-035-153/+178
|
* sndiod: Move MIDI control endpoint to opt structureratchov2021-03-035-165/+200
| | | | No behavior change.
* sndiod: Move controls out of the device structureratchov2021-03-035-236/+380
| | | | | | | | | | | | | | | Moving to a global server-wide controls list is necessary to expose controls that are not associated to a particular device (ex. a device selector). The current hack to use the device-side sioctl_desc->addr variable as client-side key can't work anymore. So, we use a unique dynamically allocated ctl->addr key; this is much cleaner. A new "scope" enum (with two "void *" arguments) is used to determine what the control does control. This adds flexibility and allows to easily add new control types that are not associated to devices. No behavior change.
* sndioctl: Flush stdout before pollingratchov2021-03-031-1/+2
| | | | | | | | If stdout is not flushed, output is not seen by programs using sndioctl through a pipe (ex. "sndioctl -m | cat" displays nothing). Patch from Erico Nogueira <ericonr@disroot.org>, idea from Duncan Overbruck <mail@duncano.de>
* Unveil only /etc/resolv.conf and /etc/resolv.conf.new not /etc/kn2021-03-031-3/+5
| | | | | | | | Unveiling the entire directory stems from earlier development cycles and is by no means required now, only the two files are created, read from and written to. OK deraadt florian semarie
* remove unreachable and unneeded codejsg2021-03-031-3/+1
| | | | ok martijn@
* needs FILE*; from Mike Frysingerdjm2021-03-031-1/+2
|
* off by one in array bounds testsjsg2021-03-031-4/+4
| | | | ok mlarkin@
* clean up span ports as span ports, not bridge ports.dlg2021-03-031-3/+2
| | | | | | | | | the visible result of this is that span ports aren't made promisc like bridge ports. when cleaning up a span port, trying to take promisc off it screwed up the refs, and it makes the underlying interface not able to be promisc when it should be promisc. found by dave voutila
* fix an assert in veb_p_ioctl() that failed when called by a span port.dlg2021-03-021-3/+4
| | | | | | | | | veb_p_ioctl() is used by both veb bridge and veb span ports, but it had an assert to check that it was being called by a veb bridge port. this extends the check so using it on a span port doesnt cause a panic. found by dave voutila
* Read general and touchpad-specific wsmouse settings separately.bru2021-03-021-2/+8
| | | | | | | Correct the identification of the device type when reading the touchpad parameters fails. ok jcs@
* Fix size computation in replace_repeat() for special_case REPEAT_WITH_Q.millert2021-03-021-7/+4
| | | | | | | | This resulted in the NUL terminator being written to the end of the buffer which was not the same as the end of the string. That in turn caused garbage bytes from malloc() to be processed. Also change the NUL termination to be less error prone by writing the NUL immediately after the last byte copied. OK sthen@
* It is now possible to define single value variables in the startup file:lum2021-03-021-24/+24
| | | | | | | | (define myfile d.txt) And use them like: (find-file myfile)
* Only attach a fully configured bpf filter to a network interface.florian2021-03-021-8/+8
| | | | I'm worried we could see packets we shouldn't during a small time window.
* include of netinet/in.h here is incorrect, because net/route.h will pullderaadt2021-03-021-2/+1
| | | | | excessive types into scope. ok claudio
* document ENOTSUP wxallowed/wxneeded behaviour more clearly; ok kurtderaadt2021-03-021-4/+8
|
* Must include netinet/in.h before netinet/ip.h or bad things happen.claudio2021-03-021-4/+3
|
* Separate variable declaration and assignment.jsing2021-03-021-2/+4
| | | | Requested by tb@
* Replace two handrolled tls12_record_protection_engaged().jsing2021-03-021-3/+3
| | | | Noted by tb@
* Move key/IV length checks closer to usage sites.jsing2021-03-021-5/+11
| | | | | | | | | Also add explicit checks against EVP_CIPHER_iv_length() and EVP_CIPHER_key_length(). Requested by tb@ during review. ok tb@
* Fix indentation of switch / case. No binary change.florian2021-03-021-40/+36
|
* Add tls12_record_protection_unused() and call from CCS functions.jsing2021-03-021-8/+17
| | | | | | | | | This moves the check closer to where a leak could occur and checks all pointers in the struct. Suggested by tb@ during review. ok tb@
* satisfy older gcc with poor warning generationderaadt2021-03-021-3/+3
|
* requires netinet/in.hderaadt2021-03-021-1/+2
|
* Rename local variable 'cur_time' in set_timeout() to 'now' likekrw2021-03-021-4/+4
| | | | all the other struct timespec variables holding the current time.
* Fix misleading indentation in SSL_get_error()tb2021-03-021-2/+2
|
* This diff soaks up the user input while the the maximum characterlum2021-03-021-5/+8
| | | | | | length boundary is crossed in the minbuffer and allows the user to see the error message and respond accordingly. The goto named "null" changed to "skipkey" as per Emil Engler's suggestion on tech@.
* Eliminate redundant checks for expired leases in ifi->leasedb. Simplykrw2021-03-021-34/+31
| | | | | | toss expired leases when writing the list to disk. And write the list to disk before using a lease from it. Just make sure ifi->active isn't tossed.
* Update logging with comments made by florian@ some time ago (i've notlum2021-03-022-158/+102
| | | | | updated logging to $HOME, but will do so). Also include mglog_misc() which takes formatted input from Joachim Wiberg's mg. Thankyou both.
* sndiod: Allow alternative devices to support different modes.edd2021-03-022-103/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently sndiod does not allow you to use alternative devices (-F devices) which support only a subset of the modes of the main (-f) device. For example, if you do `sndiod -f rsnd/0 -F rsnd/1` and: - rsnd/0 is full-duplex (rec + play). - rsnd/1 is play-only. Then you will be unable to use rsnd/1 as sndiod deems it incompatible and refuses to use it (similarly if rsnd/1 is record-only). This is annoying. It means if you want to use a record-only or play-only device, you will either have to kill sndiod and restart it specifying only that device (`sndiod -f rsnd/1` for the above example), or failing that, downgrade the functionality of the main device (`-m play`). This diff (a joint effort between ratchov@ and myself) makes mixing devices with different modes possible. It does this by making both recording and playing available for all devices, even if the underlying hardware doesn't support both modes. For example, if I try to record from a play-only device, then recording will succeed, but the captured PCM data will be pure silence. Similarly, if I try to play to a record-only device, then the audio stream will disappear into the ether. This is mostly a no-op for sndiod in the default configuration (except that play-only devices now accept recording clients). If you use alternative devices (-F), then it's possible for a record-only device to be found first, which may be confusing if you just want to hear sound. We can only assume that if you deviate from defaults, then you know what you are doing. With guidance from, and OK ratchov@, thanks!
* Make unveiling the lease directory a warning instead of a fatal errorflorian2021-03-021-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | when the lease directory does not exist. This means that dhcpleased(8) will no longer request a previously configured IP address from the dhcp server and will fall back to DHCPDISCOVER which requests any IP address from the dhcp server. This likely makes diskless(8) work with dhcpleased(8). A normal diskless(8) setup has only / mounted via nfs when dhcpleased(8) starts. /var exists but nothing is mounted there yet, meaning /var/db/dhcpleased does not exist so lease files are disabled. dhcpleased(8) sends a DHCPDISCOVER to request any IP address but since the dhcp server has (very likely) a 'fixed-address' configured we get the same IP back that is already configured. If /var/db/dhcpleased/ exists on / (and /var is *NOT* mounted later) in a diskless(8) setup, care must be taken that the root file system is not shared between machines. If /var/db/dhcpleased/ exists on / and /var on NFS is mounted over this later bad things probably happen. This is a configuration error and must befixed. discussed with deraadt@ Actuall tests on existing diskless(8) setups would be appreciated.
* Better unveil error messages; requested by deraadt some time ago.florian2021-03-021-4/+4
|
* Do not use NULL active window; also do not leak window name. GitHubnicm2021-03-022-3/+5
| | | | issue 2590 from Chester Liu.
* finish GC old unintuitive interfaceespie2021-03-021-2/+2
| | | | now handle_continue and find_window_size are fully separated.
* Drop support for popups where the content is provided directly to tmuxnicm2021-03-0210-321/+108
| | | | | | (which does not have many practical uses) and only support running a program in the popup. display-popup is now simpler and can accept multiple arguments to avoid escaping problems (like the other commands).
* Fix the deadlock between uvn_io() and uvn_flush() by restarting the fault.mpi2021-03-022-5/+10
| | | | | | | | | Do not allow a faulting thread to sleep on a contended vnode lock to prevent lock ordering issues with upcoming per-uobj lock. ok anton@ Reported-by: syzbot+e63407b35dff08dbee02@syzkaller.appspotmail.com
* Revert the fix for the deadlock between uvn_io() and uvn_flush().mpi2021-03-022-95/+44
| | | | | | | | This fix (ab)use the vnode lock to serialize access to some fields of the corresponding pages associated with UVM vnode object and this will create new deadlocks with the introduction of a per-uobj lock. ok anton@
* Introduce 'rde evaluate all' a mode to work around path hiding in IXPclaudio2021-03-028-58/+200
| | | | | | | | | | | | | | | | | | | route-server environments. By default only the best path is sent to peers and if that path is filtered then the path is hidden for that peer. On route-servers this is sometimes not desried. For this 'rde evaluate all' will cause the evaluation process to fall back to alternate routes and will redistribute the first non-filtered path to the peer. This is very similar to per-peer RIBs but accomplishes the same effect without the massive increase in memory usage. Compared to the default mode this requires more CPU resources but it is probably less than what per-peer RIBs would require. 'rde evaluate all' can be set and reset globally, on groups and on idividual neighbors. It is not limited to route-server configs but route loops are possible if not properly used. OK benno@