aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/init_task.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-02 21:24:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-02 21:24:16 -0400
commit76f1948a79b26d5f57a5ee9941876b745c6baaea (patch)
treea2c42578e31acabc61db2115d91e467cea439cd7 /include/linux/init_task.h
parent7af4c727c7b6104f94f2ffc3d0899e75a9cc1e55 (diff)
parenta0841609f658c77f066af9c61a2e13143564fcb4 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching
Pull livepatch updates from Jiri Kosina: - a per-task consistency model is being added for architectures that support reliable stack dumping (extending this, currently rather trivial set, is currently in the works). This extends the nature of the types of patches that can be applied by live patching infrastructure. The code stems from the design proposal made [1] back in November 2014. It's a hybrid of SUSE's kGraft and RH's kpatch, combining advantages of both: it uses kGraft's per-task consistency and syscall barrier switching combined with kpatch's stack trace switching. There are also a number of fallback options which make it quite flexible. Most of the heavy lifting done by Josh Poimboeuf with help from Miroslav Benes and Petr Mladek [1] https://lkml.kernel.org/r/20141107140458.GA21774@suse.cz - module load time patch optimization from Zhou Chengming - a few assorted small fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: livepatch: add missing printk newlines livepatch: Cancel transition a safe way for immediate patches livepatch: Reduce the time of finding module symbols livepatch: make klp_mutex proper part of API livepatch: allow removal of a disabled patch livepatch: add /proc/<pid>/patch_state livepatch: change to a per-task consistency model livepatch: store function sizes livepatch: use kstrtobool() in enabled_store() livepatch: move patching functions into patch.c livepatch: remove unnecessary object loaded check livepatch: separate enabled and patched states livepatch/s390: add TIF_PATCH_PENDING thread flag livepatch/s390: reorganize TIF thread flag bits livepatch/powerpc: add TIF_PATCH_PENDING thread flag livepatch/x86: add TIF_PATCH_PENDING thread flag livepatch: create temporary klp_update_patch_state() stub x86/entry: define _TIF_ALLWORK_MASK flags explicitly stacktrace/x86: add function for detecting reliable stack traces
Diffstat (limited to 'include/linux/init_task.h')
-rw-r--r--include/linux/init_task.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 2c487e0879d5..82be96564266 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -15,6 +15,7 @@
15#include <linux/sched/autogroup.h> 15#include <linux/sched/autogroup.h>
16#include <net/net_namespace.h> 16#include <net/net_namespace.h>
17#include <linux/sched/rt.h> 17#include <linux/sched/rt.h>
18#include <linux/livepatch.h>
18#include <linux/mm_types.h> 19#include <linux/mm_types.h>
19 20
20#include <asm/thread_info.h> 21#include <asm/thread_info.h>
@@ -203,6 +204,13 @@ extern struct cred init_cred;
203# define INIT_KASAN(tsk) 204# define INIT_KASAN(tsk)
204#endif 205#endif
205 206
207#ifdef CONFIG_LIVEPATCH
208# define INIT_LIVEPATCH(tsk) \
209 .patch_state = KLP_UNDEFINED,
210#else
211# define INIT_LIVEPATCH(tsk)
212#endif
213
206#ifdef CONFIG_THREAD_INFO_IN_TASK 214#ifdef CONFIG_THREAD_INFO_IN_TASK
207# define INIT_TASK_TI(tsk) \ 215# define INIT_TASK_TI(tsk) \
208 .thread_info = INIT_THREAD_INFO(tsk), \ 216 .thread_info = INIT_THREAD_INFO(tsk), \
@@ -289,6 +297,7 @@ extern struct cred init_cred;
289 INIT_VTIME(tsk) \ 297 INIT_VTIME(tsk) \
290 INIT_NUMA_BALANCING(tsk) \ 298 INIT_NUMA_BALANCING(tsk) \
291 INIT_KASAN(tsk) \ 299 INIT_KASAN(tsk) \
300 INIT_LIVEPATCH(tsk) \
292} 301}
293 302
294 303