Package: release.debian.org Severity: normal Tags: buster User: release.debian....@packages.debian.org Usertags: pu
Hi, The attached diff fixes a build failure of the dkms modules on the 4.19.0-11 buster linux kernel. This was reported at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972321 I'd appreciate if you consider allowing this upload to buster. Thanks, Michael
diff -Nru lttng-modules-2.10.8/debian/changelog lttng-modules-2.10.8/debian/changelog --- lttng-modules-2.10.8/debian/changelog 2018-11-02 16:13:20.000000000 -0400 +++ lttng-modules-2.10.8/debian/changelog 2020-11-03 11:46:36.000000000 -0500 @@ -1,3 +1,10 @@ +lttng-modules (2.10.8-1+deb10u1) buster; urgency=medium + + * [5c8aed8] Update debian/gbp.conf for buster + * [16882db] Fix build on >= 4.19.0-10 kernels (Closes: #972321) + + -- Michael Jeanson <mjean...@debian.org> Tue, 03 Nov 2020 11:46:36 -0500 + lttng-modules (2.10.8-1) unstable; urgency=medium * [7037820] New upstream version 2.10.8 diff -Nru lttng-modules-2.10.8/debian/gbp.conf lttng-modules-2.10.8/debian/gbp.conf --- lttng-modules-2.10.8/debian/gbp.conf 2018-07-04 11:21:39.000000000 -0400 +++ lttng-modules-2.10.8/debian/gbp.conf 2020-11-03 11:30:17.000000000 -0500 @@ -1,3 +1,3 @@ [DEFAULT] -upstream-branch=upstream/latest -debian-branch=debian/sid +upstream-branch=upstream/2.10.8 +debian-branch=debian/buster diff -Nru lttng-modules-2.10.8/debian/patches/0001-fix-writeback-Fix-sync-livelock-due-to-b_dirty_time-.patch lttng-modules-2.10.8/debian/patches/0001-fix-writeback-Fix-sync-livelock-due-to-b_dirty_time-.patch --- lttng-modules-2.10.8/debian/patches/0001-fix-writeback-Fix-sync-livelock-due-to-b_dirty_time-.patch 1969-12-31 19:00:00.000000000 -0500 +++ lttng-modules-2.10.8/debian/patches/0001-fix-writeback-Fix-sync-livelock-due-to-b_dirty_time-.patch 2020-11-03 11:30:17.000000000 -0500 @@ -0,0 +1,122 @@ +From 8e6be22dd4bf96b08447d075ce2fe3916f47764b Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <mjean...@efficios.com> +Date: Mon, 31 Aug 2020 14:16:01 -0400 +Subject: [PATCH] fix: writeback: Fix sync livelock due to b_dirty_time + processing (v5.9) + +See upstream commit: + + commit f9cae926f35e8230330f28c7b743ad088611a8de + Author: Jan Kara <j...@suse.cz> + Date: Fri May 29 16:08:58 2020 +0200 + + writeback: Fix sync livelock due to b_dirty_time processing + + When we are processing writeback for sync(2), move_expired_inodes() + didn't set any inode expiry value (older_than_this). This can result in + writeback never completing if there's steady stream of inodes added to + b_dirty_time list as writeback rechecks dirty lists after each writeback + round whether there's more work to be done. Fix the problem by using + sync(2) start time is inode expiry value when processing b_dirty_time + list similarly as for ordinarily dirtied inodes. This requires some + refactoring of older_than_this handling which simplifies the code + noticeably as a bonus. + +Change-Id: I99e505965d278565ae512a30842cdce888e0c84a +Signed-off-by: Michael Jeanson <mjean...@efficios.com> +Signed-off-by: Mathieu Desnoyers <mathieu.desnoy...@efficios.com> +--- + .../events/lttng-module/writeback.h | 46 +++++++++++++------ + 1 file changed, 33 insertions(+), 13 deletions(-) + +diff --git a/instrumentation/events/lttng-module/writeback.h b/instrumentation/events/lttng-module/writeback.h +index c472b33..353d58a 100644 +--- a/instrumentation/events/lttng-module/writeback.h ++++ b/instrumentation/events/lttng-module/writeback.h +@@ -371,34 +371,55 @@ LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_balance_dirty_wait, writeback_wbc_balanc + #endif + LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writepage, writeback_wbc_writepage) + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) || \ ++ LTTNG_KERNEL_RANGE(5,8,6, 5,9,0) || \ ++ LTTNG_KERNEL_RANGE(5,4,62, 5,5,0) || \ ++ LTTNG_KERNEL_RANGE(4,19,143, 4,20,0) || \ ++ LTTNG_KERNEL_RANGE(4,14,196, 4,15,0) || \ ++ LTTNG_KERNEL_RANGE(4,9,235, 4,10,0) || \ ++ LTTNG_KERNEL_RANGE(4,4,235, 4,5,0) || \ ++ LTTNG_UBUNTU_KERNEL_RANGE(4,15,18,119, 4,16,0,0)) ++LTTNG_TRACEPOINT_EVENT(writeback_queue_io, ++ TP_PROTO(struct bdi_writeback *wb, ++ struct wb_writeback_work *work, ++ unsigned long dirtied_before, ++ int moved), ++ TP_ARGS(wb, work, dirtied_before, moved), ++ TP_FIELDS( ++ ctf_array_text(char, name, dev_name(wb->bdi->dev), 32) ++ ctf_integer(unsigned long, older, dirtied_before) ++ ctf_integer(int, moved, moved) ++ ) ++) ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) + LTTNG_TRACEPOINT_EVENT(writeback_queue_io, + TP_PROTO(struct bdi_writeback *wb, +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) + struct wb_writeback_work *work, +-#else +- unsigned long *older_than_this, +-#endif + int moved), +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) + TP_ARGS(wb, work, moved), +-#else ++ TP_FIELDS( ++ ctf_array_text(char, name, dev_name(wb->bdi->dev), 32) ++ ctf_integer(int, moved, moved) ++ ) ++) ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) ++LTTNG_TRACEPOINT_EVENT(writeback_queue_io, ++ TP_PROTO(struct bdi_writeback *wb, ++ unsigned long *older_than_this, ++ int moved), + TP_ARGS(wb, older_than_this, moved), +-#endif + TP_FIELDS( + ctf_array_text(char, name, dev_name(wb->bdi->dev), 32) +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) +-#else + ctf_integer(unsigned long, older, + older_than_this ? *older_than_this : 0) + ctf_integer(long, age, + older_than_this ? + (jiffies - *older_than_this) * 1000 / HZ + : -1) +-#endif + ctf_integer(int, moved, moved) + ) + ) ++#endif + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)) + LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state, +@@ -424,7 +445,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state, + ctf_integer(unsigned long, dirty_limit, global_dirty_limit) + ) + ) +-#else ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) + LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state, + + writeback_global_dirty_state, +@@ -449,7 +470,6 @@ LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state, + ) + ) + #endif +-#endif + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) + +-- +2.20.1 + diff -Nru lttng-modules-2.10.8/debian/patches/0002-fix-KVM-x86-Use-gpa_t-for-cr2-gpa-to-fix-TDP-support.patch lttng-modules-2.10.8/debian/patches/0002-fix-KVM-x86-Use-gpa_t-for-cr2-gpa-to-fix-TDP-support.patch --- lttng-modules-2.10.8/debian/patches/0002-fix-KVM-x86-Use-gpa_t-for-cr2-gpa-to-fix-TDP-support.patch 1969-12-31 19:00:00.000000000 -0500 +++ lttng-modules-2.10.8/debian/patches/0002-fix-KVM-x86-Use-gpa_t-for-cr2-gpa-to-fix-TDP-support.patch 2020-11-03 11:46:15.000000000 -0500 @@ -0,0 +1,88 @@ +From 134984e912082ad82437514f07e21f31b46f61f9 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <mjean...@efficios.com> +Date: Tue, 11 Feb 2020 14:41:29 -0500 +Subject: [PATCH] fix: KVM: x86: Use gpa_t for cr2/gpa to fix TDP support on + 32-bit (v5.6) + +See upstream commit : + + commit 736c291c9f36b07f8889c61764c28edce20e715d + Author: Sean Christopherson <sean.j.christopher...@intel.com> + Date: Fri Dec 6 15:57:14 2019 -0800 + + KVM: x86: Use gpa_t for cr2/gpa to fix TDP support on 32-bit KVM + + Convert a plethora of parameters and variables in the MMU and page fault + flows from type gva_t to gpa_t to properly handle TDP on 32-bit KVM. + + Thanks to PSE and PAE paging, 32-bit kernels can access 64-bit physical + addresses. When TDP is enabled, the fault address is a guest physical + address and thus can be a 64-bit value, even when both KVM and its guest + are using 32-bit virtual addressing, e.g. VMX's VMCS.GUEST_PHYSICAL is a + 64-bit field, not a natural width field. + + Using a gva_t for the fault address means KVM will incorrectly drop the + upper 32-bits of the GPA. Ditto for gva_to_gpa() when it is used to + translate L2 GPAs to L1 GPAs. + + Opportunistically rename variables and parameters to better reflect the + dual address modes, e.g. use "cr2_or_gpa" for fault addresses and plain + "addr" instead of "vaddr" when the address may be either a GVA or an L2 + GPA. Similarly, use "gpa" in the nonpaging_page_fault() flows to avoid + a confusing "gpa_t gva" declaration; this also sets the stage for a + future patch to combing nonpaging_page_fault() and tdp_page_fault() with + minimal churn. + + Sprinkle in a few comments to document flows where an address is known + to be a GVA and thus can be safely truncated to a 32-bit value. Add + WARNs in kvm_handle_page_fault() and FNAME(gva_to_gpa_nested)() to help + document such cases and detect bugs. + +Signed-off-by: Michael Jeanson <mjean...@efficios.com> +Signed-off-by: Mathieu Desnoyers <mathieu.desnoy...@efficios.com> +--- + .../lttng-module/arch/x86/kvm/mmutrace.h | 26 +++++++++++++++++++ + 1 file changed, 26 insertions(+) + +--- a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h ++++ b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h +@@ -205,6 +205,30 @@ + ) + ) + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) || \ ++ LTTNG_KERNEL_RANGE(4,19,103, 4,20,0) || \ ++ LTTNG_KERNEL_RANGE(5,4,19, 5,5,0) || \ ++ LTTNG_KERNEL_RANGE(5,5,3, 5,6,0)) ++LTTNG_TRACEPOINT_EVENT_MAP( ++ fast_page_fault, ++ ++ kvm_mmu_fast_page_fault, ++ ++ TP_PROTO(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa, u32 error_code, ++ u64 *sptep, u64 old_spte, bool retry), ++ TP_ARGS(vcpu, cr2_or_gpa, error_code, sptep, old_spte, retry), ++ ++ TP_FIELDS( ++ ctf_integer(int, vcpu_id, vcpu->vcpu_id) ++ ctf_integer(gpa_t, cr2_or_gpa, cr2_or_gpa) ++ ctf_integer(u32, error_code, error_code) ++ ctf_integer_hex(u64 *, sptep, sptep) ++ ctf_integer(u64, old_spte, old_spte) ++ ctf_integer(u64, new_spte, *sptep) ++ ctf_integer(bool, retry, retry) ++ ) ++) ++#else + LTTNG_TRACEPOINT_EVENT_MAP( + fast_page_fault, + +@@ -224,6 +248,8 @@ + ctf_integer(bool, retry, retry) + ) + ) ++#endif ++ + #endif /* LTTNG_TRACE_KVM_MMU_H */ + + #undef TRACE_INCLUDE_PATH diff -Nru lttng-modules-2.10.8/debian/patches/series lttng-modules-2.10.8/debian/patches/series --- lttng-modules-2.10.8/debian/patches/series 2018-08-09 16:45:38.000000000 -0400 +++ lttng-modules-2.10.8/debian/patches/series 2020-11-03 11:46:15.000000000 -0500 @@ -1 +1,3 @@ fix-linux-rt-4.9-sched.patch +0001-fix-writeback-Fix-sync-livelock-due-to-b_dirty_time-.patch +0002-fix-KVM-x86-Use-gpa_t-for-cr2-gpa-to-fix-TDP-support.patch