Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
38195dd5
Commit
38195dd5
authored
Jul 10, 2019
by
Jiri Kosina
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-5.3/core' into for-linus
parents
aec71d79
ac59a471
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
11 deletions
+8
-11
kernel/livepatch/transition.c
kernel/livepatch/transition.c
+8
-3
kernel/stacktrace.c
kernel/stacktrace.c
+0
-8
No files found.
kernel/livepatch/transition.c
View file @
38195dd5
...
...
@@ -259,7 +259,6 @@ static int klp_check_stack(struct task_struct *task, char *err_buf)
int
ret
,
nr_entries
;
ret
=
stack_trace_save_tsk_reliable
(
task
,
entries
,
ARRAY_SIZE
(
entries
));
WARN_ON_ONCE
(
ret
==
-
ENOSYS
);
if
(
ret
<
0
)
{
snprintf
(
err_buf
,
STACK_ERR_BUF_SIZE
,
"%s: %s:%d has an unreliable stack
\n
"
,
...
...
@@ -293,11 +292,11 @@ static int klp_check_stack(struct task_struct *task, char *err_buf)
*/
static
bool
klp_try_switch_task
(
struct
task_struct
*
task
)
{
static
char
err_buf
[
STACK_ERR_BUF_SIZE
];
struct
rq
*
rq
;
struct
rq_flags
flags
;
int
ret
;
bool
success
=
false
;
char
err_buf
[
STACK_ERR_BUF_SIZE
];
err_buf
[
0
]
=
'\0'
;
...
...
@@ -305,6 +304,13 @@ static bool klp_try_switch_task(struct task_struct *task)
if
(
task
->
patch_state
==
klp_target_state
)
return
true
;
/*
* For arches which don't have reliable stack traces, we have to rely
* on other methods (e.g., switching tasks at kernel exit).
*/
if
(
!
klp_have_reliable_stack
())
return
false
;
/*
* Now try to check the stack for any to-be-patched or to-be-unpatched
* functions. If all goes well, switch the task to the target patch
...
...
@@ -340,7 +346,6 @@ static bool klp_try_switch_task(struct task_struct *task)
pr_debug
(
"%s"
,
err_buf
);
return
success
;
}
/*
...
...
kernel/stacktrace.c
View file @
38195dd5
...
...
@@ -254,14 +254,6 @@ save_stack_trace_regs(struct pt_regs *regs, struct stack_trace *trace)
WARN_ONCE
(
1
,
KERN_INFO
"save_stack_trace_regs() not implemented yet.
\n
"
);
}
__weak
int
save_stack_trace_tsk_reliable
(
struct
task_struct
*
tsk
,
struct
stack_trace
*
trace
)
{
WARN_ONCE
(
1
,
KERN_INFO
"save_stack_tsk_reliable() not implemented yet.
\n
"
);
return
-
ENOSYS
;
}
/**
* stack_trace_save - Save a stack trace into a storage array
* @store: Pointer to storage array
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment