Age | Commit message (Collapse) | Author |
|
Double checked by kettenis@
Sorry for the time window with breakage visible on arm64 and riscv64. :-/
|
|
Erroneously dropped from the last elf_aux_info(3) diff I sent on tech@.
Lack of this chunk would affect arm64 and riscv64 as they're the two
architectures providing hwcap*.
Should have been ok kettenis@
|
|
method that matches the target state.
ok deraadt@
|
|
referenced.
ok deraadt@
|
|
Designed to let userland peek at AT_HWCAP and AT_HWCAP2 using an already
existing interface coming from FreeBSD. Headers bits were snatched from
there. Input & ok kettenis@
libc bump and sets sync will follow soon
|
|
Since vmm handles nested page faults in the vcpu run loop, trying
to avoid trips back to userland, it's possible for the thread to
move host cpus. vmm(4) already updates some local cpu state when
this happens, but also needs to update the host cr3 in the vmcs to
allow vmx to restore the proper cr3 value on the next vm exit.
Additionally, we should be flushing the ept cache on the new cpu.
If the single context flush is available, use that instead of the
global flush.
ok mlarkin@
|
|
achieve RC6 and save a significant amount of power for S0i.
ok jsg@
|
|
builder and avoids the ufs_inactive problems, bluhm hits panics on
shutdown and filesystem unmount on the regress testers.
We'll have to try the other approach of detecting the corrupted
vnode perhaps.
|
|
Use gre condition in conf/files for compiling netinet/ip_gre.c only
if needed. Remove #if NGRE > 0 from ip_gre.c that caused ramdisk
build to compile an empty C file.
OK kn@ deraadt@; input jsg@
|
|
The pipex code in gre_send() matches more or less what udp_send()
does. This has been MP safe for a long time. rip_send() is already
called with PR_MPSOCKET.
OK mvs@
|
|
in ip6_forward.c.
|
|
Forwarding IPv6 packets is slower than IPv4. Reason is that m_copym()
is done for every packet. Just in case we may have to send an ICMP6
packet, ip6_forward() creates a mbuf copy. After that mbuf cluster
is read only, so for the ethernet header another mbuf is allocated.
pf NAT and RDR ignores readonly clusters, so it also modifies the
potential ICMP6 packet.
IPv4 ip_forward() avoids all these problems by copying the leading
68 bytes of the original packets onto the stack. More is not need
for ICMP. IPv6 RFC 4443 2.4. (c) requires up to 1232 bytes in the
ICMP6 packet. This cannot be copied to the stack.
The reason for the difference in the standard seems to be that the
ICMP6 packet has to contain the full header chain. If we have a
simple TCP, UDP or ESP packet without chain, do a shortcut and just
preserve the header for the ICMP6 packet.
Small packets already use stack memory, large packets need extra
mbuf allocation. Now truncate ICMP6 packet to a reasonable length
if the original packets has a final protocol header directly after
the IPv6 header. List of suitable protocols contains TCP, UDP, ESP
as they cover the common cases and anything behind the header should
not be needed for path MTU discovery.
OK deraadt@ florian@ mvs@
|
|
It broke resume from hibernate. :(
|
|
All incpb locking has been converted to socket receive buffer mutex.
Per PCB mutex inp_mtx is not needed anymore. Also delete PRU related
locking functions. A flag PR_MPSOCKET indicates whether protocol
functions support parallel access with per socket rw-lock.
TCP is the only protocol that is not MP capable from the socket
layer and needs exclusive netlock.
OK mvs@
|
|
udp_send() and following udp{,6}_output() do not append packets to
`so_snd' socket buffer. This mean the sosend() and sosplice() sending
paths are dummy pru_send() and there is no problems to simultaneously
run them on the same socket.
Push shared solock() deep down to sesend() and take it only around
pru_send(), but keep somove() running unedr exclusive solock(). Since
sosend() doesn't modify `so_snd' the unlocked `so_snd' space checks
within somove() are safe. Corresponding `sb_state' and `sb_flags'
modifications are protected by `sb_mtx' mutex(9).
Tested and OK bluhm.
|
|
memory. This removes memory allocation from the resume-side of
device activation.
ok deraadt@
|
|
|
|
shared argument. This fixes a race condition where a message could overwrite
rtkep->msg of a previously scheduled task resulting in a refcounting error later
on causing the screen to stay dark after waking up from suspend.
ok kettenis@
|
|
The places in packet processing where ip_forwarding is evaluated
have been consolidated. The remaining pieces in pf test, ip input,
and icmp input do not need consistent information. If the integer
value is changed by another CPU, it is harmless.
The sysctl syscall sets the value atomically, so add atomic read
in network processing and remove the net lock in sysctl IPCTL_FORWARDING.
OK claudio@ mvs@
|
|
Based on a diff from Hector Martin for Asahi Linux.
ok patrick@, tobhe@
|
|
This was noticed by syzkiller and analyzed in isolaiton by mbuhl@
and visa@ two years ago. As the kernel has become more unlocked it
has started to appear more and was being hit regularly by jsing@
on the Go builder.
The problem was during reclaim of a inode the corresponding vnode
could be picked up by a vget() by another thread while the inode
was being cleared out in the ufs_inactive routine and the thread running
ufs_inactive slept for i/o. When raced the vnode would then not have
zero use count and would not be cleared out on exit from ufs_inactive
with a dead/invalid vnode being used.
While this could get "fixed" by checking for the race happening
and trying again in the inactive routine, or by adding "yet another
visible vnode locking flag" we choose to add a vdoom() api for the
moment that allows the caller to block future attempts to grab this
vnode until it is cleared out fully with vclean.
Teste by jsing@ on the Go builder and seems to solve the issue.
ok kettenis@, claudio@
|
|
From Alex Deucher
1ba66b121100862fc208848264821a788a79317f in linux-6.6.y/6.6.39
05d9e24ddb15160164ba6e917a88c00907dc2434 in mainline linux
|
|
From John Schoenick
33de7c47a19ab1165ee2404f197de4f7e4848f23 in linux-6.6.y/6.6.39
26746ed40bb0e4ebe2b2bd61c04eaaa54e263c14 in mainline linux
|
|
From Alex Deucher
004b7fe6ca8c709e8431b400c3082040b80e59cf in linux-6.6.y/6.6.39
d0417264437a8fa05f894cabba5a26715b32d78e in mainline linux
|
|
From Jesse Zhang
3fac5aecb59336c9ae808a2cf4733f9f185e3fa2 in linux-6.6.y/6.6.39
ea686fef5489ef7a2450a9fdbcc732b837fb46a8 in mainline linux
|
|
From Tim Huang
7e0fbceae1e671af9d91e338cc8608c9bfb7d2f1 in linux-6.6.y/6.6.39
9a5f15d2a29d06ce5bd50919da7221cda92afb69 in mainline linux
|
|
From Alex Hung
8e5cbc820ab4a0029e0765b47cb2b38354b02527 in linux-6.6.y/6.6.39
f95bcb041f213a5da3da5fcaf73269bd13dba945 in mainline linux
|
|
From Alex Hung
95ad20ee3c4efbb91f9a4ab08e070aa3697f5879 in linux-6.6.y/6.6.39
1357b2165d9ad94faa4c4a20d5e2ce29c2ff29c3 in mainline linux
|
|
From Alex Hung
96bf81cc1bd058bb8af6e755a548e926e934dfd1 in linux-6.6.y/6.6.39
5396a70e8cf462ec5ccf2dc8de103c79de9489e6 in mainline linux
|
|
From Alex Hung
9933eca6ada0cd612e19522e7a319bcef464c0eb in linux-6.6.y/6.6.39
59d99deb330af206a4541db0c4da8f73880fba03 in mainline linux
|
|
From Ma Jun
e55077badb9054630856cbefc099ad148a446648 in linux-6.6.y/6.6.39
2e55bcf3d742a4946d862b86e39e75a95cc6f1c0 in mainline linux
|
|
From Jesse Zhang
855ae72c20310e5402b2317fc537d911e87537ef in linux-6.6.y/6.6.39
88a9a467c548d0b3c7761b4fd54a68e70f9c0944 in mainline linux
|
|
From Ma Jun
646e13f0a65b1930a4fa838f31bf763dbb4307a3 in linux-6.6.y/6.6.39
60c448439f3b5db9431e13f7f361b4074d0e8594 in mainline linux
|
|
In sysctl_int_bounded() use atomic operations to load, store, or
swap integer values. By using volatile pointers this will result
in a single assembly instruction, no matter how over optimizing
compilers will become. Note that this does not solve data dependency
problems, nor MP problems in the kernel code using these integers.
For full MP safety additional considerations, memory barriers, or
locks will be needed where the values are used. But for simple
integer in- and output volatile is enough. If new and old value
pointers are given to sysctl, atomic swapping guarantees that
userlands sees the same old value only once. There are more
sysctl_int() functions that have to be adapted.
OK deraadt@ kettenis@
|
|
warning introduced by a recent commit to drm_fbdev_dma.c.
ok jsg@
|
|
ok patrick@, deraadt@
|
|
|
|
machines. The shipped hardware containing ath11k and ath12k WiFi cards all
need to have 32-bit DMA constraints enforced.
ok kettenis@
|
|
Similar to the NX-bit apply the C-bit to the PTEs built by locore0.
Right now, pg_crypt is initialized to 0, so nothing will change.
from hshoexer@; OK mlarkin@
|
|
OK mpi@
|
|
idle power usage of the Vivobook S15 by almost 50%.
ok patrick@
|
|
efi(4) such that we can access EFI variables through ioctls on /dev/efi.
ok patrick@
|
|
Forgot `cvs add` and sys/dev/vmm/vmm.h changes.
|
|
from NetBSD's if_iavf.c r1.1
|
|
Makes as much of the core of vmd mi, pushing x86-isms into separate
compilation units. Adds build logic for arm64, but no emulation
yet. (You can build vmd, but it won't have a vmm device to connect
to.)
Some more cleanup probably needed around interrupt controller
abstraction, but that can come as we implement more than the i8259.
ok mlarkin@
|
|
from NetBSD's if_iavf.c r1.2
|
|
Remove #if notyet/#endif chunk that references the never-defined STATFS_SOFTUPD.
ok jsg@
|
|
cVS: ----------------------------------------------------------------------
|
|
The C-bit in a page table entry is used by a SEV guest to specify,
which pages are to be encrypted and which not. The latter is needed
to share pages with the hypervisor for virtio(4).
The actual position of the C-bit within a PTE is CPU implementation
dependend and needs to be determined dynamically at system boot.
The position of the C-bit also determines the actual size of page
frame mask. This will be provided by a separate change.
To be able to use the same kernel as both host and guest, the C-bit
is provided as variable similar to the NX-bit. Same holds for the
page frame masks.
Right now, pg_crypt is set to 0, pg_frame an pg_lgframe to PG_FRAME
and PG_LGFRAME respectively. Thus the kernel works as a host system
same as before.
Also introduce a PMAP_NOCRYPT flag. A guest will use this with
busdma to establish unencrypted mappings that can be shared with
the hypervisor.
from hshoexer@; OK mlarkin@
|
|
the kernel lock instead, as done in if_ixl.c r1.84.
from Yuichiro NAITO
|