Age | Commit message (Collapse) | Author |
|
Discussed with kettenis@
|
|
doesn't actually spin up any secondary CPUs, it does run. Mostly a cleanup
of <machine/cpu.h> along the lines of what I did earlier on arm64. Makes
armv7 use the MI mplock implementation and implements copyin32.
ok patrick@
|
|
arm_intr_* prefix with fdt_intr_*.
ok kettenis@
|
|
instead of passing sendsig() the code+type+val, pass a siginfo_t*
to copy from. Eliminate the indirection through struct emul for
sendsig(); we no longer have a SunOS4-compat version of sendsig()
ok deraadt@
|
|
ok kettenis@
|
|
extension to the GIC controller, which is represented as subnode in the
device tree. There can be multiple GICv2Ms, so it makes sense to attach
those to ampintc(4) as some kind of simplebus. The GICv2M is simply an
interrupt generator that can be used by PCIe devices to ring the door
bell. There is no need for further configuration, we only need to find
out which SPIs we are allowed to use for MSI and to register an edge
triggered interrupt on a (randomly) allocated SPI.
Implement support for interrupt types. The GIC only seems to support
level triggered active-high or egdge triggered low-to-high interrupts.
We currently always configure them to be level triggered, which is a
sane default for most controllers. Since MSI interupts on the GIC are
edge triggered, we need to be able to parse the type information and to
configure the interrupt correspondingly.
ok kettenis@
|
|
|
|
ok phessler@, guenther@
|
|
Fixes the random crashes in sh(1).
ok guenther@
|
|
we can be sure signals posted from userret() are based on the correct
information
ok kettenis@
|
|
From drahn@, ok guenther@
|
|
ok deraadt@
|
|
that OpenBSD runs on.
ok patrick@
|
|
ok deraadt@
|
|
ok patrick@
|
|
ok visa@, patrick@
|
|
of fdt-enabled platforms in sync.
OK deraadt@
|
|
syscall) confirm the stack register points at MAP_STACK memory, otherwise
SIGSEGV is delivered. sigaltstack() and pthread_attr_setstack() are modified
to create a MAP_STACK sub-region which satisfies alignment requirements.
Observe that MAP_STACK can only be set/cleared by mmap(), which zeroes the
contents of the region -- there is no mprotect() equivalent operation, so
there is no MAP_STACK-adding gadget.
This opportunistic software-emulation of a stack protection bit makes
stack-pivot operations during ROPchain fragile (kind of like removing a
tool from the toolbox).
original discussion with tedu, uvm work by stefan, testing by mortimer
ok kettenis
|
|
a common bus space tag that can be used for early console attachment.
ok kettenis@
|
|
Extend the logic already present for panic() to any DDB-related
operation such that if ddb(4) is entered because of a fault or
other trap it is still possible to call 'boot reboot'.
While here stop printing splassert() messages as well, to not fill
the buffer.
ok visa@, deraadt@
|
|
ok visa@, patrick@
|
|
that it gives us a read-only data section. In addition the linker
script is now easily diffable to arm64 and we also stop mapping some
unnecessary space before the kernel.
Prompted by deraadt@
ok kettenis@
|
|
definitions are already found in param.h
ok jsg
|
|
needs (looking at you sgi, but others required this before). This is for
the circumstances we need pagesize known at compile time, not getpagesize()
runtime. Use it for malloc storage sizes, for shm, and to set pthread stack
default sizes. The stack sizes were a mess, and pushing them towards
page-aligned is healthy move (which will also be needed by the coming
stack register checker)
ok guenther kettenis, discussion with stefan
|
|
did the big EABI switch. Do it now before we get into trouble with using
floating-point and vector instructions that actually require things to be
properly aligned.
This breaks the ABI. In particular, file descriptor passing will be
broken if kernel and userland are not in sync. Upgrading from a snap is
highly recommended.
ok otto@, patrick@, jsg@, phessler@, deraadt@
|
|
kernels wouldn't boot because the random order in which we happened to link
it would cause these symbols to be misaligned.
Thanks to Brandon Bergren for figuring out the problem.
|
|
|
|
like we already do in the code that flushes the BTB.
ok jsg@
|
|
The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.
No objection from millert@, ok tedu@, bluhm@
|
|
stack frame format has changed. Apparently AAPCS doesn't specify
at all what a stack frame looks like. We end up with much simpler
code, but also with a lot less information in the trace.
ok kettenis@
|
|
Tested by jsg@, ok patrick@
|
|
especially makes it easier to diff against our other linker scripts.
ok jsg@
|
|
get an alignment fault while copying the data. Turns out that since we
have .rodata in the text segment, it's very easily possible that etext
remains unaligned. Work around this by word-aligning etext. The next
step is to split .rodata out of the text segment.
ok deraadt@
|
|
and tail and cat(1) it together. It was maybe needed when ports needed
different contents, but now it's just a headache.
ok deraadt@
|
|
ok kettenis@
|
|
This allows us to use floating-pointer and vector instructions in userland
code. The current implementation assumes all 32 VFP registers are present.
This should be the case on all armv7 hardware currently supported by
OpenBSD.
ok patrick@
|
|
state.
ok patrick@
|
|
attacks. OpenBSD/armv7 is already in pretty good shape as we have always
been flushing the branch predictor cache on context switches. This diff adds
additional flushes to page faults in kernel address space. The impact on
performance should be minimal as these page faults should only happen when
userland (deliberately or accidentally) tries to access kernel addres space
which would lead to a fatal signal (SIGSEGV or SIGBUS).
Loosely based on changes made by Marc Zyngier in Linux and based on
information in Arm Trusted Firmware Security Advisory TFV 6.
Note that for Cortex-A15 (and Cortex-A72) you will need firmware that sets
the ACTRL[0] bit for this diff to be effective. Also note that with this
diff Cortex-A57 is still vulnerable.
ok jsg@
|
|
OK mpi@
|
|
ok millert@ krw@
|
|
to SMC64 functions don't get truncated. Implement support for the CPU_ON
call.
|
|
implement hw.cpuspeed using the clock framework.
ok patrick@
|
|
the memory devices (/dev/null, /dev/zero, etc) need to permit them.
problem noted, tweak, and testing by jeremy@
ok deraadt@
|
|
for blocks re-fetchable from the filesystem. However at reboot time,
filesystems are unmounted, and since processes lack backing store they
are killed. Since the scheduler is still running, in some cases init is
killed... which drops us to ddb [noted by bluhm]. Solution is to convert
filesystems to read-only [proposed by kettenis]. The tale follows:
sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which
completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT()
with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a
copyin() late... so store the sizes in vfsconflist[] and move the copyin()
to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill
legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is
sharp and rusty especially wrt softdep, so fix some bugs adn add
~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help,
so tie them to &dead_vnops.
ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but
this issue is seperate and will be dealt with in time.
couple hundred reboots by bluhm and myself, advice from guenther and
others at the hut
|
|
ok patrick@, deraadt@
|
|
ok deraadt@
|
|
gcc is documented as ignoring whitespace in any position but the first
clang gives "error: invalid output constraint '=r ' in asm".
|
|
|
|
pthread_exit from libpthread to libc, along with low-level bits to
support them. Major bump to both libc and libpthread.
Requested by libressl team. Ports testing by naddy@
ok kettenis@
|
|
of the /chosen node in the device tree to decide whether the framebuffer
should be used as the console device. Most, if not all, machines will
have that set to use a serial console and there is no easy way yet to
change that.
ok jsg@
|