> On Nov 14, 2018, at 13:46, Bae, Chang Seok <[email protected]> wrote: > > int copy_thread_tls(unsigned long clone_flags, unsigned long sp, > @@ -758,11 +720,45 @@ long do_arch_prctl_64(struct task_struct *task, int > option, unsigned long arg2) > > switch (option) { > case ARCH_SET_GS: { > - ret = x86_gsbase_write_task(task, arg2); > + preempt_disable(); > + if (unlikely(arg2 >= TASK_SIZE_MAX)) > + return -EPERM;
Sorry, preempt_disabled() should go after this. Chang

