Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1][krogoth] Fix systemtap
@ 2016-07-07 17:10 Tom Zanussi
  2016-07-07 17:10 ` [PATCH 1/1][krogoth] systemtap: Add missing memory flag to fix stap module compilation Tom Zanussi
  2016-07-07 22:15 ` [PATCH 0/1][krogoth] Fix systemtap akuster808
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Zanussi @ 2016-07-07 17:10 UTC (permalink / raw)
  To: akuster, openembedded-core

This patch is required for systemtap to work with krogoth and the 4.4 kernel.

The following changes since commit 98c57bb512ea6790db8604fcf0b88c81651d2ab4:

  build-appliance-image: Update to krogoth head revision (2016-07-06 17:28:04 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib tzanussi/systemtap-memory-flags-krogoth
  http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/systemtap-memory-flags-krogoth

Tom Zanussi (1):
  systemtap: Add missing memory flag to fix stap module compilation

 ...48-by-updating-systemtap-s-memory-flag-us.patch | 73 ++++++++++++++++++++++
 meta/recipes-kernel/systemtap/systemtap_git.inc    |  1 +
 2 files changed, 74 insertions(+)
 create mode 100644 meta/recipes-kernel/systemtap/systemtap/0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch

-- 
1.9.3



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1][krogoth] systemtap: Add missing memory flag to fix stap module compilation
  2016-07-07 17:10 [PATCH 0/1][krogoth] Fix systemtap Tom Zanussi
@ 2016-07-07 17:10 ` Tom Zanussi
  2016-07-07 22:15 ` [PATCH 0/1][krogoth] Fix systemtap akuster808
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Zanussi @ 2016-07-07 17:10 UTC (permalink / raw)
  To: akuster, openembedded-core

The 4.4 kernel removed some memory flag definitions, which cause
module compilation errors, rendering sytemtap essentially useless in
krogoth.

The problem is fixed in systemtap 3.0 and therefore in master, but as
mentioned in Systemtap BZ1285348, the fix for older versions is this
patch.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 ...48-by-updating-systemtap-s-memory-flag-us.patch | 73 ++++++++++++++++++++++
 meta/recipes-kernel/systemtap/systemtap_git.inc    |  1 +
 2 files changed, 74 insertions(+)
 create mode 100644 meta/recipes-kernel/systemtap/systemtap/0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch

diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch b/meta/recipes-kernel/systemtap/systemtap/0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch
new file mode 100644
index 0000000..4c34d77
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch
@@ -0,0 +1,73 @@
+From 3d010295efd215cf83a7d07eecf89137973c154a Mon Sep 17 00:00:00 2001
+Message-Id: <3d010295efd215cf83a7d07eecf89137973c154a.1467836241.git.tom.zanussi@linux.intel.com>
+From: Jesper Brouer <jbrouer@redhat.com>
+Date: Mon, 30 Nov 2015 11:24:29 -0600
+Subject: [PATCH] Fix BZ1285348 by updating systemtap's memory flag usage.
+
+* runtime/linux/runtime_defines.h: Make sure __GFP_WAIT is defined.
+* runtime/stp_utrace.c (utrace_task_alloc): Change GFP_IOFS to
+  STP_ALLOC_FLAGS.
+  (utrace_attach_task): Ditto.
+
+Upstream-Status: Backport
+
+Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
+---
+ runtime/linux/runtime_defines.h | 23 +++++++++++++++++++++++
+ runtime/stp_utrace.c            |  5 +++--
+ 2 files changed, 26 insertions(+), 2 deletions(-)
+
+diff --git a/runtime/linux/runtime_defines.h b/runtime/linux/runtime_defines.h
+index e69de29..6b44e0d 100644
+--- a/runtime/linux/runtime_defines.h
++++ b/runtime/linux/runtime_defines.h
+@@ -0,0 +1,23 @@
++// The following kernel commit renamed __GFP_WAIT to __GRP_RECLAIM:
++//
++//   commit 71baba4b92dc1fa1bc461742c6ab1942ec6034e9
++//   Author: Mel Gorman <mgorman@techsingularity.net>
++//   Date:   Fri Nov 6 16:28:28 2015 -0800
++// 
++//       mm, page_alloc: rename __GFP_WAIT to __GFP_RECLAIM
++//     
++//       __GFP_WAIT was used to signal that the caller was in atomic
++//       context and could not sleep.  Now it is possible to
++//       distinguish between true atomic context and callers that are
++//       not willing to sleep.  The latter should clear
++//       __GFP_DIRECT_RECLAIM so kswapd will still wake.  As clearing
++//       __GFP_WAIT behaves differently, there is a risk that people
++//       will clear the wrong flags.  This patch renames __GFP_WAIT to
++//       __GFP_RECLAIM to clearly indicate what it does -- setting it
++//       allows all reclaim activity, clearing them prevents it.
++//
++// Handle the rename by defining __GFP_WAIT as __GFP_RECLAIM.
++#include <linux/gfp.h>
++#ifndef __GFP_WAIT
++#define __GFP_WAIT __GFP_RECLAIM
++#endif
+diff --git a/runtime/stp_utrace.c b/runtime/stp_utrace.c
+index c69dec1..a8afc0d 100644
+--- a/runtime/stp_utrace.c
++++ b/runtime/stp_utrace.c
+@@ -511,7 +511,8 @@ static struct utrace *__task_utrace_struct(struct task_struct *task)
+  */
+ static bool utrace_task_alloc(struct task_struct *task)
+ {
+-	struct utrace *utrace = kmem_cache_zalloc(utrace_cachep, GFP_IOFS);
++	struct utrace *utrace = kmem_cache_zalloc(utrace_cachep,
++						  STP_ALLOC_FLAGS);
+ 	struct utrace *u;
+ 
+ 	if (unlikely(!utrace))
+@@ -782,7 +783,7 @@ static struct utrace_engine *utrace_attach_task(
+ 		utrace = task_utrace_struct(target);
+ 	}
+ 
+-	engine = kmem_cache_alloc(utrace_engine_cachep, GFP_IOFS);
++	engine = kmem_cache_alloc(utrace_engine_cachep, STP_ALLOC_FLAGS);
+ 	if (unlikely(!engine))
+ 		return ERR_PTR(-ENOMEM);
+ 
+-- 
+2.5.0
+
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index 656f15f..2ea98b2 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -9,6 +9,7 @@ SRC_URI = "git://sourceware.org/git/systemtap.git \
            file://system_map_location.patch \
            file://configure-allow-to-disable-libvirt.patch \
            file://x32_abi_time.patch \
+           file://0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch \
           "
 
 # systemtap doesn't support mips
-- 
1.9.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/1][krogoth] Fix systemtap
  2016-07-07 17:10 [PATCH 0/1][krogoth] Fix systemtap Tom Zanussi
  2016-07-07 17:10 ` [PATCH 1/1][krogoth] systemtap: Add missing memory flag to fix stap module compilation Tom Zanussi
@ 2016-07-07 22:15 ` akuster808
  1 sibling, 0 replies; 3+ messages in thread
From: akuster808 @ 2016-07-07 22:15 UTC (permalink / raw)
  To: openembedded-core



On 07/07/2016 10:10 AM, Tom Zanussi wrote:
> This patch is required for systemtap to work with krogoth and the 4.4 kernel.
> 
> The following changes since commit 98c57bb512ea6790db8604fcf0b88c81651d2ab4:
> 
>   build-appliance-image: Update to krogoth head revision (2016-07-06 17:28:04 +0100)

merged into  akuster/krogoth-next for staging.

thanks,
Armin

> 
> are available in the git repository at:
> 
>   git://git.yoctoproject.org/poky-contrib tzanussi/systemtap-memory-flags-krogoth
>   http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/systemtap-memory-flags-krogoth
> 
> Tom Zanussi (1):
>   systemtap: Add missing memory flag to fix stap module compilation
> 
>  ...48-by-updating-systemtap-s-memory-flag-us.patch | 73 ++++++++++++++++++++++
>  meta/recipes-kernel/systemtap/systemtap_git.inc    |  1 +
>  2 files changed, 74 insertions(+)
>  create mode 100644 meta/recipes-kernel/systemtap/systemtap/0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-07 22:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-07 17:10 [PATCH 0/1][krogoth] Fix systemtap Tom Zanussi
2016-07-07 17:10 ` [PATCH 1/1][krogoth] systemtap: Add missing memory flag to fix stap module compilation Tom Zanussi
2016-07-07 22:15 ` [PATCH 0/1][krogoth] Fix systemtap akuster808

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox