Skip to contentSkip to conversation

Patch review

PATCH New Anuj Mittal 1 participant 18 messages May 11, 2022

lore
Share & tools
lore
#12 lore raw

PATCH 12/17 lttng-modules: update to 2.13.1

In reply to Anuj Mittal

From: Bruce Ashfield <[email protected]>

Bumping lttng-modules to 2.13.1, which fixes the build against 5.16+ kernels.

We drop two previously backported patches.

The following commits are part of this update:

8c0aec7e Version 2.13.1
533556cd fix: mm: move kvmalloc-related functions to slab.h (v5.16) 2f0087ab fix: block: don't call blk_status_to_errno in blk_update_request (v5.16) 9b092ff2 fix: KVM: MMU: change tracepoints arguments to kvm_page_fault (v5.16) 036297af fix: KVM: x86: Get exit_reason as part of kvm_x86_ops.get_exit_info (v5.16) a029f2a3 fix: isystem: delete global -isystem compile option (v5.16) d82de6f3 fix: block: move block-related definitions out of fs.h (v5.16) 4fabf854 Fix: syscall tracing: missing trigger actions
38b35aff Warn on event registration/unregistration failure
e26f740b fix: implicit-int error in EXPORT_SYMBOL_GPL
c570be0d fix: Revert "Makefile: Enable -Wimplicit-fallthrough for Clang" (v5.15) 8be4c8a3 fix: cpu/hotplug: Remove deprecated CPU-hotplug functions. (v5.15)

(cherry picked from commit 2edeebed4ff172f77e337af82fc1cddc681881df)
---
 ...Remove-deprecated-CPU-hotplug-functi.patch | 394 ---------
 ...ile-Enable-Wimplicit-fallthrough-for.patch | 829 ------------------
 ...ules_2.13.0.bb => lttng-modules_2.13.1.bb} |   4 +-
 3 files changed, 1 insertion(+), 1226 deletions(-)
 delete mode 100644 meta/recipes-kernel/lttng/lttng-modules/0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch
 delete mode 100644 meta/recipes-kernel/lttng/lttng-modules/0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch
 rename meta/recipes-kernel/lttng/{lttng-modules_2.13.0.bb => lttng-modules_2.13.1.bb} (86%)
meta/recipes-kernel/lttng/lttng-modules/0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch deleted +0 -394
deleted file mode 100644
index 4e52e5f122..0000000000
@@ -1,394 +0,0 @@
-From 8be4c8a38ee1e297578e094a6e4c143ec5259aba Mon Sep 17 00:00:00 2001
-From: Michael Jeanson <[email protected]>
-Date: Mon, 13 Sep 2021 12:00:38 -0400
-Subject: [PATCH 1/2] fix: cpu/hotplug: Remove deprecated CPU-hotplug
- functions. (v5.15)
-
-The CPU-hotplug functions get|put_online_cpus() were deprecated in v4.13
-and removed in v5.15.
-
-See upstream commits :
-
-commit 8c854303ce0e38e5bbedd725ff39da7e235865d8
-Author: Sebastian Andrzej Siewior <[email protected]>
-Date:   Tue Aug 3 16:16:21 2021 +0200
-
-    cpu/hotplug: Remove deprecated CPU-hotplug functions.
-
-    No users in tree use the deprecated CPU-hotplug functions anymore.
-
-    Remove them.
-
-Introduced in v4.13 :
-
-  commit 8f553c498e1772cccb39a114da4a498d22992758
-  Author: Thomas Gleixner <[email protected]>
-  Date:   Wed May 24 10:15:12 2017 +0200
-
-    cpu/hotplug: Provide cpus_read|write_[un]lock()
-
-    The counting 'rwsem' hackery of get|put_online_cpus() is going to be
-    replaced by percpu rwsem.
-
-    Rename the functions to make it clear that it's locking and not some
-    refcount style interface. These new functions will be used for the
-    preparatory patches which make the code ready for the percpu rwsem
-    conversion.
-
-    Rename all instances in the cpu hotplug code while at it.
-
-Upstream-Status: backport [https://git.lttng.org/?p=lttng-modules.git;a=commit;h=ffcc873470121ef1ebb110df3d9038a38d9cb7cb]
-
-Change-Id: I5a37cf5afc075a402b7347989fac637dfa60a1ed
-Signed-off-by: Michael Jeanson <[email protected]>
-Signed-off-by: Mathieu Desnoyers <[email protected]>
----
- include/wrapper/cpu.h                     | 44 +++++++++++++++++++++++
- src/lib/ringbuffer/ring_buffer_backend.c  |  8 ++---
- src/lib/ringbuffer/ring_buffer_frontend.c | 17 ++++-----
- src/lib/ringbuffer/ring_buffer_iterator.c | 15 ++++----
- src/lttng-context-perf-counters.c         | 11 +++---
- src/lttng-statedump-impl.c                |  6 ++--
- 6 files changed, 74 insertions(+), 27 deletions(-)
- create mode 100644 include/wrapper/cpu.h
-
-diff --git a/include/wrapper/cpu.h b/include/wrapper/cpu.h
-new file mode 100644
-index 00000000..cbee1962
---- /dev/null
-+++ b/include/wrapper/cpu.h
-@@ -0,0 +1,44 @@
-+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
-+ *
-+ * wrapper/cpu.h
-+ *
-+ * Copyright (C) 2021 Michael Jeanson <[email protected]>
-+ */
-+
-+#ifndef _LTTNG_WRAPPER_CPU_H
-+#define _LTTNG_WRAPPER_CPU_H
-+
-+#include <linux/cpu.h>
-+#include <lttng/kernel-version.h>
-+
-+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0))
-+
-+static inline
-+void lttng_cpus_read_lock(void)
-+{
-+	cpus_read_lock();
-+}
-+
-+static inline
-+void lttng_cpus_read_unlock(void)
-+{
-+	cpus_read_unlock();
-+}
-+
-+#else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0) */
-+
-+static inline
-+void lttng_cpus_read_lock(void)
-+{
-+	get_online_cpus();
-+}
-+
-+static inline
-+void lttng_cpus_read_unlock(void)
-+{
-+	put_online_cpus();
-+}
-+
-+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0) */
-+
-+#endif /* _LTTNG_WRAPPER_CPU_H */
-diff --git a/src/lib/ringbuffer/ring_buffer_backend.c b/src/lib/ringbuffer/ring_buffer_backend.c
-index 26efb2bc..9a339be0 100644
---- a/src/lib/ringbuffer/ring_buffer_backend.c
-+++ b/src/lib/ringbuffer/ring_buffer_backend.c
-@@ -12,10 +12,10 @@
- #include <linux/delay.h>
- #include <linux/errno.h>
- #include <linux/slab.h>
--#include <linux/cpu.h>
- #include <linux/mm.h>
- #include <linux/vmalloc.h>
- 
-+#include <wrapper/cpu.h>
- #include <wrapper/mm.h>
- #include <wrapper/vmalloc.h>	/* for wrapper_vmalloc_sync_mappings() */
- #include <ringbuffer/config.h>
-@@ -445,14 +445,14 @@ int channel_backend_init(struct channel_backend *chanb,
- 			chanb->cpu_hp_notifier.priority = 5;
- 			register_hotcpu_notifier(&chanb->cpu_hp_notifier);
- 
--			get_online_cpus();
-+			lttng_cpus_read_lock();
- 			for_each_online_cpu(i) {
- 				ret = lib_ring_buffer_create(per_cpu_ptr(chanb->buf, i),
- 							 chanb, i);
- 				if (ret)
- 					goto free_bufs;	/* cpu hotplug locked */
- 			}
--			put_online_cpus();
-+			lttng_cpus_read_unlock();
- #else
- 			for_each_possible_cpu(i) {
- 				ret = lib_ring_buffer_create(per_cpu_ptr(chanb->buf, i),
-@@ -485,7 +485,7 @@ free_bufs:
- 		 */
- #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
- #ifdef CONFIG_HOTPLUG_CPU
--		put_online_cpus();
-+		lttng_cpus_read_unlock();
- 		unregister_hotcpu_notifier(&chanb->cpu_hp_notifier);
- #endif
- #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
-diff --git a/src/lib/ringbuffer/ring_buffer_frontend.c b/src/lib/ringbuffer/ring_buffer_frontend.c
-index e9056118..87a575d0 100644
---- a/src/lib/ringbuffer/ring_buffer_frontend.c
-+++ b/src/lib/ringbuffer/ring_buffer_frontend.c
-@@ -48,6 +48,7 @@
- #include <ringbuffer/iterator.h>
- #include <ringbuffer/nohz.h>
- #include <wrapper/atomic.h>
-+#include <wrapper/cpu.h>
- #include <wrapper/kref.h>
- #include <wrapper/percpu-defs.h>
- #include <wrapper/timer.h>
-@@ -724,7 +725,7 @@ static void channel_unregister_notifiers(struct lttng_kernel_ring_buffer_channel
- 			int cpu;
- 
- #ifdef CONFIG_HOTPLUG_CPU
--			get_online_cpus();
-+			lttng_cpus_read_lock();
- 			chan->cpu_hp_enable = 0;
- 			for_each_online_cpu(cpu) {
- 				struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
-@@ -732,7 +733,7 @@ static void channel_unregister_notifiers(struct lttng_kernel_ring_buffer_channel
- 				lib_ring_buffer_stop_switch_timer(buf);
- 				lib_ring_buffer_stop_read_timer(buf);
- 			}
--			put_online_cpus();
-+			lttng_cpus_read_unlock();
- 			unregister_cpu_notifier(&chan->cpu_hp_notifier);
- #else
- 			for_each_possible_cpu(cpu) {
-@@ -772,14 +773,14 @@ void lib_ring_buffer_set_quiescent_channel(struct lttng_kernel_ring_buffer_chann
- 	const struct lttng_kernel_ring_buffer_config *config = &chan->backend.config;
- 
- 	if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
--		get_online_cpus();
-+		lttng_cpus_read_lock();
- 		for_each_channel_cpu(cpu, chan) {
- 			struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
- 							      cpu);
- 
- 			lib_ring_buffer_set_quiescent(buf);
- 		}
--		put_online_cpus();
-+		lttng_cpus_read_unlock();
- 	} else {
- 		struct lttng_kernel_ring_buffer *buf = chan->backend.buf;
- 
-@@ -794,14 +795,14 @@ void lib_ring_buffer_clear_quiescent_channel(struct lttng_kernel_ring_buffer_cha
- 	const struct lttng_kernel_ring_buffer_config *config = &chan->backend.config;
- 
- 	if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
--		get_online_cpus();
-+		lttng_cpus_read_lock();
- 		for_each_channel_cpu(cpu, chan) {
- 			struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
- 							      cpu);
- 
- 			lib_ring_buffer_clear_quiescent(buf);
- 		}
--		put_online_cpus();
-+		lttng_cpus_read_unlock();
- 	} else {
- 		struct lttng_kernel_ring_buffer *buf = chan->backend.buf;
- 
-@@ -899,7 +900,7 @@ struct lttng_kernel_ring_buffer_channel *channel_create(const struct lttng_kerne
- 			chan->cpu_hp_notifier.priority = 6;
- 			register_cpu_notifier(&chan->cpu_hp_notifier);
- 
--			get_online_cpus();
-+			lttng_cpus_read_lock();
- 			for_each_online_cpu(cpu) {
- 				struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
- 								       cpu);
-@@ -909,7 +910,7 @@ struct lttng_kernel_ring_buffer_channel *channel_create(const struct lttng_kerne
- 				spin_unlock(&per_cpu(ring_buffer_nohz_lock, cpu));
- 			}
- 			chan->cpu_hp_enable = 1;
--			put_online_cpus();
-+			lttng_cpus_read_unlock();
- #else
- 			for_each_possible_cpu(cpu) {
- 				struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
-diff --git a/src/lib/ringbuffer/ring_buffer_iterator.c b/src/lib/ringbuffer/ring_buffer_iterator.c
-index 25839af6..60c95ca6 100644
---- a/src/lib/ringbuffer/ring_buffer_iterator.c
-+++ b/src/lib/ringbuffer/ring_buffer_iterator.c
-@@ -10,6 +10,7 @@
-  */
- 
- #include <ringbuffer/iterator.h>
-+#include <wrapper/cpu.h>
- #include <wrapper/file.h>
- #include <wrapper/uaccess.h>
- #include <linux/jiffies.h>
-@@ -440,13 +441,13 @@ int channel_iterator_init(struct lttng_kernel_ring_buffer_channel *chan)
- 			chan->hp_iter_notifier.priority = 10;
- 			register_cpu_notifier(&chan->hp_iter_notifier);
- 
--			get_online_cpus();
-+			lttng_cpus_read_lock();
- 			for_each_online_cpu(cpu) {
- 				buf = per_cpu_ptr(chan->backend.buf, cpu);
- 				lib_ring_buffer_iterator_init(chan, buf);
- 			}
- 			chan->hp_iter_enable = 1;
--			put_online_cpus();
-+			lttng_cpus_read_unlock();
- #else
- 			for_each_possible_cpu(cpu) {
- 				buf = per_cpu_ptr(chan->backend.buf, cpu);
-@@ -519,7 +520,7 @@ int channel_iterator_open(struct lttng_kernel_ring_buffer_channel *chan)
- 	CHAN_WARN_ON(chan, config->output != RING_BUFFER_ITERATOR);
- 
- 	if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
--		get_online_cpus();
-+		lttng_cpus_read_lock();
- 		/* Allow CPU hotplug to keep track of opened reader */
- 		chan->iter.read_open = 1;
- 		for_each_channel_cpu(cpu, chan) {
-@@ -529,7 +530,7 @@ int channel_iterator_open(struct lttng_kernel_ring_buffer_channel *chan)
- 				goto error;
- 			buf->iter.read_open = 1;
- 		}
--		put_online_cpus();
-+		lttng_cpus_read_unlock();
- 	} else {
- 		buf = channel_get_ring_buffer(config, chan, 0);
- 		ret = lib_ring_buffer_iterator_open(buf);
-@@ -538,7 +539,7 @@ int channel_iterator_open(struct lttng_kernel_ring_buffer_channel *chan)
- error:
- 	/* Error should always happen on CPU 0, hence no close is required. */
- 	CHAN_WARN_ON(chan, cpu != 0);
--	put_online_cpus();
-+	lttng_cpus_read_unlock();
- 	return ret;
- }
- EXPORT_SYMBOL_GPL(channel_iterator_open);
-@@ -550,7 +551,7 @@ void channel_iterator_release(struct lttng_kernel_ring_buffer_channel *chan)
- 	int cpu;
- 
- 	if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
--		get_online_cpus();
-+		lttng_cpus_read_lock();
- 		for_each_channel_cpu(cpu, chan) {
- 			buf = channel_get_ring_buffer(config, chan, cpu);
- 			if (buf->iter.read_open) {
-@@ -559,7 +560,7 @@ void channel_iterator_release(struct lttng_kernel_ring_buffer_channel *chan)
- 			}
- 		}
- 		chan->iter.read_open = 0;
--		put_online_cpus();
-+		lttng_cpus_read_unlock();
- 	} else {
- 		buf = channel_get_ring_buffer(config, chan, 0);
- 		lib_ring_buffer_iterator_release(buf);
-diff --git a/src/lttng-context-perf-counters.c b/src/lttng-context-perf-counters.c
-index b0227d47..372f05e0 100644
---- a/src/lttng-context-perf-counters.c
-+++ b/src/lttng-context-perf-counters.c
-@@ -16,6 +16,7 @@
- #include <lttng/events.h>
- #include <lttng/events-internal.h>
- #include <ringbuffer/frontend_types.h>
-+#include <wrapper/cpu.h>
- #include <wrapper/vmalloc.h>
- #include <wrapper/perf.h>
- #include <lttng/tracer.h>
-@@ -97,10 +98,10 @@ void lttng_destroy_perf_counter_ctx_field(void *priv)
- 	{
- 		int cpu;
- 
--		get_online_cpus();
-+		lttng_cpus_read_lock();
- 		for_each_online_cpu(cpu)
- 			perf_event_release_kernel(events[cpu]);
--		put_online_cpus();
-+		lttng_cpus_read_unlock();
- #ifdef CONFIG_HOTPLUG_CPU
- 		unregister_cpu_notifier(&perf_field->nb);
- #endif
-@@ -304,7 +305,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type,
- 		perf_field->nb.priority = 0;
- 		register_cpu_notifier(&perf_field->nb);
- #endif
--		get_online_cpus();
-+		lttng_cpus_read_lock();
- 		for_each_online_cpu(cpu) {
- 			events[cpu] = wrapper_perf_event_create_kernel_counter(attr,
- 						cpu, NULL, overflow_callback);
-@@ -317,7 +318,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type,
- 				goto counter_busy;
- 			}
- 		}
--		put_online_cpus();
-+		lttng_cpus_read_unlock();
- 		perf_field->hp_enable = 1;
- 	}
- #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
-@@ -351,7 +352,7 @@ counter_error:
- 			if (events[cpu] && !IS_ERR(events[cpu]))
- 				perf_event_release_kernel(events[cpu]);
- 		}
--		put_online_cpus();
-+		lttng_cpus_read_unlock();
- #ifdef CONFIG_HOTPLUG_CPU
- 		unregister_cpu_notifier(&perf_field->nb);
- #endif
-diff --git a/src/lttng-statedump-impl.c b/src/lttng-statedump-impl.c
-index 4dfbca0b..2b42783a 100644
---- a/src/lttng-statedump-impl.c
-+++ b/src/lttng-statedump-impl.c
-@@ -23,7 +23,6 @@
- #include <linux/file.h>
- #include <linux/interrupt.h>
- #include <linux/irqnr.h>
--#include <linux/cpu.h>
- #include <linux/netdevice.h>
- #include <linux/inetdevice.h>
- #include <linux/mm.h>
-@@ -34,6 +33,7 @@
- 
- #include <lttng/events.h>
- #include <lttng/tracer.h>
-+#include <wrapper/cpu.h>
- #include <wrapper/irqdesc.h>
- #include <wrapper/fdtable.h>
- #include <wrapper/namespace.h>
-@@ -770,7 +770,7 @@ int do_lttng_statedump(struct lttng_kernel_session *session)
- 	 * is to guarantee that each CPU has been in a state where is was in
- 	 * syscall mode (i.e. not in a trap, an IRQ or a soft IRQ).
- 	 */
--	get_online_cpus();
-+	lttng_cpus_read_lock();
- 	atomic_set(&kernel_threads_to_run, num_online_cpus());
- 	for_each_online_cpu(cpu) {
- 		INIT_DELAYED_WORK(&cpu_work[cpu], lttng_statedump_work_func);
-@@ -778,7 +778,7 @@ int do_lttng_statedump(struct lttng_kernel_session *session)
- 	}
- 	/* Wait for all threads to run */
- 	__wait_event(statedump_wq, (atomic_read(&kernel_threads_to_run) == 0));
--	put_online_cpus();
-+	lttng_cpus_read_unlock();
- 	/* Our work is done */
- 	trace_lttng_statedump_end(session);
- 	return 0;
--- 
-2.19.1
-
meta/recipes-kernel/lttng/lttng-modules/0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch deleted +0 -829

829 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules_2.13.1.bb renamed from meta/recipes-kernel/lttng/lttng-modules_2.13.0.bb +1 -3
similarity index 86%
rename from meta/recipes-kernel/lttng/lttng-modules_2.13.0.bb
rename to meta/recipes-kernel/lttng/lttng-modules_2.13.1.bb
index 6dfde8dcad..b05cad6be7 100644
@@ -10,13 +10,11 @@ inherit module
 include lttng-platforms.inc
 
 SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
-           file://0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch \
-           file://0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch \
           "
 # Use :append here so that the patch is applied also when using devupstream
 SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch"
 
-SRC_URI[sha256sum] = "5ebf2b3cd128b3a1c8afaea1e98d5a6f7f0676fd524fcf72361c34d9dc603356"
+SRC_URI[sha256sum] = "a7c86d91c9bbe66d27f025aa04b8cfc6d7785ed2fc7ef774930800ee44d7f343"
 
 export INSTALL_MOD_DIR="kernel/lttng-modules"
 
Signature · 1 line
2.35.3
#0 lore raw

cover Patch review

Next set of changes for honister. Includes fixes to perf and lttng-modules to support newer kernels with honister. Please review.

No problems seen while testing:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/3646

Thanks,

Anuj

The following changes since commit 1a6f5e27249afb6fb4d47c523b62b5dd2482a69d:

build-appliance-image: Update to honister head revision (2022-05-03 21:56:48 +0100)

are available in the Git repository at:

git://push.openembedded.org/openembedded-core-contrib anujm/honister

Bruce Ashfield (2):
lttng-modules: update to 2.13.1
lttng-modules: support kernel 5.18+

Chen Qi (1):
cases/buildepoxy.py: fix typo

Davide Gardenal (1):
rootfs-postcommands: fix symlinks where link and output path are equal

Khem Raj (1):
busybox: Use base_bindir instead of hardcoding /bin path

Max Krummenacher (2):
perf: sort-pmuevents: don't drop elements
perf: sort-pmuevents: allow for additional type qualifiers and storage
class

Paul Gortmaker (1):
install/devshell: Introduce git intercept script due to fakeroot
issues

Portia (1):
volatile-binds: Change DefaultDependencies from false to no

Rahul Kumar (1):
neard: Switch SRC_URI to git repo

Richard Purdie (4):
base: Avoid circular references to our own scripts
base: Drop git intercept
scripts: Make git intercept global scripts/git: Ensure we don't have circular references

Ross Burton (1):
oeqa/selftest: add test for git working correctly inside pseudo

wangmy (2):
lttng-modules: upgrade 2.13.1 -> 2.13.2
lttng-modules: upgrade 2.13.2 -> 2.13.3

 .../git-submodule-test/git-submodule-test.bb  |  15 +
 meta/classes/base.bbclass                     |   4 +
 meta/classes/devshell.bbclass                 |   2 +
 meta/classes/rootfs-postcommands.bbclass      |  14 +-
 meta/lib/oeqa/sdk/cases/buildepoxy.py         |   2 +-
 meta/lib/oeqa/selftest/cases/git.py           |  15 +
 meta/recipes-connectivity/neard/neard_0.16.bb |  13 +-
 meta/recipes-core/busybox/busybox.inc         |   2 +-
 .../files/volatile-binds.service.in           |   2 +-
 ...x-compaction-migratepages-event-name.patch |  37 +
 ...Remove-deprecated-CPU-hotplug-functi.patch | 394 ---------
 ...vent-allow-same-provider-and-event-n.patch |  48 +
 ...ile-Enable-Wimplicit-fallthrough-for.patch | 829 ------------------
 ...g-Don-t-re-read-p-state-when-emittin.patch | 183 ++++
 .../0004-fix-block-remove-genhd.h-v5.18.patch |  45 +
 ...emove-REQ_OP_WRITE_SAME-support-v5.1.patch |  79 ++
 ...ndom-remove-unused-tracepoints-v5.18.patch |  47 +
 ...rethook-for-kretprobe-if-possible-v5.patch |  72 ++
 ...ore-Remove-scsi-scsi_request.h-v5.18.patch |  44 +
 .../0009-Rename-genhd-wrapper-to-blkdev.patch |  76 ++
 ...n-cleanup-the-compaction-trace-event.patch | 106 +++
 ...ules_2.13.0.bb => lttng-modules_2.13.3.bb} |  15 +-
 .../perf/perf/sort-pmuevents.py               |  28 +-
 scripts/git                                   |  26 +
 24 files changed, 845 insertions(+), 1253 deletions(-)
 create mode 100644 meta/lib/oeqa/selftest/cases/git.py
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0001-Fix-compaction-migratepages-event-name.patch
 delete mode 100644 meta/recipes-kernel/lttng/lttng-modules/0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0002-Fix-tracepoint-event-allow-same-provider-and-event-n.patch
 delete mode 100644 meta/recipes-kernel/lttng/lttng-modules/0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0003-fix-sched-tracing-Don-t-re-read-p-state-when-emittin.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0004-fix-block-remove-genhd.h-v5.18.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0005-fix-scsi-block-Remove-REQ_OP_WRITE_SAME-support-v5.1.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0006-fix-random-remove-unused-tracepoints-v5.18.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0007-fix-kprobes-Use-rethook-for-kretprobe-if-possible-v5.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0008-fix-scsi-core-Remove-scsi-scsi_request.h-v5.18.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0009-Rename-genhd-wrapper-to-blkdev.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch
 rename meta/recipes-kernel/lttng/{lttng-modules_2.13.0.bb => lttng-modules_2.13.3.bb} (65%)
 create mode 100755 scripts/git
Signature · 1 line
2.35.3
#1 lore raw

PATCH 1/17 busybox: Use base_bindir instead of hardcoding /bin path

From: Khem Raj <[email protected]>

This symlink is not valid when using usrmerge and ptest packaging would fail

Exception: FileExistsError: [Errno 17] File exists: '/usr/bin/busybox.suid' -> '/mnt/b/yoe/master/build/tmp/work/ppc64p9le-yoe-linux-musl/busybox/1.35.0-r0/package/usr/lib/busybox/ptest/bin/login'

(cherry picked from commit 238fd30689054c7b44176dce7180fb6dac4e1b6f)
---
 meta/recipes-core/busybox/busybox.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/busybox/busybox.inc +1 -1
index 808c3dc700..187ca15957 100644
@@ -349,7 +349,7 @@ do_install_ptest () {
         # These access the internet which is not guaranteed to work on machines running the tests
         rm -rf ${D}${PTEST_PATH}/testsuite/wget
 	sort ${B}/.config > ${D}${PTEST_PATH}/.config
-	ln -s /bin/busybox   ${D}${PTEST_PATH}/busybox
+	ln -s ${base_bindir}/busybox   ${D}${PTEST_PATH}/busybox
 }
 
 inherit update-alternatives
Signature · 1 line
2.35.3
#2 lore raw

PATCH 2/17 cases/buildepoxy.py: fix typo

In reply to Anuj Mittal

From: Chen Qi <[email protected]>

(cherry picked from commit 3a9b6e71d1e7e8e2ebc0ed047841e36f09300387)
(cherry picked from commit af5bcfdc0b21607122fbbda6c35fac5d0cb0f829)
---
 meta/lib/oeqa/sdk/cases/buildepoxy.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/sdk/cases/buildepoxy.py +1 -1
index 385f8ccca8..f69f720cd6 100644
@@ -17,7 +17,7 @@ class EpoxyTest(OESDKTestCase):
     """
     def setUp(self):
         if not (self.tc.hasHostPackage("nativesdk-meson")):
-            raise unittest.SkipTest("GalculatorTest class: SDK doesn't contain Meson")
+            raise unittest.SkipTest("EpoxyTest class: SDK doesn't contain Meson")
 
     def test_epoxy(self):
         with tempfile.TemporaryDirectory(prefix="epoxy", dir=self.tc.sdk_dir) as testdir:
Signature · 1 line
2.35.3
#3 lore raw

PATCH 3/17 neard: Switch SRC_URI to git repo

In reply to Anuj Mittal

From: Rahul Kumar <[email protected]>

The tarball (neard-0.16.tar.xz) fetched by the recipe is incomplete. Few plugins (e.g. tizen) and tests scripts (e.g. Test-channel, test-see, neard-ui.py, ndef-agent etc) are missing.

Since neard did not release latest tarballs, so as per community recommendation switching the recipe SRC_URI to git repo.

Community Discussion:
https://lists.openembedded.org/g/openembedded-core/topic/90058043#163681

(cherry picked from commit b563f40ebf4461d9c35df72bd7599ea11e97da9c)
---
 meta/recipes-connectivity/neard/neard_0.16.bb | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
meta/recipes-connectivity/neard/neard_0.16.bb +7 -6
index b6cc1d6ced..936b3c5754 100644
@@ -2,21 +2,22 @@ SUMMARY = "Linux NFC daemon"
 DESCRIPTION = "A daemon for the Linux Near Field Communication stack"
 HOMEPAGE = "http://01.org/linux-nfc"
 LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
+                    file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \
+                   "
 
 DEPENDS = "dbus glib-2.0 libnl"
 
-SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BP}.tar.xz \
+SRC_URI = "git://git.kernel.org/pub/scm/network/nfc/neard.git;protocol=git;branch=master \
            file://neard.in \
            file://Makefile.am-fix-parallel-issue.patch \
            file://Makefile.am-do-not-ship-version.h.patch \
            file://0001-Add-header-dependency-to-nciattach.o.patch \
           "
-SRC_URI[md5sum] = "5c691fb7872856dc0d909c298bc8cb41"
-SRC_URI[sha256sum] = "eae3b11c541a988ec11ca94b7deab01080cd5b58cfef3ced6ceac9b6e6e65b36"
 
-LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
- file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \
- "
+SRCREV = "949795024f7625420e93e288c56e194cb9a3e74a"
+
+S = "${WORKDIR}/git"
 
 inherit autotools pkgconfig systemd update-rc.d
 
Signature · 1 line
2.35.3
#5 lore raw

PATCH 5/17 volatile-binds: Change DefaultDependencies from false to no

In reply to Anuj Mittal

From: Portia <[email protected]>

The systemd-unit parameter DefaultDependencies changed from true/false to yes/no. This changed in systemd in v242.

(cherry picked from commit add4dcb03dc7b034253db05f0023cb97cab8b26d)
---
 .../recipes-core/volatile-binds/files/volatile-binds.service.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/volatile-binds/files/volatile-binds.service.in +1 -1
index e2ad39f258..0c1c79d0c4 100644
@@ -1,6 +1,6 @@
 [Unit]
 Description=Bind mount volatile @where@
-DefaultDependencies=false
+DefaultDependencies=no
 Before=local-fs.target
 RequiresMountsFor=@whatparent@ @whereparent@
 ConditionPathIsReadWrite=@whatparent@
Signature · 1 line
2.35.3
#7 lore raw

PATCH 7/17 base: Avoid circular references to our own scripts

In reply to Anuj Mittal

From: Richard Purdie <[email protected]>

We'd like to intercept git calls but we don't want circular references and HOSTTOOLS currently sets them up. Tweak to avoid them.

(cherry picked from commit 52c37e133fa55846aca2248ffcf3a10648dbb8d7)
---
 meta/classes/base.bbclass | 4 ++++
 1 file changed, 4 insertions(+)
meta/classes/base.bbclass +4 -0
index 340ebe7d78..070341d1aa 100644
@@ -122,6 +122,10 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True):
     tools = d.getVar(toolsvar).split()
     origbbenv = d.getVar("BB_ORIGENV", False)
     path = origbbenv.getVar("PATH")
+    # Need to ignore our own scripts directories to avoid circular links
+    for p in path.split(":"):
+        if p.endswith("/scripts"):
+            path = path.replace(p, "/ignoreme")
     bb.utils.mkdirhier(dest)
     notfound = []
     for tool in tools:
Signature · 1 line
2.35.3
#4 lore raw

PATCH 4/17 rootfs-postcommands: fix symlinks where link and output path are equal

In reply to Anuj Mittal

From: Davide Gardenal <[email protected]>

When creating the manifest and the testdata.json links, if the link name is equal to the output name the link is not created, otherwise it is. This prevents a link-to-self in the first case.

(cherry picked from commit bed63756c56f296ff3d5a7eef66e978bd19f1008)
---
 meta/classes/rootfs-postcommands.bbclass | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
meta/classes/rootfs-postcommands.bbclass +8 -6
index 0452fe4b27..2310e86cdf 100644
@@ -267,9 +267,10 @@ python write_image_manifest () {
 
     if os.path.exists(manifest_name) and link_name:
         manifest_link = deploy_dir + "/" + link_name + ".manifest"
-        if os.path.lexists(manifest_link):
-            os.remove(manifest_link)
-        os.symlink(os.path.basename(manifest_name), manifest_link)
+        if manifest_link != manifest_name:
+            if os.path.lexists(manifest_link):
+                os.remove(manifest_link)
+            os.symlink(os.path.basename(manifest_name), manifest_link)
 }
 
 # Can be used to create /etc/timestamp during image construction to give a reasonably
@@ -339,9 +340,10 @@ python write_image_test_data() {
 
     if os.path.exists(testdata_name) and link_name:
         testdata_link = os.path.join(deploy_dir, "%s.testdata.json" % link_name)
-        if os.path.lexists(testdata_link):
-            os.remove(testdata_link)
-        os.symlink(os.path.basename(testdata_name), testdata_link)
+        if testdata_link != testdata_name:
+            if os.path.lexists(testdata_link):
+                os.remove(testdata_link)
+            os.symlink(os.path.basename(testdata_name), testdata_link)
 }
 write_image_test_data[vardepsexclude] += "TOPDIR"
 
Signature · 1 line
2.35.3
#6 lore raw

PATCH 6/17 oeqa/selftest: add test for git working correctly inside pseudo

In reply to Anuj Mittal

From: Ross Burton <[email protected]>

The fix for CVE-2022-24765 in git[1] breaks any use of git inside pseudo. Add a simple test case to oe-selftest to verify that at least basic uses of git work fine under pseudo.

[1] https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9

(cherry picked from commit 46822268040a23dbb81f71fe35aee8c2663a31f6)
---
 .../git-submodule-test/git-submodule-test.bb      | 15 +++++++++++++++
 meta/lib/oeqa/selftest/cases/git.py               | 15 +++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 meta/lib/oeqa/selftest/cases/git.py
meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb +15 -0
index cc5d7eae5a..fa3041b7d8 100644
@@ -7,3 +7,18 @@ INHIBIT_DEFAULT_DEPS = "1"
 
 SRC_URI = "gitsm://git.yoctoproject.org/git-submodule-test;branch=master"
 SRCREV = "a2885dd7d25380d23627e7544b7bbb55014b16ee"
+
+S = "${WORKDIR}/git"
+
+do_test_git_as_user() {
+    cd ${S}
+    git status
+}
+addtask test_git_as_user after do_unpack
+
+fakeroot do_test_git_as_root() {
+    cd ${S}
+    git status
+}
+do_test_git_as_root[depends] += "virtual/fakeroot-native:do_populate_sysroot"
+addtask test_git_as_root after do_unpack
meta/lib/oeqa/selftest/cases/git.py new file +15 -0
new file mode 100644
index 0000000000..f12874dc7d
@@ -0,0 +1,15 @@
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake
+
+class GitCheck(OESelftestTestCase):
+    def test_git_intercept(self):
+        """
+        Git binaries with CVE-2022-24765 fixed will refuse to operate on a
+        repository which is owned by a different user. This breaks our
+        do_install task as that runs inside pseudo, so the git repository is
+        owned by the build user but git is running as (fake)root.
+
+        We have an intercept which disables pseudo, so verify that it works.
+        """
+        bitbake("git-submodule-test -c test_git_as_user")
+        bitbake("git-submodule-test -c test_git_as_root")
Signature · 1 line
2.35.3
#8 lore raw

PATCH 8/17 install/devshell: Introduce git intercept script due to fakeroot issues

In reply to Anuj Mittal

From: Paul Gortmaker <[email protected]>

In a devshell, recent versions of git will complain if the repo is owned by someone other than the current UID - consider this example:

------
bitbake -c devshell linux-yocto

[...]

kernel-source#git branch
fatal: unsafe repository ('/home/paul/poky/build-qemuarm64/tmp/work-shared/qemuarm64/kernel-source' is owned by someone else) To add an exception for this directory, call:

        git config --global --add safe.directory /home/paul/poky/build-qemuarm64/tmp/work-shared/qemuarm64/kernel-source

kernel-source#
------

Of course the devshell has UID zero and the "real" UID is for "paul" in this case. And so recent git versions complain.

As the whole purpose of the devshell is to invoke a shell where development can take place, having a non-functional git is clearly unacceptable.

Richard suggested we could use PSEUDO_UNLOAD=1 to evade this issue, and I suggested we probably will see other similar instances like this and should make use of PATH to intercept via devshell wrappers - conveniently we already have examples of this.

Here, we copy the existing "ar" example and tune it to the needs of git to combine Richard's suggestion and mine.

As such we now also can store commit logs and use send-email with our user specific settings, instead of "root", so in additon to fixing basic commands like "git branch" it should also increase general usefulness.

RP: Tweaked the patch so the PATH change only applies to the devshell task and is a generic git intercept rather than devshell specific.

RP: Also apply the PATH change to do_install tasks since that also runs under fakeroot and several software projects inject "git describe" output into their binaries (systemd, iputils, llvm, ipt-gpu-tools at least) causing reproducibility issues from systems with different git versions.

(cherry picked from commit 3266c327dfa186791e0f1e2ad63c6f5d39714814)
---
 meta/classes/base.bbclass     |  1 +
 meta/classes/devshell.bbclass |  2 ++
 scripts/git-intercept/git     | 19 +++++++++++++++++++
 3 files changed, 22 insertions(+)
 create mode 100755 scripts/git-intercept/git
meta/classes/base.bbclass +1 -0
index 070341d1aa..78cc8279dd 100644
@@ -339,6 +339,7 @@ addtask install after do_compile
 do_install[dirs] = "${B}"
 # Remove and re-create ${D} so that is it guaranteed to be empty
 do_install[cleandirs] = "${D}"
+PATH:prepend:task-install = "${COREBASE}/scripts/git-intercept:"
 
 base_do_install() {
 	:
meta/classes/devshell.bbclass +2 -0
index 76dd0b42ee..b6212ebd89 100644
@@ -2,6 +2,8 @@ inherit terminal
 
 DEVSHELL = "${SHELL}"
 
+PATH:prepend:task-devshell = "${COREBASE}/scripts/git-intercept:"
+
 python do_devshell () {
     if d.getVarFlag("do_devshell", "manualfakeroot"):
        d.prependVar("DEVSHELL", "pseudo ")
scripts/git-intercept/git new file +19 -0
new file mode 100755
index 0000000000..8adf5c9ecb
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+#
+# Wrapper around 'git' that doesn't think we are root
+
+import os
+import shutil
+import sys
+
+os.environ['PSEUDO_UNLOAD'] = '1'
+
+# calculate path to the real 'git'
+path = os.environ['PATH']
+path = path.replace(os.path.dirname(sys.argv[0]), '')
+real_git = shutil.which('git', path=path)
+
+if len(sys.argv) == 1:
+    os.execl(real_git, 'git')
+
+os.execv(real_git, sys.argv)
Signature · 1 line
2.35.3
#9 lore raw

PATCH 9/17 base: Drop git intercept

In reply to Anuj Mittal

From: Richard Purdie <[email protected]>

We're going to use the environment approach for solving this issue.

(cherry picked from commit 0982977dc052ad4e65608f6853f930121d08837a)
---
 meta/classes/base.bbclass | 1 -
 1 file changed, 1 deletion(-)
meta/classes/base.bbclass +0 -1
index 78cc8279dd..070341d1aa 100644
@@ -339,7 +339,6 @@ addtask install after do_compile
 do_install[dirs] = "${B}"
 # Remove and re-create ${D} so that is it guaranteed to be empty
 do_install[cleandirs] = "${D}"
-PATH:prepend:task-install = "${COREBASE}/scripts/git-intercept:"
 
 base_do_install() {
 	:
Signature · 1 line
2.35.3
#10 lore raw

PATCH 10/17 scripts: Make git intercept global

In reply to Anuj Mittal

From: Richard Purdie <[email protected]>

The previous minimially invasive git intercept simply isn't enough. For example, meson used in the igt-gpu-tools recipe hardcodes the path to git in the configure step so at install time, changing PATH has no effect.

There are lots of interesting things we could do to try and avoid problems but making the git intercept and dropping fakeroot privs for git global is probably the least worst solution at this point. It will add slight overhead to git calls but we don't make many so the overall impact is likely minimal.

(cherry picked from commit af27c81eaf68ee681dcd9456a74cca6a9ab40bf6)
---
 scripts/{git-intercept => }/git | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename scripts/{git-intercept => }/git (100%)
scripts/git renamed from scripts/git-intercept/git +0 -0
similarity index 100%
rename from scripts/git-intercept/git
rename to scripts/git
Signature · 1 line
2.35.3
#11 lore raw

PATCH 11/17 scripts/git: Ensure we don't have circular references

In reply to Anuj Mittal

From: Richard Purdie <[email protected]>

This is horrible but I'm running out of better ideas. We hit circular reference issues which we were trying to avoid in the core HOSTTOOLS code. When building the eSDK, there can be two copies of the script.

Therefore assume git will never be in a directory called scripts. This fixes eSDK build failures.

(cherry picked from commit 27de610ac30d4c81352efc794df7e9b1060f7a68)
---
 scripts/git | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
scripts/git +8 -1
index 8adf5c9ecb..644055e540 100755
@@ -10,7 +10,14 @@ os.environ['PSEUDO_UNLOAD'] = '1'
 
 # calculate path to the real 'git'
 path = os.environ['PATH']
-path = path.replace(os.path.dirname(sys.argv[0]), '')
+# we need to remove our path but also any other copy of this script which
+# may be present, e.g. eSDK.
+replacements = [os.path.dirname(sys.argv[0])]
+for p in path.split(":"):
+    if p.endswith("/scripts"):
+        replacements.append(p)
+for r in replacements:
+    path = path.replace(r, '/ignoreme')
 real_git = shutil.which('git', path=path)
 
 if len(sys.argv) == 1:
Signature · 1 line
2.35.3
#13 lore raw

PATCH 13/17 lttng-modules: upgrade 2.13.1 -> 2.13.2

In reply to Anuj Mittal

From: wangmy <[email protected]>

Changelog:
=========
* Fix: incorrect in/out direction for syscall exit
* fix: net: socket: rename SKB_DROP_REASON_SOCKET_FILTER (v5.17)
* fix: net: skb: introduce kfree_skb_reason() (v5.17)
* fix: random: rather than entropy_store abstraction, use global (v5.17)
* fix: btrfs: pass fs_info to trace_btrfs_transaction_commit (v5.17)
* fix: mm: compaction: fix the migration stats in trace_mm_compaction_migratepages() (v5.17)
* fix: block: remove the ->rq_disk field in struct request (v5.17)
* fix: block: remove GENHD_FL_SUPPRESS_PARTITION_INFO (v5.17)
* Copyright ownership transfer

(cherry picked from commit 093d6dba95c03911d3d7e1b3b07ceff2c1de5563)
---
 .../{lttng-modules_2.13.1.bb => lttng-modules_2.13.2.bb}     | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
 rename meta/recipes-kernel/lttng/{lttng-modules_2.13.1.bb => lttng-modules_2.13.2.bb} (90%)
meta/recipes-kernel/lttng/lttng-modules_2.13.2.bb renamed from meta/recipes-kernel/lttng/lttng-modules_2.13.1.bb +2 -3
similarity index 90%
rename from meta/recipes-kernel/lttng/lttng-modules_2.13.1.bb
rename to meta/recipes-kernel/lttng/lttng-modules_2.13.2.bb
index b05cad6be7..b438d06c6c 100644
@@ -9,12 +9,11 @@ inherit module
 
 include lttng-platforms.inc
 
-SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
-          "
+SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2"
 # Use :append here so that the patch is applied also when using devupstream
 SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch"
 
-SRC_URI[sha256sum] = "a7c86d91c9bbe66d27f025aa04b8cfc6d7785ed2fc7ef774930800ee44d7f343"
+SRC_URI[sha256sum] = "dfd547d9041c8c545ae5b7bfef3f0ef2d9f2520d6ab44188c9ea8de56d5d298a"
 
 export INSTALL_MOD_DIR="kernel/lttng-modules"
 
Signature · 1 line
2.35.3
#14 lore raw

PATCH 14/17 lttng-modules: upgrade 2.13.2 -> 2.13.3

In reply to Anuj Mittal

From: wangmy <[email protected]>

(cherry picked from commit f9b3727b9f4014a8b08c2ba9c03b8b5f96f01083)
---
 .../lttng/{lttng-modules_2.13.2.bb => lttng-modules_2.13.3.bb}  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-kernel/lttng/{lttng-modules_2.13.2.bb => lttng-modules_2.13.3.bb} (94%)
meta/recipes-kernel/lttng/lttng-modules_2.13.3.bb renamed from meta/recipes-kernel/lttng/lttng-modules_2.13.2.bb +1 -1
similarity index 94%
rename from meta/recipes-kernel/lttng/lttng-modules_2.13.2.bb
rename to meta/recipes-kernel/lttng/lttng-modules_2.13.3.bb
index b438d06c6c..a959ce9211 100644
@@ -13,7 +13,7 @@ SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2"
 # Use :append here so that the patch is applied also when using devupstream
 SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch"
 
-SRC_URI[sha256sum] = "dfd547d9041c8c545ae5b7bfef3f0ef2d9f2520d6ab44188c9ea8de56d5d298a"
+SRC_URI[sha256sum] = "7cf1acbb50b84116acc9b4281b81dcc2643d6018bbd1e8514ad1270239896c4b"
 
 export INSTALL_MOD_DIR="kernel/lttng-modules"
 
Signature · 1 line
2.35.3
#15 lore raw

PATCH 15/17 lttng-modules: support kernel 5.18+

In reply to Anuj Mittal

From: Bruce Ashfield <[email protected]>

Backporting changes from lttng master to support building against the 5.18+ kernel. No changes required to the patches. Once a new -stable 2.13.x is released, we can drop these patches. To enable newer kernel development against the LTS, it is worth pulling these in while we wait for an upstream release.

(cherry picked from commit 8a7237a47488442513741930ea55d69dd6bd7be4)
---
 ...x-compaction-migratepages-event-name.patch |  37 ++++
 ...vent-allow-same-provider-and-event-n.patch |  48 +++++
 ...g-Don-t-re-read-p-state-when-emittin.patch | 183 ++++++++++++++++++
 .../0004-fix-block-remove-genhd.h-v5.18.patch |  45 +++++
 ...emove-REQ_OP_WRITE_SAME-support-v5.1.patch |  79 ++++++++
 ...ndom-remove-unused-tracepoints-v5.18.patch |  47 +++++
 ...rethook-for-kretprobe-if-possible-v5.patch |  72 +++++++
 ...ore-Remove-scsi-scsi_request.h-v5.18.patch |  44 +++++
 .../0009-Rename-genhd-wrapper-to-blkdev.patch |  76 ++++++++
 ...n-cleanup-the-compaction-trace-event.patch | 106 ++++++++++
 .../lttng/lttng-modules_2.13.3.bb             |  14 +-
 11 files changed, 750 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0001-Fix-compaction-migratepages-event-name.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0002-Fix-tracepoint-event-allow-same-provider-and-event-n.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0003-fix-sched-tracing-Don-t-re-read-p-state-when-emittin.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0004-fix-block-remove-genhd.h-v5.18.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0005-fix-scsi-block-Remove-REQ_OP_WRITE_SAME-support-v5.1.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0006-fix-random-remove-unused-tracepoints-v5.18.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0007-fix-kprobes-Use-rethook-for-kretprobe-if-possible-v5.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0008-fix-scsi-core-Remove-scsi-scsi_request.h-v5.18.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0009-Rename-genhd-wrapper-to-blkdev.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch
meta/recipes-kernel/lttng/lttng-modules/0001-Fix-compaction-migratepages-event-name.patch new file +37 -0
new file mode 100644
index 0000000000..e988f7a3d5
@@ -0,0 +1,37 @@
+From c312bda00d2dc10ce5f6c1189acbefee5c6c8c6c Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <[email protected]>
+Date: Tue, 29 Mar 2022 16:34:07 -0400
+Subject: [PATCH 01/10] Fix: compaction migratepages event name
+
+The commit "fix: mm: compaction: fix the migration stats in trace_mm_compaction_migratepages() (v5.17)"
+
+Triggers this warning:
+
+    LTTng: event provider mismatch: The event name needs to start with provider name + _ + one or more letter, provider: compaction, event name: mm_compaction_migratepages
+
+Upstream-Status: Backport
+
+Signed-off-by: Mathieu Desnoyers <[email protected]>
+Change-Id: I01c7485af765084dafb33bf33ae392e60bfbf1e7
+---
+ include/instrumentation/events/compaction.h | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/include/instrumentation/events/compaction.h b/include/instrumentation/events/compaction.h
+index 340e41f5..15964537 100644
+--- a/include/instrumentation/events/compaction.h
++++ b/include/instrumentation/events/compaction.h
+@@ -98,7 +98,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(compaction_isolate_template,
+ #endif /* #else #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0) */
+ 
+ #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
+-LTTNG_TRACEPOINT_EVENT(mm_compaction_migratepages,
++LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages,
++
++	compaction_migratepages,
+ 
+ 	TP_PROTO(unsigned long nr_all,
+ 		unsigned int nr_succeeded),
+-- 
+2.19.1
+
meta/recipes-kernel/lttng/lttng-modules/0002-Fix-tracepoint-event-allow-same-provider-and-event-n.patch new file +48 -0

48 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0003-fix-sched-tracing-Don-t-re-read-p-state-when-emittin.patch new file +183 -0

183 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0004-fix-block-remove-genhd.h-v5.18.patch new file +45 -0

45 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0005-fix-scsi-block-Remove-REQ_OP_WRITE_SAME-support-v5.1.patch new file +79 -0

79 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0006-fix-random-remove-unused-tracepoints-v5.18.patch new file +47 -0

47 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0007-fix-kprobes-Use-rethook-for-kretprobe-if-possible-v5.patch new file +72 -0

72 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0008-fix-scsi-core-Remove-scsi-scsi_request.h-v5.18.patch new file +44 -0

44 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0009-Rename-genhd-wrapper-to-blkdev.patch new file +76 -0

76 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch new file +106 -0

106 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules_2.13.3.bb +13 -1
index a959ce9211..c33920e0d0 100644
@@ -9,7 +9,19 @@ inherit module
 
 include lttng-platforms.inc
 
-SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2"
+SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
+           file://0001-Fix-compaction-migratepages-event-name.patch \
+           file://0002-Fix-tracepoint-event-allow-same-provider-and-event-n.patch \
+           file://0003-fix-sched-tracing-Don-t-re-read-p-state-when-emittin.patch \
+           file://0004-fix-block-remove-genhd.h-v5.18.patch \
+           file://0005-fix-scsi-block-Remove-REQ_OP_WRITE_SAME-support-v5.1.patch \
+           file://0006-fix-random-remove-unused-tracepoints-v5.18.patch \
+           file://0007-fix-kprobes-Use-rethook-for-kretprobe-if-possible-v5.patch \
+           file://0008-fix-scsi-core-Remove-scsi-scsi_request.h-v5.18.patch \
+           file://0009-Rename-genhd-wrapper-to-blkdev.patch \
+           file://0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch \
+          "
+
 # Use :append here so that the patch is applied also when using devupstream
 SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch"
 
Signature · 1 line
2.35.3
#16 lore raw

PATCH 16/17 perf: sort-pmuevents: don't drop elements

In reply to Anuj Mittal

From: Max Krummenacher <[email protected]>

If a struct element neither has an element cpuid or name it gets silenty dropped.
Kernel 5.15 for some ARCHs have at least one array of structs matching this.
e.g. for arm pmu-events.c:

|#include "pmu-events/pmu-events.h"
struct pmu_events_map pmu_events_map[] = {

{
	.cpuid = 0,
	.version = 0,
	.type = 0,
	.table = 0,
},

};

struct pmu_sys_events pmu_sys_event_tables[] = {
	{
		.table = 0
	},
};

Before this patch the second struct is translated to an empty array::

struct pmu_sys_events pmu_sys_event_tables[] = {
};

(cherry picked from commit e1382583cd5060be301afaa9998ccf250cc8bca3)
---
 meta/recipes-kernel/perf/perf/sort-pmuevents.py | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-kernel/perf/perf/sort-pmuevents.py +2 -0
index 5ddf0f144f..4f841eb822 100755
@@ -61,6 +61,8 @@ for struct in re.findall( struct_block_regex, data ):
             #print( "    name found: %s" % name.group(1) )
             entry_dict[struct[1]]['fields'][name.group(1)] = entry
         
+        if not entry_dict[struct[1]]['fields']:
+            entry_dict[struct[1]]['fields']['0'] = entry
 
 # created ordered dictionaries from the captured values. These are ordered by
 # a sorted() iteration of the keys. We don't care about the order we read
Signature · 1 line
2.35.3
#17 lore raw

PATCH 17/17 perf: sort-pmuevents: allow for additional type qualifiers and storage class

In reply to Anuj Mittal

From: Max Krummenacher <[email protected]>

With kernel 5.16 some structs in pmu-events do get a const qualifier, some a static const storage class and qualifier.

The current sort-pmuevents cannot cope with that and drops all struct arrays with such additional elements. This then leads to compiler errors.

Allow '^struct', '^const struct', '^static struct', '^static const struct'.

(cherry picked from commit 8406e83ade1c34d8a7d8063f2e7445aafa471721)
---
 .../perf/perf/sort-pmuevents.py               | 30 ++++++++++---------
 1 file changed, 16 insertions(+), 14 deletions(-)
meta/recipes-kernel/perf/perf/sort-pmuevents.py +16 -14
index 4f841eb822..09ba3328a7 100755
@@ -33,10 +33,10 @@ if os.path.exists(outfile):
 with open(infile, 'r') as file:
     data = file.read()
 
-preamble_regex = re.compile( '^(.*?)^struct', re.MULTILINE | re.DOTALL )
+preamble_regex = re.compile( '^(.*?)^(struct|const struct|static struct|static const struct)', re.MULTILINE | re.DOTALL )
 
 preamble = re.search( preamble_regex, data )
-struct_block_regex = re.compile( '^struct.*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL )
+struct_block_regex = re.compile( '^(struct|const struct|static struct|static const struct).*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL )
 field_regex =  re.compile( '{.*?},', re.MULTILINE | re.DOTALL )
 cpuid_regex = re.compile( '\.cpuid = (.*?),', re.MULTILINE | re.DOTALL )
 name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL )
@@ -45,24 +45,25 @@ name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL )
 # types and then their fields.
 entry_dict = {}
 for struct in re.findall( struct_block_regex, data ):
-    # print( "struct: %s %s" % (struct[0],struct[1]) )
-    entry_dict[struct[1]] = {}
-    entry_dict[struct[1]]['type'] = struct[0]
-    entry_dict[struct[1]]['fields'] = {}
-    for entry in re.findall( field_regex, struct[2] ):
+    # print( "struct: %s %s %s" % (struct[0],struct[1],struct[2]) )
+    entry_dict[struct[2]] = {}
+    entry_dict[struct[2]]['type_prefix'] = struct[0]
+    entry_dict[struct[2]]['type'] = struct[1]
+    entry_dict[struct[2]]['fields'] = {}
+    for entry in re.findall( field_regex, struct[3] ):
         #print( "    entry: %s" % entry )
         cpuid = re.search( cpuid_regex, entry )
         if cpuid:
             #print( "    cpuid found: %s" % cpuid.group(1) )
-            entry_dict[struct[1]]['fields'][cpuid.group(1)] = entry
-            
+            entry_dict[struct[2]]['fields'][cpuid.group(1)] = entry
+
         name = re.search( name_regex, entry )
         if name:
             #print( "    name found: %s" % name.group(1) )
-            entry_dict[struct[1]]['fields'][name.group(1)] = entry
-        
-        if not entry_dict[struct[1]]['fields']:
-            entry_dict[struct[1]]['fields']['0'] = entry
+            entry_dict[struct[2]]['fields'][name.group(1)] = entry
+
+        if not entry_dict[struct[2]]['fields']:
+            entry_dict[struct[2]]['fields']['0'] = entry
 
 # created ordered dictionaries from the captured values. These are ordered by
 # a sorted() iteration of the keys. We don't care about the order we read
@@ -74,6 +75,7 @@ for struct in re.findall( struct_block_regex, data ):
 entry_dict_sorted = OrderedDict()
 for i in sorted(entry_dict.keys()):
     entry_dict_sorted[i] = {}
+    entry_dict_sorted[i]['type_prefix'] = entry_dict[i]['type_prefix']
     entry_dict_sorted[i]['type'] = entry_dict[i]['type']
     entry_dict_sorted[i]['fields'] = {}
     for f in sorted(entry_dict[i]['fields'].keys()):
@@ -85,7 +87,7 @@ outf = open( outfile, 'w' )
 print( preamble.group(1) )
 outf.write( preamble.group(1) )
 for d in entry_dict_sorted:
-    outf.write( "struct %s %s[] = {\n" % (entry_dict_sorted[d]['type'],d) )
+    outf.write( "%s %s %s[] = {\n" % (entry_dict_sorted[d]['type_prefix'], entry_dict_sorted[d]['type'],d) )
     for f in entry_dict_sorted[d]['fields']:
         outf.write( entry_dict_sorted[d]['fields'][f] + '\n' )
 
Signature · 1 line
2.35.3