openbsd
10 years agoMark some functions as printf-like and fix a bogus format string
guenther [Wed, 8 Jan 2014 04:41:40 +0000 (04:41 +0000)]
Mark some functions as printf-like and fix a bogus format string

ok fgsch@

10 years agorename SHA256_ONLY to SHA2_SMALL; changing things so that sha512 support
deraadt [Wed, 8 Jan 2014 04:35:34 +0000 (04:35 +0000)]
rename SHA256_ONLY to SHA2_SMALL; changing things so that sha512 support
is also pulled in

10 years agoenable building of signify in the ramdisks
deraadt [Wed, 8 Jan 2014 04:33:23 +0000 (04:33 +0000)]
enable building of signify in the ramdisks

10 years agoreduce size by using equivalent code from libc instead of nacl
tedu [Wed, 8 Jan 2014 03:59:46 +0000 (03:59 +0000)]
reduce size by using equivalent code from libc instead of nacl
ok deraadt

10 years agono tomfoolery: mark the comment as untrusted, and enforce it.
tedu [Wed, 8 Jan 2014 03:57:57 +0000 (03:57 +0000)]
no tomfoolery: mark the comment as untrusted, and enforce it.
usability: add random key fingerprints to detect sig/pubkey mismatch
feedback espie naddy

10 years agoPerform manual malloc/free of a large object in pfkeyv2_send() to
deraadt [Wed, 8 Jan 2014 02:39:02 +0000 (02:39 +0000)]
Perform manual malloc/free of a large object in pfkeyv2_send() to
reduce stack space requirements.
ok mikeb mpi

10 years agoMake skipping the root fs DUID aware.
rpe [Tue, 7 Jan 2014 23:58:44 +0000 (23:58 +0000)]
Make skipping the root fs DUID aware.

If ROOTDEV is either the device from fstab or the converted DUID
device name with the partition added, skip the current fstab entry

ok halex@

10 years agoAsa Yeamans points out that we need to CMSG_SPACE[] for the 2nd message
deraadt [Tue, 7 Jan 2014 19:23:13 +0000 (19:23 +0000)]
Asa Yeamans points out that we need to CMSG_SPACE[] for the 2nd message
as well.
ok guenther millert

10 years agoseverely restrict what characters can be in a signer, to make
espie [Tue, 7 Jan 2014 18:35:23 +0000 (18:35 +0000)]
severely restrict what characters can be in a signer, to make
certain it's not possible to go ../  from /etc/signify

10 years agoeven if Ustar handles fifo and stuff gracefully, pkg contents should be more
espie [Tue, 7 Jan 2014 17:33:53 +0000 (17:33 +0000)]
even if Ustar handles fifo and stuff gracefully, pkg contents should be more
limited...

10 years agoPropagate an rdomain number to the nd6_lookup independently from
mikeb [Tue, 7 Jan 2014 17:07:45 +0000 (17:07 +0000)]
Propagate an rdomain number to the nd6_lookup independently from
the ifp pointer which can be NULL.  This prevents a crash reported
by David Hill <dhill at mindcry ! org>.  OK bluhm

10 years agoSome follow-up fixes for IFID collision handling in IPv6CP.
stsp [Tue, 7 Jan 2014 16:34:05 +0000 (16:34 +0000)]
Some follow-up fixes for IFID collision handling in IPv6CP.

Really change the link-local address in the unlikely event of an IFID
collision, instead of going into an infinite conf-nak loop with the peer.

To make the netinet6 code use the IPv6CP IFID in a new link-local address,
in6_ifattach_linklocal() must accept a provided IFID.  Replace the unused
'altifp' parameter with a new 'ifid' parameter for this purpose.

Always use the latest suggested address in IPv6CP replies, even if
the task to update the interface's address hasn't run yet.
Also, clear the ifindex (KAME hack) in addresses sent during IPv6CP.

ok mpi

10 years agouse IF_NAMESIZE as size of buffer for interface name
gsoares [Tue, 7 Jan 2014 14:58:40 +0000 (14:58 +0000)]
use IF_NAMESIZE as size of buffer for interface name

OK mpi@ deraadt@

10 years agoctype cleanups; ok okan
deraadt [Tue, 7 Jan 2014 14:08:16 +0000 (14:08 +0000)]
ctype cleanups; ok okan

10 years agosync
deraadt [Tue, 7 Jan 2014 14:06:16 +0000 (14:06 +0000)]
sync

10 years agosome more devices; Alexey E. Suslikov
deraadt [Tue, 7 Jan 2014 14:06:10 +0000 (14:06 +0000)]
some more devices; Alexey E. Suslikov

10 years agosync
deraadt [Tue, 7 Jan 2014 14:00:54 +0000 (14:00 +0000)]
sync

10 years agoFTX support; from Chris Hettrick
deraadt [Tue, 7 Jan 2014 14:00:50 +0000 (14:00 +0000)]
FTX support; from Chris Hettrick

10 years agoscrape support for old +COMMENT file.
espie [Tue, 7 Jan 2014 13:52:43 +0000 (13:52 +0000)]
scrape support for old +COMMENT file.
8 years of backward compatibility is long enough... :)

10 years agorecognize special file +META
espie [Tue, 7 Jan 2014 13:37:23 +0000 (13:37 +0000)]
recognize special file +META

10 years agotedu some very old checks: we no longer have INSTALL/UNINSTALL scripts,
espie [Tue, 7 Jan 2014 13:31:35 +0000 (13:31 +0000)]
tedu some very old checks: we no longer have INSTALL/UNINSTALL scripts,
so we don't care whether /var/db/pkg is mounted noexec.

10 years agolet's verify all checksums.
espie [Tue, 7 Jan 2014 13:26:17 +0000 (13:26 +0000)]
let's verify all checksums.
I forgot about special files, since they've been extracted early,
but they can be checked nonetheless.

(prevents people from tampering with DESC and the like)

10 years agointegrate signer logic and fix resign with -DSIGNER
espie [Tue, 7 Jan 2014 11:51:15 +0000 (11:51 +0000)]
integrate signer logic and fix resign with -DSIGNER

10 years agodocument new stuff
espie [Tue, 7 Jan 2014 10:44:07 +0000 (10:44 +0000)]
document new stuff

10 years agoif HISTORY_DIR is defined, create a new "permanent" file during build.
espie [Tue, 7 Jan 2014 10:38:12 +0000 (10:38 +0000)]
if HISTORY_DIR is defined, create a new "permanent" file during build.
this file records the sha256 of all elements in the archive, and keeps
track of changes (quite simply: sha256 that were already present end
up at the end of the file).

Start recording these *now*, so that we have enough info to shuffle
packages later.

10 years agosimplify set_modes, there's no need to stat(2) stuff, chown -1 takes care
espie [Tue, 7 Jan 2014 10:22:05 +0000 (10:22 +0000)]
simplify set_modes, there's no need to stat(2) stuff, chown -1 takes care
of things.

10 years agoRemove unused fields.
mpi [Tue, 7 Jan 2014 09:54:18 +0000 (09:54 +0000)]
Remove unused fields.

ok sasano@

10 years agoCache the result of uname(3) such that we don't need to call it
schwarze [Tue, 7 Jan 2014 09:10:58 +0000 (09:10 +0000)]
Cache the result of uname(3) such that we don't need to call it
over and over again for each manual; found with gprof(1).
Speeds up mandocdb(8) -Q by 3%, now at 39.5% of makewhatis(8).

10 years agoIncrease the size of the bge_flags field to allow for more flags.
brad [Tue, 7 Jan 2014 06:25:33 +0000 (06:25 +0000)]
Increase the size of the bge_flags field to allow for more flags.

ok mikeb@

10 years agoDelay checking the vnode locking of the target vnodes in tmpfs_rename()
guenther [Tue, 7 Jan 2014 04:44:56 +0000 (04:44 +0000)]
Delay checking the vnode locking of the target vnodes in tmpfs_rename()
until we've confirmed they're on the same filesystem as the source:
not all filesystems do locking the same.

problem report and testing chrisz@
ok espie@

10 years agoSRCDRS usr.bin usr.sbin is a bad idea (because of PIE). The places we
deraadt [Tue, 7 Jan 2014 02:27:53 +0000 (02:27 +0000)]
SRCDRS usr.bin usr.sbin is a bad idea (because of PIE).  The places we
pick binaries up must be compiled -static or at least in some safe
model for reuse.  Since we now use distrib/special for those, we can
safely remove usr.bin and usr.sbin from this list.

10 years agomore stuff than cannot end in .libs nor partial- packages
espie [Tue, 7 Jan 2014 01:38:58 +0000 (01:38 +0000)]
more stuff than cannot end in .libs nor partial- packages

10 years ago... and let sign_list(\@ARGV... work too)
espie [Tue, 7 Jan 2014 01:35:56 +0000 (01:35 +0000)]
... and let sign_list(\@ARGV... work too)

10 years agoallow processing of package lists in parallel.
espie [Tue, 7 Jan 2014 01:30:28 +0000 (01:30 +0000)]
allow processing of package lists in parallel.
Turns out re-gzipping a signed package is really expensive, so turn
it into several jobs with a -j option.

10 years agonew method: reinitialize, for repositories with a sequential connection
espie [Tue, 7 Jan 2014 01:29:17 +0000 (01:29 +0000)]
new method: reinitialize, for repositories with a sequential connection
that need a new connection if they're ever called from separate processes
simultaneously

10 years agoa few mechanical style changes
espie [Tue, 7 Jan 2014 00:48:24 +0000 (00:48 +0000)]
a few mechanical style changes

10 years agothe return from asprintf does NOT include the space used by the
dlg [Tue, 7 Jan 2014 00:11:11 +0000 (00:11 +0000)]
the return from asprintf does NOT include the space used by the
terminating \0 character. if i want to use it as a c string i have
to take that into account.

found by simon kuhnle who supplied a good bug report. prodded by deraadt@

10 years agoGprof(1) is fun. You should use it more often.
schwarze [Mon, 6 Jan 2014 23:46:01 +0000 (23:46 +0000)]
Gprof(1) is fun.  You should use it more often.

Another 10% speedup for mandocdb(8) -Q, and even 3% without -Q.
With -Q, we are now at 41% of the time required by makewhatis(8).

Do not copy predefined strings into the dynamic string table, just
leave them in their own static table and use that one as a fallback
at lookup time.  This saves us copying and deleting them for each manual.
No functional change.

10 years agoAnother 18% speedup for mandocdb(8) -Q, found by gprof(1).
schwarze [Mon, 6 Jan 2014 22:39:19 +0000 (22:39 +0000)]
Another 18% speedup for mandocdb(8) -Q, found by gprof(1).
In -Q mode, refrain form validating and normalizing the format
of the date given in .Dd or .TH, as it won't be used anyway.

For /usr/share/man, mandocdb -Q now takes 45% of the time of makewhatis(8).

10 years agodocument random buffer must be multiple of 4 in size
deraadt [Mon, 6 Jan 2014 22:34:22 +0000 (22:34 +0000)]
document random buffer must be multiple of 4 in size

10 years agoIn the new PIE world, all dynamic binaries (for instance those found
deraadt [Mon, 6 Jan 2014 22:28:45 +0000 (22:28 +0000)]
In the new PIE world, all dynamic binaries (for instance those found
in usr.bin and usr.sbin on the install media) must be re-compiled non-PIE
(here, in the special directory) so that crunchgen can reuse them.  This
issue is most acute on i386, which has register pressure, and does weird
things for PIE.
thanks for matthew for helping figure this out.

10 years agowe do not need apm or apmd on the install media, that is silly
deraadt [Mon, 6 Jan 2014 22:22:31 +0000 (22:22 +0000)]
we do not need apm or apmd on the install media, that is silly

10 years agoDisable the code disabling memory beyond 1.5GB on Octane temporarily, but
miod [Mon, 6 Jan 2014 21:41:15 +0000 (21:41 +0000)]
Disable the code disabling memory beyond 1.5GB on Octane temporarily, but
hopefully for good; I believe the kernel panics with large memory fast MP
systems have been fixed in mutex.c 1.13

10 years agoUse the dedicated BCD macros from sys/time.h instead of handrolling
pirofti [Mon, 6 Jan 2014 21:38:46 +0000 (21:38 +0000)]
Use the dedicated BCD macros from sys/time.h instead of handrolling
our own for the m41t8x clocks.

Tested by me and jasper@.
Okay jasper@, guenther@, deraadt@

10 years agoAnother 25% speedup for mandocdb(8) -Q mode, found with gprof(1).
schwarze [Mon, 6 Jan 2014 21:33:00 +0000 (21:33 +0000)]
Another 25% speedup for mandocdb(8) -Q mode, found with gprof(1).
For /usr/share/man, we only need 56% of the time of makewhatis(8) now.

In groff, user-defined macros clashing with mdoc(7) or man(7)
standard macros are cleared when parsing the .Dd or .TH macro,
respectively.  Of course, we continue doing that in standard mode
to assure full groff bug compatibility.

However, in -Q mode, full groff bug compatibility makes no sense
when it's unreasonably expensive, so skip this step in -Q mode.
Real-world manuals hardly ever redefine standard macros,
that's terrible style, and if they do, it's pointless to do so
before .Dd or .TH because it has no effect.  Even if someone does,
it's extremely unlikely to break mandocdb(8) -Q parsing because we
abort the parse sequence after the NAME section, anyway.

So if you manually redefine .Sh, .Nm, .Nd, or .SH in a way that doesn't
work at all and rely on .Dd or .TH to fix it up for you, your broken
manual will no longer get a perfect apropos(1) entry until you re-run
mandocdb(8) without -Q.  It think that consequence is acceptable
in order to get a 25% speedup for everyone else.

10 years agotypo
miod [Mon, 6 Jan 2014 21:28:53 +0000 (21:28 +0000)]
typo

10 years agoFix sparc64 kernel profiling, add the etext symbol back.
tobiasu [Mon, 6 Jan 2014 21:16:31 +0000 (21:16 +0000)]
Fix sparc64 kernel profiling, add the etext symbol back.

ok miod@

10 years agoRemove mention of installXX not bootable on IP27/35.
miod [Mon, 6 Jan 2014 21:05:32 +0000 (21:05 +0000)]
Remove mention of installXX not bootable on IP27/35.

10 years agoRework the setup of the bootable installation cd-rom (installXX.iso) to
miod [Mon, 6 Jan 2014 21:03:13 +0000 (21:03 +0000)]
Rework the setup of the bootable installation cd-rom (installXX.iso) to
contain both a 2048-byte sector ffs filesystem, and a 512-byte volume header,
so that the IP27 boot magic^Wuglyness recently added to the boot-only cd-rom
(cdXX.iso) can be applied as well.

The full-blown installation iso can now boot on IP27/28/30/32/35.

10 years agoIn readsgilabel(), do not override the driver-provided initial geometry with
miod [Mon, 6 Jan 2014 21:00:55 +0000 (21:00 +0000)]
In readsgilabel(), do not override the driver-provided initial geometry with
the volume header geometry, if one is found. The driver knows better.

This will allow a 2048-byte sector media to use a volume header using fake
512-byte sectors, and still be able to read the native label off it.

10 years agoDo not sync to disk after each individual manual page (duh!),
schwarze [Mon, 6 Jan 2014 20:53:36 +0000 (20:53 +0000)]
Do not sync to disk after each individual manual page (duh!),
only sync to disk one single time when all data is ready.

Rebuild times for /usr/share/man/mandoc.db shrink on my notebook:
In standard mode from 45 seconds to 11 seconds   (75% reduction)
In -Q mode       from 25 seconds to 3.1 seconds  (87% reduction)
For comparison: makewhatis(8):      4.2 seconds

That is, in -Q mode, we are now *faster* than the existing makewhatis(8),
and careful profiling shows there is still a lot of room for improval.

10 years agosync
miod [Mon, 6 Jan 2014 20:37:18 +0000 (20:37 +0000)]
sync

10 years agosync
miod [Mon, 6 Jan 2014 20:31:12 +0000 (20:31 +0000)]
sync

10 years agoPut PG_EXEC and PG_FOE into the PG_PROT mask, and make sure the default
miod [Mon, 6 Jan 2014 20:27:44 +0000 (20:27 +0000)]
Put PG_EXEC and PG_FOE into the PG_PROT mask, and make sure the default
pte protection masks, as initialized in alpha_protection_init(), set PG_FOE
by default when VM_PROT_EXECUTE is not set.

Also, change pmap_emulate_reference() to only clear PG_FOE if the affected
pte has executable permission.

This allows various pmap_pte_exec() checks (added to explicitely set PG_FOE)
to be removed.

All tests of regress/sys/kern/noexec now reliably pass on EV5. EV6 systems
still see spurious (but no longer 100% reproduceable) failures of the `catch
a signal' tests, which is likely caused by the effect of mprotect() removing
execute permission not taking effect correctly, despite PAL IMB being issued
(and no, this is not caused by the previous pmap_changebit() change), to be
investigated.

10 years agoRemove I-sync stuff from pmap_changebit(). The AARM says that we
miod [Mon, 6 Jan 2014 20:21:32 +0000 (20:21 +0000)]
Remove I-sync stuff from pmap_changebit().  The AARM says that we
only have to sync the I-stream when the mapping is removed or changed,
and since the I-stream is fetch-only, changing protection bits does
not constitute changing the mapping (the VA->PA translation is still
the same).

From NetBSD

10 years agosync
deraadt [Mon, 6 Jan 2014 20:17:02 +0000 (20:17 +0000)]
sync

10 years agoProgram window #2 to allow the second GB of low memory to use direct DMA;
miod [Mon, 6 Jan 2014 20:11:40 +0000 (20:11 +0000)]
Program window #2 to allow the second GB of low memory to use direct DMA;
adapted from a long gone FreeBSD.

10 years agoMake macppc/socppc boot() code path more similar to others.
uebayasi [Mon, 6 Jan 2014 16:17:33 +0000 (16:17 +0000)]
Make macppc/socppc boot() code path more similar to others.

This changes calling boot() during (cold != 0) to not call if_downall() and
uvm_shutdown().  Both of which must not be specific to PowerPC.

OK mpi@

10 years agoFix mandocdb(8) -d and -u.
schwarze [Mon, 6 Jan 2014 15:32:44 +0000 (15:32 +0000)]
Fix mandocdb(8) -d and -u.
It was broken by recent optimizations.

10 years agoIncrease NPTECL, as cache-lines are 64-bytes nowadays.
sf [Mon, 6 Jan 2014 14:29:25 +0000 (14:29 +0000)]
Increase NPTECL, as cache-lines are 64-bytes nowadays.
Also move it from pmap.h to pmap.c because it is an internal detail.

10 years agoRename dbindex() to dbadd() to be less confusing.
schwarze [Mon, 6 Jan 2014 13:54:11 +0000 (13:54 +0000)]
Rename dbindex() to dbadd() to be less confusing.
The concept of an index file is gone since the switch to SQLite.
No functional change.

10 years agoMake in6_ifdetach() remove the ff01::1 route for the detaching interface, too.
stsp [Mon, 6 Jan 2014 13:01:20 +0000 (13:01 +0000)]
Make in6_ifdetach() remove the ff01::1 route for the detaching interface, too.
The route used to linger after an interface detached from IPv6.
ok mikeb

10 years agofgetln may return incomplete lines (Tobias Stoeckmann <tobias@stoeckmann.org>)
espie [Mon, 6 Jan 2014 12:38:10 +0000 (12:38 +0000)]
fgetln may return incomplete lines (Tobias Stoeckmann <tobias@stoeckmann.org>)

simple solution: error out. This is not a correct cddb answer anyways.

10 years agoadd a proper test for error message location as well.
espie [Mon, 6 Jan 2014 12:34:42 +0000 (12:34 +0000)]
add a proper test for error message location as well.
trim excess copy&paste from former targets

10 years agoturn mk34 into a proper full-fledged test.
espie [Mon, 6 Jan 2014 12:31:56 +0000 (12:31 +0000)]
turn mk34 into a proper full-fledged test.
forgot to link t37 into the build

10 years agoSuff_FindDeps must happen before SuffExpandChildren (expand_all_children)
espie [Mon, 6 Jan 2014 12:21:45 +0000 (12:21 +0000)]
Suff_FindDeps must happen before SuffExpandChildren (expand_all_children)
so that dynamic variables are solved properly

10 years agothis actually requires a comment. I would never have figured it out if
espie [Mon, 6 Jan 2014 12:15:40 +0000 (12:15 +0000)]
this actually requires a comment. I would never have figured it out if
it wasn't for the arm error.

10 years agofix error messages, avoid dereferencing null pointers.
espie [Mon, 6 Jan 2014 12:08:18 +0000 (12:08 +0000)]
fix error messages, avoid dereferencing null pointers.
- the code becomes too indented, pull it into a separate function
- add an extra hint, the current_gnode.
- specifically, variables may be expanded during
target: prereq  solving in Suff_FindDeps, this is after parsing,
not during command execution, and the only actual indication with have is
that we're resolving a prereq of.

(this ought to fix mk35, and partially solve mk34)

10 years agoRecognize the ALC292
brad [Mon, 6 Jan 2014 06:54:15 +0000 (06:54 +0000)]
Recognize the ALC292

10 years agoRemove the redundant "file" column from the "mlinks" table.
schwarze [Mon, 6 Jan 2014 03:52:05 +0000 (03:52 +0000)]
Remove the redundant "file" column from the "mlinks" table.
The contents can easily be reconstructed from sec, arch, name, form.
Shrinks the database by another 3% in standard mode and 9% in -Q mode.

10 years agoDrop Nd from the mpages table, it is still in the keys table.
schwarze [Mon, 6 Jan 2014 03:02:39 +0000 (03:02 +0000)]
Drop Nd from the mpages table, it is still in the keys table.
This shrinks the database in standard mode by 3%, in -Q mode by 9%,
without loss of functionality.

10 years agotedu unused macro.
espie [Mon, 6 Jan 2014 01:50:54 +0000 (01:50 +0000)]
tedu unused macro.
okay tedu@

10 years agoJoerg Sonnenberger contributed copyrightable amounts of text to
schwarze [Mon, 6 Jan 2014 00:53:14 +0000 (00:53 +0000)]
Joerg Sonnenberger contributed copyrightable amounts of text to
some files.  To make it clear that he also put his contributions
under the ISC license, with his explicit permission, add his
Copyright notice to the relevant files.  No code change.

10 years agoMention tmpfs
brad [Mon, 6 Jan 2014 00:52:21 +0000 (00:52 +0000)]
Mention tmpfs

10 years agoregen
brad [Sun, 5 Jan 2014 23:56:35 +0000 (23:56 +0000)]
regen

10 years agoAdd Realtek RTS5227
brad [Sun, 5 Jan 2014 23:55:25 +0000 (23:55 +0000)]
Add Realtek RTS5227

10 years agodon't whine about octal numbers > 2^32. They're not portable, but
espie [Sun, 5 Jan 2014 23:11:24 +0000 (23:11 +0000)]
don't whine about octal numbers > 2^32. They're not portable, but
they work on all OpenBSD platforms.

Shuts up warning noticed by naddy@

10 years agoHIBERNATE_SELTABLE is not used anymore. Remove, and reclaim its stolen
mlarkin [Sun, 5 Jan 2014 23:06:54 +0000 (23:06 +0000)]
HIBERNATE_SELTABLE is not used anymore. Remove, and reclaim its stolen
page.

10 years agoFix one case where a non-literal is used as format string.
schwarze [Sun, 5 Jan 2014 21:21:08 +0000 (21:21 +0000)]
Fix one case where a non-literal is used as format string.
Fix another case where a variable is formatted using the wrong type.
Patch from Joerg Sonnenberger <joerg@NetBSD>.

10 years agoMerge NetBSD rev. 1.4:
schwarze [Sun, 5 Jan 2014 21:02:43 +0000 (21:02 +0000)]
Merge NetBSD rev. 1.4:
Rename static function data() to getdata()
to work around bugs in the NetBSD PPC64 toolchain.
Original author of the patch: Christos Zoulas <christos@NetBSD>.
Received via Joerg Sonnenberger <joerg@NetBSD>.

10 years agomissing newline on error message
deraadt [Sun, 5 Jan 2014 20:53:56 +0000 (20:53 +0000)]
missing newline on error message

10 years agoAdd an option -Q (quick) to mandocdb(8)
schwarze [Sun, 5 Jan 2014 20:26:27 +0000 (20:26 +0000)]
Add an option -Q (quick) to mandocdb(8)
for accelerated generation of reduced-size databases.

Implement this by allowing the parsers to optionally
abort the parse sequence after the NAME section.

While here, garbage collect the unused void *arg attribute
of struct mparse and mparse_alloc().

This reduces the processing time of mandocdb(8) on /usr/share/man
by a factor of 2 and the database size by a factor of 4.
However, it still takes 5 times the time and 6 times the space
of makewhatis(8), so more work is clearly needed.

10 years agoDon't use the first 64KB for anything, including tramps. Move tramps and
mlarkin [Sun, 5 Jan 2014 20:23:56 +0000 (20:23 +0000)]
Don't use the first 64KB for anything, including tramps. Move tramps and
hibernate goo up after 64KB to avoid posible corruption by buggy BIOS SMM
code. Diff also ensures the first 64KB doesn't get handed to UVM either.

ok deraadt@, tested by many with no regressions reported

10 years agoHook installboot into the build.
jsing [Sun, 5 Jan 2014 16:03:48 +0000 (16:03 +0000)]
Hook installboot into the build.

Discussed with deraadt@

10 years agoAdd initial man page for installboot.
jsing [Sun, 5 Jan 2014 16:02:40 +0000 (16:02 +0000)]
Add initial man page for installboot.

10 years agoOn some architectures you can get away with using an uninitialised mutex;
jsing [Sun, 5 Jan 2014 15:03:57 +0000 (15:03 +0000)]
On some architectures you can get away with using an uninitialised mutex;
this is not the case on hppa (practically the only architecture where
unlocked has a non-zero value). This one has been hiding since r1.223...

Found the hard way by juanfra@

10 years agoCleanup some leftovers from previous changes.
miod [Sun, 5 Jan 2014 14:37:08 +0000 (14:37 +0000)]
Cleanup some leftovers from previous changes.

10 years agodocument -DFW_UPDATE/@option firmware
espie [Sun, 5 Jan 2014 10:29:16 +0000 (10:29 +0000)]
document -DFW_UPDATE/@option firmware

10 years agohave -DFW_UPDATE set @option firmware on downloaded firmwares.
espie [Sun, 5 Jan 2014 10:24:30 +0000 (10:24 +0000)]
have -DFW_UPDATE set @option firmware on downloaded firmwares.
- normal pkg_add -u should ignore them
- pkg_delete will ask about deleting them

okay landry@

10 years agocomma previous;
jmc [Sun, 5 Jan 2014 09:30:36 +0000 (09:30 +0000)]
comma previous;

10 years agogarbage collect unused global variable retval,
schwarze [Sun, 5 Jan 2014 05:27:44 +0000 (05:27 +0000)]
garbage collect unused global variable retval,
forgotten in rev. 1.36 when removing timed(8) support;
proofed by sobrado@

10 years agosome conversion specifiers are not required by POSIX;
schwarze [Sun, 5 Jan 2014 05:11:17 +0000 (05:11 +0000)]
some conversion specifiers are not required by POSIX;
joint work and OK jmc@ sobrado@

10 years agodate(1) can only exit(0) or exit(1), not exit(2), so make this .Ex -std;
schwarze [Sun, 5 Jan 2014 05:04:06 +0000 (05:04 +0000)]
date(1) can only exit(0) or exit(1), not exit(2), so make this .Ex -std;
obviouly, this was forgotten in rev. 1.57 when removing timed(8) support.
ok jmc@ sobrado@

10 years agoRip out the complete "reachable" checks, without replacement.
schwarze [Sun, 5 Jan 2014 04:48:35 +0000 (04:48 +0000)]
Rip out the complete "reachable" checks, without replacement.
It's a pity i spent time during t2k13 writing this; however,
when an entire concept is busted, let us not look back.

There is no such thing as an unreachable page.  Even if you are crazy
enough to put a page starting with ".Dt NAMEI 9" into a file man1/cat.1,
we now make sure that it can be found by all of the following:
Nm=namei Nm=cat sec=1 sec=9
It will always be displayed as:
cat(1) - pathname lookup
So you know that you have to type `man cat` to get at it.
That obsoletes the concept of "unreachable manuals" for good.

10 years agoRemove the obsolete file name column from the mpages table.
schwarze [Sun, 5 Jan 2014 04:13:46 +0000 (04:13 +0000)]
Remove the obsolete file name column from the mpages table.
This column wasn't helpful because one manpage can have multiple MLINKS.
Use the file name column in the mlinks table, instead.

10 years agoRemove the obsolete sec and arch columns from the mpages table.
schwarze [Sun, 5 Jan 2014 03:25:51 +0000 (03:25 +0000)]
Remove the obsolete sec and arch columns from the mpages table.
They were confusing because a manpage can have MLINKS in different
sections and architectures.

10 years agoReimplement apropos -s NUM -S ARCH EXPR by internally converting it to
schwarze [Sun, 5 Jan 2014 03:06:36 +0000 (03:06 +0000)]
Reimplement apropos -s NUM -S ARCH EXPR by internally converting it to
apropos \( EXPR \) -a 'sec~^NUM$' -a 'arch~^(ARCH|any)$'
in preparation for removal of sec and arch from the mpage table.

Almost no functional change except for the following bonus:
This also makes sure that for cross-section and cross-arch MLINKs,
all of the following work:
apropos -s 1 encrypt
apropos -s 8 encrypt
apropos -s 1 makekey
apropos -s 8 makekey
Before this commit, they don't, neither for the
old makewhatis(8)/apropos(1) combo nor for the new one.

While here, print error messages about invalid regexps to stderr.

10 years agoLike upgrade, use feed_random right after mounting filesystems. This
deraadt [Sun, 5 Jan 2014 01:56:52 +0000 (01:56 +0000)]
Like upgrade, use feed_random right after mounting filesystems.  This
is less than ideal.  We hope the kernel has good entropy already, because
this is a reinstall??  Or maybe the ftp server startup has run to completion?
Or if this is an autoinstall, that config has enough unique in it?  This
needs more work, but the existing late-entropy feed sequence is worse.
discussed at length with rpe, who tested it

10 years agoWe can feed_random right after mounting the filesystems, hoping we pick
deraadt [Sun, 5 Jan 2014 01:53:35 +0000 (01:53 +0000)]
We can feed_random right after mounting the filesystems, hoping we pick
up the previous kernel's /var/db/host.random
ok rpe

10 years agoprovide feed_random() and store_random(). The first is used by install or
deraadt [Sun, 5 Jan 2014 01:52:17 +0000 (01:52 +0000)]
provide feed_random() and store_random().  The first is used by install or
upgrade to feed as much additional usable entropy (as early as possible)
to the current bsd.rd install kernel.  The latter is used late in the
procedure to store entropy for the next boot (of a real kernel)
based on an issue described by dtucker, must conversation with halex and rpe
tested by rpe