linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v4] ARM: uprobes xol write directly to userspace
@ 2014-04-16  5:31 Victor Kamensky
  2014-04-16  5:31 ` Victor Kamensky
  0 siblings, 1 reply; 18+ messages in thread
From: Victor Kamensky @ 2014-04-16  5:31 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Guys,

Here is my understanding of Dave's and Russell's suggestion on [1] 
to use direct write of xol slot instructions to user space. Now 
posting patch through 'git send-email' since, as it was noted, my
mailer corrupts patches otherwise.

Note default case with __copy_to_user is NOT tested. It addresses
David's remark.

Personally, I am very concerned about this patch because it creates
writable and executable page in traced process. The way how uprobes
is implemented such page will stay in process even if all uprobes
are detached from process. IMHO it may create possible attack hole.
I would prefer to see any executable memory read-only all the time.

On top of that, at least in ARM case xol page address is not even 
randomized, which was perfectly fine with current nowrite/noread,
just execute permissions.

Patch follows this cover letter.

Thanks,
Victor

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-April/247763.html

Victor Kamensky (1):
  ARM: uprobes xol write directly to userspace

 arch/arm/kernel/uprobes.c |  8 ++++++++
 include/linux/uprobes.h   |  3 +++
 kernel/events/uprobes.c   | 28 +++++++++++++++++++---------
 3 files changed, 30 insertions(+), 9 deletions(-)

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-04-21 17:56 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-16  5:31 [RFC PATCH v4] ARM: uprobes xol write directly to userspace Victor Kamensky
2014-04-16  5:31 ` Victor Kamensky
2014-04-16 14:51   ` Oleg Nesterov
2014-04-16 15:00     ` David Miller
2014-04-16 16:43       ` Oleg Nesterov
2014-04-16 17:38         ` David Miller
2014-04-16 19:18           ` Oleg Nesterov
2014-04-16 19:37             ` David Miller
2014-04-16 20:24               ` David Long
2014-04-16 21:21                 ` David Miller
2014-04-16 22:01                   ` Victor Kamensky
2014-04-16 22:25                   ` Russell King - ARM Linux
2014-04-16 23:19                     ` David Long
2014-04-21 16:16                     ` David Long
2014-04-21 16:41                       ` Linus Torvalds
2014-04-21 17:56                       ` Victor Kamensky
2014-04-16 19:53             ` Russell King - ARM Linux
2014-04-16 20:23               ` Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).