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-next>] [day] [month] [year] [list]
Message-Id: <1424967232-2923-1-git-send-email-pmladek@suse.cz>
Date:	Thu, 26 Feb 2015 17:13:45 +0100
From:	Petr Mladek <pmladek@...e.cz>
To:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	"David S. Miller" <davem@...emloft.net>,
	Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Ingo Molnar <mingo@...hat.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Jiri Kosina <jkosina@...e.cz>, linux-kernel@...r.kernel.org,
	Petr Mladek <pmladek@...e.cz>
Subject: [PATCH 0/7] kprobe: Handle error when Kprobe ftrace arming fails

arm_kprobe_ftrace() could fail, especially after introducing ftrace IPMODIFY
flag and LifePatching. This patch set adds the error handling and also some
related fixes.

1st patch includes the most important change. It helps to keep Kprobes
in a sane state.

2nd and 3rd patch allows to propagate the error where needed.

The other patches fix problems with the global kprobes_all_disarmed flag.
They were there even before but they become more visible and critical
after the arming errors became propagated.


The first patch looks rather safe and might be suitable even for 4.0.

However, I would feel more comfortable if the other patches get some
testing in linux-next. I did quite some testing and did my best. But
I started with the three patches and was surprised by the effect of
the propagated errors. They triggered that BUG_ON() in
__unregister_kprobe_top() are required the other patches
to get it working. I wonder if there is any other scenario that
I have missed.

Of course, I also wait for feedback how to make things better.


Petr Mladek (7):
  kprobes: Disable Kprobe when ftrace arming fails
  kprobes: Propagate error from arm_kprobe_ftrace()
  kprobes: Propagate error from disarm_kprobe_ftrace()
  kprobes: Keep consistent state of kprobes_all_disarmed
  kprobes: Do not try to disarm already disarmed Kprobe
  kprobes: Check kprobes_all_disarmed in kprobe_disarmed()
  kprobes: Mark globally disabled Kprobes in debugfs interface

 Documentation/kprobes.txt |   5 +-
 kernel/kprobes.c          | 279 ++++++++++++++++++++++++++++++++++------------
 2 files changed, 213 insertions(+), 71 deletions(-)

-- 
1.8.5.6

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ