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:	Sun, 21 Oct 2007 12:48:14 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	drzeus@...eus.cx
Cc:	netdev@...r.kernel.org
Subject: Re: net: alignment problem in icmp code

From: Pierre Ossman <drzeus@...eus.cx>
Date: Sun, 21 Oct 2007 11:34:05 +0200

> Inlining isn't the problem, but the defined semantics of assignment
> versus memcpy(). memcpy() must work on any region of memory, whilst
> assignment must only work on a properly aligned object.

You are missing a crucial point.

The compiler may emit the same exact loads and stores when it inlines
memcpy() if it "knows" the objects are aligned properly.  And it very
much will do this.

If the compiler is calling memcpy() in your build, it's only because
gcc believes the the object is too big to optimally memcpy() inline.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists