openbsd
5 years agoreport errno in debug logs and other minor cleanups.
eric [Thu, 10 Jan 2019 07:40:52 +0000 (07:40 +0000)]
report errno in debug logs and other minor cleanups.

ok gilles@

5 years agoAfter years of gnashing of teeth, i finally found a way to avoid
schwarze [Thu, 10 Jan 2019 07:39:39 +0000 (07:39 +0000)]
After years of gnashing of teeth, i finally found a way to avoid
having to write empty list elements for non-compact .Bl -tag lists:

1. Add margin-bottom to the <dd>.
Note that margin-top on the <dt> doesn't work because it would put
a short <dt> lower than the <dd>; margin-bottom on the <dt> doesn't
work because it would put vertical space before the <dd> for a long
<dt>; and margin-top on the <dd> doesn't work because it would put
a short <dt> higher than the <dd>.  Only margin-bottom on the <dd>
has none of these adverse effects.

2. Of course, margin-bottom on the <dd> fails to take care of the
vertical spacing before the first list element, so implement that
separately by margin-top on the <dl>.

3. For .Bl -tag -compact, reset both to zero.

5 years agoInitializers for file-scope static variables should be compile-time
schwarze [Thu, 10 Jan 2019 06:27:23 +0000 (06:27 +0000)]
Initializers for file-scope static variables should be compile-time
constants, and while stderr is a compile-time constant in OpenBSD,
Kelvin Sherlock <ksherlock at gmail dot com> reports that it isn't
on some other systems, for example on FreeBSD or Linux.
So do the initialization by calling mandoc_msg_setoutfile()
from main() instead.

5 years agoUse efifb_stolen() to prevent radeondrm from using aperture memory
jsg [Thu, 10 Jan 2019 01:20:02 +0000 (01:20 +0000)]
Use efifb_stolen() to prevent radeondrm from using aperture memory
overlapping the framebuffer.   Prompted by ring tests failing.
Diagnosed, fix suggested by and ok kettenis@

5 years agoadd efifb_stolen() to get the size of the efifb framebuffer
jsg [Thu, 10 Jan 2019 01:16:29 +0000 (01:16 +0000)]
add efifb_stolen() to get the size of the efifb framebuffer
suggested by and ok kettenis@

5 years agoDrop dead links to loria.fr and cvshome.org
jca [Thu, 10 Jan 2019 00:41:40 +0000 (00:41 +0000)]
Drop dead links to loria.fr and cvshome.org

Pointed out by Matteo Niccoli, ok bluhm@ sthen@

5 years agoPrinting hex values with right adjustment makes it easier to compare
bluhm [Wed, 9 Jan 2019 18:11:22 +0000 (18:11 +0000)]
Printing hex values with right adjustment makes it easier to compare
corresponding digits.  So the change the ddb x/x output.
OK sashan@ deraadt@ visa@ mpi@

5 years agoDelay keyword expansion in co until after the locks have been resolved.
joris [Wed, 9 Jan 2019 18:00:45 +0000 (18:00 +0000)]
Delay keyword expansion in co until after the locks have been resolved.

This way the expansion can happen with the correct values and files do not
show up as modified.

5 years agoWhen expanding $Log$ make sure a newline is added if rd_log has none.
joris [Wed, 9 Jan 2019 17:57:05 +0000 (17:57 +0000)]
When expanding $Log$ make sure a newline is added if rd_log has none.
This can happen on new RCS files.

Fixes $Log$ keyword expansion.

5 years agoMake sure rcs_lock_add() and rcs_lock_remove() properly update the
joris [Wed, 9 Jan 2019 17:55:28 +0000 (17:55 +0000)]
Make sure rcs_lock_add() and rcs_lock_remove() properly update the
rd_lock member of the matching delta.

Other keyword substitution will not properly work in cases where the
RCS file did not have a lock for the revision yet or if the lock is
being removed.

5 years agoUse PF_ROUTE consistently rather than tossing in
krw [Wed, 9 Jan 2019 16:48:36 +0000 (16:48 +0000)]
Use PF_ROUTE consistently rather than tossing in
a couple of AF_ROUTE.

5 years agoUse static consistently with definitions of functions that have been
visa [Wed, 9 Jan 2019 16:42:38 +0000 (16:42 +0000)]
Use static consistently with definitions of functions that have been
declared static.

OK guenther@

5 years agoEliminate an else branch from m_extunref().
visa [Wed, 9 Jan 2019 16:37:27 +0000 (16:37 +0000)]
Eliminate an else branch from m_extunref().

OK millert@ bluhm@

5 years agoMake arm64 efiboot can boot from partitions other than "a".
yasuoka [Wed, 9 Jan 2019 13:18:50 +0000 (13:18 +0000)]
Make arm64 efiboot can boot from partitions other than "a".

ok kettenis

5 years agoInclude strings.h for bzero in usr.bin/nc
inoguchi [Wed, 9 Jan 2019 12:58:18 +0000 (12:58 +0000)]
Include strings.h for bzero in usr.bin/nc

bzero is defined in strings.h.

ok deraadt@

5 years agofree(9) sizes.
mpi [Wed, 9 Jan 2019 12:11:38 +0000 (12:11 +0000)]
free(9) sizes.

ok visa@

5 years agoNo need to call usbd_fill_deviceinfo() from a task, it doesn't generate I/O.
mpi [Wed, 9 Jan 2019 12:10:37 +0000 (12:10 +0000)]
No need to call usbd_fill_deviceinfo() from a task, it doesn't generate I/O.

ok visa@

5 years agoEnable Spleen in wsfont and modify the font selection logic at runtime
fcambus [Wed, 9 Jan 2019 11:23:32 +0000 (11:23 +0000)]
Enable Spleen in wsfont and modify the font selection logic at runtime
in rasops(9) to allow selecting larger fonts when available.

Summary of the changes:

- Enable spleen8x16 for all architectures, replacing bold8x16_iso1.
- Enable spleen12x24 on all arches but sparc64, replacing gallant12x22.
- Enable spleen16x32 and spleen32x64 on amd64, i386, and arm64 for
  GENERIC kernels.
- Modify the font selection logic in rasops(9) so the 16x32 and 32x64
  fonts are selected if at least 120 columns can be displayed. Screens
  with widths equal or larger than 1920px will use the 16x32 font, and
  screens with widths equal or larger than 3840px the 32x64 one.

OK kettenis@, ratchov@, deraadt@

5 years agomake spelling in previous consistent within the page;
jmc [Wed, 9 Jan 2019 07:14:31 +0000 (07:14 +0000)]
make spelling in previous consistent within the page;

5 years agoimplement an if_enqueue handler for vlan(4)
dlg [Wed, 9 Jan 2019 01:17:09 +0000 (01:17 +0000)]
implement an if_enqueue handler for vlan(4)

this allows vlan packets to bypass the ifq handling, which allows
packets to be encapsulated concurrently by any context. the code
falls back to ifqs if hfsc is enabled on the vlan interface, otherwise
it encaps the packet immedate and enqueues it on the parent interface.

hrove popovski has seen a performance bump in certain configurations
from this change.

ok mpi@
no objections claudio@

5 years agosplit if_enqueue up so drivers can replace ifq handling if needed
dlg [Wed, 9 Jan 2019 01:14:21 +0000 (01:14 +0000)]
split if_enqueue up so drivers can replace ifq handling if needed

if_enqueue() still makes sure packets get handled by pf on the way
out, and seen by bridge if needed. however instead of falling through
to ifq mapping and output, it now calls a function pointer in the
ifnet struct. that pointer defaults to the ifq handling, but drivers
can override it to bypass ifq processing.

the most obvious users of the function pointer will be virtual
interfaces, eg, vlan(4). ifqs are good if you need to serialise
access to the thing that transmits packets (like hardware rings on
nics), or mitigate the number of times you do ring processing, but
neither of those things are desirable on vlan interfaces. ideally
vlan could transmit on any cpu without having packets serialised
by it's own ifq before being pushed down to an arbitrary number of
rings on the parent interface. bypassing ifqs means the driver can
push the vlan tag on concurrently and push down to the parent frmo
any cpu.

ok mpi@
no objection from claudio@

5 years agoAdd LRV, NGD and UNI
danj [Wed, 9 Jan 2019 01:03:41 +0000 (01:03 +0000)]
Add LRV, NGD and UNI

5 years agoDisable ret-protector and retpoline protections in the clang compiler
bluhm [Tue, 8 Jan 2019 22:02:30 +0000 (22:02 +0000)]
Disable ret-protector and retpoline protections in the clang compiler
to regain build performance.
OK deraadt@ guenther@ kettenis@

5 years agoAdd BBA:Balmaceda, Aysen, Chile
deraadt [Tue, 8 Jan 2019 21:42:17 +0000 (21:42 +0000)]
Add BBA:Balmaceda, Aysen, Chile

5 years agoWith the change to httpd the workflow got much simpler.
florian [Tue, 8 Jan 2019 18:36:17 +0000 (18:36 +0000)]
With the change to httpd the workflow got much simpler.

5 years agoAllow httpd(8) to start when TLS is configured but a cert is not yet
florian [Tue, 8 Jan 2019 18:35:27 +0000 (18:35 +0000)]
Allow httpd(8) to start when TLS is configured but a cert is not yet
available.
Assuming a httpd.conf based on /etc/examples/httpd.conf, httpd(8)
will only listen on port 80 and serve the acme-challenge directory
for acme-client(1).
The workflow to get a certificate then becomes
acme-client -vAD example.com && rcctl reload httpd
Without the need to edit the httpd.conf yet again. Once the cert
is in place and httpd is reloaded it starts to serve on port 443.

Idea, tweaks & OK deraadt, OK benno

5 years agoviocon: Remove obsolete handling of sc_intrhand
sf [Tue, 8 Jan 2019 16:24:09 +0000 (16:24 +0000)]
viocon: Remove obsolete handling of sc_intrhand

5 years agovirtio: Don't include feature strings without VIRTIO_DEBUG
sf [Tue, 8 Jan 2019 16:23:01 +0000 (16:23 +0000)]
virtio: Don't include feature strings without VIRTIO_DEBUG

They are only used if VIRTIO_DEBUG is enabled.
This should make the kernel slightly smaller.

5 years agoThe child processes of snmpd(8) did not detach from the terminal.
bluhm [Tue, 8 Jan 2019 15:38:36 +0000 (15:38 +0000)]
The child processes of snmpd(8) did not detach from the terminal.
Dup /dev/null to the stdio file descriptors in the children.
based on a fix for httpd(8) and relayd(8); from Jan Klemkow

5 years agoRL (NAK count reload) field in QH should be zero when using periodic
uaa [Tue, 8 Jan 2019 13:49:47 +0000 (13:49 +0000)]
RL (NAK count reload) field in QH should be zero when using periodic
(interrupt) transfer.

When RL is not zero, interrupt transfer cannot work correctly.
It causes USB2.0 hub cannot detect device attach/detach.

ok by mpi@

5 years agoDocument SO_ZEROIZE socket option.
bluhm [Tue, 8 Jan 2019 13:05:36 +0000 (13:05 +0000)]
Document SO_ZEROIZE socket option.
OK claudio@

5 years agoIf the mbuf cluster in m_zero() is read only, propagate the M_ZEROIZE
bluhm [Tue, 8 Jan 2019 13:01:50 +0000 (13:01 +0000)]
If the mbuf cluster in m_zero() is read only, propagate the M_ZEROIZE
flag to the other references.  Then the final m_free() will clear
the memory.
OK claudio@

5 years agosync
florian [Tue, 8 Jan 2019 07:15:05 +0000 (07:15 +0000)]
sync

5 years agoMove acme-client.conf to examples. Since we no longer store the
florian [Tue, 8 Jan 2019 07:14:10 +0000 (07:14 +0000)]
Move acme-client.conf to examples. Since we no longer store the
agreement url in here we no longer need to updated it all the time.
OK deraadt

5 years agoRemove missleading and outdated examples from man page.
florian [Tue, 8 Jan 2019 06:46:29 +0000 (06:46 +0000)]
Remove missleading and outdated examples from man page.
/etc/examples/httpd.conf and /etc/examples/acme-client.conf (comming
soon) are better places.
Pointed out by & OK deraadt, OK benno

5 years agoBotched up an if conditional in the last commit. The IP length needs to
claudio [Tue, 8 Jan 2019 01:47:55 +0000 (01:47 +0000)]
Botched up an if conditional in the last commit. The IP length needs to
bigger than the IP header len to be valid. With this I can traceroute again.

5 years agoExtents code has its own set of flags and does not use malloc's.
bluhm [Mon, 7 Jan 2019 23:44:11 +0000 (23:44 +0000)]
Extents code has its own set of flags and does not use malloc's.
The code in pci_init_extents() accidently passed M_NOWAIT which is
EX_FAST and does no harm.  Replace it with EX_NOWAIT.
from Christian Ludwig; OK kettenis@

5 years agoshort circuit mail check if MAIL is unset. ok anton
tedu [Mon, 7 Jan 2019 20:50:43 +0000 (20:50 +0000)]
short circuit mail check if MAIL is unset. ok anton

5 years agolog dns failures, even if temporary. ok benno
tedu [Mon, 7 Jan 2019 20:33:40 +0000 (20:33 +0000)]
log dns failures, even if temporary. ok benno

5 years agoEnabling both kcov and retguard is now possible due to the recent bump of
anton [Mon, 7 Jan 2019 20:24:59 +0000 (20:24 +0000)]
Enabling both kcov and retguard is now possible due to the recent bump of
NKL2_KIMG_ENTRIES on amd64, allowing larger kernels.

ok mpi@; "that's great!" deraadt@

5 years agoDon't print "allocated section '.foobar' not in segment" warning for
kettenis [Mon, 7 Jan 2019 17:47:25 +0000 (17:47 +0000)]
Don't print "allocated section '.foobar' not in segment" warning for
zero-sized sections.

ok deraadt@, guenther@

5 years agoUse the `iface' argument from the *attach() function instead of calling
mpi [Mon, 7 Jan 2019 14:24:22 +0000 (14:24 +0000)]
Use the `iface' argument from the *attach() function instead of calling
usbd_device2interface_handle().

ok visa@

5 years agoMake the output fit in 80 chars when a serial number is printed.
mpi [Mon, 7 Jan 2019 14:22:40 +0000 (14:22 +0000)]
Make the output fit in 80 chars when a serial number is printed.

ok sthen@, millert@, denis@, kn@

5 years agoadd inteldrm for fw_update
sthen [Mon, 7 Jan 2019 13:34:21 +0000 (13:34 +0000)]
add inteldrm for fw_update

5 years agoValidate the version, and all length fields of IP packets passed to a raw socket
claudio [Mon, 7 Jan 2019 07:54:25 +0000 (07:54 +0000)]
Validate the version, and all length fields of IP packets passed to a raw socket
with INP_HDRINCL. There is no reason to allow badly constructed packets through
our network stack. Especially since they may trigger diagnostic checks further
down the stack. Now EINVAL is returned instead which was already used for some
checks that happened before.
OK florian@

Reported-by: syzbot+0361ed02deed123667cb@syzkaller.appspotmail.com
5 years agoIt is possible to call m_zero with a read-only cluster. In that case just
claudio [Mon, 7 Jan 2019 07:49:38 +0000 (07:49 +0000)]
It is possible to call m_zero with a read-only cluster. In that case just
return. Hopefully the other reference holder has the M_ZEROIZE flag set as
well. Triggered by syzkaller. OK deradt@ visa@

Reported-by: syzbot+c578107d70008715d41f@syzkaller.appspotmail.com
5 years agoRepresent mdoc(7) .Pp (and .sp, and some SYNOPSIS and .Rs features)
schwarze [Mon, 7 Jan 2019 06:51:37 +0000 (06:51 +0000)]
Represent mdoc(7) .Pp (and .sp, and some SYNOPSIS and .Rs features)
by the <p> HTML element and use the html_fillmode() mechanism
for .Bd -unfilled, just like it was done for man(7) earlier, finally
getting rid both of the horrible <div class="Pp"></div> hack and
of the worst HTML syntax violations caused by nested displays.

Care is needed because in some situations, paragraphs have to remain
open across several subsequent macros, whereas in other situations,
they must get closed together with a block containing them.

Some implementation details include:
* Always close paragraphs before emitting HTML flow content.
* Let html_close_paragraph() also close <pre> for extra safety.
* Drop the old, now unused function print_paragraph().
* Minor adjustments in the top-level man(7) node formatter for symmetry.
* Bugfix: .Ss heads suspend no-fill mode, even though .Ss doesn't end it.
* Bugfix: give up on .Op semantic markup for now, see the comment.

5 years agotweak ohci_checkrev so it doesnt print a leading comma and space.
dlg [Mon, 7 Jan 2019 03:41:06 +0000 (03:41 +0000)]
tweak ohci_checkrev so it doesnt print a leading comma and space.

it assumes that it always followed an interrupt string, but we don't
print that on fdt. having the bus responsible for the whitespace
means the fdt glue can print a colon to separate the bus info from
checkrev output, while every other glue keeps the comma.

ok deraadt@

5 years agothe pledge handing for access(2) of /var/run/ypbind.lock is artificially
deraadt [Sun, 6 Jan 2019 22:09:55 +0000 (22:09 +0000)]
the pledge handing for access(2) of /var/run/ypbind.lock is artificially
tough (so that non-YP using developers don't break the tree for YP/LDAP
users).  This check failed to handle the newish RPATH+UNVEIL_INSPECT namei
operation.
discovered by florian, ok beck

5 years agoIncrease L2 PTE reservation for the kernel
mlarkin [Sun, 6 Jan 2019 21:43:19 +0000 (21:43 +0000)]
Increase L2 PTE reservation for the kernel

Bump the number of L2 page table entries reserved for the kernel from 16
to 64, to allow for larger kernels. This diff was in snaps for 21 days
without any reported fallout.

ok deraadt

5 years agoFix most of the .Li abuse:
schwarze [Sun, 6 Jan 2019 20:09:38 +0000 (20:09 +0000)]
Fix most of the .Li abuse:
* Use .Vt for struct names and other type names like in_port_t.
* Use .Dv for #define'd constants like CPUSTATES and KERN_SYSVIPC_INFO.
* Use .Va for sysctl variable names like "machdep".

Not touching some of the .Li use related to networking; that stuff
looks suspicious in more than one way and a diff would need review.

5 years agofold a bunch of similar sysctl cases into a switch.
tedu [Sun, 6 Jan 2019 18:35:55 +0000 (18:35 +0000)]
fold a bunch of similar sysctl cases into a switch.
ok deraadt mestre

5 years agothe parent process doesn't do much but open files, but just the same
tedu [Sun, 6 Jan 2019 18:35:19 +0000 (18:35 +0000)]
the parent process doesn't do much but open files, but just the same
there's no reason it can't use pledge to enforce that.
ok brynet deraadt

5 years agoClear ps_uvpcwd when we free ps_uvpaths. Fixes a crash seen by kn@ and me
kettenis [Sun, 6 Jan 2019 18:33:26 +0000 (18:33 +0000)]
Clear ps_uvpcwd when we free ps_uvpaths.  Fixes a crash seen by kn@ and me
where ps_uvpcwd obviously contains a dangling pointer.

ok deraadt@, krw@

5 years agomention that tun is a point-to-point interface so that we know what
tedu [Sun, 6 Jan 2019 18:32:34 +0000 (18:32 +0000)]
mention that tun is a point-to-point interface so that we know what
word to search for in ifconfig(4).
from claudio

5 years agoset tracefile to null when clearing points.
tedu [Sun, 6 Jan 2019 18:30:36 +0000 (18:30 +0000)]
set tracefile to null when clearing points.
ok kn

5 years agonote that tracefile must be null when clearing points.
tedu [Sun, 6 Jan 2019 18:29:49 +0000 (18:29 +0000)]
note that tracefile must be null when clearing points.
ok kn

5 years agoallow q to exit the program.
tedu [Sun, 6 Jan 2019 18:27:14 +0000 (18:27 +0000)]
allow q to exit the program.
ok cheloha deraadt schwarze

5 years agogrammar fix from chohag jtan com;
jmc [Sun, 6 Jan 2019 17:34:08 +0000 (17:34 +0000)]
grammar fix from chohag jtan com;

5 years agoUnbreak SR_DEBUG builds
kn [Sun, 6 Jan 2019 14:59:56 +0000 (14:59 +0000)]
Unbreak SR_DEBUG builds

In arch/amd64/amd64/machdep.c r1.239 (21.02.2018) guenther added DPRINTF,
redefining the one from dev/softraidvar.h.  softraid(4) has been using
DNPRINTF exclusively since import in 2007, so simply remove the DPRINTF
macro definition from there.

OK krw

5 years agoFix unsafe use of ptsignal() in mi_switch().
visa [Sun, 6 Jan 2019 12:59:45 +0000 (12:59 +0000)]
Fix unsafe use of ptsignal() in mi_switch().

ptsignal() has to be called with the kernel lock held. As ensuring the
locking in mi_switch() is not easy, and deferring the signaling using
the task API is not possible because of lock order issues in
mi_switch(), move the CPU time checking into a periodic timer where
the kernel can be locked without issues.

With this change, each process has a dedicated resource check timer.
The timer gets activated only when a CPU time limit is set. Because the
checking is not done as frequently as before, some precision is lost.

Use of timers adapted from FreeBSD.

OK tedu@

Reported-by: syzbot+2f5d62256e3280634623@syzkaller.appspotmail.com
5 years agoRewrite ip_pcbopts() to fill a fresh mbuf with the ip options instead
claudio [Sun, 6 Jan 2019 11:05:09 +0000 (11:05 +0000)]
Rewrite ip_pcbopts() to fill a fresh mbuf with the ip options instead
of fiddling with the user supplied mbuf and then copy it at the end.
OK visa@

5 years agoFinally, represent the man(7) .PP and .HP macros by the natural
schwarze [Sun, 6 Jan 2019 04:41:15 +0000 (04:41 +0000)]
Finally, represent the man(7) .PP and .HP macros by the natural
choice, which is <p> HTML element.  On top of the previous fill-mode
improvements, the key to making this possible is to automatically
close the <p> when required: before headers, subsequent paragraphs,
lists, indented blocks, synopsis blocks, tbl(7) blocks, and before
blocks using no-fill mode.

In man(7) documents, represent the .sp request by a blank line in
no-fill mode and in the same way as .PP in fill mode.

5 years agoafter much wrangling over what might be an improved example,
tedu [Sun, 6 Jan 2019 04:27:34 +0000 (04:27 +0000)]
after much wrangling over what might be an improved example,
just delete it.
ok deraadt schwarze

5 years agoremove some old comments that were inherited from i386 (and wrong)
mlarkin [Sun, 6 Jan 2019 02:15:40 +0000 (02:15 +0000)]
remove some old comments that were inherited from i386 (and wrong)

5 years agoIn no-fill mode, avoid bogus blank lines in two situations:
schwarze [Sat, 5 Jan 2019 21:52:57 +0000 (21:52 +0000)]
In no-fill mode, avoid bogus blank lines in two situations:
1. After the last child; the parent will take care of the line break.
2. At the .YS macro; the end of the preceding .SY already broke the line.

5 years agoSimplify and clarify (i.e. shrink) code processing
krw [Sat, 5 Jan 2019 21:40:44 +0000 (21:40 +0000)]
Simplify and clarify (i.e. shrink) code processing
the bpf captures.

5 years agoIn groff, when the .SY block macro occurs in no-fill mode,
schwarze [Sat, 5 Jan 2019 21:13:55 +0000 (21:13 +0000)]
In groff, when the .SY block macro occurs in no-fill mode,
the output line gets broken after the head.  Do the same.

5 years agoSlowly start doing more HTML output tests, in this case for the
schwarze [Sat, 5 Jan 2019 20:00:33 +0000 (20:00 +0000)]
Slowly start doing more HTML output tests, in this case for the
interaction of .nf and .RS, related to man_macro.c rev. 1.106.

HTML regression testing is tricky because it is extremely prone to
over-testing, i.e. unintentional testing for volatile formatting
details which are irrelevant for deciding whether the HTML output
is good or bad.  Minor changes to the formatter - which is still
heavily under development - might result in the necessity to
repeatedly adjust many test cases.

Then again, HTML syntax rules are so complicated that without
regression testing, the risk is simply too high that later changes
will re-introduce issues that were already fixed earlier.  Let's
just try to design the tests very carefully in such a way that
the *.out_html files contain nothing that is likely to change, and
defer testing in cases where the HTML output is not yet clean enough
to allow designing tests in such a way.

5 years agoKNF nit.
krw [Sat, 5 Jan 2019 19:59:12 +0000 (19:59 +0000)]
KNF nit.

5 years agoIn HTML output, man(7) .RS blocks get formatted as <div class="Bd-indent">,
schwarze [Sat, 5 Jan 2019 18:59:37 +0000 (18:59 +0000)]
In HTML output, man(7) .RS blocks get formatted as <div class="Bd-indent">,
and i can see no reasonable alternative: they do indeed represent indented
displays.  They certainly require flow context and make no sense in phrasing
context.  Consequently, they have to suspend no-fill mode during their head,
in just the same way as other paragraph-type macros do it.

This fixes HTML syntax errors that resulted from .nf followed by .RS.

5 years agofix previous commit
kettenis [Sat, 5 Jan 2019 18:46:36 +0000 (18:46 +0000)]
fix previous commit

"please commit asap" deraadt@

5 years agoCorrectly account for the memory allocated when creating a set.
claudio [Sat, 5 Jan 2019 13:12:35 +0000 (13:12 +0000)]
Correctly account for the memory allocated when creating a set.
Should hopefully fix the error seen on systems after a few reloads where
the size became negative.
OK benno@

5 years agoExpand a macro instruction for clang. Unlike gas, the integrated
visa [Sat, 5 Jan 2019 12:18:13 +0000 (12:18 +0000)]
Expand a macro instruction for clang. Unlike gas, the integrated
assembler does not handle the large immediate value automatically.

5 years agoReplace two-operand instruction aliases that clang does not
visa [Sat, 5 Jan 2019 12:16:59 +0000 (12:16 +0000)]
Replace two-operand instruction aliases that clang does not
understand with the three-operand instructions.

No binary change with gas.

5 years agomatch arm64 and armv7 and print unconfigured simplebus devices on octeon
jsg [Sat, 5 Jan 2019 11:59:39 +0000 (11:59 +0000)]
match arm64 and armv7 and print unconfigured simplebus devices on octeon
ok and tested by visa@

5 years agoAdd em_pch_cnp to IS_ICH8 macro. Missed when adding em_pch_cnp.
jsg [Sat, 5 Jan 2019 11:55:46 +0000 (11:55 +0000)]
Add em_pch_cnp to IS_ICH8 macro.  Missed when adding em_pch_cnp.

5 years agoregen
jsg [Sat, 5 Jan 2019 11:50:32 +0000 (11:50 +0000)]
regen

5 years agoadd more intel core and 300 series u ids
jsg [Sat, 5 Jan 2019 11:49:41 +0000 (11:49 +0000)]
add more intel core and 300 series u ids

5 years agowe assumed that there was no such thing as an "mda session" so the logs
gilles [Sat, 5 Jan 2019 10:20:21 +0000 (10:20 +0000)]
we assumed that there was no such thing as an "mda session" so the logs
displayed 0000000000000000 as the session id for mda deliveries, but we
were wrong. there's actually an identifier that's associated to a batch
of envelopes to be delivered to the same user, and this most definitely
is a session id for that user.

5 years agorevert this change, it was committed by accident
gilles [Sat, 5 Jan 2019 09:48:32 +0000 (09:48 +0000)]
revert this change, it was committed by accident

5 years agominor cleanup, no functional change:
schwarze [Sat, 5 Jan 2019 09:46:26 +0000 (09:46 +0000)]
minor cleanup, no functional change:
* delete one irrelevant FIXME; no more fixed lengths in HTML, please
* simplify some conditions
* avoid testing pointers as truth values, use "!= NULL"
* sort some declarations
* delete some pointless blank lines

5 years agointroduce smtp 'timeout' reporting event to notify filters that a timeout
gilles [Sat, 5 Jan 2019 09:43:39 +0000 (09:43 +0000)]
introduce smtp 'timeout' reporting event to notify filters that a timeout
occured during the smtp session

5 years agoNow that the NODE_NOFILL flag in the syntax tree is accurate,
schwarze [Sat, 5 Jan 2019 09:14:11 +0000 (09:14 +0000)]
Now that the NODE_NOFILL flag in the syntax tree is accurate,
use it in the man(7) HTML formatter rather than keeping fill mode
state locally, resulting in massive simplification (minus 40 LOC).

Move the html_fillmode() state handler function to the html.c module
such that both the man(7) and the roff(7) formatter (and in the future,
also the mdoc(7) formatter) can use it.  Give it a query mode, to be
invoked with TOKEN_NONE.

5 years agono-fill mode has to be suspended during tbl(7) rendering, too
schwarze [Sat, 5 Jan 2019 09:10:24 +0000 (09:10 +0000)]
no-fill mode has to be suspended during tbl(7) rendering, too

5 years agomove the DATA bytes accounting a bit earlier so that we don't have to deal
gilles [Sat, 5 Jan 2019 08:38:41 +0000 (08:38 +0000)]
move the DATA bytes accounting a bit earlier so that we don't have to deal
with it using special cases for when filters are enabled or not.

5 years agomatch arm64 and print unconfigured simplebus devices on armv7
jsg [Sat, 5 Jan 2019 03:42:19 +0000 (03:42 +0000)]
match arm64 and print unconfigured simplebus devices on armv7
ok dlg@ kettenis@

5 years agoenable ohci at fdt on RAMDISK as well
jsg [Sat, 5 Jan 2019 02:58:36 +0000 (02:58 +0000)]
enable ohci at fdt on RAMDISK as well
ok dlg@

5 years agominor cleanup, no functional change:
schwarze [Sat, 5 Jan 2019 01:29:21 +0000 (01:29 +0000)]
minor cleanup, no functional change:
* in node type switches, explicitly handle all types, sort them,
and abort() on those that cannot occur
* avoid testing pointers as truth values, use "!= NULL"
* avoid testing "constant == variable", use "variable == constant"
* prefer sizeof(var) over sizeof(type)
* delete one duplicate function
* sort some declarations
* delete some useless blank lines

5 years agomention fdt attachments
jsg [Sat, 5 Jan 2019 00:39:19 +0000 (00:39 +0000)]
mention fdt attachments

5 years agoSome high-level block macros have an effect similar to temporarily
schwarze [Sat, 5 Jan 2019 00:36:46 +0000 (00:36 +0000)]
Some high-level block macros have an effect similar to temporarily
suspending no-fill mode during their head.  Model this with an
additional roff parser state flag ROFF_NONOFILL.  That is much
simpler than it would be to save and restore the ROFF_NOFILL flag
itself, in particular since the latter can be switched (with lasting
effect) by the .nf and .fi requests even while its effect is
temporarily suspended.

This commit does not change formatting yet, but prepares for future
formatting simplifications and improvements.

5 years agoenable ohci at fdt
dlg [Fri, 4 Jan 2019 23:56:19 +0000 (23:56 +0000)]
enable ohci at fdt

5 years agoadd support for ohci, as found on the pine64
dlg [Fri, 4 Jan 2019 23:55:29 +0000 (23:55 +0000)]
add support for ohci, as found on the pine64

this currently relies on the usbphy code in the ehci fdt glue to
work, but this is a work in progress. there's an extra printf of
fdt in the dmesg to make the ohci checkrev code not look terrible.

ok kettenis@

5 years agoDon't reopen file if its stdin.
martijn [Fri, 4 Jan 2019 15:04:28 +0000 (15:04 +0000)]
Don't reopen file if its stdin.

From leo_tck at volny dot cz
OK millert@

5 years agomake kernel build without MPLS/mpe/mpw
benno [Fri, 4 Jan 2019 11:16:03 +0000 (11:16 +0000)]
make kernel build without MPLS/mpe/mpw
ok claudio@ dlg@

5 years agomake kernel build without INET6 again.
benno [Fri, 4 Jan 2019 11:13:35 +0000 (11:13 +0000)]
make kernel build without INET6 again.
ok dlg@

5 years agoMake gas ignore the ".set hardfloat" directive on mips64.
visa [Fri, 4 Jan 2019 05:56:47 +0000 (05:56 +0000)]
Make gas ignore the ".set hardfloat" directive on mips64.

The directive is needed in certain parts of the kernel code when
compiling using clang. By ignoring the directive, the old toolchain
will still be able to build the kernel after the code has been adjusted
for clang.

OK kettenis@

5 years agofix the dates that got broken by cvs commit
schwarze [Fri, 4 Jan 2019 04:01:59 +0000 (04:01 +0000)]
fix the dates that got broken by cvs commit

5 years agoTest interaction of low-level roff(7) filling requests with .Bd in general
schwarze [Fri, 4 Jan 2019 03:54:50 +0000 (03:54 +0000)]
Test interaction of low-level roff(7) filling requests with .Bd in general
and filling in .Bd -centered in particular; related to mdoc_term.c rev. 1.271.

5 years agoTwo functional improvements to filling in terminal output.
schwarze [Fri, 4 Jan 2019 03:37:42 +0000 (03:37 +0000)]
Two functional improvements to filling in terminal output.

1. Fully support no-fill mode in mdoc(7), even when invoked with
low-level roff(7) .nf requests.  As a side effect, this substantially
simplifies the implementation of .Bd -unfilled and .Bd -literal.

2. Let .Bd -centered fill its text, using the new TERMP_CENTER flag.
That finally fixes the long-standing bug that it used to operate in
no-fill mode, which was known to be wrong for at least five years.
This also simplifies the implementation of .Bd -centered considerably.