From: Florian Westphal <fw@strlen.de>
To: Dmitry Safonov <dima@arista.com>
Cc: David Miller <davem@davemloft.net>,
nharold@google.com, fw@strlen.de, steffen.klassert@secunet.com,
linux-kernel@vger.kernel.org, herbert@gondor.apana.org.au,
0x7f454c46@gmail.com, netdev@vger.kernel.org, luto@kernel.org,
ard.biesheuvel@linaro.org, hpa@zytor.com, mingo@redhat.com,
john.stultz@linaro.org, kirill.shutemov@linux.intel.com,
oleg@redhat.com, sboyd@kernel.org, rostedt@goodmis.org,
tglx@linutronix.de, x86@kernel.org, linux-efi@vger.kernel.org,
akpm@linux-foundation.org, gregkh@linuxfoundation.org,
mchehab+samsung@kernel.org, shuah@kernel.org,
linux-kselftest@vger.kernel.org, eparis@redhat.com,
kadlec@blackhole.kfki.hu, pablo@netfilter.org,
paul@paul-moore.com, coreteam@netfilter.org,
linux-audit@redhat.com, netfilter-devel@vger.kernel.org,
fan.du@intel.com
Subject: Re: [PATCH 00/18] xfrm: Add compat layer
Date: Mon, 30 Jul 2018 21:43:14 +0200 [thread overview]
Message-ID: <20180730194314.ixzvniuvdfofvvpj@breakpoint.cc> (raw)
In-Reply-To: <1532972360.2679.32.camel@arista.com>
Dmitry Safonov <dima@arista.com> wrote:
> On Sat, 2018-07-28 at 14:18 -0700, David Miller wrote:
> > From: Dmitry Safonov <dima@arista.com>
> > Date: Sat, 28 Jul 2018 17:26:55 +0100
> >
> > > Well, I think, I'll rework my patches set according to critics and
> > > separate compat xfrm layer. I've already a selftest to check that
> > 32/64
> > > bit xfrm works - so the most time-taking part is done.
> >
> > The way you've done the compat structures using __packed is only
> > going
> > to work on x86, just FYI.
>
> Thanks for pointing, so I'll probably cover it under something like
> HAS_COMPAT_XFRM.
> (if there isn't any better idea).
You can do that, I suspect you can use
CONFIG_COMPAT_FOR_U64_ALIGNMENT
as AFAICR the only reason for the compat problem is different alignment
requirements of 64bit integer types in the structs, not e.g. due to
"long" size differences.
Instead of __packed, you can use the "compat" data types, e.g.
compat_u64 instead of u64:
struct compat_xfrm_lifetime_cur {
compat_u64 bytes, packets, add_time, use_time;
}; /* same size on i386, but only 4 byte alignment required even on x86_64*/
You might be able to reuse
https://git.breakpoint.cc/cgit/fw/net-next.git/commit/?h=xfrm_config_compat_07&id=f64430e6d9e297f3990f485a4832e273751b9869
in your patch set.
I can try to submit the first few patches (which are not related to
compat, they just add const qualifiers) for inclusion later this week.
prev parent reply other threads:[~2018-07-30 19:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 2:31 [PATCH 00/18] xfrm: Add compat layer Dmitry Safonov
2018-07-26 2:31 ` [PATCH 07/18] netlink: Pass groups pointer to .bind() Dmitry Safonov
2018-07-26 8:49 ` [PATCH 00/18] xfrm: Add compat layer Florian Westphal
2018-07-27 7:37 ` Steffen Klassert
2018-07-27 14:02 ` Dmitry Safonov
2018-07-27 14:19 ` Florian Westphal
2018-07-27 14:51 ` Dmitry Safonov
2018-07-27 16:48 ` Nathan Harold
2018-07-27 17:09 ` Andy Lutomirski
2018-07-28 16:26 ` Dmitry Safonov
2018-07-28 21:18 ` David Miller
2018-07-30 17:39 ` Dmitry Safonov
2018-07-30 19:43 ` 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=20180730194314.ixzvniuvdfofvvpj@breakpoint.cc \
--to=fw@strlen.de \
--cc=0x7f454c46@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ard.biesheuvel@linaro.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=dima@arista.com \
--cc=eparis@redhat.com \
--cc=fan.du@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=kadlec@blackhole.kfki.hu \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-audit@redhat.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mchehab+samsung@kernel.org \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=nharold@google.com \
--cc=oleg@redhat.com \
--cc=pablo@netfilter.org \
--cc=paul@paul-moore.com \
--cc=rostedt@goodmis.org \
--cc=sboyd@kernel.org \
--cc=shuah@kernel.org \
--cc=steffen.klassert@secunet.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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).