freebsd-skq/sys
Justin Hibbits 8b079fcca7 powerpc/booke: Fix TLB1 entry accounting
It's possible, with per-CPU mappings, for TLB1 indices to get out of sync.
This presents a problem when trying to insert an entry into TLB1 of all
CPUs.  Currently that's done by assuming (hoping) that the TLBs are
perfectly synced, and inserting to the same index for all CPUs.  However,
with aforementioned private mappings, this can result in overwriting
mappings on the other CPUs.

An example:

    CPU0                    CPU1
    <setup all mappings>    <idle>
        3 private mappings
      kick off CPU 1
                            initialize shared mappings (3 indices low)
                            Load kernel module, triggers 20 new mappings
      Sync mappings at N-3
                            initialize 3 private mappings.

At this point, CPU 1 has all the correct mappings, while CPU 0 is missing 3
mappings that were shared across to CPU 1.  When CPU 0 tries to access
memory in one of the overwritten mappings, it hangs while tripping through
the TLB miss handler.  Device mappings are not stored in any page table.

This fixes by introducing a '-1' index for tlb1_write_entry_int(), so each
CPU searches for an available index private to itself.

MFC after:	3 weeks
2019-11-01 02:55:58 +00:00
..
amd64 There's nothing architecture specific in "options STATS"; move it from 2019-10-30 10:16:28 +00:00
arm Use the new cam_sim_alloc_dev function to properly initialize SIM 2019-10-30 20:43:27 +00:00
arm64 Fix pmap_change_attr() on arm64 to allow KV addresses 2019-10-31 15:16:10 +00:00
bsm
cam nda(4): Remove unnecessary union and avoid Clang -Wsizeof-array-divwarning 2019-10-24 22:23:53 +00:00
cddl FreeBSD'fy ZFS zlib zalloc/zfree callbacks. 2019-10-29 21:25:19 +00:00
compat Add missing M_NOWAIT flag 2019-10-23 17:20:20 +00:00
conf Move all the sys/dev/[a-j]* that are common to files.x86 2019-10-30 19:53:46 +00:00
contrib Introduce NETMAP support in ENA 2019-10-31 15:51:18 +00:00
crypto Fix the armv8 crypto driver after r354170. 2019-10-30 10:41:10 +00:00
ddb ddb(4): Add some support for lexing IPv6 addresses 2019-09-09 16:32:23 +00:00
dev add valectl to the system commands 2019-10-31 21:01:34 +00:00
dts dtso: allwinner: Add an overlay for H3 thermal node 2019-08-24 13:26:34 +00:00
fs Replace OBJ_MIGHTBEDIRTY with a system using atomics. Remove the TMPFS_DIRTY 2019-10-29 21:06:34 +00:00
gdb gdb(4): Implement support for NoAckMode 2019-10-17 22:37:25 +00:00
geom Make all the gnop parameters optional in the request from userland, 2019-10-16 21:49:44 +00:00
gnu arm: dts: ti: Fix mmc3 instance by setting it to disabled 2019-10-07 08:11:49 +00:00
i386 linux: futex_mtx should follow futex_list 2019-10-18 12:25:33 +00:00
isa
kern avoid kernel stack data leak in core dump thrmisc note 2019-10-31 20:42:36 +00:00
kgssapi Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
libkern Rename the macros to extract a single arm64 ID field. 2019-10-30 10:06:57 +00:00
mips Remove page locking from pmap_mincore(). 2019-10-16 22:03:27 +00:00
modules Introduce NETMAP support in ENA 2019-10-31 15:51:18 +00:00
net netmap: fix build issue in netmap_user.h 2019-10-31 22:16:20 +00:00
net80211 Don't use if_maddr_rlock() in 802.11, use epoch(9) directly instead. 2019-10-10 23:55:33 +00:00
netgraph Don't use if_maddr_rlock() in ng_eiface(4), use epoch(9) directly instead. 2019-10-10 23:49:19 +00:00
netinet Properly set VNET when nuking recvif from fragment queues. 2019-10-25 18:54:06 +00:00
netinet6 Properly set VNET when nuking recvif from fragment queues. 2019-10-25 18:54:06 +00:00
netipsec Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
netpfil pf: Must be in NET_EPOCH to call icmp_error 2019-10-18 03:36:26 +00:00
netsmb Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
nfs
nfsclient
nfsserver
nlm
ofed VLAN_TRUNKDEV() requires epochification in ibcore after r353292. 2019-10-16 08:56:07 +00:00
opencrypto kTLS support for TLS 1.3 2019-09-27 19:17:40 +00:00
powerpc powerpc/booke: Fix TLB1 entry accounting 2019-11-01 02:55:58 +00:00
riscv RISC-V: skip cpu-map when parsing elf_hwcap 2019-10-25 21:39:29 +00:00
rpc Avoid relying on header pollution from sys/refcount.h. 2019-07-29 20:26:01 +00:00
security Define macro VM_MAP_ENTRY_FOREACH for enumerating the entries in a vm_map. 2019-10-08 07:14:21 +00:00
sparc64 Split out a more generic debugnet(4) from netdump(4) 2019-10-17 16:23:03 +00:00
sys Use atomics and a shared object lock to protect the object reference count. 2019-10-29 20:58:46 +00:00
teken Adjust teken to allow build as part of loader 2019-09-05 18:07:40 +00:00
tests
tools fw_stub.awk: use @generated tag in generated files 2019-09-11 13:35:22 +00:00
ufs Replace OBJ_MIGHTBEDIRTY with a system using atomics. Remove the TMPFS_DIRTY 2019-10-29 21:06:34 +00:00
vm vm_page_wire_mapped: explain why failure does not affect correctness. 2019-10-30 17:33:17 +00:00
x86 amd64: Fix typo: RDPRU bit is 0x10, not 0x04 2019-10-30 04:00:44 +00:00
xdr
xen
Makefile