diff -Nru lttng-modules-2.9.0/debian/changelog lttng-modules-2.9.0/debian/changelog --- lttng-modules-2.9.0/debian/changelog 2017-06-26 13:53:11.000000000 +0000 +++ lttng-modules-2.9.0/debian/changelog 2017-07-17 10:57:59.000000000 +0000 @@ -1,3 +1,10 @@ +lttng-modules (2.9.0-1ubuntu3) artful; urgency=medium + + * Fix missing ftrace headers on v4.11 (LP: #1704720) + - adjust a previous kernel version check from v4.12 to v4.11 + + -- Colin Ian King Mon, 17 Jul 2017 11:57:59 +0100 + lttng-modules (2.9.0-1ubuntu2) artful; urgency=medium * Cherry picks to fix build isues with 4.11 and 4.12 (LP: #1699755) diff -Nru lttng-modules-2.9.0/debian/patches/0023-Fix-missing-ftrace-header-on-v4.11.patch lttng-modules-2.9.0/debian/patches/0023-Fix-missing-ftrace-header-on-v4.11.patch --- lttng-modules-2.9.0/debian/patches/0023-Fix-missing-ftrace-header-on-v4.11.patch 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.9.0/debian/patches/0023-Fix-missing-ftrace-header-on-v4.11.patch 2017-07-17 10:56:14.000000000 +0000 @@ -0,0 +1,30 @@ +Subject: Fix: handle missing ftrace header on v4.11 + +Properly handle the case where we build against the distro headers of a +kernel >= 4.11 and ftrace is enabled but the private header is +unavailable. + +Signed-off-by: Colin Ian King + +Index: lttng-modules-2.9.0/Makefile.ABI.workarounds +=================================================================== +--- lttng-modules-2.9.0.orig/Makefile.ABI.workarounds ++++ lttng-modules-2.9.0/Makefile.ABI.workarounds +@@ -22,7 +22,7 @@ ifneq ($(RT_PATCH_VERSION), 0) + ccflags-y += -DRT_PATCH_VERSION=$(RT_PATCH_VERSION) + endif + +-# Starting with kernel 4.12, the ftrace header was moved to private headers ++# Starting with kernel 4.11, the ftrace header was moved to private headers + # and as such is not available when building against distro headers instead + # of the full kernel sources. In the situation, define LTTNG_FTRACE_MISSING_HEADER + # so we can enable the compat code even if CONFIG_DYNAMIC_FTRACE is enabled. +@@ -30,7 +30,7 @@ ifneq ($(CONFIG_DYNAMIC_FTRACE),) + ftrace_dep = $(srctree)/kernel/trace/trace.h + ftrace_dep_check = $(wildcard $(ftrace_dep)) + have_ftrace_header = $(shell \ +- if [ $(VERSION) -ge 5 -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -ge 12 \) ] ; then \ ++ if [ $(VERSION) -ge 5 -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -ge 11 \) ] ; then \ + if [ -z "$(ftrace_dep_check)" ] ; then \ + echo "no" ; \ + exit ; \ diff -Nru lttng-modules-2.9.0/debian/patches/series lttng-modules-2.9.0/debian/patches/series --- lttng-modules-2.9.0/debian/patches/series 2017-06-26 12:32:11.000000000 +0000 +++ lttng-modules-2.9.0/debian/patches/series 2017-07-17 10:53:44.000000000 +0000 @@ -20,3 +20,4 @@ 0020-Fix-Build-ftrace-probe-on-kernels-prior-to-4.12.patch 0021-Fix-handle-missing-ftrace-header-on-v4.12.patch 0022-Fix-section-mismatch-warning-caused-by-__exit-annota.patch +0023-Fix-missing-ftrace-header-on-v4.11.patch