Age | Commit message (Collapse) | Author |
|
|
|
Use CP0 Count as a basis. Also take noise from virtual memory activity
by including BadVAddr.
OK deraadt@ dlg@
|
|
rnd.c uses nanotime to get access to some bits that change quickly
between events that it can mix into the entropy pool. it doesn't
use nanotime to get a monotonically increasing set or ordered and
accurate timestamps, it just wants something with bits that change.
there's been discussions for years about letting rnd use a clock
that's super fast to read, but not necessarily accurate, but it
wasn't until recently that i figured out it wasn't interested in
time at all, so things like keeping a fast clock coherent between
cpu cores or correct according to ntp is unecessary. this means we
can just let rnd read the cycle counters on cpus and things will
be fine. cpus with cycle counters that vary in their speed and
arent kept consistent between cores may even be desirable in this
context.
so this is the first step in converting rnd.c to reading cycle
counter. it copies the nanotime backend to each arch, and they can
replace it with something MD as a second step later on.
djm@ suggested rnd_messybytes, but we landed on cpu_rnd_messybits.
thanks to visa for his eyes.
ok deraadt@ visa@
deraadt@ says he will help handle any MD fallout that occurs.
|
|
conversion steps). it only contains kernel prototypes for 4 interfaces,
all of which legitimately belong in sys/systm.h, which are already included
by all enqueue_randomness() users.
|
|
Nothing uses the header anymore.
OK deraadt@ mpi@
|
|
|
|
If loadrandom() succeeds, set RB_GOODRANDOM in boothowto.
To enable fchmod(), disk_open() has to mount the filesystem in writable
mode. This is tricky because the filesystem might be unclean. Hence the
code has to use MNT_FORCE.
Input and OK deraadt@
|
|
Load the kernel image from the filesystem upfront in rdboot and pass
the loaded image to octboot(4)'s kexec call in a memory buffer. As a
result, octboot(4) does not rely on a mounted filesystem.
OK deraadt@
|
|
|
|
OK deraadt@
|
|
The data are static but they introduce differences between systems.
OK deraadt@
|
|
|
|
/dev/fdt.
ok patrick@, visa@
|
|
bus_space_read_region_n, bus_space_write_region_n and
bus_space_set_region_n functions were all broken.
Same fix as arm64; Thanks to patrick@ for noting that mips64 had the same
code.
ok visa@
|
|
|
|
i was lazy and just put them at the end of the existing set. fyi,
i think major 51 is free on all archs if anyone is looking for
another one.
ok claudio@
|
|
The design is fairly simple: events, in the form of descriptors on a
ring, are being produced in any kernel context and being consumed by
a userland process reading /dev/dt.
Code and hooks are all guarded under '#if NDT > 0' so this commit
shouldn't introduce any change as long as dt(4) is disable in GENERIC.
ok kettenis@, visa@, jasper@, deraadt@
|
|
OK mpi@
|
|
While FIDO/U2F keys were already supported by the generic uhid(4)
driver, this driver adds the first step to tighten the security of
FIDO/U2F access. Specifically, users don't need read/write access to
all USB/HID devices anymore and the driver also improves integration
with pledge(2) and unveil(2): It is pledge-friendly because it doesn't
require any ioctls to discover the device and unveil-friendly because
it uses a single /dev/fido/* directory for its device nodes.
It also allows to support FIDO/U2F in firefox without further
weakening the "sandbox" of the browser. Firefox does not have a
proper privsep design and many operations, such as U2F access, are
handled directly by the main process. This means that the browser's
"fat" main process needs direct read/write access to all USB HID
devices, at least on other operating systems. With fido(4) we can
support security keys in Firefox under OpenBSD without such a
compromise.
With this change, libfido2 stops using the ioctl to query the device
vendor/product and just assumes "OpenBSD" "fido(4)" instead. The
ioctl is still supported but there was no benefit in obtaining the
vendor product or name; it also allows to use libfido2 under pledge.
With feedback from deraadt@ and many others
OK kettenis@ djm@ and jmc@ for the manpage bits
|
|
|
|
inspect the memory layout that the firmware has created. It is
especially useful for UEFI debugging.
OK deraadt@ kettenis@
|
|
and not just ".openbsd.randomdata.retguard". Accept both in the kernel
ldscripts so that they're placed together between the __retguard_{start,end}
symbols.
Similarly, match not just ".openbsd.randomdata" but also
".openbsd.randomdata.*" to pick up other random (pun intended) items.
While here, stub in those retguard bits into all the ldscripts.
ok deraadt@
|
|
retguard and similar when profiling. However, that missed all the .S files,
as ${PROF} wasn't added when ${NORMAL_S} was converted from direct invocation
of ${AS} to instead use ${CC}. Similarly, mcount.o still had retguards
as it cannot be built with -pg. So: pass ${PROF} when compiling .S files,
and compile "no profiling" files with -fno-ret-protector on archs with
retguard.
feedback and ok mpi@ mortimer@
|
|
This network driver covers higher-end models of the OCTEON III family.
They have a modified design whose interface is not compatible with
the lower-end models or earlier chip generations.
The code is still a work in progress. However, it is capable enough
to make the SGMII port functional on the CN7360.
No objection from deraadt@
|
|
it larger than RC4STATE. A long discussion ensued. In conclusion all
entropy inputs are either satisfactory enough, or just as shitty at 512.
|
|
section, which has grown a fair bit with the introduction of retguard.
Mortimer discovered the repeated 512-byte sequence as retguard keys, and
this resolves the issue. (Chacha does not fit on the media, so 1.5K early
drop RC4 is hopefully sufficient in our KARL link universe)
Version crank the bootblocks. sysupgrade -s will install new bootblocks.
ok djm mortimer
|
|
|
|
|
|
|
|
drivers is gross. discussed with visa.
|
|
OK deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of this piece of code is to facilitate the use of fdt.
|
|
|
|
|
|
|
|
|
|
of soft interrupts are lower than priorities of hard interrupts.
This allows the delivery of hard interrupts while soft interrupts
are masked.
|
|
|
|
|
|
or sending an IPI.
|
|
|
|
approach was not right, and there is still room for improvement.
OK deraadt@
|
|
|
|
were free after the kernel was loaded. The memory occupied by the kernel
image is not included. To let libkvm access the image through /dev/kmem,
return true from is_memory_range() if the physical address is within
the kernel.
|