summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-04-18unfold some compound operations to make this easier to followtedu1-6/+11
2019-04-18Always check for namespace collisions on table commandskn1-3/+3
`-t table -T add|replace ...' would only check for duplicate tables in case addresses where actually to the table. Instead of using a positive number of added addresses as prove for successful table operations, rely on the fact that CREATE_TABLE() is guaranteed to be called only if pf(4) can be accessed, that is warn_duplicate_tables() will return. This improves duplicate detection rate as warnings are now also emitted even when table commands eventually leave tables unchanged. OK benno sashan
2019-04-18Fix table definition parsing as unprivileged userkn1-2/+7
revision 1.689 introduced warn_duplicate_tables() unconditionally, breaking the parser on tables withs insufficient permissions to open pf(4): $ echo 'table <t>' | pfctl -nf- pfctl: pfr_get_tables: Bad file descriptor So simply check whether pfctl is able to get the table list first. If not, instead of silently avoiding namespace collision checks, print a brief notice iff `-v' is given to help finding duplicate definitions by hand: $ echo 'table <t>' | ./obj/pfctl -vnf- table <t> stdin:1: skipping duplicate table checks for <t> Reported by Rivo Nurges, thanks! OK benno sashan
2019-04-18Add tests for sshd -T -C with Match.dtucker1-3/+46
2019-04-18When running sshd -T, assume any attibute not provided by -C does not match,dtucker3-10/+15
which allows it to work when sshd_config contains a Match directive with or without -C. bz#2858, ok djm@
2019-04-18vmm(4): whitespace fixmlarkin1-9/+9
2019-04-18Copy the code to infer the option type to show-options and document it.nicm2-51/+102
2019-04-18Pass target client and session to load_cfg from source-file so formatsnicm2-12/+24
work. Reported by Thomas Sattler.
2019-04-18Update session activity on focus event, from tafryn at gmail dot com.nicm1-1/+2
2019-04-18Remove crc32.{c,h} which were only used by the now-gone SSH1 protocol.dtucker4-140/+2
Patch from yumkam at gmail.com, ok deraadt.
2019-04-17Remove unused parameter from virtio_init_vq()sf1-5/+5
2019-04-17Initialize virtqueue before passing it to devicesf1-3/+2
Reported by Gary Zibrat
2019-04-17signpost the location of the text explaining routing table output a little better...jmc2-5/+8
2019-04-17remove some unneccessary baggage: Nm does not require an argument,jmc1-11/+9
and the Bk/Ek invocation here is no longer neccessary;
2019-04-17Switch powerpc to big PIC. This is necessary to build libc++abi and libc++kettenis1-2/+3
since clang doesn't seem to support secure-plt for small pic. ok deraadt@, millert@
2019-04-17mark up punctuation-as-macro-args properly;jmc1-4/+4
2019-04-17Fix minimum size check on split and size of first cell on spread outnicm1-9/+23
with a pane status line.
2019-04-17Rewrite main-vertical and horizontal to use the common spread out codenicm1-171/+77
and to handle the case where the panes won't fit into the existing window size.
2019-04-17Set the window size as well as the layout size when using the presetnicm5-13/+36
layouts.
2019-04-17Do not let the size of the pane status screen go negative.nicm1-2/+5
2019-04-17Document that switch-client can change all of session,window,pane andnicm2-4/+12
check for % in the target as well as ":.".
2019-04-17Break new window and pane creation common code from various commands andnicm22-634/+730
window.c into a separate file spawn.c.
2019-04-17retguard-cookie-in-register is slightly unstable on arm64, so surgicallyderaadt2-2/+2
disable it in upcoming 6.5 release. (phessler and mortimer have the details)
2019-04-17fix spelling in pkg_add output: tieing -> tyingstsp1-2/+2
ok espie@
2019-04-17myx can't reconfigure xfp/sfp/sfp+ modulesdlg1-2/+11
2019-04-17don't lose the TTL on FAT labelsdlg1-2/+2
2019-04-17use txprio to control the use of exp as a priority fielddlg3-13/+139
by default txprio is set to 0, so the exp field will be 0. howerver, txprio on mpe/mpw/mpip can be configured with other values or settings like our other tunnel or encapsulation interfaces. intermediate LSPs can use the exp field to manage their prioritisation of encapsulated traffic.
2019-04-16document where multiline {} is applicable;jmc1-3/+10
lack of documentation and original diff provided by alfred morgan; benno helped me track down the applicable options; ok benno
2019-04-16Rewrite & fix X509V3_add_value()tb1-17/+24
X509V3_add_value() helpfully allocates a STACK_OF(CONF_VALUE) if it receives a pointer to a NULL pointer. If anything fails along the way, it is however the caller's responsibility to free it. This can easily be fixed by freeing *extlist in the error path and zeroing it to avoid a double free if there happens to be a caller out there that avoids the leak. Polish a few things so the function conforms a bit better to our usual style. tweak & ok jsing
2019-04-16indent err: labelstb1-7/+7
2019-04-16wrap an overlong line and kill a space before a tabtb1-3/+4
2019-04-16Move function types to their own lines; rewrap.tb1-30/+40
2019-04-16When we encounter ppb(4)s that are not configured we allocate a rangepatrick1-1/+12
of bus numbers from the parent's bus extent. On detach, which can happen with hotplug-able devices, we should free those busses. ok kettenis@
2019-04-16When entering kernel pages uncached we need to make sure to flush thepatrick1-1/+3
caches. If the physical page was previously used by userland it is likely that this page is still in the cache and writing to the newly mapped page could result in unexpected behaviour. ok kettenis@
2019-04-16elfrdsetroot is now rdsetroot(8).sunil1-8/+5
ok deraadt
2019-04-16Prevent attaching drivers to devices for which we attached a driver early.kettenis2-4/+24
ok patrick@, dlg@, visa@
2019-04-16Use the actual cluster size instead of fixed MCLBYTES for theyasuoka1-2/+3
condition in sb_compress(). Currently the actual cluster size might be 9KB even if the mtu is 1500, in this case a lot of memory space had been wasted, since sbcompress() doesn't compress because of previous condition. ok dlg claudio
2019-04-16Prevent attaching drivers to devices for which we attached a driver early.kettenis2-4/+24
ok patrick@, dlg@, visa@
2019-04-16i2c reads are more reliable a byte at a time.dlg1-13/+13
reading all 256 at a time was a nice idea, but meant page 0xa2 wasnt appearing like it should. this follows what freebsd does more closely too.
2019-04-16make sff page reads work on little endian archs too. like amd64.dlg1-7/+7
some modules seem to need more time when waiting for bytes while here. hrvoje popovski hit the endian issue
2019-04-16restore some missing error handlingdlg1-2/+3
2019-04-16Rewrite using libelf(3).sunil6-499/+181
Lots of help with build/tests on sparc64 from jsg@, thank you. ok deraadt
2019-04-16have another go at tx mitigationdlg4-10/+46
the idea is to call the hardware transmit routine less since in a lot of cases posting a producer ring update to the chip is (very) expensive. it's better to do it for several packets instead of each packet, hence calling this tx mitigation. this diff defers the call to the transmit routine to a network taskq, or until a backlog of packets has built up. dragonflybsd uses 16 as the size of it's backlog, so i'm copying them for now. i've tried this before, but previous versions caused deadlocks. i discovered that the deadlocks in the previous version was from ifq_barrier calling taskq_barrier against the nettq. interfaces generally hold NET_LOCK while calling ifq_barrier, but the tq might already be waiting for the lock we hold. this version just doesnt have ifq_barrier call taskq_barrier. it instead relies on the IFF_RUNNING flag and normal ifq serialiser barrier to guarantee the start routine wont be called when an interface is going down. the taskq_barrier is only used during interface destruction to make sure the task struct wont get used in the future, which is already done without the NET_LOCK being held. tx mitigation provides a nice performanace bump in some setups. up to 25% in some cases. tested by tb@ and hrvoje popovski (who's running this in production). ok visa@
2019-04-15moving BPF to RCUsashan2-104/+109
OK visa@
2019-04-15introduce 'pfctl -FR' to reset settings to defaultssashan2-5/+50
(discussed with many at tech@) OK deraadt@, kn@, sthen@, tedu@
2019-04-15Avoid signed integer overflow.jsing1-2/+2
Fixes oss-fuzz issue #13843. ok tb@
2019-04-15Remove old vlan and [-]vlandev codekn1-90/+5
These were deprecated with 6.3, but instead of removing them all together, keep [-]vlan and [-]vlandev as aliases for [-]vnetid and [-]parent. Alias idea from sthen OK dlg sthen benno
2019-04-15ethtool indicates that QSFP, QSFP+ and QSFP28 are all SFF-8636 compat.dlg1-1/+3
2019-04-15follow the basic xfp support with basic qsfp+ supportdlg1-29/+51
qsfp was originally defined in SFF-8436, but the management interface now seems to be managed in SFF-8636, so this uses sff8636 as a prefix for qsfp things. the same spec applies to qsfp+ and probably qsfp28. XFP and QSFP share a bunch of offsets for where strings are located, so this factors out the printing of those strings from the xfp code and uses it from both the xfp and qsfp handling. i have a qsfp+ to 4x sfp+ cable that looks like this with the new code: transceiver: QSFP+ model: Amphenol 601110005 rev A serial: CN0HVVVFxxxxxxx date: 2013-04-18 if i ever get a pair of optics i can work on the diags
2019-04-15Use literals as format strings. This fixes an error reported by clang.visa1-2/+2
OK deraadt@ millert@ kettenis@