[prev in list] [next in list] [prev in thread] [next in thread]
List: openvz-criu
Subject: [PATCH] arm: align the allocated memory unconditionally
From: aleksandr.kartashov.aptu.se () gmail ! com (Aleksandr Kartashov)
Date: 2013-01-29 18:30:11
Message-ID: mailman.2.1359622380.3202.criu () openvz ! org
[Download RAW message or body]
Currently IPC SHM works in a strange way on ARM:
the syscall sys_shmat() requires the argument shmaddr
be SHMLBA-aligned (ARM has the macro __ARCH_FORCE_SHMLBA
unconditionally defined) but allocates memory that
isn't SHMLBA-aligned because the value of memory alignment
depends on presense of certain cache aliases. Such a behavior
makes IPC SHM C/R impossible since an SHM segment
may be not SHMLBA-aligned so it can't be guaranteed
to be restorable.
This patch makes file-mmapped memory be unsconditionaly
SHMLBA-aligned.
---
arch/arm/mm/mmap.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c
index 10062ce..eca577e3 100644
--- a/arch/arm/mm/mmap.c
+++ b/arch/arm/mm/mmap.c
@@ -65,8 +65,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
* We only need to do colour alignment if either the I or D
* caches alias.
*/
- if (aliasing)
- do_align = filp || (flags & MAP_SHARED);
+ do_align = filp || (flags & MAP_SHARED);
/*
* We enforce the MAP_FIXED case.
--
1.7.2.5
--------------010804040404020700020908--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic