netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Florian Westphal <fw@strlen.de>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	netfilter-devel@vger.kernel.org,
	thomas.de_schampheleire@nokia.com
Subject: Re: [ebtables PATCH 2/2] configure.ac: add option --enable-kernel-64-userland-32
Date: Tue, 1 Jun 2021 16:50:16 +0200	[thread overview]
Message-ID: <20210601145016.GA5183@breakpoint.cc> (raw)
In-Reply-To: <CAAXf6LXNjUpE8_f2t8a+18ovWM67JXxt=JAxskkERoRaX+664g@mail.gmail.com>

Thomas De Schampheleire <patrickdepinguin@gmail.com> wrote:
> 1.  x86_64 kernel 5.4.x + i686 userspace: ebtables works correctly
> 
> 2.  aarch64 kernel 4.1.x + 32-bit ARM userspace: ebtables fails as described
> 
> As mentioned before, in both cases CONFIG_COMPAT=y .
> >
> > Thomas, does unmodified 32bit iptables work on those arch/kernel
> > combinations?
> 
> Yes, iptables 1.8.6 is used successfully without special provisioning
> for bitness. We are using Buildroot 2021.02 to compile.

Ok, so this is 'just' a bug in the ebtables translation layer.

Its likely that there are alignment differences on aarch that the
ebtables i686 fixups are not aware of.

> > ebtables-userspace compat fixups predate the ebtables kernel side
> > support, it was autoenabled on sparc64 in the old makefile:
> >
> > ifeq ($(shell uname -m),sparc64)
> > CFLAGS+=-DEBT_MIN_ALIGN=8 -DKERNEL_64_USERSPACE_32
> > endif
> 
> Yes, in the proposed changes to ebtables userspace, this kind of logic
> is restored, but not based on the machine type but with an autoconf
> flag.
> 
> >
> > I don't even know if the ebtables compat support is compiled in on
> > non-amd64.
> 
> Can you be more specific what you are referring to here?

I meant I wasn't sure if the ebtables compat stuff is compiled in on
non-amd64 platforms.  But I guess they are because iptables works for
you.

> So at this moment it seems to me that the kernel compat support is
> effectively compiled in, and supports x86(_64) but does not support
> the Aarch64/ARM combination (and perhaps others).
> 
> How to proceed now?

The proper solution is to make the existing translation work on aarch64.

It will take me some time to get a crosscompiler+qemu setup going
though.

      reply	other threads:[~2021-06-01 14:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 18:17 [ebtables PATCH 1/2] ebtables.h: restore KERNEL_64_USERSPACE_32 checks Thomas De Schampheleire
2021-05-18 18:17 ` [ebtables PATCH 2/2] configure.ac: add option --enable-kernel-64-userland-32 Thomas De Schampheleire
2021-05-24 15:26   ` Pablo Neira Ayuso
2021-05-25 11:52     ` Thomas De Schampheleire
2021-05-27 19:30       ` Pablo Neira Ayuso
2021-05-28 17:10         ` Florian Westphal
2021-05-31 12:11           ` Thomas De Schampheleire
2021-06-01 14:50             ` Florian Westphal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210601145016.GA5183@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=patrickdepinguin@gmail.com \
    --cc=thomas.de_schampheleire@nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).