aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorSamuel Holland <[email protected]>2024-03-27 07:38:13 -0700
committerPalmer Dabbelt <[email protected]>2024-05-16 12:59:58 -0700
commitad5643cf2f699989daa85d909403febd6712fccb (patch)
tree0130bf91b6942e48a2f5b40ca9892462a0eaae62 /tools/perf/scripts/python/export-to-postgresql.py
parent9ad6bb3298d1c008bb36b1f4fa9ea896d2904b5a (diff)
riscv: Define TASK_SIZE_MAX for __access_ok()
TASK_SIZE_MAX should be set to a constant value, at least the largest valid userspace address under any runtime configuration. This optimizes the check in __access_ok(), which no longer needs to compute the runtime value of TASK_SIZE. The check does not need to be exact, as long as it accepts all valid userspace addresses and rejects all valid kernel addresses; well-behaved programs will never fail the access_ok() check. For RISC-V, which requires all virtual addresses to be sign extended, the optimal choice is LONG_MAX because it simplifies the limit comparison to a sign bit test. This removes about half of the references to pgtable_l[45]_enabled. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Alexandre Ghiti <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions