opnsense-src/sys
John Baldwin 232d0b87e0 Various fixes for floating point on RISC-V.
- Explicitly load an empty initial state into FP registers when taking
  the fault on the first FP instruction in a thread.  Setting
  SSTATE.FS to INITIAL is just a marker to let context switch restore
  code know that it can load FP registers with zeroes instead of
  memory loads.  It does not imply that the hardware will reset all
  registers to zero on first access.  In addition, set the state to
  CLEAN instead of INITIAL after the first FP instruction.
  cpu_switch() doesn't do anything for INITIAL and only restores from
  the pcb if the state is CLEAN.  We could perhaps change cpu_switch
  to call fpe_state_clear if the state was INITIAL and leave SSTATE.FS
  set to INITIAL instead of CLEAN after the first FP instruction.
  However, adding this complexity to cpu_switch() doesn't seem worth
  the supposed gain.
- Only save the current FPU registers in fill_fpregs() if the request
  is made to save the current thread's registers.  Previously if a
  debugger requested FP registers via ptrace() it was getting a copy
  of the debugger's FP registers rather than the debugee's.
- Zero the entire FP register set structure returned for ptrace() if a
  thread hasn't used FP registers rather than leaking garbage in the
  fp_fcsr field.
- If a debugger writes FP registers via ptrace(), always mark the pcb
  as having valid FP registers and set SSTATUS.FS_MASK to CLEAN so
  that the registers will be restored when the debugged thread
  resumes.
- Be more explicit about clearing the SSTATUS.FS field before setting
  it to CLEAN on the first FP instruction trap.

Submitted by:	br, markj
Approved by:	re (rgrimes)
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D17141
2018-09-19 23:45:18 +00:00
..
amd64 Convert x86 cache invalidation functions to ifuncs. 2018-09-19 19:35:02 +00:00
arm Enable Capsicum on armv6/armv7 2018-09-13 21:00:17 +00:00
arm64 Clear all of the VFP state in fill_fpregs(). 2018-09-19 22:53:52 +00:00
bsm sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
cam Make the wait in cfiscsi_offline() interruptible. This is the second half 2018-09-11 11:39:59 +00:00
cddl Fix ZFS VFS op quotactl to follow busy protocol. 2018-09-19 14:38:01 +00:00
compat x86bios: use M_NOWAIT with mallocs 2018-09-13 07:04:00 +00:00
conf Require ifunc-capable linker for i386 2018-09-18 15:01:21 +00:00
contrib Add proper support for VIMAGE to krping. 2018-09-06 14:03:11 +00:00
crypto Don't load ccp automatically with devmatch 2018-08-31 01:01:16 +00:00
ddb add an option for ddb ps command to print process arguments 2018-08-09 11:21:31 +00:00
dev Convert x86 cache invalidation functions to ifuncs. 2018-09-19 19:35:02 +00:00
dts arm64: Add DTS overlays for A64 2018-08-24 15:00:36 +00:00
fs Remove the Yarrow PRNG algorithm option in accordance with due notice 2018-08-26 12:51:46 +00:00
gdb amd64: Protect the kernel text, data, and BSS by setting the RW/NX bits 2018-03-06 14:28:37 +00:00
geom OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
gnu dts: Import DTS for arm64 2018-08-23 13:21:01 +00:00
i386 Convert x86 cache invalidation functions to ifuncs. 2018-09-19 19:35:02 +00:00
isa Back out r338035 until Warner is finished churning GSoC PNP patches 2018-08-19 00:46:22 +00:00
kern Fix state of dquot-less vnodes after failed quotaoff. 2018-09-19 14:36:57 +00:00
kgssapi OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
libkern Sync strlcpy with userland version, again 2018-06-21 17:35:13 +00:00
mips Re-enable kernel modules for the MALTA64EL kernel configuration. 2018-09-06 19:21:31 +00:00
modules Catch exceptions during EFI RT calls on amd64. 2018-09-02 21:37:05 +00:00
net Restore outbound packets capturing for if_gre(4). It was missed in r335048. 2018-09-17 10:10:14 +00:00
net80211 Fix misspellings of transmitter/transmitted 2018-08-10 20:37:32 +00:00
netgraph Remove the Yarrow PRNG algorithm option in accordance with due notice 2018-08-26 12:51:46 +00:00
netinet Remove unused code. 2018-09-18 10:53:07 +00:00
netinet6 Update udp6_output() inp locking to avoid concurrency issues with 2018-09-19 18:49:37 +00:00
netipsec Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
netpfil Significantly improve pf purge cpu usage by only taking locks 2018-09-16 00:44:23 +00:00
netsmb Make timespecadd(3) and friends public 2018-07-30 15:46:40 +00:00
nfs Switch RIB and RADIX_NODE_HEAD lock from rwlock(9) to rmlock(9). 2018-06-16 08:26:23 +00:00
nfsclient style: Remove remaining deprecated MALLOC/FREE macros 2018-01-25 22:25:13 +00:00
nfsserver sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nlm Use syscall_helper_register() to register syscalls and initialize though 2018-02-10 01:09:22 +00:00
ofed Introduce and use sgid_index in CM requests in ibcore. 2018-09-09 07:20:15 +00:00
opencrypto cryptosoft: Reduce generality of supported algorithm composition 2018-08-17 04:40:01 +00:00
powerpc powerpc64: Add initial support for HTM (kABI) 2018-09-06 17:07:21 +00:00
riscv Various fixes for floating point on RISC-V. 2018-09-19 23:45:18 +00:00
rpc Set SO_SNDTIMEO in the client side krpc when CLSET_TIMEOUT is done. 2018-07-20 12:03:16 +00:00
security The kernel DTrace audit provider (dtaudit) relies on auditd(8) to load 2018-09-03 14:26:43 +00:00
sparc64 Prepare the kernel linker to handle PC-relative ifunc relocations. 2018-08-22 20:44:30 +00:00
sys vm: stop taking proc lock in mmap to satisfy racct if it is disabled 2018-09-18 01:24:30 +00:00
teken teken: Fix sequences header which was crossing the 80-col boundary 2018-05-29 08:41:44 +00:00
tests epoch_test: fix compile 2018-07-15 00:31:17 +00:00
tools make_dtb: Always add root directory in the include path 2018-08-23 13:23:21 +00:00
ufs Fix state of dquot-less vnodes after failed quotaoff. 2018-09-19 14:36:57 +00:00
vm Move kernel vmem arena initialization to vm_kern.c. 2018-09-19 19:13:43 +00:00
x86 Convert x86 cache invalidation functions to ifuncs. 2018-09-19 19:35:02 +00:00
xdr sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
xen xen: legacy PVH fixes for the new interrupt count 2018-09-13 07:14:11 +00:00
Makefile Move sys/boot to stand. Fix all references to new location 2017-11-14 23:02:19 +00:00