New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
riscv: Define TASK_SIZE_MAX for __access_ok() #728
Conversation
Upstream branch: 886516f |
Upstream branch: 2b2ca35 |
ea3a9c0
to
4c3d244
Compare
Upstream branch: 0f0cd0e |
4c3d244
to
34981af
Compare
Upstream branch: eeb7a89 |
34981af
to
8e2f7ca
Compare
Upstream branch: a9ad732 |
8e2f7ca
to
f6cb7b0
Compare
TASK_SIZE_MAX should be set to the largest userspace address under any runtime configuration. This optimizes the check in __access_ok(), which no longer needs to compute the current value of TASK_SIZE. It is still safe because addresses between TASK_SIZE and TASK_SIZE_MAX are invalid at the hardware level. This removes about half of the references to pgtable_l[45]_enabled. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
Upstream branch: 4cece76 |
f6cb7b0
to
a7a62f1
Compare
Pull request for series with
subject: riscv: Define TASK_SIZE_MAX for __access_ok()
version: 1
url: https://patchwork.kernel.org/project/linux-riscv/list/?series=835045