UPSTREAM: netfilter: ebtables: fix compat entry padding

On arm64, ebt_entry_{match,watcher,target} structs are 40 bytes long
while on 32-bit arm these structs have a size of 36 bytes.

COMPAT_XT_ALIGN() macro cannot be used here to determine the necessary
padding for the CONFIG_COMPAT because it imposes an 8-byte boundary
alignment, condition that is not found in 32-bit ebtables application.

Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit 9e8c8dabb78e886ace989729e763d28c76f5169e)
Signed-off-by: Raju Konduru <rkonduru@google.com>

BUG=b:179521281
TEST=Compiled and verified ebtables rules are applied successfully.
% ebtables -A INPUT -p IPv4 -j DROP
% ebtables -L
Bridge table: filter

Bridge chain: INPUT, entries: 1, policy: ACCEPT
-p IPv4 -j DROP

Bridge chain: FORWARD, entries: 0, policy: ACCEPT

Bridge chain: OUTPUT, entries: 0, policy: ACCEPT

Change-Id: I0f7496a18384b45dcfe0d5eda6155801bc26a3c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2728297
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Kevin Hayes <kevinhayes@google.com>
Reviewed-by: Kishan Kunduru <kkunduru@chromium.org>
Commit-Queue: Raju Konduru <rkonduru@google.com>
Tested-by: Raju Konduru <rkonduru@google.com>
1 file changed