Skip to contentSkip to conversation

drivers/testing/heapcheck: Add compat support

PATCH New Jan Kiszka 1 participant 1 message Jun 8, 2021

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH v2 1/1 drivers/testing/heapcheck: Add compat support

From: Jan Kiszka <[email protected]>

This unbreaks smokey's memory_coreheap check with 32-bit userland on 64-bit kernels.

---

Changes in v2:
- address build error
- better readable structuring of compat vs. standard case

 include/cobalt/kernel/rtdm/testing.h |  5 ++++
 kernel/drivers/testing/heapcheck.c   | 43 ++++++++++++++++++++++------
 2 files changed, 39 insertions(+), 9 deletions(-)
include/cobalt/kernel/rtdm/testing.h +5 -0
index 070ee98fe..d2669e122 100644
@@ -32,6 +32,11 @@ struct compat_rttst_overall_bench_res {
 	compat_uptr_t histogram_max;
 };
 
+struct compat_rttst_heap_stathdr {
+	int nrstats;
+	compat_uptr_t buf;
+};
+
 #define RTTST_RTIOC_TMBENCH_STOP_COMPAT \
 	_IOWR(RTIOC_TYPE_TESTING, 0x11, struct compat_rttst_overall_bench_res)
 
kernel/drivers/testing/heapcheck.c +34 -9

61 lines not on this page · raw message

Signature · 1 line
2.26.2