schwarze [Thu, 8 Jun 2017 00:21:23 +0000 (00:21 +0000)]
Portable mandoc just got a warning about unknown .Lb names
which we don't want in OpenBSD, but let's keep the message table
and the manual page in sync.
millert [Wed, 7 Jun 2017 23:36:43 +0000 (23:36 +0000)]
In cron(8), require that crontab and at files in the spool be owned
by group crontab. The at(1) command now creates files owned by
group crontab, the crontab(1) command already does this.
Files in the crontab spool with parse errors are now ignored;
crontab(1) will not install a crontab file with parse errors.
The system crontab file (/etc/crontab) is not affected by this.
The required permissions on crontab files have been tightened.
Files in the cron spool must be mode 0600 (as created by crontab(1)).
The system crontab file may be readable/writable by the owner,
readable by group and readable by other. The system crontab must
be readable by the owner.
schwarze [Wed, 7 Jun 2017 23:29:31 +0000 (23:29 +0000)]
style checks related to .Er; inspired by mdoclint(1)
mlarkin [Wed, 7 Jun 2017 23:15:49 +0000 (23:15 +0000)]
vmctl: change default "vmctl console" (cu) baud rate to 115200. Not
strictly needed but matches the previous baudrate diff committed earlier
to vmd.
ok deraadt, phessler
jmc [Wed, 7 Jun 2017 21:47:07 +0000 (21:47 +0000)]
use the same formatting for vlan as the rest of the page; ok dlg
schwarze [Wed, 7 Jun 2017 21:05:19 +0000 (21:05 +0000)]
Remove "new sentence, new line" detection, covered by mandoc.
OK jmc@ wiz@
schwarze [Wed, 7 Jun 2017 20:58:36 +0000 (20:58 +0000)]
Also catch "new sentence, new line" if there are three blanks
between the sentences. Thomas Klausner says he has seen some
of these, and i don't see any false positives.
bluhm [Wed, 7 Jun 2017 20:53:59 +0000 (20:53 +0000)]
Add an acct(5) flag for pledge violations. Then lastcomm(1) shows
when something went wrong. This allows to monitor whether the
system is under attack and that the attack has been prevented by
OpenBSD pledge(2).
OK deraadt@ millert@ jmc@
schwarze [Wed, 7 Jun 2017 20:30:13 +0000 (20:30 +0000)]
Make "new sentence, new line" detection stricter:
Also catch cases where the new sentence starts with a one-letter word
and the input line is broken right after that word.
Suggested by Thomas Klausner <wiz @ NetBSD>.
It's merely a three-bit diff, changing one byte from 0x34 to 0x33,
so what can possibly go wrong...
bluhm [Wed, 7 Jun 2017 20:09:07 +0000 (20:09 +0000)]
To test IPv6 fragements with extension header, the pf pass rules
need an allow-opts. Otherwise pf blocks packets with option header.
schwarze [Wed, 7 Jun 2017 20:01:07 +0000 (20:01 +0000)]
Prepare the terminal driver for filling multiple columns in parallel,
second step: make the per-column byte pointer persistent across
term_flushln() calls, such that a subsequent call can continue at
the point where the previous call left. If more than one column
is in use, return from term_flushln() when the column is full,
rather than breaking the output line.
No functional change, because nothing sets up multiple columns yet.
millert [Wed, 7 Jun 2017 17:59:36 +0000 (17:59 +0000)]
When running at jobs, open the at spool and use the directory fd
with openat(), fstatat() and unlinkat(). This is similar to how
we run cron jobs and eliminates the need for run_job() to find the
basename of the at file. OK deraadt@
schwarze [Wed, 7 Jun 2017 17:38:08 +0000 (17:38 +0000)]
Prepare the terminal driver for filling multiple columns in parallel,
first step: split column data out of the terminal state struct into
a new column state struct and use an array of such column state
structs. No functional change.
naddy [Wed, 7 Jun 2017 16:47:29 +0000 (16:47 +0000)]
Fix clang warning about tautological compare: an unsigned long can't
be negative. ok deraadt@
robert [Wed, 7 Jun 2017 16:01:07 +0000 (16:01 +0000)]
make sure there are no duplicate object files linked when building syspatches
mikeb [Wed, 7 Jun 2017 15:49:21 +0000 (15:49 +0000)]
Acquire submit queue mutex only once per xbf_complete_cmd invocation
and remove some leftover assertions.
nicm [Wed, 7 Jun 2017 15:27:46 +0000 (15:27 +0000)]
Return 1 if name matches not 0, also fix some spaces.
mlarkin [Wed, 7 Jun 2017 14:53:28 +0000 (14:53 +0000)]
vmd: Implement simulated baudrate support in the ns8250 module. The
previous version was allowing an output rate that is "too fast", and linux
guests would give up after 512 characters TXed ("too much work for irq4").
This diff calculates the approximate rate we can sustain at the current
programmed baud rate and limits the output to that rate by inserting a
HZ delay after a specified number of characters have been transmitted.
This fixes the linux guest console issue.
Note that the console now outputs at more or less the selected baud rate,
instead of nearly instantaneously as before - if you selected 9600 in
your guest VMs before, you might want to change that to 115200 now for a
better console experience.
krw@ "seems like a good idea to me"
mlarkin [Wed, 7 Jun 2017 14:41:53 +0000 (14:41 +0000)]
vmd: properly advertise 640k base memory, not 636k. That was a holdover
from before we had seabios support (to fake a hole where the EBDA would
be), and seabios always assumes 640k low memory is available. Fixes a
problem where FreeDOS guests whose seabios placed the virtio ring too
close to 640k would crash vmd. tested on a variety of guest OS, with
and without seabios. no regressions seen.
nicm [Wed, 7 Jun 2017 14:37:30 +0000 (14:37 +0000)]
Add simple searching (C-s and n) to the various choose modes: by name
for client and tree, and by name and content for buffer.
mpi [Wed, 7 Jun 2017 13:41:02 +0000 (13:41 +0000)]
Assert that the KERNEL_LOCK() is held when messing with routing,
pfkey and unix sockets.
ok claudio@
mpi [Wed, 7 Jun 2017 13:30:36 +0000 (13:30 +0000)]
Assert that the calling CPU is holding the KERNEL_LOCK() in malloc(9)
and free(9).
The exception is at early boot when only one CPU is running since we
grab the KERNL_LOCK() relatively late in main().
ok kettenis@
mpi [Wed, 7 Jun 2017 13:28:02 +0000 (13:28 +0000)]
Grab the KERNEL_LOCK() around rtm*() functions. Routing sockets globals
aren't protected by the NET_LOCK().
While here change lock assertions in rt_{set,put}gwroute(), the NET_LOCK()
is enough.
Tested by Hrvoje Popovski.
ok jmatthew@, claudio@
jmc [Wed, 7 Jun 2017 13:25:18 +0000 (13:25 +0000)]
reword "listen on socket" somewhat; ok gilles
dlg [Wed, 7 Jun 2017 09:46:32 +0000 (09:46 +0000)]
update the VLAN doco.
the parameters are parent and vnetid, not vlandev and vlan. svlan(4) is
also a thing.
ok jmc@
jmc [Wed, 7 Jun 2017 09:41:57 +0000 (09:41 +0000)]
X is not restricted to just the + operator;
diff from klemens nanni
confirmed by otto
awolk [Wed, 7 Jun 2017 09:11:52 +0000 (09:11 +0000)]
htpasswd: use crypt_newhash instead of the bcrypt API
man bcrypt states:
These functions are deprecated in favor of crypt_checkpass(3) and
crypt_newhash(3).
hence with this change we move htpasswd to the new API, while here
also change the rounds from a hardcoded 8 to automatic selection based
on system performance.
OK florian@
schwarze [Wed, 7 Jun 2017 02:13:52 +0000 (02:13 +0000)]
The \h escape sequence provides another method for moving backwards,
and after that, previously written output gets overwritten, but
overwriting with blanks does *not* erase previously written content.
Yes, manual pages exist that are crazy enough to rely on that...
djm [Wed, 7 Jun 2017 01:48:15 +0000 (01:48 +0000)]
unbreak after sshv1 purge
schwarze [Wed, 7 Jun 2017 00:50:30 +0000 (00:50 +0000)]
Implement the roff(7) .rn (rename macro or string) request.
Renaming a user-defined macro is very simple: just copy
the definition to the new name and delete the old name.
Renaming high-level macros is a bit tricky: use a dedicated
key-value-table, with non-standard names as keys and standard
names as values. When a macro is found that is not user-defined,
look it up in the "renamed" table and translate it back to the
standard name before passing it on to the high-level parsers.
bru [Tue, 6 Jun 2017 21:53:07 +0000 (21:53 +0000)]
Set the weak variant of hysteresis as default.
mikeb [Tue, 6 Jun 2017 21:12:01 +0000 (21:12 +0000)]
Rewrite the driver to handle 64kb transfers
Although several codepaths in the kernel such as coredump
and buffercache read-ahead feature assume that underlying
hardware is capable of handling 64kb transfers without any
issues, xbf was setup to rely on a single descriptor per
transfer which limited the maximum size of an individual
transfer to 11 4k segments amounting to 44k bytes.
To avoid overbooking, a metadata object is allocated for
each transfer to keep track of associated descriptors
limiting the maximum amount of outstanding transfers to
half the ring size.
The issue was reported by Dan Cross <crossd at gmail.com>,
thanks!
ajacoutot [Tue, 6 Jun 2017 20:34:07 +0000 (20:34 +0000)]
Don't patch(1) as the 'build' user; it has no right over the src tree.
That bug was hidden because patch(1) returns '0' on that particular case.
To be fixed...
ok robert@
mikeb [Tue, 6 Jun 2017 20:33:28 +0000 (20:33 +0000)]
Call xbf_intr for polled transfers that can't sleep
bru [Tue, 6 Jun 2017 19:47:22 +0000 (19:47 +0000)]
Add support for tap gestures.
krw [Tue, 6 Jun 2017 19:01:27 +0000 (19:01 +0000)]
Provide sufficient info in error messages to identify
softraid volume and backing disk when i/o errors occur.
Original issue reported by Paul de Weerd.
Suggestions from jsing@.
ok deraadt@ mikeb@
nicm [Tue, 6 Jun 2017 15:49:35 +0000 (15:49 +0000)]
Continue and pass keys through if they are repeated keys, so that the
first key after a repeated key doesn't get lost.
nicm [Tue, 6 Jun 2017 15:07:35 +0000 (15:07 +0000)]
Do not pass a state into commands when fired on individual items in tree
mode, rely on the %% target substitution in the command for the chosen
pane and leave the default target as the current pane (where the mode
is). Otherwise, joinp and similar end up with -t and -s the
same. Reported by Jacob Niehus in GitHub issue 960.
schwarze [Tue, 6 Jun 2017 15:00:56 +0000 (15:00 +0000)]
Minimal implementation of the roff(7) .ce request (center a number
of input lines without filling).
Contrary to groff, high-level macros abort .ce mode for now.
nicm [Tue, 6 Jun 2017 14:53:28 +0000 (14:53 +0000)]
Delete input event when evbuffer_read() fails to avoid just spinning
around a dead file descriptor. Seems to fix a problem reported by Greg
Hurrell in GitHub issue 941.
visa [Tue, 6 Jun 2017 14:39:48 +0000 (14:39 +0000)]
Remove code that is not needed right now.
visa [Tue, 6 Jun 2017 14:35:53 +0000 (14:35 +0000)]
Implement startup smashing in C. The code should be moved
under arch/mips64 once loongson and sgi have gap.o.
Discussed with deraadt@
florian [Tue, 6 Jun 2017 13:59:37 +0000 (13:59 +0000)]
start slaacd as early as possible, right after pf and sysctl.conf are
setup.
Input & OK deraadt@
florian [Tue, 6 Jun 2017 13:57:23 +0000 (13:57 +0000)]
We are going to start slaacd(8) much earlier, before /var is even
mounted. Move control socket to /dev for now.
Input & OK deraadt@
mpi [Tue, 6 Jun 2017 13:19:29 +0000 (13:19 +0000)]
Update stubs to work with radix tree.
mpi [Tue, 6 Jun 2017 13:07:22 +0000 (13:07 +0000)]
Update panic strings, pipex no longer use rn_inithead0().
mpi [Tue, 6 Jun 2017 11:51:13 +0000 (11:51 +0000)]
Do not rely on <net/rtable.h> beeing included by other headers.
Fix build without PF, PIPEX nor IPSEC.
mpi [Tue, 6 Jun 2017 11:39:55 +0000 (11:39 +0000)]
Fix build without PF.
jsg [Tue, 6 Jun 2017 09:42:09 +0000 (09:42 +0000)]
mention -fwrapv being on by default
jsg [Tue, 6 Jun 2017 09:40:24 +0000 (09:40 +0000)]
Enable -fwrapv by default with clang to treat signed integer overflows
as defined. This is done to prevent dangerous optimisations which could
remove security critical overflow checks.
Base gcc has -fno-strict-overflow by default, with clang this is
identical to -fwrapv.
Prompted by naddy@ discovering a hang with a clang compiled i386 kernel
that was resolved with -fwrapv.
ok kettenis@ pascal@
dtucker [Tue, 6 Jun 2017 09:12:17 +0000 (09:12 +0000)]
Fix compression output stats broken in rev 1.201. Patch originally by
Russell Coker via Debian bug #797964 and Christoph Biedl. ok djm@
tb [Tue, 6 Jun 2017 08:12:01 +0000 (08:12 +0000)]
regen
tb [Tue, 6 Jun 2017 08:11:23 +0000 (08:11 +0000)]
Mention that the special files are created in the current working
directory. Suggested by Scott Cheloha.
discussed with jmc
anton [Tue, 6 Jun 2017 08:05:01 +0000 (08:05 +0000)]
Test insertion of unmatched meta sequence.
dlg [Tue, 6 Jun 2017 04:52:40 +0000 (04:52 +0000)]
make vnetid and parent commands available in SMALL ifconfigs.
the code behind the commands has been built on SMALL forever, this just
moves it available in the cmd table. the binary doesnt change size.
jsg [Tue, 6 Jun 2017 02:35:40 +0000 (02:35 +0000)]
correct the depend list of a target introduced in rev 1.9
from deraadt@
kevlo [Tue, 6 Jun 2017 01:02:18 +0000 (01:02 +0000)]
Regen.
kevlo [Tue, 6 Jun 2017 00:52:02 +0000 (00:52 +0000)]
Sort DLINK section and add USB device ID of D-Link DWA-131 rev E1.
ok stsp@
tb [Mon, 5 Jun 2017 22:27:58 +0000 (22:27 +0000)]
Show usage of sysmerge and MAKEDEV instead of just mentioning them.
From Scott Cheloha, thanks.
ok jmc and positive feedback from several
sashan [Mon, 5 Jun 2017 22:18:28 +0000 (22:18 +0000)]
- let's add PF_LOCK()
to enable PF_LOCK(), you must add 'option WITH_PF_LOCK' to your kernel
configuration. The code does not do much currently it's just the very
small step towards MP.
O.K. henning@, mikeb@, mpi@
sthen [Mon, 5 Jun 2017 21:54:07 +0000 (21:54 +0000)]
initial docs for COMPILER_WRAPPER and COMPILER_LINKS
deraadt [Mon, 5 Jun 2017 18:59:06 +0000 (18:59 +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.
The bootstrap code will need smashing because it is mapped by BLTB,
but this is a bit involved so not done yet.
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).
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.
deraadt [Mon, 5 Jun 2017 18:56:30 +0000 (18:56 +0000)]
Increase kernel size, by pushing rodata 1MB forward, from 5MB to 6MB.
This seems to satisfy the BTLB granularity. Good enough for now.
ok kettenis
ajacoutot [Mon, 5 Jun 2017 18:31:23 +0000 (18:31 +0000)]
Temporarily disable the second call to rc_check until I figure out what
is going on. Should fix another case of false negative reported by sthen
(redis).
deraadt [Mon, 5 Jun 2017 17:49:05 +0000 (17:49 +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.
Late during kernel boot, smash the startup code with traps so that
it does not point to the other randomly placed code. It has be smashed,
because alpha (insecurely in my view) runs in the KSEG0 space.
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 is gone.
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.
deraadt [Mon, 5 Jun 2017 17:47:33 +0000 (17:47 +0000)]
include machine/param.h before machine.asm.h because uhm alpha.
schwarze [Mon, 5 Jun 2017 17:34:09 +0000 (17:34 +0000)]
Test insertion of non-ASCII characters, in particular making sure
that valid input does not cause writing invalid intermediate states
to the terminal, and that invalid input is not delayed waiting for
more input, but written through right away.
Currently failing, but expected to be fixed shortly.
deraadt [Mon, 5 Jun 2017 15:58:33 +0000 (15:58 +0000)]
track permissions of original file
deraadt [Mon, 5 Jun 2017 15:58:14 +0000 (15:58 +0000)]
use same idiom as other Makefiles
ajacoutot [Mon, 5 Jun 2017 15:24:57 +0000 (15:24 +0000)]
Fix logic in _rc_wait to properly cope with setproctitle(3) daemons. It was a
regression from my recent rc.subr changes.
reported by deraadt@ and naddy@ : pflogd was marked as failed during boot while
it was properly running
visa [Mon, 5 Jun 2017 15:23:11 +0000 (15:23 +0000)]
Randomize the link order of .o files in the kernel on octeon.
Unlike on some other architectures, it is not possible to unmap
the early boot code. Instead, the code is smashed during boot.
Input from deraadt@
espie [Mon, 5 Jun 2017 14:33:42 +0000 (14:33 +0000)]
explicitly pass -w since clang -M doesn't imply it.
okay millert@
anton [Mon, 5 Jun 2017 14:10:11 +0000 (14:10 +0000)]
Add new edit regress files.
Absent from my previous commit.
anton [Mon, 5 Jun 2017 13:54:39 +0000 (13:54 +0000)]
Rewrite ksh edit mode regression tests.
Instead of calling x_vi() directly, run ksh in a pseudo tty.
This makes the process of adding tests for emacs mode simpler since the code can
be shared.
With feedback and help from millert@ and schwarze@
deraadt [Mon, 5 Jun 2017 13:52:32 +0000 (13:52 +0000)]
Avoid use of _C_LABEL, since it is not portable to all our architectures.
And anyways, everything is ELF now.
deraadt [Mon, 5 Jun 2017 12:43:57 +0000 (12:43 +0000)]
The arm* architectures edit the ld.script, creating a copy in the compile
directories. Copy it in the same way on other architectures, for the same
effect. Something upcoming will want that file there anyways.
robert [Mon, 5 Jun 2017 09:51:27 +0000 (09:51 +0000)]
exclude more objects from the readelf output when building syspatches (needed on i386)
robert [Mon, 5 Jun 2017 09:47:54 +0000 (09:47 +0000)]
a kernel errata requires a full build as well in case some headers
change so let's do a full build all the time
robert [Mon, 5 Jun 2017 09:46:25 +0000 (09:46 +0000)]
set BUILDUSER to build by default, this can be overwritten from the environment
robert [Mon, 5 Jun 2017 09:44:56 +0000 (09:44 +0000)]
do not add ./ to the path of the files in the tarball
robert [Mon, 5 Jun 2017 09:42:45 +0000 (09:42 +0000)]
do not remove used files from the fakeroot
dlg [Mon, 5 Jun 2017 05:10:23 +0000 (05:10 +0000)]
remove vlan(4) specific output handling
vlan(4) now understands the generic vnetid and ifparent ioctls, so
this is redundant.
ok henning@
dlg [Mon, 5 Jun 2017 04:57:37 +0000 (04:57 +0000)]
use byte swapping loads and stores.
shrinks the code a bit on sparc64.
ok jmatthew@
millert [Mon, 5 Jun 2017 01:42:45 +0000 (01:42 +0000)]
Set the group on cron's Unix domain socket _before_ making it
group-writable, not after. Pointed out by Solar Designer.
naddy [Sun, 4 Jun 2017 23:03:19 +0000 (23:03 +0000)]
Catch up with changes made on amd64 (kettenis@):
Generating mixed 16-bit/32-bit/64-bit code with clang's integrated
assembler is a bit tricky. It supports the .code16, .code32 and
.code64 directives. But it doesn't know about the data16/data32 and
addr16/addr32 instruction prefixes. Instead it tries to determine
those from the instruction opcode. It mostly succeeds, but there are
a couple of corner cases where clang will generate the "addr32" form
where gas generates the "addr16" form in .code16 segments. That
should be no problem (and just waste a couple of bytes), but it makes
comparing the generated code a bit difficult.
Allow the trampoline code to be compiled with both. For clang #define
away the addr32 prefix and avoid using the data32 prefix by using a
mnemonic that explicitly encodes the size of the operand. Add a few
addr32 prefixes in .code16 blocks to reduce the differences between
code generated by clang and gas.
ok deraadt@
schwarze [Sun, 4 Jun 2017 22:43:50 +0000 (22:43 +0000)]
Implement the roff(7) .mc (right margin character) request.
The Tcl/Tk manual pages use this extensively.
Delete the TERM_MAXMARGIN hack, it breaks .mc inside .nf;
instead, implement a proper TERMP_BRNEVER flag.
naddy [Sun, 4 Jun 2017 20:28:05 +0000 (20:28 +0000)]
fix a bungled logical/bitwise expression pointed out by clang; ok deraadt@
naddy [Sun, 4 Jun 2017 20:26:18 +0000 (20:26 +0000)]
Replace ((2 << 31) - 1) with 0xffffffff, which is equivalent but doesn't
cause a shift overflow on a 32-bit arch (i386). ok kettenis@
afresh1 [Sun, 4 Jun 2017 19:26:18 +0000 (19:26 +0000)]
Update to perl File::Path 2.13 for security fixes
Reccomended by upstream - jkeenan AT pobox.com
OK sthen@
naddy [Sun, 4 Jun 2017 19:23:20 +0000 (19:23 +0000)]
Remove unused function, as pointed out by clang. ok deraadt@ kettenis@
schwarze [Sun, 4 Jun 2017 18:48:09 +0000 (18:48 +0000)]
Make term_flushln() simpler and more robust:
Eliminate the "overstep" state variable.
The information is already contained in "viscol".
Minus 60 lines of code, no functional change intended.
tb [Sun, 4 Jun 2017 17:03:39 +0000 (17:03 +0000)]
Create gap.* with umask 007 instead of 077 to make kernel builds after
make release work without prior cleanup.
discussed with deraadt
nicm [Sun, 4 Jun 2017 15:36:33 +0000 (15:36 +0000)]
Do not leak command, from David CARLIER.
kettenis [Sun, 4 Jun 2017 15:06:22 +0000 (15:06 +0000)]
Switch the radeondrm(4) driver over to TTM using the new DRM VMA manager.
ok jsg@
patrick [Sun, 4 Jun 2017 14:26:27 +0000 (14:26 +0000)]
Remove the sigprocmask stub that has long been made unused since
the use of kbind. The code was #if 0'd anyway.
Reminded by miod@
patrick [Sun, 4 Jun 2017 14:21:49 +0000 (14:21 +0000)]
Remove comment that no longer is true. esym is not written by our
bootloader anymore, so it doesn't matter where it is stored. While
there do some whitespace cleanup.
naddy [Sun, 4 Jun 2017 14:20:12 +0000 (14:20 +0000)]
For the memory operand, clang passes in an address relative to the
stack pointer. We cannot use this twice while pushing values on
the stack. Instead load the operand address into a register and
use this as base address. Use %edx since it is already marked as
clobbered. Also fixes a syntax problem for clang.
ok mlarkin@
patrick [Sun, 4 Jun 2017 14:10:42 +0000 (14:10 +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.
Late during kernel boot, unmap the early startup code.
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@
kettenis [Sun, 4 Jun 2017 14:02:24 +0000 (14:02 +0000)]
Switch the TTM code over to the generic DRM VMA manager.
ok jsg@
naddy [Sun, 4 Jun 2017 13:57:29 +0000 (13:57 +0000)]
Malloc the superblock buffer to make sure that it is properly aligned.
On i386, clang puts the char array at an odd address in .bss.
ok deraadt@