Skip to content

Commit a7de265

Browse files
auyerborkmann
authored andcommitted
bpf: Fix typos in comments
Found the following typos in comments, and fixed them: s/unpriviledged/unprivileged/ s/reponsible/responsible/ s/possiblities/possibilities/ s/Divison/Division/ s/precsion/precision/ s/havea/have a/ s/reponsible/responsible/ s/responsibile/responsible/ s/tigher/tighter/ s/respecitve/respective/ Signed-off-by: Rafael Passos <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent e1a7545 commit a7de265

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

kernel/bpf/bpf_local_storage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ static bool check_storage_bpf_ma(struct bpf_local_storage *local_storage,
318318
*
319319
* If the local_storage->list is already empty, the caller will not
320320
* care about the bpf_ma value also because the caller is not
321-
* responsibile to free the local_storage.
321+
* responsible to free the local_storage.
322322
*/
323323

324324
if (storage_smap)

kernel/bpf/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2814,7 +2814,7 @@ void bpf_prog_free(struct bpf_prog *fp)
28142814
}
28152815
EXPORT_SYMBOL_GPL(bpf_prog_free);
28162816

2817-
/* RNG for unpriviledged user space with separated state from prandom_u32(). */
2817+
/* RNG for unprivileged user space with separated state from prandom_u32(). */
28182818
static DEFINE_PER_CPU(struct rnd_state, bpf_user_rnd_state);
28192819

28202820
void bpf_user_rnd_init_once(void)

kernel/bpf/hashtab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@ static void htab_map_free(struct bpf_map *map)
15391539
*/
15401540

15411541
/* htab no longer uses call_rcu() directly. bpf_mem_alloc does it
1542-
* underneath and is reponsible for waiting for callbacks to finish
1542+
* underneath and is responsible for waiting for callbacks to finish
15431543
* during bpf_mem_alloc_destroy().
15441544
*/
15451545
if (!htab_is_prealloc(htab)) {

kernel/bpf/helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2412,7 +2412,7 @@ __bpf_kfunc void *bpf_dynptr_slice_rdwr(const struct bpf_dynptr_kern *ptr, u32 o
24122412
/* bpf_dynptr_slice_rdwr is the same logic as bpf_dynptr_slice.
24132413
*
24142414
* For skb-type dynptrs, it is safe to write into the returned pointer
2415-
* if the bpf program allows skb data writes. There are two possiblities
2415+
* if the bpf program allows skb data writes. There are two possibilities
24162416
* that may occur when calling bpf_dynptr_slice_rdwr:
24172417
*
24182418
* 1) The requested slice is in the head of the skb. In this case, the

kernel/bpf/verifier.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static bool bpf_global_percpu_ma_set;
172172

173173
/* verifier_state + insn_idx are pushed to stack when branch is encountered */
174174
struct bpf_verifier_stack_elem {
175-
/* verifer state is 'st'
175+
/* verifier state is 'st'
176176
* before processing instruction 'insn_idx'
177177
* and after processing instruction 'prev_insn_idx'
178178
*/
@@ -2131,15 +2131,15 @@ static void __reg64_deduce_bounds(struct bpf_reg_state *reg)
21312131
static void __reg_deduce_mixed_bounds(struct bpf_reg_state *reg)
21322132
{
21332133
/* Try to tighten 64-bit bounds from 32-bit knowledge, using 32-bit
2134-
* values on both sides of 64-bit range in hope to have tigher range.
2134+
* values on both sides of 64-bit range in hope to have tighter range.
21352135
* E.g., if r1 is [0x1'00000000, 0x3'80000000], and we learn from
21362136
* 32-bit signed > 0 operation that s32 bounds are now [1; 0x7fffffff].
21372137
* With this, we can substitute 1 as low 32-bits of _low_ 64-bit bound
21382138
* (0x100000000 -> 0x100000001) and 0x7fffffff as low 32-bits of
21392139
* _high_ 64-bit bound (0x380000000 -> 0x37fffffff) and arrive at a
21402140
* better overall bounds for r1 as [0x1'000000001; 0x3'7fffffff].
21412141
* We just need to make sure that derived bounds we are intersecting
2142-
* with are well-formed ranges in respecitve s64 or u64 domain, just
2142+
* with are well-formed ranges in respective s64 or u64 domain, just
21432143
* like we do with similar kinds of 32-to-64 or 64-to-32 adjustments.
21442144
*/
21452145
__u64 new_umin, new_umax;
@@ -14714,7 +14714,7 @@ static void regs_refine_cond_op(struct bpf_reg_state *reg1, struct bpf_reg_state
1471414714

1471514715
/* Adjusts the register min/max values in the case that the dst_reg and
1471614716
* src_reg are both SCALAR_VALUE registers (or we are simply doing a BPF_K
14717-
* check, in which case we havea fake SCALAR_VALUE representing insn->imm).
14717+
* check, in which case we have a fake SCALAR_VALUE representing insn->imm).
1471814718
* Technically we can do similar adjustments for pointers to the same object,
1471914719
* but we don't support that right now.
1472014720
*/
@@ -17352,7 +17352,7 @@ static int is_state_visited(struct bpf_verifier_env *env, int insn_idx)
1735217352
err = propagate_liveness(env, &sl->state, cur);
1735317353

1735417354
/* if previous state reached the exit with precision and
17355-
* current state is equivalent to it (except precsion marks)
17355+
* current state is equivalent to it (except precision marks)
1735617356
* the precision needs to be propagated back in
1735717357
* the current state.
1735817358
*/
@@ -20209,7 +20209,7 @@ static int do_misc_fixups(struct bpf_verifier_env *env)
2020920209
* divide-by-3 through multiplication, followed by further
2021020210
* division by 8 through 3-bit right shift.
2021120211
* Refer to book "Hacker's Delight, 2nd ed." by Henry S. Warren, Jr.,
20212-
* p. 227, chapter "Unsigned Divison by 3" for details and proofs.
20212+
* p. 227, chapter "Unsigned Division by 3" for details and proofs.
2021320213
*
2021420214
* N / 3 <=> M * N / 2^33, where M = (2^33 + 1) / 3 = 0xaaaaaaab.
2021520215
*/

0 commit comments

Comments
 (0)