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, 25 Jul 2009 11:38:49 -0400
From:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Thomas Gleixner <tglx@...uxtronix.de>,
	Mike Galbraith <efault@....de>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Anton Blanchard <anton@...ba.org>,
	Li Zefan <lizf@...fujitsu.com>,
	Zhaolei <zhaolei@...fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	"K . Prasad" <prasad@...ux.vnet.ibm.com>,
	Alan Stern <stern@...land.harvard.edu>
Subject: Re: [RFC][PATCH 1/5] hw-breakpoints: Make kernel breakpoints API
	truly generic

* Frederic Weisbecker (fweisbec@...il.com) wrote:
> On Mon, Jul 20, 2009 at 01:27:48PM -0400, Mathieu Desnoyers wrote:
[...]
> 
> > Maybe we should think of a more flexible breakpoint type mapping too,
> > e.g.:
> > 
> >  monitor _strictly_ execute operation on address 0x...
> >    -> would fail if the architecture does not support execution access
> >       monitoring
> >  monitor (at least) execute operations on address 0x...
> >    -> would be allowed to use a more general monitor (e.g. RWX) if the
> >       architecture does not support "execute only" monitor.
> > 
> > (same for read and write)
> > 
> > Mathieu
> 
> 
> Well, I'm not sure the problem mostly resides in the hardware implementation
> of strict exec breakpoint types. But I guess your point is not limiting to
> that. Yeah for example, x86 doesn't support read-only breakpoints.

Exactly. I used "execute" only as an example, but in the end, we could
end up with a list looking like:

HW_WATCH_R	(1 << 0)
HW_WATCH_NOT_R	(1 << 0)
HW_WATCH_W	(1 << 1)
HW_WATCH_NOT_W	(1 << 1)
HW_WATCH_X	(1 << 2)
HW_WATCH_NOT_X	(1 << 2)

So for instance, flags :

HW_WATCH_R|HW_WATCH_NOT_W|HW_WATCH_NOT_X

would specify that the architecture has to support a "read" watchpoint
which does not trigger on write nor execute.

HW_WATCH_R

would specify that the architecture _must_ support "read" watchpoint,
and we don't care about W or X.

HW_WATCH_R|HW_WATCH_W|HW_WATCH_X

Would ask for watching rwx on an address. The architecture would have to
support all those three.

Some combinations would be invalid (e.g. HW_WATCH_R|HW_WATCH_NOT_R).

There might be better ways to express this, but at this it should show
my point a bit more clearly.

Mathieu


> But I guess that can be simulated using software artifacts, for example using
> READ-WRITE breakpoints + the x86 decoder API, recently submitted by Masami,
> to find the nature of the current instruction.
> 
> Anyway, your point is indeed important: return common error values for unsupported
> breakpoint operations.
> 
> Thanks.
> 

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