mirror of
https://github.com/eunomia-bpf/bpf-developer-tutorial.git
synced 2026-02-03 18:24:27 +08:00
Deploying to gh-pages from @ eunomia-bpf/bpf-developer-tutorial@426e993507 🚀
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
||||
#include <bpf/bpf_helpers.h>
|
||||
#include <bpf/bpf_tracing.h>
|
||||
#include <bpf/bpf_core_read.h>
|
||||
#include "common.h"
|
||||
#include "replace.h"
|
||||
|
||||
char LICENSE[] SEC("license") = "Dual BSD/GPL";
|
||||
|
||||
@@ -268,7 +268,8 @@ int check_possible_addresses(struct trace_event_raw_sys_exit *ctx) {
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// we can use bpf_strncmp here, but it's not available in the kernel version older
|
||||
// we can use bpf_strncmp here,
|
||||
// but it's not available in the kernel version older than 5.17
|
||||
if (bpf_strncmp(name, text_len_max, (const char *)text_find) == 0) {
|
||||
// ***********
|
||||
// We've found out text!
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <argp.h>
|
||||
#include <unistd.h>
|
||||
#include "replace.skel.h"
|
||||
#include "common.h"
|
||||
#include "replace.h"
|
||||
|
||||
|
||||
#include <bpf/bpf.h>
|
||||
|
||||
@@ -26,14 +26,4 @@ struct event {
|
||||
bool success;
|
||||
};
|
||||
|
||||
struct tr_file {
|
||||
char filename[FILENAME_LEN_MAX];
|
||||
unsigned int filename_len;
|
||||
};
|
||||
|
||||
struct tr_text {
|
||||
char text[TEXT_LEN_MAX];
|
||||
unsigned int text_len;
|
||||
};
|
||||
|
||||
#endif // BAD_BPF_COMMON_H
|
||||
Reference in New Issue
Block a user