openbsd
7 years agoWe do not support iso7 nor pcvt encoding, so remove macro definitions
fcambus [Thu, 15 Jun 2017 11:48:49 +0000 (11:48 +0000)]
We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@

7 years ago"10th's of a second" -> "tenths of a second"
bentley [Thu, 15 Jun 2017 06:44:47 +0000 (06:44 +0000)]
"10th's of a second" -> "tenths of a second"

ok jmc@

7 years agoreport contention on caches global data to userland.
dlg [Thu, 15 Jun 2017 03:50:50 +0000 (03:50 +0000)]
report contention on caches global data to userland.

7 years agowhite space tweaks. no functional change.
dlg [Thu, 15 Jun 2017 03:48:50 +0000 (03:48 +0000)]
white space tweaks. no functional change.

7 years agoadd a rough start to a pcache view, to show pool cpu cache info.
dlg [Thu, 15 Jun 2017 03:47:07 +0000 (03:47 +0000)]
add a rough start to a pcache view, to show pool cpu cache info.

ok mikeb@ millert@

7 years agoimplement the backend of the sysctls that report pool cache info.
dlg [Thu, 15 Jun 2017 03:44:17 +0000 (03:44 +0000)]
implement the backend of the sysctls that report pool cache info.

KERN_POOL_CACHE reports info about the global cache info, like how long
the lists of cache items the cpus build should be and how many of these
lists are idle on the pool struct.

KERN_POOL_CACHE_CPUS reports counters from each each. the counters
are for how many item and list operations the cache has handled on
a cpu. the sysctl provides an array of ncpusfound * struct
kinfo_pool_cache_cpu, not a single struct kinfo_pool_cache_cpu.

tested by hrvoje popovski
ok mikeb@ millert@
----------------------------------------------------------------------

7 years agoadd some kinfo structs and sysctl mibs for info about per cpu pool caches
dlg [Thu, 15 Jun 2017 02:52:30 +0000 (02:52 +0000)]
add some kinfo structs and sysctl mibs for info about per cpu pool caches

there are two sysctls, one that shows info about the pools global
cache info, and another that dumps info about the caches on all the
cpus in one go.

ok mikeb@ millert@

7 years agoround default width of tbl(7) text blocks in the same way as groff
schwarze [Thu, 15 Jun 2017 00:27:22 +0000 (00:27 +0000)]
round default width of tbl(7) text blocks in the same way as groff

7 years agoimplement so-called absolute horizontal motion: \h'|...',
schwarze [Wed, 14 Jun 2017 23:23:51 +0000 (23:23 +0000)]
implement so-called absolute horizontal motion: \h'|...',
used for example by zoem(1)

7 years agoNaive implementation of the roff(7) .po (page offset) request.
schwarze [Wed, 14 Jun 2017 22:50:37 +0000 (22:50 +0000)]
Naive implementation of the roff(7) .po (page offset) request.

This clearly works when .po is called on the top level, but might
not be sophisticated enough if people call .po inside indentation-changing
contexts, but i haven't seen that in manual pages (yet :).

7 years agoEnable hvs(4), "go for it" from deraadt.
mikeb [Wed, 14 Jun 2017 22:35:43 +0000 (22:35 +0000)]
Enable hvs(4), "go for it" from deraadt.

7 years agoBorrow some of dlg's smarts to make this look like a real SCSI driver
mikeb [Wed, 14 Jun 2017 22:24:11 +0000 (22:24 +0000)]
Borrow some of dlg's smarts to make this look like a real SCSI driver

7 years agoAdd a new function reorder_kernel() that relinks and installs the
rpe [Wed, 14 Jun 2017 21:39:53 +0000 (21:39 +0000)]
Add a new function reorder_kernel() that relinks and installs the
new kernel in the background on system startup. It stores the hash
of the new kernel and sends a notification email to the admin or
root user. If it finds /usr/share/compile.tgz, it removes the
existing compile dir and replaces it with the content of (new)
archive. If the hash of /bsd does not match the stored one, no
relinking happens.

Idea from, joint work with and OK deraadt@
OK tb@ halex@
unnoticed by many

7 years agoadd the \(ru (0.5m baseline ruler) character escape sequence,
schwarze [Wed, 14 Jun 2017 20:56:42 +0000 (20:56 +0000)]
add the \(ru (0.5m baseline ruler) character escape sequence,
abused by mail/nmh; groff_char(7) confirms that this really exists

7 years agoDon't support loading appletalk addresses from /etc/appletalk.names.
akfaew [Wed, 14 Jun 2017 20:48:54 +0000 (20:48 +0000)]
Don't support loading appletalk addresses from /etc/appletalk.names.

OK deraadt@

7 years agoNo need to be coy - call a "struct interface_info *" a
krw [Wed, 14 Jun 2017 20:27:08 +0000 (20:27 +0000)]
No need to be coy - call a "struct interface_info *" a
"struct interface_info *" and not a "void *".

No intentional functional change.

7 years agosimple implementation of the roff(7) .als (macro alias) request,
schwarze [Wed, 14 Jun 2017 19:39:05 +0000 (19:39 +0000)]
simple implementation of the roff(7) .als (macro alias) request,
sufficient for pages using po4a(1)

7 years agosync
deraadt [Wed, 14 Jun 2017 18:30:03 +0000 (18:30 +0000)]
sync

7 years agolet \l use the right fill character
schwarze [Wed, 14 Jun 2017 18:23:26 +0000 (18:23 +0000)]
let \l use the right fill character

7 years agoimprove rounding rules for scaling units
schwarze [Wed, 14 Jun 2017 17:50:43 +0000 (17:50 +0000)]
improve rounding rules for scaling units
in horizontal orientation in the terminal formatter

7 years agoCurrently, iwm(4) uses only one phy context, so stop sending commands to the
stsp [Wed, 14 Jun 2017 16:58:28 +0000 (16:58 +0000)]
Currently, iwm(4) uses only one phy context, so stop sending commands to the
firmware for unused ones. This should be refactored further, but for now this
change is good enough to reduce the amount of commands we throw at the firmware.
ok deraadt@

7 years agoWhen a task in iwm(4) obtains an rwlock(9), bail out if the device was
stsp [Wed, 14 Jun 2017 16:57:47 +0000 (16:57 +0000)]
When a task in iwm(4) obtains an rwlock(9), bail out if the device was
reset while the task was asleep waiting for the lock.
ok deraadt@

7 years agoMake the iwm(4) ioctl handler wait until the transition to SCAN has completed
stsp [Wed, 14 Jun 2017 16:56:50 +0000 (16:56 +0000)]
Make the iwm(4) ioctl handler wait until the transition to SCAN has completed
when bringing the interface up. Otherwise we get racy behaviour when running
ifconfig commands which issue several ioctls in quick succession.
Should fix the occasional "could not initiate scan" errors.
ok deraadt@

7 years agoMake iwm(4) wait for the PHY calibration result notification during HW init.
stsp [Wed, 14 Jun 2017 16:56:04 +0000 (16:56 +0000)]
Make iwm(4) wait for the PHY calibration result notification during HW init.
Code inspection revealed that Linux does this, and so should we.
ok deraadt@

7 years agoMove active, new, offered_leases, leases from
krw [Wed, 14 Jun 2017 16:52:35 +0000 (16:52 +0000)]
Move active, new, offered_leases, leases from
client_state to interface_info.

Nuke empty struct client_state.

No intentional functional change.

7 years agoGrow sgi iso, to account for base containing compile.tgz.
deraadt [Wed, 14 Jun 2017 16:36:09 +0000 (16:36 +0000)]
Grow sgi iso, to account for base containing compile.tgz.
SGI has 8 kernels, so the file is 113MB!

7 years agoRemove main() prototype and unused envp argument.
anton [Wed, 14 Jun 2017 16:32:11 +0000 (16:32 +0000)]
Remove main() prototype and unused envp argument.

ok deraadt@ martijn@

7 years agoMove state, destination, interval, requested_address from
krw [Wed, 14 Jun 2017 16:29:58 +0000 (16:29 +0000)]
Move state, destination, interval, requested_address from
client_state to interface_info.

No intentional functional change.

7 years agoMove xid, secs, first_sending, startup_time fields from
krw [Wed, 14 Jun 2017 16:09:42 +0000 (16:09 +0000)]
Move xid, secs, first_sending, startup_time fields from
client_state to interface_info.

No intentional functional change.

7 years agoStart consolidating client_state into interface_info. First
krw [Wed, 14 Jun 2017 15:57:25 +0000 (15:57 +0000)]
Start consolidating client_state into interface_info. First
fields to move: recv_packet, sent_packet and sent_packet_length.

No intentional functional change.

7 years agoNo need for two 'flags' fields. Consolidate into one, fixing
krw [Wed, 14 Jun 2017 15:39:55 +0000 (15:39 +0000)]
No need for two 'flags' fields. Consolidate into one, fixing
value of IFI_HUP while passing.

7 years agoharmless, but weird typo; found with afterstep_faq(1)
schwarze [Wed, 14 Jun 2017 14:23:50 +0000 (14:23 +0000)]
harmless, but weird typo; found with afterstep_faq(1)

7 years agoimplement the roff(7) d (macro or string defined) conditional
schwarze [Wed, 14 Jun 2017 14:01:34 +0000 (14:01 +0000)]
implement the roff(7) d (macro or string defined) conditional

7 years agoSplit early startup code out of armv7_start.S into locore0.S. Adjust
patrick [Wed, 14 Jun 2017 13:12:49 +0000 (13:12 +0000)]
Split early startup code out of armv7_start.S into locore0.S.  Adjust
link run so that this locore0.o is always at the start of the
executable.  But randomize the link order of all other .o files in the
kernel, so that their exec/rodata/data/bss segments land all over the
place.  Note that this commit does not yet unmap the early bootcode
since this is not as easy as on arm64.

As a result, the internal layout of every newly build bsd kernel is
different from past kernels.  Internal relative offsets are not known
to an outside attacker.  The only known offsets are in the startup code,
which has been unmapped.

Ramdisk kernels cannot be compiled like this, because they are gzip'd.
When the internal pointer references change, the compression dictionary
bloats and results in poorer compression.

With guidance and ok deraadt@

7 years agoimplement roff(7) .rj (right justify) request
schwarze [Wed, 14 Jun 2017 13:00:13 +0000 (13:00 +0000)]
implement roff(7) .rj (right justify) request

7 years agomatch the (hvs) description to the man page; ok mikeb
jmc [Wed, 14 Jun 2017 12:42:09 +0000 (12:42 +0000)]
match the (hvs) description to the man page; ok mikeb

7 years agoSpecial handling for request 0 clashes with CCB 0
mikeb [Wed, 14 Jun 2017 12:28:41 +0000 (12:28 +0000)]
Special handling for request 0 clashes with CCB 0

7 years agoIncrease the maximum amount of requests and do some cleanup
mikeb [Wed, 14 Jun 2017 12:05:37 +0000 (12:05 +0000)]
Increase the maximum amount of requests and do some cleanup

7 years agoMention hvs(4)
mikeb [Wed, 14 Jun 2017 10:36:37 +0000 (10:36 +0000)]
Mention hvs(4)

7 years agoHook up hvs.4
mikeb [Wed, 14 Jun 2017 10:35:36 +0000 (10:35 +0000)]
Hook up hvs.4

7 years agohvs(4) man page
mikeb [Wed, 14 Jun 2017 10:34:41 +0000 (10:34 +0000)]
hvs(4) man page

7 years agoHookup hvs(4)
mikeb [Wed, 14 Jun 2017 10:25:40 +0000 (10:25 +0000)]
Hookup hvs(4)

7 years agoHyper-V storage driver
mikeb [Wed, 14 Jun 2017 10:24:51 +0000 (10:24 +0000)]
Hyper-V storage driver

Based on the FreeBSD driver, attaches only to emulated SCSI controllers.

7 years agoAdd another type of a scatter-gather list operation used by StorVSC
mikeb [Wed, 14 Jun 2017 09:47:37 +0000 (09:47 +0000)]
Add another type of a scatter-gather list operation used by StorVSC

Obtained from FreeBSD.

7 years agoDon't overwrite error message when it is available in
nicm [Wed, 14 Jun 2017 07:42:41 +0000 (07:42 +0000)]
Don't overwrite error message when it is available in
cmd_string_parse. Reported by Jimi Damon in GitHub issue 975.

7 years agoAdd missing error message when no target, GitHub issue 971.
nicm [Wed, 14 Jun 2017 07:37:17 +0000 (07:37 +0000)]
Add missing error message when no target, GitHub issue 971.

7 years agotweak sysctl_string and sysctl_tstring to use size_t for lengths, not int
dlg [Wed, 14 Jun 2017 03:00:40 +0000 (03:00 +0000)]
tweak sysctl_string and sysctl_tstring to use size_t for lengths, not int

theyre both wrappers around sysctl__string, which is where half the
fix is too.

7 years agoimplement the roff(7) \p (break output line) escape sequence
schwarze [Wed, 14 Jun 2017 01:31:19 +0000 (01:31 +0000)]
implement the roff(7) \p (break output line) escape sequence

7 years agoAdd user@host prefix to client's "Permisison denied" messages, useful in
dtucker [Wed, 14 Jun 2017 00:31:38 +0000 (00:31 +0000)]
Add user@host prefix to client's "Permisison denied" messages, useful in
particular when using "stacked" connections where it's not clear which
host is denying.  bz#2720, ok djm@ markus@

7 years agosort
deraadt [Tue, 13 Jun 2017 19:49:18 +0000 (19:49 +0000)]
sort

7 years agono need for branding in .Nd line
deraadt [Tue, 13 Jun 2017 19:41:55 +0000 (19:41 +0000)]
no need for branding in .Nd line

7 years agoPartial support for the \n[an-margin] number register.
schwarze [Tue, 13 Jun 2017 19:33:24 +0000 (19:33 +0000)]
Partial support for the \n[an-margin] number register.

Manuals autogenerated from reStructuredText are reckless enough
to peek at this non-portable, implementation-dependent, highly
groff-specific internal register - for no good reason, because the
man(7) language natively provides in a much simpler way what they
are trying to emulate here with much fragility.

A full implementation would be very hard because it would require
access to output-device-specific formatting data at the roff(7)
preprocessor stage, which mandoc doesn't support at all.
So hardcode a few magic numbers as reStructuredText expects them
for terminal output.  For other output modes (like HTML), code using
this register is utterly broken anyway.

7 years agoRevert 'Implement VFS read clustering for MSDOSFS' again
sf [Tue, 13 Jun 2017 18:13:18 +0000 (18:13 +0000)]
Revert 'Implement VFS read clustering for MSDOSFS' again

This has again caused regressions, this time when reading from msdosfs.

This reverts

        denode.h 1.31
        msdosfs_vnops.c 1.114

Requested by deraadt@

7 years agosync
deraadt [Tue, 13 Jun 2017 17:10:00 +0000 (17:10 +0000)]
sync

7 years agoFor KARL, include a linkkit into the base set, as usr/share/compile.tgz.
deraadt [Tue, 13 Jun 2017 17:09:52 +0000 (17:09 +0000)]
For KARL, include a linkkit into the base set, as usr/share/compile.tgz.
This contains the relevant pieces from all the GENERIC* compile directories
(*.o ld.script Makefile gap.S).  It also includes the machine/ subdir for
now, to support re-randomizing of gap.S, though other methods are being
investigated.  (Any binutils ld.script hackers out there?)
collaboration with rpe

7 years agonewbsd: target which re-links a kernel. We cannot use the bsd: target
deraadt [Tue, 13 Jun 2017 16:40:00 +0000 (16:40 +0000)]
newbsd: target which re-links a kernel.  We cannot use the bsd: target
since it has source dependencies, and relinking doesn't have any.  Also
the bsd: target is created by config(8)...
worked on with rpe.

7 years agoThe KARL compile.tgz linkkit adds some growth to the base set.
deraadt [Tue, 13 Jun 2017 16:28:04 +0000 (16:28 +0000)]
The KARL compile.tgz linkkit adds some growth to the base set.
Prepare the install*.fs files for this growth.

7 years agoIf the layout is empty except for requesting a left vertical frame,
schwarze [Tue, 13 Jun 2017 16:11:58 +0000 (16:11 +0000)]
If the layout is empty except for requesting a left vertical frame,
record that detail in struct tbl_opts, such that term_tbl() can do
correct column calculations and doesn't prematurely break lines.
Fixes the tbl/layout/empty regression test that got broken when
line breaking in text block cells was implemented.

7 years agoKill unused #define IFI_NOMEDIA.
krw [Tue, 13 Jun 2017 16:02:46 +0000 (16:02 +0000)]
Kill unused #define IFI_NOMEDIA.

7 years agoRename 'packet' field to 'recv_packet' and 'bootrequest_packet'
krw [Tue, 13 Jun 2017 15:49:32 +0000 (15:49 +0000)]
Rename 'packet' field to 'recv_packet' and 'bootrequest_packet'
field to 'sent_packet'. Also 'bootrequest_packet_length' to
'sent_packet_length'.

Adopt consistent idiom of a local variable 'packet' to point at
packet being manipulated.

No intentional functional change.

7 years agoneeds a fake ld.script for KARL tooling
deraadt [Tue, 13 Jun 2017 15:37:30 +0000 (15:37 +0000)]
needs a fake ld.script for KARL tooling

7 years agoDelete the arbitrary range restriction for -Owidth.
schwarze [Tue, 13 Jun 2017 15:05:22 +0000 (15:05 +0000)]
Delete the arbitrary range restriction for -Owidth.
We provide users with tools.  We don't attempt to prevent them from
using them in stupid ways: depending on the context, not every
stupid-looking use is necessarily actually stupid, and not every
stupidity can be automatically detected anyway, so don't even try.

7 years agofix the interaction of the allbox option with spanned cells in the layout
schwarze [Tue, 13 Jun 2017 14:38:38 +0000 (14:38 +0000)]
fix the interaction of the allbox option with spanned cells in the layout

7 years agoDo not invalidate remote TLB entries with new mappings because the
visa [Tue, 13 Jun 2017 14:06:39 +0000 (14:06 +0000)]
Do not invalidate remote TLB entries with new mappings because the
virtual addresses really should not have TLB hits. This reduces IPIs.

7 years agoExplicitly ignore .br, .ce, and .sp inside tbl(7) text blocks.
schwarze [Tue, 13 Jun 2017 13:50:17 +0000 (13:50 +0000)]
Explicitly ignore .br, .ce, and .sp inside tbl(7) text blocks.
With the current code structure, they would appear at the wrong
place in the syntax tree, so it is better to not insert them
into the tree at all and issue an UNSUPP message instead.

7 years agoTweak order of operands to check constant `cache_valias_mask' first.
visa [Tue, 13 Jun 2017 13:41:15 +0000 (13:41 +0000)]
Tweak order of operands to check constant `cache_valias_mask' first.

7 years agoDo not require that unknown EXT_INFO extension values not contain
djm [Tue, 13 Jun 2017 12:13:59 +0000 (12:13 +0000)]
Do not require that unknown EXT_INFO extension values not contain
\0 characters. This would cause fatal connection errors if an
implementation sent e.g. string-encoded sub-values inside a value.

Reported by Denis Bider; ok markus@

7 years agowhen enabling cpu caches, check the item size against the right thing
dlg [Tue, 13 Jun 2017 11:41:11 +0000 (11:41 +0000)]
when enabling cpu caches, check the item size against the right thing

lists of free items on the per cpu caches are built out the pool items
as struct pool_cache_items, not struct pool_cache. make the KASSERT
in pool_cache_init check that properly.

7 years agomissing prototype.
djm [Tue, 13 Jun 2017 11:22:15 +0000 (11:22 +0000)]
missing prototype.

7 years agoIncrease WSFONT_NAME_SIZE size, this will allow storing longer font
fcambus [Tue, 13 Jun 2017 08:00:24 +0000 (08:00 +0000)]
Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@

7 years agoRemove xterm flag from key before checking prefix, reported by Peter
nicm [Tue, 13 Jun 2017 07:12:33 +0000 (07:12 +0000)]
Remove xterm flag from key before checking prefix, reported by Peter
Fern in GitHub issue 974.

7 years agouse size_t for the size of things in memory, not int.
dlg [Tue, 13 Jun 2017 06:16:31 +0000 (06:16 +0000)]
use size_t for the size of things in memory, not int.

this tweaks the len argument to sysctl_rdstring, sysctl_struct, and
sysctl_rdstruct.

there's probably more to fix.

ok millert@

7 years agoInitialize the length parameter for radius_get_vs_raw_attr() since
yasuoka [Tue, 13 Jun 2017 05:40:22 +0000 (05:40 +0000)]
Initialize the length parameter for radius_get_vs_raw_attr() since
it's read/write.  diff from IIJ.

7 years agoSplit early startup code out of locore.S into locore0.S. Adjust link
deraadt [Tue, 13 Jun 2017 01:44:27 +0000 (01:44 +0000)]
Split early startup code out of locore.S into locore0.S.  Adjust link
run so that this locore0.o is always at the start of the executable.
But randomize the link order of all other .o files in the kernel, so
that their exec/rodata/data/bss segments land all over the place.

As a result, the internal layout of every newly build bsd kernel is
different from past kernels.  Internal relative offsets are not known
to an outside attacker.  The only known offsets are in the startup code
(which will be gone when it is smashed).

The bootstrap code unmapping or smashing isn't done yet, and there is
some potential for more bits from locore.S to move to locore0.S

7 years agoadd a dummy ld.script. macppc does not use one of these yet, but
deraadt [Tue, 13 Jun 2017 01:42:52 +0000 (01:42 +0000)]
add a dummy ld.script.  macppc does not use one of these yet, but
infrastructure that is coming requires an architecture to carry such a
file.

7 years agoPrepare install_extint() for the vector being relative-negative (ie
deraadt [Tue, 13 Jun 2017 01:42:12 +0000 (01:42 +0000)]
Prepare install_extint() for the vector being relative-negative (ie
lower in the address space).  Previously it could only be higher
than... uhm locore.o
Discussed with drahn and tom

7 years agoFirst step of randomized link for sparc64: gap.S and randomize files.
deraadt [Tue, 13 Jun 2017 00:16:09 +0000 (00:16 +0000)]
First step of randomized link for sparc64:  gap.S and randomize files.
locore isn't split up yet, nor is the startup code smashed.
ok dlg, pieces seen before by kettenis

7 years agopledge(2) bpf has been in use for some time now on tcpdump(8), this will enable
mestre [Mon, 12 Jun 2017 23:37:44 +0000 (23:37 +0000)]
pledge(2) bpf has been in use for some time now on tcpdump(8), this will enable
it also for pflogd(8)'s priv proc.

OK deraadt@

7 years agohave the timeout call if qstart via the serialiser isntead of directly
dlg [Mon, 12 Jun 2017 23:20:10 +0000 (23:20 +0000)]
have the timeout call if qstart via the serialiser isntead of directly

hfsc schedules a timeout to keep traffic moving if somethings has been
delayed an no other tx activity has occurred. that timeout was calling
(*ifp->if_qstart)(ifq) rather than ifq_start. the latter prevents
concurrent calls to if_qstart.

without this change bjorn ketelaars on misc@ was experiencing weird
pauses in traffic and lockups because the tx ring was corrupted
because re_start was run concurrently, once from the stack and once
from hfsc.

thanks to bjorn ketelaars for debugging, and mikeb@ for most of the
legwork in diagnosing the problem.
ok mikeb@

7 years agotest the new allbox and wrapping features
schwarze [Mon, 12 Jun 2017 22:50:02 +0000 (22:50 +0000)]
test the new allbox and wrapping features

7 years agoTwo minor fixes for the "allbox" modifier:
schwarze [Mon, 12 Jun 2017 22:48:52 +0000 (22:48 +0000)]
Two minor fixes for the "allbox" modifier:
1. It does not reduce explicit "||" in the layout to "|".
2. It does not cause three horizontal lines at the end of a table,
even if the table ends with an explicit "_" data line.

7 years agoIf a tbl(7) layout contains a 'w' (minimum width) modifier for a
schwarze [Mon, 12 Jun 2017 22:05:41 +0000 (22:05 +0000)]
If a tbl(7) layout contains a 'w' (minimum width) modifier for a
given column, that column contains no literal or numeric cell of
larger width, and all text block cells in that column can be line
wrapped to fit into that minimum width, groff does not increase
that column width beyond the specified minimum: so do the same.

7 years agoPledge is fairly done, so the kernel printf's can be converted to log()
deraadt [Mon, 12 Jun 2017 21:55:16 +0000 (21:55 +0000)]
Pledge is fairly done, so the kernel printf's can be converted to log()
calls.  They'll be a little less visible, but still in the system logs.
ok bluhm

7 years ago/usr/games/lib doesn't exist any more, use the new path.
akfaew [Mon, 12 Jun 2017 20:56:20 +0000 (20:56 +0000)]
/usr/games/lib doesn't exist any more, use the new path.

OK tb@ deraadt@

7 years agoimplement the tbl(7) "allbox" option;
schwarze [Mon, 12 Jun 2017 20:44:57 +0000 (20:44 +0000)]
implement the tbl(7) "allbox" option;
used for example by curs_getch(3) and GLwDrawingArea(3)

7 years agofix column width calculation for text block cells
schwarze [Mon, 12 Jun 2017 20:14:03 +0000 (20:14 +0000)]
fix column width calculation for text block cells

7 years agoUse unlinkat() when removing the contents of a directory so we don't
millert [Mon, 12 Jun 2017 18:56:13 +0000 (18:56 +0000)]
Use unlinkat() when removing the contents of a directory so we don't
need to construct paths.  OK deraadt@

7 years agoImplement automatic line breaking
schwarze [Mon, 12 Jun 2017 18:55:42 +0000 (18:55 +0000)]
Implement automatic line breaking
inside individual table cells that contain text blocks.
This cures overlong lines in various Xenocara manuals.

7 years agoredundant, gets BINDIR from ../Makefile.inc
espie [Mon, 12 Jun 2017 18:51:53 +0000 (18:51 +0000)]
redundant, gets BINDIR from ../Makefile.inc

7 years agodestroy lint remnants.
espie [Mon, 12 Jun 2017 18:49:33 +0000 (18:49 +0000)]
destroy lint remnants.
okay millert@ deraadt@

7 years agoUse openat() and unlinkat() instead of chdir()ing to the recovery dir.
millert [Mon, 12 Jun 2017 18:38:57 +0000 (18:38 +0000)]
Use openat() and unlinkat() instead of chdir()ing to the recovery dir.
Since we use flock() and not fcntl() locking we can open the recovery
file read-only.  OK martijn@

7 years agoAdd dprintf() and vdprintf() RETURN VALUES. OK deraadt@
millert [Mon, 12 Jun 2017 18:37:12 +0000 (18:37 +0000)]
Add dprintf() and vdprintf() RETURN VALUES.  OK deraadt@

7 years agoBackout last change to remove esym .data patching because it breaks
mglocker [Mon, 12 Jun 2017 18:26:33 +0000 (18:26 +0000)]
Backout last change to remove esym .data patching because it breaks
boot for e.g. the BBB and the C.H.I.P.; 'panic: initarm: out of memory'.
Better solution to be found as discussed with patrick@.

ok jsg@

7 years agoAdd some tests from kshe48@zoho.com. Currently failing, but will be fixed soon.
otto [Mon, 12 Jun 2017 16:58:31 +0000 (16:58 +0000)]
Add some tests from kshe48@zoho.com. Currently failing, but will be fixed soon.

7 years agoLimit the maximum size of softraid crypto volumes that can be created to
jsing [Mon, 12 Jun 2017 16:39:51 +0000 (16:39 +0000)]
Limit the maximum size of softraid crypto volumes that can be created to
the size that is currently supported (a data area of 16TB, or
2^32 * 32 + 528 blocks including the softraid metadata/boot area), rather
than successfully creating the volume and then failing during resource
allocation (without properly reporting why it failed).

Found the hard way by sharon s. <mymlact at gmx dot com>

7 years agoUpon failure, only return zero from the softraid ioctl handler when there
jsing [Mon, 12 Jun 2017 15:43:25 +0000 (15:43 +0000)]
Upon failure, only return zero from the softraid ioctl handler when there
is at least one bio status message. It is a much nicer user experience when
we properly report failures, however in the case that we fail to do this,
getting an errno back from the ioctl is somewhat better than simply
printing "unknown error" from bioctl(8).

7 years agoFix another long standing softraid crypto bug where if all 32 keys are in
jsing [Mon, 12 Jun 2017 15:15:08 +0000 (15:15 +0000)]
Fix another long standing softraid crypto bug where if all 32 keys are in
use, when freeing crypto sessions we run straight off the end of the array
and start blatting memory - clearly no one has a softraid crypto volume
that exceeds 15.5TB in size...

7 years agoFactor out and reuse the code that frees the crypto sessions, instead of
jsing [Mon, 12 Jun 2017 15:09:07 +0000 (15:09 +0000)]
Factor out and reuse the code that frees the crypto sessions, instead of
duplicating it.

7 years agoFix a long standing off-by-one bug in the softraid crypto number of keys
jsing [Mon, 12 Jun 2017 14:46:00 +0000 (14:46 +0000)]
Fix a long standing off-by-one bug in the softraid crypto number of keys
calculation - we allow one key per 0.5TB, which should allow up to 16TB
disks, however the disk size was treated like a block offset and shifted.
This meant that the maximum size was actually 16TB minus one block.

While here also calculate the number of keys as an absolute value, rather
than as the upper inclusive bound - adjust the logic in the associated for
and if statements to match.

ok krw@ tb@

7 years agorejname[] is also -r option buffer, and should be PATH_MAX
deraadt [Mon, 12 Jun 2017 14:23:26 +0000 (14:23 +0000)]
rejname[] is also -r option buffer, and should be PATH_MAX
ok millert