aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/coresight/coresight-cpu-debug.c
diff options
context:
space:
mode:
authorMarcelo Henrique Cerri <[email protected]>2021-07-01 01:54:38 +0000
committerLinus Torvalds <[email protected]>2021-07-01 18:06:04 +0000
commitd238692b4b9f2c36e35af4c6e6f6da36184aeb3e (patch)
treef90270ab0e3aa06229cc48ef6f75fa3b5f57078d /drivers/hwtracing/coresight/coresight-cpu-debug.c
parentnouveau/svm: implement atomic SVM access (diff)
downloadkernel-d238692b4b9f2c36e35af4c6e6f6da36184aeb3e.tar.gz
kernel-d238692b4b9f2c36e35af4c6e6f6da36184aeb3e.zip
proc: Avoid mixing integer types in mem_rw()
Use size_t when capping the count argument received by mem_rw(). Since count is size_t, using min_t(int, ...) can lead to a negative value that will later be passed to access_remote_vm(), which can cause unexpected behavior. Since we are capping the value to at maximum PAGE_SIZE, the conversion from size_t to int when passing it to access_remote_vm() as "len" shouldn't be a problem. Link: https://lkml.kernel.org/r/[email protected] Reviewed-by: David Disseldorp <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: Marcelo Henrique Cerri <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: Souza Cascardo <[email protected]> Cc: Christian Brauner <[email protected]> Cc: Michel Lespinasse <[email protected]> Cc: Helge Deller <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Lorenzo Stoakes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-cpu-debug.c')
0 files changed, 0 insertions, 0 deletions