Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1565122
| From | David Laight <David.Laight@ACULAB.COM> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH 0/4] Make xfrm usable by 32-bit programs |
| Date | 2017-01-23 17:50 +0100 |
| Message-ID | <t2PYC-mQ-19@gated-at.bofh.it> (permalink) |
| References | <t1RpL-5D4-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Kevin Cernekee > Sent: 21 January 2017 00:05 > Several of the xfrm netlink and setsockopt() interfaces are not usable > from a 32-bit binary running on a 64-bit kernel due to struct padding > differences. This has been the case for many, many years[0]. This > patch series deprecates the broken netlink messages and replaces them > with packed structs that are compatible between 64-bit and 32-bit > programs. Do you mean '__packed' or just structures with no holes? The latter is really the best. You can add a compile time assert on the structure sizes to ensure that the user API is never accidentally broken. I can't imagine any reason to change the 64bit structures except (maybe) to make any padding explicit. > It retains support for legacy user programs (i.e. anything > that is currently working today), and allows legacy support to be > compiled out via CONFIG_XFRM_USER_LEGACY if it becomes unnecessary in > the future. ... Isn't that effectively the same as doing a compat layer? Otherwise you can't build a 32bit app that will work with an 'old' 32bit kernel and a new 64bit one. Provided you've got the length of the user's buffer the compat code ought to be trivial (if tedious). David
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] Make xfrm usable by 32-bit programs Kevin Cernekee <cernekee@chromium.org> - 2017-01-21 01:10 +0100
[PATCH 2/4] xfrm_user: Allow common functions to be called from another file Kevin Cernekee <cernekee@chromium.org> - 2017-01-21 01:10 +0100
[PATCH 3/4] xfrm_user: Initial commit of xfrm_user_legacy.c Kevin Cernekee <cernekee@chromium.org> - 2017-01-21 01:10 +0100
Re: [PATCH 0/4] Make xfrm usable by 32-bit programs Steffen Klassert <steffen.klassert@secunet.com> - 2017-01-23 10:40 +0100
Re: [PATCH 0/4] Make xfrm usable by 32-bit programs David Miller <davem@davemloft.net> - 2017-01-23 16:50 +0100
RE: [PATCH 0/4] Make xfrm usable by 32-bit programs David Laight <David.Laight@ACULAB.COM> - 2017-01-23 17:50 +0100
Re: [PATCH 0/4] Make xfrm usable by 32-bit programs David Miller <davem@davemloft.net> - 2017-01-23 18:00 +0100
csiph-web