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:	Mon, 11 Dec 2006 15:52:47 -0800
From:	Matt Helsley <matthltc@...ibm.com>
To:	Pete Zaitcev <zaitcev@...hat.com>
Cc:	Erik Jacobson <erikj@....com>, guillaume.thouvenin@...l.net,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] connector: Some fixes for ia64 unaligned access errors

On Sat, 2006-12-09 at 18:34 -0800, Pete Zaitcev wrote:
> On Sat, 9 Dec 2006 15:09:13 -0600, Erik Jacobson <erikj@....com> wrote:
> 
> > > Please try to declare u64 timestamp_ns, then copy it into the *ev
> > > instead of copying whole *ev. This ought to fix the problem if
> > > buffer[] ends aligned to 32 bits or better.
> >
> > So I took this suggestion for a spin and met with the same result.
> > The unaligned access messages are still produced.
> 
> I see. And I see you went a few steps forward with dignosing it:
> 
> > dbg fork after timespec_to_ns call, b4 memcpy
> > kernel unaligned access to 0xe000003076b6fbe4, ip=0xa0000001004f1480
> > dbg fork after memcpy, b4 other ev settings...
> 
> > a0000001004f1470 <proc_fork_connector+0x1f0> [MMI]       ld8 r40=[r14]
> > a0000001004f1476 <proc_fork_connector+0x1f6>             ld8 r38=[r38]
> > a0000001004f147c <proc_fork_connector+0x1fc>             nop.i 0x0;;
> > a0000001004f1480 <proc_fork_connector+0x200> [MIB]       st8 [r39]=r40
> > a0000001004f1486 <proc_fork_connector+0x206>             nop.i 0x0
> > a0000001004f148c <proc_fork_connector+0x20c>             br.call.sptk.many b0=a0000001000a36c0 <printk>;;

I'm not very familiar with ia64 asm but it looks like its loading and
storying 8 bytes at a time for the memcpy().

> It seems rather strange that memcpy gets optimized this way. I could
> not have foreseen it. Still, it was worth a try, even if putting 32
> extra bytes on stack and running memcpy on them does not seem too
> onerous, for a fork(). Thanks for doing it, and let's go with your
> original patch then... if Matt Helsley does not mind.

OK, I'll ack the original.

> Thank you,
> -- Pete

	I'm shocked memcpy() introduces 8-byte stores that violate architecture
alignment rules. Is there any chance this a bug in ia64's memcpy()
implementation? I've tried to read it but since I'm not familiar with
ia64 asm I can't make out significant parts of it in
arch/ia64/lib/memcpy.S.

<snip>

Cheers,
	-Matt Helsley

-
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