| @@ -312,7 +312,7 @@ static bool convert_bpf_extensions(struct sock_filter *fp, · 311 unmodified lines |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | 314 | /** |
| 315 | | − * sk_convert_filter - convert filter program |
| 315 | + * bpf_convert_filter - convert filter program |
| 316 | 316 | * @prog: the user passed filter program |
| 317 | 317 | * @len: the length of the user passed filter program |
| 318 | 318 | * @new_prog: buffer where converted program will be stored |
| @@ -322,12 +322,12 @@ static bool convert_bpf_extensions(struct sock_filter *fp, · 3 unmodified lines |
| 322 | 322 | * Conversion workflow: |
| 323 | 323 | * |
| 324 | 324 | * 1) First pass for calculating the new program length: |
| 325 | | − * sk_convert_filter(old_prog, old_len, NULL, &new_len) |
| 325 | + * bpf_convert_filter(old_prog, old_len, NULL, &new_len) |
| 326 | 326 | * |
| 327 | 327 | * 2) 2nd pass to remap in two passes: 1st pass finds new |
| 328 | 328 | * jump offsets, 2nd pass remapping: |
| 329 | 329 | * new_prog = kmalloc(sizeof(struct bpf_insn) * new_len); |
| 330 | | − * sk_convert_filter(old_prog, old_len, new_prog, &new_len); |
| 330 | + * bpf_convert_filter(old_prog, old_len, new_prog, &new_len); |
| 331 | 331 | * |
| 332 | 332 | * User BPF's register A is mapped to our BPF register 6, user BPF |
| 333 | 333 | * register X is mapped to BPF register 7; frame pointer is always |
| @@ -335,8 +335,8 @@ static bool convert_bpf_extensions(struct sock_filter *fp, · 1 unmodified line |
| 335 | 335 | * for socket filters: ctx == 'struct sk_buff *', for seccomp: |
| 336 | 336 | * ctx == 'struct seccomp_data *'. |
| 337 | 337 | */ |
| 338 | | −int sk_convert_filter(struct sock_filter *prog, int len, |
| 339 | | − struct bpf_insn *new_prog, int *new_len) |
| 338 | +int bpf_convert_filter(struct sock_filter *prog, int len, |
| 339 | + struct bpf_insn *new_prog, int *new_len) |
| 340 | 340 | { |
| 341 | 341 | int new_flen = 0, pass = 0, target, i; |
| 342 | 342 | struct bpf_insn *new_insn; |
| @@ -921,7 +921,7 @@ static struct sk_filter *__sk_migrate_filter(struct sk_filter *fp) · 578 unmodified lines |
| 921 | 921 | } |
| 922 | 922 | |
| 923 | 923 | /* 1st pass: calculate the new program length. */ |
| 924 | | − err = sk_convert_filter(old_prog, old_len, NULL, &new_len); |
| 924 | + err = bpf_convert_filter(old_prog, old_len, NULL, &new_len); |
| 925 | 925 | if (err) |
| 926 | 926 | goto out_err_free; |
| 927 | 927 | |
| @@ -940,9 +940,9 @@ static struct sk_filter *__sk_migrate_filter(struct sk_filter *fp) · 12 unmodified lines |
| 940 | 940 | fp->len = new_len; |
| 941 | 941 | |
| 942 | 942 | /* 2nd pass: remap sock_filter insns into bpf_insn insns. */ |
| 943 | | − err = sk_convert_filter(old_prog, old_len, fp->insnsi, &new_len); |
| 943 | + err = bpf_convert_filter(old_prog, old_len, fp->insnsi, &new_len); |
| 944 | 944 | if (err) |
| 945 | | − /* 2nd sk_convert_filter() can fail only if it fails |
| 945 | + /* 2nd bpf_convert_filter() can fail only if it fails |
| 946 | 946 | * to allocate memory, remapping must succeed. Note, |
| 947 | 947 | * that at this time old_fp has already been released |
| 948 | 948 | * by krealloc(). |