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:	Tue, 19 Jun 2012 14:41:31 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	David Ahern <dsahern@...il.com>, acme@...stprotocols.net,
	linux-kernel@...r.kernel.org, fweisbec@...il.com,
	namhyung.kim@....com, mingo@...nel.org, peterz@...radead.org
Subject: Re: [RFC PATCH 0/2] libtraceevent/perf: Add support for trace-cmd plugins

On Mon, 18 Jun 2012 22:16:11 -0400, Steven Rostedt wrote:
> We can be a bit better at the raw print, sure. Here's the format that's
> there:
>
> 	field:__u64 rip;	offset:16;	size:8;	signed:0;
> 	field:__u32 csbase;	offset:24;	size:4;	signed:0;
> 	field:__u8 len;	offset:28;	size:1;	signed:0;
> 	field:__u8 insn[15];	offset:29;	size:15;	signed:0;
> 	field:__u8 flags;	offset:44;	size:1;	signed:0;
> 	field:__u8 failed;	offset:45;	size:1;	signed:0;
>
> It treated __u* as decimal numbers, but it also saw that insn[15] was an
> array, and with single bytes at that. So it thought it was a string, and
> tried to print it out as such.
>
> We can change the heuristics of this to make it more readable.
>

Right. The current heuristic treats an u8 array as a string:

static int field_is_string(struct format_field *field)
{
	if ((field->flags & FIELD_IS_ARRAY) &&
	    (strstr(field->type, "char") || strstr(field->type, "u8") ||
	     strstr(field->type, "s8")))
		return 1;

	return 0;
}

Do you want to get rid of u8 from the function? Or is there a
better way?

Thanks,
Namhyung
--
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