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:	Sat, 14 Jul 2007 15:20:02 -0400
From:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To:	Christoph Hellwig <hch@...radead.org>, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org, prasanna@...ibm.com,
	ananth@...ibm.com, anil.s.keshavamurthy@...el.com,
	davem@...emloft.net
Subject: Re: [patch 1/8] Kprobes - do not use kprobes mutex in arch code

* Christoph Hellwig (hch@...radead.org) wrote:
> On Fri, Jul 13, 2007 at 09:21:34PM -0400, Mathieu Desnoyers wrote:
> > Remove the kprobes mutex from kprobes.h, since it does not belong there. Also
> > remove all use of this mutex in the architecture specific code, replacing it by
> > a proper mutex lock/unlock in the architecture agnostic code.
> 
> This is not very nice for avr32/sparc64 which have a noop arch_remove_kprobe
> and now need to take a mutex to do nothing.  Maybe you can find a nice
> way to avoid that?
> 
> Except for this issue making kprobes_mutex static to kprobes.c sounds like
> a good improvement.
> 

Since only unregister_kprobe() calls arch_remove_kprobe(), and only
after having removed the struct kprobe from the kprobes list (while the
kprobes mutex is held), I wonder if there is any need to hold the
kprobes mutex at all when calling arch_remove_kprobe(). It turns out
that only get_insn_slot()/free_insn_slot() (which is in
kernel/kprobes.c, but called from arch specific code) seems to really
use protection of this mutex.

Would it make sense to protect the kprobe_insn_pages list with a
new kprobe_insn_mutex, nestable in the kprobe_mutex ?

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
-
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