mm: replace access_process_vm() write parameter with gup_flags
This removes the 'write' argument from access_process_vm() and replaces it with 'gup_flags' as use of this function previously silently implied FOLL_FORCE, whereas after this patch callers explicitly pass this flag. We make this explicit as use of FOLL_FORCE can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
此提交包含在:
@@ -271,7 +271,7 @@ long arch_ptrace(struct task_struct *child, long request,
|
||||
case BFIN_MEM_ACCESS_CORE:
|
||||
case BFIN_MEM_ACCESS_CORE_ONLY:
|
||||
copied = access_process_vm(child, addr, &tmp,
|
||||
to_copy, 0);
|
||||
to_copy, FOLL_FORCE);
|
||||
if (copied)
|
||||
break;
|
||||
|
||||
@@ -324,7 +324,8 @@ long arch_ptrace(struct task_struct *child, long request,
|
||||
case BFIN_MEM_ACCESS_CORE:
|
||||
case BFIN_MEM_ACCESS_CORE_ONLY:
|
||||
copied = access_process_vm(child, addr, &data,
|
||||
to_copy, 1);
|
||||
to_copy,
|
||||
FOLL_FORCE | FOLL_WRITE);
|
||||
break;
|
||||
case BFIN_MEM_ACCESS_DMA:
|
||||
if (safe_dma_memcpy(paddr, &data, to_copy))
|
||||
|
新增問題並參考
封鎖使用者