Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'nf-24-12-25' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf

Pablo Neira Ayuso says:

====================
Netfilter fixes for net

The following batch contains one Netfilter fix for net:

1) Fix unaligned atomic read on struct nft_set_ext in nft_set_hash
backend that causes an alignment failure splat on aarch64. This
is related to a recent fix and it has been reported via the
regressions mailing list.

* tag 'nf-24-12-25' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
netfilter: nft_set_hash: unaligned atomic read on struct nft_set_ext
====================

Link: https://patch.msgid.link/20241224233109.361755-1-pablo@netfilter.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+5 -2
+5 -2
include/net/netfilter/nf_tables.h
··· 733 733 /** 734 734 * struct nft_set_ext - set extensions 735 735 * 736 - * @genmask: generation mask 736 + * @genmask: generation mask, but also flags (see NFT_SET_ELEM_DEAD_BIT) 737 737 * @offset: offsets of individual extension types 738 738 * @data: beginning of extension data 739 + * 740 + * This structure must be aligned to word size, otherwise atomic bitops 741 + * on genmask field can cause alignment failure on some archs. 739 742 */ 740 743 struct nft_set_ext { 741 744 u8 genmask; 742 745 u8 offset[NFT_SET_EXT_NUM]; 743 746 char data[]; 744 - }; 747 + } __aligned(BITS_PER_LONG / 8); 745 748 746 749 static inline void nft_set_ext_prepare(struct nft_set_ext_tmpl *tmpl) 747 750 {