Age | Commit message (Collapse) | Author |
|
(stirng -> string)
ok kettenis@ who pointed out I should fix the new arm64 smbiosvar.h too
|
|
differences between the i386 and amd64 versions of the code and
switch to using the standard C integer exact width integer types.
ok deraadt@
|
|
|
|
so the file cannot be re-executed upon the next boot. This provides a
stronger one-shot-upgrade model than the upgrade script's rm /bsd.upgrade.
Now various forms of upgrade failure will reboot into /bsd, which is probably
more recoverable. Performing fchmod -x depends on (1) use of MI boot.c
(not alpha/macppc/sparc64/sgi/octeon) and (2) "can write blocks" functionality
in the IO layer. Most architectures have this support now.
Two diagnostics "fchmod a-x %s: failed" and "/bsd.upgrade is not u+x" will
remain in the tree while refinements happen for some of the laggard
architectures.
based upon a discussion florian
tested in snapshots for more than a week without any complaints
|
|
"yes please" guenther@
|
|
jan@ has a machine where the smbios date is ten space characters which
results in fixstring() returning NULL causing a NULL derefence.
Reported, tested by and ok jan@
|
|
ok mlarkin@ kettenis@
|
|
then ran into the messaging being poor. Then I fixed the messages. But
there are two sub-cases of sp-not-MAP_STACK -- one at syscall time, and
another at regular userland trap (on some architectures), and I bungled
that messaging. Correct that now, while I look for yet another better way...
discovered by millert, who ran an pre-MAP_STACK binary.
|
|
like Intel does in their patches on githup. Also add a compiler
level memory barrier to the wbinvd instruction like Linux does.
OK mlarkin@ guenther@ kettenis@
|
|
Use install -F to instead of cp, for fsync(2). Coupled with the new
sync(8) in the reorder_kernel script, the window for a incomplete /bsd
file on-disk due to a crash has now shrunk substantially.
Discussion with kettenis, millert and tedu
|
|
ok deraadt@, mlarkin@
|
|
ok visa@
|
|
It doesn't matter in this case and reducing the number of PUSER makes
the scheduler logic easier to understand.
ok kettenis@, visa@
|
|
larger than 256KB not 128KB to cope with the 06-8e-09 microcode which is
currently 193KB.
Reported and tested by Paul de Weerd. Matches a diff from claudio@
|
|
Lookup the address that a syscall instruction is executed from, and kill
the process if that page is writeable. This brings an aspect of W^X
behaviour to W|X mappings (in JITs not yet adapted to W^X). The goal is
to remove simple attack methods and force use of ret2libc or other more
complicated means.
ok kettenis stefan visa
|
|
ok deraadt@
|
|
has broken the tree once again.
ok kettenis
|
|
ok mpi@
|
|
The APM spec defines an APM_UPDATE_TIME event that is meant to cause
the driver to rebase the system's wallclock against the RTC. The
event itself is apparently caused by occasional blackout periods where
interrupts cannot be delivered, which might cause the system to miss a tick.
The problem is that on systems where these events are frequent this
constantly erodes the system wallclock. The RTC is not the greatest
clock in the world so these systems are always playing catch-up.
ntpd(8) is a far better clock corrector than rebasing against the RTC,
so it should be safe to simply ignore the event. We continue to record
the event for userspace listeners, but we do not call inittodr(9) on
receipt of the event.
Linux has ignored the event since v2.6.21:
https://github.com/torvalds/linux/commit/c1d370e167d66b10bca3b602d3740405469383de#diff-d85b9a44da8e5dfb2fb1bcbd304c2a6c
Discovered by jcs@. Discussed a bit with jcs@, tedu@, deraadt@. Fix
tested by jcs@.
"I think we should ignore the event" deraadt@
|
|
ok deraadt@
|
|
|
|
when we have a serial console by introducing the notion of a "primary"
graphics device. The primary graphics device is the one set up and
used by firmware (BIOS, UEFI).
The goal is to make sure that wsdisplay0 and drm0 reliably attach to
the primary graphics device such that X works out of the box even
if you have multiple cards or if you are using a serial console.
This also fixes the situation where inteldrm(4) or radeondrm(4) would
take over the console on UEFI systems even if the kernel was booted
with a serial console.
ok jsg@
|
|
memcpy() correct behaviour. This also brings the bcopy() macro into line.
|
|
tightly-built ramdisk kernels, set the option in per-arch Makefile.inc
based upon SMALL_KERNEL
|
|
linux 4.19.34.
Adds support for more Intel hardware:
Broxton/Apollo Lake (was is_preliminary in 4.4)
Amber Lake (another Kaby Lake refresh)
Gemini Lake
Coffee Lake
Whiskey Lake
Cannon Lake (though no hardware with Intel graphics ever shipped)
Ice Lake (alpha support, hardware not released)
This does not add support for new radeon hardware on the AMD side as
newer radeons have a different kernel driver (amdgpu).
Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping and a bunch of other developers for testing.
|
|
|
|
details from the ELF header instead of faking it.
Proposal from mlarkin, tested on most architectures already
|
|
|
|
ok deraadt
|
|
that could leave `ddb_mp_mutex' locked if one CPU incremented
`db_active' while another CPU was in the critical section. When the race
hit, the debugger was unable to resume execution or switch between CPUs.
Race analyzed by patrick@
OK mpi@ patrick@
|
|
|
|
booting on 486s without cpuid. Reported by Falk Richter and diagnosed
by guenther@
|
|
* Replace unnecessary use of db_get_value() with direct access of
f_retaddr. The trace function assumes that the chain of frames
is good in terms of alignment and content.
* Replace the for loop with a while loop and drop the check
"frame != NULL" from the loop condition. The check is redundant with
the "!INKERNEL(frame)" condition. The code already assumes that the
initial frame is valid.
* Stop iteration if f_retaddr is a non-kernel address in order to
not save a user address at the end of the trace. This additionally
fixes a kernel crash that would happen if the user thread had
a broken frame pointer.
OK mpi@
|
|
|
|
no words or punctation were modified.
|
|
comparison instructions and switch statements are being traced. This mode will
be used during fuzzing to generate even more coverage. The same mode is also
supported by FreeBSD and Linux.
Thanks to jmc@ for improving the manual bits.
ok bluhm@ visa@
|
|
By default, nothing changes -- shutdown is initiated. But allows turning
power button into a sleep button if desired.
(grudging) ok from a few parties
|
|
We will still be able to run i386 guests on amd64 vmm.
Reasons to delete i386 vmm:
- Been broken for a while, almost no one complained.
- Had been falling out of sync from amd64 while it worked.
- If your machine has vmx, you most probably can run amd64, so why not run that?
ok deraadt@ mlarkin@
|
|
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@
|
|
|
|
for booting using large (64k) blocksize filesystems. ok tedu@
|
|
Otherwise we end up keeping file descriptor and inode related buffers
around, that are unnecessarily consuming memory.
ok deraadt@ patrick@
|
|
ok deraadt@
|
|
including cpu.h machine/intr.h etc without first including param.h when
MULTIPROCESSOR is defined.
ok visa@
|
|
This improves timekeeping on KVM guests as it runs much better than
the virtualized acpihpet or acpitimer timecounters and the invtsc is
not always available.
Many thanks to Janne Johansson, landry@, and benno@ for testing amd64/i386.
OK mlarkin@ phessler@
|
|
and .data segments that have the X (executable) flag set when using lld.
This doesn't result in those sections being mapped executable in the bsd
kernel, but it does result in the X flag being set on those sections in
the final kernel binary, which confuses some scanning tools for (ROP)
gadgets.
Fix this by tweaking the generated gapdummy.c file that is used for
building gap.o. It now defines the .rodata section using inline asm.
This also fixes .data as it will inherit its flags from .rodata.
ok deraadt@, mortimer@
|
|
LOADADDR(.text) is only available after the description of the text
section. Instead simply use ENTRY(start) like we do on amd64. The
bootloader strips the high bits from the entry point address already,
so using the virtual address as the entry point address works.
with/ok kettenis@
|
|
ok kettenis@
|
|
ok deraadt@, mlarkin@, visa@
|
|
have a PT_GNU_STACK segment and doesn't pad the bootblocks to a full page.
ok naddy@, help from guenther@
|