lkml.org 
[lkml]   [2018]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: crash binary for latest unreleased kernel
From
Date
On Wed, 2018-01-31 at 04:51 +0100, Mike Galbraith wrote:
> On Sun, 2018-01-28 at 12:19 -0800, Joe Smith wrote:
> > Thanks a lot, Mike. Following your suggestions worked !!!!
>
> Until Monday happened :)

And during a rare non-lazy-sod moment...

---
task.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

--- a/task.c
+++ b/task.c
@@ -438,8 +438,21 @@ task_init(void)
len = SIZE(task_union));
machdep->stacksize = len;
} else if (VALID_SIZE(thread_union) &&
- ((len = SIZE(thread_union)) != STACKSIZE()))
+ ((len = SIZE(thread_union)) != STACKSIZE())) {
machdep->stacksize = len;
+ } else {
+ /*
+ * Post kernel commit 0500871f21b2, init_thread_union size
+ * became zero. Use __end_init_task - __start_init_task.
+ */
+ if (kernel_symbol_exists("__start_init_task") &&
+ kernel_symbol_exists("__end_init_task")) {
+ len = symbol_value("__end_init_task");
+ len -= symbol_value("__start_init_task");
+ ASSIGN_SIZE(thread_union) = len;
+ machdep->stacksize = len;
+ }
+ }

MEMBER_OFFSET_INIT(pid_namespace_idr, "pid_namespace", "idr");
MEMBER_OFFSET_INIT(idr_idr_rt, "idr", "idr_rt");
\
 
 \ /
  Last update: 2018-01-31 17:04    [W:0.032 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site