Skip to content
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

Closed
wants to merge 1 commit into from

Commits on Mar 25, 2024

  1. 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>
    SiFiveHolland authored and Björn Töpel committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    a7a62f1 View commit details
    Browse the repository at this point in the history