History

Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull rseq fixes from Ingo Molnar: "Two rseq bugfixes: - CLONE_VM !CLONE_THREAD didn't work properly, the kernel would end up corrupting the TLS of the parent. Technically a change in the ABI but the previous behavior couldn't resonably have been relied on by applications so this looks like a valid exception to the ABI rule. - Make the RSEQ_FLAG_UNREGISTER ABI behavior consistent with the handling of other flags. This is not thought to impact any applications either" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rseq: Unregister rseq for clone CLONE_VM rseq: Reject unknown flags on rseq unregister

Linus Torvalds committed 6 years ago

Commit ba0f4722 parents 8cac899 463f5502 files · +4 −2Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/sched.h+2−2
@@ -1929,11 +1929,11 @@ static inline void rseq_migrate(struct task_struct *t) · 1928 unmodified lines
1929 1929
1930/*1930/*
1931 * If parent process has a registered restartable sequences area, the1931 * If parent process has a registered restartable sequences area, the
1932 * child inherits. Only applies when forking a process, not a thread.1932 * child inherits. Unregister rseq for a clone with CLONE_VM set.
1933 */1933 */
1934static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags)1934static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags)
1935{1935{
1936 if (clone_flags & CLONE_THREAD) {1936 if (clone_flags & CLONE_VM) {
1937 t->rseq = NULL;1937 t->rseq = NULL;
1938 t->rseq_sig = 0;1938 t->rseq_sig = 0;
1939 t->rseq_event_mask = 0;1939 t->rseq_event_mask = 0;