[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150422155840.GJ6897@pd.tnic>
Date: Wed, 22 Apr 2015 17:58:40 +0200
From: Borislav Petkov <bp@...en8.de>
To: Oleg Nesterov <oleg@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>
Cc: Dave Hansen <dave@...1.net>, linux-kernel@...r.kernel.org,
x86@...nel.org, dave.hansen@...ux.intel.com, riel@...hat.com,
sbsiddha@...il.com, luto@...capital.net, mingo@...hat.com,
hpa@...or.com, fenghua.yu@...el.com
Subject: Re: [PATCH 01/16] x86, fpu: wrap get_xsave_addr() to make it safer
On Wed, Apr 22, 2015 at 05:32:45PM +0200, Oleg Nesterov wrote:
> How? I am certainly missing you point... OK, please forge about FPU.
> Consider this code:
>
> tsk = current;
> for (;;)
> BUG_ON(tsk != current);
>
> it doesn't need to disable preemption. We do not care if CPU switches
> to another thread, even if this thread executes the same code. Because
> its tsk/current will differ, but "tsk == current" will be still true.
>
> Could you please spell?
Bah, forget what I said. tglx schooled me on IRC. We always do get
called with tsk == current. Sorry for the confusion...
> See above... used_math() should be correct because we know that tsk==current,
> but I agree that tsk_used_math(tsk) looks better.
Right, and it is clear what's going on, even to lusers like me.
Thanks for teaching me guys.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists