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:	Fri, 14 Jun 2013 13:32:58 -0700
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Russell King <linux@....linux.org.uk>
Cc:	linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	Rob Herring <rob.herring@...xeda.com>
Subject: [PATCH v2 2/2] ARM: mmu: Introduce iotable_init_caller()

Now that debug_ll_io_init() maps memory via iotable_init() we
don't get much information in vmallocinfo about what the mapping
corresponds to. Introduce iotable_init_caller() that does the
same thing as iotable_init() except that it allows us to specify
the function that should appear in vmallocinfo. This allows us to
differentiate the debug_ll mapping from the other iotable_init()
mappings.

Cc: Rob Herring <rob.herring@...xeda.com>
Signed-off-by: Stephen Boyd <sboyd@...eaurora.org>
---

I'm ok without this patch. Using __builtin_return_address(0) seems
to do alright on framepointer builds but fails on unwind table
builds so I went with this approach.

 arch/arm/mm/mmu.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 18b8aeb..0699bee 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -811,10 +811,8 @@ static void __init create_mapping(struct map_desc *md)
 	} while (pgd++, addr != end);
 }
 
-/*
- * Create the architecture specific mappings
- */
-void __init iotable_init(struct map_desc *io_desc, int nr)
+static void __init
+iotable_init_caller(struct map_desc *io_desc, int nr, void *caller)
 {
 	struct map_desc *md;
 	struct vm_struct *vm;
@@ -834,11 +832,19 @@ void __init iotable_init(struct map_desc *io_desc, int nr)
 		vm->phys_addr = __pfn_to_phys(md->pfn);
 		vm->flags = VM_IOREMAP | VM_ARM_STATIC_MAPPING;
 		vm->flags |= VM_ARM_MTYPE(md->type);
-		vm->caller = iotable_init;
+		vm->caller = caller;
 		add_static_vm_early(svm++);
 	}
 }
 
+/*
+ * Create the architecture specific mappings
+ */
+void __init iotable_init(struct map_desc *io_desc, int nr)
+{
+	iotable_init_caller(io_desc, nr, iotable_init);
+}
+
 void __init vm_reserve_area_early(unsigned long addr, unsigned long size,
 				  void *caller)
 {
@@ -947,7 +953,7 @@ void __init debug_ll_io_init(void)
 	map.virtual &= PAGE_MASK;
 	map.length = PAGE_SIZE;
 	map.type = MT_DEVICE;
-	iotable_init(&map, 1);
+	iotable_init_caller(&map, 1, debug_ll_io_init);
 }
 #endif
 
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

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