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-next>] [day] [month] [year] [list]
Message-ID: <d58b966615c0a9978ec314ff1e5c53a7.squirrel@localhost>
Date:	Wed, 25 Aug 2010 13:35:23 -0500
From:	david.hagood@...il.com
To:	linux-kernel@...r.kernel.org
Subject: Allocating memory aligned on 1M boundary?

Is there a way to allocate a block of memory that is
a) contiguous in physical layout
b) large (ca. 1M or so)
c) aligned on a large boundary (e.g. 1M boundary) in physical address

I have a hardware device (specifically, the PCIe controller of a Freescale
8641D PPC microprocessor) that requires a large amount of RAM to operate,
and requires that RAM to be aligned on the size of the element (that is,
if you use a 1M buffer, then the starting address of that RAM must be
0x???00000 so that the address translation unit can map from the PCIe
address to the local address).

Hugepages might work, but I see no guarantee that the alignment would be met.

Yes, I could allocate 2x the desired size, then use that part of what I
allocate that is correctly aligned, but then I am guaranteed to waste half
of what I allocate.

I'd rather NOT use the boottime allocation tricks if possible.

Scatter/Gather is not supported by the hardware, so that is out.

Any good suggestions?


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