stefan [Thu, 23 Jun 2016 18:41:44 +0000 (18:41 +0000)]
Avoid multiple evaluation of macro arguments in softclock()
ok mikeb@ tedu@
espie [Thu, 23 Jun 2016 16:11:23 +0000 (16:11 +0000)]
there's no reason for window size computation to be linked to the
ProgressMeter, so make it available from state.
- computation is lazy, so no runtime difference;
- don't bother setting a SIG{WINCH} on non-tty;
- progressmeter already has access to state;
- do an empty window_size_changed in base state, override it for
addcreatedelete to inform the progressmeter.
to be reused in dpb...
bluhm [Thu, 23 Jun 2016 15:41:42 +0000 (15:41 +0000)]
As klog dropped message has no ifdef small kernel, sendsyslog
should not have it either. While there bring some variables in
sync between both functions.
OK deraadt@
bluhm [Thu, 23 Jun 2016 13:15:21 +0000 (13:15 +0000)]
It is annoying that the dmesg buffer can overflow and loose messages
undetected during debugging. To make clear what happens, count the
dropped bytes and write message buffer full to syslogd. This also
helps to have a reliable log system.
OK deraadt@ millert@ tedu@
espie [Thu, 23 Jun 2016 12:44:10 +0000 (12:44 +0000)]
add fh variation of printing code. Systematically use it with STDOUT/STDERR
for classical functions.
kettenis [Thu, 23 Jun 2016 12:02:18 +0000 (12:02 +0000)]
Use SYMBOL_CALLS_LOCAL() to determine whether we can drop relocations for a
symbol such that hidden symbols get handled properly. Gets rid of the
spurious DT_TEXTREL entries seen with (typically) C++ code.
ok deraadt@, guenther@
eric [Thu, 23 Jun 2016 11:56:19 +0000 (11:56 +0000)]
move transaction-specific states from struct smtp_session to struct smtp_tx
ok gilles@
henning [Thu, 23 Jun 2016 09:08:56 +0000 (09:08 +0000)]
when pf_test returns something but PF_PASS, set error to EACCES
instead of EHOSTUNREACH. On the latter, ip_forward can generate undesired
icmp errors - either pf generates those itself (block return), or there
shouldn't be any.
Bizarrely enough, ip_forward has EACCES handling with a comment specifically
pointing to packets blocked by pf, but the code in ip_output used EHOSTUNREACH
from day #1 on.
found & analyzed by Kristof Provost <kp at FreeBSD>, discussed at BSDcan
ok mpi millert
semarie [Thu, 23 Jun 2016 06:37:36 +0000 (06:37 +0000)]
allow creation of devices or fifo without -p (as it is already allowed with -p)
diff from trondd at kagu-tsuchi com, enhanced by me for reordering promises
ok deraadt@
djm [Thu, 23 Jun 2016 05:17:51 +0000 (05:17 +0000)]
fix AuthenticationMethods during configuration re-parse;
reported by Juan Francisco Cantero Hurtado
kettenis [Wed, 22 Jun 2016 20:15:31 +0000 (20:15 +0000)]
Fetch MAC address from FDT.
ok jsg@, patrick@
sthen [Wed, 22 Jun 2016 20:11:09 +0000 (20:11 +0000)]
backport r3782, fixing qname-minimisation with various broken DNS servers,
often found at CDNs.
- Use QTYPE=A for QNAME minimisation.
- Keep track of number of time-outs when performing QNAME minimisation.
Stop minimising when number of time-outs for a QNAME/QTYPE pair is
more than three.
sthen [Wed, 22 Jun 2016 20:09:55 +0000 (20:09 +0000)]
backport r3781, fix segfault in -h
sthen [Wed, 22 Jun 2016 20:05:40 +0000 (20:05 +0000)]
update to unbound-1.5.9. (there will be a follow-up commit to cherrypick a
couple of post-1.5.9 patches).
tests from Mark Patruck, danj, matthieu, millert. reads ok to jung, ok florian.
jca [Wed, 22 Jun 2016 19:44:26 +0000 (19:44 +0000)]
No modules thus no need for extra space for additional ppp compressions.
ok deraadt@ mikeb@
bluhm [Wed, 22 Jun 2016 19:29:29 +0000 (19:29 +0000)]
Syslogd can send messages to a user, test what happens if the
terminal is blocking to receive messages. Stop the fake user
terminal and look for a delayed write debug message from syslogd.
This makes the test more reliable.
kettenis [Wed, 22 Jun 2016 13:29:14 +0000 (13:29 +0000)]
Don't make the DT_TEXTREL warning fatal. Hopefully this will be temporary,
but we first have to make sure that our tree is clean.
ok deraadt@
visa [Wed, 22 Jun 2016 13:09:35 +0000 (13:09 +0000)]
Add support for the second GMX interface on Octeon II. This enables
ports eth[0-3] on 8-port EdgeRouters. Currently, port eth0 maps to
network interface cnmac4, eth1 to cnmac5 etc.
ok dlg@, tested by martijn@
espie [Wed, 22 Jun 2016 12:18:21 +0000 (12:18 +0000)]
have a consistent exit code when looking for stuff
stsp [Wed, 22 Jun 2016 11:32:12 +0000 (11:32 +0000)]
In iwm(4), clear the in_assoc flag when going down. This flag affects behaviour
early during startup, e.g. where the BSSID for the MAC context is copied from.
Pointed out by Imre Vadasz.
stsp [Wed, 22 Jun 2016 11:30:00 +0000 (11:30 +0000)]
Remove code from iwm(4) which sends DTIM and TSF information to the
firmware based on information from the wireless stack. Letting the
firmware deal with these details by itself seems to work better.
Fixes association issues with 8260 hardware for me and Bryan Vyhmeister.
Also tested by jcs@.
stsp [Wed, 22 Jun 2016 11:28:27 +0000 (11:28 +0000)]
Make iwm(4) explicitly send multicast frames at the lowest rate, instead of
picking a rate from the firmware RS table. This matches what other drivers do.
Also, pass the correct Tx rate to BPF (tcpdump) for 5GHz, and don't loop over
CCK rates when building the Link-Quality command's RS table for 5GHz.
tested by myself and jcs@
kettenis [Wed, 22 Jun 2016 10:13:14 +0000 (10:13 +0000)]
Add curly braces that were missed in rev 1.651. Add parenthesis to make the
condition in the if statement more readable while I'm there.
ok phessler@, benno@, florian@
mlarkin [Wed, 22 Jun 2016 07:22:00 +0000 (07:22 +0000)]
Identify UMIP feature, if available.
ok millert, kettenis, deraadt
dlg [Wed, 22 Jun 2016 06:34:35 +0000 (06:34 +0000)]
dont need a traliing \ on a line in c code, it's not a macro definition.
from patrick keshishian
dlg [Wed, 22 Jun 2016 06:32:32 +0000 (06:32 +0000)]
rework art_walk so it will behave in an mpsafe world.
art_walk now explicitly takes the same lock used to serialise change
made via rtable_insert and _delete, so it can safely adjust the
refcnts on tables while it recurses into them. they need to still
exist when returning out of the recursion.
it uses srps to access nodes and drops the lock before calling the
callback function. this is because some callbacks sleep (eg, copyout
in the sysctl code that dumps an rtable to userland), which you
shouldnt hold a lock accross. other callbacks attempt to modify
the rtable (eg, marking routes as down when then interface theyre
on goes down), which tries to take the lock again, which probably
wont work in the future.
ok jmatthew@ mpi@
deraadt [Wed, 22 Jun 2016 03:48:23 +0000 (03:48 +0000)]
sync
mikeb [Wed, 22 Jun 2016 01:13:07 +0000 (01:13 +0000)]
Main Hyper-V nexus driver, work in progress.
ok mlarkin, deraadt
mikeb [Wed, 22 Jun 2016 01:12:38 +0000 (01:12 +0000)]
Setup Hyper-V hypercall page and an IDT vector.
ok mlarkin, kettenis, deraadt
jmc [Tue, 21 Jun 2016 22:35:39 +0000 (22:35 +0000)]
use the same argument name for -f in usage() as in SYNOPSIS;
benno [Tue, 21 Jun 2016 21:35:24 +0000 (21:35 +0000)]
do not allow whitespace in macro names, i.e. "this is" = "a variable".
change this in all config parsers in our tree that support macros.
problem reported by sven falempin.
feedback from henning@, stsp@, deraadt@
ok florian@ mikeb@
ratchov [Tue, 21 Jun 2016 21:16:42 +0000 (21:16 +0000)]
Make usage string match the man page.
suggested by jmc@
bluhm [Tue, 21 Jun 2016 16:45:37 +0000 (16:45 +0000)]
To assist debugging TCP connection reuse with NAT, expand the
existing log in pf_state_key_attach() from the failed to the reuse
case.
OK mikeb@
kettenis [Tue, 21 Jun 2016 15:39:51 +0000 (15:39 +0000)]
Remove code to generate uboot tags. It hardcoded information for a single
board and a device tree is required by our kernel now.
ok patrick@, jsg@
deraadt [Tue, 21 Jun 2016 15:25:36 +0000 (15:25 +0000)]
When handling DT_TEXTREL only set the mapping to READ+WRITE, ignore
possible EXEC permission for the section, because the proper permission
is set late, and there are no thread concerns here. Avoids W^X issues
in oddball cases.
ok guenther kettenis
jcs [Tue, 21 Jun 2016 15:24:55 +0000 (15:24 +0000)]
add support to efifb for drawing a console on a coreboot framebuffer
if coreboot's memory table is found, it has a framebuffer entry, and
there is no previously attached efi, vga, or serial console.
useful on chromebooks that have no legacy vga device to get an early
console before inteldrm(4) attaches or, for newer chipsets, a full
console and X with wsfb(4).
ok kettenis
deraadt [Tue, 21 Jun 2016 15:21:42 +0000 (15:21 +0000)]
Handle textrels like other architectures do.
ok kettenis guenther
benno [Tue, 21 Jun 2016 13:40:43 +0000 (13:40 +0000)]
the manpage documents that af-to does not work on pass out rules, but
the pf.conf parser allows it, which leads a non working configuration
being loaded.
this changes the parser to make pass out .. af-to an error.
ok henning@ mikeb@
aoyama [Tue, 21 Jun 2016 12:31:19 +0000 (12:31 +0000)]
Add sc_cookie in sigcontext, as same as other ports.
From Miod Vallat, tested by him and me.
ok deraadt@
espie [Tue, 21 Jun 2016 10:40:37 +0000 (10:40 +0000)]
pass file name thru to Subst for better error messages.
reported by Adam Wolk
jmc [Tue, 21 Jun 2016 07:55:21 +0000 (07:55 +0000)]
some formatting and comma tweaks; ok ratchov
ratchov [Tue, 21 Jun 2016 06:38:28 +0000 (06:38 +0000)]
fix typos in comments and spacing
ratchov [Tue, 21 Jun 2016 06:32:00 +0000 (06:32 +0000)]
Update manual to "new" audioctl:
- stress that its purpose is to set and get variables, it isn't
a configuration tool (there's nothing to configure anymore)
- document all audio driver variables
- document the difference between /dev/audioctl0 and /dev/audio0
- give an example of how to test hardware capabilities with
audioctl
ok semarie@, with help from jmc@, fix from Michael W. Bombardieri
ratchov [Tue, 21 Jun 2016 06:26:50 +0000 (06:26 +0000)]
Reimplement audioctl using new api in a simper way.
- group all encoding parameters in a signle string, ex. "s16le",
this way we use the same naming scheme as aucat, sndiod and many
ports.
- remove "properties" as they are not used any longer
- remove the list of encodings as there's no benefit in having it.
We don't have lists for other parameters (sample rates, channel
numbers) either.
- add -q option, to look like sysctl
- remove unused -a option
- stop using symlinks in /dev, most other software doesn't use
them.
ok semarie@
bcook [Tue, 21 Jun 2016 04:16:53 +0000 (04:16 +0000)]
Disable DSA_FLAG_NO_EXP_CONSTTIME, always enable constant-time behavior.
Improved patch from Cesar Pereida. See
https://github.com/libressl-portable/openbsd/pull/61 for more details.
ok beck@
bcook [Tue, 21 Jun 2016 03:56:43 +0000 (03:56 +0000)]
Fix a bug loading the default certificate path locations.
The files would only be loaded if the CAfile or CApath locations were
succesfully loaded first. Original patch from OpenSSL:
https://github.com/openssl/openssl/commit/
fe9b85c3cb79f1e29e61f01de105b34ce8177190
ok beck@
guenther [Tue, 21 Jun 2016 02:55:57 +0000 (02:55 +0000)]
Make creation of text-relocations a fatal error by default, with -znotext
to permit it and -ztext to reenable the default of forbidding it.
ok kettenis@
gilles [Mon, 20 Jun 2016 20:26:04 +0000 (20:26 +0000)]
with new fork+reexec, in case of failure in init of any child process
causing it to exit, we could end up with a NULL deref in parent.
free commit offered by eric@, ok gilles@
benno [Mon, 20 Jun 2016 20:12:52 +0000 (20:12 +0000)]
change the "nexthop 1.2.3.4 now valid: via 192.168.0.1" message to log_debug()
ok deraadt@ florian@ stsp@ phessler@
mglocker [Mon, 20 Jun 2016 13:42:42 +0000 (13:42 +0000)]
I2C driver for the Maxim DS1307 Real Time Clock chip.
The chip has been found on a Sun Fire V210 as a second RTC hooked up
to the SMU. Setting the time there has the advantage that it remains
after a boot since the internal V210 RTC will be synced by the DS1307
at boot time.
Not linked to sparc64 yet since it will overwrite the internal RTC
handler.
ok deraadt
stsp [Mon, 20 Jun 2016 11:54:36 +0000 (11:54 +0000)]
In iwm(4), send PHY DB commands as async commands.
This means we won't sleep and wait for the firmware to send an interrupt
when it's done processing the command. For unknown reasons, sometimes the
firmware never wakes the driver after a phy db command so the driver gives
up partway through the hardware init sequence.
We already have a DELAY in place after each phy db command we send to give
the firmware some time for processing, so skipping the sleep is not expected
to cause problems. If it does, we'll have to revisit this change.
For now, this change makes iwm(4) work better in bsd.rd.
Problem reported by Remi Locherer on bugs@, and confirmed by kettenis@.
Lots of help with testing and ok tb@
dlg [Mon, 20 Jun 2016 11:02:33 +0000 (11:02 +0000)]
rework the splfoo implementation so it can provide splraise.
sparc was like sparc64 (or more likely sparc64 was like sparc) in
that the spl api was build with macros that created inline functions
that the spl were implemented as. this rework provides an splraise
that the splfoo macros are defined to.
because the code sequences for spl0, splraise, and splx are relatively
long, ive turned them into functions.
tested by (and thanks go to) miod@ tobiasu@
stsp [Mon, 20 Jun 2016 09:03:08 +0000 (09:03 +0000)]
Tweak umb(4) man page, mostly for brevity.
ok gerhard
ajacoutot [Mon, 20 Jun 2016 08:36:36 +0000 (08:36 +0000)]
Add a bit more verbosity to tmpfs mount(8) output.
ok millert@
feedback/ok natano@
stsp [Mon, 20 Jun 2016 07:33:34 +0000 (07:33 +0000)]
Make umb(4) less verbose by default. 'ifconfig umb0 debug' enables verbose mode.
ok mpi deraadt gerhard
guenther [Sun, 19 Jun 2016 22:57:53 +0000 (22:57 +0000)]
At least display the DT_GNU_HASH tag nicely
ok kettenis@
guenther [Sun, 19 Jun 2016 22:35:43 +0000 (22:35 +0000)]
Update docs to match our local time_t changes
kettenis [Sun, 19 Jun 2016 22:14:46 +0000 (22:14 +0000)]
Rework how umb(4) attaches such that it also works with devices that implement
both NCM 1.0 and MBIM.
ok gerhard@
kettenis [Sun, 19 Jun 2016 22:13:07 +0000 (22:13 +0000)]
Add define for NCM.
ok gerhard@
guenther [Sun, 19 Jun 2016 21:41:51 +0000 (21:41 +0000)]
KTRPOINT() takes a KTR_* value, not a KTRFAC_* value.
problem noted and based on diff by Michal Mazurek (akfaew (at) jasminek.net)
ok jmc@
martijn [Sun, 19 Jun 2016 19:29:43 +0000 (19:29 +0000)]
Move the RB_ code from doas.h to env.c, and limit the environment interface to a
simple prepenv function.
OK tedu@
jmc [Sun, 19 Jun 2016 18:43:40 +0000 (18:43 +0000)]
a little nicer formatting; from miod
jmc [Sun, 19 Jun 2016 16:06:18 +0000 (16:06 +0000)]
no more lock(9);
ajacoutot [Sun, 19 Jun 2016 15:00:37 +0000 (15:00 +0000)]
Replace some expensive evals.
jsg [Sun, 19 Jun 2016 14:38:13 +0000 (14:38 +0000)]
omap4 uart is compatible with omap3 uart but has it's own compatible string
jsg [Sun, 19 Jun 2016 14:27:35 +0000 (14:27 +0000)]
dynamically attach omap uart with fdt
tb [Sun, 19 Jun 2016 13:42:56 +0000 (13:42 +0000)]
Split readlabel() into two functions, readlabel() and parselabel(), and
pledge in-between the two funtion calls. The new readlabel() only does
a DIOC*DINFO ioctl, making sure the fd points to a disk, while
parselabel() does the scary string manipulations. In the makelabel()
code path do an early DIOCGDINFO before pledge. This fixes yet another
pledge problem (disklabel -w /dev/tty floppy576).
Some of this was discussed with beck.
ok semarie, earlier version ok deraadt
stsp [Sun, 19 Jun 2016 12:05:25 +0000 (12:05 +0000)]
Make some noise in dmesg when iwm(4) fails to bring up the hardware.
ok tb@ earlier version
natano [Sun, 19 Jun 2016 11:54:33 +0000 (11:54 +0000)]
Remove the lockmgr() API. It is only used by filesystems, where it is a
trivial change to use rrw locks instead. All it needs is LK_* defines
for the RW_* flags.
tested by naddy and sthen on package building infrastructure
input and ok jmc mpi tedu
jsg [Sun, 19 Jun 2016 11:45:15 +0000 (11:45 +0000)]
sync
ajacoutot [Sun, 19 Jun 2016 11:32:25 +0000 (11:32 +0000)]
Do caching differently.
ajacoutot [Sun, 19 Jun 2016 11:14:20 +0000 (11:14 +0000)]
Temporarily turn caching off; there's a small regression when enabling
multiple daemons at once; being worked on.
ajacoutot [Sun, 19 Jun 2016 10:54:20 +0000 (10:54 +0000)]
Implement rcctl get|getdef all.
With this and the previous 2 commits, we can move from constructs like:
$ for i in $(rcctl ls all); do rcctl get $i; done
to just:
$ rcctl get all
Shrinking the run by a factor of more than 3.5.
prodded by and discussed with reyk@ at BSDcan2016
ok robert@
ajacoutot [Sun, 19 Jun 2016 10:50:27 +0000 (10:50 +0000)]
Cache result of often used functions (svc_is_{base,meta,special}).
Large speedup when iterating over all rc.d scripts.
with and ok robert@
ajacoutot [Sun, 19 Jun 2016 10:46:08 +0000 (10:46 +0000)]
grep(1) /etc/rc.conf instead of /etc/rc to detect whether a particular
rc.d script comes from base of not; it's much faster.
ok robert@
dlg [Sun, 19 Jun 2016 10:21:56 +0000 (10:21 +0000)]
add pool_setipl on all pools.
ok tedu@ visa@
djm [Sun, 19 Jun 2016 07:48:02 +0000 (07:48 +0000)]
revert 1.34; causes problems loading public keys
reported by semarie@
jmc [Sat, 18 Jun 2016 22:19:13 +0000 (22:19 +0000)]
sort previous;
guenther [Sat, 18 Jun 2016 17:39:44 +0000 (17:39 +0000)]
KTRPOINT() is only useful in the kernel, so move it behind #ifdef _KERNEL
ok mpi@ kettenis@
renato [Sat, 18 Jun 2016 17:31:32 +0000 (17:31 +0000)]
Fix removal of dual-stack neighbors.
renato [Sat, 18 Jun 2016 17:13:05 +0000 (17:13 +0000)]
Fix memory leak found with valgrind.
renato [Sat, 18 Jun 2016 17:11:37 +0000 (17:11 +0000)]
Fix use after free bug.
visa [Sat, 18 Jun 2016 15:59:34 +0000 (15:59 +0000)]
Make the 1 Gbps SGMII settings the default to define a consistent set of
parameters even if a link is down.
visa [Sat, 18 Jun 2016 15:43:08 +0000 (15:43 +0000)]
Fix PCS block size.
reyk [Sat, 18 Jun 2016 15:25:28 +0000 (15:25 +0000)]
Remove duplicated line.
OK eric@
vgross [Sat, 18 Jun 2016 10:36:13 +0000 (10:36 +0000)]
Add net.inet.{tcp,udp}.rootonly sysctl, to mark which ports
cannot be bound to by non-root users.
Ok millert@ bluhm@
jsg [Sat, 18 Jun 2016 09:59:35 +0000 (09:59 +0000)]
Stop setting the 4-bit mode capability flag for now.
Writing to the bbb emmc (but not reading) gives errors otherwise.
This does not occur with an sd card on bbb but apparently does on panda.
ratchov [Sat, 18 Jun 2016 07:59:30 +0000 (07:59 +0000)]
Add a new AUDIO_GETSTATUS ioctl to get various audio driver variables.
It's intended for use with diagnostic tools (like audioctl) and is of
no use to audio programs.
stsp [Sat, 18 Jun 2016 07:49:24 +0000 (07:49 +0000)]
Plug some memory leaks in error paths of iwm(4).
Patch by Imre Vadasz.
jmc [Sat, 18 Jun 2016 06:48:31 +0000 (06:48 +0000)]
tweak previous;
ok mglocker
jsg [Sat, 18 Jun 2016 05:59:26 +0000 (05:59 +0000)]
Dynamically attach ommmc with fdt. Offset the start of the memory region
by 0x100 for nodes compatible with "ti,omap4-hsmmc" to get the same
offsets as omap3. Handle both the nintr 1 (omap3/am335x) and nintr 3
(omap4) cases in attach. Ideally the "interrupts" property will be
handled by the interrupt controller drivers directly in future.
guenther [Sat, 18 Jun 2016 04:24:19 +0000 (04:24 +0000)]
Update column width decision
guenther [Sat, 18 Jun 2016 04:21:24 +0000 (04:21 +0000)]
Document KTRFAC_{PLEDGE,EXEC{ARGS,ENV}}
guenther [Sat, 18 Jun 2016 02:40:46 +0000 (02:40 +0000)]
Make mips64 like all the others: only make mappings writable during relocation
if DT_TEXTREL was set on the object. If that's needed, only set the mapping
to READ+WRITE to avoid W^X violation.
ok kettenis@
renato [Sat, 18 Jun 2016 01:33:02 +0000 (01:33 +0000)]
Do not allow configuring the same interface for both LDP and VPLS.
Configuring an interface for both LDP signaling and as a member of a
VPLS instance doesn't cause any harm as far as ldpd is concerned. But
it certainly doesn't make any sense, so it's better to reject the
configuration and warn the user instead of ignoring this silently.
renato [Sat, 18 Jun 2016 01:30:28 +0000 (01:30 +0000)]
Use log_warnx() instead of log_warn() when appropriate.
renato [Sat, 18 Jun 2016 01:29:05 +0000 (01:29 +0000)]
Remove TODO comments about loop detection.
LDP loop detection is only necessary for ATM LSRs running in cell mode. We
are never going to implement this "feature".
Also, add two more comments in lde_check_request().
renato [Sat, 18 Jun 2016 01:25:53 +0000 (01:25 +0000)]
Fix small LIB<->LFIB synchronization issue.
ldpd operates only with the best routes of each IP prefix. In other words,
the routes with the lowest priorities.
When a route with a better priority is detected (possibly with a different
nexthop), we should uninstall the labels from the "old" routes and try
to install a new label for the new route (if there's one available in
the LIB).
In this specific case, ldpd was failing to uninstall the labels from the
old routes because it wasn't keeping track of each route's priority in
lde. With this missing bit of information, the parent process had no way
to get the correct label to uninstall when processing a IMSG_KLABEL_DELETE
message.
guenther [Fri, 17 Jun 2016 19:20:19 +0000 (19:20 +0000)]
urtwn device now needs rtwn.c, even if rtwn device isn't built
ok mpi@ jca@ mglocker@
otto [Fri, 17 Jun 2016 18:56:51 +0000 (18:56 +0000)]
Also add missing date or message-id when listening on the submit port
ok gilles@