* [meta-networking][PATCH] ebtables: make it be able to work on 64bit kernel with 32 bit userspace
@ 2014-11-18 23:12 Mark Hatle
2014-11-18 23:12 ` [meta-networking][PATCH] polarssl: add dependency openssl Mark Hatle
2014-11-19 0:32 ` [meta-networking][PATCH] ebtables: make it be able to work on 64bit kernel with 32 bit userspace Rongqing Li
0 siblings, 2 replies; 4+ messages in thread
From: Mark Hatle @ 2014-11-18 23:12 UTC (permalink / raw)
To: openembedded-devel
From: "Roy.Li" <rongqing.li@windriver.com>
[ This patch is being sent up for Yocto Project compliance. I'm not sure it's generally applicable. ]
Some structs, which is used to communicate between user space and kernel,
have the alignment issue on 64bit kernel with 32 bit userspace. To fix
this issue, ebtables redefines these struct, not use the kernel(sysroot)
include/uapi/linux/netfilter_bridge/ebtables.h, like ebt_entry_target:
The kernel's:
struct ebt_entry_target {
union {
char name[EBT_FUNCTION_MAXNAMELEN];
struct xt_target *target;
} u;
/* size of data */
unsigned int target_size;
unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace))));
};
The ebtables:
struct ebt_entry_target
{
union {
char name[EBT_FUNCTION_MAXNAMELEN];
struct ebt_target *target;
} u;
/* size of data */
unsigned int target_size;
|#ifdef KERNEL_64_USERSPACE_32
unsigned int pad;
|#endif
unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace))));
};
To make it work on 64bit kernel and 32bit userspace, KERNEL_64_USERSPACE_32
is needed to be enabled.
If the MLPREFIX of package matchs "lib.?32", the 32bit multilib package on
64bit kernel is being built.
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
recipes-filter/ebtables/ebtables_2.0.10-4.bb | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/recipes-filter/ebtables/ebtables_2.0.10-4.bb b/recipes-filter/ebtables/ebtables_2.0.10-4.bb
index 32cfc75..ca084e3 100644
--- a/recipes-filter/ebtables/ebtables_2.0.10-4.bb
+++ b/recipes-filter/ebtables/ebtables_2.0.10-4.bb
@@ -27,6 +27,17 @@ S = "${WORKDIR}/ebtables-v${PV}"
inherit update-rc.d systemd
+python __anonymous () {
+ import re
+
+ multilib = d.getVar('MLPREFIX', True)
+ if multilib:
+ searchstr = "lib.?32"
+ reg = re.compile(searchstr)
+ if reg.search(multilib):
+ d.appendVar('CFLAGS' ,' -DKERNEL_64_USERSPACE_32 -DEBT_MIN_ALIGN=8')
+}
+
EXTRA_OEMAKE = " \
BINDIR=${base_sbindir} \
MANDIR=${mandir} \
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [meta-networking][PATCH] polarssl: add dependency openssl
2014-11-18 23:12 [meta-networking][PATCH] ebtables: make it be able to work on 64bit kernel with 32 bit userspace Mark Hatle
@ 2014-11-18 23:12 ` Mark Hatle
2014-11-19 15:11 ` Martin Jansa
2014-11-19 0:32 ` [meta-networking][PATCH] ebtables: make it be able to work on 64bit kernel with 32 bit userspace Rongqing Li
1 sibling, 1 reply; 4+ messages in thread
From: Mark Hatle @ 2014-11-18 23:12 UTC (permalink / raw)
To: openembedded-devel
From: Kai Kang <kai.kang@windriver.com>
polarssl compiles with openssl to build unit test cases. If openssl
doesn't exist, native libssl.so will be used. Then causes error:
| .../bitbake_build/tmp/sysroots/x86_64-linux/usr/lib/libssl.so: error adding symbols: File in wrong format
Add dependency openssl for polarssl to fix it.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
| 1 +
1 file changed, 1 insertion(+)
--git a/recipes-connectivity/polarssl/polarssl_1.3.8.bb b/recipes-connectivity/polarssl/polarssl_1.3.8.bb
index 8ca1b1c..7a496b7 100644
--- a/recipes-connectivity/polarssl/polarssl_1.3.8.bb
+++ b/recipes-connectivity/polarssl/polarssl_1.3.8.bb
@@ -28,6 +28,7 @@ SRC_URI = "https://polarssl.org/download/polarssl-${PV}-gpl.tgz"
SRC_URI[md5sum] = "d1a2b4f21727e888f143414d2e3144e6"
SRC_URI[sha256sum] = "318171db41335cacbb5b0047c94f1faf91442ab70a223b5223436703c9406ff1"
+DEPENDS = "openssl"
RDEPENDS_${PN} += "libcrypto"
EXTRA_OECMAKE = "-DUSE_SHARED_POLARSSL_LIBRARY=on"
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [meta-networking][PATCH] ebtables: make it be able to work on 64bit kernel with 32 bit userspace
2014-11-18 23:12 [meta-networking][PATCH] ebtables: make it be able to work on 64bit kernel with 32 bit userspace Mark Hatle
2014-11-18 23:12 ` [meta-networking][PATCH] polarssl: add dependency openssl Mark Hatle
@ 2014-11-19 0:32 ` Rongqing Li
1 sibling, 0 replies; 4+ messages in thread
From: Rongqing Li @ 2014-11-19 0:32 UTC (permalink / raw)
To: openembedded-devel
On 2014年11月19日 07:12, Mark Hatle wrote:
> From: "Roy.Li" <rongqing.li@windriver.com>
>
>
> [ This patch is being sent up for Yocto Project compliance. I'm not sure it's generally applicable. ]
>
This patch has been merged into meta-oe, but it lead to x86-64 with 32bit
user space unable to work, I am see the root cause.
-Roy
>
> Some structs, which is used to communicate between user space and kernel,
> have the alignment issue on 64bit kernel with 32 bit userspace. To fix
> this issue, ebtables redefines these struct, not use the kernel(sysroot)
> include/uapi/linux/netfilter_bridge/ebtables.h, like ebt_entry_target:
>
> The kernel's:
> struct ebt_entry_target {
> union {
> char name[EBT_FUNCTION_MAXNAMELEN];
> struct xt_target *target;
> } u;
> /* size of data */
> unsigned int target_size;
> unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace))));
> };
>
> The ebtables:
> struct ebt_entry_target
> {
> union {
> char name[EBT_FUNCTION_MAXNAMELEN];
> struct ebt_target *target;
> } u;
> /* size of data */
> unsigned int target_size;
> |#ifdef KERNEL_64_USERSPACE_32
> unsigned int pad;
> |#endif
> unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace))));
> };
>
> To make it work on 64bit kernel and 32bit userspace, KERNEL_64_USERSPACE_32
> is needed to be enabled.
>
> If the MLPREFIX of package matchs "lib.?32", the 32bit multilib package on
> 64bit kernel is being built.
>
> Signed-off-by: Roy.Li <rongqing.li@windriver.com>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> ---
> recipes-filter/ebtables/ebtables_2.0.10-4.bb | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/recipes-filter/ebtables/ebtables_2.0.10-4.bb b/recipes-filter/ebtables/ebtables_2.0.10-4.bb
> index 32cfc75..ca084e3 100644
> --- a/recipes-filter/ebtables/ebtables_2.0.10-4.bb
> +++ b/recipes-filter/ebtables/ebtables_2.0.10-4.bb
> @@ -27,6 +27,17 @@ S = "${WORKDIR}/ebtables-v${PV}"
>
> inherit update-rc.d systemd
>
> +python __anonymous () {
> + import re
> +
> + multilib = d.getVar('MLPREFIX', True)
> + if multilib:
> + searchstr = "lib.?32"
> + reg = re.compile(searchstr)
> + if reg.search(multilib):
> + d.appendVar('CFLAGS' ,' -DKERNEL_64_USERSPACE_32 -DEBT_MIN_ALIGN=8')
> +}
> +
> EXTRA_OEMAKE = " \
> BINDIR=${base_sbindir} \
> MANDIR=${mandir} \
>
--
Best Reagrds,
Roy | RongQing Li
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [meta-networking][PATCH] polarssl: add dependency openssl
2014-11-18 23:12 ` [meta-networking][PATCH] polarssl: add dependency openssl Mark Hatle
@ 2014-11-19 15:11 ` Martin Jansa
0 siblings, 0 replies; 4+ messages in thread
From: Martin Jansa @ 2014-11-19 15:11 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 1618 bytes --]
On Tue, Nov 18, 2014 at 05:12:49PM -0600, Mark Hatle wrote:
> From: Kai Kang <kai.kang@windriver.com>
>
> polarssl compiles with openssl to build unit test cases. If openssl
> doesn't exist, native libssl.so will be used. Then causes error:
>
> | .../bitbake_build/tmp/sysroots/x86_64-linux/usr/lib/libssl.so: error adding symbols: File in wrong format
>
> Add dependency openssl for polarssl to fix it.
>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> ---
> recipes-connectivity/polarssl/polarssl_1.3.8.bb | 1 +
> 1 file changed, 1 insertion(+)
Doesn't apply because it doesn't have meta-networking/ directory prefix
>
> diff --git a/recipes-connectivity/polarssl/polarssl_1.3.8.bb b/recipes-connectivity/polarssl/polarssl_1.3.8.bb
> index 8ca1b1c..7a496b7 100644
> --- a/recipes-connectivity/polarssl/polarssl_1.3.8.bb
> +++ b/recipes-connectivity/polarssl/polarssl_1.3.8.bb
> @@ -28,6 +28,7 @@ SRC_URI = "https://polarssl.org/download/polarssl-${PV}-gpl.tgz"
> SRC_URI[md5sum] = "d1a2b4f21727e888f143414d2e3144e6"
> SRC_URI[sha256sum] = "318171db41335cacbb5b0047c94f1faf91442ab70a223b5223436703c9406ff1"
>
> +DEPENDS = "openssl"
> RDEPENDS_${PN} += "libcrypto"
> EXTRA_OECMAKE = "-DUSE_SHARED_POLARSSL_LIBRARY=on"
>
> --
> 1.9.3
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-19 15:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-18 23:12 [meta-networking][PATCH] ebtables: make it be able to work on 64bit kernel with 32 bit userspace Mark Hatle
2014-11-18 23:12 ` [meta-networking][PATCH] polarssl: add dependency openssl Mark Hatle
2014-11-19 15:11 ` Martin Jansa
2014-11-19 0:32 ` [meta-networking][PATCH] ebtables: make it be able to work on 64bit kernel with 32 bit userspace Rongqing Li
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.