Age | Commit message (Collapse) | Author |
|
This will be used for sysconf(3) and getconf(1) to handle _POSIX_IPV6
without opening a socket.
OK sthen@ deraadt@
|
|
If uvm_pagermapin() fails that doesn't mean the emergency pages aren't
in use. In OOM situation, a single segment can still be held by an
asynchronous write so the second call to uvm_pagermapin() can fail.
|
|
Change a panic string to make the text locatable in the code since there
is another panic with the same text. Helps debugging when the line number
information isn't available.
no functional change.
ok dv
|
|
Unlocking most of vmm last year at k2k21 exposed bugs related to
lifetime management of vm and vcpu objects.
Add reference counts to make sure we don't attempt to teardown vcpu
or vm related objects while a thread is holding a reference. This
also reduces abuse of rwlocks originally intended to protect the
linked lists cleaning things up quite a bit. While here, also
document assumptions on how struct members are protected for the
next brave soul wander in.
ok mlarkin@
|
|
Non-EPT pmaps were picking up old EPTPs from previous owners.
This doesn't cause any problems but makes debugging harder.
ok dv@
|
|
and ip6_unknown_opt(). Instead of having dangling pointer in caller,
use m_freemp() to set mbuf to NULL.
OK sashan@
|
|
remove the route from the list. In rtable_match() check if the
route entry is NULL.
discussed with mpi@ jmatthew@ claudio@; OK mpi@
|
|
ok claudio@ mpi@
|
|
This comment hasn't been relevant for at least 11 years as there's
no such lock. NetBSD removed the comment 11 years ago. No functional
change.
Discussed with mlarkin@
|
|
from:" info
Cluebat from miod@
|
|
Protect the ps_pledge/ps_execpledge fields with ps_mtx. Shuffle the
code to call unveil_destroy() outside the critical section. Only writes
to those fields are protected. Since we may only remove bits from those
fields, garbage values should do no harm even when a read crosses
a write on 32 bits systems.
Input claudio@ kettenis@ deraadt@, ok deraadt@
|
|
It doesn't make sense to wrap this function with the kernel lock only
when the syscall to be executed is itself locked. Instead
pledge_syscall() should be always safe to execute without the kernel
lock.
"looks good" kettenis@, ok deraadt@
|
|
This prevents the compiler from reloading a possibly different value
from memory. Even if it doesn't matter in this code it's just better
practice. Discussed with kettenis@ and deraadt@, ok deraadt@
|
|
allows to set the mbuf to NULL and keep it consistent in the caller,
instead of having dangling pointer after free.
OK sashan@
|
|
we're deep the code will SSTOP and sleep and then on wakeup we need to
recheck the deep conditions.
Issue analyzed and OK by mpi@
Reported-by: syzbot+f7634539e73108238c2a@syzkaller.appspotmail.com
|
|
From Ville Syrjala
0895a2235bae6671077c2de94268cccc346005d6 in linux 5.15.y/5.15.51
13bd259b64bb58ae130923ada42ebc19bf3f2fa2 in mainline linux
|
|
fixes names of some encoders
|
|
exclusive. Do the pppoe(4) input within netisr handler with exclusive
netlok held and remove kernel lock hack from ether_input().
This is the step back, but it makes ether_input() path better then it
is now.
Tested by Hrvoje Popovski.
ok bluhm@ claudio@
|
|
Otherwise we use `ipsecflowinfo' obtained from previous packet.
ok claudio@
|
|
UART found on AMD's Ryzen Embedded V1000 family) as an early console.
This requires additional parameters to be passed by the bootloader to the
kernel so it changes the struct for the BOOTARG_CONSDEV boot argument.
The old struct will still be supported until OpenBSD 7.3 has been released
such that new kernels boot with the old bootloader.
ok anton@, deraadt@
|
|
below 4G by using the direct map.
ok anton@, deraadt@
|
|
ok deraadt@ kettenis@
|
|
ok miod@
|
|
V1000 SoCs.
ok anton@
|
|
that we load the kernel into doesn't work. But changing it to EfiLoaderCode
makes it work. Presumably the firmware creates a mapping with executable
permissions in that case, which is obviously needed for executing kernel
code.
ok patrick@, mlarkin@
|
|
host bridges. Add support for this.
ok mlarkin@, patrick@
|
|
If no memory was immediately available to decrypt (bounce) a page from swap
an error was returned to the fault handler which would result in processes
dying when a lot of memory pressure was applied to a system.
Note that reading from swap is always done synchronously.
ok beck@, kettenis@
|
|
Instead of starting with the first page on the inactive list pick the first
one that fits in the range of a given pmemrange region.
Fix an issue where the page daemon would be hogging a CPU without freeing any
page because the global limits are satisfied.
The algorithm could certainly be revisited, the LRU is not really working and
there is a huge delay before recovering when the first pages need to be swapped and the system is in OOM situation but at least there is no starvation and the
system now recovers.
ok beck@, kettenis@
|
|
ok beck@, kettenis@
|
|
Currently swap encryption is not done in place and some architectures need to
bounce pages into a DMA-reachable region for I/Os, for that uvm_swap_io() needs
to allocate at most 64K to write a swap cluster to disk. Pre-allocate such
amount of memory to be sure the page daemon can make progress in OOM situation.
Also introduce a sleeping point to wait for the previous asynchronous I/O
holding the pre-allocated pages, there's no point in building clusters if no
progress can be made.
ok beck@, kettenis@
|
|
This ensures uvm_swap_io() can succeeds even in OOM situations because two
uvm_pagermapin() allocations, requiring a segment each, are needed to bounce
or encrypt a swap cluster.
ok beck@, kettenis@
|
|
is later on interpreted as a com_softc pointer. This is not a problem in
practice as a com_softc structure is the first member of the
com_acpi_softc structure.
Using the actual types consistently yields a better symmetry in my
opinion between registering the interrupt and the corresponding
interrupt handler.
ok deraadt@ kettenis@
|
|
routines.
ok deraadt@ kettenis@
|
|
pluart_param().
|
|
Reported by Hrvoje Popovski. ok bluhm@
|
|
OK miod@ mpi@
|
|
This really pointed out that the place syncookies were hooked in was almost,
but not completely right. The way it was the special case for tcp fast port
reuse in pf_test_state wasn't hit, because the first packet
hitting that was the ACK from the peer finishing the 3WHS, and the
reconstructed SYN came after. We're now doing pf_find_state (and *only* that)
first, then syncookies, then going on so that the old state is thrown away
properly and we get a new one with the sequence number modulator set up
correctly
Bonus: -11 lines of code
tracked down (that took a while) + fixed under contract with Hush
Communications Canada; special thanks to Lyndon
ok sashan
|
|
|
|
|
|
Previously we looked at cpuid 0x80000005 for L1/TLB details
which Intel documents as reserved.
And cpuid 0x80000006 for L2 details.
Intel also encode cache details in cpuid 4.
AMD have mostly the same encoding with cpuid 0x8000001d
0x80000005/0x80000006 is used as a fallback.
Prompted by Intel Tiger Lake and Alder Lake machines
returning an associativity value of 7 from cpuid 0x80000006.
The previous code would print "disabled L2 cache", 7 is
documented by Intel as "See CPUID leaf 04H, sub-leaf 2".
tested by Hrvoje Popovski on EPYC 7413, and myself on various machines
ok mlarkin@
|
|
This will help dealing with error cases.
No functionnal changes.
|
|
only matter on entry and the pr->ps_single check is done in the while body.
With and OK mpi@
|
|
Fix an assertion reported by gkoehler@.
ok kettenis@
|
|
Those pages should already be entered, this speeds up CoW faults.
Stolen from NetBSD.
ok miod@, kettenis@
|
|
operations.
OK mvs@
|
|
supported interface.
pointed out by bluhm@
OK bluhm@
|
|
tracepoint for each type of refcnt we have. As a start, add inpcb
and tdb refcnt. When the counter changes, btrace may print the
actual object, the current counter, the change value and optionally
the stack trace.
discussed with visa@; OK mpi@
|
|
only sets its value. It is more obvious to return the next protocol
or IPPROTO_DONE to signal error. All IP protocol functions do that.
OK sashan@ florian@
|
|
ok jsg@
|
|
ok jsg@
|