print si_addr_lsb in sigaction
The si_addr_lsb field specifies the extent of the memory corruption,
encoded as the log2 of the size. We print this value to determine
whether the poisoned memory region corresponds to a normal page or
a huge page.
Signed-off-by: winterddd <tianruidong@linux.alibaba.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
diff --git a/einj_mem_uc.c b/einj_mem_uc.c
index 39c8c71..438adbc 100644
--- a/einj_mem_uc.c
+++ b/einj_mem_uc.c
@@ -985,7 +985,7 @@
 
 static void recover(int sig, siginfo_t *si, void *v)
 {
-	printf("signal %d code %d addr %p\n", sig, si->si_code, si->si_addr);
+	printf("signal %d code %d addr %p lsb %d\n", sig, si->si_code, si->si_addr, si->si_addr_lsb);
 	siglongjmp(env, 1);
 }