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]
Message-ID: <alpine.DEB.2.00.0907141332060.32740@gandalf.stny.rr.com>
Date:	Tue, 14 Jul 2009 13:35:35 -0400 (EDT)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Jens Axboe <jens.axboe@...cle.com>
cc:	Li Zefan <lizf@...fujitsu.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Alan.Brunelle@...com, Ingo Molnar <mingo@...e.hu>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH] Fix blktrace unaligned memory access



On Fri, 10 Jul 2009, Jens Axboe wrote:

> On Fri, Jul 10 2009, Li Zefan wrote:
> > Jens Axboe wrote:
> > > On Fri, Jul 10 2009, Li Zefan wrote:
> > >> Jens Axboe wrote:
> > >>> Hi,
> > >>>
> > >>> It seems that relay_reserve() (or the ring_buffer_event_data(), that one
> > >>> still needs some love) can return unaligned memory, there's no way
> > >>> around that when you have pdu lengths that aren't a nice size. This can
> > >>> cause unaligned access warnings on platforms that care about alignment.
> > >>>
> > >> Seems relay_reserve() does nothing for alignment..On the other hand,
> > >> ring_buffer_event_data() returns a ptr which is 32bit-aligned, but
> > >> this still means it can cause unaligned accesses on 64bits arch, while
> > >> I think it's fixable in ring buffer, it's certainly not an easy job.

Correct, this is only needed if the data is bigger than 32 bits.


> > > 
> > > Right, it's a bit nasty...
> > > 
> > 
> > Lai Jiangshan noticed this issue long ago and had some ideas in mind
> > how to fix ring buffer, but never try it out for it will probably be
> > frustrating..

Perhaps we can make an attribute for the ring buffer itself that would 
allow the user to give an alignment. Would anything ever need a bigger 
than 64bit (8 byte) alignment? We can set a flag that says, make all 
entries 8 bytes aligned.

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