Re: [PATCH bpf-next] bpf: Use sha1() instead of sha1_transform() in bpf_prog_calc_tag()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 11, 2025 at 1:17 PM Eric Biggers <ebiggers@xxxxxxxxxx> wrote:
>
> Now that there's a proper SHA-1 library API, just use that instead of
> the low-level SHA-1 compression function.  This eliminates the need for
> bpf_prog_calc_tag() to implement the SHA-1 padding itself.  No
> functional change; the computed tags remain the same.
>
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> ---
>  include/linux/filter.h |  6 -----
>  kernel/bpf/core.c      | 50 ++++++++----------------------------------
>  2 files changed, 9 insertions(+), 47 deletions(-)

Nice clean up!

It appears this patch changes the sha1 of some programs, but not
some other programs. For example, sha1 of program
test_task_kfunc_flavor_relo_not_found from task_kfunc_success.bpf.o
stays the same before and after the patch, while other programs from
task_kfunc_success.bpf.o have different sha1 after the patch.

Is this expected?

Thanks,
Song





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux