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] [day] [month] [year] [list]
Date:	27 Sep 2006 12:12:09 -0400
From:	fche@...hat.com (Frank Ch. Eigler)
To:	Mathieu Desnoyers <compudj@...stal.dyndns.org>
Cc:	Martin Bligh <mbligh@...gle.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	prasanna@...ibm.com, Andrew Morton <akpm@...l.org>,
	Ingo Molnar <mingo@...e.hu>, Paul Mundt <lethal@...ux-sh.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Jes Sorensen <jes@....com>, Tom Zanussi <zanussi@...ibm.com>,
	Richard J Moore <richardj_moore@...ibm.com>,
	Michel Dagenais <michel.dagenais@...ymtl.ca>,
	Christoph Hellwig <hch@...radead.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	William Cohen <wcohen@...hat.com>, ltt-dev@...fik.org,
	systemtap@...rces.redhat.com, Alan Cox <alan@...rguk.ukuu.org.uk>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Karim Yaghmour <karim@...rsys.com>,
	Pavel Machek <pavel@...e.cz>, Joe Perches <joe@...ches.com>,
	"Randy.Dunlap" <rdunlap@...otime.net>,
	"Jose R. Santos" <jrs@...ibm.com>
Subject: Re: [PATCH] Linux Kernel Markers 0.11 for 2.6.17

Hi -

Mathieu Desnoyers <compudj@...stal.dyndns.org> writes:

> [...]
> > That involves new conventions beyond printf.  Why not "%p %p %u %u"
> > for two blobs ... or why implicitly dereference the given pointers.  A
> > probe handler unaware of a specific marker's semantics would not know
> > whether or not this is implied.
> 
> [...]
> So yes, there is a semantic to create, but I don't see the problem with that.

That's a part of my point.  The marker data types marked up with
printf directives do not fully describe the data - in this case
whether it is a raw pointer or a data blob that is being marked.

> And why would the probe actually know what to do with a pointer ? If
> it only wants to record the pointer's address or if it wants to
> access data inside this pointer, it's up to the probe (or automatic
> probe generator, hum ?) to do it.

Of course, but that precludes a general client tool, such as (say) a
trace-only handler.

> > > I think that duplicating the number of marker macros could easily make
> > > them unflexible and ugly. [...]
> > 
> > Inflexible and ugly in what way?  [...]
> 
> I don't expect the kernel programmer community to accept that their code will
> call an automatically generated macro. It removes all the idea of "I can see
> what code is actually generated by my function", which I believe is necessary.

Not at all - the generated macros can sit in-tree and are easily
inspected.  Check out gen-stapmark.h and stapmark.h at
<http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/?cvsroot=systemtap>.

> Also, people are used to the simplicity and flexibility of printf
> style format strings.

True, but is this in context of the existing tracing/probing
facilities?  Unless I'm mistaken, ltt functions doesn't use them; nor
does blktrace.  Other than printk, are there any?

> Do you really expect people to start using various macros like
> MARK_u_p_llu

I don't know.  Using gcc extensions such as __builtin_typeof() could
automate the typing aspect, leaving only the arity as a
programmer-visible text.

> and start defining their own marker macro each time they want to add
> a specific type ?

Well, adding a new type would be at last as hard in the printf case.


> [...] However, if you want to create probes that are type-safe, you
> can then create a script that will extract all the format strings in
> the markers section of the object and automatically generate all the
> probes with their respective va_args setup at the beginning of the
> probe. [...]

This could work.  OTOH this relies on an as-yet-unwritten script, and
additional run-time costs (the parameter-by-parameter va_arg copying).

I wonder if writing a functional back-end for these markers should be
considered a corequisite for this work; or in the alternative, whether
it's good enough to start putting markers into the code, and revamp
their implementation later if necessary.


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