Generic Linux architectural discussions
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: linux@arm.linux.org.uk
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	rth@twiddle.net, ink@jurassic.park.msu.ru, mattst88@gmail.com,
	starvik@axis.com, jesper.nilsson@axis.com, dhowells@redhat.com,
	tony.luck@intel.com, fenghua.yu@intel.com, takata@linux-m32r.org,
	gerg@uclinux.org, geert@linux-m68k.org, monstr@monstr.eu,
	yasutake.koichi@jp.panasonic.com, cmetcalf@tilera.com,
	gxt@mprc.pku.edu.cn, arnd@arndb.de
Subject: Re: [RFC PATCH] Remove flush_icache_user_range()
Date: Wed, 09 Apr 2014 12:09:26 -0400 (EDT)	[thread overview]
Message-ID: <20140409.120926.1586922018370125781.davem@davemloft.net> (raw)
In-Reply-To: <20140409100150.GO16119@n2100.arm.linux.org.uk>

From: Russell King - ARM Linux <linux@arm.linux.org.uk>
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.

  parent reply	other threads:[~2014-04-09 16:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-09 10:01 [RFC PATCH] Remove flush_icache_user_range() Russell King - ARM Linux
2014-04-09 10:01 ` Russell King - ARM Linux
2014-04-09 16:09 ` David Miller [this message]
2014-04-09 16:15   ` Russell King - ARM Linux
2014-04-09 16:15     ` Russell King - ARM Linux
2014-04-09 16:33     ` David Miller
2014-04-09 16:33       ` David Miller
2014-04-09 16:36       ` Russell King - ARM Linux
2014-04-11  8:53 ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140409.120926.1586922018370125781.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=arnd@arndb.de \
    --cc=cmetcalf@tilera.com \
    --cc=dhowells@redhat.com \
    --cc=fenghua.yu@intel.com \
    --cc=geert@linux-m68k.org \
    --cc=gerg@uclinux.org \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=ink@jurassic.park.msu.ru \
    --cc=jesper.nilsson@axis.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mattst88@gmail.com \
    --cc=monstr@monstr.eu \
    --cc=rth@twiddle.net \
    --cc=starvik@axis.com \
    --cc=takata@linux-m32r.org \
    --cc=tony.luck@intel.com \
    --cc=yasutake.koichi@jp.panasonic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox