Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 340a1be1 authored by Mike Frysinger's avatar Mike Frysinger
Browse files

Blackfin: drop ptrace() write support for fixed code/bootrom



These regions are either read-only and won't work anyways (bootrom), or
we don't want people screwing with them because they're shared between
all processes (fixed code).

Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent e187837b
Loading
Loading
Loading
Loading
+0 −13
Original line number Original line Diff line number Diff line
@@ -316,19 +316,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
			case BFIN_MEM_ACCESS_CORE_ONLY:
			case BFIN_MEM_ACCESS_CORE_ONLY:
				copied = access_process_vm(child, addr, &data,
				copied = access_process_vm(child, addr, &data,
				                           to_copy, 1);
				                           to_copy, 1);
				if (copied)
					break;

				/* hrm, why didn't that work ... maybe no mapping */
				if (addr >= FIXED_CODE_START &&
				    addr + to_copy <= FIXED_CODE_END) {
					copy_to_user_page(0, 0, 0, paddr, &data, to_copy);
					copied = to_copy;
				} else if (addr >= BOOT_ROM_START) {
					memcpy(paddr, &data, to_copy);
					copied = to_copy;
				}

				break;
				break;
			case BFIN_MEM_ACCESS_DMA:
			case BFIN_MEM_ACCESS_DMA:
				if (safe_dma_memcpy(paddr, &data, to_copy))
				if (safe_dma_memcpy(paddr, &data, to_copy))