jsing [Thu, 30 Aug 2018 16:56:16 +0000 (16:56 +0000)]
Nuke ssl_pending/ssl_shutdown function pointers.
ssl3_pending() is used for all protocols and dtls1_shutdown() just calls
ssl3_shutdown(), so just call the appropriate function directly instead.
ok beck@ inoguchi@ tb@
patrick [Thu, 30 Aug 2018 14:39:46 +0000 (14:39 +0000)]
Move .dynstr before _edata to fix image size calculation. The PE
header contains an image size field that is calculated using the
difference between the start of the header and edata. Since we
copy out .dynstr into the EFI binary, make sure that .dynstr is
before edata so that it's included in the image size. This makes
it consistent with efiboot on armv7.
ok kettenis@
krw [Thu, 30 Aug 2018 13:07:19 +0000 (13:07 +0000)]
Practice safe free()'ing by setting alloc to NULL to
prevent double free.
Spotted by jsg@, simpler fix by myself and miko@.
ok jsg@
krw [Thu, 30 Aug 2018 12:30:08 +0000 (12:30 +0000)]
Never let FS_RAID partition be named, a.k.a. given a mount point.
Nuke pointless and inconsistant error message before one get_mp()
invocation.
ok otto@
jsg [Thu, 30 Aug 2018 12:25:40 +0000 (12:25 +0000)]
fix double free in mib_carpgroupget() error path
ok claudio@ miko@
jsg [Thu, 30 Aug 2018 12:14:30 +0000 (12:14 +0000)]
fix memory leak in an error path
ok patrick@
eric [Thu, 30 Aug 2018 11:58:01 +0000 (11:58 +0000)]
fix use-after-free
spotted by jsg@
input from jsg@ miko@
jmatthew [Thu, 30 Aug 2018 11:18:21 +0000 (11:18 +0000)]
Set up an aggregation buffer ring and configure placement mode so data
that doesn't fit in the rx buffer goes into an aggregation buffer,
allowing jumbo frames to be received. Using 8k aggregation buffers
means we'll only ever need one per packet.
When receiving jumbos, sometimes we get an interrupt before all three
of the completion events are ready, in which case we should not consume
the events that are ready. Expanding the completion ring makes this
happen less frequently, so allocate four cp ring pages instead of one.
kettenis [Thu, 30 Aug 2018 10:11:34 +0000 (10:11 +0000)]
Move softbutton check before the check that skips attaching certain acpi
devices. Fixes regression caused by matching on _CID in addition to
matching on _HID.
ok matthieu@, mlarkin@
claudio [Thu, 30 Aug 2018 08:30:05 +0000 (08:30 +0000)]
Use past tense for treated as withdrawn since the withdraw happened in the past.
From and with jmc@
anton [Thu, 30 Aug 2018 06:16:30 +0000 (06:16 +0000)]
Remove dead code related to tty allocation for ptys. Back in revision 1.17 of
kern/tty_pty.c, allocation of ptys was made dynamic with the introduction of
check_pty(). Every time a new struct pty is allocated its corresponding struct
tty is also allocated. It's therefore no longer necessary to ensure that a pty
has a tty allocated after calling check_pty().
ok deraadt@ millert@ mpi@ visa@
visa [Thu, 30 Aug 2018 03:30:25 +0000 (03:30 +0000)]
Split the system-wide list of all futexes into process-specific lists
of private futexes and a shared list of shared futexes. This speeds up
futex lookups.
Tested by and OK krw@
OK mpi@
jcs [Thu, 30 Aug 2018 03:26:08 +0000 (03:26 +0000)]
/dev/usbN devices no longer support poll as of 2011 when "USB
events" were ripped out, so remove the sentence about monitoring for
USB device attachment to avoid filling developers with hope only to
crush their spirit when they implement the poll code only to find
out it doesn't do anything at all.
yasuoka [Thu, 30 Aug 2018 01:32:53 +0000 (01:32 +0000)]
Fix "route add 0.0.0.0/0 <gateway>" to work properly. Shift count
beyonds the integer width results undefined behavior in C spec.
Actually the count is masked by 0x1f on amd64. Found by asou at
soum.co.jp
ok claudio kn schwarze
kettenis [Wed, 29 Aug 2018 20:18:14 +0000 (20:18 +0000)]
Remove unused struct member.
ok deraadt@, mlarkin@
claudio [Wed, 29 Aug 2018 19:52:23 +0000 (19:52 +0000)]
Introduce 'bgpctl show rib error' to show all prefixes that got flagged
invalid because of a soft parsing error. These prefixes are never eligible
or valid but the listing may help to understand what is going on.
'bgpctl show rib error' run automatically on Adj-RIB-In since that is the only
RIB that has such prefixes.
OK sthen@ denis@
claudio [Wed, 29 Aug 2018 19:47:47 +0000 (19:47 +0000)]
Make it possible to filter the RIB for invalid path which resulted in withdrawn
prefixes. This way it should be possible to inspect which prefixes have been
removed. While there also fix dumping of the Adj-RIB-In when requested to do so.
OK sthen@ denis@
tb [Wed, 29 Aug 2018 19:22:32 +0000 (19:22 +0000)]
AES is now done also.
tb [Wed, 29 Aug 2018 19:20:22 +0000 (19:20 +0000)]
Pass algorithm as a string to all *TestGroup functions for consistency.
tb [Wed, 29 Aug 2018 19:18:20 +0000 (19:18 +0000)]
Run Wycheproof AES-GCM testvectors against libcrypto.
tb [Wed, 29 Aug 2018 19:00:41 +0000 (19:00 +0000)]
Calculate and check tag during AES-CCM encryption test.
tb [Wed, 29 Aug 2018 18:59:22 +0000 (18:59 +0000)]
typo
tb [Wed, 29 Aug 2018 18:58:46 +0000 (18:58 +0000)]
Don't fatal on keys of invalid sice, just print an INFO.
nicm [Wed, 29 Aug 2018 18:54:23 +0000 (18:54 +0000)]
Reset line flag when clearing selection, GitHub issue 1454.
eric [Wed, 29 Aug 2018 17:56:17 +0000 (17:56 +0000)]
clean up the imsg structure for getnameinfo lookup results.
fix a crash with ill-configured reverse address.
found by jturner@
ok jturner@ gilles@
anton [Wed, 29 Aug 2018 17:47:07 +0000 (17:47 +0000)]
recognize kcov ioctl commands; ok deraadt@ mpi@ visa@
robert [Wed, 29 Aug 2018 15:56:46 +0000 (15:56 +0000)]
make ld.so build reproducible by including a FILE symbol and by removing
-x from ld; this is only used for syspatch creation so builds are still
randomized just as before
ok guenther@
jca [Wed, 29 Aug 2018 13:47:19 +0000 (13:47 +0000)]
Better description for inet6 eui64, plus consistency tweaks
from Callum R. Davies, ok jmc@
claudio [Wed, 29 Aug 2018 11:46:28 +0000 (11:46 +0000)]
When 'log updates' is enabled make sure that the case of an invalid path
can be distinguished from a withdraw that was caused by a deny filter.
OK sthen@
claudio [Wed, 29 Aug 2018 11:43:15 +0000 (11:43 +0000)]
When checking for AS 0 make sure the full ASPATH is validated and don't
return on the first 0. The other AS_ERR_SOFT cases do the same and ensure
that an ASPATH with an AS_ERR_SOFT is still valid enough for subsequent
manipulation or inspection.
OK benno@
krw [Wed, 29 Aug 2018 11:30:48 +0000 (11:30 +0000)]
Historically /etc/netstart (and the equivalent code in the install
script) did 'ifconfig <if> down' before starting dhclient(8). This was
a way of ensuring old running copies of dhclient were killed before a
new one started. Current dhclient does not need this assist, so change
"ifconfig <if> down" to "ifconfig <if> up" pending further script
optimizations.
Similar to a 2014 attempt by halex@. Prompted by a misc@ report
from Kristjan Komlosi reporting hanging diskless setups.
ok halex@ kn@
nicm [Wed, 29 Aug 2018 09:50:32 +0000 (09:50 +0000)]
Keep any text killed in the command prompt with C-w and yank it with
C-y, only use the top buffer if no text has previously been killed. This
and previous change promped by discussion with kn@.
nicm [Wed, 29 Aug 2018 08:56:51 +0000 (08:56 +0000)]
Add C-Left and C-Right as aliases for M-b and M-f.
claudio [Wed, 29 Aug 2018 08:51:49 +0000 (08:51 +0000)]
Adjust comment to make it clear that a NULL nexthop is actually eligable
remi [Wed, 29 Aug 2018 08:43:16 +0000 (08:43 +0000)]
Prevent ospfd from starting if another ospfd is already using the same
socket. The check on the control socket happens early so that the rc
scripts detect a failure.
OK claudio@ florian@
reyk [Wed, 29 Aug 2018 07:50:16 +0000 (07:50 +0000)]
Add set-case-replaced to toggle case-preserving replace on or off.
By default, replacing "foo" with "bar" turns "FOO" into "BAR".
With case-replace turned off, "FOO" will turn into "bar".
OK florian@ tb@
anton [Wed, 29 Aug 2018 06:04:46 +0000 (06:04 +0000)]
Initialize device numbers for newly allocated ptys. Prevents a panic caused by
the following: a new pty is allocated in which the kernel console output is
redirected to, poll(2):ing from /dev/console at this point would be delegated to
the device with the major number taken from the pty due to the earlier
redirection. Since the pty does not have its correct device major assigned, the
wrong device ends up being used.
ok deraadt@ millert@
pd [Wed, 29 Aug 2018 04:51:12 +0000 (04:51 +0000)]
First pass in bringing i386 in sync with amd64. This does not yet work, but is
being committed now so we can work on the rest in-tree.
ok mlarkin@
dlg [Wed, 29 Aug 2018 02:03:12 +0000 (02:03 +0000)]
move the todr chip handle into a prtc_softc structure
no realy change, this avoid having to allocate the todr struct in attach
ok deraadt@
tb [Tue, 28 Aug 2018 18:28:30 +0000 (18:28 +0000)]
Run Wycheproof AES-CMAC testvectors against libcrypto.
tb [Tue, 28 Aug 2018 18:25:33 +0000 (18:25 +0000)]
remove some extra parens and fix some other formatting issues
pointed out by gofmt (thanks anton)
job [Tue, 28 Aug 2018 17:52:16 +0000 (17:52 +0000)]
Unclutter bgpd.conf example config file
We're aiming to work towards an examples/bgpd.conf file that is a good starting
point for real world deployments rather than a showcase of all capabilities
bgpd(8) has.
OK deraadt@ claudio@
tb [Tue, 28 Aug 2018 17:47:29 +0000 (17:47 +0000)]
Remove extra "and" in "These functions and have been available"
tb [Tue, 28 Aug 2018 17:45:50 +0000 (17:45 +0000)]
zap trailing whitespace
mpi [Tue, 28 Aug 2018 15:17:56 +0000 (15:17 +0000)]
Display per-TDB counters in verbose mode.
ok sthen@
mpi [Tue, 28 Aug 2018 15:15:02 +0000 (15:15 +0000)]
Add per-TDB counters and a new SADB extension to export them to
userland.
Inputs from markus@, ok sthen@
cheloha [Tue, 28 Aug 2018 14:30:48 +0000 (14:30 +0000)]
Drop SSLv2, SSLv3 support.
No need to check for SSLv2/3 sessions when printing the tally mark.
Also do SSLv23_client_method -> TLS_client_method.
ok jsing@
krw [Tue, 28 Aug 2018 12:40:54 +0000 (12:40 +0000)]
Tweak messages emitted by editor_resize() so "Partition x shrunk ..."
is only printed if the disklabel gets modified. Also, include the new
size.
On failure just report "Amount too big.".
mestre [Tue, 28 Aug 2018 12:25:53 +0000 (12:25 +0000)]
fix misplaced parenthesis inside if-clause. it's harmless and the only issue is
showing an unknown error (since it's not defined) during fatal(), if it ever
an error occurs inside that condition.
OK deraadt@ markus@ djm@
mestre [Tue, 28 Aug 2018 12:17:45 +0000 (12:17 +0000)]
fix build with DEBUG_PK enabled
OK dtucker@
jsg [Tue, 28 Aug 2018 09:35:35 +0000 (09:35 +0000)]
avoid uninitialised variable use
ok patrick@ kettenis@
jsg [Tue, 28 Aug 2018 09:33:18 +0000 (09:33 +0000)]
avoid uninitialised variable use in an error path
ok kettenis@
beck [Tue, 28 Aug 2018 02:51:55 +0000 (02:51 +0000)]
Fix stat of path components - this was breaking chrome - because the
final directory in a name unveil was not being added with UNVEIL_INSPECT
if it was not already unveiled. Now passes just added regress test for
this case
beck [Tue, 28 Aug 2018 02:49:47 +0000 (02:49 +0000)]
Add regress test of stat all the way to a nonexistant terminal
cheloha [Tue, 28 Aug 2018 02:14:22 +0000 (02:14 +0000)]
Check for SSL_write(3) error.
jsing@ notes that this is not a complete solution, as we don't
account for retries or partial writes, but that this is a step
in a right direction.
May want to revisit this later to provide a complete solution.
ok jsing@
deraadt [Tue, 28 Aug 2018 01:23:34 +0000 (01:23 +0000)]
sync
dlg [Tue, 28 Aug 2018 00:00:42 +0000 (00:00 +0000)]
add support for storing the time of day on OPL based machines.
this let's me pull the date back from 2023 to 2018, and have it
stay like that after a reboot.
ok deraadt@
schwarze [Mon, 27 Aug 2018 23:12:57 +0000 (23:12 +0000)]
Reduce excessive right padding in tagged list heads.
The 1.2em was an approximate equivalent of the 2n traditionally used
for terminal display, but it is much too wide for HTML rendering.
Issue reported by mikeb@.
kettenis [Mon, 27 Aug 2018 21:56:31 +0000 (21:56 +0000)]
hitemp(4)
tb [Mon, 27 Aug 2018 21:27:39 +0000 (21:27 +0000)]
tweak failure messages
tb [Mon, 27 Aug 2018 21:24:13 +0000 (21:24 +0000)]
dedup AES-CBC-PKCS5 encryption and decryption checks
kettenis [Mon, 27 Aug 2018 21:12:28 +0000 (21:12 +0000)]
hitemp(4)
kettenis [Mon, 27 Aug 2018 21:09:47 +0000 (21:09 +0000)]
Add hitemp(4), a driver for the temperature sensors on the HiSilicon Hi3660
and Hi3670 SoCs.
tb [Mon, 27 Aug 2018 21:02:25 +0000 (21:02 +0000)]
2x missing "..."
tb [Mon, 27 Aug 2018 20:58:02 +0000 (20:58 +0000)]
Run Wycheproof AES-CCM testvectors against libcrypto.
jmc [Mon, 27 Aug 2018 20:36:49 +0000 (20:36 +0000)]
sort SEE ALSO;
kettenis [Mon, 27 Aug 2018 20:13:16 +0000 (20:13 +0000)]
Add 64-bit DMA support. Enable DMA on HiSilicon SoCs.
ok patrick@
kettenis [Mon, 27 Aug 2018 20:09:29 +0000 (20:09 +0000)]
rkdwusb(4)
kettenis [Mon, 27 Aug 2018 20:05:56 +0000 (20:05 +0000)]
hiclock(4), hidwusb(4) and hireset(4)
kettenis [Mon, 27 Aug 2018 20:05:06 +0000 (20:05 +0000)]
Add hiclock(4). Make sure hireset(4) attaches early.
jcs [Mon, 27 Aug 2018 19:32:48 +0000 (19:32 +0000)]
move bwfm* at pci? to the wireless section
claudio [Mon, 27 Aug 2018 19:32:37 +0000 (19:32 +0000)]
If the maximum for a community is defined via the large flag then
this maximum should also be passed to strtonum() instead of UINT_MAX
or the error handling does not work.
jsing [Mon, 27 Aug 2018 17:11:32 +0000 (17:11 +0000)]
n2s and l2n3 finally bite the dust!
jsing [Mon, 27 Aug 2018 17:04:34 +0000 (17:04 +0000)]
Convert ssl3_get_cert_verify() to CBS and clean up somewhat.
ok inoguchi@
jsing [Mon, 27 Aug 2018 16:56:46 +0000 (16:56 +0000)]
Dedup DTLS header writing code and convert to CBB.
There are three versions of the DTLS header writing code, which primarily
differ by the fragment offset and fragment length values that differ.
Rework dtls1_write_message_header() such that it can be used in all three
cases and convert it to CBB in the process.
ok inoguchi@ tb@
jsing [Mon, 27 Aug 2018 16:48:12 +0000 (16:48 +0000)]
Add some missing statics.
jsing [Mon, 27 Aug 2018 16:42:48 +0000 (16:42 +0000)]
Simplify new session ticket encoding/generation.
The original code did a crazy encode/malloc/encode/decode/modify/encode
dance, in order to encode a session in the form needed to encrypt then add
to a session ticket. By modifying the encoding functions slightly, we can
do this entire dance as a single encode.
Inspired by similar changes in BoringSSL.
ok inoguchi@ tb@
anton [Mon, 27 Aug 2018 15:57:39 +0000 (15:57 +0000)]
Rename struct kd -> kcov_dev. The terse name was initially fine since it wasn't
used outside of dev/kcov.c. Nowadays, struct proc includes a kcov pointer and it
therefore deserves a more descriptive name.
Prodded by visa@; ok deraadt@ visa@
kettenis [Mon, 27 Aug 2018 15:56:22 +0000 (15:56 +0000)]
Enable hireset(4).
jsing [Mon, 27 Aug 2018 15:42:39 +0000 (15:42 +0000)]
Fix formatting and grammatical issues with the description of how to use
i2d_SSL_SESSION. Also rework the example code so that it is clearer and
uses more appropriate names.
Input from and ok schwarze@, tb@
kettenis [Mon, 27 Aug 2018 14:12:59 +0000 (14:12 +0000)]
Add hirest(4), a driver to support reset signal controller blocks on
HiSilicon SoCs.
kettenis [Mon, 27 Aug 2018 13:56:11 +0000 (13:56 +0000)]
Add glue for the USB3 controller on the HiKey 970.
krw [Mon, 27 Aug 2018 13:09:51 +0000 (13:09 +0000)]
disklabel(8) no longer touches bootstrap code so stop mentioning it.
The MD writedisklabel() function ensures the disklabel does not
intrude on bootstraps.
Add a Xr to installboot(8), which does bootstrappy stuff these days.
ok jmc@
claudio [Mon, 27 Aug 2018 12:15:20 +0000 (12:15 +0000)]
Undefined plans can never match. Check for that before trying to use the plan.
OK millert@ gsoares@
claudio [Mon, 27 Aug 2018 11:43:36 +0000 (11:43 +0000)]
Wrap some overly long lines. No functional change
nicm [Mon, 27 Aug 2018 11:03:34 +0000 (11:03 +0000)]
Memory leaks, from Gang Fan in GitHub issue 1453.
jsg [Mon, 27 Aug 2018 10:17:35 +0000 (10:17 +0000)]
ompinmux has been replaced by pinctrl
jsg [Mon, 27 Aug 2018 10:05:18 +0000 (10:05 +0000)]
switch from ompinmux to pinctrl
ok kettenis@
jsg [Mon, 27 Aug 2018 10:03:35 +0000 (10:03 +0000)]
handle 16 bit register width required for omap3/omap4
ok kettenis@
kettenis [Mon, 27 Aug 2018 10:03:26 +0000 (10:03 +0000)]
Enable radeondrm(4). Note that on arm64 we do not yet have a way to
determine whether radeondrm(4) is the console or not. So leave out the
bits that try to make sure the console ends up with drm0/wsdisplay0 that
we have on other platforms.
claudio [Mon, 27 Aug 2018 09:49:00 +0000 (09:49 +0000)]
merge_filterset() needs to produce a stable sorted filterset to make sure
the RDE can compare the sets on reload and skip those that did not change.
For large communities the check is wrong and incomplete, replace it with
a simple memcmp() of the structs which will result in a stable order.
OK phessler@
kettenis [Mon, 27 Aug 2018 09:30:07 +0000 (09:30 +0000)]
Add an interface that allows drivers to claim a framebuffer and check
whether another driver has already claimed a framebuffer. Use this in
radeondrm(4) and simplefb(4) to prevent the latter from attaching if
radeondrm(4) is attached to the hardware that provides the framebuffer
set up by the firmware.
ok mlarkin@
inoguchi [Mon, 27 Aug 2018 06:50:13 +0000 (06:50 +0000)]
Add protocol and cipher patterns in regress appstest.sh
kettenis [Mon, 27 Aug 2018 06:43:28 +0000 (06:43 +0000)]
HiSilicon SoCs pre-divide the clock by a factor 8.
mpi [Sun, 26 Aug 2018 22:30:00 +0000 (22:30 +0000)]
Do not add ::1 on non-default lo(4) as intended.
Reported by and ok sthen@
deraadt [Sun, 26 Aug 2018 22:23:22 +0000 (22:23 +0000)]
sync
krw [Sun, 26 Aug 2018 22:06:50 +0000 (22:06 +0000)]
disklabel(8) has not used the primary/secondary boot files
for years. Remove mention of same from 'FILES' section.
deraadt [Sun, 26 Aug 2018 20:44:03 +0000 (20:44 +0000)]
syncd
jmc [Sun, 26 Aug 2018 20:36:57 +0000 (20:36 +0000)]
less uppercase in Nd;
kettenis [Sun, 26 Aug 2018 19:54:39 +0000 (19:54 +0000)]
pinctrl(4)