diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-04-05 22:28:33 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-04-05 22:31:28 +0300 |
commit | 193236933b0f4ab91b1625b64e2187e2db4e0e8f (patch) | |
tree | e12769d7c76d8b0517d6de3d3c72189753d253ed /poky/meta/recipes-kernel | |
parent | bd93df9478f2f56ffcbc8cb88f1709c735dcd85b (diff) | |
download | openbmc-193236933b0f4ab91b1625b64e2187e2db4e0e8f.tar.xz |
reset upstream subtrees to HEAD
Reset the following subtrees on HEAD:
poky: 8217b477a1(master)
meta-xilinx: 64aa3d35ae(master)
meta-openembedded: 0435c9e193(master)
meta-raspberrypi: 490a4441ac(master)
meta-security: cb6d1c85ee(master)
Squashed patches:
meta-phosphor: drop systemd 239 patches
meta-phosphor: mrw-api: use correct install path
Change-Id: I268e2646d9174ad305630c6bbd3fbc1a6105f43d
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-kernel')
64 files changed, 3257 insertions, 1123 deletions
diff --git a/poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.9.bb b/poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.10.bb index c55577c66..c55577c66 100644 --- a/poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.9.bb +++ b/poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.10.bb diff --git a/poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb b/poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb index ed4327d40..552eb6aba 100644 --- a/poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb +++ b/poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb @@ -9,11 +9,6 @@ DEPENDS += "cryptodev-linux" SRC_URI += " \ file://0001-Disable-installing-header-file-provided-by-another-p.patch \ -file://0001-ioctl.c-Fix-build-with-linux-4.13.patch \ -file://0001-ioctl.c-Fix-build-with-linux-4.17.patch \ -file://0001-refactoring-split-big-function-to-simplify-maintaina.patch \ -file://0002-refactoring-relocate-code-to-simplify-later-patches.patch \ -file://0003-convert-to-new-AEAD-interface-in-kernels-v4.2.patch \ " EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' diff --git a/poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.9.bb b/poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.10.bb index 617db6cdd..9cb5dcb94 100644 --- a/poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.9.bb +++ b/poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.10.bb @@ -6,7 +6,6 @@ DEPENDS += "openssl" SRC_URI += " \ file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \ -file://0001-Port-tests-to-openssl-1.1.patch \ " EXTRA_OEMAKE='KERNEL_DIR="${STAGING_EXECPREFIXDIR}" PREFIX="${D}"' diff --git a/poky/meta/recipes-kernel/cryptodev/cryptodev.inc b/poky/meta/recipes-kernel/cryptodev/cryptodev.inc index ab15bc1d9..252d39d23 100644 --- a/poky/meta/recipes-kernel/cryptodev/cryptodev.inc +++ b/poky/meta/recipes-kernel/cryptodev/cryptodev.inc @@ -4,7 +4,7 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "git://github.com/cryptodev-linux/cryptodev-linux" -SRCREV = "87d959d9a279c055b361de8e730fab6a7144edd7" +SRCREV = "fd8b15ef1c8398a69a37932ee48c74ab40329a29" S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-kernel/cryptodev/files/0001-Port-tests-to-openssl-1.1.patch b/poky/meta/recipes-kernel/cryptodev/files/0001-Port-tests-to-openssl-1.1.patch deleted file mode 100644 index c9691265f..000000000 --- a/poky/meta/recipes-kernel/cryptodev/files/0001-Port-tests-to-openssl-1.1.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 2fe4bdeb8cdd0b0f46d9caed807812855d51ea56 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Wed, 28 Mar 2018 20:11:05 +0300 -Subject: [PATCH] Port tests to openssl 1.1 - -Upstream-Status: Accepted [https://github.com/cryptodev-linux/cryptodev-linux/pull/36] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - tests/openssl_wrapper.c | 33 +++++++++++++++++++++++++++++++++ - 1 file changed, 33 insertions(+) - -diff --git a/tests/openssl_wrapper.c b/tests/openssl_wrapper.c -index 038c58f..dea2496 100644 ---- a/tests/openssl_wrapper.c -+++ b/tests/openssl_wrapper.c -@@ -4,6 +4,7 @@ - #include <openssl/aes.h> - #include <openssl/evp.h> - #include <openssl/hmac.h> -+#include <openssl/opensslv.h> - - //#define DEBUG - -@@ -23,10 +24,17 @@ enum ctx_type { - ctx_type_md, - }; - -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L -+union openssl_ctx { -+ HMAC_CTX *hmac; -+ EVP_MD_CTX *md; -+}; -+#else - union openssl_ctx { - HMAC_CTX hmac; - EVP_MD_CTX md; - }; -+#endif - - struct ctx_mapping { - __u32 ses; -@@ -63,6 +71,16 @@ static void remove_mapping(__u32 ses) - switch (mapping->type) { - case ctx_type_none: - break; -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L -+ case ctx_type_hmac: -+ dbgp("%s: calling HMAC_CTX_free\n", __func__); -+ HMAC_CTX_free(mapping->ctx.hmac); -+ break; -+ case ctx_type_md: -+ dbgp("%s: calling EVP_MD_CTX_free\n", __func__); -+ EVP_MD_CTX_free(mapping->ctx.md); -+ break; -+#else - case ctx_type_hmac: - dbgp("%s: calling HMAC_CTX_cleanup\n", __func__); - HMAC_CTX_cleanup(&mapping->ctx.hmac); -@@ -71,6 +89,7 @@ static void remove_mapping(__u32 ses) - dbgp("%s: calling EVP_MD_CTX_cleanup\n", __func__); - EVP_MD_CTX_cleanup(&mapping->ctx.md); - break; -+#endif - } - memset(mapping, 0, sizeof(*mapping)); - } -@@ -127,10 +146,17 @@ static int openssl_hmac(struct session_op *sess, struct crypt_op *cop) - - mapping->ses = sess->ses; - mapping->type = ctx_type_hmac; -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L -+ ctx = mapping->ctx.hmac; -+ -+ dbgp("calling HMAC_CTX_new"); -+ ctx = HMAC_CTX_new(); -+#else - ctx = &mapping->ctx.hmac; - - dbgp("calling HMAC_CTX_init"); - HMAC_CTX_init(ctx); -+#endif - dbgp("calling HMAC_Init_ex"); - if (!HMAC_Init_ex(ctx, sess->mackey, sess->mackeylen, - sess_to_evp_md(sess), NULL)) { -@@ -172,10 +198,17 @@ static int openssl_md(struct session_op *sess, struct crypt_op *cop) - - mapping->ses = sess->ses; - mapping->type = ctx_type_md; -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L -+ ctx = mapping->ctx.md; -+ -+ dbgp("calling EVP_MD_CTX_new"); -+ ctx = EVP_MD_CTX_new(); -+#else - ctx = &mapping->ctx.md; - - dbgp("calling EVP_MD_CTX_init"); - EVP_MD_CTX_init(ctx); -+#endif - dbgp("calling EVP_DigestInit"); - EVP_DigestInit(ctx, sess_to_evp_md(sess)); - } diff --git a/poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.13.patch b/poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.13.patch deleted file mode 100644 index a41efacdd..000000000 --- a/poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.13.patch +++ /dev/null @@ -1,49 +0,0 @@ -From f0d69774afb27ffc62bf353465fba145e70cb85a Mon Sep 17 00:00:00 2001 -From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> -Date: Mon, 4 Sep 2017 11:05:08 +0200 -Subject: [PATCH] ioctl.c: Fix build with linux 4.13 - -git/ioctl.c:1127:3: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] - {0, }, - ^ -note: (near initialization for 'verbosity_ctl_dir[1]') -git/ioctl.c:1136:3: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] - {0, }, - ^ - -Linux kernel has added -Werror=designated-init around 4.11 (c834f0e8a8b) -triggering build errors with gcc 5 and 6 (but not with gcc 4) - -Upstream-Status: Backport - -Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> -Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> ---- - ioctl.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ioctl.c b/ioctl.c -index 0385203..8d4a162 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -1124,7 +1124,7 @@ static struct ctl_table verbosity_ctl_dir[] = { - .mode = 0644, - .proc_handler = proc_dointvec, - }, -- {0, }, -+ {}, - }; - - static struct ctl_table verbosity_ctl_root[] = { -@@ -1133,7 +1133,7 @@ static struct ctl_table verbosity_ctl_root[] = { - .mode = 0555, - .child = verbosity_ctl_dir, - }, -- {0, }, -+ {}, - }; - static struct ctl_table_header *verbosity_sysctl_header; - static int __init init_cryptodev(void) --- -2.7.4 - diff --git a/poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.17.patch b/poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.17.patch deleted file mode 100644 index 5881d1c4e..000000000 --- a/poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.17.patch +++ /dev/null @@ -1,43 +0,0 @@ -From f60aa08c63fc02780554a0a12180a478ca27d49f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Horia=20Geant=C4=83?= <horia.geanta@nxp.com> -Date: Wed, 23 May 2018 18:43:39 +0300 -Subject: [PATCH] ioctl.c: Fix build with linux 4.17 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Since kernel 4.17-rc1, sys_* syscalls can no longer be called directly: -819671ff849b ("syscalls: define and explain goal to not call syscalls in the kernel") - -Since cryptodev uses sys_close() - and this has been removed in commit: -2ca2a09d6215 ("fs: add ksys_close() wrapper; remove in-kernel calls to sys_close()") -cryptodev has to be updated to use the ksys_close() wrapper. - -Signed-off-by: Horia Geantă <horia.geanta@nxp.com> - -Upstream-Status: Backport - -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - ioctl.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/ioctl.c b/ioctl.c -index d831b0c..2571034 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -828,7 +828,11 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) - fd = clonefd(filp); - ret = put_user(fd, p); - if (unlikely(ret)) { -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)) - sys_close(fd); -+#else -+ ksys_close(fd); -+#endif - return ret; - } - return ret; --- -2.7.4 - diff --git a/poky/meta/recipes-kernel/cryptodev/files/0001-refactoring-split-big-function-to-simplify-maintaina.patch b/poky/meta/recipes-kernel/cryptodev/files/0001-refactoring-split-big-function-to-simplify-maintaina.patch deleted file mode 100644 index f557b5dff..000000000 --- a/poky/meta/recipes-kernel/cryptodev/files/0001-refactoring-split-big-function-to-simplify-maintaina.patch +++ /dev/null @@ -1,250 +0,0 @@ -From 20dcf071bc3076ee7db9d603cfbe6a06e86c7d5f Mon Sep 17 00:00:00 2001 -From: Cristian Stoica <cristian.stoica@nxp.com> -Date: Thu, 4 May 2017 15:06:20 +0300 -Subject: [PATCH 1/3] refactoring: split big function to simplify maintainance - -The setup of auth_buf in tls and aead is now duplicated but this -is temporary and allows necessary corrections for the aead case -with v4.2+ kernels. - -Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> - -Upstream-Status: Backport - -Commit ID: 20dcf071bc3076ee7db9d603c - -Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> ---- - authenc.c | 197 ++++++++++++++++++++++++++++++++++++++++---------------------- - 1 file changed, 126 insertions(+), 71 deletions(-) - -diff --git a/authenc.c b/authenc.c -index 1bd7377..28eb0f9 100644 ---- a/authenc.c -+++ b/authenc.c -@@ -609,96 +609,151 @@ auth_n_crypt(struct csession *ses_ptr, struct kernel_crypt_auth_op *kcaop, - return 0; - } - --/* This is the main crypto function - zero-copy edition */ --static int --__crypto_auth_run_zc(struct csession *ses_ptr, struct kernel_crypt_auth_op *kcaop) -+static int crypto_auth_zc_srtp(struct csession *ses_ptr, struct kernel_crypt_auth_op *kcaop) - { -- struct scatterlist *dst_sg, *auth_sg, *src_sg; -+ struct scatterlist *dst_sg, *auth_sg; - struct crypt_auth_op *caop = &kcaop->caop; -- int ret = 0; -+ int ret; - -- if (caop->flags & COP_FLAG_AEAD_SRTP_TYPE) { -- if (unlikely(ses_ptr->cdata.init != 0 && -- (ses_ptr->cdata.stream == 0 || -- ses_ptr->cdata.aead != 0))) { -- derr(0, "Only stream modes are allowed in SRTP mode (but not AEAD)"); -- return -EINVAL; -- } -+ if (unlikely(ses_ptr->cdata.init != 0 && -+ (ses_ptr->cdata.stream == 0 || ses_ptr->cdata.aead != 0))) { -+ derr(0, "Only stream modes are allowed in SRTP mode (but not AEAD)"); -+ return -EINVAL; -+ } - -- ret = get_userbuf_srtp(ses_ptr, kcaop, &auth_sg, &dst_sg); -- if (unlikely(ret)) { -- derr(1, "get_userbuf_srtp(): Error getting user pages."); -- return ret; -- } -+ ret = get_userbuf_srtp(ses_ptr, kcaop, &auth_sg, &dst_sg); -+ if (unlikely(ret)) { -+ derr(1, "get_userbuf_srtp(): Error getting user pages."); -+ return ret; -+ } - -- ret = srtp_auth_n_crypt(ses_ptr, kcaop, auth_sg, caop->auth_len, -- dst_sg, caop->len); -+ ret = srtp_auth_n_crypt(ses_ptr, kcaop, auth_sg, caop->auth_len, -+ dst_sg, caop->len); - -- release_user_pages(ses_ptr); -- } else { /* TLS and normal cases. Here auth data are usually small -- * so we just copy them to a free page, instead of trying -- * to map them. -- */ -- unsigned char *auth_buf = NULL; -- struct scatterlist tmp; -+ release_user_pages(ses_ptr); - -- if (unlikely(caop->auth_len > PAGE_SIZE)) { -- derr(1, "auth data len is excessive."); -- return -EINVAL; -- } -+ return ret; -+} - -- auth_buf = (char *)__get_free_page(GFP_KERNEL); -- if (unlikely(!auth_buf)) { -- derr(1, "unable to get a free page."); -- return -ENOMEM; -- } -+static int crypto_auth_zc_tls(struct csession *ses_ptr, struct kernel_crypt_auth_op *kcaop) -+{ -+ struct crypt_auth_op *caop = &kcaop->caop; -+ struct scatterlist *dst_sg, *auth_sg; -+ unsigned char *auth_buf = NULL; -+ struct scatterlist tmp; -+ int ret; - -- if (caop->auth_src && caop->auth_len > 0) { -- if (unlikely(copy_from_user(auth_buf, caop->auth_src, caop->auth_len))) { -- derr(1, "unable to copy auth data from userspace."); -- ret = -EFAULT; -- goto free_auth_buf; -- } -+ if (unlikely(ses_ptr->cdata.aead != 0)) { -+ return -EINVAL; -+ } -+ -+ if (unlikely(caop->auth_len > PAGE_SIZE)) { -+ derr(1, "auth data len is excessive."); -+ return -EINVAL; -+ } -+ -+ auth_buf = (char *)__get_free_page(GFP_KERNEL); -+ if (unlikely(!auth_buf)) { -+ derr(1, "unable to get a free page."); -+ return -ENOMEM; -+ } - -- sg_init_one(&tmp, auth_buf, caop->auth_len); -- auth_sg = &tmp; -- } else { -- auth_sg = NULL; -+ if (caop->auth_src && caop->auth_len > 0) { -+ if (unlikely(copy_from_user(auth_buf, caop->auth_src, caop->auth_len))) { -+ derr(1, "unable to copy auth data from userspace."); -+ ret = -EFAULT; -+ goto free_auth_buf; - } - -- if (caop->flags & COP_FLAG_AEAD_TLS_TYPE && ses_ptr->cdata.aead == 0) { -- ret = get_userbuf_tls(ses_ptr, kcaop, &dst_sg); -- if (unlikely(ret)) { -- derr(1, "get_userbuf_tls(): Error getting user pages."); -- goto free_auth_buf; -- } -+ sg_init_one(&tmp, auth_buf, caop->auth_len); -+ auth_sg = &tmp; -+ } else { -+ auth_sg = NULL; -+ } - -- ret = tls_auth_n_crypt(ses_ptr, kcaop, auth_sg, caop->auth_len, -- dst_sg, caop->len); -- } else { -- if (unlikely(ses_ptr->cdata.init == 0 || -- (ses_ptr->cdata.stream == 0 && -- ses_ptr->cdata.aead == 0))) { -- derr(0, "Only stream and AEAD ciphers are allowed for authenc"); -- ret = -EINVAL; -- goto free_auth_buf; -- } -+ ret = get_userbuf_tls(ses_ptr, kcaop, &dst_sg); -+ if (unlikely(ret)) { -+ derr(1, "get_userbuf_tls(): Error getting user pages."); -+ goto free_auth_buf; -+ } - -- ret = get_userbuf(ses_ptr, caop->src, caop->len, caop->dst, kcaop->dst_len, -- kcaop->task, kcaop->mm, &src_sg, &dst_sg); -- if (unlikely(ret)) { -- derr(1, "get_userbuf(): Error getting user pages."); -- goto free_auth_buf; -- } -+ ret = tls_auth_n_crypt(ses_ptr, kcaop, auth_sg, caop->auth_len, -+ dst_sg, caop->len); -+ release_user_pages(ses_ptr); -+ -+free_auth_buf: -+ free_page((unsigned long)auth_buf); -+ return ret; -+} -+ -+static int crypto_auth_zc_aead(struct csession *ses_ptr, struct kernel_crypt_auth_op *kcaop) -+{ -+ struct scatterlist *dst_sg, *auth_sg, *src_sg; -+ struct crypt_auth_op *caop = &kcaop->caop; -+ unsigned char *auth_buf = NULL; -+ struct scatterlist tmp; -+ int ret; - -- ret = auth_n_crypt(ses_ptr, kcaop, auth_sg, caop->auth_len, -- src_sg, dst_sg, caop->len); -+ if (unlikely(ses_ptr->cdata.init == 0 || -+ (ses_ptr->cdata.stream == 0 && ses_ptr->cdata.aead == 0))) { -+ derr(0, "Only stream and AEAD ciphers are allowed for authenc"); -+ return -EINVAL; -+ } -+ -+ if (unlikely(caop->auth_len > PAGE_SIZE)) { -+ derr(1, "auth data len is excessive."); -+ return -EINVAL; -+ } -+ -+ auth_buf = (char *)__get_free_page(GFP_KERNEL); -+ if (unlikely(!auth_buf)) { -+ derr(1, "unable to get a free page."); -+ return -ENOMEM; -+ } -+ -+ if (caop->auth_src && caop->auth_len > 0) { -+ if (unlikely(copy_from_user(auth_buf, caop->auth_src, caop->auth_len))) { -+ derr(1, "unable to copy auth data from userspace."); -+ ret = -EFAULT; -+ goto free_auth_buf; - } - -- release_user_pages(ses_ptr); -+ sg_init_one(&tmp, auth_buf, caop->auth_len); -+ auth_sg = &tmp; -+ } else { -+ auth_sg = NULL; -+ } -+ -+ ret = get_userbuf(ses_ptr, caop->src, caop->len, caop->dst, kcaop->dst_len, -+ kcaop->task, kcaop->mm, &src_sg, &dst_sg); -+ if (unlikely(ret)) { -+ derr(1, "get_userbuf(): Error getting user pages."); -+ goto free_auth_buf; -+ } -+ -+ ret = auth_n_crypt(ses_ptr, kcaop, auth_sg, caop->auth_len, -+ src_sg, dst_sg, caop->len); -+ -+ release_user_pages(ses_ptr); - - free_auth_buf: -- free_page((unsigned long)auth_buf); -+ free_page((unsigned long)auth_buf); -+ -+ return ret; -+} -+ -+static int -+__crypto_auth_run_zc(struct csession *ses_ptr, struct kernel_crypt_auth_op *kcaop) -+{ -+ struct crypt_auth_op *caop = &kcaop->caop; -+ int ret; -+ -+ if (caop->flags & COP_FLAG_AEAD_SRTP_TYPE) { -+ ret = crypto_auth_zc_srtp(ses_ptr, kcaop); -+ } else if (caop->flags & COP_FLAG_AEAD_TLS_TYPE) { -+ ret = crypto_auth_zc_tls(ses_ptr, kcaop); -+ } else { -+ ret = crypto_auth_zc_aead(ses_ptr, kcaop); - } - - return ret; --- -2.11.0 - diff --git a/poky/meta/recipes-kernel/cryptodev/files/0002-refactoring-relocate-code-to-simplify-later-patches.patch b/poky/meta/recipes-kernel/cryptodev/files/0002-refactoring-relocate-code-to-simplify-later-patches.patch deleted file mode 100644 index 83d9005a0..000000000 --- a/poky/meta/recipes-kernel/cryptodev/files/0002-refactoring-relocate-code-to-simplify-later-patches.patch +++ /dev/null @@ -1,64 +0,0 @@ -From c2bf0e42b1d9fda60cde4a3a682784d349ef1c0b Mon Sep 17 00:00:00 2001 -From: Cristian Stoica <cristian.stoica@nxp.com> -Date: Thu, 4 May 2017 15:06:21 +0300 -Subject: [PATCH 2/3] refactoring: relocate code to simplify later patches - -This code move will simplify the conversion to new AEAD interface in -next patches - -Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> - -Upstream-Status: Backport - -Commit ID: c2bf0e42b1d9fda - -Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> ---- - authenc.c | 17 +++++++++-------- - 1 file changed, 9 insertions(+), 8 deletions(-) - -diff --git a/authenc.c b/authenc.c -index 28eb0f9..95727b4 100644 ---- a/authenc.c -+++ b/authenc.c -@@ -711,11 +711,18 @@ static int crypto_auth_zc_aead(struct csession *ses_ptr, struct kernel_crypt_aut - return -ENOMEM; - } - -+ ret = get_userbuf(ses_ptr, caop->src, caop->len, caop->dst, kcaop->dst_len, -+ kcaop->task, kcaop->mm, &src_sg, &dst_sg); -+ if (unlikely(ret)) { -+ derr(1, "get_userbuf(): Error getting user pages."); -+ goto free_auth_buf; -+ } -+ - if (caop->auth_src && caop->auth_len > 0) { - if (unlikely(copy_from_user(auth_buf, caop->auth_src, caop->auth_len))) { - derr(1, "unable to copy auth data from userspace."); - ret = -EFAULT; -- goto free_auth_buf; -+ goto free_pages; - } - - sg_init_one(&tmp, auth_buf, caop->auth_len); -@@ -724,16 +731,10 @@ static int crypto_auth_zc_aead(struct csession *ses_ptr, struct kernel_crypt_aut - auth_sg = NULL; - } - -- ret = get_userbuf(ses_ptr, caop->src, caop->len, caop->dst, kcaop->dst_len, -- kcaop->task, kcaop->mm, &src_sg, &dst_sg); -- if (unlikely(ret)) { -- derr(1, "get_userbuf(): Error getting user pages."); -- goto free_auth_buf; -- } -- - ret = auth_n_crypt(ses_ptr, kcaop, auth_sg, caop->auth_len, - src_sg, dst_sg, caop->len); - -+free_pages: - release_user_pages(ses_ptr); - - free_auth_buf: --- -2.11.0 - diff --git a/poky/meta/recipes-kernel/cryptodev/files/0003-convert-to-new-AEAD-interface-in-kernels-v4.2.patch b/poky/meta/recipes-kernel/cryptodev/files/0003-convert-to-new-AEAD-interface-in-kernels-v4.2.patch deleted file mode 100644 index 860230778..000000000 --- a/poky/meta/recipes-kernel/cryptodev/files/0003-convert-to-new-AEAD-interface-in-kernels-v4.2.patch +++ /dev/null @@ -1,102 +0,0 @@ -From a705360197260d28535746ae98c461ba2cfb7a9e Mon Sep 17 00:00:00 2001 -From: Cristian Stoica <cristian.stoica@nxp.com> -Date: Thu, 4 May 2017 15:06:22 +0300 -Subject: [PATCH 3/3] convert to new AEAD interface in kernels v4.2+ - -The crypto API for AEAD ciphers changed in recent kernels so that -associated data is now part of both source and destination scatter -gathers. The source, destination and associated data buffers need -to be stiched accordingly for the operations to succeed: - -src_sg: auth_buf + src_buf -dst_sg: auth_buf + (dst_buf + tag space) - -This patch fixes a kernel crash observed with cipher-gcm test. - -See also kernel patch: 81c4c35eb61a69c229871c490b011c1171511d5a - crypto: ccm - Convert to new AEAD interface - -Reported-by: Phil Sutter <phil@nwl.cc> -Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> - -Upstream-Status: Backport - -Commit ID: a705360197260d2853574 - -Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> ---- - authenc.c | 40 ++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 38 insertions(+), 2 deletions(-) - -diff --git a/authenc.c b/authenc.c -index 95727b4..692951f 100644 ---- a/authenc.c -+++ b/authenc.c -@@ -688,12 +688,20 @@ free_auth_buf: - - static int crypto_auth_zc_aead(struct csession *ses_ptr, struct kernel_crypt_auth_op *kcaop) - { -- struct scatterlist *dst_sg, *auth_sg, *src_sg; -+ struct scatterlist *dst_sg; -+ struct scatterlist *src_sg; - struct crypt_auth_op *caop = &kcaop->caop; - unsigned char *auth_buf = NULL; -- struct scatterlist tmp; - int ret; - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)) -+ struct scatterlist tmp; -+ struct scatterlist *auth_sg; -+#else -+ struct scatterlist auth1[2]; -+ struct scatterlist auth2[2]; -+#endif -+ - if (unlikely(ses_ptr->cdata.init == 0 || - (ses_ptr->cdata.stream == 0 && ses_ptr->cdata.aead == 0))) { - derr(0, "Only stream and AEAD ciphers are allowed for authenc"); -@@ -718,6 +726,7 @@ static int crypto_auth_zc_aead(struct csession *ses_ptr, struct kernel_crypt_aut - goto free_auth_buf; - } - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)) - if (caop->auth_src && caop->auth_len > 0) { - if (unlikely(copy_from_user(auth_buf, caop->auth_src, caop->auth_len))) { - derr(1, "unable to copy auth data from userspace."); -@@ -733,6 +742,33 @@ static int crypto_auth_zc_aead(struct csession *ses_ptr, struct kernel_crypt_aut - - ret = auth_n_crypt(ses_ptr, kcaop, auth_sg, caop->auth_len, - src_sg, dst_sg, caop->len); -+#else -+ if (caop->auth_src && caop->auth_len > 0) { -+ if (unlikely(copy_from_user(auth_buf, caop->auth_src, caop->auth_len))) { -+ derr(1, "unable to copy auth data from userspace."); -+ ret = -EFAULT; -+ goto free_pages; -+ } -+ -+ sg_init_table(auth1, 2); -+ sg_set_buf(auth1, auth_buf, caop->auth_len); -+ sg_chain(auth1, 2, src_sg); -+ -+ if (src_sg == dst_sg) { -+ src_sg = auth1; -+ dst_sg = auth1; -+ } else { -+ sg_init_table(auth2, 2); -+ sg_set_buf(auth2, auth_buf, caop->auth_len); -+ sg_chain(auth2, 2, dst_sg); -+ src_sg = auth1; -+ dst_sg = auth2; -+ } -+ } -+ -+ ret = auth_n_crypt(ses_ptr, kcaop, NULL, caop->auth_len, -+ src_sg, dst_sg, caop->len); -+#endif - - free_pages: - release_user_pages(ses_ptr); --- -2.11.0 - diff --git a/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb index b353c21df..5c1d7f691 100644 --- a/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb +++ b/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1b DEPENDS = "git-native" -SRCREV = "d6529f86fc5bcb3514953ff9fa2f51a3fbf03a0f" +SRCREV = "af1a779f662c81da521e4d602f3c6446547d12a2" PR = "r12" PV = "0.2+git${SRCPV}" diff --git a/poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-fix-for-Unhandled-rela-relocation-R_X86_64_PLT.patch b/poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-fix-for-Unhandled-rela-relocation-R_X86_64_PLT.patch deleted file mode 100644 index e0cced55c..000000000 --- a/poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-fix-for-Unhandled-rela-relocation-R_X86_64_PLT.patch +++ /dev/null @@ -1,41 +0,0 @@ -From b9de21ef51a7ceab7122a707c188602eae22c4ee Mon Sep 17 00:00:00 2001 -From: Chris Clayton <chris2553@googlemail.com> -Date: Mon, 20 Aug 2018 12:00:31 +0100 -Subject: [PATCH] kexec: fix for "Unhandled rela relocation: R_X86_64_PLT32" error - -In response to a change in binutils, commit b21ebf2fb4c -(x86: Treat R_X86_64_PLT32 as R_X86_64_PC32) was applied to -the linux kernel during the 4.16 development cycle and has -since been backported to earlier stable kernel series. The -change results in the failure message in $SUBJECT when -rebooting via kexec. - -Fix this by replicating the change in kexec. - -Upstream-Status: Backport[https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?id=b9de21ef51a7ceab7122a707c188602eae22c4ee] - -Signed-off-by: Chris Clayton <chris2553@googlemail.com> -Acked-by: Baoquan He <bhe@redhat.com> -Tested-by: Bhupesh Sharma <bhsharma@redhat.com> -Acked-by: Bhupesh Sharma <bhsharma@redhat.com> -Signed-off-by: Simon Horman <horms@verge.net.au> -Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> ---- - kexec/arch/x86_64/kexec-elf-rel-x86_64.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c -index 7fdde73..db85b44 100644 ---- a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c -+++ b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c -@@ -79,6 +79,7 @@ void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr), - goto overflow; - break; - case R_X86_64_PC32: -+ case R_X86_64_PLT32: - *(uint32_t *)location = value - address; - break; - default: --- -2.7.4 - diff --git a/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.17.bb b/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb index 4b9b5accb..f65cd9f10 100644 --- a/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.17.bb +++ b/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb @@ -18,11 +18,10 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz file://0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \ file://kexec-x32.patch \ file://0001-Disable-PIE-during-link.patch \ - file://0001-kexec-fix-for-Unhandled-rela-relocation-R_X86_64_PLT.patch \ " -SRC_URI[md5sum] = "8e071ca473694a71e4ae60ed7ef6f377" -SRC_URI[sha256sum] = "450c87ba048641eb05f9717f5567aca57f063c266149ae663b58a34e5852deaf" +SRC_URI[md5sum] = "052458f0a35c2a3b0d2302caa3318e9f" +SRC_URI[sha256sum] = "913c8dee918e5855a4ba60d609371390978144b4c8d15d6446ca0057b7bc5e58" inherit autotools update-rc.d systemd diff --git a/poky/meta/recipes-kernel/kmod/kmod-native_git.bb b/poky/meta/recipes-kernel/kmod/kmod-native_git.bb index f0e274ed7..f61134bba 100644 --- a/poky/meta/recipes-kernel/kmod/kmod-native_git.bb +++ b/poky/meta/recipes-kernel/kmod/kmod-native_git.bb @@ -7,9 +7,6 @@ DEPENDS += "zlib-native" inherit native -SRC_URI += "file://Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch \ - " - do_install_append (){ for tool in depmod insmod lsmod modinfo modprobe rmmod do diff --git a/poky/meta/recipes-kernel/kmod/kmod.inc b/poky/meta/recipes-kernel/kmod/kmod.inc index 29885fbe7..e68860f6b 100644 --- a/poky/meta/recipes-kernel/kmod/kmod.inc +++ b/poky/meta/recipes-kernel/kmod/kmod.inc @@ -14,14 +14,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ " inherit autotools gtk-doc pkgconfig manpages -SRCREV = "aca4eca103d6699543f7ed663335c28c2e9908bb" +SRCREV = "58133a96c894c043e48c74ddf0bfe8db90bac62f" # Lookout for PV bump too when SRCREV is changed -PV = "25+git${SRCPV}" +PV = "26" SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \ file://depmod-search.conf \ file://avoid_parallel_tests.patch \ - file://fix-O_CLOEXEC.patch \ " S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch b/poky/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch deleted file mode 100644 index b722183b6..000000000 --- a/poky/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch +++ /dev/null @@ -1,39 +0,0 @@ -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. - -Change to directly calling bswap_* as defined in+byteswap.h. - -Upstream-Status: Inappropriate - -Signed-off-by: Ting Liu <b28495@freescale.com> -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - libkmod/libkmod-signature.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c -index 6fc06fc..912185a 100644 ---- a/libkmod/libkmod-signature.c -+++ b/libkmod/libkmod-signature.c -@@ -18,6 +18,7 @@ - */ - - #include <endian.h> -+#include <byteswap.h> - #include <inttypes.h> - #include <stdio.h> - #include <stdlib.h> -@@ -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 (sig_len == 0 || - size < (int64_t)(modsig->signer_len + modsig->key_id_len + sig_len)) - return false; --- -1.9.1 - diff --git a/poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch b/poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch index 5f45fce93..990c338fa 100644 --- a/poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch +++ b/poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch @@ -1,3 +1,8 @@ +From be6f82c54f694617c646ca1f8b5bcf93694e20ad Mon Sep 17 00:00:00 2001 +From: Tudor Florea <tudor.florea@enea.com> +Date: Fri, 6 Sep 2013 21:11:57 +0000 +Subject: [PATCH] kmod: avoid parallel-tests + Avoid parallel-tests as it remove buildtest-TESTS and runtest-TESTS targets required by ptest. In automake 1.13.4 parallel-tests is assumed by defauls. @@ -5,16 +10,16 @@ In order to have buildtest-TESTS and runtest-TESTS targets serial-tests is now required Signed-off-by: Tudor Florea <tudor.florea@enea.com> -Upstream-Status: Inappropriate (disable feature incompatible with ptest) +Upstream-Status: Inappropriate (disable feature incompatible with ptest) --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: git/configure.ac -=================================================================== ---- git.orig/configure.ac -+++ git/configure.ac +diff --git a/configure.ac b/configure.ac +index ee72283..60980c0 100644 +--- a/configure.ac ++++ b/configure.ac @@ -14,7 +14,7 @@ AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_PREFIX_DEFAULT([/usr]) diff --git a/poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch b/poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch deleted file mode 100644 index 5d9d40c38..000000000 --- a/poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch +++ /dev/null @@ -1,35 +0,0 @@ -From bd43367eee868059770188fd9e9db38520dc6fff Mon Sep 17 00:00:00 2001 -From: Robert Yang <liezhi.yang@windriver.com> -Date: Wed, 22 Jan 2014 01:06:40 -0500 -Subject: [PATCH] libkmod/libkmod-internal.h: check whether O_CLOEXEC is - defined or not - -O_CLOEXEC is introduced from Linux 2.6.23, so old kernel doesn't have -it, we need check before use. - -This patch is much more like a workaround, since it may need fcntl() use -FD_CLOEXEC to replace. - -This problem was reported by "Ting Liu <b28495@freescale.com>" -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> - -Upstream-Status: Pending ---- - libkmod/libkmod-internal.h | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: git/libkmod/libkmod-internal.h -=================================================================== ---- git.orig/libkmod/libkmod-internal.h -+++ git/libkmod/libkmod-internal.h -@@ -10,6 +10,10 @@ - - #include "libkmod.h" - -+#ifndef O_CLOEXEC -+#define O_CLOEXEC 0 -+#endif -+ - static _always_inline_ _printf_format_(2, 3) void - kmod_log_null(struct kmod_ctx *ctx, const char *format, ...) {} - diff --git a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb index fdf8f1949..ad7babf7a 100644 --- a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb +++ b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb @@ -122,7 +122,7 @@ LIC_FILES_CHKSUM = "\ file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \ file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \ file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \ - file://WHENCE;md5=66abf0fb69b09d6f3d2db6088594c808 \ + file://WHENCE;md5=ef36d3383becd18f36ce32d84109386f \ " # These are not common licenses, set NO_GENERIC_LICENSE for them @@ -188,7 +188,7 @@ NO_GENERIC_LICENSE[Firmware-xc5000] = "LICENCE.xc5000" NO_GENERIC_LICENSE[Firmware-xc5000c] = "LICENCE.xc5000c" NO_GENERIC_LICENSE[WHENCE] = "WHENCE" -SRCREV = "710963fe53ee3f227556d36839df3858daf6e232" +SRCREV = "7bc246451318b3536d9bfd3c4e46d541a9831b33" PE = "1" PV = "0.0+git${SRCPV}" diff --git a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc index be215af9b..7f838f623 100644 --- a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc +++ b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc @@ -38,6 +38,8 @@ python __anonymous () { d.setVar("HEADER_FETCH_VER", "3.0") elif major == "4": d.setVar("HEADER_FETCH_VER", "4.x") + elif major == "5": + d.setVar("HEADER_FETCH_VER", "5.x") else: d.setVar("HEADER_FETCH_VER", "2.6") } diff --git a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch new file mode 100644 index 000000000..78ebd31e6 --- /dev/null +++ b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch @@ -0,0 +1,41 @@ +From 9ca6c6a510bda90954aa2532711200b89dd1df89 Mon Sep 17 00:00:00 2001 +From: Dave Martin <Dave.Martin@arm.com> +Date: Tue, 11 Dec 2018 19:26:45 +0000 +Subject: [PATCH 1/3] kbuild: install_headers.sh: Strip _UAPI from + #if-defined() guards + +install_headers.sh knows how to strip the _UAPI prefix from #ifdef/ +ifndef and #define directives used to guard headers against multiple +or inappropriate inclusion. Currently this does not work for guards +in the "#if defined()" style, which may be needed for non-trivial +cases. + +This patch adds similar logic so that the _UAPI prefix is also +stripped from guard directives written using "#if defined()" etc. + +This is not completely foolproof, but will work for simple cases of +using #if defined() to guard against inappropriate header inclusion. + +Signed-off-by: Dave Martin <Dave.Martin@arm.com> +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> + +Upstream-Status: Submitted [https://www.spinics.net/lists/arm-kernel/msg694800.html] +--- + scripts/headers_install.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh +index 593f8879c641..fe1d3fc0d33a 100755 +--- a/scripts/headers_install.sh ++++ b/scripts/headers_install.sh +@@ -38,6 +38,7 @@ do + -e 's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g' \ + -e 's/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g' \ + -e 's@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @' \ ++ -e ':1;s/(#(if|elif)(.*[^A-Za-z0-9_])defined\([[:space:]]*)_UAPI/\1/;t1' \ + "$SRCDIR/$i" > "$OUTDIR/$FILE.sed" || exit 1 + scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ "$OUTDIR/$FILE.sed" \ + > "$OUTDIR/$FILE" +-- +2.5.0 + diff --git a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch new file mode 100644 index 000000000..a5ded602e --- /dev/null +++ b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch @@ -0,0 +1,67 @@ +From 694eba7bb974f6b8bd308804cb24350150108b2b Mon Sep 17 00:00:00 2001 +From: He Zhe <zhe.he@windriver.com> +Date: Wed, 21 Nov 2018 15:12:43 +0800 +Subject: [PATCH] scripts: Use fixed input and output files instead of pipe for here-doc + +There was a bug of "as" in binutils that when it checks if the input file and +output file are the same one, it would not check if they are on the same block +device. The check is introduced by the following commit in v2.31. + +https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h= +67f846b59b32f3d704c601669409c2584383fea9 + +The here-doc usage in this script creates temporary file in /tmp. When we run in +an environment where /tmp has rarely been used, the newly created temporary file +may have a very low inode number. If the inode number was 6 which is the same as +/dev/null, the as would wrongly think the input file and the output file are the +same and report the following error. + +*** Compiler lacks asm-goto support.. Stop. + +One observed case happened in docker where the /tmp could be so rarely used that +very low number inode may be allocated and triggers the error. + +The fix below for the bug only exists on the master branch of binutils so far +and has not been released from upstream. As the convict is introduced since +v2.31, only v2.31 is affected. + +https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h= +2a50366ded329bfb39d387253450c9d5302c3503 + +When building linux-libc-headers we need to use "as" in binutils which does not +contain the fix for the moment. To work around the error, we create a fixed +temporary file to contain the program being tested. + +This patch also removes ">/dev/null 2>&1" so we will have more direct error +information in case something else wrong happened. + +Upstream-Status: Inappropriate [A work around for binutils v2.31] + +Signed-off-by: He Zhe <zhe.he@windriver.com> +--- + scripts/gcc-goto.sh | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh +index 8b980fb22..d256a9438 100755 +--- a/scripts/gcc-goto.sh ++++ b/scripts/gcc-goto.sh +@@ -3,7 +3,7 @@ + # Test for gcc 'asm goto' support + # Copyright (C) 2010, Jason Baron <jbaron@redhat.com> + +-cat << "END" | $@ -x c - -fno-PIE -c -o /dev/null ++cat << "END" > ./input + int main(void) + { + #if defined(__arm__) || defined(__aarch64__) +@@ -20,3 +20,6 @@ entry: + return 0; + } + END ++ ++$@ -x c ./input -fno-PIE -c -o ./output ++rm ./input ./output +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.0.bb index eb7bee72b..e76120c5b 100644 --- a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb +++ b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.0.bb @@ -9,5 +9,10 @@ SRC_URI_append_libc-musl = "\ file://0001-include-linux-stddef.h-in-swab.h-uapi-header.patch \ " -SRC_URI[md5sum] = "bee5fe53ee1c3142b8f0c12c0d3348f9" -SRC_URI[sha256sum] = "19d8bcf49ef530cd4e364a45b4a22fa70714b70349c8100e7308488e26f1eaf1" +SRC_URI_append = "\ + file://0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch \ + file://0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch \ +" + +SRC_URI[md5sum] = "7381ce8aac80a01448e065ce795c19c0" +SRC_URI[sha256sum] = "437b141a6499159f5a7282d5eb4b2be055f8e862ccce44d7464e8759c31a2e43" diff --git a/poky/meta/recipes-kernel/linux/kernel-devsrc.bb b/poky/meta/recipes-kernel/linux/kernel-devsrc.bb index 361ad21e1..69a8eaef8 100644 --- a/poky/meta/recipes-kernel/linux/kernel-devsrc.bb +++ b/poky/meta/recipes-kernel/linux/kernel-devsrc.bb @@ -32,7 +32,7 @@ B = "${STAGING_KERNEL_BUILDDIR}" PACKAGE_ARCH = "${MACHINE_ARCH}" -KERNEL_BUILD_ROOT="/lib/modules/" +KERNEL_BUILD_ROOT="${nonarch_base_libdir}/modules/" do_install() { kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION} @@ -48,7 +48,7 @@ do_install() { mkdir -p ${D}/usr/src ( cd ${D}/usr/src - ln -s ${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel + lnr ${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel ) # for on target purposes, we unify build and source @@ -150,6 +150,13 @@ do_install() { cp -a --parents arch/arm64/kernel/module.lds $kerneldir/build/ fi + if [ "${ARCH}" = "powerpc" ]; then + # 5.0 needs these files, but don't error if they aren't present in the source + cp -a --parents arch/${ARCH}/kernel/syscalls/syscall.tbl $kerneldir/build/ 2>/dev/null || : + cp -a --parents arch/${ARCH}/kernel/syscalls/syscalltbl.sh $kerneldir/build/ 2>/dev/null || : + cp -a --parents arch/${ARCH}/kernel/syscalls/syscallhdr.sh $kerneldir/build/ 2>/dev/null || : + fi + # include the machine specific headers for ARM variants, if available. if [ "${ARCH}" = "arm" ]; then cp -a --parents arch/${ARCH}/mach-*/include $kerneldir/build/ @@ -157,7 +164,12 @@ do_install() { # include a few files for 'make prepare' cp -a --parents arch/arm/tools/gen-mach-types $kerneldir/build/ cp -a --parents arch/arm/tools/mach-types $kerneldir/build/ - cp -a --parents arch/arm/tools/syscall* $kerneldir/build/ + + # ARM syscall table tools only exist for kernels v4.10 or later + SYSCALL_TOOLS=$(find arch/arm/tools -name "syscall*") + if [ -n "$SYSCALL_TOOLS" ] ; then + cp -a --parents $SYSCALL_TOOLS $kerneldir/build/ + fi cp -a --parents arch/arm/kernel/module.lds $kerneldir/build/ fi @@ -209,6 +221,9 @@ do_install() { cp -a --parents kernel/time/timeconst.bc $kerneldir/build cp -a --parents kernel/bounds.c $kerneldir/build cp -a --parents Kbuild $kerneldir/build + cp -a --parents arch/mips/kernel/syscalls/*.sh $kerneldir/build 2>/dev/null || : + cp -a --parents arch/mips/kernel/syscalls/*.tbl $kerneldir/build 2>/dev/null || : + cp -a --parents arch/mips/tools/elf-entry.c $kerneldir/build 2>/dev/null || : fi # required to build scripts/selinux/genheaders/genheaders diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-dev.bb b/poky/meta/recipes-kernel/linux/linux-yocto-dev.bb index 23cb355b5..ae8c34300 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto-dev.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto-dev.bb @@ -30,7 +30,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}' SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}' -LINUX_VERSION ?= "4.19-rc+" +LINUX_VERSION ?= "5.0-rc+" LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb new file mode 100644 index 000000000..7f1640d43 --- /dev/null +++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb @@ -0,0 +1,43 @@ +KBRANCH ?= "v4.19/standard/preempt-rt/base" + +require recipes-kernel/linux/linux-yocto.inc + +# Skip processing of this recipe if it is not explicitly specified as the +# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying +# to build multiple virtual/kernel providers, e.g. as dependency of +# core-image-rt-sdk, core-image-rt. +python () { + if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt": + raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") +} + +SRCREV_machine ?= "2c6e44e476bd297d65d5cb1b5f5538d303fc05a0" +SRCREV_meta ?= "d85f07e03c980eca5ffd5ba058985d6ed3a83801" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.19;destsuffix=${KMETA}" + +LINUX_VERSION ?= "4.19.30" + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" +DEPENDS += "openssl-native util-linux-native" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +LINUX_KERNEL_TYPE = "preempt-rt" + +COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)" + +KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb index 4189fc8d1..65c369849 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb @@ -1,4 +1,4 @@ -KBRANCH ?= "v4.14/standard/preempt-rt/base" +KBRANCH ?= "v5.0/standard/preempt-rt/base" require recipes-kernel/linux/linux-yocto.inc @@ -11,13 +11,15 @@ python () { raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") } -SRCREV_machine ?= "82ac7b2b8048b537481bf16b8acda1cc9bfe9565" -SRCREV_meta ?= "6a3254e7b370cbb86c1f73379dcf38885c1c69e0" +SRCREV_machine ?= "06e1ff79ea9efef052404ee1989cae038b28e954" +SRCREV_meta ?= "705457837e7ddd27e4e2ecf6d3dbd255b1aaf848" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}" + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.0;destsuffix=${KMETA}" -LINUX_VERSION ?= "4.14.79" +LINUX_VERSION ?= "5.0.3" + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" DEPENDS += "openssl-native util-linux-native" @@ -29,7 +31,7 @@ KCONF_BSP_AUDIT_LEVEL = "2" LINUX_KERNEL_TYPE = "preempt-rt" -COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)" +COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)" KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb new file mode 100644 index 000000000..8e132caae --- /dev/null +++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb @@ -0,0 +1,32 @@ +KBRANCH ?= "v4.19/standard/tiny/base" +KBRANCH_qemuarm ?= "v4.19/standard/tiny/arm-versatile-926ejs" + +LINUX_KERNEL_TYPE = "tiny" +KCONFIG_MODE = "--allnoconfig" + +require recipes-kernel/linux/linux-yocto.inc + +LINUX_VERSION ?= "4.19.30" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" +DEPENDS += "openssl-native util-linux-native" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +SRCREV_machine_qemuarm ?= "03eb6106990498e86298646c682fce9fc61f2131" +SRCREV_machine ?= "253c39a252f25843111b7be0c8247eb4bd6c328d" +SRCREV_meta ?= "d85f07e03c980eca5ffd5ba058985d6ed3a83801" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.19;destsuffix=${KMETA}" + +COMPATIBLE_MACHINE = "qemux86|qemux86-64|qemuarm|qemuarmv5" + +# Functionality flags +KERNEL_FEATURES = "" + +KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb index 71f5c4716..dc60548c6 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb @@ -1,10 +1,13 @@ -KBRANCH ?= "v4.14/standard/tiny/base" +KBRANCH ?= "v5.0/standard/tiny/base" +KBRANCH_qemuarm ?= "v5.0/standard/tiny/arm-versatile-926ejs" + LINUX_KERNEL_TYPE = "tiny" KCONFIG_MODE = "--allnoconfig" require recipes-kernel/linux/linux-yocto.inc -LINUX_VERSION ?= "4.14.79" +LINUX_VERSION ?= "5.0.3" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" DEPENDS += "openssl-native util-linux-native" @@ -12,15 +15,16 @@ DEPENDS += "openssl-native util-linux-native" KMETA = "kernel-meta" KCONF_BSP_AUDIT_LEVEL = "2" -SRCREV_machine ?= "6ce17eae5d962b30846a5258956246438d68d60a" -SRCREV_meta ?= "6a3254e7b370cbb86c1f73379dcf38885c1c69e0" +SRCREV_machine_qemuarm ?= "b0477279877bb2b5cca6ec49c64e931901ff2022" +SRCREV_machine ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d" +SRCREV_meta ?= "705457837e7ddd27e4e2ecf6d3dbd255b1aaf848" PV = "${LINUX_VERSION}+git${SRCPV}" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}" + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.0;destsuffix=${KMETA}" -COMPATIBLE_MACHINE = "qemux86|qemux86-64" +COMPATIBLE_MACHINE = "qemux86|qemux86-64|qemuarm|qemuarmv5" # Functionality flags KERNEL_FEATURES = "" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto.inc b/poky/meta/recipes-kernel/linux/linux-yocto.inc index 1ebfb606d..f191946f2 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto.inc +++ b/poky/meta/recipes-kernel/linux/linux-yocto.inc @@ -26,6 +26,10 @@ DEPENDS_append_nios2 = " libgcc" KERNEL_CC_append_nios2 = " ${TOOLCHAIN_OPTIONS}" KERNEL_LD_append_nios2 = " ${TOOLCHAIN_OPTIONS}" +DEPENDS_append_arc = " libgcc" +KERNEL_CC_append_arc = " ${TOOLCHAIN_OPTIONS}" +KERNEL_LD_append_arc = " ${TOOLCHAIN_OPTIONS}" + KERNEL_FEATURES_append_qemuall=" features/debug/printk.scc" KERNEL_FEATURES_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_4.14.bb b/poky/meta/recipes-kernel/linux/linux-yocto_4.14.bb deleted file mode 100644 index 65b244409..000000000 --- a/poky/meta/recipes-kernel/linux/linux-yocto_4.14.bb +++ /dev/null @@ -1,47 +0,0 @@ -KBRANCH ?= "v4.14/standard/base" - -require recipes-kernel/linux/linux-yocto.inc - -# board specific branches -KBRANCH_qemuarm ?= "v4.14/standard/arm-versatile-926ejs" -KBRANCH_qemuarm64 ?= "v4.14/standard/qemuarm64" -KBRANCH_qemumips ?= "v4.14/standard/mti-malta32" -KBRANCH_qemuppc ?= "v4.14/standard/qemuppc" -KBRANCH_qemux86 ?= "v4.14/standard/base" -KBRANCH_qemux86-64 ?= "v4.14/standard/base" -KBRANCH_qemumips64 ?= "v4.14/standard/mti-malta64" - -SRCREV_machine_qemuarm ?= "8752b8421efe8b5a478f17fbffacf4af974ec703" -SRCREV_machine_qemuarm64 ?= "ac66474ba7f7e93d16ae3ea005f214113bb127c5" -SRCREV_machine_qemumips ?= "ab031b267e2a79fcd48da5d10d503f4d065f4821" -SRCREV_machine_qemuppc ?= "f47c3945e8dd230ea37771bcacc836245fc79d22" -SRCREV_machine_qemux86 ?= "f1d93b219bde37a8a286cd18d6af2dcf0d02c1a8" -SRCREV_machine_qemux86-64 ?= "f1d93b219bde37a8a286cd18d6af2dcf0d02c1a8" -SRCREV_machine_qemumips64 ?= "8063a7258fc670a361fed85b858fabb237485f1c" -SRCREV_machine ?= "f1d93b219bde37a8a286cd18d6af2dcf0d02c1a8" -SRCREV_meta ?= "6a3254e7b370cbb86c1f73379dcf38885c1c69e0" - -SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}" - -LINUX_VERSION ?= "4.14.79" - -DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" -DEPENDS += "openssl-native util-linux-native" - -PV = "${LINUX_VERSION}+git${SRCPV}" - -KMETA = "kernel-meta" -KCONF_BSP_AUDIT_LEVEL = "2" - -KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" - -COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" - -# Functionality flags -KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" -KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" -KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc" -KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" -KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" -KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_4.19.bb b/poky/meta/recipes-kernel/linux/linux-yocto_4.19.bb new file mode 100644 index 000000000..0217daa24 --- /dev/null +++ b/poky/meta/recipes-kernel/linux/linux-yocto_4.19.bb @@ -0,0 +1,49 @@ +KBRANCH ?= "v4.19/standard/base" + +require recipes-kernel/linux/linux-yocto.inc + +# board specific branches +KBRANCH_qemuarm ?= "v4.19/standard/arm-versatile-926ejs" +KBRANCH_qemuarm64 ?= "v4.19/standard/qemuarm64" +KBRANCH_qemumips ?= "v4.19/standard/mti-malta32" +KBRANCH_qemuppc ?= "v4.19/standard/qemuppc" +KBRANCH_qemux86 ?= "v4.19/standard/base" +KBRANCH_qemux86-64 ?= "v4.19/standard/base" +KBRANCH_qemumips64 ?= "v4.19/standard/mti-malta64" + +SRCREV_machine_qemuarm ?= "3df49db2ea9b8e800cb30d5d695d4d2a2f8c1bed" +SRCREV_machine_qemuarm64 ?= "253c39a252f25843111b7be0c8247eb4bd6c328d" +SRCREV_machine_qemumips ?= "5dc975d0e586edd5d33bce62560f998f9a246be6" +SRCREV_machine_qemuppc ?= "253c39a252f25843111b7be0c8247eb4bd6c328d" +SRCREV_machine_qemux86 ?= "253c39a252f25843111b7be0c8247eb4bd6c328d" +SRCREV_machine_qemux86-64 ?= "253c39a252f25843111b7be0c8247eb4bd6c328d" +SRCREV_machine_qemumips64 ?= "bb7ae8a8cbe76c9ce2804f651936f059f9f621a2" +SRCREV_machine ?= "253c39a252f25843111b7be0c8247eb4bd6c328d" +SRCREV_meta ?= "d85f07e03c980eca5ffd5ba058985d6ed3a83801" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.19;destsuffix=${KMETA} \ + " + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" +LINUX_VERSION ?= "4.19.30" + +DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" +DEPENDS += "openssl-native util-linux-native" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" + +COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_5.0.bb b/poky/meta/recipes-kernel/linux/linux-yocto_5.0.bb new file mode 100644 index 000000000..be5dbaedc --- /dev/null +++ b/poky/meta/recipes-kernel/linux/linux-yocto_5.0.bb @@ -0,0 +1,51 @@ +KBRANCH ?= "v5.0/standard/base" + +require recipes-kernel/linux/linux-yocto.inc + +# board specific branches +KBRANCH_qemuarm ?= "v5.0/standard/arm-versatile-926ejs" +KBRANCH_qemuarm64 ?= "v5.0/standard/qemuarm64" +KBRANCH_qemumips ?= "v5.0/standard/mti-malta32" +KBRANCH_qemuppc ?= "v5.0/standard/qemuppc" +KBRANCH_qemux86 ?= "v5.0/standard/base" +KBRANCH_qemux86-64 ?= "v5.0/standard/base" +KBRANCH_qemumips64 ?= "v5.0/standard/mti-malta64" + +SRCREV_machine_qemuarm ?= "18a5ffa0e90184c8503ff1df45e4e5e501b1bab3" +SRCREV_machine_qemuarm64 ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d" +SRCREV_machine_qemumips ?= "c4d3cd6437329407e2cc7e3e4615769452d426b1" +SRCREV_machine_qemuppc ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d" +SRCREV_machine_qemux86 ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d" +SRCREV_machine_qemux86-64 ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d" +SRCREV_machine_qemumips64 ?= "2468c20c15477ebe5ecd73c0e0162d7432149318" +SRCREV_machine ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d" +SRCREV_meta ?= "705457837e7ddd27e4e2ecf6d3dbd255b1aaf848" + +# remap qemuarm to qemuarma15 for the 5.0 kernel +# KMACHINE_qemuarm ?= "qemuarma15" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.0;destsuffix=${KMETA}" + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" +LINUX_VERSION ?= "5.0.3" + +DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" +DEPENDS += "openssl-native util-linux-native" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" + +COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-btrfs-Remove-unnecessary-fs_info-parameter.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-btrfs-Remove-unnecessary-fs_info-parameter.patch deleted file mode 100644 index 0fe4ee829..000000000 --- a/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-btrfs-Remove-unnecessary-fs_info-parameter.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 51ab0b1da29354375a19f865abcd233dd2178295 Mon Sep 17 00:00:00 2001 -From: Michael Jeanson <mjeanson@efficios.com> -Date: Mon, 18 Jun 2018 14:53:19 -0400 -Subject: [PATCH] Fix: btrfs: Remove unnecessary fs_info parameter - -See upstream commit: - - commit 3dca5c942dac60164e6a6e89172f25b86af07ce7 - Author: Qu Wenruo <wqu@suse.com> - Date: Thu Apr 26 14:24:25 2018 +0800 - - btrfs: trace: Remove unnecessary fs_info parameter for btrfs__reserve_extent event class - - fs_info can be extracted from btrfs_block_group_cache, and all - btrfs_block_group_cache is created by btrfs_create_block_group_cache() - with fs_info initialized, no need to worry about NULL pointer - dereference. - -Signed-off-by: Michael Jeanson <mjeanson@efficios.com> -Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> -Upstream-Status: Backport -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - instrumentation/events/lttng-module/btrfs.h | 54 ++++++++++++++++++++++++++++- - 1 file changed, 53 insertions(+), 1 deletion(-) - -diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h -index 75cc73b..fd1b6b8 100644 ---- a/instrumentation/events/lttng-module/btrfs.h -+++ b/instrumentation/events/lttng-module/btrfs.h -@@ -1658,8 +1658,57 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f - - #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ - --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0)) -+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, -+ -+ btrfs_find_free_extent, -+ -+ TP_PROTO(const struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size, -+ u64 data), -+ -+ TP_ARGS(info, num_bytes, empty_size, data), -+ -+ TP_FIELDS( -+ ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE) -+ ctf_integer(u64, num_bytes, num_bytes) -+ ctf_integer(u64, empty_size, empty_size) -+ ctf_integer(u64, data, data) -+ ) -+) -+ -+LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, -+ -+ TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start, -+ u64 len), -+ -+ TP_ARGS(block_group, start, len), -+ -+ TP_FIELDS( -+ ctf_array(u8, fsid, block_group->fs_info->fsid, BTRFS_UUID_SIZE) -+ ctf_integer(u64, bg_objectid, block_group->key.objectid) -+ ctf_integer(u64, flags, block_group->flags) -+ ctf_integer(u64, start, start) -+ ctf_integer(u64, len, len) -+ ) -+) -+ -+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, -+ -+ TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start, -+ u64 len), -+ -+ TP_ARGS(block_group, start, len) -+) -+ -+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, -+ -+ TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start, -+ u64 len), -+ -+ TP_ARGS(block_group, start, len) -+) - -+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)) - LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, - - btrfs_find_free_extent, -@@ -1670,6 +1719,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, - TP_ARGS(info, num_bytes, empty_size, data), - - TP_FIELDS( -+ ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE) - ctf_integer(u64, num_bytes, num_bytes) - ctf_integer(u64, empty_size, empty_size) - ctf_integer(u64, data, data) -@@ -1685,6 +1735,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, - TP_ARGS(info, block_group, start, len), - - TP_FIELDS( -+ ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE) - ctf_integer(u64, bg_objectid, block_group->key.objectid) - ctf_integer(u64, flags, block_group->flags) - ctf_integer(u64, start, start) -@@ -1722,6 +1773,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, - TP_ARGS(info, num_bytes, empty_size, data), - - TP_FIELDS( -+ ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE) - ctf_integer(u64, num_bytes, num_bytes) - ctf_integer(u64, empty_size, empty_size) - ctf_integer(u64, data, data) --- -2.13.3 - diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-signal-Distinguish-between-kernel_siginfo-and-si.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-signal-Distinguish-between-kernel_siginfo-and-si.patch new file mode 100644 index 000000000..351184dab --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-signal-Distinguish-between-kernel_siginfo-and-si.patch @@ -0,0 +1,133 @@ +From 0a0d736ec89dffdbc83e7181166a99d5563acfe8 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <mjeanson@efficios.com> +Date: Mon, 5 Nov 2018 11:35:52 -0500 +Subject: [PATCH 1/9] Fix: signal: Distinguish between kernel_siginfo and + siginfo (v4.20) + +See upstream commit : + + commit ae7795bc6187a15ec51cf258abae656a625f9980 + Author: Eric W. Biederman <ebiederm@xmission.com> + Date: Tue Sep 25 11:27:20 2018 +0200 + + signal: Distinguish between kernel_siginfo and siginfo + + Linus recently observed that if we did not worry about the padding + member in struct siginfo it is only about 48 bytes, and 48 bytes is + much nicer than 128 bytes for allocating on the stack and copying + around in the kernel. + + The obvious thing of only adding the padding when userspace is + including siginfo.h won't work as there are sigframe definitions in + the kernel that embed struct siginfo. + + So split siginfo in two; kernel_siginfo and siginfo. Keeping the + traditional name for the userspace definition. While the version that + is used internally to the kernel and ultimately will not be padded to + 128 bytes is called kernel_siginfo. + + The definition of struct kernel_siginfo I have put in include/signal_types.h + + A set of buildtime checks has been added to verify the two structures have + the same field offsets. + + To make it easy to verify the change kernel_siginfo retains the same + size as siginfo. The reduction in size comes in a following change. + +Signed-off-by: Michael Jeanson <mjeanson@efficios.com> +Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> + +Upstream-Status: backport https://github.com/lttng/lttng-modules/commit/0a0d736ec89dffdbc83e7181166a99d5563acfe8 + +Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> +--- + instrumentation/events/lttng-module/signal.h | 41 ++++++++++++++++++-- + 1 file changed, 37 insertions(+), 4 deletions(-) + +diff --git a/instrumentation/events/lttng-module/signal.h b/instrumentation/events/lttng-module/signal.h +index b3c9126..8783b52 100644 +--- a/instrumentation/events/lttng-module/signal.h ++++ b/instrumentation/events/lttng-module/signal.h +@@ -35,21 +35,24 @@ + * SEND_SIG_NOINFO means that si_code is SI_USER, and SEND_SIG_PRIV + * means that si_code is SI_KERNEL. + */ +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0)) + LTTNG_TRACEPOINT_EVENT(signal_generate, + +- TP_PROTO(int sig, struct siginfo *info, struct task_struct *task), ++ TP_PROTO(int sig, struct kernel_siginfo *info, struct task_struct *task, ++ int group, int result), + +- TP_ARGS(sig, info, task), ++ TP_ARGS(sig, info, task, group, result), + + TP_FIELDS( + ctf_integer(int, sig, sig) + LTTNG_FIELDS_SIGINFO(info) + ctf_array_text(char, comm, task->comm, TASK_COMM_LEN) + ctf_integer(pid_t, pid, task->pid) ++ ctf_integer(int, group, group) ++ ctf_integer(int, result, result) + ) + ) +-#else ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + LTTNG_TRACEPOINT_EVENT(signal_generate, + + TP_PROTO(int sig, struct siginfo *info, struct task_struct *task, +@@ -66,6 +69,20 @@ LTTNG_TRACEPOINT_EVENT(signal_generate, + ctf_integer(int, result, result) + ) + ) ++#else ++LTTNG_TRACEPOINT_EVENT(signal_generate, ++ ++ TP_PROTO(int sig, struct siginfo *info, struct task_struct *task), ++ ++ TP_ARGS(sig, info, task), ++ ++ TP_FIELDS( ++ ctf_integer(int, sig, sig) ++ LTTNG_FIELDS_SIGINFO(info) ++ ctf_array_text(char, comm, task->comm, TASK_COMM_LEN) ++ ctf_integer(pid_t, pid, task->pid) ++ ) ++) + #endif + + /** +@@ -82,6 +99,21 @@ LTTNG_TRACEPOINT_EVENT(signal_generate, + * This means, this can show which signals are actually delivered, but + * matching generated signals and delivered signals may not be correct. + */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0)) ++LTTNG_TRACEPOINT_EVENT(signal_deliver, ++ ++ TP_PROTO(int sig, struct kernel_siginfo *info, struct k_sigaction *ka), ++ ++ TP_ARGS(sig, info, ka), ++ ++ TP_FIELDS( ++ ctf_integer(int, sig, sig) ++ LTTNG_FIELDS_SIGINFO(info) ++ ctf_integer(unsigned long, sa_handler, (unsigned long) ka->sa.sa_handler) ++ ctf_integer(unsigned long, sa_flags, ka->sa.sa_flags) ++ ) ++) ++#else + LTTNG_TRACEPOINT_EVENT(signal_deliver, + + TP_PROTO(int sig, struct siginfo *info, struct k_sigaction *ka), +@@ -95,6 +127,7 @@ LTTNG_TRACEPOINT_EVENT(signal_deliver, + ctf_integer(unsigned long, sa_flags, ka->sa.sa_flags) + ) + ) ++#endif + + #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) + LTTNG_TRACEPOINT_EVENT_CLASS(signal_queue_overflow, +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-signal-Remove-SEND_SIG_FORCED-v4.20.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-signal-Remove-SEND_SIG_FORCED-v4.20.patch new file mode 100644 index 000000000..905b68165 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-signal-Remove-SEND_SIG_FORCED-v4.20.patch @@ -0,0 +1,67 @@ +From 26bc064a4d4c85e6000393aadb38659f99b59162 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <mjeanson@efficios.com> +Date: Mon, 5 Nov 2018 11:35:53 -0500 +Subject: [PATCH 2/9] Fix: signal: Remove SEND_SIG_FORCED (v4.20) + +See upstream commit : + + commit 4ff4c31a6e85f4c49fbeebeaa28018d002884b5a + Author: Eric W. Biederman <ebiederm@xmission.com> + Date: Mon Sep 3 10:39:04 2018 +0200 + + signal: Remove SEND_SIG_FORCED + + There are no more users of SEND_SIG_FORCED so it may be safely removed. + + Remove the definition of SEND_SIG_FORCED, it's use in is_si_special, + it's use in TP_STORE_SIGINFO, and it's use in __send_signal as without + any users the uses of SEND_SIG_FORCED are now unncessary. + + This makes the code simpler, easier to understand and use. Users of + signal sending functions now no longer need to ask themselves do I + need to use SEND_SIG_FORCED. + +Signed-off-by: Michael Jeanson <mjeanson@efficios.com> +Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> + +Upstream-Status: backport https://github.com/lttng/lttng-modules/commit/26bc064a4d4c85e6000393aadb38659f99b59162 + +Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> + +--- + instrumentation/events/lttng-module/signal.h | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/instrumentation/events/lttng-module/signal.h b/instrumentation/events/lttng-module/signal.h +index 8783b52..ad8fe69 100644 +--- a/instrumentation/events/lttng-module/signal.h ++++ b/instrumentation/events/lttng-module/signal.h +@@ -12,6 +12,17 @@ + #include <linux/signal.h> + #include <linux/sched.h> + #undef LTTNG_FIELDS_SIGINFO ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0)) ++#define LTTNG_FIELDS_SIGINFO(info) \ ++ ctf_integer(int, errno, \ ++ (info == SEND_SIG_NOINFO || info == SEND_SIG_PRIV) ? \ ++ 0 : \ ++ info->si_errno) \ ++ ctf_integer(int, code, \ ++ (info == SEND_SIG_NOINFO) ? \ ++ SI_USER : \ ++ ((info == SEND_SIG_PRIV) ? SI_KERNEL : info->si_code)) ++#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) */ + #define LTTNG_FIELDS_SIGINFO(info) \ + ctf_integer(int, errno, \ + (info == SEND_SIG_NOINFO || info == SEND_SIG_FORCED || info == SEND_SIG_PRIV) ? \ +@@ -21,6 +32,7 @@ + (info == SEND_SIG_NOINFO || info == SEND_SIG_FORCED) ? \ + SI_USER : \ + ((info == SEND_SIG_PRIV) ? SI_KERNEL : info->si_code)) ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) */ + #endif /* _TRACE_SIGNAL_DEF */ + + /** +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-ext4-adjust-reserved-cluster-count-when-removing.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-ext4-adjust-reserved-cluster-count-when-removing.patch new file mode 100644 index 000000000..7edffee54 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-ext4-adjust-reserved-cluster-count-when-removing.patch @@ -0,0 +1,149 @@ +From cb9f1a821bcf55cecf3813195fd6d4eff8070927 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <mjeanson@efficios.com> +Date: Mon, 5 Nov 2018 11:35:54 -0500 +Subject: [PATCH 3/9] Fix: ext4: adjust reserved cluster count when removing + extents (v4.20) + +See upstream commit : + + commit 9fe671496b6c286f9033aedfc1718d67721da0ae + Author: Eric Whitney <enwlinux@gmail.com> + Date: Mon Oct 1 14:25:08 2018 -0400 + + ext4: adjust reserved cluster count when removing extents + + Modify ext4_ext_remove_space() and the code it calls to correct the + reserved cluster count for pending reservations (delayed allocated + clusters shared with allocated blocks) when a block range is removed + from the extent tree. Pending reservations may be found for the clusters + at the ends of written or unwritten extents when a block range is removed. + If a physical cluster at the end of an extent is freed, it's necessary + to increment the reserved cluster count to maintain correct accounting + if the corresponding logical cluster is shared with at least one + delayed and unwritten extent as found in the extents status tree. + + Add a new function, ext4_rereserve_cluster(), to reapply a reservation + on a delayed allocated cluster sharing blocks with a freed allocated + cluster. To avoid ENOSPC on reservation, a flag is applied to + ext4_free_blocks() to briefly defer updating the freeclusters counter + when an allocated cluster is freed. This prevents another thread + from allocating the freed block before the reservation can be reapplied. + + Redefine the partial cluster object as a struct to carry more state + information and to clarify the code using it. + + Adjust the conditional code structure in ext4_ext_remove_space to + reduce the indentation level in the main body of the code to improve + readability. + +Signed-off-by: Michael Jeanson <mjeanson@efficios.com> +Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> + +Upstream-Status: backport https://github.com/lttng/lttng-modules/commit/cb9f1a821bcf55cecf3813195fd6d4eff8070927 + +Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> + +--- + instrumentation/events/lttng-module/ext4.h | 72 +++++++++++++++++++++- + 1 file changed, 69 insertions(+), 3 deletions(-) + +diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h +index fe6f802..83a80ba 100644 +--- a/instrumentation/events/lttng-module/ext4.h ++++ b/instrumentation/events/lttng-module/ext4.h +@@ -1602,7 +1602,30 @@ LTTNG_TRACEPOINT_EVENT(ext4_ext_show_extent, + ) + ) + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0)) ++ ++LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks, ++ TP_PROTO(struct inode *inode, struct ext4_extent *ex, ++ ext4_lblk_t from, ext4_fsblk_t to, ++ struct partial_cluster *pc), ++ ++ TP_ARGS(inode, ex, from, to, pc), ++ ++ TP_FIELDS( ++ ctf_integer(dev_t, dev, inode->i_sb->s_dev) ++ ctf_integer(ino_t, ino, inode->i_ino) ++ ctf_integer(ext4_lblk_t, from, from) ++ ctf_integer(ext4_lblk_t, to, to) ++ ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex)) ++ ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block)) ++ ctf_integer(unsigned short, ee_len, ext4_ext_get_actual_len(ex)) ++ ctf_integer(ext4_fsblk_t, pc_pclu, pc->pclu) ++ ctf_integer(ext4_lblk_t, pc_lblk, pc->lblk) ++ ctf_integer(int, pc_state, pc->state) ++ ) ++) ++ ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) + + LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks, + TP_PROTO(struct inode *inode, struct ext4_extent *ex, +@@ -1646,7 +1669,29 @@ LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks, + + #endif + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0)) ++ ++LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf, ++ TP_PROTO(struct inode *inode, ext4_lblk_t start, ++ struct ext4_extent *ex, ++ struct partial_cluster *pc), ++ ++ TP_ARGS(inode, start, ex, pc), ++ ++ TP_FIELDS( ++ ctf_integer(dev_t, dev, inode->i_sb->s_dev) ++ ctf_integer(ino_t, ino, inode->i_ino) ++ ctf_integer(ext4_lblk_t, start, start) ++ ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block)) ++ ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex)) ++ ctf_integer(short, ee_len, ext4_ext_get_actual_len(ex)) ++ ctf_integer(ext4_fsblk_t, pc_pclu, pc->pclu) ++ ctf_integer(ext4_lblk_t, pc_lblk, pc->lblk) ++ ctf_integer(int, pc_state, pc->state) ++ ) ++) ++ ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) + + LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf, + TP_PROTO(struct inode *inode, ext4_lblk_t start, +@@ -1733,7 +1778,28 @@ LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space, + + #endif + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0)) ++ ++LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done, ++ TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t end, ++ int depth, struct partial_cluster *pc, __le16 eh_entries), ++ ++ TP_ARGS(inode, start, end, depth, pc, eh_entries), ++ ++ TP_FIELDS( ++ ctf_integer(dev_t, dev, inode->i_sb->s_dev) ++ ctf_integer(ino_t, ino, inode->i_ino) ++ ctf_integer(ext4_lblk_t, start, start) ++ ctf_integer(ext4_lblk_t, end, end) ++ ctf_integer(int, depth, depth) ++ ctf_integer(unsigned short, eh_entries, le16_to_cpu(eh_entries)) ++ ctf_integer(ext4_fsblk_t, pc_pclu, pc->pclu) ++ ctf_integer(ext4_lblk_t, pc_lblk, pc->lblk) ++ ctf_integer(int, pc_state, pc->state) ++ ) ++) ++ ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) + + LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done, + TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t end, +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-timer-instrumentation-for-RHEL-7.6.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-timer-instrumentation-for-RHEL-7.6.patch new file mode 100644 index 000000000..b5d50dba1 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-timer-instrumentation-for-RHEL-7.6.patch @@ -0,0 +1,32 @@ +From 4eaeb54a27fbf701c2a4908a6e90a978b93deb06 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <mjeanson@efficios.com> +Date: Thu, 6 Dec 2018 11:31:51 -0500 +Subject: [PATCH 4/9] Fix: timer instrumentation for RHEL 7.6 + +Signed-off-by: Michael Jeanson <mjeanson@efficios.com> +Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> + +Upstream-Status: backport https://github.com/lttng/lttng-modules/commit/4eaeb54a27fbf701c2a4908a6e90a978b93deb06 + +Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> +--- + instrumentation/events/lttng-module/timer.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/instrumentation/events/lttng-module/timer.h b/instrumentation/events/lttng-module/timer.h +index 6f0cb7f..8807ad5 100644 +--- a/instrumentation/events/lttng-module/timer.h ++++ b/instrumentation/events/lttng-module/timer.h +@@ -44,7 +44,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(timer_class, timer_init, + TP_ARGS(timer) + ) + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) || \ ++ LTTNG_RHEL_KERNEL_RANGE(3,10,0,957,0,0, 3,11,0,0,0,0)) + /** + * timer_start - called when the timer is started + * @timer: pointer to struct timer_list +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0005-Fix-Remove-type-argument-from-access_ok-function-v5..patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0005-Fix-Remove-type-argument-from-access_ok-function-v5..patch new file mode 100644 index 000000000..2266bbd9e --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0005-Fix-Remove-type-argument-from-access_ok-function-v5..patch @@ -0,0 +1,204 @@ +From 0039dbe9891cfdf2c0d04691f83c2f342993dfd7 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <mjeanson@efficios.com> +Date: Wed, 9 Jan 2019 14:59:15 -0500 +Subject: [PATCH 5/9] Fix: Remove 'type' argument from access_ok() function + (v5.0) + +See upstream commit : + + commit 96d4f267e40f9509e8a66e2b39e8b95655617693 + Author: Linus Torvalds <torvalds@linux-foundation.org> + Date: Thu Jan 3 18:57:57 2019 -0800 + + Remove 'type' argument from access_ok() function + + Nobody has actually used the type (VERIFY_READ vs VERIFY_WRITE) argument + of the user address range verification function since we got rid of the + old racy i386-only code to walk page tables by hand. + + It existed because the original 80386 would not honor the write protect + bit when in kernel mode, so you had to do COW by hand before doing any + user access. But we haven't supported that in a long time, and these + days the 'type' argument is a purely historical artifact. + + A discussion about extending 'user_access_begin()' to do the range + checking resulted this patch, because there is no way we're going to + move the old VERIFY_xyz interface to that model. And it's best done at + the end of the merge window when I've done most of my merges, so let's + just get this done once and for all. + + This patch was mostly done with a sed-script, with manual fix-ups for + the cases that weren't of the trivial 'access_ok(VERIFY_xyz' form. + + There were a couple of notable cases: + + - csky still had the old "verify_area()" name as an alias. + + - the iter_iov code had magical hardcoded knowledge of the actual + values of VERIFY_{READ,WRITE} (not that they mattered, since nothing + really used it) + + - microblaze used the type argument for a debug printout + + but other than those oddities this should be a total no-op patch. + + I tried to fix up all architectures, did fairly extensive grepping for + access_ok() uses, and the changes are trivial, but I may have missed + something. Any missed conversion should be trivially fixable, though. + +Signed-off-by: Michael Jeanson <mjeanson@efficios.com> +Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> + +Upstream-Status: backport https://github.com/lttng/lttng-modules/commit/0039dbe9891cfdf2c0d04691f83c2f342993dfd7 + +Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> +--- + lib/ringbuffer/backend.h | 8 ++++---- + lib/ringbuffer/ring_buffer_iterator.c | 3 ++- + lttng-filter-interpreter.c | 4 ++-- + probes/lttng-probe-user.c | 3 ++- + wrapper/uaccess.h | 28 +++++++++++++++++++++++++++ + 5 files changed, 38 insertions(+), 8 deletions(-) + create mode 100644 wrapper/uaccess.h + +diff --git a/lib/ringbuffer/backend.h b/lib/ringbuffer/backend.h +index 0b75de8..3f8c108 100644 +--- a/lib/ringbuffer/backend.h ++++ b/lib/ringbuffer/backend.h +@@ -34,7 +34,7 @@ + #include <linux/list.h> + #include <linux/fs.h> + #include <linux/mm.h> +-#include <linux/uaccess.h> ++#include <wrapper/uaccess.h> + + /* Internal helpers */ + #include <wrapper/ringbuffer/backend_internal.h> +@@ -302,7 +302,7 @@ void lib_ring_buffer_copy_from_user_inatomic(const struct lib_ring_buffer_config + + set_fs(KERNEL_DS); + pagefault_disable(); +- if (unlikely(!access_ok(VERIFY_READ, src, len))) ++ if (unlikely(!lttng_access_ok(VERIFY_READ, src, len))) + goto fill_buffer; + + if (likely(pagecpy == len)) { +@@ -372,7 +372,7 @@ void lib_ring_buffer_strcpy_from_user_inatomic(const struct lib_ring_buffer_conf + + set_fs(KERNEL_DS); + pagefault_disable(); +- if (unlikely(!access_ok(VERIFY_READ, src, len))) ++ if (unlikely(!lttng_access_ok(VERIFY_READ, src, len))) + goto fill_buffer; + + if (likely(pagecpy == len)) { +@@ -462,7 +462,7 @@ unsigned long lib_ring_buffer_copy_from_user_check_nofault(void *dest, + unsigned long ret; + mm_segment_t old_fs; + +- if (!access_ok(VERIFY_READ, src, len)) ++ if (!lttng_access_ok(VERIFY_READ, src, len)) + return 1; + old_fs = get_fs(); + set_fs(KERNEL_DS); +diff --git a/lib/ringbuffer/ring_buffer_iterator.c b/lib/ringbuffer/ring_buffer_iterator.c +index 61eaa5b..9645946 100644 +--- a/lib/ringbuffer/ring_buffer_iterator.c ++++ b/lib/ringbuffer/ring_buffer_iterator.c +@@ -27,6 +27,7 @@ + + #include <wrapper/ringbuffer/iterator.h> + #include <wrapper/file.h> ++#include <wrapper/uaccess.h> + #include <linux/jiffies.h> + #include <linux/delay.h> + #include <linux/module.h> +@@ -621,7 +622,7 @@ ssize_t channel_ring_buffer_file_read(struct file *filp, + ssize_t len; + + might_sleep(); +- if (!access_ok(VERIFY_WRITE, user_buf, count)) ++ if (!lttng_access_ok(VERIFY_WRITE, user_buf, count)) + return -EFAULT; + + /* Finish copy of previous record */ +diff --git a/lttng-filter-interpreter.c b/lttng-filter-interpreter.c +index e131462..bee2918 100644 +--- a/lttng-filter-interpreter.c ++++ b/lttng-filter-interpreter.c +@@ -24,7 +24,7 @@ + * SOFTWARE. + */ + +-#include <linux/uaccess.h> ++#include <wrapper/uaccess.h> + #include <wrapper/frame.h> + #include <wrapper/types.h> + +@@ -46,7 +46,7 @@ char get_char(struct estack_entry *reg, size_t offset) + char c; + + /* Handle invalid access as end of string. */ +- if (unlikely(!access_ok(VERIFY_READ, ++ if (unlikely(!lttng_access_ok(VERIFY_READ, + reg->u.s.user_str + offset, + sizeof(c)))) + return '\0'; +diff --git a/probes/lttng-probe-user.c b/probes/lttng-probe-user.c +index 099a66b..ed566dd 100644 +--- a/probes/lttng-probe-user.c ++++ b/probes/lttng-probe-user.c +@@ -20,6 +20,7 @@ + + #include <linux/uaccess.h> + #include <linux/module.h> ++#include <wrapper/uaccess.h> + #include <probes/lttng-probe-user.h> + + /* +@@ -43,7 +44,7 @@ long lttng_strlen_user_inatomic(const char *addr) + char v; + unsigned long ret; + +- if (unlikely(!access_ok(VERIFY_READ, ++ if (unlikely(!lttng_access_ok(VERIFY_READ, + (__force const char __user *) addr, + sizeof(v)))) + break; +diff --git a/wrapper/uaccess.h b/wrapper/uaccess.h +new file mode 100644 +index 0000000..c56427c +--- /dev/null ++++ b/wrapper/uaccess.h +@@ -0,0 +1,28 @@ ++/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1) ++ * ++ * wrapper/uaccess.h ++ * ++ * wrapper around linux/uaccess.h. ++ * ++ * Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com> ++ */ ++ ++#ifndef _LTTNG_WRAPPER_UACCESS_H ++#define _LTTNG_WRAPPER_UACCESS_H ++ ++#include <linux/uaccess.h> ++#include <lttng-kernel-version.h> ++ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)) ++ ++#define VERIFY_READ 0 ++#define VERIFY_WRITE 1 ++#define lttng_access_ok(type, addr, size) access_ok(addr, size) ++ ++#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) */ ++ ++#define lttng_access_ok(type, addr, size) access_ok(type, addr, size) ++ ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) */ ++ ++#endif /* _LTTNG_WRAPPER_UACCESS_H */ +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0006-Fix-Replace-pointer-values-with-task-tk_pid-and-rpc_.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0006-Fix-Replace-pointer-values-with-task-tk_pid-and-rpc_.patch new file mode 100644 index 000000000..089486f51 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0006-Fix-Replace-pointer-values-with-task-tk_pid-and-rpc_.patch @@ -0,0 +1,186 @@ +From 89f0be35e1baf411df6852014013ac64ad1bbcf8 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <mjeanson@efficios.com> +Date: Wed, 9 Jan 2019 14:59:16 -0500 +Subject: [PATCH 6/9] Fix: Replace pointer values with task->tk_pid and + rpc_clnt->cl_clid + +Introduced in v3.12. + +See upstream commit : + + commit 92cb6c5be8134db6f7c38f25f6afd13e444cebaf + Author: Trond Myklebust <Trond.Myklebust@netapp.com> + Date: Wed Sep 4 22:09:50 2013 -0400 + + SUNRPC: Replace pointer values with task->tk_pid and rpc_clnt->cl_clid + + Instead of the pointer values, use the task and client identifier values + for tracing purposes. + +Signed-off-by: Michael Jeanson <mjeanson@efficios.com> +Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> + +Upstream-Status: backport https://github.com/lttng/lttng-modules/commit/89f0be35e1baf411df6852014013ac64ad1bbcf8 + +Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> +--- + instrumentation/events/lttng-module/rpc.h | 108 ++++++++++++++++++++-- + 1 file changed, 102 insertions(+), 6 deletions(-) + +diff --git a/instrumentation/events/lttng-module/rpc.h b/instrumentation/events/lttng-module/rpc.h +index b9e45fe..a4ac557 100644 +--- a/instrumentation/events/lttng-module/rpc.h ++++ b/instrumentation/events/lttng-module/rpc.h +@@ -8,6 +8,20 @@ + #include <linux/sunrpc/sched.h> + #include <linux/sunrpc/clnt.h> + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) ++LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, ++ ++ TP_PROTO(struct rpc_task *task), ++ ++ TP_ARGS(task), ++ ++ TP_FIELDS( ++ ctf_integer(unsigned int, task_id, task->tk_pid) ++ ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) ++ ctf_integer(int, status, task->tk_status) ++ ) ++) ++#else + LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, + + TP_PROTO(struct rpc_task *task), +@@ -20,6 +34,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, + ctf_integer(int, status, task->tk_status) + ) + ) ++#endif + + LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_call_status, + TP_PROTO(struct rpc_task *task), +@@ -40,8 +55,8 @@ LTTNG_TRACEPOINT_EVENT(rpc_connect_status, + TP_ARGS(task), + + TP_FIELDS( +- ctf_integer_hex(const struct rpc_task *, task, task) +- ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client) ++ ctf_integer(unsigned int, task_id, task->tk_pid) ++ ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) + ctf_integer(int, status, task->tk_status) + ) + ) +@@ -53,8 +68,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running, + TP_ARGS(task, action), + + TP_FIELDS( +- ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client) +- ctf_integer_hex(const struct rpc_task *, task, task) ++ ctf_integer(unsigned int, task_id, task->tk_pid) ++ ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) + ctf_integer_hex(const void *, action, action) + ctf_integer(unsigned long, runstate, task->tk_runstate) + ctf_integer(int, status, task->tk_status) +@@ -90,8 +105,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued, + TP_ARGS(task, q), + + TP_FIELDS( +- ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client) +- ctf_integer_hex(const struct rpc_task *, task, task) ++ ctf_integer(unsigned int, task_id, task->tk_pid) ++ ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) + ctf_integer(unsigned long, timeout, task->tk_timeout) + ctf_integer(unsigned long, runstate, task->tk_runstate) + ctf_integer(int, status, task->tk_status) +@@ -114,6 +129,87 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup, + TP_ARGS(task, q) + ) + ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) ++LTTNG_TRACEPOINT_EVENT(rpc_connect_status, ++ TP_PROTO(struct rpc_task *task, int status), ++ ++ TP_ARGS(task, status), ++ ++ TP_FIELDS( ++ ctf_integer(unsigned int, task_id, task->tk_pid) ++ ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) ++ ctf_integer(int, status, status) ++ ) ++) ++ ++LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running, ++ ++ TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), ++ ++ TP_ARGS(clnt, task, action), ++ ++ TP_FIELDS( ++ ctf_integer(unsigned int, task_id, task->tk_pid) ++ ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) ++ ctf_integer_hex(const void *, action, action) ++ ctf_integer(unsigned long, runstate, task->tk_runstate) ++ ctf_integer(int, status, task->tk_status) ++ ctf_integer(unsigned short, flags, task->tk_flags) ++ ) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_begin, ++ ++ TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), ++ ++ TP_ARGS(clnt, task, action) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_run_action, ++ ++ TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), ++ ++ TP_ARGS(clnt, task, action) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_complete, ++ ++ TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), ++ ++ TP_ARGS(clnt, task, action) ++) ++ ++LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued, ++ ++ TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), ++ ++ TP_ARGS(clnt, task, q), ++ ++ TP_FIELDS( ++ ctf_integer(unsigned int, task_id, task->tk_pid) ++ ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) ++ ctf_integer(unsigned long, timeout, task->tk_timeout) ++ ctf_integer(unsigned long, runstate, task->tk_runstate) ++ ctf_integer(int, status, task->tk_status) ++ ctf_integer(unsigned short, flags, task->tk_flags) ++ ctf_string(q_name, rpc_qname(q)) ++ ) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_sleep, ++ ++ TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), ++ ++ TP_ARGS(clnt, task, q) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup, ++ ++ TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), ++ ++ TP_ARGS(clnt, task, q) ++) ++ + #else + LTTNG_TRACEPOINT_EVENT(rpc_connect_status, + TP_PROTO(struct rpc_task *task, int status), +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0007-Fix-SUNRPC-Simplify-defining-common-RPC-trace-events.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0007-Fix-SUNRPC-Simplify-defining-common-RPC-trace-events.patch new file mode 100644 index 000000000..f3673301d --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0007-Fix-SUNRPC-Simplify-defining-common-RPC-trace-events.patch @@ -0,0 +1,183 @@ +From d11b568681f87c2df6ecb0516d3f16d153f24bd2 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <mjeanson@efficios.com> +Date: Wed, 9 Jan 2019 14:59:17 -0500 +Subject: [PATCH 7/9] Fix: SUNRPC: Simplify defining common RPC trace events + (v5.0) + +See upstream commit : + + commit dc5820bd21d84ee34770b0a1e2fca9378f8f7456 + Author: Chuck Lever <chuck.lever@oracle.com> + Date: Wed Dec 19 11:00:16 2018 -0500 + + SUNRPC: Simplify defining common RPC trace events + + Clean up, no functional change is expected. + +Signed-off-by: Michael Jeanson <mjeanson@efficios.com> +Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> + +Upstream-Status: backport https://github.com/lttng/lttng-modules/commit/d11b568681f87c2df6ecb0516d3f16d153f24bd2 + +Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> +--- + instrumentation/events/lttng-module/rpc.h | 99 ++++++++++++++++------- + 1 file changed, 72 insertions(+), 27 deletions(-) + +diff --git a/instrumentation/events/lttng-module/rpc.h b/instrumentation/events/lttng-module/rpc.h +index a4ac557..4239280 100644 +--- a/instrumentation/events/lttng-module/rpc.h ++++ b/instrumentation/events/lttng-module/rpc.h +@@ -8,7 +8,32 @@ + #include <linux/sunrpc/sched.h> + #include <linux/sunrpc/clnt.h> + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)) ++LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, ++ ++ TP_PROTO(const struct rpc_task *task), ++ ++ TP_ARGS(task), ++ ++ TP_FIELDS( ++ ctf_integer(unsigned int, task_id, task->tk_pid) ++ ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) ++ ctf_integer(int, status, task->tk_status) ++ ) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_call_status, ++ TP_PROTO(const struct rpc_task *task), ++ ++ TP_ARGS(task) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status, ++ TP_PROTO(const struct rpc_task *task), ++ ++ TP_ARGS(task) ++) ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) + LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, + + TP_PROTO(struct rpc_task *task), +@@ -21,6 +46,18 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, + ctf_integer(int, status, task->tk_status) + ) + ) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_call_status, ++ TP_PROTO(struct rpc_task *task), ++ ++ TP_ARGS(task) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status, ++ TP_PROTO(struct rpc_task *task), ++ ++ TP_ARGS(task) ++) + #else + LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, + +@@ -34,7 +71,6 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, + ctf_integer(int, status, task->tk_status) + ) + ) +-#endif + + LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_call_status, + TP_PROTO(struct rpc_task *task), +@@ -47,8 +83,15 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status, + + TP_ARGS(task) + ) ++#endif + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)) ++LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_connect_status, ++ TP_PROTO(const struct rpc_task *task), ++ ++ TP_ARGS(task) ++) ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)) + LTTNG_TRACEPOINT_EVENT(rpc_connect_status, + TP_PROTO(const struct rpc_task *task), + +@@ -60,7 +103,33 @@ LTTNG_TRACEPOINT_EVENT(rpc_connect_status, + ctf_integer(int, status, task->tk_status) + ) + ) ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) ++LTTNG_TRACEPOINT_EVENT(rpc_connect_status, ++ TP_PROTO(struct rpc_task *task, int status), ++ ++ TP_ARGS(task, status), ++ ++ TP_FIELDS( ++ ctf_integer(unsigned int, task_id, task->tk_pid) ++ ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) ++ ctf_integer(int, status, status) ++ ) ++) ++#else ++LTTNG_TRACEPOINT_EVENT(rpc_connect_status, ++ TP_PROTO(struct rpc_task *task, int status), ++ ++ TP_ARGS(task, status), ++ ++ TP_FIELDS( ++ ctf_integer_hex(const struct rpc_task *, task, task) ++ ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client) ++ ctf_integer(int, status, status) ++ ) ++) ++#endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)) + LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running, + + TP_PROTO(const struct rpc_task *task, const void *action), +@@ -130,18 +199,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup, + ) + + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) +-LTTNG_TRACEPOINT_EVENT(rpc_connect_status, +- TP_PROTO(struct rpc_task *task, int status), +- +- TP_ARGS(task, status), +- +- TP_FIELDS( +- ctf_integer(unsigned int, task_id, task->tk_pid) +- ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) +- ctf_integer(int, status, status) +- ) +-) +- + LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running, + + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), +@@ -211,18 +268,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup, + ) + + #else +-LTTNG_TRACEPOINT_EVENT(rpc_connect_status, +- TP_PROTO(struct rpc_task *task, int status), +- +- TP_ARGS(task, status), +- +- TP_FIELDS( +- ctf_integer_hex(const struct rpc_task *, task, task) +- ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client) +- ctf_integer(int, status, status) +- ) +-) +- + LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running, + + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0008-Fix-btrfs-Remove-fsid-metadata_fsid-fields-from-btrf.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0008-Fix-btrfs-Remove-fsid-metadata_fsid-fields-from-btrf.patch new file mode 100644 index 000000000..5f1298995 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0008-Fix-btrfs-Remove-fsid-metadata_fsid-fields-from-btrf.patch @@ -0,0 +1,341 @@ +From 8af8245f6f86370d01cc4acaabafb90de45e143f Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <mjeanson@efficios.com> +Date: Thu, 10 Jan 2019 14:56:15 -0500 +Subject: [PATCH 8/9] Fix: btrfs: Remove fsid/metadata_fsid fields from + btrfs_info + +Introduced in v5.0. + +See upstream commit : + + commit de37aa513105f864d3c21105bf5542d498f21ca2 + Author: Nikolay Borisov <nborisov@suse.com> + Date: Tue Oct 30 16:43:24 2018 +0200 + + btrfs: Remove fsid/metadata_fsid fields from btrfs_info + + Currently btrfs_fs_info structure contains a copy of the + fsid/metadata_uuid fields. Same values are also contained in the + btrfs_fs_devices structure which fs_info has a reference to. Let's + reduce duplication by removing the fields from fs_info and always refer + to the ones in fs_devices. No functional changes. + +Signed-off-by: Michael Jeanson <mjeanson@efficios.com> +Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> + +Upstream-Status: backport https://github.com/lttng/lttng-modules/commit/8af8245f6f86370d01cc4acaabafb90de45e143f + +Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> +--- + instrumentation/events/lttng-module/btrfs.h | 100 +++++++++++--------- + 1 file changed, 53 insertions(+), 47 deletions(-) + +diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h +index 4dfbf5b..ec45a1e 100644 +--- a/instrumentation/events/lttng-module/btrfs.h ++++ b/instrumentation/events/lttng-module/btrfs.h +@@ -32,6 +32,12 @@ struct extent_state; + + #define BTRFS_UUID_SIZE 16 + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)) ++#define lttng_fs_info_fsid fs_info->fs_devices->fsid ++#else ++#define lttng_fs_info_fsid fs_info->fsid ++#endif ++ + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ +@@ -629,7 +635,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group, + TP_ARGS(fs_info, block_group, create), + + TP_FIELDS( +- ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE) ++ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) + ctf_integer(u64, offset, block_group->key.objectid) + ctf_integer(u64, size, block_group->key.offset) + ctf_integer(u64, flags, block_group->flags) +@@ -647,7 +653,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group, + TP_ARGS(fs_info, block_group, create), + + TP_FIELDS( +- ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE) ++ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) + ctf_integer(u64, offset, block_group->key.objectid) + ctf_integer(u64, size, block_group->key.offset) + ctf_integer(u64, flags, block_group->flags) +@@ -1015,18 +1021,18 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, + + LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc, + +- TP_PROTO(const struct btrfs_fs_info *info, const struct map_lookup *map, ++ TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map, + u64 offset, u64 size), + +- TP_ARGS(info, map, offset, size) ++ TP_ARGS(fs_info, map, offset, size) + ) + + LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free, + +- TP_PROTO(const struct btrfs_fs_info *info, const struct map_lookup *map, ++ TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map, + u64 offset, u64 size), + +- TP_ARGS(info, map, offset, size) ++ TP_ARGS(fs_info, map, offset, size) + ) + + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) +@@ -1050,18 +1056,18 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, + + LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc, + +- TP_PROTO(struct btrfs_fs_info *info, struct map_lookup *map, ++ TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map, + u64 offset, u64 size), + +- TP_ARGS(info, map, offset, size) ++ TP_ARGS(fs_info, map, offset, size) + ) + + LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free, + +- TP_PROTO(struct btrfs_fs_info *info, struct map_lookup *map, ++ TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map, + u64 offset, u64 size), + +- TP_ARGS(info, map, offset, size) ++ TP_ARGS(fs_info, map, offset, size) + ) + + #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ +@@ -1192,7 +1198,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation, + TP_ARGS(fs_info, type, val, bytes, reserve), + + TP_FIELDS( +- ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE) ++ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) + ctf_string(type, type) + ctf_integer(u64, val, val) + ctf_integer(u64, bytes, bytes) +@@ -1208,7 +1214,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation, + TP_ARGS(fs_info, type, val, bytes, reserve), + + TP_FIELDS( +- ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE) ++ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) + ctf_string(type, type) + ctf_integer(u64, val, val) + ctf_integer(u64, bytes, bytes) +@@ -1221,9 +1227,9 @@ LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation, + + LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent, + +- TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len), ++ TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len), + +- TP_ARGS(info, start, len), ++ TP_ARGS(fs_info, start, len), + + TP_FIELDS( + ctf_integer(u64, start, start) +@@ -1233,25 +1239,25 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent, + + LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc, + +- TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len), ++ TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len), + +- TP_ARGS(info, start, len) ++ TP_ARGS(fs_info, start, len) + ) + + LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free, + +- TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len), ++ TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len), + +- TP_ARGS(info, start, len) ++ TP_ARGS(fs_info, start, len) + ) + + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) + + LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent, + +- TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len), ++ TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len), + +- TP_ARGS(info, start, len), ++ TP_ARGS(fs_info, start, len), + + TP_FIELDS( + ctf_integer(u64, start, start) +@@ -1261,16 +1267,16 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent, + + LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc, + +- TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len), ++ TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len), + +- TP_ARGS(info, start, len) ++ TP_ARGS(fs_info, start, len) + ) + + LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free, + +- TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len), ++ TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len), + +- TP_ARGS(info, start, len) ++ TP_ARGS(fs_info, start, len) + ) + + #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ +@@ -1341,13 +1347,13 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, + + btrfs_find_free_extent, + +- TP_PROTO(const struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size, ++ TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, + u64 data), + +- TP_ARGS(info, num_bytes, empty_size, data), ++ TP_ARGS(fs_info, num_bytes, empty_size, data), + + TP_FIELDS( +- ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE) ++ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) + ctf_integer(u64, num_bytes, num_bytes) + ctf_integer(u64, empty_size, empty_size) + ctf_integer(u64, data, data) +@@ -1362,7 +1368,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, + TP_ARGS(block_group, start, len), + + TP_FIELDS( +- ctf_array(u8, fsid, block_group->fs_info->fsid, BTRFS_UUID_SIZE) ++ ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE) + ctf_integer(u64, bg_objectid, block_group->key.objectid) + ctf_integer(u64, flags, block_group->flags) + ctf_integer(u64, start, start) +@@ -1391,13 +1397,13 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, + + btrfs_find_free_extent, + +- TP_PROTO(const struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size, ++ TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, + u64 data), + +- TP_ARGS(info, num_bytes, empty_size, data), ++ TP_ARGS(fs_info, num_bytes, empty_size, data), + + TP_FIELDS( +- ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE) ++ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) + ctf_integer(u64, num_bytes, num_bytes) + ctf_integer(u64, empty_size, empty_size) + ctf_integer(u64, data, data) +@@ -1406,14 +1412,14 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, + + LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, + +- TP_PROTO(const struct btrfs_fs_info *info, ++ TP_PROTO(const struct btrfs_fs_info *fs_info, + const struct btrfs_block_group_cache *block_group, u64 start, + u64 len), + +- TP_ARGS(info, block_group, start, len), ++ TP_ARGS(fs_info, block_group, start, len), + + TP_FIELDS( +- ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE) ++ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) + ctf_integer(u64, bg_objectid, block_group->key.objectid) + ctf_integer(u64, flags, block_group->flags) + ctf_integer(u64, start, start) +@@ -1423,20 +1429,20 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, + + LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, + +- TP_PROTO(const struct btrfs_fs_info *info, ++ TP_PROTO(const struct btrfs_fs_info *fs_info, + const struct btrfs_block_group_cache *block_group, u64 start, + u64 len), + +- TP_ARGS(info, block_group, start, len) ++ TP_ARGS(fs_info, block_group, start, len) + ) + + LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, + +- TP_PROTO(const struct btrfs_fs_info *info, ++ TP_PROTO(const struct btrfs_fs_info *fs_info, + const struct btrfs_block_group_cache *block_group, u64 start, + u64 len), + +- TP_ARGS(info, block_group, start, len) ++ TP_ARGS(fs_info, block_group, start, len) + ) + + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) +@@ -1445,13 +1451,13 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, + + btrfs_find_free_extent, + +- TP_PROTO(struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size, ++ TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, + u64 data), + +- TP_ARGS(info, num_bytes, empty_size, data), ++ TP_ARGS(fs_info, num_bytes, empty_size, data), + + TP_FIELDS( +- ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE) ++ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) + ctf_integer(u64, num_bytes, num_bytes) + ctf_integer(u64, empty_size, empty_size) + ctf_integer(u64, data, data) +@@ -1460,11 +1466,11 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, + + LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, + +- TP_PROTO(struct btrfs_fs_info *info, ++ TP_PROTO(struct btrfs_fs_info *fs_info, + struct btrfs_block_group_cache *block_group, u64 start, + u64 len), + +- TP_ARGS(info, block_group, start, len), ++ TP_ARGS(fs_info, block_group, start, len), + + TP_FIELDS( + ctf_integer(u64, bg_objectid, block_group->key.objectid) +@@ -1476,20 +1482,20 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, + + LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, + +- TP_PROTO(struct btrfs_fs_info *info, ++ TP_PROTO(struct btrfs_fs_info *fs_info, + struct btrfs_block_group_cache *block_group, u64 start, + u64 len), + +- TP_ARGS(info, block_group, start, len) ++ TP_ARGS(fs_info, block_group, start, len) + ) + + LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, + +- TP_PROTO(struct btrfs_fs_info *info, ++ TP_PROTO(struct btrfs_fs_info *fs_info, + struct btrfs_block_group_cache *block_group, u64 start, + u64 len), + +- TP_ARGS(info, block_group, start, len) ++ TP_ARGS(fs_info, block_group, start, len) + ) + #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0009-Cleanup-tp-mempool-Remove-logically-dead-code.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0009-Cleanup-tp-mempool-Remove-logically-dead-code.patch new file mode 100644 index 000000000..4ffe48867 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0009-Cleanup-tp-mempool-Remove-logically-dead-code.patch @@ -0,0 +1,46 @@ +From 416cee8707053a9015dfec8332e12f8c263098e3 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> +Date: Thu, 14 Feb 2019 11:40:50 -0500 +Subject: [PATCH 9/9] Cleanup: tp mempool: Remove logically dead code + +Found by Coverity: +CID 1391045 (#1 of 1): Logically dead code (DEADCODE) + +Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> + +Upstream-Status: backport https://github.com/lttng/lttng-modules/commit/416cee8707053a9015dfec8332e12f8c263098e3 + +Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> +--- + lttng-tp-mempool.c | 11 ++--------- + 1 file changed, 2 insertions(+), 9 deletions(-) + +diff --git a/lttng-tp-mempool.c b/lttng-tp-mempool.c +index d984bd4..21e8376 100644 +--- a/lttng-tp-mempool.c ++++ b/lttng-tp-mempool.c +@@ -151,19 +151,12 @@ void lttng_tp_mempool_free(void *ptr) + struct lttng_tp_buf_entry *entry; + struct per_cpu_buf *cpu_buf; + +- if (!ptr) { ++ if (!ptr) + goto end; +- } +- + entry = container_of(ptr, struct lttng_tp_buf_entry, buf); +- if (!entry) { +- goto end; +- } +- + cpu_buf = per_cpu_ptr(pool, entry->cpu); +- if (!cpu_buf) { ++ if (!cpu_buf) + goto end; +- } + /* Add it to the free list. */ + list_add_tail(&entry->list, &cpu_buf->free_list); + +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb b/poky/meta/recipes-kernel/lttng/lttng-modules_2.10.8.bb index d29737775..15e75e51c 100644 --- a/poky/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb +++ b/poky/meta/recipes-kernel/lttng/lttng-modules_2.10.8.bb @@ -9,16 +9,25 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c4613d1f8a9587bd7b366191830364b3 \ inherit module -COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm).*-linux' +COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux' #https://lttng.org/files/lttng-modules/lttng-modules-2.10.7.tar.bz2 SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \ file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \ -" - -SRC_URI[md5sum] = "09df0ac2e8f245740a2f32411d10c0d1" -SRC_URI[sha256sum] = "a1855bbd02d0f71ebd180e9872309862036624f012442ab9cc5852eb60340145" + file://0001-Fix-signal-Distinguish-between-kernel_siginfo-and-si.patch \ + file://0002-Fix-signal-Remove-SEND_SIG_FORCED-v4.20.patch \ + file://0003-Fix-ext4-adjust-reserved-cluster-count-when-removing.patch \ + file://0004-Fix-timer-instrumentation-for-RHEL-7.6.patch \ + file://0005-Fix-Remove-type-argument-from-access_ok-function-v5..patch \ + file://0006-Fix-Replace-pointer-values-with-task-tk_pid-and-rpc_.patch \ + file://0007-Fix-SUNRPC-Simplify-defining-common-RPC-trace-events.patch \ + file://0008-Fix-btrfs-Remove-fsid-metadata_fsid-fields-from-btrf.patch \ + file://0009-Cleanup-tp-mempool-Remove-logically-dead-code.patch \ + " + +SRC_URI[md5sum] = "54bd9fca61487bbec1b3fca2f2213c98" +SRC_URI[sha256sum] = "fe1d269bca723e8948af871c322c37d3900e647cdc5eb3efbe821e434beee44c" export INSTALL_MOD_DIR="kernel/lttng-modules" diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/0001-Allow-multiple-attempts-to-connect-to-relayd.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/0001-Allow-multiple-attempts-to-connect-to-relayd.patch deleted file mode 100644 index 0998fc386..000000000 --- a/poky/meta/recipes-kernel/lttng/lttng-tools/0001-Allow-multiple-attempts-to-connect-to-relayd.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 70eff899104b86bae02862927c76caaef5de5d3c Mon Sep 17 00:00:00 2001 -From: Mikael Beckius <mikael.beckius@windriver.com> -Date: Thu, 7 May 2015 16:14:25 +0200 -Subject: [PATCH] Allow multiple attempts to connect to relayd. - -It is unclear why a session needs to be made -unusable after a failure to connect to relayd -since a check for a relayd connection is -always made before a session can be configured. - -The behaviour was introduced in: -d9078d0c000d04d49c599a72c1a725026b636ec0 - -Signed-off-by: Mikael Beckius <mikael.beckius@windriver.com> -[ The context has moved, adjust the hunk accordingly ] -Signed-off-by: He Zhe <zhe.he@windriver.com> -Upstream-Status: Pending ---- - src/bin/lttng-sessiond/cmd.c | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c -index cf30b8e..cc41a48 100644 ---- a/src/bin/lttng-sessiond/cmd.c -+++ b/src/bin/lttng-sessiond/cmd.c -@@ -945,14 +945,6 @@ static int send_consumer_relayd_socket(enum lttng_domain_type domain, - */ - - close_sock: -- if (ret != LTTNG_OK) { -- /* -- * The consumer output for this session should not be used anymore -- * since the relayd connection failed thus making any tracing or/and -- * streaming not usable. -- */ -- consumer->enabled = 0; -- } - (void) relayd_close(rsock); - free(rsock); - --- -2.17.1 diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-tests-link-libpause_consumer-on-liblttng-ctl.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-tests-link-libpause_consumer-on-liblttng-ctl.patch new file mode 100644 index 000000000..df18dc842 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-tests-link-libpause_consumer-on-liblttng-ctl.patch @@ -0,0 +1,35 @@ +From 7244eac44be929fabd6ed1333f96929ef8da564f Mon Sep 17 00:00:00 2001 +From: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> +Date: Tue, 19 Mar 2019 17:56:49 +0000 +Subject: [PATCH] fix: tests: link libpause_consumer on liblttng-ctl + +This preload test library uses symbols from liblttng-ctl which are +resolved when preloaded by GLIBC but not by MUSL. + +Upstream-Status: Accepted [f667fbd7f8b9512f9943edb2597c226fcc424ee9] +Backported to 2.11 and 2.10. + +Signed-off-by: Michael Jeanson <mjeanson@efficios.com> +--- + tests/regression/tools/notification/Makefile.am | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/tests/regression/tools/notification/Makefile.am b/tests/regression/tools/notification/Makefile.am +index 41adc69..a352bb8 100644 +--- a/tests/regression/tools/notification/Makefile.am ++++ b/tests/regression/tools/notification/Makefile.am +@@ -20,7 +20,10 @@ FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \ + -rpath $(abs_builddir) + + libpause_consumer_la_SOURCES = consumer_testpoints.c +-libpause_consumer_la_LIBADD = $(top_builddir)/src/common/libcommon.la $(DL_LIBS) ++libpause_consumer_la_LIBADD = \ ++ $(top_builddir)/src/common/libcommon.la \ ++ $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ ++ $(DL_LIBS) + libpause_consumer_la_LDFLAGS = $(FORCE_SHARED_LIB_OPTIONS) + noinst_LTLIBRARIES = libpause_consumer.la + +-- +2.17.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-test-skip-test_getcpu_override-on-single-thread-.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-test-skip-test_getcpu_override-on-single-thread-.patch new file mode 100644 index 000000000..5bb88d21e --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-test-skip-test_getcpu_override-on-single-thread-.patch @@ -0,0 +1,52 @@ +From e7db27668a9d7fd279d45bc43f3a2d5847374e7b Mon Sep 17 00:00:00 2001 +From: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> +Date: Tue, 12 Mar 2019 12:04:58 -0400 +Subject: [PATCH lttng-tools 1/2] Fix: test: skip test_getcpu_override on + single thread system + +There is no value in performing this test on single thread system +since the only valid value for the cpu field is 0. + +This test currently fails on single thread system (i.e yocto runquemu) +on the test_getcpu_override_fail test case. + +Upstream-Status: Accepted [f87d0ca370c17b597762f5ee218f0e821ed2452d] +Backported to 2.11 and 2.10 + +Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> +--- + .../ust/getcpu-override/test_getcpu_override | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/tests/regression/ust/getcpu-override/test_getcpu_override b/tests/regression/ust/getcpu-override/test_getcpu_override +index 4ca385aeb..ee3e31953 100755 +--- a/tests/regression/ust/getcpu-override/test_getcpu_override ++++ b/tests/regression/ust/getcpu-override/test_getcpu_override +@@ -157,13 +157,19 @@ plan_tests $NUM_TESTS + + print_test_banner "$TEST_DESC" + +-if [ -x "$CURDIR/.libs/lttng-ust-getcpu-override-test.so" ]; then +- foundobj=1 +-else +- foundobj=0 ++if [ ! -x "$CURDIR/.libs/lttng-ust-getcpu-override-test.so" ]; then ++ skip 0 "No shared object generated. Skipping all tests." $NUM_TESTS && exit 0 ++fi ++ ++if [ "$num_cpus" -eq "1" ]; then ++ # Skip the test since we cannot perform it as designed since N mod 1 ++ # is always equals to zero. There is no point testing this on a system ++ # with a single thread. LTTng-UST limits the get_cpu function to return ++ # value inside the [0, NUM_CPU - 1] range for a valid event (present in ++ # trace). ++ skip 0 "Test system only have a single thread. Skipping all tests." $NUM_TESTS && exit 0 + fi + +-skip $foundobj "No shared object generated. Skipping all tests." $NUM_TESTS && exit 0 + + TESTS=( + test_getcpu_override_fail +-- +2.17.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/0003-Fix-test-unit-the-tree-origin-can-be-a-symlink-itsel.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/0003-Fix-test-unit-the-tree-origin-can-be-a-symlink-itsel.patch new file mode 100644 index 000000000..822b26a36 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-tools/0003-Fix-test-unit-the-tree-origin-can-be-a-symlink-itsel.patch @@ -0,0 +1,80 @@ +From 83d165442d1c3658b6bafa28ddade8ffee7092ad Mon Sep 17 00:00:00 2001 +From: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> +Date: Wed, 6 Mar 2019 16:46:49 -0500 +Subject: [PATCH lttng-tools 2/2] Fix: test: unit: the tree origin can be a + symlink itself + +Problem: + +The base tree is defined as "/tmp/.....XXXXXX". +On systems where "/tmp/" is itself a symlink utils_expand_path will +expand the tree origin itself. + +For example on a base core-image-minimal Yocto build /tmp is a symlink +to "/var/tmp", which is a symlink to "/var/volatile". + +utils_expand_path will return something like this for the symlink test: +"/var/volative/.....XXXXXX/...." which is the valid result. + +Solution: + +Simply use realpath on the tree_origin and use this path to perform the +test validation. + +This work was performed in the effort to support yocto fully and be able +to run the test suite to detect problem as early as possible. + + +Upstream-Status: Accepted [f66e964a2e0c75f5e1a55fbcc963b1c5e2b4519d] +Backported to 2.11 and 2.10 + +Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> +--- + tests/unit/test_utils_expand_path.c | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/tests/unit/test_utils_expand_path.c b/tests/unit/test_utils_expand_path.c +index d5cab002e..d047c207d 100644 +--- a/tests/unit/test_utils_expand_path.c ++++ b/tests/unit/test_utils_expand_path.c +@@ -281,8 +281,8 @@ error: + static void test_utils_expand_path(void) + { + char *result; +- char name[100], tmppath[PATH_MAX]; +- int i; ++ char name[100], tmppath[PATH_MAX], real_tree_origin[PATH_MAX]; ++ int i, treelen; + + /* Test valid cases */ + for (i = 0; i < num_valid_tests; i++) { +@@ -295,14 +295,24 @@ static void test_utils_expand_path(void) + free(result); + } + ++ /* ++ * Get the realpath for the tree_origin since it can itself be a ++ * symlink. ++ */ ++ result = realpath(tree_origin, real_tree_origin); ++ if (!result) { ++ fail("realpath failed."); ++ return; ++ } ++ + /* Test symlink tree cases */ +- int treelen = strlen(tree_origin) + 1; ++ treelen = strlen(real_tree_origin) + 1; + for (i = 0; i < num_symlink_tests; i++) { + sprintf(name, "symlink tree test case: [tmppath/]%s", + symlink_tests_inputs[i].input); + + snprintf(tmppath, PATH_MAX, "%s/%s", +- tree_origin, symlink_tests_inputs[i].input); ++ real_tree_origin, symlink_tests_inputs[i].input); + result = utils_expand_path(tmppath); + ok(result != NULL && strcmp(result + treelen, + symlink_tests_inputs[i].expected_result) == 0, name); +-- +2.17.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/0004-Skip-when-testapp-is-not-present.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/0004-Skip-when-testapp-is-not-present.patch new file mode 100644 index 000000000..6c9f7e462 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-tools/0004-Skip-when-testapp-is-not-present.patch @@ -0,0 +1,610 @@ +From 95c27e6acceaeda55c729b9e92e594322adef13f Mon Sep 17 00:00:00 2001 +From: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> +Date: Wed, 3 Apr 2019 16:31:18 -0400 +Subject: [PATCH lttng-tools] Skip when testapp is not present + +We expect lttng-ust do be present, this is a wrong assumptions. + +This is a quick fix. The real fix is to either detect at runtime +lttng-ust support or at build time (HAVE_LIBLTTNG_UST_CTL). + +This prevent hang for make check done on a build configured with +--without-lttng-ust. + +Upstream-Status: Inappropriate [other] +Reason: This patch is inappropriate for upstream for 2.10 stable release +since we do not backport "superficial" fix to the test suite. We do +backport when a test is broken. The fact that on --without-lttng-ust +hang is not a "broken" test per-see. Still, a variation of this fix will +be upstreamed in our master branch and possibly 2.11. The upstreamed +version will split the test in kernel/ust test and skip them at the +build system level. This patch is more succinct. + +Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> +--- + tests/regression/tools/crash/test_crash | 4 ++ + .../regression/tools/exclusion/test_exclusion | 4 ++ + .../tools/filtering/test_valid_filter | 21 ++++-- + tests/regression/tools/health/test_thread_ok | 29 +++++--- + tests/regression/tools/live/Makefile.am | 2 - + tests/regression/tools/live/test_lttng_ust | 4 ++ + tests/regression/tools/live/test_ust | 4 ++ + .../tools/live/test_ust_tracefile_count | 4 ++ + tests/regression/tools/mi/test_mi | 4 ++ + .../notification/test_notification_multi_app | 18 +++-- + .../tools/notification/test_notification_ust | 4 ++ + .../regression/tools/regen-metadata/test_ust | 2 +- + .../regression/tools/regen-statedump/test_ust | 2 +- + .../regression/tools/save-load/test_autoload | 7 ++ + tests/regression/tools/save-load/test_load | 8 +++ + tests/regression/tools/save-load/test_save | 7 ++ + .../regression/tools/snapshots/test_ust_fast | 2 +- + .../regression/tools/snapshots/test_ust_long | 2 +- + .../tools/snapshots/test_ust_streaming | 2 +- + tests/regression/tools/snapshots/ust_test | 2 +- + .../streaming/test_high_throughput_limits | 2 +- + tests/regression/tools/streaming/test_ust | 2 +- + .../tracefile-limits/test_tracefile_count | 2 +- + .../tracefile-limits/test_tracefile_size | 2 +- + .../tools/wildcard/test_event_wildcard | 67 ++++++++++--------- + 25 files changed, 147 insertions(+), 60 deletions(-) + +diff --git a/tests/regression/tools/crash/test_crash b/tests/regression/tools/crash/test_crash +index 8c62c513d..3cbe97688 100755 +--- a/tests/regression/tools/crash/test_crash ++++ b/tests/regression/tools/crash/test_crash +@@ -35,6 +35,10 @@ NUM_TESTS=77 + + source $TESTDIR/utils/utils.sh + ++if [ ! -x "$TESTAPP_BIN" ]; then ++ plan_skip_all "No UST events binary detected." ++fi ++ + # Global declaration for simplification + LTTNG_CRASH=$TESTDIR/../src/bin/lttng-crash/$CRASH_BIN + +diff --git a/tests/regression/tools/exclusion/test_exclusion b/tests/regression/tools/exclusion/test_exclusion +index 949cd41df..42e4d72fb 100755 +--- a/tests/regression/tools/exclusion/test_exclusion ++++ b/tests/regression/tools/exclusion/test_exclusion +@@ -30,6 +30,10 @@ NUM_TESTS=149 + + source $TESTDIR/utils/utils.sh + ++if [ ! -x "$TESTAPP_BIN" ]; then ++ plan_skip_all "No UST events binary detected." ++fi ++ + function enable_ust_lttng_all_event_exclusion() + { + sess_name="$1" +diff --git a/tests/regression/tools/filtering/test_valid_filter b/tests/regression/tools/filtering/test_valid_filter +index 163b32182..1e8da630b 100755 +--- a/tests/regression/tools/filtering/test_valid_filter ++++ b/tests/regression/tools/filtering/test_valid_filter +@@ -418,12 +418,18 @@ issue_356_filter+="intfield > 4 && intfield > 5 && " + issue_356_filter+="intfield > 6 && intfield > 7 && " + issue_356_filter+="intfield > 8 || intfield > 0" + ++BIN_NAME="gen-ust-events" ++ ++skip_ust=1 ++if [ ! -x "$CURDIR/$BIN_NAME" ]; then ++ skip_ust=0 ++ skip 0 "No UST nevents binary detected." $NUM_UST_TESTS ++fi ++ + start_lttng_sessiond + + ### UST TESTS + +-BIN_NAME="gen-ust-events" +- + KIRK_KRAUSS_TESTS=( + # the tests below were written by Kirk Krauss in this article: + # http://www.drdobbs.com/architecture-and-design/matching-wildcards-an-empirical-way-to-t/240169123 +@@ -897,9 +903,6 @@ UST_STR_FILTERS=( + END + ) + +-if [ ! -x "$CURDIR/$BIN_NAME" ]; then +- BAIL_OUT "No UST nevents binary detected." +-fi + + IFS="$OLDIFS" + +@@ -910,6 +913,10 @@ i=0 + while true; do + validator="${UST_FILTERS[$i]}" + ++ if [ $skip_ust -eq 0 ]; then ++ break ++ fi ++ + if [ "$validator" = END ]; then + break + fi +@@ -929,6 +936,10 @@ i=0 + while true; do + validator="${UST_STR_FILTERS[$i]}" + ++ if [ $skip_ust -eq 0 ]; then ++ break ++ fi ++ + if [ "$validator" = END ]; then + break + fi +diff --git a/tests/regression/tools/health/test_thread_ok b/tests/regression/tools/health/test_thread_ok +index e81d6ed24..849b7e71f 100755 +--- a/tests/regression/tools/health/test_thread_ok ++++ b/tests/regression/tools/health/test_thread_ok +@@ -27,6 +27,9 @@ CHANNEL_NAME="testchan" + HEALTH_CHECK_BIN="health_check" + NUM_TESTS=17 + SLEEP_TIME=30 ++TESTAPP_PATH="$TESTDIR/utils/testapp" ++TESTAPP_NAME="gen-ust-events" ++TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME" + + source $TESTDIR/utils/utils.sh + +@@ -76,15 +79,19 @@ function test_thread_ok + $CURDIR/$HEALTH_CHECK_BIN > ${STDOUT_PATH} 2> ${STDERR_PATH} + report_errors + +- diag "With UST consumer daemons" +- create_lttng_session_no_output $SESSION_NAME +- enable_ust_lttng_event_ok $SESSION_NAME $UST_EVENT_NAME $CHANNEL_NAME +- start_lttng_tracing_ok $SESSION_NAME +- destroy_lttng_session_ok $SESSION_NAME ++ skip $skip_ust "Ust does not seems to be supported" "5" || ++ { ++ diag "With UST consumer daemons" ++ create_lttng_session_no_output $SESSION_NAME ++ enable_ust_lttng_event_ok $SESSION_NAME $UST_EVENT_NAME $CHANNEL_NAME ++ start_lttng_tracing_ok $SESSION_NAME ++ destroy_lttng_session_ok $SESSION_NAME + +- # Check health status +- $CURDIR/$HEALTH_CHECK_BIN > ${STDOUT_PATH} 2> ${STDERR_PATH} +- report_errors ++ ++ # Check health status ++ $CURDIR/$HEALTH_CHECK_BIN > ${STDOUT_PATH} 2> ${STDERR_PATH} ++ report_errors ++ } + + skip $isroot "Root access is needed. Skipping kernel consumer health check test." "5" || + { +@@ -141,6 +148,12 @@ else + isroot=0 + fi + ++if [ ! -x "$TESTAPP_BIN" ]; then ++ skip_ust=0 ++else ++ skip_ust=1 ++fi ++ + test_thread_ok + + rm -rf ${HEALTH_PATH} +diff --git a/tests/regression/tools/live/Makefile.am b/tests/regression/tools/live/Makefile.am +index 46186d383..db74de8d5 100644 +--- a/tests/regression/tools/live/Makefile.am ++++ b/tests/regression/tools/live/Makefile.am +@@ -16,9 +16,7 @@ LIVE=$(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \ + noinst_PROGRAMS = live_test + EXTRA_DIST = test_kernel test_lttng_kernel + +-if HAVE_LIBLTTNG_UST_CTL + EXTRA_DIST += test_ust test_ust_tracefile_count test_lttng_ust +-endif + + live_test_SOURCES = live_test.c + live_test_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ +diff --git a/tests/regression/tools/live/test_lttng_ust b/tests/regression/tools/live/test_lttng_ust +index 06017d01d..be9b3d7f7 100755 +--- a/tests/regression/tools/live/test_lttng_ust ++++ b/tests/regression/tools/live/test_lttng_ust +@@ -38,6 +38,10 @@ NUM_TESTS=12 + + source $TESTDIR/utils/utils.sh + ++if [ ! -x "$TESTAPP_BIN" ]; then ++ plan_skip_all "No UST events binary detected." ++fi ++ + # MUST set TESTDIR before calling those functions + plan_tests $NUM_TESTS + +diff --git a/tests/regression/tools/live/test_ust b/tests/regression/tools/live/test_ust +index 0384a706f..add521bfc 100755 +--- a/tests/regression/tools/live/test_ust ++++ b/tests/regression/tools/live/test_ust +@@ -36,6 +36,10 @@ DIR=$(readlink -f $TESTDIR) + + source $TESTDIR/utils/utils.sh + ++if [ ! -x "$TESTAPP_BIN" ]; then ++ plan_skip_all "No UST events binary detected." ++fi ++ + echo "$TEST_DESC" + + function setup_live_tracing() +diff --git a/tests/regression/tools/live/test_ust_tracefile_count b/tests/regression/tools/live/test_ust_tracefile_count +index 6da368fc6..10504f8c6 100755 +--- a/tests/regression/tools/live/test_ust_tracefile_count ++++ b/tests/regression/tools/live/test_ust_tracefile_count +@@ -36,6 +36,10 @@ DIR=$(readlink -f $TESTDIR) + + source $TESTDIR/utils/utils.sh + ++if [ ! -x "$TESTAPP_BIN" ]; then ++ plan_skip_all "No UST events binary detected." ++fi ++ + echo "$TEST_DESC" + + function setup_live_tracing() +diff --git a/tests/regression/tools/mi/test_mi b/tests/regression/tools/mi/test_mi +index 48dda7da6..2cc30b29a 100755 +--- a/tests/regression/tools/mi/test_mi ++++ b/tests/regression/tools/mi/test_mi +@@ -61,6 +61,10 @@ NUM_TESTS=228 + + source $TESTDIR/utils/utils.sh + ++if [ ! -x "$TESTAPP_BIN" ]; then ++ plan_skip_all "No UST events binary detected." ++fi ++ + #Overwrite the lttng_bin to get mi output + LTTNG_BIN="lttng --mi xml" + +diff --git a/tests/regression/tools/notification/test_notification_multi_app b/tests/regression/tools/notification/test_notification_multi_app +index 0a05ea6a0..29b0f62fa 100755 +--- a/tests/regression/tools/notification/test_notification_multi_app ++++ b/tests/regression/tools/notification/test_notification_multi_app +@@ -52,6 +52,11 @@ plan_tests $NUM_TESTS + + print_test_banner "$TEST_DESC" + ++skip_ust=1 ++if [ ! -x "$TESTAPP_BIN" ]; then ++ skip_ust=0 ++fi ++ + app_pids=() + + function kernel_event_generator_toogle_state +@@ -468,10 +473,15 @@ function test_on_register_evaluation () + } + + +-TESTS=( +- test_multi_app_ust +- test_on_register_evaluation_ust +-) ++TESTS=() ++if [ $skip_ust -eq "1" ]; then ++ TESTS+=( ++ test_multi_app_ust ++ test_on_register_evaluation_ust ++ ) ++else ++ skip 0 "No UST events binary detected." $NUM_TEST_UST ++fi + + if [ "$(id -u)" == "0" ]; then + TESTS+=( +diff --git a/tests/regression/tools/notification/test_notification_ust b/tests/regression/tools/notification/test_notification_ust +index 8941e476d..eb2e15cad 100755 +--- a/tests/regression/tools/notification/test_notification_ust ++++ b/tests/regression/tools/notification/test_notification_ust +@@ -46,6 +46,10 @@ DIR=$(readlink -f $TESTDIR) + + source $TESTDIR/utils/utils.sh + ++if [ ! -x "$TESTAPP_BIN" ]; then ++ plan_skip_all "No UST events binary detected." ++fi ++ + function ust_event_generator_toogle_state + { + ust_event_generator_suspended=$((ust_event_generator_suspended==0)) +diff --git a/tests/regression/tools/regen-metadata/test_ust b/tests/regression/tools/regen-metadata/test_ust +index b7f1af1d8..312c8a40d 100755 +--- a/tests/regression/tools/regen-metadata/test_ust ++++ b/tests/regression/tools/regen-metadata/test_ust +@@ -34,7 +34,7 @@ NUM_TESTS=33 + source $TESTDIR/utils/utils.sh + + if [ ! -x "$TESTAPP_BIN" ]; then +- BAIL_OUT "No UST events binary detected." ++ plan_skip_all "No UST events binary detected." + fi + + function lttng_create_session_uri +diff --git a/tests/regression/tools/regen-statedump/test_ust b/tests/regression/tools/regen-statedump/test_ust +index 486b9a560..8d455b26a 100755 +--- a/tests/regression/tools/regen-statedump/test_ust ++++ b/tests/regression/tools/regen-statedump/test_ust +@@ -34,7 +34,7 @@ NUM_TESTS=11 + source $TESTDIR/utils/utils.sh + + if [ ! -x "$TESTAPP_BIN" ]; then +- BAIL_OUT "No UST events binary detected." ++ plan_skip_all "No UST events binary detected." + fi + + function test_ust_local () +diff --git a/tests/regression/tools/save-load/test_autoload b/tests/regression/tools/save-load/test_autoload +index 7ee5e9906..ec376cfb3 100755 +--- a/tests/regression/tools/save-load/test_autoload ++++ b/tests/regression/tools/save-load/test_autoload +@@ -21,6 +21,9 @@ CURDIR=$(dirname $0)/ + CONFIG_DIR="${CURDIR}/configuration" + TESTDIR=$CURDIR/../../../ + export LTTNG_SESSION_CONFIG_XSD_PATH=$(readlink -m ${TESTDIR}../src/common/config/) ++TESTAPP_PATH="$TESTDIR/utils/testapp" ++TESTAPP_NAME="gen-ust-events" ++TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME" + + DIR=$(readlink -f $TESTDIR) + +@@ -28,6 +31,10 @@ NUM_TESTS=9 + + source $TESTDIR/utils/utils.sh + ++if [ ! -x "$TESTAPP_BIN" ]; then ++ plan_skip_all "No UST events binary detected." ++fi ++ + # MUST set TESTDIR before calling those functions + plan_tests $NUM_TESTS + +diff --git a/tests/regression/tools/save-load/test_load b/tests/regression/tools/save-load/test_load +index 5e38b46b6..b6fdd8192 100755 +--- a/tests/regression/tools/save-load/test_load ++++ b/tests/regression/tools/save-load/test_load +@@ -20,6 +20,10 @@ TEST_DESC="Load session(s)" + CURDIR=$(dirname $0)/ + CONFIG_DIR="${CURDIR}/configuration" + TESTDIR=$CURDIR/../../../ ++TESTAPP_PATH="$TESTDIR/utils/testapp" ++TESTAPP_NAME="gen-ust-events" ++TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME" ++ + export LTTNG_SESSION_CONFIG_XSD_PATH=$(readlink -m ${TESTDIR}../src/common/config/) + + SESSION_NAME="load-42" +@@ -31,6 +35,10 @@ NUM_TESTS=67 + + source $TESTDIR/utils/utils.sh + ++if [ ! -x "$TESTAPP_BIN" ]; then ++ plan_skip_all "No UST events binary detected." ++fi ++ + # MUST set TESTDIR before calling those functions + plan_tests $NUM_TESTS + +diff --git a/tests/regression/tools/save-load/test_save b/tests/regression/tools/save-load/test_save +index c5f6b1341..cfaf67b7a 100755 +--- a/tests/regression/tools/save-load/test_save ++++ b/tests/regression/tools/save-load/test_save +@@ -23,6 +23,9 @@ TESTDIR=$CURDIR/../../../ + SESSION_NAME="save-42" + CHANNEL_NAME="chan-save" + EVENT_NAME="tp:tptest" ++TESTAPP_PATH="$TESTDIR/utils/testapp" ++TESTAPP_NAME="gen-ust-events" ++TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME" + + DIR=$(readlink -f $TESTDIR) + +@@ -30,6 +33,10 @@ NUM_TESTS=41 + + source $TESTDIR/utils/utils.sh + ++if [ ! -x "TESTAPP_BIN" ]; then ++ plan_skip_all "No UST events binary detected." ++fi ++ + # MUST set TESTDIR before calling those functions + plan_tests $NUM_TESTS + +diff --git a/tests/regression/tools/snapshots/test_ust_fast b/tests/regression/tools/snapshots/test_ust_fast +index edb435c52..5a68ec56d 100755 +--- a/tests/regression/tools/snapshots/test_ust_fast ++++ b/tests/regression/tools/snapshots/test_ust_fast +@@ -23,7 +23,7 @@ TEST_BIN="ust_test" + source $TESTDIR/utils/utils.sh + + if [ ! -x "$CURDIR/$TEST_BIN" ]; then +- BAIL_OUT "No UST test found: $TEST_BIN" ++ plan_skip_all "No UST test found: $TEST_BIN" + fi + + ./$CURDIR/$TEST_BIN $NR_SNAPSHOT +diff --git a/tests/regression/tools/snapshots/test_ust_long b/tests/regression/tools/snapshots/test_ust_long +index 9e1a0c262..afa019f6a 100755 +--- a/tests/regression/tools/snapshots/test_ust_long ++++ b/tests/regression/tools/snapshots/test_ust_long +@@ -23,7 +23,7 @@ TEST_BIN="ust_test" + source $TESTDIR/utils/utils.sh + + if [ ! -x "$CURDIR/$TEST_BIN" ]; then +- BAIL_OUT "No UST test found: $TEST_BIN" ++ plan_skip_all "No UST test found: $TEST_BIN" + fi + + ./$CURDIR/$TEST_BIN $NR_SNAPSHOT +diff --git a/tests/regression/tools/snapshots/test_ust_streaming b/tests/regression/tools/snapshots/test_ust_streaming +index 93b0957f3..69291ab4d 100755 +--- a/tests/regression/tools/snapshots/test_ust_streaming ++++ b/tests/regression/tools/snapshots/test_ust_streaming +@@ -37,7 +37,7 @@ NUM_TESTS=75 + source $TESTDIR/utils/utils.sh + + if [ ! -x "$TESTAPP_BIN" ]; then +- BAIL_OUT "No UST events binary detected." ++ plan_skip_all "No UST events binary detected." + fi + + function snapshot_add_output () +diff --git a/tests/regression/tools/snapshots/ust_test b/tests/regression/tools/snapshots/ust_test +index 755cef9e0..92f9f6cff 100755 +--- a/tests/regression/tools/snapshots/ust_test ++++ b/tests/regression/tools/snapshots/ust_test +@@ -34,7 +34,7 @@ TRACE_PATH=$(mktemp -d) + source $TESTDIR/utils/utils.sh + + if [ ! -x "$TESTAPP_BIN" ]; then +- BAIL_OUT "No UST events binary detected." ++ plan_skip_all "No UST events binary detected." + fi + + # Need the number of snapshot to do. +diff --git a/tests/regression/tools/streaming/test_high_throughput_limits b/tests/regression/tools/streaming/test_high_throughput_limits +index 32c3f1f2b..f54178923 100755 +--- a/tests/regression/tools/streaming/test_high_throughput_limits ++++ b/tests/regression/tools/streaming/test_high_throughput_limits +@@ -38,7 +38,7 @@ NUM_TESTS=104 + source $TESTDIR/utils/utils.sh + + if [ ! -x "$TESTAPP_BIN" ]; then +- BAIL_OUT "No UST events binary detected." ++ plan_skip_all "No UST events binary detected." + fi + + function set_bw_limit +diff --git a/tests/regression/tools/streaming/test_ust b/tests/regression/tools/streaming/test_ust +index a5d5b5e92..e1dd98ee7 100755 +--- a/tests/regression/tools/streaming/test_ust ++++ b/tests/regression/tools/streaming/test_ust +@@ -34,7 +34,7 @@ NUM_TESTS=16 + source $TESTDIR/utils/utils.sh + + if [ ! -x "$TESTAPP_BIN" ]; then +- BAIL_OUT "No UST events binary detected." ++ plan_skip_all "No UST events binary detected." + fi + + function lttng_create_session_uri +diff --git a/tests/regression/tools/tracefile-limits/test_tracefile_count b/tests/regression/tools/tracefile-limits/test_tracefile_count +index 6ada8580f..7553c7d1f 100755 +--- a/tests/regression/tools/tracefile-limits/test_tracefile_count ++++ b/tests/regression/tools/tracefile-limits/test_tracefile_count +@@ -33,7 +33,7 @@ PAGE_SIZE=$(getconf PAGE_SIZE) + source $TESTDIR/utils/utils.sh + + if [ ! -x "$TESTAPP_BIN" ]; then +- BAIL_OUT "No UST events binary detected." ++ plan_skip_all "No UST events binary detected." + fi + + function enable_lttng_channel_count_limit () +diff --git a/tests/regression/tools/tracefile-limits/test_tracefile_size b/tests/regression/tools/tracefile-limits/test_tracefile_size +index 3dddbe613..1089487ff 100755 +--- a/tests/regression/tools/tracefile-limits/test_tracefile_size ++++ b/tests/regression/tools/tracefile-limits/test_tracefile_size +@@ -33,7 +33,7 @@ NUM_TESTS=66 + source $TESTDIR/utils/utils.sh + + if [ ! -x "$TESTAPP_BIN" ]; then +- BAIL_OUT "No UST events binary detected." ++ plan_skip_all "No UST events binary detected." + fi + + function enable_lttng_channel_size_limit () +diff --git a/tests/regression/tools/wildcard/test_event_wildcard b/tests/regression/tools/wildcard/test_event_wildcard +index 61ea67a72..921a2301d 100755 +--- a/tests/regression/tools/wildcard/test_event_wildcard ++++ b/tests/regression/tools/wildcard/test_event_wildcard +@@ -97,42 +97,47 @@ print_test_banner "$TEST_DESC" + + start_lttng_sessiond + +-diag "Test UST wildcard" +- + if [ ! -x "$TESTAPP_BIN" ]; then +- BAIL_OUT "No UST nevents binary detected." ++ skip_ust=0 ++else ++ skip_ust=1 + fi + +-EVENT_NAME="tp:tptest" ++skip $skip_ust "No UST nevents binary detected." $NUM_UST_TESTS || ++{ ++ diag "Test UST wildcard" + +-# non-matching +-test_event_wildcard ust 0 'tp:abc*' +-test_event_wildcard ust 0 '*abc' +-test_event_wildcard ust 0 '*z*' +-test_event_wildcard ust 0 '*\**' +-test_event_wildcard ust 0 '*\*' +-test_event_wildcard ust 0 '\**' +-test_event_wildcard ust 0 '*:*tpte*s' +-test_event_wildcard ust 0 'tp**tpTest' ++ EVENT_NAME="tp:tptest" + +-# matching +-test_event_wildcard ust 1 'tp:tp*' +-test_event_wildcard ust 1 '*' +-test_event_wildcard ust 1 'tp:tptest*' +-test_event_wildcard ust 1 '**' +-test_event_wildcard ust 1 '***' +-test_event_wildcard ust 1 '*tptest' +-test_event_wildcard ust 1 '**tptest' +-test_event_wildcard ust 1 '*tpte*' +-test_event_wildcard ust 1 '*tp*' +-test_event_wildcard ust 1 '*tp**' +-test_event_wildcard ust 1 '*:*tptest' +-test_event_wildcard ust 1 '*:*tpte*t' +-test_event_wildcard ust 1 't*p*:*t*e*s*t' +-test_event_wildcard ust 1 '*t*p*:*t*e*s*t*' +-test_event_wildcard ust 1 'tp*tptest' +-test_event_wildcard ust 1 'tp**tptest' +-test_event_wildcard ust 1 'tp*test' ++ # non-matching ++ test_event_wildcard ust 0 'tp:abc*' ++ test_event_wildcard ust 0 '*abc' ++ test_event_wildcard ust 0 '*z*' ++ test_event_wildcard ust 0 '*\**' ++ test_event_wildcard ust 0 '*\*' ++ test_event_wildcard ust 0 '\**' ++ test_event_wildcard ust 0 '*:*tpte*s' ++ test_event_wildcard ust 0 'tp**tpTest' ++ ++ # matching ++ test_event_wildcard ust 1 'tp:tp*' ++ test_event_wildcard ust 1 '*' ++ test_event_wildcard ust 1 'tp:tptest*' ++ test_event_wildcard ust 1 '**' ++ test_event_wildcard ust 1 '***' ++ test_event_wildcard ust 1 '*tptest' ++ test_event_wildcard ust 1 '**tptest' ++ test_event_wildcard ust 1 '*tpte*' ++ test_event_wildcard ust 1 '*tp*' ++ test_event_wildcard ust 1 '*tp**' ++ test_event_wildcard ust 1 '*:*tptest' ++ test_event_wildcard ust 1 '*:*tpte*t' ++ test_event_wildcard ust 1 't*p*:*t*e*s*t' ++ test_event_wildcard ust 1 '*t*p*:*t*e*s*t*' ++ test_event_wildcard ust 1 'tp*tptest' ++ test_event_wildcard ust 1 'tp**tptest' ++ test_event_wildcard ust 1 'tp*test' ++} + + if [ "$(id -u)" == "0" ]; then + isroot=1 +-- +2.17.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/0005-Tests-use-modprobe-to-test-for-the-presence-of-lttng.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/0005-Tests-use-modprobe-to-test-for-the-presence-of-lttng.patch new file mode 100644 index 000000000..16df3e610 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-tools/0005-Tests-use-modprobe-to-test-for-the-presence-of-lttng.patch @@ -0,0 +1,176 @@ +From 9bc81a446d0a3ea9a884739eee48d3f14db3283c Mon Sep 17 00:00:00 2001 +From: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> +Date: Wed, 28 Mar 2018 15:21:26 -0400 +Subject: [PATCH lttng-tools] Tests: use modprobe to test for the presence of + lttng-modules +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Backport [28702730192ae1ded06105c54c5dc] + +Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> +Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> +--- + tests/regression/tools/regen-metadata/test_kernel | 8 ++------ + tests/regression/tools/regen-statedump/test_kernel | 7 +------ + tests/regression/tools/snapshots/test_kernel | 9 +++------ + tests/regression/tools/snapshots/test_kernel_streaming | 8 ++------ + tests/regression/tools/streaming/test_kernel | 8 ++------ + tests/utils/utils.sh | 10 ++++++++++ + 6 files changed, 20 insertions(+), 30 deletions(-) + +diff --git a/tests/regression/tools/regen-metadata/test_kernel b/tests/regression/tools/regen-metadata/test_kernel +index fd139aeef..1849b9cd0 100755 +--- a/tests/regression/tools/regen-metadata/test_kernel ++++ b/tests/regression/tools/regen-metadata/test_kernel +@@ -28,12 +28,6 @@ NUM_TESTS=18 + + source $TESTDIR/utils/utils.sh + +-# LTTng kernel modules check +-out=`ls /lib/modules/$(uname -r)/extra | grep lttng` +-if [ -z "$out" ]; then +- BAIL_OUT "LTTng modules not detected." +-fi +- + function lttng_create_session_uri + { + # Create session with default path +@@ -91,6 +85,8 @@ fi + + skip $isroot "Root access is needed. Skipping all kernel streaming tests." $NUM_TESTS || + { ++ validate_lttng_modules_present ++ + start_lttng_relayd "-o $TRACE_PATH" + start_lttng_sessiond + modprobe lttng-test +diff --git a/tests/regression/tools/regen-statedump/test_kernel b/tests/regression/tools/regen-statedump/test_kernel +index 85afe76a1..50054eb07 100755 +--- a/tests/regression/tools/regen-statedump/test_kernel ++++ b/tests/regression/tools/regen-statedump/test_kernel +@@ -29,12 +29,6 @@ NUM_TESTS=11 + + source $TESTDIR/utils/utils.sh + +-# LTTng kernel modules check +-out=`ls /lib/modules/$(uname -r)/extra | grep lttng` +-if [ -z "$out" ]; then +- BAIL_OUT "LTTng modules not detected." +-fi +- + function test_kernel_local () + { + diag "Test kernel local with statedump regeneration" +@@ -64,6 +58,7 @@ fi + + skip $isroot "Root access is needed. Skipping all kernel streaming tests." $NUM_TESTS || + { ++ validate_lttng_modules_present + start_lttng_sessiond + modprobe lttng-test + +diff --git a/tests/regression/tools/snapshots/test_kernel b/tests/regression/tools/snapshots/test_kernel +index 886c4557a..ff563100b 100755 +--- a/tests/regression/tools/snapshots/test_kernel ++++ b/tests/regression/tools/snapshots/test_kernel +@@ -29,12 +29,6 @@ NUM_TESTS=2060 + + source $TESTDIR/utils/utils.sh + +-# LTTng kernel modules check +-out=`ls /lib/modules/$(uname -r)/extra | grep lttng` +-if [ -z "$out" ]; then +- BAIL_OUT "LTTng modules not detected." +-fi +- + function test_kernel_local_snapshot () + { + diag "Test local kernel snapshots" +@@ -241,6 +235,9 @@ fi + + skip $isroot "Root access is needed. Skipping all kernel snapshot tests." $NUM_TESTS || + { ++ ++ validate_lttng_modules_present ++ + start_lttng_sessiond + + #tests=( test_kernel_1000_local_snapshots ) +diff --git a/tests/regression/tools/snapshots/test_kernel_streaming b/tests/regression/tools/snapshots/test_kernel_streaming +index 7b96ef270..1d97519aa 100755 +--- a/tests/regression/tools/snapshots/test_kernel_streaming ++++ b/tests/regression/tools/snapshots/test_kernel_streaming +@@ -29,12 +29,6 @@ NUM_TESTS=61 + + source $TESTDIR/utils/utils.sh + +-# LTTng kernel modules check +-out=`ls /lib/modules/$(uname -r)/extra | grep lttng` +-if [ -z "$out" ]; then +- BAIL_OUT "LTTng modules not detected." +-fi +- + function snapshot_add_output () + { + local sess_name=$1 +@@ -169,6 +163,8 @@ fi + + skip $isroot "Root access is needed. Skipping all kernel streaming tests." $NUM_TESTS || + { ++ validate_lttng_modules_present ++ + start_lttng_relayd "-o $TRACE_PATH" + start_lttng_sessiond + +diff --git a/tests/regression/tools/streaming/test_kernel b/tests/regression/tools/streaming/test_kernel +index d54bcedf5..6bb23d9f5 100755 +--- a/tests/regression/tools/streaming/test_kernel ++++ b/tests/regression/tools/streaming/test_kernel +@@ -28,12 +28,6 @@ NUM_TESTS=10 + + source $TESTDIR/utils/utils.sh + +-# LTTng kernel modules check +-out=`ls /lib/modules/$(uname -r)/extra | grep lttng` +-if [ -z "$out" ]; then +- BAIL_OUT "LTTng modules not detected." +-fi +- + function lttng_create_session_uri + { + # Create session with default path +@@ -80,6 +74,8 @@ fi + + skip $isroot "Root access is needed. Skipping all kernel streaming tests." $NUM_TESTS || + { ++ validate_lttng_modules_present ++ + start_lttng_relayd "-o $TRACE_PATH" + start_lttng_sessiond + +diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh +index af63824ce..26e59e383 100644 +--- a/tests/utils/utils.sh ++++ b/tests/utils/utils.sh +@@ -125,6 +125,16 @@ function conf_proc_count() + echo + } + ++# Check if base lttng-modules are present. ++# Bail out on failure ++function validate_lttng_modules_present () ++{ ++ modprobe -n lttng-tracer 2>/dev/null ++ if [ $? -ne 0 ]; then ++ BAIL_OUT "LTTng modules not detected." ++ fi ++} ++ + function enable_kernel_lttng_event + { + local withtap="$1" +-- +2.17.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/0006-Tests-check-for-lttng-modules-presence.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/0006-Tests-check-for-lttng-modules-presence.patch new file mode 100644 index 000000000..e07c227f4 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-tools/0006-Tests-check-for-lttng-modules-presence.patch @@ -0,0 +1,28 @@ +From 92f93238f1df005aadc98e105c0dd0e04a5955a7 Mon Sep 17 00:00:00 2001 +From: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> +Date: Mon, 25 Mar 2019 14:24:51 -0400 +Subject: [2/2] tests: check for lttng-modules presence + +Upstream-status: Accepted [5da3fc8579a9f93ea4767729a107784bf2d034ae] +Backported to 2.11 and 2.10 + +Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> +--- + tests/regression/tools/notification/test_notification_kernel | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/regression/tools/notification/test_notification_kernel b/tests/regression/tools/notification/test_notification_kernel +index 6d7f256ae..e7368df26 100755 +--- a/tests/regression/tools/notification/test_notification_kernel ++++ b/tests/regression/tools/notification/test_notification_kernel +@@ -108,6 +108,7 @@ function kernel_test + } + + if [ "$(id -u)" == "0" ]; then ++ validate_lttng_modules_present + kernel_test + else + # Kernel tests are skipped. +-- +2.17.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/0007-Fix-getgrnam-is-not-MT-Safe-use-getgrnam_r.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/0007-Fix-getgrnam-is-not-MT-Safe-use-getgrnam_r.patch new file mode 100644 index 000000000..5437de26e --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-tools/0007-Fix-getgrnam-is-not-MT-Safe-use-getgrnam_r.patch @@ -0,0 +1,345 @@ +From 10e8001ad876d8cb3b5a17c7492e713bbc047975 Mon Sep 17 00:00:00 2001 +From: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> +Date: Thu, 28 Mar 2019 18:31:29 -0400 +Subject: [PATCH] Fix: getgrnam is not MT-Safe, use getgrnam_r + +Running the test suite under a Yocto musl build resulted in musl +coredump due to double freeing. + +We get the following backtraces: + +0 a_crash () at ./arch/x86_64/atomic_arch.h:108 +1 unmap_chunk (self=<optimized out>) at src/malloc/malloc.c:515 +2 free (p=<optimized out>) at src/malloc/malloc.c:526 +3 0x00007f46d9dc3849 in __getgrent_a (f=f@entry=0x7f46d9d1f7e0, gr=gr@entry=0x7f46d9e24460 <gr>, line=line@entry=0x7f46d9e26058 <line>, size=size@entry=0x7f46d92db550, mem=mem@entry=0x7f46d9e26050 <mem>, nmem=nmem@entry=0x7f46d92db558, res=0x7f46d92db548) at src/passwd/getgrent_a.c:45 +4 0x00007f46d9dc2e6b in __getgr_a (name=0x487242 "tracing", gid=gid@entry=0, gr=gr@entry=0x7f46d9e24460 <gr>, buf=buf@entry=0x7f46d9e26058 <line>, size=size@entry=0x7f46d92db550, mem=mem@entry=0x7f46d9e26050 <mem>, nmem=0x7f46d92db558, res=0x7f46d92db548) at src/passwd/getgr_a.c:30 +5 0x00007f46d9dc3733 in getgrnam (name=<optimized out>) at src/passwd/getgrent.c:37 +6 0x0000000000460b29 in utils_get_group_id (name=<optimized out>) at ../../../lttng-tools-2.10.6/src/common/utils.c:1241 +7 0x000000000044ee69 in thread_manage_health (data=<optimized out>) at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/main.c:4115 +8 0x00007f46d9de1541 in start (p=<optimized out>) at src/thread/pthread_create.c:195 +9 0x00007f46d9dee661 in __clone () at src/thread/x86_64/clone.s:22 + +From another run: + +0 a_crash () at ./arch/x86_64/atomic_arch.h:108 +1 unmap_chunk (self=<optimized out>) at src/malloc/malloc.c:515 +2 free (p=<optimized out>) at src/malloc/malloc.c:526 +3 0x00007f5abc210849 in __getgrent_a (f=f@entry=0x7f5abc2733e0, gr=gr@entry=0x7f5abc271460 <gr>, line=line@entry=0x7f5abc273058 <line>, size=size@entry=0x7f5abaef5510, mem=mem@entry=0x7f5abc273050 <mem>, nmem=nmem@entry=0x7f5abaef5518, res=0x7f5abaef5508) at src/passwd/getgrent_a.c:45 +4 0x00007f5abc20fe6b in __getgr_a (name=0x487242 "tracing", gid=gid@entry=0, gr=gr@entry=0x7f5abc271460 <gr>, buf=buf@entry=0x7f5abc273058 <line>, size=size@entry=0x7f5abaef5510, mem=mem@entry=0x7f5abc273050 <mem>, nmem=0x7f5abaef5518, res=0x7f5abaef5508) at src/passwd/getgr_a.c:30 +5 0x00007f5abc210733 in getgrnam (name=<optimized out>) at src/passwd/getgrent.c:37 +6 0x0000000000460b29 in utils_get_group_id (name=<optimized out>) at ../../../lttng-tools-2.10.6/src/common/utils.c:1241 +7 0x000000000042dee4 in notification_channel_socket_create () at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/notification-thread.c:238 +8 init_thread_state (state=0x7f5abaef5560, handle=0x7f5abbf9be40) at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/notification-thread.c:375 +9 thread_notification (data=0x7f5abbf9be40) at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/notification-thread.c:495 +10 0x00007f5abc22e541 in start (p=<optimized out>) at src/thread/pthread_create.c:195 +11 0x00007f5abc23b661 in __clone () at src/thread/x86_64/clone.s:22 + +The problem was easily reproducible (~6 crash on ~300 runs). A prototype fix +using mutex around the getgrnam yielded no crash in over 1000 runs. This +patch yielded the same results as the prototype fix. + +Unfortunately we cannot rely on a mutex in liblttng-ctl since we cannot +enforce the locking for the application using the lib. + +Use getgrnam_r instead. + +The previous implementation of utils_get_group_id returned the gid of +the root group (0) on error/not found. lttng_check_tracing_group needs +to know if an error/not found occured, returning the root group is not +enough. We now return the gid via the passed parameter. The caller is +responsible for either defaulting to the root group or propagating the +error. + +We also do not want to warn when used in liblttng-ctl context. We might +want to move the warning elsewhere in the future. For now, pass a bool +if we need to warn or not. + +Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> +--- + src/bin/lttng-consumerd/health-consumerd.c | 10 ++- + src/bin/lttng-relayd/health-relayd.c | 20 ++++-- + src/bin/lttng-sessiond/main.c | 24 +++++-- + src/bin/lttng-sessiond/notification-thread.c | 10 ++- + src/common/utils.c | 75 +++++++++++++++++--- + src/common/utils.h | 4 +- + src/lib/lttng-ctl/lttng-ctl.c | 8 +-- + 7 files changed, 122 insertions(+), 29 deletions(-) + +diff --git a/src/bin/lttng-consumerd/health-consumerd.c b/src/bin/lttng-consumerd/health-consumerd.c +index 1e2f31e4..6045401a 100644 +--- a/src/bin/lttng-consumerd/health-consumerd.c ++++ b/src/bin/lttng-consumerd/health-consumerd.c +@@ -184,8 +184,14 @@ void *thread_manage_health(void *data) + is_root = !getuid(); + if (is_root) { + /* lttng health client socket path permissions */ +- ret = chown(health_unix_sock_path, 0, +- utils_get_group_id(tracing_group_name)); ++ gid_t gid; ++ ++ ret = utils_get_group_id(tracing_group_name, true, &gid); ++ if (ret) { ++ gid = 0; /* Default to root group. */ ++ } ++ ++ ret = chown(health_unix_sock_path, 0, gid); + if (ret < 0) { + ERR("Unable to set group on %s", health_unix_sock_path); + PERROR("chown"); +diff --git a/src/bin/lttng-relayd/health-relayd.c b/src/bin/lttng-relayd/health-relayd.c +index ba996621..962e88c4 100644 +--- a/src/bin/lttng-relayd/health-relayd.c ++++ b/src/bin/lttng-relayd/health-relayd.c +@@ -105,8 +105,14 @@ static int create_lttng_rundir_with_perm(const char *rundir) + int is_root = !getuid(); + + if (is_root) { +- ret = chown(rundir, 0, +- utils_get_group_id(tracing_group_name)); ++ gid_t gid; ++ ++ ret = utils_get_group_id(tracing_group_name, true, &gid); ++ if (ret) { ++ gid = 0; /* Default to root group.*/ ++ } ++ ++ ret = chown(rundir, 0, gid); + if (ret < 0) { + ERR("Unable to set group on %s", rundir); + PERROR("chown"); +@@ -256,8 +262,14 @@ void *thread_manage_health(void *data) + is_root = !getuid(); + if (is_root) { + /* lttng health client socket path permissions */ +- ret = chown(health_unix_sock_path, 0, +- utils_get_group_id(tracing_group_name)); ++ gid_t gid; ++ ++ ret = utils_get_group_id(tracing_group_name, true, &gid); ++ if (ret) { ++ gid = 0; /* Default to root group */ ++ } ++ ++ ret = chown(health_unix_sock_path, 0, gid); + if (ret < 0) { + ERR("Unable to set group on %s", health_unix_sock_path); + PERROR("chown"); +diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c +index fa6fa483..49307064 100644 +--- a/src/bin/lttng-sessiond/main.c ++++ b/src/bin/lttng-sessiond/main.c +@@ -4112,8 +4112,14 @@ static void *thread_manage_health(void *data) + + if (is_root) { + /* lttng health client socket path permissions */ +- ret = chown(config.health_unix_sock_path.value, 0, +- utils_get_group_id(config.tracing_group_name.value)); ++ gid_t gid; ++ ++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid); ++ if (ret) { ++ gid = 0; /* Default to root group */ ++ } ++ ++ ret = chown(config.health_unix_sock_path.value, 0, &gid); + if (ret < 0) { + ERR("Unable to set group on %s", config.health_unix_sock_path.value); + PERROR("chown"); +@@ -5238,7 +5244,10 @@ static int set_permissions(char *rundir) + int ret; + gid_t gid; + +- gid = utils_get_group_id(config.tracing_group_name.value); ++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid); ++ if (ret) { ++ gid = 0; /* Default to root group */ ++ } + + /* Set lttng run dir */ + ret = chown(rundir, 0, gid); +@@ -5349,7 +5358,14 @@ static int set_consumer_sockets(struct consumer_data *consumer_data) + goto error; + } + if (is_root) { +- ret = chown(path, 0, utils_get_group_id(config.tracing_group_name.value)); ++ gid_t gid; ++ ++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid); ++ if (ret) { ++ gid = 0; /* Default to root group */ ++ } ++ ++ ret = chown(path, 0, gid); + if (ret < 0) { + ERR("Unable to set group on %s", path); + PERROR("chown"); +diff --git a/src/bin/lttng-sessiond/notification-thread.c b/src/bin/lttng-sessiond/notification-thread.c +index 92ac597f..18a264d9 100644 +--- a/src/bin/lttng-sessiond/notification-thread.c ++++ b/src/bin/lttng-sessiond/notification-thread.c +@@ -235,8 +235,14 @@ int notification_channel_socket_create(void) + } + + if (getuid() == 0) { +- ret = chown(sock_path, 0, +- utils_get_group_id(config.tracing_group_name.value)); ++ gid_t gid; ++ ++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid); ++ if (ret) { ++ gid = 0; /* Default to root group. */ ++ } ++ ++ ret = chown(sock_path, 0, gid); + if (ret) { + ERR("Failed to set the notification channel socket's group"); + ret = -1; +diff --git a/src/common/utils.c b/src/common/utils.c +index c0bb031e..778bc00f 100644 +--- a/src/common/utils.c ++++ b/src/common/utils.c +@@ -1231,24 +1231,77 @@ size_t utils_get_current_time_str(const char *format, char *dst, size_t len) + } + + /* +- * Return the group ID matching name, else 0 if it cannot be found. ++ * Return 0 on success and set *gid to the group_ID matching the passed name. ++ * Else -1 if it cannot be found or an error occurred. + */ + LTTNG_HIDDEN +-gid_t utils_get_group_id(const char *name) ++int utils_get_group_id(const char *name, bool warn, gid_t *gid) + { +- struct group *grp; ++ static volatile int warn_once; + +- grp = getgrnam(name); +- if (!grp) { +- static volatile int warn_once; ++ int ret; ++ long sys_len; ++ size_t len; ++ struct group grp; ++ struct group *result; ++ char *buffer = NULL; + +- if (!warn_once) { +- WARN("No tracing group detected"); +- warn_once = 1; ++ /* Get the system limit if it exists */ ++ sys_len = sysconf(_SC_GETGR_R_SIZE_MAX); ++ if (sys_len == -1) { ++ len = 1024; ++ } else { ++ len = (size_t) sys_len; ++ } ++ ++ buffer = malloc(len); ++ if (!buffer) { ++ PERROR("getgrnam_r malloc"); ++ ret = -1; ++ goto error; ++ } ++ ++ while ((ret = getgrnam_r(name, &grp, buffer, len, &result)) == ERANGE) ++ { ++ /* Buffer is not big enough, increase its size. */ ++ size_t new_len = 2 * len; ++ char *new_buffer = NULL; ++ if (new_len < len) { ++ ERR("getgrnam_r buffer size overflow"); ++ ret = -1; ++ goto error; ++ } ++ len = new_len; ++ new_buffer = realloc(buffer, len); ++ if (!new_buffer) { ++ PERROR("getgrnam_r realloc"); ++ ret = -1; ++ goto error; + } +- return 0; ++ buffer = new_buffer; ++ } ++ if (ret != 0) { ++ PERROR("getgrnam_r"); ++ ret = -1; ++ goto error; ++ } ++ ++ /* Group not found. */ ++ if (!result) { ++ ret = -1; ++ goto error; ++ } ++ ++ *gid = result->gr_gid; ++ ret = 0; ++ ++error: ++ free(buffer); ++ if (ret && warn && !warn_once) { ++ WARN("No tracing group detected"); ++ warn_once = 1; + } +- return grp->gr_gid; ++ return ret; + } + + /* +diff --git a/src/common/utils.h b/src/common/utils.h +index 18f19ef1..9c72431d 100644 +--- a/src/common/utils.h ++++ b/src/common/utils.h +@@ -22,6 +22,8 @@ + #include <unistd.h> + #include <stdint.h> + #include <getopt.h> ++#include <stdbool.h> ++#include <sys/types.h> + + #define KIBI_LOG2 10 + #define MEBI_LOG2 20 +@@ -52,7 +54,7 @@ int utils_get_count_order_u64(uint64_t x); + char *utils_get_home_dir(void); + char *utils_get_user_home_dir(uid_t uid); + size_t utils_get_current_time_str(const char *format, char *dst, size_t len); +-gid_t utils_get_group_id(const char *name); ++int utils_get_group_id(const char *name, bool warn, gid_t *gid); + char *utils_generate_optstring(const struct option *long_options, + size_t opt_count); + int utils_create_lock_file(const char *filepath); +diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c +index 2d84aad9..561b0bcf 100644 +--- a/src/lib/lttng-ctl/lttng-ctl.c ++++ b/src/lib/lttng-ctl/lttng-ctl.c +@@ -208,15 +208,13 @@ end: + LTTNG_HIDDEN + int lttng_check_tracing_group(void) + { +- struct group *grp_tracing; /* no free(). See getgrnam(3) */ +- gid_t *grp_list; ++ gid_t *grp_list, tracing_gid; + int grp_list_size, grp_id, i; + int ret = -1; + const char *grp_name = tracing_group; + + /* Get GID of group 'tracing' */ +- grp_tracing = getgrnam(grp_name); +- if (!grp_tracing) { ++ if (utils_get_group_id(grp_name, false, &tracing_gid)) { + /* If grp_tracing is NULL, the group does not exist. */ + goto end; + } +@@ -241,7 +239,7 @@ int lttng_check_tracing_group(void) + } + + for (i = 0; i < grp_list_size; i++) { +- if (grp_list[i] == grp_tracing->gr_gid) { ++ if (grp_list[i] == tracing_gid) { + ret = 1; + break; + } +-- +2.17.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest b/poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest index 705030ee5..dbb18820a 100755 --- a/poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest +++ b/poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest @@ -3,4 +3,4 @@ # test plan to raise ERRORs; this is just noise. makeargs="LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=$PWD top_builddir=$PWD" make -k -t all >/dev/null 2>&1 -exec make -s $makeargs check 2>/dev/null +exec make -k -s $makeargs check 2>/dev/null diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/x32.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/x32.patch index b1bb8e493..42cebf94a 100644 --- a/poky/meta/recipes-kernel/lttng/lttng-tools/x32.patch +++ b/poky/meta/recipes-kernel/lttng/lttng-tools/x32.patch @@ -1,11 +1,31 @@ Fix build for x32 -Upstream-Status: Pending Signed-off-by: Christopher Larson <chris_larson@mentor.com> ---- lttng-tools-2.6.0/src/bin/lttng/utils.c~ 2015-01-26 18:17:15.000000000 +0100 -+++ lttng-tools-2.6.0/src/bin/lttng/utils.c 2015-07-30 19:45:25.632045712 +0200 -@@ -130,7 +130,7 @@ +Fix build error of src/common/utils.c for x32. + +Upstream-Status: Submitted [https://github.com/lttng/lttng-tools/pull/150] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +diff --git a/src/bin/lttng/utils.c b/src/bin/lttng/utils.c +index 0e96ef0c..5c79c8c7 100644 +--- a/src/bin/lttng/utils.c ++++ b/src/bin/lttng/utils.c +@@ -158,7 +158,7 @@ unsigned int fls_u32(uint32_t x) + #define HAS_FLS_U32 + #endif + +-#if defined(__x86_64) ++#if defined(__x86_64) && !defined(__ILP32__) + static inline + unsigned int fls_u64(uint64_t x) + { +diff --git a/src/common/utils.c b/src/common/utils.c +index 08139e5e..3c389981 100644 +--- a/src/common/utils.c ++++ b/src/common/utils.c +@@ -1223,7 +1223,7 @@ static inline unsigned int fls_u32(uint32_t x) #define HAS_FLS_U32 #endif diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools_2.9.11.bb b/poky/meta/recipes-kernel/lttng/lttng-tools_2.10.6.bb index 5e3fc1aab..a3fabb20e 100644 --- a/poky/meta/recipes-kernel/lttng/lttng-tools_2.9.11.bb +++ b/poky/meta/recipes-kernel/lttng/lttng-tools_2.10.6.bb @@ -11,7 +11,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \ DEPENDS = "liburcu popt libxml2 util-linux" RDEPENDS_${PN} = "libgcc" -RDEPENDS_${PN}-ptest += "make perl bash gawk ${PN} babeltrace procps" +RDEPENDS_${PN}-ptest += "make perl bash gawk ${PN} babeltrace procps perl-module-overloading coreutils util-linux kmod" +RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" +RDEPENDS_${PN}-ptest_append_libc-musl = " musl-utils" # babelstats.pl wants getopt-long RDEPENDS_${PN}-ptest += "perl-module-getopt-long" @@ -22,20 +24,25 @@ PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \ PACKAGECONFIG ??= "lttng-ust" PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native" PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust" -PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod" +PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod" PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native" -PACKAGECONFIG_remove_libc-musl = "lttng-ust" -PACKAGECONFIG_remove_riscv64 = "lttng-ust" +PACKAGECONFIG_remove_arc = "lttng-ust" SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ file://x32.patch \ file://run-ptest \ - file://0001-Allow-multiple-attempts-to-connect-to-relayd.patch \ file://lttng-sessiond.service \ + file://0001-Fix-tests-link-libpause_consumer-on-liblttng-ctl.patch \ + file://0002-Fix-test-skip-test_getcpu_override-on-single-thread-.patch \ + file://0003-Fix-test-unit-the-tree-origin-can-be-a-symlink-itsel.patch \ + file://0004-Skip-when-testapp-is-not-present.patch\ + file://0005-Tests-use-modprobe-to-test-for-the-presence-of-lttng.patch \ + file://0006-Tests-check-for-lttng-modules-presence.patch \ + file://0007-Fix-getgrnam-is-not-MT-Safe-use-getgrnam_r.patch \ " -SRC_URI[md5sum] = "f9c2b35810790f5bd802483eb14cb301" -SRC_URI[sha256sum] = "2c45144acf8dc6fcd655be7370a022e9c03c8b7419af489c9c2e786a335006db" +SRC_URI[md5sum] = "e88c521b5da6bb48a8187af633336ecc" +SRC_URI[sha256sum] = "f05df52bbebf8ce88d1b29e9e98cfc957d2ed738a345118018237ebdb581537c" inherit autotools ptest pkgconfig useradd python3-dir manpages systemd @@ -63,11 +70,11 @@ do_install_append () { } do_install_ptest () { - for f in Makefile tests/Makefile tests/utils/utils.sh ; do + for f in Makefile tests/Makefile tests/utils/utils.sh tests/regression/tools/save-load/load-42*.lttng tests/regression/tools/save-load/configuration/load-42*.lttng ; do install -D "${B}/$f" "${D}${PTEST_PATH}/$f" done - for f in config/tap-driver.sh config/test-driver ; do + for f in config/tap-driver.sh config/test-driver src/common/config/session.xsd src/common/mi-lttng-3.0.xsd; do install -D "${S}/$f" "${D}${PTEST_PATH}/$f" done @@ -87,10 +94,37 @@ do_install_ptest () { install -d "${D}${PTEST_PATH}/tests/$d" find "${B}/tests/$d" -maxdepth 1 -executable -type f \ -exec install -t "${D}${PTEST_PATH}/tests/$d" {} + + # Take all .py scripts for tests using the python bindings. + find "${B}/tests/$d" -maxdepth 1 -type f -name "*.py" \ + -exec install -t "${D}${PTEST_PATH}/tests/$d" {} + test -r "${B}/tests/$d/Makefile" && \ install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile" done + for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do + for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do + cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f + case $f in + *.so) + install -d ${D}${PTEST_PATH}/tests/$d/ + ln -s ../$f ${D}${PTEST_PATH}/tests/$d/$f + # Remove any rpath/runpath to pass QA check. + chrpath --delete ${D}${PTEST_PATH}/tests/$d/$f + ;; + esac + done + done + + # + # Use the versioned libs of liblttng-ust-dl. + # + ustdl="${D}${PTEST_PATH}/tests/regression/ust/ust-dl/test_ust-dl.py" + if [ -e $ustdl ]; then + sed -i -e 's!:liblttng-ust-dl.so!:liblttng-ust-dl.so.0!' $ustdl + fi + + install ${B}/tests/unit/ini_config/sample.ini ${D}${PTEST_PATH}/tests/unit/ini_config/ + # We shouldn't need to build anything in tests/regression/tools sed -i -e 's!^SUBDIRS = tools !SUBDIRS = !' \ "${D}${PTEST_PATH}/tests/regression/Makefile" @@ -105,21 +139,20 @@ do_install_ptest () { -e 's/^all-am:.*/all-am:/' \ {} + - # These objects trigger [rpaths] QA checks; the test harness - # skips the associated tests if they're missing, so delete - # them. - objs="" - objs="$objs regression/ust/ust-dl/libbar.so" - objs="$objs regression/ust/ust-dl/libfoo.so" - for obj in $objs ; do - rm -f "${D}${PTEST_PATH}/tests/${obj}" - done - find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ touch -r "${B}/Makefile" {} + + # + # Need to stop generated binaries from rebuilding by removing their source dependencies + # + sed -e 's#\(^test.*OBJECTS.=\)#disable\1#g' \ + -e 's#\(^test.*DEPENDENCIES.=\)#disable\1#g' \ + -e 's#\(^test.*SOURCES.=\)#disable\1#g' \ + -e 's#\(^test.*LDADD.=\)#disable\1#g' \ + -i ${D}${PTEST_PATH}/tests/unit/Makefile + # Substitute links to installed binaries. - for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd ; do + for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd lttng-crash; do exedir="${D}${PTEST_PATH}/src/bin/${prog}" install -d "$exedir" case "$prog" in diff --git a/poky/meta/recipes-kernel/lttng/lttng-ust/0001-compat-work-around-broken-_SC_NPROCESSORS_CONF-on-MU.patch b/poky/meta/recipes-kernel/lttng/lttng-ust/0001-compat-work-around-broken-_SC_NPROCESSORS_CONF-on-MU.patch new file mode 100644 index 000000000..5c4bd3672 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-ust/0001-compat-work-around-broken-_SC_NPROCESSORS_CONF-on-MU.patch @@ -0,0 +1,109 @@ +From 5de7c318804a7b1edce8562d4891b4c74aac0677 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <mjeanson@efficios.com> +Date: Wed, 20 Mar 2019 11:07:35 -0400 +Subject: [PATCH] compat: work around broken _SC_NPROCESSORS_CONF on MUSL libc + +On MUSL libc the _SC_NPROCESSORS_CONF sysconf will report the number of +CPUs allocated to the task based on the affinity mask instead of the +total number of CPUs configured on the system. + +Upstream-Status: Accepted [1] [5de7c318804a7b1edce8562d4891b4c74aac0677] +[1] https://lists.lttng.org/pipermail/lttng-dev/2019-March/028616.html + +Signed-off-by: Michael Jeanson <mjeanson@efficios.com> +Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> +--- + libringbuffer/smp.c | 66 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 66 insertions(+) + +diff --git a/libringbuffer/smp.c b/libringbuffer/smp.c +index 9e7114be..656a75da 100644 +--- a/libringbuffer/smp.c ++++ b/libringbuffer/smp.c +@@ -2,6 +2,7 @@ + * libringbuffer/smp.c + * + * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> ++ * Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -26,6 +27,7 @@ + + int __num_possible_cpus; + ++#if (defined(__GLIBC__) || defined( __UCLIBC__)) + void _get_num_possible_cpus(void) + { + int result; +@@ -43,3 +45,67 @@ void _get_num_possible_cpus(void) + return; + __num_possible_cpus = result; + } ++ ++#else ++ ++/* ++ * The MUSL libc implementation of the _SC_NPROCESSORS_CONF sysconf does not ++ * return the number of configured CPUs in the system but relies on the cpu ++ * affinity mask of the current task. ++ * ++ * So instead we use a strategy similar to GLIBC's, counting the cpu ++ * directories in "/sys/devices/system/cpu" and fallback on the value from ++ * sysconf if it fails. ++ */ ++ ++#include <dirent.h> ++#include <limits.h> ++#include <stdlib.h> ++#include <string.h> ++#include <sys/types.h> ++ ++#define __max(a,b) ((a)>(b)?(a):(b)) ++ ++void _get_num_possible_cpus(void) ++{ ++ int result, count = 0; ++ DIR *cpudir; ++ struct dirent *entry; ++ ++ cpudir = opendir("/sys/devices/system/cpu"); ++ if (cpudir == NULL) ++ goto end; ++ ++ /* ++ * Count the number of directories named "cpu" followed by and ++ * integer. This is the same strategy as glibc uses. ++ */ ++ while ((entry = readdir(cpudir))) { ++ if (entry->d_type == DT_DIR && ++ strncmp(entry->d_name, "cpu", 3) == 0) { ++ ++ char *endptr; ++ unsigned long cpu_num; ++ ++ cpu_num = strtoul(entry->d_name + 3, &endptr, 10); ++ if ((cpu_num < ULONG_MAX) && (endptr != entry->d_name + 3) ++ && (*endptr == '\0')) { ++ count++; ++ } ++ } ++ } ++ ++end: ++ /* ++ * Get the sysconf value as a fallback. Keep the highest number. ++ */ ++ result = __max(sysconf(_SC_NPROCESSORS_CONF), count); ++ ++ /* ++ * If both methods failed, don't store the value. ++ */ ++ if (result < 1) ++ return; ++ __num_possible_cpus = result; ++} ++#endif +-- +2.17.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-ust_2.10.3.bb b/poky/meta/recipes-kernel/lttng/lttng-ust_2.10.3.bb index b5c43200d..d54610412 100644 --- a/poky/meta/recipes-kernel/lttng/lttng-ust_2.10.3.bb +++ b/poky/meta/recipes-kernel/lttng/lttng-ust_2.10.3.bb @@ -8,7 +8,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \ file://snprintf/snprintf.c;endline=32;md5=d3d544959d8a3782b2e07451be0a903c \ file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44" -inherit autotools lib_package manpages +PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \ + am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \ + PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ +" + +inherit autotools lib_package manpages python3native DEPENDS = "liburcu util-linux" RDEPENDS_${PN}-bin = "python3-core" @@ -22,13 +27,20 @@ PE = "2" SRC_URI = "https://lttng.org/files/lttng-ust/lttng-ust-${PV}.tar.bz2 \ file://lttng-ust-doc-examples-disable.patch \ + file://0001-compat-work-around-broken-_SC_NPROCESSORS_CONF-on-MU.patch \ " + SRC_URI[md5sum] = "ffcfa8c1ba9a52f002d240e936e9afa2" SRC_URI[sha256sum] = "9e8420f90d5f963f7aa32bc6d44adc1e491136f687c69ffb7a3075d33b40852b" CVE_PRODUCT = "ust" PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native" +PACKAGECONFIG[python3-agent] = "--enable-python-agent ${PYTHON_OPTION}, --disable-python-agent, python3, python3" + +FILES_${PN} += " ${PYTHON_SITEPACKAGES_DIR}/*" +FILES_${PN}-staticdev += " ${PYTHON_SITEPACKAGES_DIR}/*.a" +FILES_${PN}-dev += " ${PYTHON_SITEPACKAGES_DIR}/*.la" do_install_append() { # Patch python tools to use Python 3; they should be source compatible, but diff --git a/poky/meta/recipes-kernel/perf/perf.bb b/poky/meta/recipes-kernel/perf/perf.bb index bae494875..5acdcfb9f 100644 --- a/poky/meta/recipes-kernel/perf/perf.bb +++ b/poky/meta/recipes-kernel/perf/perf.bb @@ -80,6 +80,7 @@ EXTRA_OEMAKE = '\ NO_GTK2=1 \ ${PACKAGECONFIG_CONFARGS} \ TMPDIR="${B}" \ + LIBUNWIND_DIR=${STAGING_EXECPREFIXDIR} \ ' EXTRA_OEMAKE += "\ @@ -234,6 +235,10 @@ do_configure_prepend () { for s in `find ${S}/tools/perf/scripts/python/ -name '*.py'`; do sed -i 's,/usr/bin/python2,/usr/bin/env python,' "${s}" done + + # unistd.h can be out of sync between libc-headers and the captured version in the perf source + # so we copy it from the sysroot unistd.h to the perf unistd.h + cp ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h } python do_package_prepend() { @@ -254,7 +259,8 @@ RDEPENDS_${PN}-tests =+ "python" RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}" RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" -FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent" +FILES_SOLIBSDEV = "" +FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent ${libdir}/libperf-jvmti.so" FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive" FILES_${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests" FILES_${PN}-python = " \ diff --git a/poky/meta/recipes-kernel/powertop/powertop_2.9.bb b/poky/meta/recipes-kernel/powertop/powertop_2.10.bb index 4fe5447a0..d943ba9f6 100644 --- a/poky/meta/recipes-kernel/powertop/powertop_2.9.bb +++ b/poky/meta/recipes-kernel/powertop/powertop_2.10.bb @@ -6,11 +6,11 @@ DEPENDS = "ncurses libnl pciutils" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" -SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-v${PV}.tar.gz \ +SRC_URI = "http://01.org/sites/default/files/downloads/powertop-v${PV}.tar.gz \ " -SRC_URI[md5sum] = "583518c5c4434c6e9b9c58c3920950b6" -SRC_URI[sha256sum] = "aa7fb7d8e9a00f05e7d8a7a2866d85929741e0d03a5bf40cab22d2021c959250" +SRC_URI[md5sum] = "a69bd55901cf919cc564187402ea2c9c" +SRC_URI[sha256sum] = "d3b7459eaba7d01c8841dd33a3b4d369416c01e9bd8951b0d88234cf18fe4a75" UPSTREAM_CHECK_URI = "https://01.org/powertop/downloads" UPSTREAM_CHECK_REGEX = "powertop-[v]?(?P<pver>\d+(\.\d+)+)\.tar" diff --git a/poky/meta/recipes-kernel/sysprof/files/0001-fix-non-literal-format-string-issues.patch b/poky/meta/recipes-kernel/sysprof/files/0001-fix-non-literal-format-string-issues.patch deleted file mode 100644 index 38f9f5f66..000000000 --- a/poky/meta/recipes-kernel/sysprof/files/0001-fix-non-literal-format-string-issues.patch +++ /dev/null @@ -1,34 +0,0 @@ -From de13d1f908335cc882c447e4d7c4360b9e5da190 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 6 Sep 2018 17:49:44 -0700 -Subject: [PATCH] fix non-literal format string issues - -clang errors out when using -Werror=format-nonliteral -since the definition of g_strdup_vprintf() from glib-2.0 -is using va_list and clangs still warns where as -gcc doesn't do that for va_list arguments - -Fixes -src/sp-window.c:96:27: error: format string is not a string literal [-Werror,-Wformat-nonliteral] -| str = g_strdup_vprintf (format, args); -| ^~~~~~ - -Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/sysprof/merge_requests/6] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/sp-window.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/sp-window.c b/src/sp-window.c -index 4dfac2d..aff4779 100644 ---- a/src/sp-window.c -+++ b/src/sp-window.c -@@ -80,7 +80,7 @@ static guint signals [N_SIGNALS]; - static void sp_window_set_profiler (SpWindow *self, - SpProfiler *profiler); - --static void -+static G_GNUC_PRINTF(3, 4) void - sp_window_notify_user (SpWindow *self, - GtkMessageType message_type, - const gchar *format, diff --git a/poky/meta/recipes-kernel/sysprof/files/wordsize.patch b/poky/meta/recipes-kernel/sysprof/files/wordsize.patch deleted file mode 100644 index d65b13a68..000000000 --- a/poky/meta/recipes-kernel/sysprof/files/wordsize.patch +++ /dev/null @@ -1,38 +0,0 @@ -Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/sysprof/merge_requests/5] -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From bc7e3e27c28d0bab8bea72f2314191532b2e7840 Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@intel.com> -Date: Fri, 7 Sep 2018 01:30:09 +0100 -Subject: [PATCH] capture: use size of void* instead of glibc-specific - __WORDSIZE - -__WORDSIZE is glibc-specific so sp-capture-types.h doesn't work with musl. ---- - lib/capture/sp-capture-types.h | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/lib/capture/sp-capture-types.h b/lib/capture/sp-capture-types.h -index 48fcfb8..1d6cd1d 100644 ---- a/lib/capture/sp-capture-types.h -+++ b/lib/capture/sp-capture-types.h -@@ -32,12 +32,14 @@ G_BEGIN_DECLS - #define SP_CAPTURE_MAGIC (GUINT32_TO_LE(0xFDCA975E)) - #define SP_CAPTURE_ALIGN (sizeof(SpCaptureAddress)) - --#if __WORDSIZE == 64 -+#if GLIB_SIZEOF_VOID_P == 8 - # define SP_CAPTURE_JITMAP_MARK G_GUINT64_CONSTANT(0xE000000000000000) - # define SP_CAPTURE_ADDRESS_FORMAT "0x%016lx" --#else -+#elif GLIB_SIZEOF_VOID_P == 4 - # define SP_CAPTURE_JITMAP_MARK G_GUINT64_CONSTANT(0xE0000000) - # define SP_CAPTURE_ADDRESS_FORMAT "0x%016llx" -+#else -+#error Unknown GLIB_SIZEOF_VOID_P - #endif - - #define SP_CAPTURE_CURRENT_TIME (sp_clock_get_current_time()) --- -2.11.0 - diff --git a/poky/meta/recipes-kernel/sysprof/sysprof_3.30.0.bb b/poky/meta/recipes-kernel/sysprof/sysprof_3.30.2.bb index 19dcf25a5..24e49cb0d 100644 --- a/poky/meta/recipes-kernel/sysprof/sysprof_3.30.0.bb +++ b/poky/meta/recipes-kernel/sysprof/sysprof_3.30.2.bb @@ -5,19 +5,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ file://src/sp-application.c;endline=17;md5=40e55577ef122c88fe20052acda64875" GNOMEBASEBUILDCLASS = "meson" -inherit gnomebase gettext systemd upstream-version-is-even +inherit gnomebase gettext systemd upstream-version-is-even gsettings DEPENDS = "glib-2.0 libxml2-native glib-2.0-native" -SRC_URI[archive.md5sum] = "ae896a8a2364e18c07fafa9573202f59" -SRC_URI[archive.sha256sum] = "29cd2c4be277f00698dce48259219557c4fddc2c01254b8fac95900a8c663f63" +SRC_URI[archive.md5sum] = "80cb47906eced2e7b9976bf00deec323" +SRC_URI[archive.sha256sum] = "e90878e5a509bd79d170a7a51d47cc5508ab1363afaf0d97654373dfd9c8ba0b" SRC_URI += " \ file://define-NT_GNU_BUILD_ID.patch \ file://0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch \ - file://wordsize.patch \ - file://0001-fix-non-literal-format-string-issues.patch \ " -RECIPE_NO_UPDATE_REASON = "Waiting for resolution of https://bugzilla.gnome.org/show_bug.cgi?id=794625" PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)}" PACKAGECONFIG[gtk] = "-Denable_gtk=true,-Denable_gtk=false,gtk+3" diff --git a/poky/meta/recipes-kernel/systemtap/systemtap/0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch b/poky/meta/recipes-kernel/systemtap/systemtap/0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch index 9f11648fe..e2f8b3b05 100644 --- a/poky/meta/recipes-kernel/systemtap/systemtap/0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch +++ b/poky/meta/recipes-kernel/systemtap/systemtap/0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch @@ -14,49 +14,24 @@ Signed-off-by: Saul Wold <sgw@linux.intel.com> staprun/Makefile.am | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) -diff --git a/stapbpf/Makefile.am b/stapbpf/Makefile.am -index 421b044ef..f7daeb2b2 100644 ---- a/stapbpf/Makefile.am -+++ b/stapbpf/Makefile.am -@@ -39,11 +39,11 @@ git_version.stamp ../git_version.h: +Index: git/stapbpf/Makefile.am +=================================================================== +--- git.orig/stapbpf/Makefile.am ++++ git/stapbpf/Makefile.am +@@ -41,10 +41,10 @@ # Why the "id -u" condition? This way, an unprivileged user can run # make install, and have "sudo stap ...." or "sudo stapbpf ...." work later. -install-exec-hook: -- if [ `id -u` -eq 0 ]; then \ -- getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr; \ -- getent group stapusr >/dev/null \ -- && chgrp stapusr "$(DESTDIR)$(bindir)/stapbpf" \ +- if [ `id -u` -eq 0 ] && (getent group stapusr >/dev/null \ +- || groupadd -f -g 156 -r stapusr); then \ +- chgrp stapusr "$(DESTDIR)$(bindir)/stapbpf" \ - && chmod 04110 "$(DESTDIR)$(bindir)/stapbpf"; \ - fi +#install-exec-hook: -+# if [ `id -u` -eq 0 ]; then \ -+# getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr; \ -+# getent group stapusr >/dev/null \ -+# && chgrp stapusr "$(DESTDIR)$(bindir)/stapbpf" \ ++## if [ `id -u` -eq 0 ] && (getent group stapusr >/dev/null \ ++## || groupadd -f -g 156 -r stapusr); then \ ++## chgrp stapusr "$(DESTDIR)$(bindir)/stapbpf" \ +# && chmod 04110 "$(DESTDIR)$(bindir)/stapbpf"; \ +# fi endif -diff --git a/staprun/Makefile.am b/staprun/Makefile.am -index 4073aa01c..2925e34c3 100644 ---- a/staprun/Makefile.am -+++ b/staprun/Makefile.am -@@ -72,9 +72,9 @@ git_version.stamp ../git_version.h: - - # Why the "id -u" condition? This way, an unprivileged user can run - # make install, and have "sudo stap ...." or "sudo staprun ...." work later. --install-exec-hook: -- if [ `id -u` -eq 0 ]; then \ -- getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr; \ -- getent group stapusr >/dev/null && chgrp stapusr "$(DESTDIR)$(bindir)/staprun"; \ -- chmod 04110 "$(DESTDIR)$(bindir)/staprun"; \ -- fi -+#install-exec-hook: -+# if [ `id -u` -eq 0 ]; then \ -+# getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr; \ -+# getent group stapusr >/dev/null && chgrp stapusr "$(DESTDIR)$(bindir)/staprun"; \ -+# chmod 04110 "$(DESTDIR)$(bindir)/staprun"; \ -+# fi --- -2.11.0 - diff --git a/poky/meta/recipes-kernel/systemtap/systemtap_git.inc b/poky/meta/recipes-kernel/systemtap/systemtap_git.inc index 274fcde5c..54de72266 100644 --- a/poky/meta/recipes-kernel/systemtap/systemtap_git.inc +++ b/poky/meta/recipes-kernel/systemtap/systemtap_git.inc @@ -1,6 +1,6 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRCREV = "428f84e9e656bce71018e8902e4edb8aacafcc0e" +SRCREV = "90ff34ac0506f0d5440393a4c78565f6aaf9b726" PV = "4.0" SRC_URI = "git://sourceware.org/git/systemtap.git \ |