From f80d136bdd578468035a88125fa1b84973fd912b Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Mon, 13 Apr 2015 09:55:04 +0800 Subject: kmod: upgrade to 20 The following patches are rebased. -- Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch -- avoid_parallel_tests.patch The ptest part of kmod is removed because new version of kmod port all tests to use modules from module-playground instead of copying prebuilt modules to the repository. So, we cannot use ptest as before. Remove it so that kmod can build successfully. Signed-off-by: Chen Qi Signed-off-by: Richard Purdie --- ...ge-to-calling-bswap_-instead-of-htobe-and-be-toh.patch | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch') diff --git a/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch b/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch index 7c0a27510b..b722183b68 100644 --- a/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch +++ b/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch @@ -1,7 +1,4 @@ -From 4b68940b1ed46c54a5a0bdf6bb9d4599bc64e6f4 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Wed, 24 Dec 2014 10:12:40 +0800 -Subject: [PATCH] Change to calling bswap_* instead of htobe* and be*toh +Subject: Change to calling bswap_* instead of htobe* and be*toh We can't use htobe* and be*toh functions because they are not available on older versions of glibc, For example, shipped on Centos 5.5. @@ -17,10 +14,10 @@ Signed-off-by: Chen Qi 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c -index 2b976a5..ffe58c2 100644 +index 6fc06fc..912185a 100644 --- a/libkmod/libkmod-signature.c +++ b/libkmod/libkmod-signature.c -@@ -19,6 +19,7 @@ +@@ -18,6 +18,7 @@ */ #include @@ -28,15 +25,15 @@ index 2b976a5..ffe58c2 100644 #include #include #include -@@ -124,7 +125,7 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat +@@ -127,7 +128,7 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat modsig->hash >= PKEY_HASH__LAST || modsig->id_type >= PKEY_ID_TYPE__LAST) return false; - sig_len = be32toh(get_unaligned(&modsig->sig_len)); + sig_len = bswap_32(get_unaligned(&modsig->sig_len)); - if (size < (off_t)(modsig->signer_len + modsig->key_id_len + sig_len)) + if (sig_len == 0 || + size < (int64_t)(modsig->signer_len + modsig->key_id_len + sig_len)) return false; - -- 1.9.1 -- cgit 1.2.3-korg