millert [Tue, 9 Aug 2016 12:06:58 +0000 (12:06 +0000)]
Document that connect goes async when interrupted by signal.
schwarze [Tue, 9 Aug 2016 11:04:46 +0000 (11:04 +0000)]
In emacs incremental search mode (^R),
make commands starting with the escape key (^[) work as documented.
Long-standing bug, this time reported by Dave minus Cohen dot com.
OK natano@ halex@
guenther [Tue, 9 Aug 2016 03:58:35 +0000 (03:58 +0000)]
Teach arm to pass &_DYNAMIC to _dl_boot_bind(); can optimize later in tree
guenther [Tue, 9 Aug 2016 02:25:35 +0000 (02:25 +0000)]
When interrupted, connect() should leave the socket connecting in the
background, similar to a non-blocking socket. Return EALREADY whenever
already connecting, not just for non-blocking sockets. Fix from {Free,Net}BSD
Prompted by a report from Michael Reed (m.reed (at) mykolab.com)
ok millert@
dtucker [Mon, 8 Aug 2016 22:40:57 +0000 (22:40 +0000)]
Improve error message for overlong ControlPath. ok markus@ djm@
guenther [Mon, 8 Aug 2016 22:05:26 +0000 (22:05 +0000)]
Look for a PT_GNU_RELRO section and, if present, mprotect that range
instead of the [__got_start, __got_end) range.
Also, instead of mprotecting the [__plt_start, __plt_end) range,
just scan for sections which are both writable and executable and
mprotect them to read-only. (This part was stolen from kettenis@)
ok kettenis@
guenther [Mon, 8 Aug 2016 21:59:20 +0000 (21:59 +0000)]
Look for a PT_GNU_RELRO section per object and, if present, mprotect that
range instead of the [__got_start, __got_end) range.
On many archs this will cover _DYNAMIC too, so move up the DT_DEBUG handling
to before relocations and the mprotect are done.
ok kettenis@
renato [Mon, 8 Aug 2016 21:44:00 +0000 (21:44 +0000)]
Use exit(3) instead of _exit(2) in the child processes.
Since recently the child processes call exec() after fork(), so they
should stop using _exit(2) and use exit(3) instead when shutting down.
Ok claudio@
renato [Mon, 8 Aug 2016 21:42:13 +0000 (21:42 +0000)]
Use exit(3) instead of _exit(2) in the child processes.
Since recently the child processes call exec() after fork(), so they should
stop using _exit(2) and use exit(3) instead when shutting down.
Ok claudio@
renato [Mon, 8 Aug 2016 21:38:42 +0000 (21:38 +0000)]
Simplify shutdown process
On shutdown, there's no need to use kill(2) to kill the child
processes. Just closing the IPC sockets will make the children receive
an EOF, break out from the event loop and then exit.
This "pipe teardown" removes a PID reuse race condition, makes the code
simpler and allow us to remove "proc" from pledge.
OK and tweaks from claudio@
kettenis [Mon, 8 Aug 2016 19:27:12 +0000 (19:27 +0000)]
Move the cpu_setup() call to the end of initarm(). On Cortex-A53 processors
atomic instructions don't work unless the data cache is enabled. This happens
in cpu_setup(), but that gets currently called from cpu_startup() which runs
after a number of kernel subsystems have been initialized. Since some of
these subsystems use locks, which need atomic instructions, we fault on
Cortex-A53. Since at the end of initarm() we're done setting up the pmap
and initializing other low-level sense, calling cpu_setup() here makes much
more sense.
Remove setting up proc0paddr as well from cpu_startup(), since that already
happens in initarm().
Tested on zaurus by deraadt@.
ok jsg@, patrick@
jmc [Mon, 8 Aug 2016 18:13:51 +0000 (18:13 +0000)]
trim the dsaparam section; ok guenther
deraadt [Mon, 8 Aug 2016 17:15:51 +0000 (17:15 +0000)]
W^X violations are only permitted for binaries marked "wxneeded" on
"wxallowed" filesystems. mmap(2) & mprotect(2) now return ENOTSUP.
(To diagnose buggy programs, consider using sysctl kern.wxabort=1 and
looking at the coredumps)
ok kettenis tedu naddy
rzalamena [Mon, 8 Aug 2016 16:52:15 +0000 (16:52 +0000)]
Create socket with SOCK_NONBLOCK instead of using fcntl() without the
proper flag handling.
ok reyk@
rzalamena [Mon, 8 Aug 2016 16:49:17 +0000 (16:49 +0000)]
Handle imsg_read() EAGAIN like the man page code example.
ok reyk@
renato [Mon, 8 Aug 2016 16:48:53 +0000 (16:48 +0000)]
rde and eigrpe should use exit(3) instead of _exit(2)
Since recently these processes call exec() after fork(), so they should
stop using _exit(2) and use exit(3) instead when shutting down.
ok claudio@
renato [Mon, 8 Aug 2016 16:45:51 +0000 (16:45 +0000)]
Normalize the received prefixes.
We need to use ldp_applymask() to normalize the received
prefixes. Example: 10.1.1.0/16 -> 10.1.0.0/16.
Additionally, stop using IANA's AF numbers in map->fec.prefix.af and use
AF_INET/AF_INET6 instead. This makes the code much simpler, use AF_IPV[46]
only when necessary (decoding/encoding prefixes).
ok claudio@
mikeb [Mon, 8 Aug 2016 16:39:06 +0000 (16:39 +0000)]
Fixup incorrect format specification bugs spotted by jsg@
sobrado [Mon, 8 Aug 2016 15:09:32 +0000 (15:09 +0000)]
/tmp and /var/tmp are the same, consistently use the former in both
build/recover and documentation.
ok millert@, tb@, martijn@ and schwarze@
kettenis [Mon, 8 Aug 2016 14:47:52 +0000 (14:47 +0000)]
Mapping non-cachable memory as cachable and subsequently changing the mapping
to non-cachable is retarded. Fix this by introducing PMAP_NOCACHE and
PMAP_DEVICE flags that can be or'ed into the physical address passed to
pmap_kenter(9), like we have on many of our other architectures. This way we
can also properly distinguish between device memory and normal (non-cachable)
memory.
ok visa@
mpi [Mon, 8 Aug 2016 13:09:36 +0000 (13:09 +0000)]
Execute address hooks in the update case.
This matches what IPv4 is doing and unbreak carp(4) when the same
address is set twice, for example when running netstart(8) multiple
times.
Issue reported by and fix from Simon Mages.
kettenis [Mon, 8 Aug 2016 10:10:56 +0000 (10:10 +0000)]
Implement mmc power sequencing; makes the sdo interface on the cubox-i work
and see the BCM4330 wireless (for which we don't have a driver yet).
ok jsg@
kettenis [Mon, 8 Aug 2016 09:06:47 +0000 (09:06 +0000)]
ARMv7 data caches are "effectively" PIPT. This means there is in general
no need to clean and/or invalidate cached pages. So remove most of the
cache cleaning and invalidation from the pmap. We still need to synchronize
the instruction cache with the data cache in various places though. And we
also need to make sure that we clean and invalidate when we make a page
non-cachable.
Tested by Daniel Bolgheroni, mglocker@ and jsg@. on Cortex-A8 and myself on
Cortex-A9.
ok visa@
yasuoka [Mon, 8 Aug 2016 08:22:29 +0000 (08:22 +0000)]
Fix previous. Obvously the condition is reversed.
yasuoka [Mon, 8 Aug 2016 07:24:27 +0000 (07:24 +0000)]
Split ofcconn into switch part and connection part to make the switch
part be able to have multiple connections.
ok reyk.
stsp [Sun, 7 Aug 2016 23:06:39 +0000 (23:06 +0000)]
Make iwm(4) automagically recover from fatal firmware errors by leaving the
interface marked UP and scheduling the init task. Matches iwn(4) behaviour.
guenther [Sun, 7 Aug 2016 20:00:39 +0000 (20:00 +0000)]
Since we have kbind(2), we don't need -znow to use -zrelro
ok kettenis@
guenther [Sun, 7 Aug 2016 19:59:07 +0000 (19:59 +0000)]
If an output section is skipped because of a constraint, then skip it
when generating the link map output (-M) too
ok kettenis@
kettenis [Sun, 7 Aug 2016 18:43:17 +0000 (18:43 +0000)]
Use the device tree to lookup the address of the ARM control logic and remove
some debug crap that I accidentally committed.
kettenis [Sun, 7 Aug 2016 18:00:53 +0000 (18:00 +0000)]
Add the Raspberry Pi 2/3 devices here as well.
Spotted by patrick@
kettenis [Sun, 7 Aug 2016 17:46:36 +0000 (17:46 +0000)]
Initial support for Raspberry Pi 2/3. All the hard work done by patrick@, I
just cleaned things up a bit. Any bugs introduced in that process are
entirely mine.
This doesn't work yet. But when it does, you'll need recent firmware from
the Raspberry Pi Foundation git repository at
https://github.com/raspberrypi/firmware
The device tree for the Raspberry Pi is somewhat in flux as bits and pieces
to support the Raspberry Pi 2 and 3 are committed to the mainline Linux
kernel.
reyk [Sun, 7 Aug 2016 14:26:26 +0000 (14:26 +0000)]
whitespace
reyk [Sun, 7 Aug 2016 13:49:12 +0000 (13:49 +0000)]
Define VXLAN_VNI_UNSET and VXLAN_VNI_MAX instead of using magic numbers.
No functional change.
tb [Sun, 7 Aug 2016 08:59:25 +0000 (08:59 +0000)]
Update online manual path to man.openbsd.org.
ok espie
tb [Sun, 7 Aug 2016 03:27:21 +0000 (03:27 +0000)]
Update the link for the getentropy(2) manual to man.openbsd.org/
ok deraadt@
guenther [Sun, 7 Aug 2016 03:05:23 +0000 (03:05 +0000)]
As with csu, alpha passes &_DYNAMIC to _reloc_alpha_got(), so just
save that and pass it to _dl_boot_bind() too
guenther [Sun, 7 Aug 2016 03:03:44 +0000 (03:03 +0000)]
Teach i386 to pass &_DYNAMIC to _dl_boot_bind()
guenther [Sun, 7 Aug 2016 03:01:53 +0000 (03:01 +0000)]
Teach mips64 to pass &_DYNAMIC to _dl_boot_bind()
mips64be testing by deraadt@
guenther [Sun, 7 Aug 2016 02:59:27 +0000 (02:59 +0000)]
hahahah: amd64 has been passing &_DYNAMIC to _dl_boot_bind() for
*149 months*
guenther [Sun, 7 Aug 2016 02:57:19 +0000 (02:57 +0000)]
Flip the #ifdef logic: amd64, arm, i386, and mips64 are the only archs
using the #else case
guenther [Sun, 7 Aug 2016 02:44:00 +0000 (02:44 +0000)]
Teach mips64 to pass &_DYNAMIC to _dl_boot_bind().
mips64be testing by deraadt@
guenther [Sun, 7 Aug 2016 02:34:52 +0000 (02:34 +0000)]
alpha already calculates &_DYNAMIC for the _reloc_alpha_got() call, so
save that and pass it to _dl_boot_bind() too
guenther [Sun, 7 Aug 2016 02:30:55 +0000 (02:30 +0000)]
Teach i386 to pass &_DYNAMIC to _dl_boot_bind()
guenther [Sun, 7 Aug 2016 02:30:04 +0000 (02:30 +0000)]
Psych: amd64 has been passing &_DYNAMIC to _dl_boot_bind() for 19 months
guenther [Sun, 7 Aug 2016 02:28:12 +0000 (02:28 +0000)]
Flip the #ifdef logic: amd64, i386, and mips64 were the only static PIE
archs using the #else case
guenther [Sun, 7 Aug 2016 02:02:57 +0000 (02:02 +0000)]
Add XOR cookies for lr and sp. Stop saving/restoring r12 to/from the jmpbuf.
Switch from calling obsolete sig{block,setmask} to directly using the
sigprocmask syscall.
ok deraadt@ kettenis@
jmatthew [Sun, 7 Aug 2016 00:21:57 +0000 (00:21 +0000)]
add $OpenBSD$ tags
deraadt [Sat, 6 Aug 2016 21:21:05 +0000 (21:21 +0000)]
sync
tedu [Sat, 6 Aug 2016 19:56:51 +0000 (19:56 +0000)]
reset timeout to null when relooping
guenther [Sat, 6 Aug 2016 19:16:09 +0000 (19:16 +0000)]
Use internal names for __errno, _memcpy, memset, and {,_}{set,long}jmp
Eliminate pointless use of PIC_SYM()
Split out DEFS.h from SYS.h like some other archs
ok kettenis@ deraadt@
patrick [Sat, 6 Aug 2016 18:21:34 +0000 (18:21 +0000)]
Always allocate intrhand with M_WAITOK.
Requested by and ok kettenis@
patrick [Sat, 6 Aug 2016 18:18:48 +0000 (18:18 +0000)]
Always allocate intrhand with M_WAITOK.
Requested by and ok kettenis@
patrick [Sat, 6 Aug 2016 18:12:13 +0000 (18:12 +0000)]
Implement interrupt controller functionality in the i.MX6 GPIO
driver. This allows us to use to hook up the Ethernet interrupt
on the Nitrogen6x, SabreLite and WandBoard like it's described
in the device tree.
ok kettenis@
patrick [Sat, 6 Aug 2016 17:25:14 +0000 (17:25 +0000)]
Extend the interrupt controller API with a disestablish functionality.
This will be helpful for interrupt combiner that need to re-establish
their main interrupt when their interrupt priorities change.
ok kettenis@
kettenis [Sat, 6 Aug 2016 17:18:38 +0000 (17:18 +0000)]
Switch imx over to the generic pinctrl API.
ok patrick@
kettenis [Sat, 6 Aug 2016 17:16:13 +0000 (17:16 +0000)]
Build ofw_pinctrl.o and ofw_gpio.o on armv7. The latters here from the
generic arm files list. There is no point in building it on armish or
zaurus.
ok patrick@
kettenis [Sat, 6 Aug 2016 17:12:34 +0000 (17:12 +0000)]
Add a generic pinctrl "framework".
ok patrick@
kettenis [Sat, 6 Aug 2016 16:46:25 +0000 (16:46 +0000)]
Put page tables in normal cachable memory on armv7. Check if the MMU walks
the page tables coherently and also skip flushing modified ptes out of the
cache in that case. Speeds up building a kernel with a factor of two on
Cortex-A9 (tested by me) and Cortex-A8 (tested by mglocker@).
ok patrick@
tb [Sat, 6 Aug 2016 15:46:33 +0000 (15:46 +0000)]
Add more tests for better code coverage:
What happens if begin and end are reversed? What if they are equal?
While there, add a few comments on the purpose of the tests.
tb [Sat, 6 Aug 2016 14:41:14 +0000 (14:41 +0000)]
If you see code like this, you know something's quite wrong
(present in some form since r1.1, still present in r1.31):
229 case 013:
230 if (randomize)
231 begin = BEGIN_DEF;
232 else if (reps == 0)
233 errx(1, "Must specify begin if reps == 0");
234 begin = ender - reps * s + s;
Add two tests that check for the intended behavior.
reyk [Sat, 6 Aug 2016 14:33:33 +0000 (14:33 +0000)]
Add support for IPv6 tunnel endpoints. This currently only works for
unicast mode, multicast is not yet supported.
ifconfig vxlan0 tunnel fd00::1 fd00::2
Roughly based on an earlier diff by goda@
OK yasuoka@
reyk [Sat, 6 Aug 2016 14:29:48 +0000 (14:29 +0000)]
Fix multicast mode (destination is a multicast IP): the BCAST and
MCAST flags have to be cleared from the mbuf after decapsulating
packets. This fixes tunneled broadcast packets, eg. ARP. It used to
work before the input path was changed the flags got cleared later in
the stack.
OK yasuoka@
patrick [Sat, 6 Aug 2016 11:04:47 +0000 (11:04 +0000)]
Rework ampintc's interrupt disestablish code to make it actually do
its job. Recalculate the mask after the handler is taken from the
list to properly set the new prioritization.
ok kettenis@
jsg [Sat, 6 Aug 2016 10:07:45 +0000 (10:07 +0000)]
Dynamically attach intc(4) using the FDT and switch omap/am335x
drivers that use the FDT over to the FDT interrupt establish API.
ok kettenis@
jsg [Sat, 6 Aug 2016 09:50:55 +0000 (09:50 +0000)]
Disable edma(4). It isn't currently used and is getting in the way of
future changes as it establishes an interrupt but hasn't been converted
to attach with the fdt.
ok kettenis@
visa [Sat, 6 Aug 2016 09:32:04 +0000 (09:32 +0000)]
Add PageGrain bits.
pascal [Sat, 6 Aug 2016 07:08:59 +0000 (07:08 +0000)]
Unbreak PSK authentication, broken by previous.
ok reyk@ florian@
visa [Sat, 6 Aug 2016 04:32:24 +0000 (04:32 +0000)]
Log RX errors only when the interface's debug flag is set.
While here, remove unused PIP error code aliases.
jsg [Sat, 6 Aug 2016 04:03:20 +0000 (04:03 +0000)]
remove now unused board specific phy defines
deraadt [Sat, 6 Aug 2016 01:51:04 +0000 (01:51 +0000)]
sync
jsg [Sat, 6 Aug 2016 00:54:02 +0000 (00:54 +0000)]
Dynamically attach pluart(4) using the FDT.
ok kettenis@ patrick@
jsg [Sat, 6 Aug 2016 00:40:54 +0000 (00:40 +0000)]
Dynamically attach plrtc(4) using the FDT.
ok kettenis@ patrick@
jsg [Sat, 6 Aug 2016 00:34:24 +0000 (00:34 +0000)]
virtio no longer attaches to vexpress
jsg [Sat, 6 Aug 2016 00:30:47 +0000 (00:30 +0000)]
Dynamically attach virtio(4) using the FDT.
ok kettenis@ patrick@
jsg [Sat, 6 Aug 2016 00:16:50 +0000 (00:16 +0000)]
adjust for fdt changes
jsg [Sat, 6 Aug 2016 00:04:39 +0000 (00:04 +0000)]
Set up the fdt attach args for devices that attach directly to mainbus
the same way as for those that attach to simplebus.
ok kettenis@ patrick@
kettenis [Fri, 5 Aug 2016 22:19:23 +0000 (22:19 +0000)]
Use m_devget(4). From Artturi Alm.
schwarze [Fri, 5 Aug 2016 21:45:57 +0000 (21:45 +0000)]
enable the mandoc.db(5) regression suite, code is stable enough now
kettenis [Fri, 5 Aug 2016 21:45:37 +0000 (21:45 +0000)]
Dynamically attach sxidog(4).
schwarze [Fri, 5 Aug 2016 21:42:06 +0000 (21:42 +0000)]
adjust expected output after the NAME_HEAD fix in mandocdb.c rev. 1.175
jmc [Fri, 5 Aug 2016 21:40:25 +0000 (21:40 +0000)]
a1xintc -> sxiintc;
kettenis [Fri, 5 Aug 2016 21:39:02 +0000 (21:39 +0000)]
Remove sxirtc(4) from the tables now that it attaches dynamically.
schwarze [Fri, 5 Aug 2016 21:37:39 +0000 (21:37 +0000)]
missing <endian.h> reported by Bapt@iste Daroussin, found on FreeBSD
kettenis [Fri, 5 Aug 2016 21:29:23 +0000 (21:29 +0000)]
Dynamically attach sxirtc(4); another board_id check bites the dust.
kettenis [Fri, 5 Aug 2016 21:28:13 +0000 (21:28 +0000)]
Check if we have the required "reg" property.
kettenis [Fri, 5 Aug 2016 20:41:10 +0000 (20:41 +0000)]
a1xintc(4) -> sxiintc(4)
kettenis [Fri, 5 Aug 2016 20:38:17 +0000 (20:38 +0000)]
We don't want drivers with numbers in their names.
Requested by deraadt@
kettenis [Fri, 5 Aug 2016 19:56:52 +0000 (19:56 +0000)]
Replace inappropriate use of CP15_CNTPCT with CP_DCCIMVAC.
No binary change.
kettenis [Fri, 5 Aug 2016 19:00:25 +0000 (19:00 +0000)]
Switch the sunxi platform over to the new interrupt establish API. This
involves turning sxiahci(4) into a real driver that dynamically attaches.
ehci(4) now also attaches dynamically.
ok jsg@, patrick@
mikeb [Fri, 5 Aug 2016 18:31:21 +0000 (18:31 +0000)]
Switch pending event clearing to an atomic swap operation
Rather than performing an atomic bit clearing for every encountered
event bit set we can adjust the code to perform an atomic swap of a
single row of the events array and decrease the amount of expensive
atomic operations.
Same optimization as for Hyper-V. From FreeBSD.
mikeb [Fri, 5 Aug 2016 18:16:04 +0000 (18:16 +0000)]
Switch pending event clearing to an atomic swap operation
Rather than performing an atomic bit clearing for every encountered
event bit set we can adjust the code to perform an atomic swap of a
single row of the events array and decrease the amount of expensive
atomic operations.
From FreeBSD.
mikeb [Fri, 5 Aug 2016 18:12:48 +0000 (18:12 +0000)]
Fixup incorrect EAGAIN handling
mikeb [Fri, 5 Aug 2016 18:12:20 +0000 (18:12 +0000)]
Read events array offset must be calculated in bytes
mikeb [Fri, 5 Aug 2016 18:05:44 +0000 (18:05 +0000)]
Remove incorrect optimization: ring data portion size is not power of 2
deraadt [Fri, 5 Aug 2016 17:25:51 +0000 (17:25 +0000)]
Do not *printf %s NULL
ok bcook
schwarze [Fri, 5 Aug 2016 17:20:30 +0000 (17:20 +0000)]
fix a typo that prevented names from .Dt from getting priority over
names from .Sh NAME; no dire consequences on OpenBSD since we no
longer have MLINKS for mdoc(7) pages
schwarze [Fri, 5 Aug 2016 17:02:04 +0000 (17:02 +0000)]
* Properly distinguish commands (.Ic) and command modifiers (.Cm).
* Consistently use .Nm for the page name, do not oscillate to .Pa.
deraadt [Fri, 5 Aug 2016 16:46:50 +0000 (16:46 +0000)]
sync
schwarze [Fri, 5 Aug 2016 16:16:06 +0000 (16:16 +0000)]
Obvious minor fixes:
* Add missing .Dv, .Ev, and .Fa macros.
* Delete deprecated .Tn macros.
* Mark up global variable names with .Va, not with .Fa or .Li.
* Mark up config file commands with .Ic, not with .Fa.
* Fix HISTORY, trivial to verify from the CSRG archive CD.
tedu [Fri, 5 Aug 2016 15:42:05 +0000 (15:42 +0000)]
use a larger chunk for getentropy() and save some for next time.
coalesces some syscalls instead of one per random number.
ok deraadt