]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/bpf-firewall.c
core/bpf: prefix log messages from different bpf subsystems 23596/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 2 Jun 2022 09:15:35 +0000 (11:15 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 2 Jun 2022 13:59:41 +0000 (15:59 +0200)
commitb1acbc08e29cf92ebff3d3e726474c9d642f6d32
tree7b210820a4634df68dc504cc6833a541fc62e63b
parentbb0b01ed20436a6322f8b59b19b0b5b98a6ac2bc
core/bpf: prefix log messages from different bpf subsystems

When something goes awry, we would get identical log messages from all the
bpf subsystems. E.g. "Failed to load BPF object: %m" appeared 5 times in the
sources. But it is very important to know *which* object we failed to load.
This could be guessed, e.g. from surroudning messages or from filename/line
metadata, but when we get log messages in bug reports, this might not be
available. Let's make the messages distinguishable.

While at it, some messages were adjusted a bit. In particular, we shouldn't use
internal names like BPFProgram which have no meaning outside of the codebase.
src/core/bpf-firewall.c
src/core/bpf-foreign.c
src/core/bpf-lsm.c
src/core/bpf-socket-bind.c
src/core/restrict-ifaces.c