Commit bd4d67f8 authored by Lin Yikai's avatar Lin Yikai Committed by Alexei Starovoitov

libbpf: fix some typos in libbpf

Hi, fix some spelling errors in libbpf, the details are as follows:

-in the code comments:
	termintaing->terminating
	architecutre->architecture
	requring->requiring
	recored->recoded
	sanitise->sanities
	allowd->allowed
	abover->above
	see bpf_udst_arg()->see bpf_usdt_arg()
Signed-off-by: default avatarLin Yikai <yikai.lin@vivo.com>
Link: https://lore.kernel.org/r/20240905110354.3274546-3-yikai.lin@vivo.comSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent a86857d2
...@@ -100,7 +100,7 @@ struct bpf_prog_load_opts { ...@@ -100,7 +100,7 @@ struct bpf_prog_load_opts {
__u32 log_level; __u32 log_level;
__u32 log_size; __u32 log_size;
char *log_buf; char *log_buf;
/* output: actual total log contents size (including termintaing zero). /* output: actual total log contents size (including terminating zero).
* It could be both larger than original log_size (if log was * It could be both larger than original log_size (if log was
* truncated), or smaller (if log buffer wasn't filled completely). * truncated), or smaller (if log buffer wasn't filled completely).
* If kernel doesn't support this feature, log_size is left unchanged. * If kernel doesn't support this feature, log_size is left unchanged.
...@@ -129,7 +129,7 @@ struct bpf_btf_load_opts { ...@@ -129,7 +129,7 @@ struct bpf_btf_load_opts {
char *log_buf; char *log_buf;
__u32 log_level; __u32 log_level;
__u32 log_size; __u32 log_size;
/* output: actual total log contents size (including termintaing zero). /* output: actual total log contents size (including terminating zero).
* It could be both larger than original log_size (if log was * It could be both larger than original log_size (if log was
* truncated), or smaller (if log buffer wasn't filled completely). * truncated), or smaller (if log buffer wasn't filled completely).
* If kernel doesn't support this feature, log_size is left unchanged. * If kernel doesn't support this feature, log_size is left unchanged.
......
...@@ -480,7 +480,7 @@ struct pt_regs; ...@@ -480,7 +480,7 @@ struct pt_regs;
#endif #endif
/* /*
* Similarly, syscall-specific conventions might differ between function call * Similarly, syscall-specific conventions might differ between function call
* conventions within each architecutre. All supported architectures pass * conventions within each architecture. All supported architectures pass
* either 6 or 7 syscall arguments in registers. * either 6 or 7 syscall arguments in registers.
* *
* See syscall(2) manpage for succinct table with information on each arch. * See syscall(2) manpage for succinct table with information on each arch.
...@@ -658,7 +658,7 @@ struct pt_regs; ...@@ -658,7 +658,7 @@ struct pt_regs;
* BPF_PROG is a convenience wrapper for generic tp_btf/fentry/fexit and * BPF_PROG is a convenience wrapper for generic tp_btf/fentry/fexit and
* similar kinds of BPF programs, that accept input arguments as a single * similar kinds of BPF programs, that accept input arguments as a single
* pointer to untyped u64 array, where each u64 can actually be a typed * pointer to untyped u64 array, where each u64 can actually be a typed
* pointer or integer of different size. Instead of requring user to write * pointer or integer of different size. Instead of requiring user to write
* manual casts and work with array elements by index, BPF_PROG macro * manual casts and work with array elements by index, BPF_PROG macro
* allows user to declare a list of named and typed input arguments in the * allows user to declare a list of named and typed input arguments in the
* same syntax as for normal C function. All the casting is hidden and * same syntax as for normal C function. All the casting is hidden and
......
...@@ -4192,7 +4192,7 @@ static bool btf_dedup_identical_structs(struct btf_dedup *d, __u32 id1, __u32 id ...@@ -4192,7 +4192,7 @@ static bool btf_dedup_identical_structs(struct btf_dedup *d, __u32 id1, __u32 id
* and canonical graphs are not compatible structurally, whole graphs are * and canonical graphs are not compatible structurally, whole graphs are
* incompatible. If types are structurally equivalent (i.e., all information * incompatible. If types are structurally equivalent (i.e., all information
* except referenced type IDs is exactly the same), a mapping from `canon_id` to * except referenced type IDs is exactly the same), a mapping from `canon_id` to
* a `cand_id` is recored in hypothetical mapping (`btf_dedup->hypot_map`). * a `cand_id` is recoded in hypothetical mapping (`btf_dedup->hypot_map`).
* If a type references other types, then those referenced types are checked * If a type references other types, then those referenced types are checked
* for equivalence recursively. * for equivalence recursively.
* *
......
...@@ -1848,7 +1848,7 @@ static char *internal_map_name(struct bpf_object *obj, const char *real_name) ...@@ -1848,7 +1848,7 @@ static char *internal_map_name(struct bpf_object *obj, const char *real_name)
snprintf(map_name, sizeof(map_name), "%.*s%.*s", pfx_len, obj->name, snprintf(map_name, sizeof(map_name), "%.*s%.*s", pfx_len, obj->name,
sfx_len, real_name); sfx_len, real_name);
/* sanitise map name to characters allowed by kernel */ /* sanities map name to characters allowed by kernel */
for (p = map_name; *p && p < map_name + sizeof(map_name); p++) for (p = map_name; *p && p < map_name + sizeof(map_name); p++)
if (!isalnum(*p) && *p != '_' && *p != '.') if (!isalnum(*p) && *p != '_' && *p != '.')
*p = '_'; *p = '_';
......
...@@ -1413,7 +1413,7 @@ static bool glob_sym_btf_matches(const char *sym_name, bool exact, ...@@ -1413,7 +1413,7 @@ static bool glob_sym_btf_matches(const char *sym_name, bool exact,
return true; return true;
case BTF_KIND_PTR: case BTF_KIND_PTR:
/* just validate overall shape of the referenced type, so no /* just validate overall shape of the referenced type, so no
* contents comparison for struct/union, and allowd fwd vs * contents comparison for struct/union, and allowed fwd vs
* struct/union * struct/union
*/ */
exact = false; exact = false;
...@@ -1962,7 +1962,7 @@ static int linker_append_elf_sym(struct bpf_linker *linker, struct src_obj *obj, ...@@ -1962,7 +1962,7 @@ static int linker_append_elf_sym(struct bpf_linker *linker, struct src_obj *obj,
/* If existing symbol is a strong resolved symbol, bail out, /* If existing symbol is a strong resolved symbol, bail out,
* because we lost resolution battle have nothing to * because we lost resolution battle have nothing to
* contribute. We already checked abover that there is no * contribute. We already checked above that there is no
* strong-strong conflict. We also already tightened binding * strong-strong conflict. We also already tightened binding
* and visibility, so nothing else to contribute at that point. * and visibility, so nothing else to contribute at that point.
*/ */
......
...@@ -39,7 +39,7 @@ enum __bpf_usdt_arg_type { ...@@ -39,7 +39,7 @@ enum __bpf_usdt_arg_type {
struct __bpf_usdt_arg_spec { struct __bpf_usdt_arg_spec {
/* u64 scalar interpreted depending on arg_type, see below */ /* u64 scalar interpreted depending on arg_type, see below */
__u64 val_off; __u64 val_off;
/* arg location case, see bpf_udst_arg() for details */ /* arg location case, see bpf_usdt_arg() for details */
enum __bpf_usdt_arg_type arg_type; enum __bpf_usdt_arg_type arg_type;
/* offset of referenced register within struct pt_regs */ /* offset of referenced register within struct pt_regs */
short reg_off; short reg_off;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment