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:	Fri, 01 May 2009 14:25:09 -0700
From:	Josh Stone <jistone@...hat.com>
To:	Christoph Hellwig <hch@...radead.org>
CC:	Jason Baron <jbaron@...hat.com>, mingo@...e.hu,
	rostedt@...dmis.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] export softirq_to_name symbol

On 05/01/2009 01:22 PM, Christoph Hellwig wrote:
> On Fri, May 01, 2009 at 01:17:59PM -0700, Josh Stone wrote:
>> More precisely, it's the piece of code that copies the trace into an
>> __entry pointer.  In my case, __entry has nothing to do with the ring
>> buffer.
> 
> Well, it should be the ring buffer.  If you want to do something more
> fancy rewrite it in proper C code and submit a patch for discussion to
> lkml.

It's not that fancy -- this is basically it:

#define __field(type, item)         type item;
#define __array(type, item, len)    type item[len];
#define __string(item, src)         const char * __str_##item;
#define __assign_str(item, src)     __entry->__str_##item = src
#define __get_str(item)             __entry->__str_##item
#define TRACE_EVENT(name, proto, args, tstruct, assign, print)  \
  static inline int                                             \
  trace_snprintf_##name(char * __buf, size_t __size, proto) {   \
    struct { tstruct } __value, *__entry = &__value;            \
    assign;                                                     \
    return snprintf(__buf, __size, print);                      \
  }

I don't know if anyone would need this besides stap, but I can post it
as a patch if there's interest.

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