openbsd
6 years agoAdd C-g at command prompt for emacs people, GitHub issue 1213.
nicm [Mon, 1 Jan 2018 11:03:54 +0000 (11:03 +0000)]
Add C-g at command prompt for emacs people, GitHub issue 1213.

6 years agofree(9) sizes for sys_execve.
florian [Mon, 1 Jan 2018 09:01:21 +0000 (09:01 +0000)]
free(9) sizes for sys_execve.

Convert the hand rolled loop to strlcpy which gives us the size for
free(9).

OK visa

6 years agoWe are either allocating 2 or three array members. Unroll while loop
florian [Mon, 1 Jan 2018 08:55:43 +0000 (08:55 +0000)]
We are either allocating 2 or three array members. Unroll while loop
to be able to call free(9) with sizes.

off-by-one pointed out by guenther
OK visa

6 years agocopyright++;
jsg [Mon, 1 Jan 2018 08:23:19 +0000 (08:23 +0000)]
copyright++;

6 years agoInitialize the size of new panes created by the even-* layout correctly;
nicm [Sun, 31 Dec 2017 20:00:44 +0000 (20:00 +0000)]
Initialize the size of new panes created by the even-* layout correctly;
reported by Andreas Kahari and Anton Lindqvist.

6 years agosxitemp(4)
kettenis [Sun, 31 Dec 2017 15:55:02 +0000 (15:55 +0000)]
sxitemp(4)

6 years agoAdd Allwinner R40/V40 support.
kettenis [Sun, 31 Dec 2017 15:41:25 +0000 (15:41 +0000)]
Add Allwinner R40/V40 support.

6 years agoImplement R40/V40 thermal sensor clock.
kettenis [Sun, 31 Dec 2017 15:35:09 +0000 (15:35 +0000)]
Implement R40/V40 thermal sensor clock.

6 years agoEnable sxitemp(4).
kettenis [Sun, 31 Dec 2017 13:54:48 +0000 (13:54 +0000)]
Enable sxitemp(4).

6 years agoAdd sxitemp(4), a driver for the temperature sensors on the Allwinner H5 SoC.
kettenis [Sun, 31 Dec 2017 13:54:09 +0000 (13:54 +0000)]
Add sxitemp(4), a driver for the temperature sensors on the Allwinner H5 SoC.

6 years agoImplement H3/H5 thermal sensor clocks.
kettenis [Sun, 31 Dec 2017 13:52:18 +0000 (13:52 +0000)]
Implement H3/H5 thermal sensor clocks.

6 years agoEnable sypwr(4).
kettenis [Sun, 31 Dec 2017 11:14:31 +0000 (11:14 +0000)]
Enable sypwr(4).

6 years agoAdd sypwr(4), a driver for the Silergy SY8106A regulator found on many boards
kettenis [Sun, 31 Dec 2017 11:13:59 +0000 (11:13 +0000)]
Add sypwr(4), a driver for the Silergy SY8106A regulator found on many boards
using the Allwinner H3/H5 SoC.

6 years agoImplement H3/H5 CPU clock.
kettenis [Sun, 31 Dec 2017 10:54:39 +0000 (10:54 +0000)]
Implement H3/H5 CPU clock.

6 years agoRemove an unused variable and instruct lex not to produce the input() function
anton [Sun, 31 Dec 2017 09:40:41 +0000 (09:40 +0000)]
Remove an unused variable and instruct lex not to produce the input() function
since it's never used; ok guenther@

6 years agoTighten the permissions used in the early stage page tables somewhat.
kettenis [Sun, 31 Dec 2017 08:42:04 +0000 (08:42 +0000)]
Tighten the permissions used in the early stage page tables somewhat.
Add an interface to establish additional VA=PA 1G block mappings for use by
upcoming EFI runtime services support.

ok guenther@

6 years agoDon't pull in <sys/file.h> just to get fcntl.h
guenther [Sat, 30 Dec 2017 23:08:29 +0000 (23:08 +0000)]
Don't pull in <sys/file.h> just to get fcntl.h

ok deraadt@ krw@

6 years agoDelete unnecessary <sys/file.h> includes
guenther [Sat, 30 Dec 2017 20:46:59 +0000 (20:46 +0000)]
Delete unnecessary <sys/file.h> includes

ok millert@ krw@

6 years agoSomewhow I botched rev 1.3, which has a = where a |= is needed. Fix this.
kettenis [Sat, 30 Dec 2017 19:04:00 +0000 (19:04 +0000)]
Somewhow I botched rev 1.3, which has a = where a |= is needed.  Fix this.

6 years agoAdd support for the USB PHY of the Allwinner R40/V40.
kettenis [Sat, 30 Dec 2017 16:32:52 +0000 (16:32 +0000)]
Add support for the USB PHY of the Allwinner R40/V40.

6 years agoImplement Allwinner A40/V40 support.
kettenis [Sat, 30 Dec 2017 16:30:37 +0000 (16:30 +0000)]
Implement Allwinner A40/V40 support.

6 years agoThe generic clock framework expects frequencies in Hz whereas the imx clock
kettenis [Sat, 30 Dec 2017 13:34:56 +0000 (13:34 +0000)]
The generic clock framework expects frequencies in Hz whereas the imx clock
code was providing them in kHz.  Get rid of this discrepancy.
Hook up the CPU clock to the generic clock framework and remove the
cpuspeed function as it is no longer needed.

ok patrick@

6 years agoAdd support for the PRCM clocks on Allwinner A23/A33.
kettenis [Sat, 30 Dec 2017 12:45:36 +0000 (12:45 +0000)]
Add support for the PRCM clocks on Allwinner A23/A33.

Tested by kevlo@

6 years agoAdd copyin32 implementation.
kettenis [Sat, 30 Dec 2017 10:20:34 +0000 (10:20 +0000)]
Add copyin32 implementation.

ok guenther@

6 years agoget_date(), from getdate.y, was last used in the sparc support, so zap it
guenther [Sat, 30 Dec 2017 10:10:34 +0000 (10:10 +0000)]
get_date(), from getdate.y, was last used in the sparc support, so zap it

ok kettenis@

6 years agoImplement CPU_BUSY_CYCLE and intr_disable/restore.
kettenis [Sat, 30 Dec 2017 08:39:49 +0000 (08:39 +0000)]
Implement CPU_BUSY_CYCLE and intr_disable/restore.

ok patrick@, tom@

6 years agoThe `F' option no longer disables delayed freeing; from kshe
otto [Sat, 30 Dec 2017 07:35:02 +0000 (07:35 +0000)]
The `F' option no longer disables delayed freeing; from kshe
Also, fix a verb-noun mixup; ok jmc@

6 years agobackslash also escapes newlines when quoted;
jmc [Sat, 30 Dec 2017 07:32:09 +0000 (07:32 +0000)]
backslash also escapes newlines when quoted;
from kshe

6 years agoSimplify switch by removing some unneeded cases.
tb [Sat, 30 Dec 2017 07:21:10 +0000 (07:21 +0000)]
Simplify switch by removing some unneeded cases.

from kshe

6 years agoAvoid one-byte overflow in error path. If the format string ends in an
tb [Sat, 30 Dec 2017 07:19:05 +0000 (07:19 +0000)]
Avoid one-byte overflow in error path. If the format string ends in an
invalid specifier like `%l', p will already point to the trailing NUL
upon entering the switch, wherein the instruction

*++p = '\0';

will write another NUL after it, but there is no guarantee that the
buffer extends beyond that first NUL; thus, in the rare case where it
does not, this assignment will write one byte past its end.

from kshe

6 years agoMake sure that pf_mbuf_link_state_key() does not overwrite an
bluhm [Fri, 29 Dec 2017 23:55:22 +0000 (23:55 +0000)]
Make sure that pf_mbuf_link_state_key() does not overwrite an
existing statekey in the mbuf header.  Reset the statekey in
m_dup_pkthdr().
suggested by and OK sahan@

6 years agoPrevent syspatch from running and throw an error out if reorder_kernel is
ajacoutot [Fri, 29 Dec 2017 18:56:36 +0000 (18:56 +0000)]
Prevent syspatch from running and throw an error out if reorder_kernel is
running. This is to prevent syspatch from installing new kernel object
files while reordering is in progress (typically after an install/upgrade
on slow machines).

req. by and OK sthen@

6 years agoMake the functions which link the pf state keys to mbufs, inpcbs,
bluhm [Fri, 29 Dec 2017 17:05:25 +0000 (17:05 +0000)]
Make the functions which link the pf state keys to mbufs, inpcbs,
or other states more consistent.
OK visa@ sashan@ on a previous version

6 years agoRemove the RK3399-specific cpuspeed implementation as the generic one works
kettenis [Fri, 29 Dec 2017 15:53:09 +0000 (15:53 +0000)]
Remove the RK3399-specific cpuspeed implementation as the generic one works
fine for this SoC.

6 years agoUse register_t instead of uint32_t in smc/hmc calls such that arguments
kettenis [Fri, 29 Dec 2017 14:45:15 +0000 (14:45 +0000)]
Use register_t instead of uint32_t in smc/hmc calls such that arguments
to SMC64 functions don't get truncated.  Implement support for the CPU_ON
call.

6 years agoAdd support for the CPU clock on the RK3288. Set its frequency to 1.2 GHz
kettenis [Fri, 29 Dec 2017 13:52:52 +0000 (13:52 +0000)]
Add support for the CPU clock on the RK3288.  Set its frequency to 1.2 GHz
on the Tinker-RK3288 such that things run a bit faster.

6 years agoVIA amd64 compatible CPUs support Enhanced SpeedStep, so reflect that
fcambus [Fri, 29 Dec 2017 13:27:36 +0000 (13:27 +0000)]
VIA amd64 compatible CPUs support Enhanced SpeedStep, so reflect that
in cpu.4.

OK visa@, sthen@, jmc@

6 years agoRemove unnecessary includes in the i386 version of the VIA PadLock
fcambus [Fri, 29 Dec 2017 13:24:11 +0000 (13:24 +0000)]
Remove unnecessary includes in the i386 version of the VIA PadLock
driver.

OK visa@, mlarkin@

6 years agoAdd rktemp(4).
kettenis [Fri, 29 Dec 2017 11:26:44 +0000 (11:26 +0000)]
Add rktemp(4).

6 years agoAdd RK3288 support.
kettenis [Fri, 29 Dec 2017 10:39:01 +0000 (10:39 +0000)]
Add RK3288 support.

6 years agosmall optimization in bexp; from kshe
otto [Fri, 29 Dec 2017 08:16:55 +0000 (08:16 +0000)]
small optimization in bexp; from kshe

6 years agoAdd support for the 2nd clock control module on the Allwinner H3/H5.
kettenis [Thu, 28 Dec 2017 18:11:13 +0000 (18:11 +0000)]
Add support for the 2nd clock control module on the Allwinner H3/H5.

6 years agoSeparate out Allwinner H3 and H5 pin definitions.
kettenis [Thu, 28 Dec 2017 18:05:09 +0000 (18:05 +0000)]
Separate out Allwinner H3 and H5 pin definitions.

6 years agoRemove duplicate includes from sxitwi(4)
tom [Thu, 28 Dec 2017 17:50:57 +0000 (17:50 +0000)]
Remove duplicate includes from sxitwi(4)

From Artturi Alm

6 years agoAdd RK3288 CPU core related clocks.
kettenis [Thu, 28 Dec 2017 15:06:24 +0000 (15:06 +0000)]
Add RK3288 CPU core related clocks.

6 years agoInitialise new_cipher in the serverhello TLS extensions test, to avoid a
jsing [Thu, 28 Dec 2017 12:52:45 +0000 (12:52 +0000)]
Initialise new_cipher in the serverhello TLS extensions test, to avoid a
NULL pointer dereference in ssl_using_ecc_cipher(). Some compilers avoid
triggering this, likely due to the EC formats list also being NULL.

While here, setup the EC formats list so that we actually include the EC
points format extension in the server hello extensions.

Found the hard way by bcook@

6 years agoRedrawing status is needed after changing window flags or title does not
nicm [Thu, 28 Dec 2017 12:10:50 +0000 (12:10 +0000)]
Redrawing status is needed after changing window flags or title does not
update if status line is off, GitHub issue 1191.

6 years agoSynch pin defenitions with Linux and add support for the Allwinner GR8 and
kettenis [Thu, 28 Dec 2017 11:39:11 +0000 (11:39 +0000)]
Synch pin defenitions with Linux and add support for the Allwinner GR8 and
Allwinner R40.

6 years agopf drops IPv4 packets with any options by default. For IPv6 the
bluhm [Thu, 28 Dec 2017 11:37:44 +0000 (11:37 +0000)]
pf drops IPv4 packets with any options by default.  For IPv6 the
same is already done for options header.  Add the routing extension
header to the list that need "allow-opts" to pass.
OK sashan@ visa@

6 years agoDelete information about bulk builds already found in bulk(8).
cheloha [Thu, 28 Dec 2017 04:42:40 +0000 (04:42 +0000)]
Delete information about bulk builds already found in bulk(8).

Direct the reader there instead.

ok espie@

6 years agoAdd size for free() in the AMD K10/K11 pstate driver.
fcambus [Wed, 27 Dec 2017 17:41:54 +0000 (17:41 +0000)]
Add size for free() in the AMD K10/K11 pstate driver.

It was done already on i386, but not on amd64.

OK brynet@

6 years agolog specific error when connect() fails.
benno [Wed, 27 Dec 2017 15:53:30 +0000 (15:53 +0000)]
log specific error when connect() fails.
ok claudio@, feedback bluhm@

6 years agoAdd sizes for free() in the Geode LX Security Block crypto accelerator.
fcambus [Wed, 27 Dec 2017 15:10:16 +0000 (15:10 +0000)]
Add sizes for free() in the Geode LX Security Block crypto accelerator.

OK visa@

6 years agoInitialize memhook such that /dev/mem access doesn't attempt to map pages
kettenis [Wed, 27 Dec 2017 14:13:05 +0000 (14:13 +0000)]
Initialize memhook such that /dev/mem access doesn't attempt to map pages
at address zero.  Spotted by Artturi Alm.

ok patrick@

6 years agoTurns out linker scripts in lld are still subtly broken and aligning
kettenis [Wed, 27 Dec 2017 13:57:40 +0000 (13:57 +0000)]
Turns out linker scripts in lld are still subtly broken and aligning
sections doesn't work when the -r option is used.  Disable the unmapping
code again until lld gets fixed.

6 years agoDraw command prompt correctly with status line off.
nicm [Wed, 27 Dec 2017 13:55:42 +0000 (13:55 +0000)]
Draw command prompt correctly with status line off.

6 years agoMake octeon_intr_establish() assume edge triggering with CIU3.
visa [Wed, 27 Dec 2017 13:16:53 +0000 (13:16 +0000)]
Make octeon_intr_establish() assume edge triggering with CIU3.
This makes the API usable with edge triggered interrupt sources.

6 years agoEnsure interrupt delivery is disabled when setting interrupt
visa [Wed, 27 Dec 2017 13:14:42 +0000 (13:14 +0000)]
Ensure interrupt delivery is disabled when setting interrupt
delivery entry.

6 years agoAdd -Wshadow to Makefile and fix the resulting warnings. Many of
millert [Wed, 27 Dec 2017 13:02:57 +0000 (13:02 +0000)]
Add -Wshadow to Makefile and fix the resulting warnings.  Many of
the warnings are due to the use of globals with generic names,
specifically "options" and "path".  I've renamed "options" to
"sh_options" since it holds the shell options and "path" to
"search_path".  OK jca@ tb@

6 years agoImplement OF_getpropint64().
kettenis [Wed, 27 Dec 2017 11:40:14 +0000 (11:40 +0000)]
Implement OF_getpropint64().

ok jca@, tom@, patrick@, visa@

6 years agostep one in avoiding unneccesary init of chunk_info;
otto [Wed, 27 Dec 2017 10:05:23 +0000 (10:05 +0000)]
step one in avoiding unneccesary init of chunk_info;
some cleanup; tested by sthen@ on a ports build

6 years agosync (if_bwfm_pci.h)
sthen [Wed, 27 Dec 2017 00:00:49 +0000 (00:00 +0000)]
sync (if_bwfm_pci.h)

6 years agoregen
kettenis [Tue, 26 Dec 2017 23:47:41 +0000 (23:47 +0000)]
regen

6 years agoAdd two IDT PCIe switches found in a SPARC T4-1 and tweak another one to
kettenis [Tue, 26 Dec 2017 23:47:17 +0000 (23:47 +0000)]
Add two IDT PCIe switches found in a SPARC T4-1 and tweak another one to
not include the revision of the chip.

6 years agoCherry-pick a change from LLD to make the behavior of the -v option
patrick [Tue, 26 Dec 2017 21:01:02 +0000 (21:01 +0000)]
Cherry-pick a change from LLD to make the behavior of the -v option
more closer to GNU linkers.  This should help with autoconf/libtool
compatibility in ports.

Requested by Brad
"no objection" kettenis@

6 years agoUpdate to compiler-rt 5.0.1.
patrick [Tue, 26 Dec 2017 20:59:44 +0000 (20:59 +0000)]
Update to compiler-rt 5.0.1.

ok kettenis@

6 years agoCherry-pick a change from LLVM that marks specific pseudo memory
patrick [Tue, 26 Dec 2017 19:34:27 +0000 (19:34 +0000)]
Cherry-pick a change from LLVM that marks specific pseudo memory
instructions to have side effects so the optimizer does not reorder
them across fnstcw/fldcw sequences.  Fixes a bug seen in sqlite3 on
i386.

ok kettenis@

6 years agoMissed in previous
jca [Tue, 26 Dec 2017 19:12:22 +0000 (19:12 +0000)]
Missed in previous

Spotted by patrick@, thanks

6 years agoThe hack for /dev/fd support on systems without it was removed a
millert [Tue, 26 Dec 2017 19:10:31 +0000 (19:10 +0000)]
The hack for /dev/fd support on systems without it was removed a
long time ago.  Update the comments and replace test_stat() calls
with stat() since test_stat() now just calls stat() directly.  Also
rename the "mode" parameter to "amode" in test_eaccess() to match
access(2) and make it clear that this is the access mode and not
the file mode.  OK jca@

6 years agoCorrect register numbers for AXP809.
kettenis [Tue, 26 Dec 2017 17:16:33 +0000 (17:16 +0000)]
Correct register numbers for AXP809.

6 years agoAs the divert-to pf state is not connected, it is not linked to the
bluhm [Tue, 26 Dec 2017 17:03:46 +0000 (17:03 +0000)]
As the divert-to pf state is not connected, it is not linked to the
incpb and so not removed when the socket is closed.  Packets matching
reply and reply-to states are linked to the sockets immediately.
So these states must go away when the socket is closed.  Check this
with the output of "pfctl -s states" after running the Perl scripts.

6 years agosync
jca [Tue, 26 Dec 2017 15:24:38 +0000 (15:24 +0000)]
sync

6 years agoUse a version script to limit exported symbols
jca [Tue, 26 Dec 2017 15:23:33 +0000 (15:23 +0000)]
Use a version script to limit exported symbols

ok ratchov@ kettenis@

6 years agosync
kettenis [Tue, 26 Dec 2017 15:14:22 +0000 (15:14 +0000)]
sync

6 years agoAdd ARM EABI runtime aliases to the GCC runtime functions that we include
kettenis [Tue, 26 Dec 2017 15:11:17 +0000 (15:11 +0000)]
Add ARM EABI runtime aliases to the GCC runtime functions that we include
in libc.

ok patrick@, jsg@, guenther@

6 years agodrm/i915: call kunmap_px on pt_vaddr
kettenis [Tue, 26 Dec 2017 13:22:36 +0000 (13:22 +0000)]
drm/i915: call kunmap_px on pt_vaddr

From Matthew Auld
44a7102484db0ddfa6f855b57ffe0566f739b55a in mainline linux

Pointed out by Martin Ziemer

6 years agoSync Allwinner A64 pin defenitions with Linux.
kettenis [Tue, 26 Dec 2017 12:58:59 +0000 (12:58 +0000)]
Sync Allwinner A64 pin defenitions with Linux.
Add support for the 2nd A64 controller.
Add Allwinner A33 support.

6 years agoImplement support for the "next-generation" clock bindings for the
kevlo [Tue, 26 Dec 2017 09:31:51 +0000 (09:31 +0000)]
Implement support for the "next-generation" clock bindings for the
Allwinner A23/A33.

ok kettenis@

6 years agoFix channel initialization by not using the same loop variable in nested
patrick [Tue, 26 Dec 2017 00:51:29 +0000 (00:51 +0000)]
Fix channel initialization by not using the same loop variable in nested
for-loops.  Oops.

6 years agoMarkup SIGHUP and rework sentence; ok jmc@
anton [Mon, 25 Dec 2017 16:01:35 +0000 (16:01 +0000)]
Markup SIGHUP and rework sentence; ok jmc@

6 years agosync
patrick [Mon, 25 Dec 2017 12:09:20 +0000 (12:09 +0000)]
sync

6 years agomemcpy from the right place. at this point, the used variable is not
tedu [Mon, 25 Dec 2017 02:11:19 +0000 (02:11 +0000)]
memcpy from the right place. at this point, the used variable is not
relevant. from Mark Karpilovskij.
ok millert

6 years agoTedu files that got removed in LLVM 5.0.1.
patrick [Mon, 25 Dec 2017 00:41:59 +0000 (00:41 +0000)]
Tedu files that got removed in LLVM 5.0.1.

6 years agoUpdate to LLVM 5.0.1 which apparently includes plenty of bugfixes.
patrick [Sun, 24 Dec 2017 23:29:52 +0000 (23:29 +0000)]
Update to LLVM 5.0.1 which apparently includes plenty of bugfixes.

Requested by Brad
Tested by me on amd64
Tested by bluhm on i386
Tested by kettenis on arm64, armv7 and sparc64

6 years agoRe-enable the code that unmaps the startup code. This was temporarily
kettenis [Sun, 24 Dec 2017 23:24:45 +0000 (23:24 +0000)]
Re-enable the code that unmaps the startup code.  This was temporarily
disabled while lld was growing up, but forgotten about when gap.o was
added back.

ok deraadt@

6 years agoMerge LLVM 5.0.1 release.
patrick [Sun, 24 Dec 2017 23:19:13 +0000 (23:19 +0000)]
Merge LLVM 5.0.1 release.

6 years agoImport LLVM 5.0.1 release including clang, lld and lldb.
patrick [Sun, 24 Dec 2017 23:15:17 +0000 (23:15 +0000)]
Import LLVM 5.0.1 release including clang, lld and lldb.

6 years agoConsolidate printf(3) calls at the end of main().
cheloha [Sun, 24 Dec 2017 22:12:49 +0000 (22:12 +0000)]
Consolidate printf(3) calls at the end of main().

Makes reading the classification algorithm easier.

ok tb@

6 years agoAdd a PCI attachment driver for bwfm(4). It's not finished, but it's
patrick [Sun, 24 Dec 2017 19:50:56 +0000 (19:50 +0000)]
Add a PCI attachment driver for bwfm(4).  It's not finished, but it's
already past the point where development can occur out of the tree.
With this I can successfully scan for access points and tell the chip
to attach to an SSID.  RX path should work as well, but since I forgot
to bring the antenna with me to my parents, the reception is a bit
horrible in the metal enclosure.

There are a few reasons this driver is rather big.  First we set up the
ARM Cores, uploading the firmware and kicking it off.  Then we need to
read all needed information from the registers.  Once that is done we
have to set up countless buffers.  There are 2 TX rings and 3 RX rings,
plus N TX rings for the actual data that is yet to be implemented.

Merry Christmas!

ok kettenis@

6 years agoFor systems where the cpu node in the device tree has a "clocks" property,
kettenis [Sun, 24 Dec 2017 19:43:51 +0000 (19:43 +0000)]
For systems where the cpu node in the device tree has a "clocks" property,
implement hw.cpuspeed using the clock framework.

ok patrick@

6 years agoFor systems where the cpu node in the device tree has a "clocks" property,
kettenis [Sun, 24 Dec 2017 19:42:51 +0000 (19:42 +0000)]
For systems where the cpu node in the device tree has a "clocks" property,
implement hw.cpuspeed using the clock framework.

ok patrick@

6 years agoImplement A10/A20 CPU clock.
kettenis [Sun, 24 Dec 2017 18:24:06 +0000 (18:24 +0000)]
Implement A10/A20 CPU clock.

6 years agoUse more libm.
cheloha [Sun, 24 Dec 2017 16:59:50 +0000 (16:59 +0000)]
Use more libm.

adj360() is a modulo operation: use fmod(3) to simplify things.

Adding 0.5 to the phase to steer implicit truncation is a hack:
use lround(3) to simplify things.

Product of a discussion with pjanzen@/jca@/tb@ regarding floating-point
rounding and the importance of correctly classifying a gibbous moon.

ok pjanzen@ jca@ tb@

6 years agoSomes fixes for the VIA PadLock drivers.
fcambus [Sun, 24 Dec 2017 16:19:27 +0000 (16:19 +0000)]
Somes fixes for the VIA PadLock drivers.

- Do not ignore the return value of m_copyback() on i386
- Always free sc->op_buf before returning on both amd64 and i386,
  pointed out by mikeb@, thanks!

OK mikeb@

6 years agoThere was a corner case where linking the inp to the state key did
bluhm [Sun, 24 Dec 2017 14:18:19 +0000 (14:18 +0000)]
There was a corner case where linking the inp to the state key did
work in pf.  The function pf_inp_link() takes the state key from
the mbuf and not the one pf_find_state() has just found.  Introduce
a new function pf_state_key_link_inpcb() that links the given state
key and inpcb together with some sanity checks.
OK sashan@

6 years agoAllow SD/MMC controller drivers to allocate their own DMA mapping structure
kettenis [Sun, 24 Dec 2017 12:55:52 +0000 (12:55 +0000)]
Allow SD/MMC controller drivers to allocate their own DMA mapping structure
to account for any relevant hardware constraints.

ok stsp@

6 years agoGenerate SIGBUS/BUS_ADRALN when we see a SP Alignment Exception from userland.
kettenis [Sun, 24 Dec 2017 10:32:25 +0000 (10:32 +0000)]
Generate SIGBUS/BUS_ADRALN when we see a SP Alignment Exception from userland.

ok jsg@

6 years agoFix one possible buffer overflow and one underflow. Also some minor
millert [Sun, 24 Dec 2017 01:50:50 +0000 (01:50 +0000)]
Fix one possible buffer overflow and one underflow.  Also some minor
cleanups.  From Jan Kokemueller.  OK deraadt@

6 years agoAvoid comparing equal lines twice when running without -i.
tb [Sun, 24 Dec 2017 00:11:43 +0000 (00:11 +0000)]
Avoid comparing equal lines twice when running without -i.

From kshe, ok jca

6 years agoAs we only use the .tv_sec field, simplify gettimeofday(2) -> time(3).
cheloha [Sat, 23 Dec 2017 20:58:14 +0000 (20:58 +0000)]
As we only use the .tv_sec field, simplify gettimeofday(2) -> time(3).

While here, use err(3) instead of errx(3) if adjtime(2) fails.

Discussed/tweaked with/by tb@ and jca@.

ok tb@ jca@