openbsd
8 years agoAdd PCI ID for Ralink RT5392 and additional IDs for RT5390 devices.
stsp [Wed, 17 Aug 2016 10:01:20 +0000 (10:01 +0000)]
Add PCI ID for Ralink RT5392 and additional IDs for RT5390 devices.
Part of a larger patch by James Hastings.

8 years agoiwn(4) scans all bands at once, as far as the net80211 stack is concerned.
stsp [Wed, 17 Aug 2016 09:43:27 +0000 (09:43 +0000)]
iwn(4) scans all bands at once, as far as the net80211 stack is concerned.
So set the appropriate scan capability flags in the ic.
ok sthen@

8 years agoIf a wireless device or driver scans all bands at once give 5GHz APs
stsp [Wed, 17 Aug 2016 09:42:03 +0000 (09:42 +0000)]
If a wireless device or driver scans all bands at once give 5GHz APs
a slight priority in cases where good matches exist in either band.
ok sthen@

8 years agoIf the stack demands protection by setting the USEPROT flag then set the
stsp [Wed, 17 Aug 2016 09:39:38 +0000 (09:39 +0000)]
If the stack demands protection by setting the USEPROT flag then set the
corresponding bit in the iwm(4) Tx command regardless of frame length.
ok sthen@

8 years agopluralize a word
phessler [Wed, 17 Aug 2016 08:14:40 +0000 (08:14 +0000)]
pluralize a word

8 years agoThe man page is a bit confusing for how we can control which address
phessler [Wed, 17 Aug 2016 08:13:52 +0000 (08:13 +0000)]
The man page is a bit confusing for how we can control which address
families we support during capabilities negotiation.  Re-organize the
man page to be more clear, and explicitly state what the default is.

OK sthen@ benno@

8 years agowrterror() is fatal, delete dead code; ok tom@ natano@ tedu@
otto [Wed, 17 Aug 2016 05:33:54 +0000 (05:33 +0000)]
wrterror() is fatal, delete dead code; ok tom@ natano@ tedu@

8 years agosmall bits of header cleanup; ok mlarkin
deraadt [Wed, 17 Aug 2016 05:07:13 +0000 (05:07 +0000)]
small bits of header cleanup; ok mlarkin

8 years agoReintroduce 5.3-style checksum modification to preserve end-to-end checksums
procter [Wed, 17 Aug 2016 03:24:11 +0000 (03:24 +0000)]
Reintroduce 5.3-style checksum modification to preserve end-to-end checksums
when fiddling with packets but without the mess that motivated Henning to
remove it. Affects only this one aspect of Henning's checksum work. Also tweak
the basic algorithm and supply a correctness argument.

OK dlg@ deraadt@ sthen@; no objection henning@

8 years agoMove to iopool. No voluntary testers after several years of requests so now
krw [Wed, 17 Aug 2016 01:17:54 +0000 (01:17 +0000)]
Move to iopool. No voluntary testers after several years of requests so now
everybody gets to test!

8 years agoMove to iopool. No voluntary testers after several years of requests so now
krw [Wed, 17 Aug 2016 01:16:11 +0000 (01:16 +0000)]
Move to iopool. No voluntary testers after several years of requests so now
everybody gets to test!

8 years agoMake error handling (esp. DATA_UNDERRUN) clearer and avoid losing resid
krw [Wed, 17 Aug 2016 01:02:31 +0000 (01:02 +0000)]
Make error handling (esp. DATA_UNDERRUN) clearer and avoid losing resid
value.

Specs from mikeb@, ok dlg@

8 years agoKNF and clean up many comments.
krw [Wed, 17 Aug 2016 00:55:33 +0000 (00:55 +0000)]
KNF and clean up many comments.

8 years agoAnsify function definitions.
krw [Wed, 17 Aug 2016 00:38:26 +0000 (00:38 +0000)]
Ansify function definitions.

Diff from Edgar Pettijohn.

8 years agosplraise() is an MI API now.
dlg [Tue, 16 Aug 2016 23:49:35 +0000 (23:49 +0000)]
splraise() is an MI API now.

ok deraadt@ jmc@ mpi@

8 years agoAdd regression tests for IP_SENDSRCADDR.
vgross [Tue, 16 Aug 2016 22:25:08 +0000 (22:25 +0000)]
Add regression tests for IP_SENDSRCADDR.

8 years agoAdd IP_SENDSRCADDR cmsg for UDP sockets. As suggested by sthen@,
vgross [Tue, 16 Aug 2016 22:21:17 +0000 (22:21 +0000)]
Add IP_SENDSRCADDR cmsg for UDP sockets. As suggested by sthen@,
IP_SENDSRCADDR == IP_RECVDSTADDR.

OK sthen@ jca@ bluhm@

8 years agoTrack SSID in leases file and only consider leases from the current SSID when
krw [Tue, 16 Aug 2016 21:57:51 +0000 (21:57 +0000)]
Track SSID in leases file and only consider leases from the current SSID when
starting up dhclient on wifi interfaces. In theory will preserve leases from
other SSID's and speed up obtaining a lease by not wasting time attempting
to re-acquire a lease from a different SSID.

Experimental feature from n2k16 needing some real world testing before g2k16.

8 years agoThere is no sense in doing caching in fusefs. In case of a non-local
natano [Tue, 16 Aug 2016 21:32:58 +0000 (21:32 +0000)]
There is no sense in doing caching in fusefs. In case of a non-local
filesystem the tree can change behind our back, resulting in stale cache
entries. "The only winning move is not to play."

ok tedu beck mpi

8 years agoPiping to a shell command does not count as a save, so don't reset the
natano [Tue, 16 Aug 2016 20:04:46 +0000 (20:04 +0000)]
Piping to a shell command does not count as a save, so don't reset the
modified flag.
from Jerome Frgacic (jerome.frgacic (at) yahoo.fr)
ok tb

8 years agoWhen the commit message is empty, don't default to c)ontinue
tb [Tue, 16 Aug 2016 19:00:59 +0000 (19:00 +0000)]
When the commit message is empty, don't default to c)ontinue
(committing without log message) but a)bort.  Also, accept
the uppercase versions of the choices.

Matches the corresponding change of behavior of GNU cvs.

suggested by & ok jcs

8 years agoWhen the commit message is empty, don't default to c)ontinue
tb [Tue, 16 Aug 2016 18:57:10 +0000 (18:57 +0000)]
When the commit message is empty, don't default to c)ontinue
(committing without log message), but to a)bort.

ok jcs, natano; millert and tj agree

8 years agoAdd, correct, and improve HISTORY sections.
schwarze [Tue, 16 Aug 2016 18:51:25 +0000 (18:51 +0000)]
Add, correct, and improve HISTORY sections.
From Sevan Janiyan <venture37 at geeklan dot co dot uk>.
Verified using http://minnie.tuhs.org/.

8 years agostop including sys/param.h for nitems. define locally as needed.
tedu [Tue, 16 Aug 2016 18:41:57 +0000 (18:41 +0000)]
stop including sys/param.h for nitems. define locally as needed.
ok natano reyk

8 years agoAdd HISTORY.
schwarze [Tue, 16 Aug 2016 18:41:06 +0000 (18:41 +0000)]
Add HISTORY.
From Sevan Janiyan <venture37 at geeklan dot co dot uk>.
Verified using the CSRG archive CD.

8 years agoremove #define for /dev/mem minors. let the raw magic of the hardcoded
tedu [Tue, 16 Aug 2016 18:21:54 +0000 (18:21 +0000)]
remove #define for /dev/mem minors. let the raw magic of the hardcoded
numbers serve as a warning not to touch them.

8 years agomove static variable up to first
tedu [Tue, 16 Aug 2016 18:19:15 +0000 (18:19 +0000)]
move static variable up to first

8 years agoreplace hand rolled tsleep physlock with rwlock. ok mlarkin
tedu [Tue, 16 Aug 2016 18:17:36 +0000 (18:17 +0000)]
replace hand rolled tsleep physlock with rwlock. ok mlarkin

8 years agodoesn't need to link with crypto
tedu [Tue, 16 Aug 2016 17:52:28 +0000 (17:52 +0000)]
doesn't need to link with crypto

8 years agoremove reference to 6th ed.
tedu [Tue, 16 Aug 2016 17:51:38 +0000 (17:51 +0000)]
remove reference to 6th ed.

8 years agoTurn "TLS handshake failed -" log message into a debug message - it
reyk [Tue, 16 Aug 2016 17:10:01 +0000 (17:10 +0000)]
Turn "TLS handshake failed -" log message into a debug message - it
happens way too often and does not provide much information.

OK jung@

8 years agoStreamline and refactor the code a bit more:
tb [Tue, 16 Aug 2016 16:49:24 +0000 (16:49 +0000)]
Streamline and refactor the code a bit more:

There are two sentinels for infinite output: infinity == true and reps == 0.
Ensure that infinity is set to true whenever reps is set to zero, then we
can always use 'if (infinity)'.

This allows us to merge the loop for deterministic output into the first
if (!randomize) statement, which is a lot tidier.

Insert an occasional empty line.

"move fast and break stuff" tedu

8 years agoNuke a bunch of whitespace nits seen while '%q' hunting.
krw [Tue, 16 Aug 2016 16:44:55 +0000 (16:44 +0000)]
Nuke a bunch of whitespace nits seen while '%q' hunting.

8 years agoNuke a bunch of whitespace nits seen while '%q' hunting.
krw [Tue, 16 Aug 2016 16:41:46 +0000 (16:41 +0000)]
Nuke a bunch of whitespace nits seen while '%q' hunting.

8 years agoNuke some erroneous leading whitespace.
krw [Tue, 16 Aug 2016 16:13:32 +0000 (16:13 +0000)]
Nuke some erroneous leading whitespace.

8 years agoBring types of variables used with struct stat into the modern world.
krw [Tue, 16 Aug 2016 16:09:24 +0000 (16:09 +0000)]
Bring types of variables used with struct stat into the modern world.

Replace a couple of u_long paramaters with int as they were only passed int
values and the function re-cast them to (int) anyway. Weird.

ok tedu@

8 years agoAvoid a compiler warning about use of uninitialized l.beg emitted
tb [Tue, 16 Aug 2016 15:32:07 +0000 (15:32 +0000)]
Avoid a compiler warning about use of uninitialized l.beg emitted
when ksh is compiled with -Os (done in distrib/special): move the
bit using XPptrv(l) (which expands to l.beg) where it is actually
used and clearly initialized.

ok tedu, tweak + ok millert

8 years agoAll that complexity stopped us from getting flying cars by today.
tedu [Tue, 16 Aug 2016 15:24:01 +0000 (15:24 +0000)]
All that complexity stopped us from getting flying cars by today.

8 years agoUpdate Hyper-V structure definitions to the 2016 version
mikeb [Tue, 16 Aug 2016 14:43:31 +0000 (14:43 +0000)]
Update Hyper-V structure definitions to the 2016 version

Microsoft has performed a significant clean up and stylistic improvement
of Hyper-V structure definitions and updated FreeBSD port.  We update to
stay in sync with the upstream and improve maintainability of this code
in the future.

8 years agoAdd HISTORY.
schwarze [Tue, 16 Aug 2016 13:11:06 +0000 (13:11 +0000)]
Add HISTORY.
From Sevan Janiyan <venture37 at geeklan dot co dot uk>.
Verified using NetBSD CVS.

8 years agoRemove RM7000/RM9000-specific performance counter code. It originates
visa [Tue, 16 Aug 2016 13:03:58 +0000 (13:03 +0000)]
Remove RM7000/RM9000-specific performance counter code. It originates
from PMON2000 and has not been enabled on OpenBSD.

Suggested by and ok miod@ (after seeing a quad_t cleanup patch of mine)

8 years agoXr encrypt(1) here as well to be consistent with useradd(8).
tb [Tue, 16 Aug 2016 11:33:07 +0000 (11:33 +0000)]
Xr encrypt(1) here as well to be consistent with useradd(8).

ok jmc

8 years agoFix typo/inconsistensy where L1_S_DOMAIN was used instead of L1_C_DOMAIN.
kettenis [Tue, 16 Aug 2016 10:16:33 +0000 (10:16 +0000)]
Fix typo/inconsistensy where L1_S_DOMAIN was used instead of L1_C_DOMAIN.
These are functionally equivolent so it didn't matter and the resulting
code doesn't change.

8 years agoMask the ``prio'' prior to comparing it to RTP_LOCAL.
mpi [Tue, 16 Aug 2016 09:01:14 +0000 (09:01 +0000)]
Mask the ``prio'' prior to comparing it to RTP_LOCAL.

This allows rt_if_remove() to remove RTF_BROACAST routes from down
interfaces.

Issue reported by Dimitris Papastamos on bugs@

ok dlg@, claudio@, phessler@

8 years agoIn the IPv6 default route example, use a gateway that corresponds to a
mpi [Tue, 16 Aug 2016 08:56:28 +0000 (08:56 +0000)]
In the IPv6 default route example, use a gateway that corresponds to a
RTF_HOST route and is always on the correct interface.

The gateway value doesn't really matter for routes on p2p interfaces
but this allow us to tighten the checks when adding RTF_GATEWAY routes.

ok stsp@, sthen@

8 years agoRename server_handshake_tls() to server_tls_handshake() to align with
reyk [Tue, 16 Aug 2016 08:36:29 +0000 (08:36 +0000)]
Rename server_handshake_tls() to server_tls_handshake() to align with
the other server_tls_* functions (and I like the prefix notation
better).  No functional change.

8 years agoAs suggested by the FastCGI spec, zero-pad the response buffers to be
reyk [Tue, 16 Aug 2016 08:23:18 +0000 (08:23 +0000)]
As suggested by the FastCGI spec, zero-pad the response buffers to be
aligned to 8 bytes.  This matches what most other implementations are
doing.  While here, make sure that the allocated response buffers are
zero'ed out.

OK florian@

8 years agoOnly probe the UART type if sc_uarttype is set to COM_UART_UNKNOWN.
kettenis [Tue, 16 Aug 2016 08:15:04 +0000 (08:15 +0000)]
Only probe the UART type if sc_uarttype is set to COM_UART_UNKNOWN.
This allows glue drivers to set the type based on other information (such as
Oopen Firmware or device tree properties) without going through to risky
code paths.

ok deraadt@, visa@

8 years agoshorten genrsa; ok jsing
jmc [Tue, 16 Aug 2016 06:40:24 +0000 (06:40 +0000)]
shorten genrsa; ok jsing

8 years agotweak previous;
jmc [Tue, 16 Aug 2016 06:39:46 +0000 (06:39 +0000)]
tweak previous;

8 years agoadd a special edition doas that only lets root drop privs.
tedu [Tue, 16 Aug 2016 04:55:33 +0000 (04:55 +0000)]
add a special edition doas that only lets root drop privs.
maybe the installer can use something like this, wink wink.
ok deraadt

8 years agofread hasn't taken a char * in about 900 years
tedu [Tue, 16 Aug 2016 04:48:04 +0000 (04:48 +0000)]
fread hasn't taken a char * in about 900 years

8 years agoremove unneeded casts
tedu [Tue, 16 Aug 2016 04:44:38 +0000 (04:44 +0000)]
remove unneeded casts

8 years agoRewrite: ALL HAIL ELF
guenther [Tue, 16 Aug 2016 04:14:34 +0000 (04:14 +0000)]
Rewrite: ALL HAIL ELF
Mention the KERN_NOSUIDCOREDUMP sysctl(3)

ok deraadt@

8 years agoWhen running 'ifconfig scan' in hostap mode display the current Tx rate our
stsp [Mon, 15 Aug 2016 22:16:46 +0000 (22:16 +0000)]
When running 'ifconfig scan' in hostap mode display the current Tx rate our
AP is using to send frames to an associated node. This used to always display
the node's highest supported Rx rate, which isn't all that interesting.
ok mpi@

8 years agoExpose more 802.11n information to userspace:
stsp [Mon, 15 Aug 2016 22:14:19 +0000 (22:14 +0000)]
Expose more 802.11n information to userspace:
A flag which indicates whether HT has been negotiated with a node,
and the current Tx MCS value we use for a node.

This grows struct ieee80211_nodereq. Applications using it must be recompiled.

ok mpi@

8 years agonormalize some comments
tedu [Mon, 15 Aug 2016 22:01:59 +0000 (22:01 +0000)]
normalize some comments

8 years agoDon't take shortcuts cleaning/invalidating the caches. The Cortex-A7 and most
kettenis [Mon, 15 Aug 2016 21:08:56 +0000 (21:08 +0000)]
Don't take shortcuts cleaning/invalidating the caches.  The Cortex-A7 and most
other ARMv7 CPUs have a L2 cache that is larger than 32KB.  And some of those
even have L1 caches larger than that.  So bailing out after 32KB will leave
the cache partially dirty.

Fixes the SATA problems on Allwinner A20 based boards.

ok patrick@

8 years agoNow that com(4) uses a different iot for the initial console and the
patrick [Mon, 15 Aug 2016 21:04:32 +0000 (21:04 +0000)]
Now that com(4) uses a different iot for the initial console and the
main attachment, the serial port is now longer recognized as console.
To fix this, store the OFW node of the initial console and check it
in the attachment driver.

ok kettenis@

8 years agoFirst stab at porting the awinmmc(4) driver from NetBSD. The driver will
kettenis [Mon, 15 Aug 2016 21:03:27 +0000 (21:03 +0000)]
First stab at porting the awinmmc(4) driver from NetBSD.  The driver will
be known as sximmc(4) and is somewhat functional.  Still needs proper clock
support and some further cleanup.

8 years agosync
sthen [Mon, 15 Aug 2016 19:31:57 +0000 (19:31 +0000)]
sync

8 years agoFor some reason the RTL8211E PHY on the Banana Pi responds to both address 0
kettenis [Mon, 15 Aug 2016 18:31:28 +0000 (18:31 +0000)]
For some reason the RTL8211E PHY on the Banana Pi responds to both address 0
and 1.  As a result rgephy(4) attaches twice.  Prevent this from happening
by passing the PHY address, which is part of the device tree, down from the
bus-specific glue to the generic driver code.

8 years agoFix typo -> s/drirect/direct/.
mglocker [Mon, 15 Aug 2016 17:49:43 +0000 (17:49 +0000)]
Fix typo -> s/drirect/direct/.

From Daniel Bolgheroni

8 years ago%*qd -> %*lld + (long long) for off_t.
krw [Mon, 15 Aug 2016 16:57:53 +0000 (16:57 +0000)]
%*qd -> %*lld + (long long) for off_t.

Avoid some casts by changing printsize() to take an int (the only
type actually passed via that parameter) instead of size_t.

Tweaks & ok guenther@

8 years agoMove server_match() from parse.y to server.c; use env instead of conf,
jsing [Mon, 15 Aug 2016 16:12:34 +0000 (16:12 +0000)]
Move server_match() from parse.y to server.c; use env instead of conf,
which is actually the same thing (cluebat from reyk@).

8 years agoThe tls_conninfo serial is also unused.
jsing [Mon, 15 Aug 2016 15:44:58 +0000 (15:44 +0000)]
The tls_conninfo serial is also unused.

8 years agoGroup conninfo fields by connection and peer cert based information,
jsing [Mon, 15 Aug 2016 15:41:50 +0000 (15:41 +0000)]
Group conninfo fields by connection and peer cert based information,
sort and remove unused fingerprint.

8 years agoFix some style(9) issues.
jsing [Mon, 15 Aug 2016 14:47:41 +0000 (14:47 +0000)]
Fix some style(9) issues.

8 years agoAllow com(4) to make use of the simplebus address translation.
patrick [Mon, 15 Aug 2016 14:17:34 +0000 (14:17 +0000)]
Allow com(4) to make use of the simplebus address translation.
This typically works for every simplebus client, but com(4) did not
make use of the supplied bus tag.  Instead it references the global
a4x bus tag.  This is needed as the ARM com(4) controllers use 4-byte
spaced registers, while com(4) operates on 1-byte.  To be able to make
use of the address translation, copy the a4x bus tag and replace the
cookie and map function with the one supplied by simplebus.

ok kettenis@

8 years agoUse lowercase 'tls' in debug and log messages for consistency.
jsing [Mon, 15 Aug 2016 14:14:55 +0000 (14:14 +0000)]
Use lowercase 'tls' in debug and log messages for consistency.

Requested by reyk@

8 years agoExplicitly pass in an SSL_CTX * to the functions that operate on one,
jsing [Mon, 15 Aug 2016 14:04:23 +0000 (14:04 +0000)]
Explicitly pass in an SSL_CTX * to the functions that operate on one,
instead of assuming that they should use the one associated with the TLS
context. This allows these functions to be used with the additional
SSL contexts that are needed to support server-side SNI.

Also rename tls_configure_keypair() to tls_configure_ssl_keypair(), so that
these functions have a common prefix.

ok reyk@

8 years agoMake httpd stricter with respect to TLS configuration - in particular, do
jsing [Mon, 15 Aug 2016 13:48:24 +0000 (13:48 +0000)]
Make httpd stricter with respect to TLS configuration - in particular, do
not allow TLS and non-TLS to be configured on the same port, do not allow
TLS options to be specified without a TLS listener and ensure that the TLS
options are the same when a server is specified on the same address/port.
Currently, these configurations are permitted but do not work as intended.

Also factor out and reuse the server matching code, which was previously
duplicated.

ok reyk@

8 years agoMove the com(4) fdt attachment driver to a more generic location and
patrick [Mon, 15 Aug 2016 13:42:49 +0000 (13:42 +0000)]
Move the com(4) fdt attachment driver to a more generic location and
rename it to fit the typical scheme of such an attachment driver.

ok kettenis@ jsg@

8 years agoRemove IWM_CMD_SYNC, which expands to zero while all the other
stsp [Mon, 15 Aug 2016 12:59:53 +0000 (12:59 +0000)]
Remove IWM_CMD_SYNC, which expands to zero while all the other
IWM_CMD_* values are bit flags. The same was done 2 years ago
in Linux git commit a10229271946731959b2269370d0492d88cfab23.

8 years agoCatch up with the SSH1 code removal and delete all mention of
naddy [Mon, 15 Aug 2016 12:32:04 +0000 (12:32 +0000)]
Catch up with the SSH1 code removal and delete all mention of
protocol 1 particularities, key files and formats, command line
options, and configuration keywords from the server documentation
and examples.  ok jmc@

8 years agoRemove more SSH1 server code:
naddy [Mon, 15 Aug 2016 12:27:56 +0000 (12:27 +0000)]
Remove more SSH1 server code:
* Drop sshd's -k option.
* Retire configuration keywords that only apply to protocol 1, as well as
  the "protocol" keyword.
* Remove some related vestiges of protocol 1 support.

ok markus@

8 years agoreplace the last uses of m_copym2 with m_dup_pkt.
dlg [Mon, 15 Aug 2016 11:35:25 +0000 (11:35 +0000)]
replace the last uses of m_copym2 with m_dup_pkt.

ok mpi@ visa@

8 years agoUse pinctrl to configure the pins used by the EMAC.
kettenis [Mon, 15 Aug 2016 09:20:47 +0000 (09:20 +0000)]
Use pinctrl to configure the pins used by the EMAC.

ok jsg@

8 years agoUse the regulator API to supply power to the target.
kettenis [Mon, 15 Aug 2016 09:16:26 +0000 (09:16 +0000)]
Use the regulator API to supply power to the target.

Tested by Daniel Bolgheroni on a Cubietech Cubieboard2.

ok jsg@

8 years agoChecking for RTF_BROADCAST here makes no sense.
mpi [Mon, 15 Aug 2016 08:52:03 +0000 (08:52 +0000)]
Checking for RTF_BROADCAST here makes no sense.

8 years agoNeuter fuse_vptofh() and fuse_fhtovp(). I implemented those functions
natano [Mon, 15 Aug 2016 07:39:46 +0000 (07:39 +0000)]
Neuter fuse_vptofh() and fuse_fhtovp(). I implemented those functions
under the assumption, that fuse_vget() has reasonable semantics, while
this is not the case. fusefs_vget() only functions correctly, if the
file in questions has recently been accessed and is still in the vnode
cache of the userspace daemon associated with the mount point.

As a matter of fact the fuse api doesn't feature a reasonable way to map
inode numbers to a handle at all (see struct fuse_operations).

ok guenther

8 years agoNo need to reset si_selpid after calling selwakeup() the function
mpi [Mon, 15 Aug 2016 07:20:14 +0000 (07:20 +0000)]
No need to reset si_selpid after calling selwakeup() the function
already does it.

8 years agoadd a bit of spacing to previous, to keep the notes about deprecated
jmc [Mon, 15 Aug 2016 07:18:44 +0000 (07:18 +0000)]
add a bit of spacing to previous, to keep the notes about deprecated
functions out the way of the main body;

ok guenther

8 years agoIntroduce bpf_put() and bpf_get() instead of mixing macro and functions
mpi [Mon, 15 Aug 2016 07:17:10 +0000 (07:17 +0000)]
Introduce bpf_put() and bpf_get() instead of mixing macro and functions
for the reference counting.

ok dlg@

8 years agoCheck if ``bd_bif'' is NULL inside bpf_catchpacket() to match bpfread()
mpi [Mon, 15 Aug 2016 07:12:11 +0000 (07:12 +0000)]
Check if ``bd_bif'' is NULL inside bpf_catchpacket() to match bpfread()
and bpfwrite(), all of which will need to grabe a lock to protect the
buffers.

ok dlg@

8 years agoMerge bpfilter_create() into bpfopen() and make it such that the
mpi [Mon, 15 Aug 2016 07:03:47 +0000 (07:03 +0000)]
Merge bpfilter_create() into bpfopen() and make it such that the
descriptor is referenced before it is inserted in the global list.

ok dlg@

8 years agoDrain FIFOs on init same as com(4) does it and reduce the RX FIFO interrupt
mglocker [Mon, 15 Aug 2016 04:32:57 +0000 (04:32 +0000)]
Drain FIFOs on init same as com(4) does it and reduce the RX FIFO interrupt
trigger to 1 character.  This fixes a hang seen on the allwinner,sun5i-r8
board during boot when the driver switches to interrupts and no terminal
is attached.

ok kettenis

8 years agoTrust the login_getcaptime() declaration and don't cast the arguments to
guenther [Mon, 15 Aug 2016 04:28:31 +0000 (04:28 +0000)]
Trust the login_getcaptime() declaration and don't cast the arguments to
their own expected type

8 years agoDrop -z nocombreloc. It was a rev 1.1 commit like on arm, so not clear
guenther [Mon, 15 Aug 2016 03:09:02 +0000 (03:09 +0000)]
Drop -z nocombreloc.  It was a rev 1.1 commit like on arm, so not clear
why it was needed then; perhaps fixed by the bump in binutils?
Removing it enables the full relro layout for ld.so.

8 years agosync
deraadt [Mon, 15 Aug 2016 02:03:56 +0000 (02:03 +0000)]
sync

8 years agoReduce qabs() and qdiv() to aliases of llabs() and lldiv().
guenther [Sun, 14 Aug 2016 23:18:03 +0000 (23:18 +0000)]
Reduce qabs() and qdiv() to aliases of llabs() and lldiv().
Merge the manual pages and call them deprecated there.

ok and manpage tweak jmc@, ok natano@

8 years agoConvert quad_t to long long
guenther [Sun, 14 Aug 2016 23:08:09 +0000 (23:08 +0000)]
Convert quad_t to long long

8 years agoConvert %q to %ll
guenther [Sun, 14 Aug 2016 23:01:13 +0000 (23:01 +0000)]
Convert %q to %ll

8 years agoWhen upcasting to off_t for multiplication, the cast needs to be *before*
guenther [Sun, 14 Aug 2016 22:57:31 +0000 (22:57 +0000)]
When upcasting to off_t for multiplication, the cast needs to be *before*
the multiplication to avoid truncation/overflow

ok krw@

8 years agoConvert %q to %ll with long long casts for printf()
guenther [Sun, 14 Aug 2016 22:56:29 +0000 (22:56 +0000)]
Convert %q to %ll with long long casts for printf()
Delete pointless casts to off_t, void*, and uid_t

ok krw@

8 years agoUse int64_t and %ll for CTLTYPE_QUAD nodes.
guenther [Sun, 14 Aug 2016 22:54:56 +0000 (22:54 +0000)]
Use int64_t and %ll for CTLTYPE_QUAD nodes.
Use memcpy() instead of up-casting from char* to long long*

ok krw@

8 years agoConvert %q to %ll and cast opaque system values to long long.
guenther [Sun, 14 Aug 2016 22:47:26 +0000 (22:47 +0000)]
Convert %q to %ll and cast opaque system values to long long.
Use uint64_t for the KERN_INTRCNT_CNT sysctl()

ok krw@

8 years agoConvert %q to %ll. Cast off_t to long long for printf-style args.
guenther [Sun, 14 Aug 2016 22:35:54 +0000 (22:35 +0000)]
Convert %q to %ll.  Cast off_t to long long for printf-style args.
Eliminate pointless casts to void* or off_t

ok krw@

8 years agoFlip 'u_quad_t' fields & variables to uint64_t, and %qu to %llu.
krw [Sun, 14 Aug 2016 22:29:01 +0000 (22:29 +0000)]
Flip 'u_quad_t' fields & variables to uint64_t, and %qu to %llu.

ok guenther@

8 years agoKill '#if defined(DEBUG) && 0' blocks that used %q
guenther [Sun, 14 Aug 2016 21:47:16 +0000 (21:47 +0000)]
Kill '#if defined(DEBUG) && 0' blocks that used %q

ok bentley@ on principle