Re: [RFC PATCH] Remove flush_icache_user_range()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx>
Date: Wed, 9 Apr 2014 11:01:50 +0100

> What has been proposed for uprobes is a uprobe specific function -
> flush_uprobe_xol_access() which is used after uprobes writes via the
> kmap_atomic() mapping of the page:
> 
> +       xol_page_kaddr = kmap_atomic(area->page);
> +
> +       /* Initialize the slot */
> +       memcpy(xol_page_kaddr + (xol_vaddr & ~PAGE_MASK),
> +              &uprobe->arch.ixol,
> +              sizeof(uprobe->arch.ixol));
> +
> +       arch_uprobe_flush_xol_access(area->page, xol_vaddr,
> +                                    xol_page_kaddr + (xol_vaddr & ~PAGE_MASK),
> +                                    sizeof(uprobe->arch.ixol));
> +
> +       kunmap_atomic(xol_page_kaddr);
> 
> Comments?

ptrace() accesses (via __access_remote_vm()) already use an existing
helper function for these sorts of situations, in the form of
copy_{to,from}_user_page().  I would suggest that uprobes uses that
as well.
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux