summaryrefslogtreecommitdiffstats
path: root/lib/libcxx/src/algorithm.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-01-09Enforce range with sysctl_int_bounded in sysctl_wdoggnezdo1-3/+5
OK millert@
2021-01-09Enforce range with sysctl_int_bounded in witness_sysctl_watchgnezdo1-10/+8
Makes previously explicit checking less verbose. OK millert@
2021-01-09Enforce range with sysctl_int_bounded in tcp_sysctlgnezdo1-18/+15
One case uses the explicit range from the code and the other was inferred from reading the usage. OK millert@
2021-01-09Finish converting ddb_sysctl to sysctl_int_boundedgnezdo1-27/+7
I missed the verbose pattern that it used for error checking the first time around. OK millert@
2021-01-09Use sysctl_int_bounded in sysctl_hwsmtgnezdo1-6/+2
Prefer error reporting is to silent clipping. OK millert@
2021-01-09Revert mistaken commit: Stop wsmux_attach_sc race from anton@gnezdo1-2/+2
2021-01-09Stop wsmux_attach_sc race from anton@gnezdo1-2/+2
OK millert@
2021-01-09Include the optimized putchar functions only if RASOPS_SMALL is notfcambus1-4/+4
defined, as was previously the case. OK kettenis@
2021-01-09"encoding of diag instructions is hard, let's go shopping"kettenis2-69/+31
Clean up things a bit, adding documentation about the source of the information about these instructions. From miod@
2021-01-09Move peer related checks from up_test_update() to rde_generate_updates()claudio2-37/+18
both the export check and the address family check should be done as early as possible since these peers will not need any kind of updates to happen. Also remove the non-standard ORIGINATOR_ID check. With this up_test_update() becomes a simple true/false function which makes the rest of the code a bit simpler. OK benno@
2021-01-09Test that local UDP broadcast packets to 255.255.255.255 are handledbluhm2-4/+110
correctly by socket splicing. They generate an ELOOP error.
2021-01-09If the loop check in somove(9) goes to release without setting anbluhm1-3/+2
error, a broadcast mbuf will stay in the socket buffer forever. This is bad as multiple mbufs can use up all the space. Better report ELOOP, dissolve splicing, and let userland handle it. OK anton@
2021-01-09Syzkaller has found a stack overflow in socket splicing. Broadcastbluhm1-2/+5
packets were resent through simplex broadcast delivery and socket splicing. Although there is an M_LOOP check in somove(9), it did not take effect. if_input_local() cleared the M_BCAST and M_MCAST flags with m_resethdr(). As if_input_local() is used for broadcast and multicast delivery, it was a mistake to delete them. Keep the M_BCAST and M_MCAST mbuf flags when packets are reinjected into the network stack. Reported-by: syzbot+a43ace363f1b663238f8@syzkaller.appspotmail.com OK anton@; discussed with claudio@
2021-01-09Remove locally imposed limit on sockets.rob2-20/+14
Suggested by martijn@, ok claudio@
2021-01-09Enable support for floating-point exceptions. We always run in "precise"kettenis8-31/+68
mode. On modern processors (POWER8 and later) there is no performance penalty for this as long as exceptions are disabled in the FPSCR (which is the default). This way we don't have to implement an architecture-dependent system call to set the mode, as it can only be done by the kernel. With help from gkoehler@ ok gkoehler@
2021-01-09add a comma to previous;jmc1-2/+2
2021-01-09kill trailing whitespacejasper1-12/+12
2021-01-09whitespacetb2-7/+7
2021-01-09Adjust kexfuzz to addr.c/addrmatch.c split.dtucker1-2/+2
2021-01-09Update unittests for addr.c/addrmatch.c split.dtucker9-17/+18
2021-01-09Replace a custom linked list with SLIST.visa1-12/+10
2021-01-09Replace SIMPLEQ with SLIST because the code does not need a queue.visa1-26/+24
2021-01-09Remove unnecessary relocking of w_mtx as panic() should not return.visa1-10/+2
2021-01-09Add PerSourceMaxStartups and PerSourceNetBlockSize options which providedtucker7-12/+255
more fine grained MaxStartups limits. Man page help jmc@, feedback & ok djm@
2021-01-09Move address handling functions out into their own file in order to reusedtucker4-328/+483
them for per-source maxstartups limiting. Supplement with some additional functions from djm's flowtools that we'll also need. ok djm@ (as part of a larger diff).
2021-01-09Update SSL_get_shared_ciphers() documentation for ssl_lib.c r1.240tb1-17/+47
From schwarze, who explains: * Even though i wrote the original version of our documentation for this function, i now think the design of this function is so atrocious that it is better to call out the main limitations up front (server side only and silent truncation) rather than first giving the impression that it achieves something it actually doesn't and then later try to row back in a piece-meal manner. * Using a .Bl list for failure conditions in the RETURN VALUES section is no doubt unusual, but the conditions are so numerous and some of them are so surprising that i think it makes sense in this case. If a function is badly designed and has surprising properties, precision and clarity in the description are even more important than usual, and conciseness is better sacrificed. * Adding .Xr SSL_get_ciphers 3 seems helpful. ok beck inoguchi jsing tb
2021-01-09Add support for SSL_get_shared_ciphers() in TLSv1.3tb1-1/+5
As reported by Steffen Ullrich and bluhm, since enabling TLSv1.3 server some tests fail in t/local/07_sslecho.c of security/p5-Net-SSLeay due to missing support for SSL_get_shared_ciphers(). This fixes the parts related to shared ciphers. ok beck inoguchi jsing
2021-01-09Align SSL_get_shared_ciphers() with OpenSSLtb1-10/+18
SSL_get_shared_ciphers() has been quite broken forever (see BUGS). What's maybe even worse than those bugs is that it only ever returned the string representing the client's ciphers which happen to fit into buf. That's kind of odd, given its name. This commit brings it in line with OpenSSL's version which changed behavior almost three years ago. reviewed and stupid bug caught by schwarze ok beck inoguchi jsing commit a216df599a6076147c27acea6c976fb11f505b1a Author: Matt Caswell <matt@openssl.org> Date: Fri Apr 27 11:20:52 2018 +0100 Fix SSL_get_shared_ciphers() The function SSL_get_shared_ciphers() is supposed to return ciphers shared by the client and the server. However it only ever returned the client ciphers. Fixes #5317 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6113)
2021-01-09Move a premature optimization so that -s with offsets works.otto1-4/+4
ok florian@ tb@
2021-01-09Add 'strip' directivedenis5-18/+76
Feedback by Olivier Cherrier, Hiltjo Posthuma, Mischa OK benno@
2021-01-09Set chain on xsc on chain build failure.jsing1-1/+3
Prior to calling the callback, ensure that the current (invalid and likely incomplete) chain is set on the xsc. Some things (like auto chain) depend on this functionality. ok beck@
2021-01-09Bail out early after finding an single chain if we are have been called frombeck1-1/+9
x509_vfy and have an xsc. There's no point in finding more chains since that API can not return them, and all we do is trigger buggy callbacks in calling software. ok jsing@
2021-01-09Now we do not call ttyopen() in sioopen(), we do not need the variableaoyama1-2/+1
'error' anymore.
2021-01-08missing plural in previous;jmc1-2/+2
2021-01-08don't check local carp addresses as part of the antispoof checks.dlg1-2/+3
bridge(4) drops packets coming from somewhere else that have a source MAC address that's owned by one of the interfaces that's a member of the bridge. because this check was done with bridge_ourether, it included the addresses of active carp interfaces hanging off these member interfaces. this meant if the local machine is the carp master while another machine is trying to preempt it by sending hellos, the packets from the other machine were dropped because the local one is already the master. carp roles are supposed to move around a l2 network, so another host sending a packet with a carp mac address is actually normal and necessary. found by and fix tested by stsp@ ok stsp@ claudio@
2021-01-08bowie died 10.1; from steffen nurpmesojmc1-2/+2
2021-01-08Bring the emulated Linux memory allocation interfaces more in line withkettenis3-39/+126
what Linux does. Let vmalloc() use km_alloc(9) instead of malloc(9) and let kvmalloc() only use malloc(9) for small (less than a page) allocations and atomic allocations. This should reduce the pressure on the "interrupt-safe" map. ok jsg@
2021-01-08accept_reserve() counter function argument doesn't need to be volatile.millert1-4/+3
Revision 1.21 removed the volatile from the cgi_inflight global but accept_reserve() was not updated to match. OK florian@
2021-01-08Provide "Point-to-Multipoint Layer 3 GRE tunnel interfaces (mgre) example"kn1-2/+63
From Pierre Emeriaud, thanks! Feeback jmc OK dlg
2021-01-08Make fts_{alloc,safe_changed}() const correcttb1-5/+5
Previously, this code was passing string constants to functions that did not declare their parameters as const. After this patch, the functions now declare that they do not modify these arguments, making it safe to pass string constants. Fixes -Wincompatible-pointer-types-discards-qualifiers. From Adam Barth <abarth google com> ok millert
2021-01-08Bump default datasize-max and datasize-cur since clang now seems tonaddy1-3/+3
require more than 768M to build itself.
2021-01-08Try to document struct ip_mreqnclaudio1-3/+16
With input from jmc@
2021-01-08avoid extra warnings if undefined values are encounteredespie1-2/+4
2021-01-08Lock kernel before raising SPL in klist_lock()visa1-3/+3
This prevents unwanted spinning with interrupts disabled. At the moment, this code is only invoked through klist_invalidate() and the callers should already hold the kernel lock. Also, one could argue that in MP-unsafe contexts klist_lock() should only assert for the kernel lock.
2021-01-08Fix boot-time crash on sparc64visa1-4/+15
On sparc64, initmsgbuf() is invoked before curcpu() is usable on the boot processor. Consequently, it is unsafe to use mutexes during the message buffer initialization. Avoid such use by skipping log_mtx when appending a newline from initmsgbuf(). Use mbp instead of msgbufp as the buffer argument to the putchar routine for consistency. Bug reported and fix suggested by miod@
2021-01-08Missed from last commit.nicm1-1/+2
2021-01-08Revert "Implement select(2) and pselect(2) on top of kqueue."visa1-148/+58
The use of kqueue as backend has introduced a significant regression in the performance of select(2), so go back to using the original code. Some additional management overhead is to be expected when using kqueue. However, the overhead of the current implementation is too high. Reported by bluhm@ on bugs@
2021-01-08Simplify the entity queue processing. There is no need to keep the entityclaudio1-74/+42
queue element around once it is sent to the parser process. Instead just keep a count of pending entities and make the parser send back the entity type instead of the id (since this is the only field needed to figure out what to do). OK job@
2021-01-08With incremental search, start empty and only repeat the previous searchnicm2-17/+37
if the user tries to search again with an empty prompt. This matches emacs behaviour more closely.
2021-01-08Start using the ibuf API (ibuf_dynamic, ibuf_add, ibuf_close) for writingclaudio10-238/+246
data between processes. This completely decouples the write side. rpki-client can't really use the imsg framework but it can use the ibuf bits wich imsg is built on. OK benno@ job@