mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 16:10:02 +02:00
bpf: Drop duplicate blank lines in kernel/bpf/
There are many adjacent blank lines in kernel/bpf/ that have accumulated over time. Drop them for cleanup. No functional changes intended. Signed-off-by: Leon Hwang <leon.hwang@linux.dev> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com> Link: https://lore.kernel.org/bpf/20260813152324.97937-2-leon.hwang@linux.dev
This commit is contained in:
parent
9786d424a3
commit
0a07e75b16
|
|
@ -214,7 +214,6 @@ static inline bool bt_is_reg_set(struct backtrack_state *bt, u32 reg)
|
|||
return bt->reg_masks[bt->frame] & (1 << reg);
|
||||
}
|
||||
|
||||
|
||||
/* format registers bitmask, e.g., "r0,r2,r4" for 0x15 mask */
|
||||
static void fmt_reg_mask(char *buf, ssize_t buf_sz, u32 reg_mask)
|
||||
{
|
||||
|
|
@ -254,7 +253,6 @@ void bpf_fmt_stack_mask(char *buf, ssize_t buf_sz, u64 stack_mask)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* For given verifier state backtrack_insn() is called from the last insn to
|
||||
* the first insn. Its purpose is to compute a bitmask of registers and
|
||||
* stack slots that needs precision in the parent verifier state.
|
||||
|
|
|
|||
|
|
@ -2534,7 +2534,6 @@ static void btf_bitfield_show(void *data, u8 bits_offset,
|
|||
btf_int128_print(show, print_num);
|
||||
}
|
||||
|
||||
|
||||
static void btf_int_bits_show(const struct btf *btf,
|
||||
const struct btf_type *t,
|
||||
void *data, u8 bits_offset,
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ enum {
|
|||
BRANCH = 2,
|
||||
};
|
||||
|
||||
|
||||
static void mark_subprog_changes_pkt_data(struct bpf_verifier_env *env, int off)
|
||||
{
|
||||
struct bpf_subprog_info *subprog;
|
||||
|
|
|
|||
|
|
@ -1466,7 +1466,6 @@ int bpf_fixup_call_args(struct bpf_verifier_env *env)
|
|||
return err;
|
||||
}
|
||||
|
||||
|
||||
/* The function requires that first instruction in 'patch' is insnsi[prog->len - 1] */
|
||||
static int add_hidden_subprog(struct bpf_verifier_env *env, struct bpf_insn *patch, int len)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -998,7 +998,6 @@ static void dec_elem_count(struct bpf_htab *htab)
|
|||
atomic_dec(&htab->count);
|
||||
}
|
||||
|
||||
|
||||
static void free_htab_elem(struct bpf_htab *htab, struct htab_elem *l)
|
||||
{
|
||||
htab_put_fd_value(htab, l);
|
||||
|
|
@ -2970,7 +2969,6 @@ static int rhtab_delete_elem(struct bpf_rhtab *rhtab, struct rhtab_elem *elem, v
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static long rhtab_map_delete_elem(struct bpf_map *map, void *key)
|
||||
{
|
||||
struct bpf_rhtab *rhtab = container_of(map, struct bpf_rhtab, map);
|
||||
|
|
|
|||
|
|
@ -4871,7 +4871,6 @@ static const struct btf_kfunc_id_set generic_kfunc_set = {
|
|||
.set = &generic_btf_ids,
|
||||
};
|
||||
|
||||
|
||||
BTF_ID_LIST(generic_dtor_ids)
|
||||
BTF_ID(struct, task_struct)
|
||||
BTF_ID(func, bpf_task_release_dtor)
|
||||
|
|
|
|||
|
|
@ -269,7 +269,6 @@ bpf_insn_successors(struct bpf_verifier_env *env, u32 idx)
|
|||
|
||||
__diag_pop();
|
||||
|
||||
|
||||
static inline bool update_insn(struct bpf_verifier_env *env,
|
||||
struct func_instance *instance, u32 frame, u32 insn_idx)
|
||||
{
|
||||
|
|
@ -1862,7 +1861,6 @@ static int analyze_subprog(struct bpf_verifier_env *env,
|
|||
if (need_resched())
|
||||
cond_resched();
|
||||
|
||||
|
||||
/*
|
||||
* When an instance is reused (must_write_initialized == true),
|
||||
* record into a fresh instance and merge afterward. This avoids
|
||||
|
|
|
|||
|
|
@ -123,7 +123,6 @@ static long __queue_map_get(struct bpf_map *map, void *value, bool delete)
|
|||
return err;
|
||||
}
|
||||
|
||||
|
||||
static long __stack_map_get(struct bpf_map *map, void *value, bool delete)
|
||||
{
|
||||
struct bpf_queue_stack *qs = bpf_queue_stack(map);
|
||||
|
|
|
|||
|
|
@ -636,7 +636,6 @@ int bpf_map_alloc_pages(const struct bpf_map *map, int nid,
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int btf_field_cmp(const void *a, const void *b)
|
||||
{
|
||||
const struct btf_field *f1 = a, *f2 = b;
|
||||
|
|
@ -1830,7 +1829,6 @@ static int map_lookup_elem(union bpf_attr *attr)
|
|||
return err;
|
||||
}
|
||||
|
||||
|
||||
#define BPF_MAP_UPDATE_ELEM_LAST_FIELD flags
|
||||
|
||||
static int map_update_elem(union bpf_attr *attr, bpfptr_t uattr)
|
||||
|
|
@ -3497,7 +3495,6 @@ int bpf_link_prime(struct bpf_link *link, struct bpf_link_primer *primer)
|
|||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
|
||||
id = bpf_link_alloc_id(link);
|
||||
if (id < 0) {
|
||||
put_unused_fd(fd);
|
||||
|
|
@ -5505,7 +5502,6 @@ static int bpf_link_get_info_by_fd(struct file *file,
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int token_get_info_by_fd(struct file *file,
|
||||
struct bpf_token *token,
|
||||
const union bpf_attr *attr,
|
||||
|
|
@ -6507,7 +6503,6 @@ BPF_CALL_3(bpf_sys_bpf, int, cmd, union bpf_attr *, attr, u32, attr_size)
|
|||
return __sys_bpf(cmd, KERNEL_BPFPTR(attr), attr_size, KERNEL_BPFPTR(NULL), 0);
|
||||
}
|
||||
|
||||
|
||||
/* To shut up -Wmissing-prototypes.
|
||||
* This function is used by the kernel light skeleton
|
||||
* to load bpf programs when modules are loaded or during kernel boot.
|
||||
|
|
|
|||
|
|
@ -635,7 +635,6 @@ static void __mark_dynptr_reg(struct bpf_reg_state *reg,
|
|||
enum bpf_dynptr_type type,
|
||||
bool first_slot, int id, int parent_id);
|
||||
|
||||
|
||||
static void mark_dynptr_stack_regs(struct bpf_verifier_env *env,
|
||||
struct bpf_reg_state *sreg1,
|
||||
struct bpf_reg_state *sreg2,
|
||||
|
|
@ -1674,7 +1673,6 @@ static bool same_callsites(struct bpf_verifier_state *a, struct bpf_verifier_sta
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
void bpf_free_backedges(struct bpf_scc_visit *visit)
|
||||
{
|
||||
struct bpf_scc_backedge *backedge, *next;
|
||||
|
|
@ -2291,7 +2289,6 @@ static struct bpf_verifier_state *push_async_cb(struct bpf_verifier_env *env,
|
|||
return &elem->st;
|
||||
}
|
||||
|
||||
|
||||
static int cmp_subprogs(const void *a, const void *b)
|
||||
{
|
||||
return ((struct bpf_subprog_info *)a)->start -
|
||||
|
|
@ -3969,7 +3966,6 @@ static int check_stack_read(struct bpf_verifier_env *env,
|
|||
return err;
|
||||
}
|
||||
|
||||
|
||||
/* check_stack_write dispatches to check_stack_write_fixed_off or
|
||||
* check_stack_write_var_off.
|
||||
*
|
||||
|
|
@ -4767,7 +4763,6 @@ static int check_sock_access(struct bpf_verifier_env *env, int insn_idx,
|
|||
valid = false;
|
||||
}
|
||||
|
||||
|
||||
if (valid) {
|
||||
env->insn_aux_data[insn_idx].ctx_field_size =
|
||||
info.ctx_field_size;
|
||||
|
|
@ -6635,7 +6630,6 @@ static int check_stack_range_initialized(
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
|
||||
if (tnum_is_const(reg->var_off)) {
|
||||
min_off = max_off = reg->var_off.value + off;
|
||||
} else {
|
||||
|
|
@ -7347,7 +7341,6 @@ static bool is_iter_new_kfunc(struct bpf_call_arg_meta *meta)
|
|||
return meta->kfunc_flags & KF_ITER_NEW;
|
||||
}
|
||||
|
||||
|
||||
static bool is_iter_destroy_kfunc(struct bpf_call_arg_meta *meta)
|
||||
{
|
||||
return meta->kfunc_flags & KF_ITER_DESTROY;
|
||||
|
|
@ -11607,7 +11600,6 @@ static int process_irq_flag(struct bpf_verifier_env *env, struct bpf_reg_state *
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int ref_set_non_owning(struct bpf_verifier_env *env, struct bpf_reg_state *reg)
|
||||
{
|
||||
struct btf_record *rec = reg_btf_record(reg);
|
||||
|
|
@ -16412,7 +16404,6 @@ static int check_ld_abs(struct bpf_verifier_env *env, struct bpf_insn *insn)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static bool return_retval_range(struct bpf_verifier_env *env, struct bpf_retval_range *range)
|
||||
{
|
||||
enum bpf_prog_type prog_type = resolve_prog_type(env->prog);
|
||||
|
|
@ -18361,8 +18352,6 @@ static void release_insn_arrays(struct bpf_verifier_env *env)
|
|||
bpf_insn_array_release(env->insn_array_maps[i]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* The verifier does more data flow analysis than llvm and will not
|
||||
* explore branches that are dead at run time. Malicious programs can
|
||||
* have dead code too. Therefore replace all dead at-run-time code
|
||||
|
|
@ -18390,8 +18379,6 @@ static void sanitize_dead_code(struct bpf_verifier_env *env)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void free_states(struct bpf_verifier_env *env)
|
||||
{
|
||||
struct bpf_verifier_state_list *sl;
|
||||
|
|
@ -18678,7 +18665,6 @@ static int do_check_main(struct bpf_verifier_env *env)
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static void print_verification_stats(struct bpf_verifier_env *env)
|
||||
{
|
||||
/* Skip over hidden subprogs which are not verified. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user