Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bpf: Fix spelling mistakes

Fix some spelling mistakes in comments:
aother ==> another
Netiher ==> Neither
desribe ==> describe
intializing ==> initializing
funciton ==> function
wont ==> won't and move the word 'the' at the end to the next line
accross ==> across
pathes ==> paths
triggerred ==> triggered
excute ==> execute
ether ==> either
conervative ==> conservative
convetion ==> convention
markes ==> marks
interpeter ==> interpreter

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210525025659.8898-2-thunder.leizhen@huawei.com

authored by

Zhen Lei and committed by
Andrii Nakryiko
8fb33b60 4ce7d68b

+18 -18
+2 -2
include/linux/bpf_local_storage.h
··· 58 58 * from the object's bpf_local_storage. 59 59 * 60 60 * Put it in the same cacheline as the data to minimize 61 - * the number of cachelines access during the cache hit case. 61 + * the number of cachelines accessed during the cache hit case. 62 62 */ 63 63 struct bpf_local_storage_map __rcu *smap; 64 64 u8 data[] __aligned(8); ··· 71 71 struct bpf_local_storage __rcu *local_storage; 72 72 struct rcu_head rcu; 73 73 /* 8 bytes hole */ 74 - /* The data is stored in aother cacheline to minimize 74 + /* The data is stored in another cacheline to minimize 75 75 * the number of cachelines access during a cache hit. 76 76 */ 77 77 struct bpf_local_storage_data sdata ____cacheline_aligned;
+1 -1
kernel/bpf/bpf_inode_storage.c
··· 72 72 return; 73 73 } 74 74 75 - /* Netiher the bpf_prog nor the bpf-map's syscall 75 + /* Neither the bpf_prog nor the bpf-map's syscall 76 76 * could be modifying the local_storage->list now. 77 77 * Thus, no elem can be added-to or deleted-from the 78 78 * local_storage->list by the bpf_prog or by the bpf-map's syscall.
+3 -3
kernel/bpf/btf.c
··· 51 51 * The BTF type section contains a list of 'struct btf_type' objects. 52 52 * Each one describes a C type. Recall from the above section 53 53 * that a 'struct btf_type' object could be immediately followed by extra 54 - * data in order to desribe some particular C types. 54 + * data in order to describe some particular C types. 55 55 * 56 56 * type_id: 57 57 * ~~~~~~~ ··· 1143 1143 1144 1144 /* 1145 1145 * We need a new copy to our safe object, either because we haven't 1146 - * yet copied and are intializing safe data, or because the data 1146 + * yet copied and are initializing safe data, or because the data 1147 1147 * we want falls outside the boundaries of the safe object. 1148 1148 */ 1149 1149 if (!safe) { ··· 3417 3417 * BTF_KIND_FUNC_PROTO cannot be directly referred by 3418 3418 * a struct's member. 3419 3419 * 3420 - * It should be a funciton pointer instead. 3420 + * It should be a function pointer instead. 3421 3421 * (i.e. struct's member -> BTF_KIND_PTR -> BTF_KIND_FUNC_PROTO) 3422 3422 * 3423 3423 * Hence, there is no btf_func_check_member().
+2 -2
kernel/bpf/devmap.c
··· 382 382 } 383 383 384 384 /* rcu_read_lock (from syscall and BPF contexts) ensures that if a delete and/or 385 - * update happens in parallel here a dev_put wont happen until after reading the 386 - * ifindex. 385 + * update happens in parallel here a dev_put won't happen until after reading 386 + * the ifindex. 387 387 */ 388 388 static void *__dev_map_lookup_elem(struct bpf_map *map, u32 key) 389 389 {
+2 -2
kernel/bpf/hashtab.c
··· 46 46 * events, kprobes and tracing to be invoked before the prior invocation 47 47 * from one of these contexts completed. sys_bpf() uses the same mechanism 48 48 * by pinning the task to the current CPU and incrementing the recursion 49 - * protection accross the map operation. 49 + * protection across the map operation. 50 50 * 51 51 * This has subtle implications on PREEMPT_RT. PREEMPT_RT forbids certain 52 52 * operations like memory allocations (even with GFP_ATOMIC) from atomic 53 53 * contexts. This is required because even with GFP_ATOMIC the memory 54 - * allocator calls into code pathes which acquire locks with long held lock 54 + * allocator calls into code paths which acquire locks with long held lock 55 55 * sections. To ensure the deterministic behaviour these locks are regular 56 56 * spinlocks, which are converted to 'sleepable' spinlocks on RT. The only 57 57 * true atomic contexts on an RT kernel are the low level hardware
+1 -1
kernel/bpf/reuseport_array.c
··· 102 102 /* 103 103 * ops->map_*_elem() will not be able to access this 104 104 * array now. Hence, this function only races with 105 - * bpf_sk_reuseport_detach() which was triggerred by 105 + * bpf_sk_reuseport_detach() which was triggered by 106 106 * close() or disconnect(). 107 107 * 108 108 * This function and bpf_sk_reuseport_detach() are
+1 -1
kernel/bpf/trampoline.c
··· 552 552 * __bpf_prog_enter returns: 553 553 * 0 - skip execution of the bpf prog 554 554 * 1 - execute bpf prog 555 - * [2..MAX_U64] - excute bpf prog and record execution time. 555 + * [2..MAX_U64] - execute bpf prog and record execution time. 556 556 * This is start time. 557 557 */ 558 558 u64 notrace __bpf_prog_enter(struct bpf_prog *prog)
+6 -6
kernel/bpf/verifier.c
··· 47 47 * - unreachable insns exist (shouldn't be a forest. program = one function) 48 48 * - out of bounds or malformed jumps 49 49 * The second pass is all possible path descent from the 1st insn. 50 - * Since it's analyzing all pathes through the program, the length of the 50 + * Since it's analyzing all paths through the program, the length of the 51 51 * analysis is limited to 64k insn, which may be hit even if total number of 52 52 * insn is less then 4K, but there are too many branches that change stack/regs. 53 53 * Number of 'branches to be analyzed' is limited to 1k ··· 132 132 * If it's ok, then verifier allows this BPF_CALL insn and looks at 133 133 * .ret_type which is RET_PTR_TO_MAP_VALUE_OR_NULL, so it sets 134 134 * R0->type = PTR_TO_MAP_VALUE_OR_NULL which means bpf_map_lookup_elem() function 135 - * returns ether pointer to map value or NULL. 135 + * returns either pointer to map value or NULL. 136 136 * 137 137 * When type PTR_TO_MAP_VALUE_OR_NULL passes through 'if (reg != 0) goto +off' 138 138 * insn, the register holding that pointer in the true branch changes state to ··· 2616 2616 if (dst_reg != BPF_REG_FP) { 2617 2617 /* The backtracking logic can only recognize explicit 2618 2618 * stack slot address like [fp - 8]. Other spill of 2619 - * scalar via different register has to be conervative. 2619 + * scalar via different register has to be conservative. 2620 2620 * Backtrack from here and mark all registers as precise 2621 2621 * that contributed into 'reg' being a constant. 2622 2622 */ ··· 9053 9053 !prog->aux->attach_func_proto->type) 9054 9054 return 0; 9055 9055 9056 - /* eBPF calling convetion is such that R0 is used 9056 + /* eBPF calling convention is such that R0 is used 9057 9057 * to return the value from eBPF program. 9058 9058 * Make sure that it's readable at this time 9059 9059 * of bpf_exit, which means that program wrote ··· 9844 9844 * Since the verifier pushes the branch states as it sees them while exploring 9845 9845 * the program the condition of walking the branch instruction for the second 9846 9846 * time means that all states below this branch were already explored and 9847 - * their final liveness markes are already propagated. 9847 + * their final liveness marks are already propagated. 9848 9848 * Hence when the verifier completes the search of state list in is_state_visited() 9849 9849 * we can call this clean_live_states() function to mark all liveness states 9850 9850 * as REG_LIVE_DONE to indicate that 'parent' pointers of 'struct bpf_reg_state' ··· 12464 12464 prog->aux->max_pkt_offset = MAX_PACKET_OFF; 12465 12465 12466 12466 /* mark bpf_tail_call as different opcode to avoid 12467 - * conditional branch in the interpeter for every normal 12467 + * conditional branch in the interpreter for every normal 12468 12468 * call and to prevent accidental JITing by JIT compiler 12469 12469 * that doesn't support bpf_tail_call yet 12470 12470 */