Find a file
John Baldwin e1d8f7fc1d riscv: Clear SUM in SSTATUS for supervisor mode exceptions.
Previously, a page fault taken during copyin/out and related functions
would run the entire fault handler while permitting direct access to
user addresses.  This could also leak across context switches (e.g. if
the page fault handler was preempted by an interrupt or slept for disk
I/O).

To fix, clear SUM in assembly after saving the original version of
SSTATUS in the supervisor mode trapframe.

Reviewed by:	mhorne, jrtc27
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D29763

(cherry picked from commit 753bcca440)
2021-11-23 15:47:52 -08:00
.cirrus-ci Cirrus-CI: retry pkg installation on failure 2021-06-10 08:54:52 -04:00
.github/workflows .github: Attempt to un-break Clang 9 action 2021-05-29 04:38:07 +01:00
bin src/bin/sh: Fix spelling errors 2021-11-18 21:52:21 -07:00
cddl libctf: Improve check for duplicate SOU definitions in ctf_add_type() 2021-10-18 09:09:02 -04:00
contrib libarchive: cherry-pick bugfix from vendor 2021-11-20 23:33:10 +01:00
crypto openssl: Fix detection of ARMv7 and ARM64 CPU features 2021-11-22 18:12:20 +00:00
etc Register /usr/tests/usr.bin/diff3 2021-09-25 10:34:39 +02:00
gnu Bump shared library versions after ncurses bump in 13. 2021-02-04 17:51:45 -08:00
include Implementations of cexpl() 2021-11-10 21:36:20 +02:00
kerberos5 kerberos5: Silence compiler warnings 2021-03-17 09:53:08 +00:00
lib uuid(3): Document return values 2021-11-21 19:43:31 -05:00
libexec rc.d/rctl: unbreak for distinct /usr filesystem 2021-11-23 15:29:41 +07:00
release EC2: Default to UEFI booting 2021-09-25 09:20:58 -07:00
rescue Fix building rescue/rescue when sanitizers are enabled 2021-08-05 09:59:51 +01:00
sbin Allow GEOM utilities to specify a -v option. 2021-11-23 15:04:33 -08:00
secure ssh: move common Makefile boilerplate to a new ssh.mk 2021-11-08 16:24:09 -05:00
share Document that 13.x is the end of the line for FreeBSD/mips 2021-11-21 17:45:28 -07:00
stand efi(8): Fix a typo in a source code comment 2021-11-11 17:26:43 +01:00
sys riscv: Clear SUM in SSTATUS for supervisor mode exceptions. 2021-11-23 15:47:52 -08:00
targets Fix bootstrapping to actually build lldb-tblgen for later use 2021-09-07 13:08:18 +01:00
tests ktls tests: Check the return values of close(). 2021-11-23 15:11:54 -08:00
tools crypto: Support Chacha20-Poly1305 with a nonce size of 8 bytes. 2021-10-21 14:19:30 -07:00
usr.bin ldd: also use exec mode for -a 2021-11-19 06:25:28 +02:00
usr.sbin ctld: Always declare MaxRecvDataSegmentLength. 2021-11-23 15:11:44 -08:00
.arcconfig arcconfig: add callsign again 2020-11-23 04:39:29 +00:00
.arclint arc lint: ignore /tests/ in chmod 2017-12-19 03:38:06 +00:00
.cirrus.yml Cirrus-CI: reduce VM memory to 8G 2021-09-02 15:14:45 -04:00
.clang-format clang-format: Add bitset loop macros 2021-11-01 09:20:11 -04:00
.gitattributes Add a basic clang-format configuration file 2019-06-07 15:23:52 +00:00
.gitignore Revert "bc: Vendor import of Gavin Howard's bc version 3.2.6" 2021-02-05 20:53:34 +01:00
COPYRIGHT copyrights: Happy New Year 2021 2020-12-31 10:29:44 -05:00
LOCKS LOCKS: update current locks 2018-06-09 03:08:04 +00:00
MAINTAINERS Add a pointer to csprng@ for the CSPRNG driver. This is enforced anyway by 2020-09-01 08:02:12 +00:00
Makefile Remove 'make update'. 2021-10-19 16:53:24 -07:00
Makefile.inc1 Add warning that MIPS is being removed in FreeBSD 14.0 2021-11-21 17:45:28 -07:00
Makefile.libcompat Prefer MK_SSP=no to SSP_CFLAGS= 2021-08-11 13:56:28 -03:00
Makefile.sys.inc AUTO_OBJ: For all top-level targets enforce using an OBJDIR. 2017-12-05 21:29:47 +00:00
ObsoleteFiles.inc ObsoleteFiles.inc: stop removing pthread_mutexattr_get/setpshared.3 2021-10-12 10:00:10 +03:00
README Mark the repository has been converted to Git 2020-12-23 12:27:27 +08:00
README.md Revert "bc: Vendor import of Gavin Howard's bc version 3.2.6" 2021-02-05 20:53:34 +01:00
RELNOTES RELNOTES: Add comment about WiFi 6 support 2021-11-22 10:42:11 -08:00
UPDATING Bump __FreeBSD_version to 1300521. 2021-11-19 00:09:37 +00:00

FreeBSD Source:

This is the top level of the FreeBSD source directory. This file was last revised on: FreeBSD

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html, and https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html for more information, including setting make(1) variables.

Source Roadmap:

bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

stand		Boot loader sources.

sys		Kernel sources.

sys/<arch>/conf Kernel configuration files. GENERIC is the configuration
		used in release builds. NOTES contains documentation of
		all possible entries.

tests		Regression tests which can be run by Kyua.  See tests/README
		for additional information.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html