Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7486076

Browse files
inhibit some sections of code that breaks when rendering
1 parent 6626ce8 commit 7486076

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎examples/syscall-ftrace.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@ typedef struct ftrace_hook {
4848
struct ftrace_ops ops; // ftrace structure
4949
} ftrace_hook_t;
5050

51+
// clang-format off
5152
#define PREPARE_HOOK(_nr, _hook, _orig) \
5253
{ \
5354
.nr = (_nr), .new = (_hook), .orig = (_orig) \
5455
}
5556

5657
unsigned long **sys_call_table;
58+
// clang-format on
5759

5860
/**
5961
* For the sake of simplicity, only the kprobe method is included.
@@ -184,10 +186,12 @@ static asmlinkage long our_sys_openat(struct pt_regs *regs)
184186
* Change regs->si to appropriate registers
185187
* if you are trying on different architecture.
186188
*/
189+
// clang-format off
187190
if (copy_from_user(kfilename, (char __user *)regs->si, MAX_FILENAME_SIZE) < 0) {
188191
kfree(kfilename);
189192
return original_call(regs);
190193
}
194+
// clang-format on
191195

192196
pr_info("[syscall-ftrace] File opened by UID %d: %s\n", uid, kfilename);
193197
kfree(kfilename);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /