Public bug reported:

We've seen kernel module size getting larger since 6.15, and this is due
to a deduplication failure in libbpf. This means that the installed size
of modules has gone up from ~160MB to ~270MB.

The fix is:
https://github.com/libbpf/libbpf/commit/c8a28812fbe1af6ff0cbd92edb88c6fcc2291737

libbpf: Add identical pointer detection to btf_dedup_is_equiv()
Recently as a side-effect of

commit ac053946f5c4 ("compiler.h: introduce TYPEOF_UNQUAL() macro")

issues were observed in deduplication between modules and kernel BTF
such that a large number of kernel types were not deduplicated so
were found in module BTF (task_struct, bpf_prog etc).  The root cause
appeared to be a failure to dedup struct types, specifically those
with members that were pointers with __percpu annotations.

The issue in dedup is at the point that we are deduplicating structures,
we have not yet deduplicated reference types like pointers.  If multiple
copies of a pointer point at the same (deduplicated) integer as in this
case, we do not see them as identical.  Special handling already exists
to deal with structures and arrays, so add pointer handling here too.

Reported-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Alan Maguire <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: 
https://lore.kernel.org/bpf/[email protected]


We need to update libbpf to >= 1.6.x, by syncing an updated package from Debian.

** Affects: libbpf (Ubuntu)
     Importance: Undecided
         Status: In Progress

** Package changed: linux (Ubuntu) => libbpf (Ubuntu)

** Changed in: libbpf (Ubuntu)
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/2122094

Title:
  module size bump since 6.15

Status in libbpf package in Ubuntu:
  In Progress

Bug description:
  We've seen kernel module size getting larger since 6.15, and this is
  due to a deduplication failure in libbpf. This means that the
  installed size of modules has gone up from ~160MB to ~270MB.

  The fix is:
  
https://github.com/libbpf/libbpf/commit/c8a28812fbe1af6ff0cbd92edb88c6fcc2291737

  libbpf: Add identical pointer detection to btf_dedup_is_equiv()
  Recently as a side-effect of

  commit ac053946f5c4 ("compiler.h: introduce TYPEOF_UNQUAL() macro")

  issues were observed in deduplication between modules and kernel BTF
  such that a large number of kernel types were not deduplicated so
  were found in module BTF (task_struct, bpf_prog etc).  The root cause
  appeared to be a failure to dedup struct types, specifically those
  with members that were pointers with __percpu annotations.

  The issue in dedup is at the point that we are deduplicating structures,
  we have not yet deduplicated reference types like pointers.  If multiple
  copies of a pointer point at the same (deduplicated) integer as in this
  case, we do not see them as identical.  Special handling already exists
  to deal with structures and arrays, so add pointer handling here too.

  Reported-by: Alexei Starovoitov <[email protected]>
  Signed-off-by: Alan Maguire <[email protected]>
  Signed-off-by: Andrii Nakryiko <[email protected]>
  Link: 
https://lore.kernel.org/bpf/[email protected]

  
  We need to update libbpf to >= 1.6.x, by syncing an updated package from 
Debian.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libbpf/+bug/2122094/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to