Attempting to patch a syscall results in an error due to a missing
fentry hook in the inner __do_sys##name() function. The fentry hook is
missing because of the 'inline' annotation, which invokes 'notrace'.
Add some kpatch-specific syscall definition macros which can be used for
patching a syscall.
These macros are copied almost verbatim from the kernel, the main
difference being a 'kpatch' prefix added to the __do_sys##name()
function name. This causes kpatch-build to treat it as a new function
(due to its new name), and its caller __se_sys##name() function is
inlined by its own caller __x64_sys##name() function, which has an
fentry hook.
To patch a syscall, just use replace the use of the SYSCALL_DEFINE1 (or
similar) macro with the "KPATCH_" prefixed version.
Fixes: #1171
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>