mlarkin [Thu, 6 Jul 2017 11:27:56 +0000 (11:27 +0000)]
Remove bogus arguments from a printf in the bootloader.
ok tom@
bluhm [Thu, 6 Jul 2017 11:17:58 +0000 (11:17 +0000)]
Compile libexpat with -fvisibility=hidden. This restricts the
exported symbols to the indended API. We do not need a Symbols.map
anymore. Major library bump is necessary as some internal functions
vanish from the ABI.
Discussed upstream with Sebastian Pipping; ports bulk build ajacoutot@;
OK deraadt@
jsg [Thu, 6 Jul 2017 10:09:26 +0000 (10:09 +0000)]
sync the list of pci devices which don't require aperture
ok kettenis@
anton [Thu, 6 Jul 2017 06:33:42 +0000 (06:33 +0000)]
Add tests for all features of file completion in csh.
deraadt [Thu, 6 Jul 2017 06:21:56 +0000 (06:21 +0000)]
Disassociate PA load address of the kernel from VA, such that PA isn't
a mask of VA, but can be an offset (once other code is ready...). Also,
simplify and remove useless symbols.
ok mlarkin
mlarkin [Thu, 6 Jul 2017 06:19:15 +0000 (06:19 +0000)]
vmd: increase the max number of disks from 2 to 4. Requires kernel rebuild
as a struct passed to vmm has changed size.
ok deraadt, pd
deraadt [Thu, 6 Jul 2017 06:17:04 +0000 (06:17 +0000)]
0xcc-fill a few more alignments. Not because these ones matter particularily,
but because elimination highlights more important ones.
Cursory review mortimer, ok mlarkin
mlarkin [Thu, 6 Jul 2017 04:32:30 +0000 (04:32 +0000)]
remove an unneeded .align and .code32
ok deraadt
schwarze [Thu, 6 Jul 2017 00:18:33 +0000 (00:18 +0000)]
fix date
schwarze [Thu, 6 Jul 2017 00:08:52 +0000 (00:08 +0000)]
Fix operator precedence according to Brian W. Kernighan and Lorinda
L. Cherry, "Typesetting Mathematics - User's Guide (Second Edition)",
August 15, 1978, paragraph 23; swarm of bugs pointed out by bentley@.
kettenis [Wed, 5 Jul 2017 20:30:13 +0000 (20:30 +0000)]
Fix native/raw backlight support in inteldrm(4).
florian [Wed, 5 Jul 2017 20:18:11 +0000 (20:18 +0000)]
Validate prefix information in router advertisements according to RFC
4862 Section 5.5.3.
This very likely solves the problem of slaacd generating privacy
addresses at a very high rate as reported by Matthias Schmidt on
bugs@; thanks!
The problem is that we constantly generate new privacy addresses if we
receive a router advertisement with a pltime of 0 since that address
will immediately be deprecated.
This needs revisiting since we will run into the same problem with
other low pltimes.
anton [Wed, 5 Jul 2017 19:40:58 +0000 (19:40 +0000)]
Favor a UID-agnostic prompt in ksh edit mode tests. Allows the tests to pass
when executed as root.
Spotted by bluhm@
anton [Wed, 5 Jul 2017 19:27:26 +0000 (19:27 +0000)]
Revert previously added tests for file completion that are currently failing.
Prodded by bluhm@
schwarze [Wed, 5 Jul 2017 18:56:33 +0000 (18:56 +0000)]
avoid double space caused by end-of-sentence detection; requested by jmc@
krw [Wed, 5 Jul 2017 16:17:41 +0000 (16:17 +0000)]
Remove knowledge of struct interface_info from clparse.c. Just
pass the interface name and the TAILQ to put static leases into.
Add a TAILQ for static leases to struct client_config to hold the
static leases until it's time to add them to ifi.
Add add_lease() to add leases to a TAILQ while checking for
leases that are superseded by the new lease.
jsing [Wed, 5 Jul 2017 15:38:35 +0000 (15:38 +0000)]
RFC 6066 states that IP literals are not permitted in "HostName" for a
TLS Server Name extension, however seemingly several clients (including
Python, Ruby and Safari) violate the RFC. Given that this is a fairly
widespread issue, if we receive a TLS Server Name extension that contains
an IP literal, pretend that we did not receive the extension rather than
causing a handshake failure.
Issue raised by jsg@
ok jsg@
bluhm [Wed, 5 Jul 2017 15:31:45 +0000 (15:31 +0000)]
Implement the generated dependency with a stamp file to avoid needless
recompiling of the test programs. Add some RCS ids.
espie [Wed, 5 Jul 2017 15:15:48 +0000 (15:15 +0000)]
forgot to commit this one
schwarze [Wed, 5 Jul 2017 15:03:20 +0000 (15:03 +0000)]
The EQN_LISTONE box type is pointless.
Simplify by just using EQN_LIST with expectargs = 1.
Noticed while investigating a bug report from bentley@.
No functional change.
visa [Wed, 5 Jul 2017 14:58:59 +0000 (14:58 +0000)]
Enable NFSCLIENT to let installation over NFS work.
OK kettenis@, deraadt@
visa [Wed, 5 Jul 2017 14:47:58 +0000 (14:47 +0000)]
Fix RAMDISK build.
OK bluhm@
espie [Wed, 5 Jul 2017 13:31:40 +0000 (13:31 +0000)]
make use of (f)lex -o option to create unique temporary files, so that
make -j will be happier.
okay millert@
espie [Wed, 5 Jul 2017 13:30:01 +0000 (13:30 +0000)]
based on florian@'s observation and guenther@'s work in kernel makefiles.
don't include .d files during obj and cleanup, because those files might
be utterly bogus following an untimely reboot.
This allows cleaning stuff up without needing to manually remove those
files.
okay millert@, kettenis@
kettenis [Wed, 5 Jul 2017 12:43:32 +0000 (12:43 +0000)]
regen
kettenis [Wed, 5 Jul 2017 12:43:10 +0000 (12:43 +0000)]
Add Intel Braswell Sensor Hub device.
schwarze [Wed, 5 Jul 2017 12:23:46 +0000 (12:23 +0000)]
nits about trailing punctuation found with mandoc -Tlint
tb [Wed, 5 Jul 2017 11:44:35 +0000 (11:44 +0000)]
void functions don't return 0
From Klemens Nanni
schwarze [Wed, 5 Jul 2017 11:43:09 +0000 (11:43 +0000)]
fix cross references to self; found with mandoc -Tlint
bluhm [Wed, 5 Jul 2017 11:40:17 +0000 (11:40 +0000)]
Convert pf tagname malloc(9) into pool_get(9) to make it MP safe.
While there use TAILQ_FOREACH macro for traversing tags.
OK mpi@
bluhm [Wed, 5 Jul 2017 11:34:10 +0000 (11:34 +0000)]
The IP in IP input function strips the outer header and reinserts
the inner IP packet into the internet queue. The IPv6 local delivery
code has a loop to deal with header chains. The idea is to use
this loop and avoid the queueing and rescheduling. The IPsec packet
will be processed in a single flow.
Merge the IP deliver loop from both IP versions into a single
ip_deliver() function that can handle both addresss families. This
allows to process an IP in IP header like a normal extension header.
If af != AF_UNSPEC, we are already in a deliver loop and have the
kernel look. Then we can just return the next protocol. Otherwise
we enqueue. The dequeue thread has the kernel lock and starts an
IP delivery loop.
OK mpi@
reyk [Wed, 5 Jul 2017 11:11:56 +0000 (11:11 +0000)]
Don't stop logging to stderr when running in foreground with -d.
Pointed out by Kapetanakis Giannis
mpi [Wed, 5 Jul 2017 10:48:41 +0000 (10:48 +0000)]
Comments are lying.
espie [Wed, 5 Jul 2017 10:41:01 +0000 (10:41 +0000)]
document that we're no longer using 'make depend'
espie [Wed, 5 Jul 2017 10:22:32 +0000 (10:22 +0000)]
bye bye depends
okay tb@ deraadt@
florian [Wed, 5 Jul 2017 09:51:37 +0000 (09:51 +0000)]
If we are sending a neighbor solicitation for a link local address
send it with a link local source address as well.
This helps upstream routers with their own source address
selection.
A reoccurring scenario is:
- gateway on fe80::1%if
- the gateway does not have an IP in the same prefix as our global address
When we want to talk to the outside world we first need to resolve the
gateway. We copy the source address from our outgoing packet to the
neighbor solicitation packet (a global address) and ask for layer2
information of a link local address.
The upstream router now needs to do source address selection of it's
own. Since we are coming from a global address and there is no address
from the same prefix the router uses another global address lying
around.
We then drop this with "ND packet from non-neighbor".
Reported over the years by a few people, most recently by Marc Peters
on bugs@ who confirmed that this fixes the problem.
OK stsp@, mpi@
mpi [Wed, 5 Jul 2017 09:40:16 +0000 (09:40 +0000)]
Some documentation improvements:
- Fix TLS s/server/client/
- Use 'remote loghost' consistently, even if it's not clear to which
endpoint this correspond.
- Replace 'forwarding' by 'sending' to remove the ambiguity about the
inserted hostname.
- Do not use the word 'server' with 'socket' to avoid confusion with
a TLS server.
- Prefer 'senders' than 'clients' when it comes to spoofing, to reduce
one usage of the word 'client.
ok jmc@, bluhm@
florian [Wed, 5 Jul 2017 07:15:40 +0000 (07:15 +0000)]
remove useless (void)printf casts, diff from Klemens Nanni, massaged
by me.
anton [Wed, 5 Jul 2017 06:31:59 +0000 (06:31 +0000)]
Add tests for file completion in ksh emacs mode, currently failing.
While here, pass the v option to hexdump in order to output all data.
bluhm [Tue, 4 Jul 2017 23:54:52 +0000 (23:54 +0000)]
Switch to build user if run as root. Prompt output $ or # affects test.
schwarze [Tue, 4 Jul 2017 23:38:49 +0000 (23:38 +0000)]
cross reference to self; found with mandoc(1)
mestre [Tue, 4 Jul 2017 23:13:09 +0000 (23:13 +0000)]
Revert back previous, pledge cannot be enabled on the privsep'd proc yet, at
least not as is
Reported by tim@, OK deraadt@ to backout the pledge for now
bluhm [Tue, 4 Jul 2017 23:12:01 +0000 (23:12 +0000)]
Fix file regress from stdin if obj directory exists.
schwarze [Tue, 4 Jul 2017 23:11:26 +0000 (23:11 +0000)]
Fix the only remaining mandoc(1) ERROR in the base system.
(Can't resist the temptation to commit 'cause it allows
such a cute commit message.)
schwarze [Tue, 4 Jul 2017 23:07:40 +0000 (23:07 +0000)]
proper escaping to prevent information loss; found with mandoc -Tlint
schwarze [Tue, 4 Jul 2017 22:49:59 +0000 (22:49 +0000)]
Fix handling of \} on roff request lines.
Cures bogus error messages in pages generated with pod2man(1).
kettenis [Tue, 4 Jul 2017 22:27:23 +0000 (22:27 +0000)]
Ignore entries with specific PCI subvendor/subdevice such that we don't
inadvertedly match the Intel HD Graphics P4000 as a "Quanta transcode"
device.
Thanks to Joe Gidi for figuring out that I inadvertedly brought this back.
Hopefully fixing it this way prevents it from happening again.
nicm [Tue, 4 Jul 2017 22:21:31 +0000 (22:21 +0000)]
< and > keys to scroll preview list left and right in tree mode.
bluhm [Tue, 4 Jul 2017 21:56:05 +0000 (21:56 +0000)]
Fix building the libedit regress programs.
benno [Tue, 4 Jul 2017 21:13:03 +0000 (21:13 +0000)]
delete tokens that have never been used.
From Rob Pierce
ok yacc and gcc
benno [Tue, 4 Jul 2017 21:09:52 +0000 (21:09 +0000)]
rename fetch_state() to fetch_ifstate(). The word "state" is a bit
overloaded in this daemon.
From Rob Pierce
benno [Tue, 4 Jul 2017 21:04:14 +0000 (21:04 +0000)]
Fix some variable alignment whitespace.
From Rob Pierce
schwarze [Tue, 4 Jul 2017 20:59:17 +0000 (20:59 +0000)]
It turns out association of tbl spans with layout rows is simpler than
i thought. Fixing a bug in curs_addch(3) and minus 25 lines of code.
benno [Tue, 4 Jul 2017 20:27:09 +0000 (20:27 +0000)]
if configured, set the ttl (IPV6_UNICAST_HOPS) for ipv6 tcp checks.
From Kapetanakis Giannis, thanks.
ok florian@
ajacoutot [Tue, 4 Jul 2017 20:25:53 +0000 (20:25 +0000)]
Detect upfront whether we have a particular set installed and if not, do *not*
list a matching syspatch as available. This will allow to skip the syspatches
for the X sets for example if we don't have them installed. If we do install
these sets a posteriori, then syspatch *will* list the X syspatches if there are
any.
req. by many
ok robert@
benno [Tue, 4 Jul 2017 19:59:51 +0000 (19:59 +0000)]
make relayd not crash in relay_udp_server() when using a dns relay.
needs revisiting. From Rivo Nurges, thanks.
ok florian@
rpe [Tue, 4 Jul 2017 19:02:11 +0000 (19:02 +0000)]
Switch reorder_kernel() from sending emails to logging via syslog
and to write the logfile inside the kernel compile dir.
- turn the whole reorder_kernel function into a subshell {} -> ()
- create kernel compile dir early on
- redirect all stdout/stderr to a logfile inside this dir
- setup ERR trap handler that
- disables the EXIT trap handler
- syslogs the error and hints to the logfile
- additionally sends this message to the console
- setup EXIT trap handler that syslogs success
- wipe only the content instead of the whole kernel compile dir
- reestablish stdout redirection to the log after the wipe
- remove -q option of sha256 to log check result
- run reorder_kernel() in the background
OK deraadt@ tb@
bluhm [Tue, 4 Jul 2017 18:02:21 +0000 (18:02 +0000)]
Do not add isakmpd obj directory to .PATH. We must compile some
fake objects from regress ourselves.
tedu [Tue, 4 Jul 2017 17:29:51 +0000 (17:29 +0000)]
some of this code was written in an era when spaces cost extra.
add a little breathing room.
florian [Tue, 4 Jul 2017 15:55:22 +0000 (15:55 +0000)]
calculate multiples of 4 smarter; from Klemens Nanni
bluhm [Tue, 4 Jul 2017 15:52:26 +0000 (15:52 +0000)]
It does not make sense to use ioctl(FIONREAD) with TLS as libtls
has already read the buffer from kernel to user land. I have blindly
copied this code from libevent for syslogd(8) TLS, remove it together
with the bug. It caused hangs in ldapd(8).
report, analysis, testing, OK Seiya Kawashima, Robert Klein, gsoares@
florian [Tue, 4 Jul 2017 15:43:38 +0000 (15:43 +0000)]
replace perror(3) with err(3); from Klemens Nanni
schwarze [Tue, 4 Jul 2017 15:33:03 +0000 (15:33 +0000)]
1. mild deprecation notice
2. point to getline (suggested by nicm@)
3. cross reference fgetc(3) rather than putc(3)
4. add missing error handling to the example code
OK nicm@
espie [Tue, 4 Jul 2017 14:54:15 +0000 (14:54 +0000)]
zap .o, put both .c at deraadt@'s request
schwarze [Tue, 4 Jul 2017 14:53:23 +0000 (14:53 +0000)]
Messages of the -Wbase level now print STYLE:. Since this
causes horrible churn anyway, profit of the opportunity to stop
excessive testing, such that this is hopefully the last instance
of such churn. Consistently use OpenBSD RCS tags, blank .Os,
blank fourth .TH argument, and Mdocdate like everywhere else.
Use -Ios=OpenBSD for platform-independent predictable output.
schwarze [Tue, 4 Jul 2017 14:40:30 +0000 (14:40 +0000)]
Printing "BASE:" in messages about violations of base system conventions
is confusing, simply print "STYLE:", which is intuitive and does not
sound excessively alarming; suggested by jmc@, OK tedu@ jmc@.
visa [Tue, 4 Jul 2017 14:33:43 +0000 (14:33 +0000)]
Enable the use of futex(2) in librthread on mips64.
OK mpi@, deraadt@
mpi [Tue, 4 Jul 2017 14:10:15 +0000 (14:10 +0000)]
Revert previous, it exposed two edge cases still requiring the
KERNEL_LOCK().
- radix_node_head are still allocated with malloc(9) and pf_table can
free(9) some.
- pfsync(4) might send some traffic which can exercise IPsec code
Found by bluhm@ and Hrvoje Popovski
espie [Tue, 4 Jul 2017 13:10:13 +0000 (13:10 +0000)]
Should have committed this two days ago, last part that ran during depend
can run normally
mpi [Tue, 4 Jul 2017 12:58:32 +0000 (12:58 +0000)]
Always hold the socket lock when calling sblock().
Implicitely protects `so_state' with the socket lock in sosend().
ok visa@, bluhm@
mpi [Tue, 4 Jul 2017 12:52:48 +0000 (12:52 +0000)]
Assert that the socket lock is held when `so_state' is modified.
ok bluhm@, visa@
mpi [Tue, 4 Jul 2017 12:51:18 +0000 (12:51 +0000)]
Assert that the socket lock is held when `so_qlen' is modified.
ok bluhm@, visa@
florian [Tue, 4 Jul 2017 12:48:36 +0000 (12:48 +0000)]
consistently use the evtimer wrappers around the connection timeout.
this is instead of setting the timeout up with event_set and
event_add, but removing it with evtimer_del. this uses evtimer_set
and evtimer_add.
prompted by dlg's commit to identd
OK dlg
florian [Tue, 4 Jul 2017 12:47:51 +0000 (12:47 +0000)]
Include stdarg.h explicitly instead of relying on event.h to bring it in.
prompted by dlg's commit to identd
OK dlg
espie [Tue, 4 Jul 2017 12:43:07 +0000 (12:43 +0000)]
complete "nodepend" in source
- mix-up between .ALLSRC and .IMPSRC, compile the right gc.c file
- add explicit targets for pre-generated stuff
nicm [Tue, 4 Jul 2017 12:26:14 +0000 (12:26 +0000)]
Handle 0 size of preview box in caller.
anton [Tue, 4 Jul 2017 11:46:15 +0000 (11:46 +0000)]
Backout previous due to a bug discovered by zhuk@ that requires some tinkering
and is not an easy fix for now.
job [Tue, 4 Jul 2017 09:33:36 +0000 (09:33 +0000)]
Add GRACEFUL_SHUTDOWN example to bgpd.conf
OK phessler@
mpi [Tue, 4 Jul 2017 09:00:12 +0000 (09:00 +0000)]
Export our atomic definitions to userland instead of gcc builtins.
ok kettenis@, dlg@
espie [Tue, 4 Jul 2017 08:39:57 +0000 (08:39 +0000)]
generate the parser directly instead of fucking around
anton [Tue, 4 Jul 2017 07:29:32 +0000 (07:29 +0000)]
Add support for pattern substitution to variables in ksh using a common syntax
borrowed from ksh93.
Survived a ports build performed by naddy@ and encouraged by many.
dlg [Tue, 4 Jul 2017 01:09:42 +0000 (01:09 +0000)]
consistently use the evtimer wrappers around the connection timeout.
this is instead of setting the timeout up with event_set and
event_add, but removing it with evtimer_del. this uses evtimer_set
and evtimer_add.
dlg [Tue, 4 Jul 2017 01:07:32 +0000 (01:07 +0000)]
include stdarg.h explicitly instead of relying on event.h to bring it in.
espie [Tue, 4 Jul 2017 00:59:11 +0000 (00:59 +0000)]
let BUILDFIRST just build first, using the same trick guenther@ did in
kernel Makefiles (thank you!), also add lex and yacc generated files to
that list.
Let those lex/yacc variables be defined for bsd.lib.mk as well.
Complete the SRCS -> OBJS hints with the library dependency
This should fix most dependency problems.
Commit now, so that people can check if something else is still amiss.
krw@ agrees
tedu [Tue, 4 Jul 2017 00:30:45 +0000 (00:30 +0000)]
properly adjust the ttl of replies instead of freezing them in time
dlg [Mon, 3 Jul 2017 23:27:53 +0000 (23:27 +0000)]
blacklist MSI on intel m.2 optane parts. it just doesnt work there.
discovered by jmatthew@
tweaks and ok jsg@ kettenis@
bluhm [Mon, 3 Jul 2017 23:05:21 +0000 (23:05 +0000)]
Do not grab the socket lock in doaccept() twice. Pass NOTE_SUBMIT
to KNOTE() as we are already holding the lock. Fixes "panic:
rw_enter: netlock locking against myself" reported by Gregor Best
and reproduced with src/regress/lib/libtls/gotls.
OK millert@
nicm [Mon, 3 Jul 2017 22:48:02 +0000 (22:48 +0000)]
Change session and window preview so that the current window or pane is
always shown.
espie [Mon, 3 Jul 2017 22:21:47 +0000 (22:21 +0000)]
no need to generate y.tab.h if nothing uses it, set YFLAGS to nothing
instead of CLEANFILES += y.tab.h
okay millert@
krw [Mon, 3 Jul 2017 22:06:11 +0000 (22:06 +0000)]
sizeof(struct sockaddr_in) != sizeof(struct in_addr).
Fix construction of the unicast UDP packets being sent
out via sendmsg(). Accidentally broken in r1.32 (5.6)
when types were juggled.
ok bluhm@
bluhm [Mon, 3 Jul 2017 19:35:06 +0000 (19:35 +0000)]
Add more checks and debug info to identify the sporadic test failures.
claudio [Mon, 3 Jul 2017 19:23:47 +0000 (19:23 +0000)]
Both PF_ROUTE and PF_KEY need to start to take care of their own PCB list
to simplify the locking of those lists. For now move the LIST_ENTRY from
rawcb into routecb and in the pfkey case a new keycb. Do some cleanup and
renaming in the pfkey code but more to come.
OK bluhm@ mpi@
florian [Mon, 3 Jul 2017 19:02:04 +0000 (19:02 +0000)]
s/log_warn/log_warnx/ where errno is not set
benno [Mon, 3 Jul 2017 18:45:34 +0000 (18:45 +0000)]
Remove obvious clear_config() comments and misleading state_change() comments.
Also relocate do_action() calls for the init block from change_state() to
occur with the corresponding do_action() calls for the body block.
From Rob Pierce
ok stsp@ and i
bluhm [Mon, 3 Jul 2017 18:19:55 +0000 (18:19 +0000)]
Generate source and header files for regress on demand.
OK espie@
schwarze [Mon, 3 Jul 2017 17:33:01 +0000 (17:33 +0000)]
report trailing delimiters after macros where they are usually a mistake;
the idea came up in a discussion with Thomas Klausner <wiz at NetBSD>
visa [Mon, 3 Jul 2017 16:37:07 +0000 (16:37 +0000)]
Use copyin32() instead of copyin() in RDHWR emulation.
This reduces emulation time about 5%.
tedu [Mon, 3 Jul 2017 16:36:48 +0000 (16:36 +0000)]
don't bother caching invalid or very short lived responses
bluhm [Mon, 3 Jul 2017 16:24:51 +0000 (16:24 +0000)]
Link all lib regress tests to the build.
espie [Mon, 3 Jul 2017 15:17:11 +0000 (15:17 +0000)]
allows working without depends, as discovered and discussed with drahn@
okay drahn@