lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 9 Apr 2014 17:36:47 +0100
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	David Miller <davem@...emloft.net>
Cc:	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
	rth@...ddle.net, ink@...assic.park.msu.ru, mattst88@...il.com,
	starvik@...s.com, jesper.nilsson@...s.com, dhowells@...hat.com,
	tony.luck@...el.com, fenghua.yu@...el.com, takata@...ux-m32r.org,
	gerg@...inux.org, geert@...ux-m68k.org, monstr@...str.eu,
	yasutake.koichi@...panasonic.com, cmetcalf@...era.com,
	gxt@...c.pku.edu.cn, arnd@...db.de
Subject: Re: [RFC PATCH] Remove flush_icache_user_range()

On Wed, Apr 09, 2014 at 12:33:58PM -0400, David Miller wrote:
> From: Russell King - ARM Linux <linux@....linux.org.uk>
> Date: Wed, 9 Apr 2014 17:15:55 +0100
> 
> > On Wed, Apr 09, 2014 at 12:09:26PM -0400, David Miller wrote:
> >> From: Russell King - ARM Linux <linux@....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.
> > 
> > Yes, I agree with you.
> > 
> > I made that suggestion too (because it's really the same problem)
> > but uprobes people are concerned that it's too much of an overhead:
> 
> They should use it at first, then if there is a problem we can identify
> exactly what can be optimized or needs to be, and expand the interface
> as needed.
> 
> Let's not optimize first.

I have forwarded your comments, thanks.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists