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:	Wed, 24 Sep 2008 17:17:52 -0400 (EDT)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Martin Bligh <mbligh@...gle.com>
cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	prasad@...ux.vnet.ibm.com,
	Mathieu Desnoyers <compudj@...stal.dyndns.org>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	David Wilder <dwilder@...ibm.com>, hch@....de,
	Tom Zanussi <zanussi@...cast.net>,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: [RFC PATCH 1/3] Unified trace buffer


On Wed, 24 Sep 2008, Martin Bligh wrote:
> 
> How about we just steal 5 bits from the timestamp to indicate event
> lengths up to 32 bytes, and if it's 0, that means there's a length
> field following? Also that'd mean you could use a longer length field
> and get beyond 256 bytes to 4096, without impacting most events.
> 
> struct {
>         u32 length:5, time_delta:27;

I think you mean this is where length == 0 ;-)

>         u16 length;
>         u8 buf[];
> };
> 
> struct {
>         u32 length:5, time_delta:27;        /* where length == 0 */
>         u8 buf[];
> };
> 
> Obviously we could less than 5 bits, even just 1 for a flag ...
> 

OK then. Since I like the idea of aligning the buffer to 8 bytes, we can 
always shift the length field by 3. So...

For records 256 bytes or less, we only have:

struct {
	u32 length:5, time_delta: 27;
	u8 buf[];
};

For 257 bytes or more we have:

struct {
	u32 length:5 (=0), time_delta: 27;
	u16 large_length;
	u8 buf[];
};

This is what you want?

-- Steve

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