All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] parisc: report inequivalent aliases only for writeable mappings
@ 2014-01-22 19:11 Mikulas Patocka
  2014-01-22 19:24 ` James Bottomley
  0 siblings, 1 reply; 9+ messages in thread
From: Mikulas Patocka @ 2014-01-22 19:11 UTC (permalink / raw)
  To: John David Anglin; +Cc: Helge Deller, linux-parisc

Hi

Here I'm sending a fix for parisc for Debian 5 userspace.

I'm just curious - why are those kmap_atomic and kunmap_atomic overrides 
needed while other architectures with virtually indexed caches (such as 
sparc) don't override these functions? It is that the other architectures 
flush cache at differnet points where parisc doesn't flush it?

Mikulas


From: Mikulas Patocka <mpatocka@redhat.com>

The patch f8dae00684d678afa13041ef170cecfd1297ed40 breaks Debian 5
userspace. After application of the patch, you get a lot of INEQUIVALENT
ALIASES messages on various dynamic libraries - so many that the system is
unbootable.

This patch changes it so that INEQUIVALENT ALIASES are only reported for
writeable mappings. PA-RISC specification allows inequivalent aliases for
read-only mappings, so there's no need to report them as an error.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org

---
 arch/parisc/kernel/cache.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-3.13/arch/parisc/kernel/cache.c
===================================================================
--- linux-3.13.orig/arch/parisc/kernel/cache.c	2014-01-20 21:40:18.000000000 +0100
+++ linux-3.13/arch/parisc/kernel/cache.c	2014-01-20 21:43:23.000000000 +0100
@@ -325,7 +325,7 @@ void flush_dcache_page(struct page *page
 		flush_tlb_page(mpnt, addr);
 		if (old_addr == 0 || (old_addr & (SHMLBA - 1)) != (addr & (SHMLBA - 1))) {
 			__flush_cache_page(mpnt, addr, page_to_phys(page));
-			if (old_addr)
+			if (old_addr && unlikely(mapping->i_mmap_writable != 0))
 				printk(KERN_ERR "INEQUIVALENT ALIASES 0x%lx and 0x%lx in file %s\n", old_addr, addr, mpnt->vm_file ? (char *)mpnt->vm_file->f_path.dentry->d_name.name : "(null)");
 			old_addr = addr;
 		}

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-01-23 19:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-22 19:11 [PATCH] parisc: report inequivalent aliases only for writeable mappings Mikulas Patocka
2014-01-22 19:24 ` James Bottomley
2014-01-22 20:39   ` Mikulas Patocka
2014-01-22 20:57     ` James Bottomley
2014-01-22 21:31       ` Mikulas Patocka
2014-01-22 21:45         ` John David Anglin
2014-01-22 22:27           ` Mikulas Patocka
2014-01-23  2:26             ` John David Anglin
2014-01-23 19:21               ` Helge Deller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.