commit | 71a26d784590037380034dfb44a857701d5dc46e | [log] [tgz] |
---|---|---|
author | Venkatesh Srinivas <venkateshs@google.com> | Thu Jun 20 05:24:56 2019 +0000 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Thu Jun 20 05:24:56 2019 +0000 |
tree | 1a01fdc9a4fcc97dc1e969367da1ca01191d1dd7 | |
parent | 8bcc565750e2446017a4d0a3323b4b50ba42359a [diff] |
[kernel][x86] user_copy: Move CLAC/STAC to immediately around REP MOVSB Where available, Zircon enables SMAP; this means accesses to non- supervisor pages in supervisor mode need to be bracketed by CLAC/ STAC instructions (to disable that checking). Move the CLAC and STAC instruction pair to immediately before/after REP MOVSB, with no other intervening memory accesses. The old code would perform one supervisor access inside the CLAC/STAC unprotected region, to the |fault_return| address. If a caller managed to trick this function into being called with a user |fault_return|, the kernel would write unexpectedly to user mode addresses. No functional change, cinches the belt and suspenders a little tighter. Change-Id: Iacc09fdc71c17486874cc4a0ecf1fe0e1fbdfcba
Pink + Purple == Fuchsia (a new operating system)
Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.
Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.
See Getting Started.
See the documentation.