tracing/user_events: Use alloc_pages instead of kzalloc() for register pages
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 11 Mar 2022 23:59:57 +0000 (18:59 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 11 Mar 2022 23:59:57 +0000 (18:59 -0500)
commitbc47ee4844d6b7d7351536cd99d35848c4449689
tree4e2f58ea38542874c6f7dac680a350ea600da358
parent380af29b8d7670c445965bd573ab219aff0c4c11
tracing/user_events: Use alloc_pages instead of kzalloc() for register pages

kzalloc virtual addresses do not work with SetPageReserved, use the actual
page virtual addresses instead via alloc_pages.

The issue is reported when booting with user_events and
DEBUG_VM_PGFLAGS=y.

Also make the number of events based on the ORDER.

Link: https://lore.kernel.org/all/CADYN=9+xY5Vku3Ws5E9S60SM5dCFfeGeRBkmDFbcxX0ZMoFing@mail.gmail.com/
Link: https://lore.kernel.org/all/20220311223028.1865-1-beaub@linux.microsoft.com/
Cc: Beau Belgrave <beaub@linux.microsoft.com>
Reported-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events_user.c