| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
| |
Implement resets for PCI buses and PCIe bridges.
Notes:
svn path=/stable/12/; revision=346378
|
| |
|
|
|
|
|
|
|
| |
pci_cfgreg.c: Use io port config access for early boot time.
PR: 236838
Notes:
svn path=/stable/12/; revision=346284
|
| |
|
|
|
|
|
|
|
| |
ObsoleteFiles.inc. I completely forgot about those, sorry.
This is a direct commit to stable/12.
Notes:
svn path=/stable/12/; revision=346179
|
| |
|
|
|
|
|
|
|
| |
ObsoleteFiles.inc. I completely forgot about those, sorry.
This is a direct commit to stable/12.
Notes:
svn path=/stable/12/; revision=346178
|
| |
|
|
|
|
|
| |
amd64 KPTI: add control from procctl(2).
Notes:
svn path=/stable/12/; revision=345446
|
| |
|
|
|
|
|
| |
amd64: Add md process flags and first P_MD_PTI flag.
Notes:
svn path=/stable/12/; revision=345445
|
| |
|
|
|
|
|
| |
amd64: fix switching to the pmap with pti disabled.
Notes:
svn path=/stable/12/; revision=345444
|
| |
|
|
|
|
|
| |
amd64: rewrite cpu_switch.S fragment to reload tss.rsp0 on context switch.
Notes:
svn path=/stable/12/; revision=345443
|
| |
|
|
|
|
|
|
| |
Provide deterministic (and somewhat useful) value for RDPID result,
and for %ecx after RDTSCP.
Notes:
svn path=/stable/12/; revision=345413
|
| |
|
|
|
|
|
| |
Fix typo.
Notes:
svn path=/stable/12/; revision=345125
|
| |
|
|
|
|
|
| |
ASLR.
Notes:
svn path=/stable/12/; revision=345067
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new 'debugger_on_trap' knob separate from 'debugger_on_panic'
and make the calls to kdb_trap() in MD fatal trap handlers prior to
calling panic() conditional on this new knob instead of
'debugger_on_panic'. Disable the new knob by default. Developers who
wish to recover from a fatal fault by adjusting saved register state
and retrying the faulting instruction can still do so by enabling the
new knob. However, for the more common case this makes the user
experience for panics due to a fatal fault match the user experience
for other panics, e.g. 'c' in DDB will generate a crash dump and
reboot the system rather than being stuck in an infinite loop of fatal
fault messages and DDB prompts.
Notes:
svn path=/stable/12/; revision=344905
|
| |
|
|
|
|
|
|
| |
Add kernel support for Intel userspace protection keys feature on
Skylake Xeons.
Notes:
svn path=/stable/12/; revision=344848
|
| |
|
|
|
|
|
| |
amd64: add defines and decode protection keys and SGX page faults reasons.
Notes:
svn path=/stable/12/; revision=344847
|
| |
|
|
|
|
|
| |
amd64: cleanup pmap_init_pat().
Notes:
svn path=/stable/12/; revision=344573
|
| |
|
|
|
|
|
| |
Fix refcount leaks in the SGX Linux compat ioctl handler.
Notes:
svn path=/stable/12/; revision=344521
|
| |
|
|
|
|
|
| |
Provide convenience C wrappers for RDPKRU and WRPKRU instructions.
Notes:
svn path=/stable/12/; revision=344466
|
| |
|
|
|
|
|
| |
Make iflib a loadable module.
Notes:
svn path=/stable/12/; revision=344149
|
| |
|
|
|
|
|
|
|
|
| |
amd64: clear callee-preserved registers on syscall exit.
Approved by: so
Security: CVE-2019-5595
Notes:
svn path=/stable/12/; revision=343781
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r343260 linuxulator: fix stack memory disclosure in linux_ioctl_v4l
r343261 linuxulator: fix stack memory disclosure in linux_ioctl_termio
r343262 linuxulator: fix stack memory disclosure in linux_sigaltstack
r343263 linuxulator: fix stack memory disclosure in linux_sigaltstack
admbugs: 765
Reported by: Vlad Tsyrklevich <vlad@tsyrklevich.net>
Security: Kernel stack memory disclosure
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/stable/12/; revision=343343
|
| |
|
|
|
|
|
|
|
| |
Trim whitespace at EoL, use tabs instead of spaces for indent.
PR: 235004
Notes:
svn path=/stable/12/; revision=343211
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix errno values returned from DUMMY_XATTR linuxulator calls
Reported by: weiss@uni-mainz.de
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D18812
Notes:
svn path=/stable/12/; revision=342998
|
| |
|
|
|
|
|
| |
Avoid setting PG_U unconditionally in pmap_enter_quick_locked().
Notes:
svn path=/stable/12/; revision=342891
|
| |
|
|
|
|
|
| |
x86: Report per-cpu IPI TLB shootdown generation in ddb 'show pcpu' output.
Notes:
svn path=/stable/12/; revision=342824
|
| |
|
|
|
|
|
|
|
| |
amd64: tidy up copying backwards in memmove
amd64: remove stale attribution for memmove work
amd64: handle small memmove buffers with overlapping stores
Notes:
svn path=/stable/12/; revision=342240
|
| |
|
|
|
|
|
| |
amd64: stop re-reading curpc on subyte/suword
Notes:
svn path=/stable/12/; revision=342239
|
| |
|
|
|
|
|
| |
amd64: align target memmove buffer to 16 bytes before using rep movs
Notes:
svn path=/stable/12/; revision=342238
|
| |
|
|
|
|
|
| |
Plug memory disclosures via ptrace(2).
Notes:
svn path=/stable/12/; revision=341490
|
| |
|
|
|
|
|
| |
Fix assert condition in pmap_large_unmap().
Notes:
svn path=/stable/12/; revision=341468
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Prevent kernel stack disclosure in getcontext/swapcontext
Expand r338982 to cover freebsd32 interfaces on amd64, mips, and powerpc.
Security: FreeBSD-EN-18:12.mem
Security: CVE-2018-17155
Sponsored by: Dell EMC Isilon
Notes:
svn path=/stable/12/; revision=341146
|
| |
|
|
|
|
|
| |
Clear unused bytes in ia32_osendsig().
Notes:
svn path=/stable/12/; revision=340919
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This merge is done sans sys/i386/conf/MINIMAL, since that doesn't exist in
stable/12, only current.
Include evdev support and drivers in the amd64 GENERIC and MINIMAL, and i386
GENERIC kernels. Evdev is used by X and wayland to handle input devices, and
this change, together with upcomming changes in ports will make us handle input
devices better in graphical UIs.
Reviewed by: wulf, bapt, imp
Approved by: imp
Notes:
svn path=/stable/12/; revision=340695
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
amd64: tidy up memset to have rax set earlier for small sizes
amd64: finish the tail in memset with an overlapping store
amd64: align memset buffers to 16 bytes before using rep stos
amd64: convert libc bzero to a C func to avoid future bloat
amd64: sync up libc memset with the kernel version
amd64: handle small memset buffers with overlapping stores
Fix -DNO_CLEAN amd64 build after r340463
Notes:
svn path=/stable/12/; revision=340684
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
amd64: relax constraints in curthread and curpcb
This makes the compiler less likely to reload the content from %gs.
The 'P' modifier drops all synteax prefixes and 'n' constraint treats
input as a known at compilation time immediate integer.
Example reloading victim was spinlock_enter.
Notes:
svn path=/stable/12/; revision=340682
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
kernel configuration files. This should have been turned off when
stable/12 branched.
This is a direct commit to stable/12.
Submitted by: Harry Schmalzbauer [1]
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/stable/12/; revision=340630
|
| |
|
|
|
|
|
| |
amd64: Use ifuncs to select suitable implementation of set_pcb_flags().
Notes:
svn path=/stable/12/; revision=340606
|
| |
|
|
|
|
|
| |
Align IA32_ARCH_CAP MSR definitions and use with SDM rev. 068.
Notes:
svn path=/stable/12/; revision=340605
|
| |
|
|
|
|
|
| |
Apply fix to un-cripple max cpu id on BSP earlier.
Notes:
svn path=/stable/12/; revision=340604
|
| |
|
|
|
|
|
| |
Style.
Notes:
svn path=/stable/12/; revision=340554
|
| |
|
|
|
|
|
| |
amd64: flush L1 data cache on syscall return with an error.
Notes:
svn path=/stable/12/; revision=340552
|
| |
|
|
|
|
|
| |
Add an assertion to pmap_enter().
Notes:
svn path=/stable/12/; revision=340522
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
340164:
Add a KPI for the delay while spinning on a spin lock.
Replace a call to DELAY(1) with a new cpu_lock_delay() KPI. Currently
cpu_lock_delay() is defined to DELAY(1) on all platforms. However,
platforms with a DELAY() implementation that uses spin locks should
implement a custom cpu_lock_delay() doesn't use locks.
340168:
Add a delay_tsc() static function for when DELAY() uses the TSC.
This uses slightly simpler logic than the existing code by using the
full 64-bit counter and thus not having to worry about counter
overflow.
340170:
Add a custom implementation of cpu_lock_delay() for x86.
Avoid using DELAY() since it can try to use spin locks on CPUs without
a P-state invariant TSC. For cpu_lock_delay(), always use the TSC if
it exists (even if it is not P-state invariant) to delay for a
microsecond. If the TSC does not exist, read from I/O port 0x84 to
delay instead.
PR: 228768
Approved by: re (gjb)
Notes:
svn path=/stable/12/; revision=340269
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On amd64 both Linux compat modules, linux.ko and linux64.ko, provide
linux_ioctl_(un)register_handler that allows other driver modules to
register ioctl handlers. The ioctl syscall implementation in each Linux
compat module iterates over the list of handlers and forwards the call to
the appropriate driver. Because the registration functions have the same
name in each module it is not possible for a driver to support both 32 and
64 bit linux compatibility.
Move the list of ioctl handlers to linux_common.ko so it is shared by
both Linux modules and all drivers receive both 32 and 64 bit ioctl calls
with one registration. These ioctl handlers normally forward the call
to the FreeBSD ioctl handler which can handle both 32 and 64 bit.
Keep the special COMPAT_LINUX32 ioctl handlers in linux.ko in a separate
list for now and let the ioctl syscall iterate over that list first.
Later, COMPAT_LINUX32 support can be added to the 64 bit ioctl handlers
via a runtime check for ILP32 like is done for COMPAT_FREEBSD32 and then
this separate list would disappear again. That is a much bigger effort
however and this commit is meant to be MFCable.
This enables linux64 support in x11/nvidia-driver*.
PR: 206711
Reviewed by: kib
Approved by: re (gjb)
Notes:
svn path=/stable/12/; revision=340258
|
| |
|
|
|
|
|
|
|
| |
Add pci_early function to detect Intel stolen memory.
Approved by: re (rgrimes)
Notes:
svn path=/stable/12/; revision=340224
|
| |
|
|
|
|
|
|
|
| |
Remove the drivers we'd planned on removing from 12.x from GENERIC.
Approved by: re@ (rgrimes@)
Notes:
svn path=/stable/12/; revision=339704
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
here.
- Remove debugging from GENERIC* kernel configurations
- Enable MALLOC_PRODUCTION
- Default dumpdev=NO
- Remove UPDATING entry regarding debugging features
- Switch 12.0 from -ALPHA10 to -BETA1 to prepare for builds.
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/stable/12/; revision=339435
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently AMD machines cannot tolerate this. This was uncovered by
r339386, where cache flush started really flushing the requested range.
Introduce pmap_mapdev_pciecfg(), which simply does not flush cache
comparing with pmap_mapdev(). It assumes that the MCFG region was
never accessed through the cacheable mapping, which is most likely
true for machine to boot at all.
Note that i386 does not need the change, since the architecture
handles access per-page due to the KVA shortage, and page remapping
already does not flush the cache.
Reported and tested by: mjg, Mike Tancsa <mike@sentex.net>
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D17612
Notes:
svn path=/head/; revision=339432
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The KPI allows to map very large contigous physical memory regions
into KVA, which are not covered by DMAP.
I see both with QEMU and with some real hardware started shipping, the
regions for NVDIMMs might be very far apart from the normal RAM, and
we expect that at least initial users of NVDIMM could install very
large amount of such memory. IMO it is not reasonable to extend DMAP
to cover that far-away regions both because it could overflow existing
4T window for DMAP in KVA, and because it costs in page table pages
allocations, for gap and for possibly unused NV RAM.
Also, KPI provides some special functionality for fast cache flushing
based on the knowledge of the NVRAM mapping use.
Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D17070
Notes:
svn path=/head/; revision=339386
|
| |
|
|
|
|
|
|
|
|
|
| |
Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D17070
Notes:
svn path=/head/; revision=339384
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cpu_switch() always reloads the LDT, so this can only affect the
hypervisor process itself. Fix this by explicitly reloading the host
LDT selector after each #VMEXIT. The stock bhyve process on FreeBSD
never uses a custom LDT, so this change is cosmetic.
Reviewed by: kib
Tested by: Mike Tancsa <mike@sentex.net>
Approved by: re (gjb)
MFC after: 2 weeks
Notes:
svn path=/head/; revision=339364
|