aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorLuís Marques <luismarques@lowrisc.org>2021-04-06 20:42:48 +0100
committerLuís Marques <luismarques@lowrisc.org>2021-04-06 20:46:17 +0100
commit0c3bc1f3a47752489871b7a0b06f6986935c4a1e (patch)
treea70abda6eeee12608d7880e26207175d802d112b /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parent61d065e21ff37fb9040aed711c97daddac2f7577 (diff)
downloadllvm-0c3bc1f3a47752489871b7a0b06f6986935c4a1e.zip
llvm-0c3bc1f3a47752489871b7a0b06f6986935c4a1e.tar.gz
llvm-0c3bc1f3a47752489871b7a0b06f6986935c4a1e.tar.bz2
[ASan][RISCV] Fix RISC-V memory mapping
Fixes the ASan RISC-V memory mapping (originally introduced by D87580 and D87581). This should be an improvement both in terms of first principles soundness and observed test failures --- test failures would occur non-deterministically depending on the ASLR random offset. On RISC-V Linux (64-bit), `TASK_UNMAPPED_BASE` is currently defined as `PAGE_ALIGN(TASK_SIZE / 3)`. The non-power-of-two divisor makes the result be the not very round number 0x1555556000. That address had to be further rounded to ensure page alignment after the shadow scale shifting is applied. Still, that value explains why the mapping table may look less regular than expected. Further cleanups: - Moved the mapping table comment, to ensure that the two Linux/AArch64 tables stayed together; - Removed mention of Sv48. Neither the original mapping nor this one are compatible with an actual Linux Sv48 address space (mainline Linux still operates Sv48 in Sv39 mode). A future patch can improve this; - Removed the additional comments, for consistency. Differential Revision: https://reviews.llvm.org/D97646
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions