Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
riscv: Define TASK_SIZE_MAX for __access_ok()
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>
- Loading branch information