support/testing: test_podman.py : fix build failure due to regressions
v2 cover support/testing: test_podman.py : fix build failure due to regressions
This serie fixes the build failure of Podman tests caused by the bump to the AArch64 15.2.rel1 toolchain (including newer glibc and GCC 15) which introduced a regression in the build process of host-protobuf v34.0, which is a dependency for Podman tests (header inclusion and inlining rules enforced by GCC 15).
It also bumps the kernel to 6.18.21 to match the new configuration and adds a fragment to fix iptables "Protocol not supported" error when running Podman tests.
Dowan Gullient (1):
support/testing: test_podman.py : Build failure due to bump of
toolchain
Julien Olivain (1):
package/libabseil-cpp: add patch to fix build with gcc <= 12
...SL_ATTRIBUTE_WARN_UNUSED-with-gcc-12.patch | 55 +++++++++++++++++++ support/testing/tests/package/test_podman.py | 5 +- .../package/test_podman/linux-podman.fragment | 36 ++++++++++++ 3 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 package/libabseil-cpp/0002-base-fix-ABSL_ATTRIBUTE_WARN_UNUSED-with-gcc-12.patch create mode 100644 support/testing/tests/package/test_podman/linux-podman.fragment
Signature · 12 lines
2.43.0
---
v1 -> v2:
- Included Julien Olivain's toolchain fix (originally from
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/)
- Added linux-podman.fragment to fix iptables "Protocol not supported"
- Bumped kernel to 6.18.21 to match the new configuration
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildrootPATCH v2 1/2 package/libabseil-cpp: add patch to fix build with gcc <= 12
From: Julien Olivain <[email protected]>
libabseil-cpp headers can break some packages build, like protobuf, when compiled with gcc 12. See [1] [2]. The issue has been reported in protobuf upstream, in [3].
The issue is due to gcc <= 12 not supporting the mix of standard C++ attributes with GNU attributes. See [4].
Gcc 12 has been removed from Buildroot internal toolchains in commit [5], but gcc 12 can still be present in external toolchains or on the host. This is currently the case of the Buildroot Docker reference image, based on Debian 12 (Bookworm).
This commit fixes the issue by adding a package patch.
Fixes:
- [1] [2] and many more.
[1] https://gitlab.com/buildroot.org/buildroot/-/jobs/13904066346
[2] https://autobuild.buildroot.org/results/33f6cfd37cb48c15a53b3e7123d5ce8388a0f2ab
[3] https://github.com/protocolbuffers/protobuf/issues/26383
[4] https://gcc.gnu.org/PR69585
[5] https://gitlab.com/buildroot.org/buildroot/-/commit/58cf7c51da3ae4804332f68ee934e153d695d047
[6] https://github.com/abseil/abseil-cpp/pull/2044
--- ...SL_ATTRIBUTE_WARN_UNUSED-with-gcc-12.patch | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 package/libabseil-cpp/0002-base-fix-ABSL_ATTRIBUTE_WARN_UNUSED-with-gcc-12.patch
package/libabseil-cpp/0002-base-fix-ABSL_ATTRIBUTE_WARN_UNUSED-with-gcc-12.patch new file +55 -0
@@ -0,0 +1,55 @@ +From 77326826119439c06e341c9d090633ecd9b520d6 Mon Sep 17 00:00:00 2001 +From: Julien Olivain <[email protected]> +Date: Mon, 27 Apr 2026 19:38:19 +0200 +Subject: [PATCH] base: fix ABSL_ATTRIBUTE_WARN_UNUSED with gcc <= 12 + +Gcc <= 12 does not support mixing standard C++ attributes with +GNU attributes. See [1]. + +This can lead to build failures such as [2] [3] and [4]. In those +situations, the compilation fails with error such as: + + /usr/include/absl/base/attributes.h:1076:36: error: expected identifier before '[' token + +Gcc maintainers mentioned in [1] comment 9 that this bugfix will +not be backported in Gcc 12. Gcc 12 is still used in LTS +distributions. For example, it is included in Debian 12 (Bookworm), +which is still supported until 2028. See [5]. + +This commit adds a workaround for gcc <= 12 which uses +__attribute__ in that case, which fixes the compilation failure. + +[1] https://gcc.gnu.org/PR69585 +[2] https://github.com/protocolbuffers/protobuf/issues/26383 +[3] https://autobuild.buildroot.org/results/33f6cfd37cb48c15a53b3e7123d5ce8388a0f2ab/build-end.log +[4] https://gitlab.com/buildroot.org/buildroot/-/jobs/13904066346 +[5] https://www.debian.org/releases/bookworm/ + +Upstream: https://github.com/abseil/abseil-cpp/pull/2044 +Signed-off-by: Julien Olivain <[email protected]> +--- + absl/base/attributes.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/absl/base/attributes.h b/absl/base/attributes.h +index 5887fcaf..a26143e1 100644 +--- a/absl/base/attributes.h ++++ b/absl/base/attributes.h +@@ -1092,7 +1092,14 @@ struct AbslInternal_YouForgotToExplicitlyInitializeAField { + // See https://clang.llvm.org/docs/AttributeReference.html#warn-unused and + // https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html#index-warn_005funused-type-attribute + #if ABSL_HAVE_CPP_ATTRIBUTE(gnu::warn_unused) ++// Only GCC >= 13 allows mixing standard and gnu attributes. ++// In case of gcc < 13, fallback on using __attribute__. ++// https://gcc.gnu.org/PR69585 ++#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 13 ++#define ABSL_ATTRIBUTE_WARN_UNUSED __attribute__((warn_unused)) ++#else + #define ABSL_ATTRIBUTE_WARN_UNUSED [[gnu::warn_unused]] ++#endif + #else + #define ABSL_ATTRIBUTE_WARN_UNUSED + #endif +-- +2.54.0 +
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/2 support/testing: test_podman.py : add kernel fragment to fix iptables errors
In reply to Dowan Gullient via buildrootThis patch bumps the kernel version and adds a Linux kernel fragment for Podman tests to resolve "Protocol not supported" and "Table does not exist" errors when using iptables-based networking which appeared due to the bump of the kernel version (5.10->6.18)
Indeed, the new kernel version requires additional configuration options due to the switch to nftables, and to support Podman's networking features, especially when using iptables-based networking.
Justifications:
NFT_COMPAT & XTABLES_LEGACY: On modern kernels (6.x+), iptables often defaults to the nft binary. CONFIG_NFT_COMPAT is strictly required for the iptables userspace tool to communicate with the nf_tables kernel subsystem. [1]
Without CONFIG_IP_NF_IPTABLES_LEGACY, legacy calls from Netavark/CNI plugins fail.
NET_NS & NAMESPACES: Podman relies on Network Namespaces for container isolation. Without CONFIG_NET_NS, the kernel cannot create the private network stacks required for containers.
NAT & MASQUERADE: Containers require Source NAT (Masquerade) to access external networks. CONFIG_IP_NF_NAT and CONFIG_IP_NF_TARGET_MASQUERADE provide the necessary target modules for these iptables rules. [1]
XT_MATCH Modules: Netavark (Podman's default network stack) uses specific matches like addrtype, conntrack, and comment to manage bridge traffic and port forwarding.
Some dependencies in the configuration file were verified by the check-config script from the Moby project [2].
This configuration was tested and podman tests now pass successfully without the previous errors.
[1] Gentoo Wiki (Podman Kernel Requirements): https://wiki.gentoo.org/wiki/Podman#Configure_the_kernel
[2] Moby/Docker Check-config Script: https://github.com/moby/moby/blob/master/contrib/check-config.sh
---
--- support/testing/tests/package/test_podman.py | 5 +-- .../package/test_podman/linux-podman.fragment | 36 +++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 support/testing/tests/package/test_podman/linux-podman.fragment
support/testing/tests/package/test_podman.py +3 -2
@@ -15,10 +15,11 @@ class PodmanBase(infra.basetest.BRTest): BR2_SYSTEM_DHCP="eth0" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y - BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.10.202" + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.21" BR2_LINUX_KERNEL_DEFCONFIG="vexpress" + BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="support/testing/tests/package/test_podman/linux-podman.fragment" BR2_LINUX_KERNEL_DTS_SUPPORT=y - BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca9" + BR2_LINUX_KERNEL_INTREE_DTS_NAME="arm/vexpress-v2p-ca9" BR2_PACKAGE_PODMAN=y BR2_PACKAGE_UTIL_LINUX=y BR2_PACKAGE_UTIL_LINUX_MOUNT=y
support/testing/tests/package/test_podman/linux-podman.fragment new file +36 -0
@@ -0,0 +1,36 @@ +# --- Core Container System Support --- +CONFIG_MEMCG=y +CONFIG_CGROUP_SCHED=y +CONFIG_NAMESPACES=y +CONFIG_NET_NS=y +CONFIG_VETH=y +CONFIG_BRIDGE=y + +# --- Netfilter Infrastructure (Core) --- +CONFIG_NETFILTER=y +CONFIG_NETFILTER_NETLINK=y +CONFIG_NETFILTER_ADVANCED=y +CONFIG_NF_CONNTRACK=y +CONFIG_NF_TABLES=y +CONFIG_NF_TABLES_IPV4=y +CONFIG_NFT_COMPAT=y +CONFIG_NF_NAT=y +CONFIG_NFT_NAT=y +CONFIG_NETFILTER_XTABLES=y + +# --- IPv4 Support & IPTABLES Compatibility --- +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_IPTABLES_LEGACY=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_MANGLE=y + +# --- Xtables Match Modules required by Podman/Netavark --- +CONFIG_NETFILTER_XTABLES_LEGACY=y +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_COMMENT=y +CONFIG_NETFILTER_XT_MARK=y +CONFIG_NETFILTER_XT_NAT=y +CONFIG_BRIDGE_NETFILTER=y
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 2/2] support/testing: test_podman.py : add kernel fragment to fix iptables errors
Hello Dowan,
Thanks a lot for your patch! I have some comments below.
Quoted 5 lines · Dowan Gullient via buildroot
This patch bumps the kernel version and adds a Linux kernel fragment for Podman tests to resolve "Protocol not supported" and "Table does not exist" errors when using iptables-based networking which appeared due to the bump of the kernel version (5.10->6.18)
Indeed, the new kernel version requires additional configuration options due to the switch to nftables, and to support Podman's networking features, especially when using iptables-based networking.
Could you wrap your commit log at 80 columns?
Quoted 4 lines
Justifications:
NFT_COMPAT&XTABLES_LEGACY: On modern kernels (6.x+), iptables often defaults to the nft binary.CONFIG_NFT_COMPATis strictly required for the iptables userspace
I'm afraid I don't understand "On modern kernels (6.x+), iptables often defaults to the nft binary". Both iptables and nft and user-space executables, so it doesn't really make sense to talk about "On modern kernels...". Could this be clarified.
Quoted 6 lines
tool to communicate with the
nf_tableskernel subsystem. [1]
WithoutCONFIG_IP_NF_IPTABLES_LEGACY, legacy calls from Netavark/CNI plugins fail.
NET_NS& NAMESPACES: Podman relies on Network Namespaces for container isolation. WithoutCONFIG_NET_NS, the kernel cannot create the private network stacks required for containers.
Quoted 8 lines
NAT & MASQUERADE: Containers require Source NAT (Masquerade) to access external networks.
CONFIG_IP_NF_NATandCONFIG_IP_NF_TARGET_MASQUERADEprovide the necessary target modules for these iptables rules. [1]
XT_MATCHModules: Netavark (Podman's default network stack) uses specific matches like addrtype, conntrack, and comment to manage bridge traffic and port forwarding.Some dependencies in the configuration file were verified by the check-config script from the Moby project [2].
Now, the more fundamental question is: if these kernel options are needed for podman to even work, then we should update:
define PODMAN_LINUX_CONFIG_FIXUPS
$(call KCONFIG_ENABLE_OPT,CONFIG_CPUSETS)
$(call KCONFIG_ENABLE_OPT,CONFIG_BPF_SYSCALL)
$(call KCONFIG_ENABLE_OPT,CONFIG_POSIX_MQUEUE)
$(call KCONFIG_ENABLE_OPT,CONFIG_MEMCG)
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_SCHED)
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_FREEZER)
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_DEVICE)
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_CPUACCT)
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_PIDS)
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_BPF)
$(call KCONFIG_ENABLE_OPT,CONFIG_NAMESPACES)
$(call KCONFIG_ENABLE_OPT,CONFIG_UTS_NS)
$(call KCONFIG_ENABLE_OPT,CONFIG_IPC_NS)
$(call KCONFIG_ENABLE_OPT,CONFIG_PID_NS)
$(call KCONFIG_ENABLE_OPT,CONFIG_USER_NS)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_NS)
$(call KCONFIG_ENABLE_OPT,CONFIG_SECCOMP)
$(call KCONFIG_ENABLE_OPT,CONFIG_OVERLAY_FS)
$(call KCONFIG_ENABLE_OPT,CONFIG_KEYS)
$(PODMAN_LINUX_CONFIG_FIXUPS_BTRFS)endef
with more configuration options. Indeed your commit is fixing the test but it's not actually improving the situation for real users of our podman package.
Of course, we really want PODMAN_LINUX_CONFIG_FIXUPS to only enable options that are strictly needed for podman to work. If some options are only needed in some unusual cases, we don't want them to be enabled by PODMAN_LINUX_CONFIG_FIXUPS.
Could you have a look into this?
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 2/2] support/testing: test_podman.py : add kernel fragment to fix iptables errors
Hi Dowan,
In addition to Thomas's comments, I think the subject of the patch is not
correct. test_podman currently passes on master, so "fix iptables errors" can't be right.
I think what you're actually trying to do is just to bump the kernel version,
and in the newer kernel it started failing?
Also, see below.
Quoted 65 lines · Thomas Petazzoni via buildroot
Hello Dowan,
Thanks a lot for your patch! I have some comments below.
Quoted 5 lines · Dowan Gullient via buildroot
This patch bumps the kernel version and adds a Linux kernel fragment for Podman tests to resolve "Protocol not supported" and "Table does not exist" errors when using iptables-based networking which appeared due to the bump of the kernel version (5.10->6.18)
Indeed, the new kernel version requires additional configuration options due to the switch to nftables, and to support Podman's networking features, especially when using iptables-based networking.Could you wrap your commit log at 80 columns?
Quoted 4 lines
Justifications:
NFT_COMPAT&XTABLES_LEGACY: On modern kernels (6.x+), iptables often defaults to the nft binary.CONFIG_NFT_COMPATis strictly required for the iptables userspaceI'm afraid I don't understand "On modern kernels (6.x+), iptables often defaults to the nft binary". Both iptables and nft and user-space executables, so it doesn't really make sense to talk about "On modern kernels...". Could this be clarified.
Quoted 6 lines
tool to communicate with the
nf_tableskernel subsystem. [1]
WithoutCONFIG_IP_NF_IPTABLES_LEGACY, legacy calls from Netavark/CNI plugins fail.
NET_NS& NAMESPACES: Podman relies on Network Namespaces for container isolation. WithoutCONFIG_NET_NS, the kernel cannot create the private network stacks required for containers.Quoted 8 lines
NAT & MASQUERADE: Containers require Source NAT (Masquerade) to access external networks.
CONFIG_IP_NF_NATandCONFIG_IP_NF_TARGET_MASQUERADEprovide the necessary target modules for these iptables rules. [1]
XT_MATCHModules: Netavark (Podman's default network stack) uses specific matches like addrtype, conntrack, and comment to manage bridge traffic and port forwarding.Some dependencies in the configuration file were verified by the check-config script from the Moby project [2].
Now, the more fundamental question is: if these kernel options are needed for podman to even work, then we should update:
define
PODMAN_LINUX_CONFIG_FIXUPS$(call KCONFIG_ENABLE_OPT,CONFIG_CPUSETS) $(call KCONFIG_ENABLE_OPT,CONFIG_BPF_SYSCALL) $(call KCONFIG_ENABLE_OPT,CONFIG_POSIX_MQUEUE) $(call KCONFIG_ENABLE_OPT,CONFIG_MEMCG) $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS) $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_SCHED) $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_FREEZER) $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_DEVICE) $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_CPUACCT) $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_PIDS) $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_BPF) $(call KCONFIG_ENABLE_OPT,CONFIG_NAMESPACES) $(call KCONFIG_ENABLE_OPT,CONFIG_UTS_NS) $(call KCONFIG_ENABLE_OPT,CONFIG_IPC_NS) $(call KCONFIG_ENABLE_OPT,CONFIG_PID_NS) $(call KCONFIG_ENABLE_OPT,CONFIG_USER_NS) $(call KCONFIG_ENABLE_OPT,CONFIG_NET_NS) $(call KCONFIG_ENABLE_OPT,CONFIG_SECCOMP) $(call KCONFIG_ENABLE_OPT,CONFIG_OVERLAY_FS) $(call KCONFIG_ENABLE_OPT,CONFIG_KEYS) $(PODMAN_LINUX_CONFIG_FIXUPS_BTRFS)endef
Quoted 8 lines
with more configuration options. Indeed your commit is fixing the test but it's not actually improving the situation for real users of our podman package.
Of course, we really want
PODMAN_LINUX_CONFIG_FIXUPSto only enable options that are strictly needed for podman to work. If some options are only needed in some unusual cases, we don't want them to be enabled byPODMAN_LINUX_CONFIG_FIXUPS.
AFAIU, most of those options are not stricly needed except for specific use
cases, but some of them just provide better isolation. Realistically speaking, you probably do want all of them.
The only issue I have with the KCONFIG_ENABLE_OPT approach is that there is no
way to override it for the user, and there are some of them that you may actually want to turn off for security reasons, e.g. BPF_SYSCALL and KEYS.
So I think the ideal is a mix of ENABLE_OPT and additional fixes in the test.
It will be a bit difficult to decide which one goes where.
Ideally, the commit message should document for each config option what kind
of error you get from the test when you don't enable it, so we at least have information based on which to take a decision. Is that doable, Dowan? It could be a lot of work...
Regards,
Arnout
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 2/2] support/testing: test_podman.py : add kernel fragment to fix iptables errors
Hello everyone, thanks for your messages,
Quoted 1 line
I'm afraid I don't understand "On modern kernels (6.x+), iptables
Sorry for this imprecision, I meant that for the iptables binary to work with the new kernel version in this specific Buildroot test configuration, CONFIG_NFT_COMPAT is required, so we can translate the iptables commands correctly for the kernel's API Nftables.
Regarding KCONFIG_ENABLE_OPT vs test fragments: You are right, I checked PODMAN_LINUX_CONFIG_FIXUPS, and several core options from my fragment (like CONFIG_NAMESPACES, CONFIG_NET_NS, CONFIG_MEMCG) are actually already enforced by the package. I will remove them from my test fragment. For the remaining network-related options (VETH, BRIDGE, NETFILTER, IP_NF_NAT, MASQUERADE, NFT_COMPAT, etc.): I believe these should stay in the test fragment and NOT be added to podman.mk. These options are specifically required for the CNI/Netavark Bridge+NAT networking mode, which is exactly what TestPodmanIptables exercises (creating bridges, routing between containers, and NATing to the outside). A real user might not need in-kernel Bridge or NAT support. Forcing these modules globally via KCONFIG_ENABLE_OPT would unnecessarily increase the kernel size and attack surface for users who don't need bridge networking.
I will send a v3 with the wrapped commit log, the cleaned .fragment and a commit message that documents which group of options fixes which specific error in the test if this is ok for you both.
Quoted 128 lines · Arnout Vandecappelle
Hi Dowan,
In addition to Thomas's comments, I think the subject of the patch is
not
correct.test_podmancurrently passes on master, so "fix iptables errors" can't
be right.I think what you're actually trying to do is just to bump the kernel
version,
and in the newer kernel it started failing?Also, see below.
Quoted 5 lines · Thomas Petazzoni via buildroot
Hello Dowan,
Thanks a lot for your patch! I have some comments below.
On Tue, May 05, 2026 at 12:05:53PM +0200, Dowan Gullient via buildroot
Quoted 1 line · wrote:
Quoted 1 line
This patch bumps the kernel version and adds a Linux kernel fragment
for Podman tests to resolve
Quoted 1 line
Quoted 1 line
"Protocol not supported" and "Table does not exist" errors when using
iptables-based
Quoted 1 line
Quoted 1 line
networking which appeared due to the bump of the kernel version
(5.10->6.18)
Quoted 1 line
Quoted 1 line
Indeed, the new kernel version requires additional configuration
options due to the switch to
Quoted 1 line
Quoted 1 line
nftables, and to support Podman's networking features, especially when
using iptables-based networking.
Quoted 6 lines
Could you wrap your commit log at 80 columns?
Quoted 3 lines
Justifications:
NFT_COMPAT&XTABLES_LEGACY: On modern kernels (6.x+), iptablesoften defaults
Quoted 1 line
Quoted 1 line
to the nft binary.
CONFIG_NFT_COMPATis strictly required for theiptables userspace
Quoted 8 lines
I'm afraid I don't understand "On modern kernels (6.x+), iptables often defaults to the nft binary". Both iptables and nft and user-space executables, so it doesn't really make sense to talk about "On modern kernels...". Could this be clarified.
Quoted 2 lines
tool to communicate with the
nf_tableskernel subsystem. [1] WithoutCONFIG_IP_NF_IPTABLES_LEGACY, legacy calls fromNetavark/CNI plugins fail.
Quoted 2 lines
Quoted 2 lines
NET_NS& NAMESPACES: Podman relies on Network Namespaces forcontainer isolation.
Quoted 1 line
Quoted 1 line
Without
CONFIG_NET_NS, the kernel cannot create the privatenetwork stacks required for containers.
Quoted 2 lines
Quoted 2 lines
NAT & MASQUERADE: Containers require Source NAT (Masquerade) to
access external networks.
Quoted 1 line
Quoted 1 line
CONFIG_IP_NF_NATandCONFIG_IP_NF_TARGET_MASQUERADEprovide thenecessary target modules
Quoted 3 lines
Quoted 3 lines
for these iptables rules. [1]
XT_MATCHModules: Netavark (Podman's default network stack) usesspecific matches like
Quoted 1 line
Quoted 1 line
addrtype, conntrack, and comment to manage bridge traffic and port
forwarding.
Quoted 2 lines
Quoted 2 lines
Some dependencies in the configuration file were verified by the
check-config script from the Moby project [2].
Quoted 28 lines
Now, the more fundamental question is: if these kernel options are needed for podman to even work, then we should update:
define
PODMAN_LINUX_CONFIG_FIXUPS$(call KCONFIG_ENABLE_OPT,CONFIG_CPUSETS) $(call KCONFIG_ENABLE_OPT,CONFIG_BPF_SYSCALL) $(call KCONFIG_ENABLE_OPT,CONFIG_POSIX_MQUEUE) $(call KCONFIG_ENABLE_OPT,CONFIG_MEMCG) $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS) $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_SCHED) $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_FREEZER) $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_DEVICE) $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_CPUACCT) $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_PIDS) $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_BPF) $(call KCONFIG_ENABLE_OPT,CONFIG_NAMESPACES) $(call KCONFIG_ENABLE_OPT,CONFIG_UTS_NS) $(call KCONFIG_ENABLE_OPT,CONFIG_IPC_NS) $(call KCONFIG_ENABLE_OPT,CONFIG_PID_NS) $(call KCONFIG_ENABLE_OPT,CONFIG_USER_NS) $(call KCONFIG_ENABLE_OPT,CONFIG_NET_NS) $(call KCONFIG_ENABLE_OPT,CONFIG_SECCOMP) $(call KCONFIG_ENABLE_OPT,CONFIG_OVERLAY_FS) $(call KCONFIG_ENABLE_OPT,CONFIG_KEYS) $(PODMAN_LINUX_CONFIG_FIXUPS_BTRFS)endef
Quoted 8 lines
with more configuration options. Indeed your commit is fixing the test but it's not actually improving the situation for real users of our podman package.
Of course, we really want
PODMAN_LINUX_CONFIG_FIXUPSto only enable options that are strictly needed for podman to work. If some options are only needed in some unusual cases, we don't want them to be enabled byPODMAN_LINUX_CONFIG_FIXUPS.AFAIU, most of those options are not stricly needed except for specific
use
cases, but some of them just provide better isolation. Realistically speaking,
you probably do want all of them.The only issue I have with the
KCONFIG_ENABLE_OPTapproach is that there
is no
way to override it for the user, and there are some of them that you may actually want to turn off for security reasons, e.g.BPF_SYSCALLand KEYS.So I think the ideal is a mix of
ENABLE_OPTand additional fixes in the
test.
It will be a bit difficult to decide which one goes where.Ideally, the commit message should document for each config option what
kind
of error you get from the test when you don't enable it, so we at least have
information based on which to take a decision. Is that doable, Dowan? It could
be a lot of work...
Quoted 4 lines
Regards,
Arnout
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 2/2] support/testing: test_podman.py : add kernel fragment to fix iptables errors
Quoted 4 lines · Dowan GULLIENT
Hello everyone, thanks for your messages,
Quoted 1 line
I'm afraid I don't understand "On modern kernels (6.x+), iptables
Sorry for this imprecision, I meant that for the iptables binary to work with the new kernel version in this specific Buildroot test configuration, CONFIG_NFT_COMPAT is required, so we can translate the iptables commands correctly for the kernel's API Nftables.
So for this one it should be a KCONFIG_ENABLE_OPT, right?
Since podman requires specific Kconfig options, which may change in updated
kernel versions, it's perhaps a good idea to use BR2_LINUX_KERNEL_LATEST_VERSION with a minimal kernel configuration? That way an update of the kernel causes the test to fail if some new option is required, which is exactly what we want.
That said: better do the change to LATEST as a separate patch (if you're
willing to do it at all).
Quoted 1 line
Regarding
KCONFIG_ENABLE_OPTvs test fragments: You are right, I checkedPODMAN_LINUX_CONFIG_FIXUPS, and several core options from my fragment (likeCONFIG_NAMESPACES,CONFIG_NET_NS,CONFIG_MEMCG) are actually already enforced by the package. I will remove them from my test fragment. For the remaining network-related options (VETH, BRIDGE, NETFILTER,IP_NF_NAT, MASQUERADE,NFT_COMPAT, etc.): I believe these should stay in the test fragment and NOT be
But how come these options aren't enabled now, but the test still passes?
Quoted 3 lines
added to
podman.mk <http://podman.mk>. These options are specifically required for the CNI/Netavark Bridge+NAT networking mode, which is exactly whatTestPodmanIptablesexercises (creating bridges, routing between containers, and NATing to the outside). A real user might not need in-kernel Bridge or NAT support. Forcing these modules globally viaKCONFIG_ENABLE_OPTwould unnecessarily increase the kernel size and attack surface for users who don't need bridge networking.I will send a v3 with the wrapped commit log, the cleaned .fragment and a commit message that documents which group of options fixes which specific error in the test if this is ok for you both.
Sounds good!
It's also an option to put the documentation of why each option is needed in
the fragment itself, if it's relatively short. If it needs to be several paragraphs then better not.
Regards,
Arnout
Quoted 117 lines · On Mon, Jun 1, 2026 at 9:25 AM Arnout Vandecappelle <[email protected]…
Hi Dowan,
In addition to Thomas's comments, I think the subject of the patch is not
correct.test_podmancurrently passes on master, so "fix iptables errors" can't be right.I think what you're actually trying to do is just to bump the kernel
version,
and in the newer kernel it started failing?Also, see below.
On 31/05/2026 13:55, Thomas Petazzoni via buildroot wrote:
> Hello Dowan,
>
> Thanks a lot for your patch! I have some comments below.
>
> On Tue, May 05, 2026 at 12:05:53PM +0200, Dowan Gullient via buildroot wrote:
>> This patch bumps the kernel version and adds a Linux kernel fragment for
Podman tests to resolve
>> "Protocol not supported" and "Table does not exist" errors when using
iptables-based
>> networking which appeared due to the bump of the kernel version (5.10->6.18) >> Indeed, the new kernel version requires additional configuration options
due to the switch to
>> nftables, and to support Podman's networking features, especially when
using iptables-based networking.
>
> Could you wrap your commit log at 80 columns?
>
>> Justifications:
>>
>>NFT_COMPAT&XTABLES_LEGACY: On modern kernels (6.x+), iptables
often defaults
>> to the nft binary.CONFIG_NFT_COMPATis strictly required for the
iptables userspace
>
> I'm afraid I don't understand "On modern kernels (6.x+), iptables > often defaults to the nft binary". Both iptables and nft and
> user-space executables, so it doesn't really make sense to talk about > "On modern kernels...". Could this be clarified.
>
>> tool to communicate with thenf_tableskernel subsystem. [1] >> WithoutCONFIG_IP_NF_IPTABLES_LEGACY, legacy calls from Netavark/
CNI plugins fail.
>>
>>NET_NS& NAMESPACES: Podman relies on Network Namespaces for
container isolation.
>> WithoutCONFIG_NET_NS, the kernel cannot create the private network
stacks required for containers.
>>
>> NAT & MASQUERADE: Containers require Source NAT (Masquerade) to
access external networks.
>>CONFIG_IP_NF_NATandCONFIG_IP_NF_TARGET_MASQUERADEprovide the
necessary target modules
>> for these iptables rules. [1]
>>
>>XT_MATCHModules: Netavark (Podman's default network stack) uses
specific matches like
>> addrtype, conntrack, and comment to manage bridge traffic and port
forwarding.
>>
>> Some dependencies in the configuration file were verified by the check-
config script from the Moby project [2].
>
> Now, the more fundamental question is: if these kernel options are > needed for podman to even work, then we should update:
>
> definePODMAN_LINUX_CONFIG_FIXUPS
> $(call KCONFIG_ENABLE_OPT,CONFIG_CPUSETS)
> $(call KCONFIG_ENABLE_OPT,CONFIG_BPF_SYSCALL)
> $(call KCONFIG_ENABLE_OPT,CONFIG_POSIX_MQUEUE)
> $(call KCONFIG_ENABLE_OPT,CONFIG_MEMCG)
> $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
> $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_SCHED)
> $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_FREEZER)
> $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_DEVICE)
> $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_CPUACCT)
> $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_PIDS)
> $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_BPF)
> $(call KCONFIG_ENABLE_OPT,CONFIG_NAMESPACES)
> $(call KCONFIG_ENABLE_OPT,CONFIG_UTS_NS)
> $(call KCONFIG_ENABLE_OPT,CONFIG_IPC_NS)
> $(call KCONFIG_ENABLE_OPT,CONFIG_PID_NS)
> $(call KCONFIG_ENABLE_OPT,CONFIG_USER_NS)
> $(call KCONFIG_ENABLE_OPT,CONFIG_NET_NS)
> $(call KCONFIG_ENABLE_OPT,CONFIG_SECCOMP)
> $(call KCONFIG_ENABLE_OPT,CONFIG_OVERLAY_FS)
> $(call KCONFIG_ENABLE_OPT,CONFIG_KEYS)
> $(PODMAN_LINUX_CONFIG_FIXUPS_BTRFS)
> endef
>
> with more configuration options. Indeed your commit is fixing the test > but it's not actually improving the situation for real users of our > podman package.
>
> Of course, we really wantPODMAN_LINUX_CONFIG_FIXUPSto only enable > options that are strictly needed for podman to work. If some options > are only needed in some unusual cases, we don't want them to be > enabled byPODMAN_LINUX_CONFIG_FIXUPS.AFAIU, most of those options are not stricly needed except for specific use
cases, but some of them just provide better isolation. Realistically speaking, you probably do want all of them.The only issue I have with the
KCONFIG_ENABLE_OPTapproach is that there
is no
way to override it for the user, and there are some of them that you may actually want to turn off for security reasons, e.g.BPF_SYSCALLand KEYS.So I think the ideal is a mix of
ENABLE_OPTand additional fixes in the
test.
It will be a bit difficult to decide which one goes where.
Quoted 8 lines
Ideally, the commit message should document for each config option what kind
of error you get from the test when you don't enable it, so we at least have information based on which to take a decision. Is that doable, Dowan? It could be a lot of work...Regards,
Arnout
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot