linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: fix is_gate_vma() when CONFIG_KUSER_HELPERS is enabled
@ 2013-08-05 10:32 Marc Zyngier
  2013-08-05 10:37 ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Zyngier @ 2013-08-05 10:32 UTC (permalink / raw)
  To: linux-arm-kernel

Commit a5463cd34354 (ARM: make vectors page inaccessible from
userspace) introduced the is_gate_vma() facility to identify the
vectors page, but a typo broke the /proc/<pid>/maps output:

[...]
b6ef4000-b6f0b000 r-xp 00000000 00:0c 3953760    /lib/arm-linux-gnueabi/ld-2.15.so
b6f0d000-b6f11000 rw-p 00000000 00:00 0          [vectors]
b6f11000-b6f12000 r-xp 00000000 00:00 0          [vectors]
b6f12000-b6f13000 r--p 00016000 00:0c 3953760    /lib/arm-linux-gnueabi/ld-2.15.so
b6f13000-b6f14000 rw-p 00017000 00:0c 3953760    /lib/arm-linux-gnueabi/ld-2.15.so
be886000-be8a7000 rw-p 00000000 00:00 0          [vectors]
ffff0000-ffff1000 r-xp 00000000 00:00 0          [vectors]
[...]

With the fix in place, it now reads (different run, hence the
slightly different output):

[...]
b6fb1000-b6fc8000 r-xp 00000000 00:0c 3953760    /lib/arm-linux-gnueabi/ld-2.15.so
b6fca000-b6fce000 rw-p 00000000 00:00 0
b6fce000-b6fcf000 r-xp 00000000 00:00 0          [sigpage]
b6fcf000-b6fd0000 r--p 00016000 00:0c 3953760    /lib/arm-linux-gnueabi/ld-2.15.so
b6fd0000-b6fd1000 rw-p 00017000 00:0c 3953760    /lib/arm-linux-gnueabi/ld-2.15.so
bea41000-bea62000 rw-p 00000000 00:00 0          [stack]
ffff0000-ffff1000 r-xp 00000000 00:00 0          [vectors]
[...]

Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 arch/arm/kernel/process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 536c85f..94f6b05 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -462,7 +462,7 @@ int in_gate_area_no_mm(unsigned long addr)
 {
 	return in_gate_area(NULL, addr);
 }
-#define is_gate_vma(vma)	((vma) = &gate_vma)
+#define is_gate_vma(vma)	((vma) == &gate_vma)
 #else
 #define is_gate_vma(vma)	0
 #endif
-- 
1.8.2.3

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

end of thread, other threads:[~2013-08-05 10:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-05 10:32 [PATCH] ARM: fix is_gate_vma() when CONFIG_KUSER_HELPERS is enabled Marc Zyngier
2013-08-05 10:37 ` Russell King - ARM Linux
2013-08-05 10:39   ` Marc Zyngier
2013-08-05 10:45     ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).