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

Conversation

bjoto
Copy link

@bjoto bjoto commented Mar 13, 2024

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

@bjoto
Copy link
Author

bjoto commented Mar 13, 2024

Upstream branch: 886516f
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=835045
version: 1

@bjoto
Copy link
Author

bjoto commented Mar 14, 2024

Upstream branch: 2b2ca35
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=835045
version: 1

@bjoto
Copy link
Author

bjoto commented Mar 15, 2024

Upstream branch: 0f0cd0e
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=835045
version: 1

@bjoto
Copy link
Author

bjoto commented Mar 20, 2024

Upstream branch: eeb7a89
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=835045
version: 1

@bjoto
Copy link
Author

bjoto commented Mar 21, 2024

Upstream branch: a9ad732
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=835045
version: 1

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>
@bjoto
Copy link
Author

bjoto commented Mar 25, 2024

Upstream branch: 4cece76
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=835045
version: 1

@bjoto bjoto closed this Apr 2, 2024
@bjoto bjoto deleted the series/835045=>for-next branch April 4, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants