diff --git a/arch/x86/include/asm/trace/mpx.h b/arch/x86/include/asm/trace/mpx.h index c13c6fa3fa92c33f78d7127cfcb83b5822b9778b..173dd3ba108cb1200e83acd33e9deab854d62e54 100644 --- a/arch/x86/include/asm/trace/mpx.h +++ b/arch/x86/include/asm/trace/mpx.h @@ -95,6 +95,22 @@ DEFINE_EVENT(mpx_range_trace, mpx_unmap_search, TP_ARGS(start, end) ); +TRACE_EVENT(mpx_new_bounds_table, + + TP_PROTO(unsigned long table_vaddr), + TP_ARGS(table_vaddr), + + TP_STRUCT__entry( + __field(unsigned long, table_vaddr) + ), + + TP_fast_assign( + __entry->table_vaddr = table_vaddr; + ), + + TP_printk("table vaddr:%p", (void *)__entry->table_vaddr) +); + #else /* diff --git a/arch/x86/mm/mpx.c b/arch/x86/mm/mpx.c index 55729ee9263edb24e2bb70c0d0450dc6d6d453d1..c17fd27579af1c4c2b8a57240894a82f04bd5469 100644 --- a/arch/x86/mm/mpx.c +++ b/arch/x86/mm/mpx.c @@ -483,6 +483,7 @@ static int allocate_bt(long __user *bd_entry) ret = -EINVAL; goto out_unmap; } + trace_mpx_new_bounds_table(bt_addr); return 0; out_unmap: vm_munmap(bt_addr & MPX_BT_ADDR_MASK, MPX_BT_SIZE_BYTES);