diff options
author | Clement Leger <cleger@kalray.eu> | 2020-03-02 12:38:55 +0300 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2020-03-26 08:29:38 +0300 |
commit | 9ce3bf225e5a908756b90b8f7bbc38834427296b (patch) | |
tree | 7510f5f0b6672f412a0152c4ea94bf4bb65e920c /drivers/remoteproc/remoteproc_internal.h | |
parent | 2e7d4c2c4b25e50450666fde6244f580df365bb3 (diff) | |
download | linux-9ce3bf225e5a908756b90b8f7bbc38834427296b.tar.xz |
remoteproc: Use size_t type for len in da_to_va
With upcoming changes in elf loader for elf64 support, section size will
be a u64. When used with da_to_va, this will potentially lead to
overflow if using the current "int" type for len argument. Change
da_to_va prototype to use a size_t for len and fix all users of this
function.
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Clement Leger <cleger@kalray.eu>
Link: https://lore.kernel.org/r/20200302093902.27849-2-cleger@kalray.eu
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/remoteproc_internal.h')
-rw-r--r-- | drivers/remoteproc/remoteproc_internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h index 493ef9262411..58580210575c 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -50,7 +50,7 @@ void rproc_exit_sysfs(void); void rproc_free_vring(struct rproc_vring *rvring); int rproc_alloc_vring(struct rproc_vdev *rvdev, int i); -void *rproc_da_to_va(struct rproc *rproc, u64 da, int len); +void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len); phys_addr_t rproc_va_to_pa(void *cpu_addr); int rproc_trigger_recovery(struct rproc *rproc); |