From: "Bae, Chang Seok" <chang.seok.bae@intel.com>
To: Andy Lutomirski <luto@kernel.org>, Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
"H . Peter Anvin" <hpa@zytor.com>,
Andi Kleen <ak@linux.intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
"Shankar, Ravi V" <ravi.v.shankar@intel.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4] x86/fsgsbase/64: Fix the base write helper functions
Date: Fri, 16 Nov 2018 23:27:27 +0000 [thread overview]
Message-ID: <7A9F766D-333A-4ED5-8C3C-AE3BEBE39C69@intel.com> (raw)
In-Reply-To: <20181114214641.8573-1-chang.seok.bae@intel.com>
> On Nov 14, 2018, at 13:46, Bae, Chang Seok <chang.seok.bae@intel.com> 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
prev parent reply other threads:[~2018-11-16 23:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-14 21:46 [PATCH v4] x86/fsgsbase/64: Fix the base write helper functions Chang S. Bae
2018-11-16 23:27 ` Bae, Chang Seok [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7A9F766D-333A-4ED5-8C3C-AE3BEBE39C69@intel.com \
--to=chang.seok.bae@intel.com \
--cc=ak@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=ravi.v.shankar@intel.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).