Age | Commit message (Collapse) | Author |
|
data from struct process anymore. This changes how siginfo and onstack
are accessed and make sendsig() more MP friendly.
With and OK semarie@ OK kettenis@
|
|
On the Zynq-7000, the DMA constraint has to be adjusted because many
bus masters are unable to access the lowest part of RAM.
OK patrick@ kettenis@
|
|
ok kettenis
|
|
|
|
|
|
This comes from NetBSD:sys/dev/ic/mb89352.c fix by tsutsui:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/mb89352.c.diff?r1=1.57&r2=1.58&f=h
Tested on LUNA-88K2 by me.
|
|
|
|
This driver provides support for battery chargers connected to GPIO pins,
such as those found on the Pinebook Pro.
OK kettenis
|
|
This driver provides support for LEDs connected to GPIO pins,
such as those found on the Pinebook Pro.
OK kettenis
|
|
- Use of goto will skip zeroing of 88110-specific comparison bits (bitn
12-17) in some cases. (Move their zeroing closer to the point of
their computation.)
- Computing of the "in interval" bits should not be performed when the
S2 operand is negative.
Spotted by Tetsuya Isaki (nono project), suggested diff and description
from Miod Vallat. Tested on the real hardware by Isaki and me.
|
|
This is possible now that pmap_extract() is serialized with pmap_remove().
ok sthen@, deraadt@
|
|
Tested by me on 1bpp framebuffer got recently.
|
|
remove the half-finished code to support the SV48 MMU page table layout.
Currently there is no hardware that supports that model and I don't expect
any hardware that does support it to show up anytime soon.
ok mlarkin@
|
|
ok mlarkin@
|
|
while walking the page tables.
ok deraadt@
|
|
while walking the page tables.
ok mpi@, deraadt@
|
|
Modelled after the arm implementation. The first consumer would be
__builtin___clear_cache() in libcompiler_rt.
Input from kettenis@ and deraadt@, ok kettenis@
|
|
ok deraadt
|
|
After fixing previous syzbot issues related to lock contention, the reproducer code managed to hit an issue where it can exhaust kernel memory by allocating vcpus. Since each vcpu (regardless if it's SVM or VMX-capable) requires wiring some number of pages of memory, it was possible to starve other parts of the kernel.
This change limits the total number of vcpus to 512, a conservative number given vmm(4) only supports single vcpu guests at the moment.
ok mlarkin@
|
|
pmap_extract() has to lock user pmap to prevent concurrent pruning
of the page table. The kernel pmap is exempt from this because it uses
a fixed page table structure.
|
|
|
|
are ongoing.
|
|
walking the page tables and another thread calling pmap_remove() that ends
up removing a page table page.
tested by sthen@
ok deraadt@, mpi@
|
|
code to help making the transition. This will be removed in a few weeks.
|
|
to make the arm64 kernel link when compiled with -fno-inline.
ok kettenis@ mpi@
|
|
This prevents possible corruption due to a concurrent access between
pmap_growkernel() & pmap_create/pmap_destroy().
Discussed with and ok kettenis@
|
|
Similar to the recent change by mpi in revision 1.288, commitid:
A4zhVhOoHAIpRGBJ, raise the ipl level of the vm_pool to IPL_MPFLOOR
to prevent lock ordering issues.
ok mpi@
|
|
Syzbot found 3 issues related to the new vcpu lock. This diff adds
a write lock to vm_rwregs (needed on VMX as vmread instructions
require taking ownership of the vcpu to load the VMCS) and prevents
locking the vcpu in vm_run if we fail the cas operation for toggling
vcpu state.
In the future, we can push the locking in vm_rwregs on AMD SVM
systems.
The panics in question:
panic: rw_enter: vcpulock locking against myself
panic: lock (rwlock) vcpulock not locked
panic: vcpulock: lock not held
Reported-by: syzbot+1dab11e14aa7a159cadf@syzkaller.appspotmail.com
Reported-by: syzbot+36244e105daffa1a81b6@syzkaller.appspotmail.com
Reported-by: syzbot+c78b5644c7dc3d9b689a@syzkaller.appspotmail.com
ok mlarkin@
|
|
Some pmaps (x86, hppa) and the buffer cache rely on UVM objects to allocate
and manipulate pages. These objects should not be manipulated by uvm_fault()
and do not currently require the same locking enforcement.
Use the dummy pagers to explicitly document which UVM functions are meant to
manipulate UVM objects (uobj) that do not need the upcoming `vmobjlock' and
instead still rely on the KERNEL_LOCK().
Tested by many as part of a larger diff.
ok kettenis@, beck@
|
|
IBRS feature need an lfence instruction after every near ret. Place
them after all functions in the kernel which are implemented in
assembler. Change the retguard macro so that the end of the lfence
instruction is 16-byte aligned now. This prevents that the ret
instruction is at the end of a 32-byte boundary. The latter would
cause a performance impact on certain Intel processors which have
a microcode update to mitigate the jump conditional code erratum.
See software techniques for managing speculation on AMD processors
revision 9.17.20 mitigation G-5.
See Intel mitigations for jump conditional code erratum revision
1.0 november 2019 2.4 software guidance and optimization methods.
OK deraadt@ mortimer@
|
|
since amd64 is compiled with -msave-args we have all arguments available to print and
there's no reason to limit this to six.
discussed with kettenis@
|
|
this allows us to dynamically trace function boundaries with btrace by patching
prologues and epilogues with a breakpoint upon which the handler records the data,
sends it back to userland for btrace to consume.
currently it's hidden behind DDBPROF, and there is still a lot to cleanup and
improve, but basic scripts that observe return codes from a probed function
work.
from Tom Rollet, with various changes by me
feedback and ok mpi@
|
|
ok mlarkin@ kettenis@
|
|
ok kettenis@ some time ago
|
|
The RISC-V doesn't seem to provide hardware support for generic purpose
single stepping, and we're not emulating single stepping for riscv64
like we do for alpha or mips64. Hiding PT_STEP makes it possible to run
inferior processes with a wip ports/devel/gdb update.
ok kettenis@
|
|
The code is already there, it was unreachable because of this #if 0.
ok kettenis@
|
|
We need the kernel lock before calling some uvm functions. Fixes a
panic reported by syzbot.
Reported-by: syzbot+dd7a70eaf794705db27e@syzkaller.appspotmail.com
ok mlarkin@
|
|
|
|
|
|
|
|
of TCR_EL1 in locore to make clear we use 4K pages for both userland and
the kernel.
ok patrick@
|
|
Adds support for Aquantia AQC1xx family of PCIe ethernet adapters. This
driver supports 1Gbps through 10Gbps modes of operation based on the
hardware and media/switch capabilities.
The initial code was ported from NetBSD, with jmatthew@ finishing up
the Tx/Rx ring support and interrupt handler routine.
The driver only supports devices using firmware V2.
This diff enables aq(4) on riscv64 and amd64, the only platforms where
I have tested the driver, but it likely works on other architectures
as well.
|
|
ok kettenis@
|
|
Syzbot might complain about "new" panics, but to help debug a recent
report it helps to have unique rw lock names.
"sounds good to me" @mlarkin
|
|
ok patrick@
|
|
Reported-by: syzbot+c8905496cd61610f77e2@syzkaller.appspotmail.com
ok mlarkin@
|
|
to stop speculation. This seems to be necessary when the branch
predictor hits the ret for the first time. In their white paper
to mitigate speculation attacks, AMD's retpoline example has an
explicit lfence. Adjust our retpoline assembly macro in the kernel.
OK guenther@ mortimer@ deraadt@
|
|
On Intel VMX hosts, when a guest migrates cpus, VMCS state needs
to be flushed to physical memory before being reloaded on the new
cpu. This diff adds a new ipi to allow a guest resuming on a new
cpu to signal to the old that it needs to vmclear.
To better surface the potential race conditions, unlock the kernel
after handling the ioctl to vmm and simplify the run loops for both
vmx and svm. This requires a new vcpu lock.
Tested by some on tech@. "go for it" @mlarkin
|
|
delay func. Otherwise simply delay for a second to calibrate the LAPIC.
Install the lapic delay func only if we were using the i8254 before as
delay func.
Discussed with the hackroom
ok kettenis@
|
|
a working delay func ready before the first occurence of delay(). This is
necessary on Hyper-V Gen 2 VMs where we don't use the TSC.
Discussed with the hackroom
ok kettenis@
|