summaryrefslogtreecommitdiffstats
path: root/semihosting/uaccess.c
Commit message (Collapse)AuthorAgeFilesLines
* semihosting: Simplify softmmu_lock_user_stringRichard Henderson2022-06-281-12/+3Star
| | | | | | | | | | | We are not currently bounding the search to the 1024 bytes that we allocated, possibly overrunning the buffer. Use softmmu_strlen_user to find the length and allocate the correct size from the beginning. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* semihosting: Add target_strlen for softmmu-uaccess.hRichard Henderson2022-06-281-0/+49
| | | | | | | | | | | Mirror the interface of the user-only function of the same name. Use probe_access_flags for the common case of ram, and cpu_memory_rw_debug for the uncommon case of mmio. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- v3: Use probe_access_flags (pmm)
* semihosting: Move softmmu-uaccess.h functions out of lineRichard Henderson2022-06-281-0/+51
Rather that static (and not even inline) functions within a header, move the functions to semihosting/uaccess.c. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>