Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 11 Jul 2016 09:42:42 -0700
From: Linus Torvalds <>
To: Mark Rutland <>
Cc: Andy Lutomirski <>, 
	"" <>, Nadav Amit <>, 
	Kees Cook <>, Borislav Petkov <>, 
	Josh Poimboeuf <>, X86 ML <>, Jann Horn <>, 
	Heiko Carstens <>, Brian Gerst <>, 
	"" <>, 
	"" <>
Subject: Re: [PATCH v4 26/29] sched: Allow putting
 thread_info into task_struct

On Mon, Jul 11, 2016 at 9:31 AM, Mark Rutland <> wrote:
>> So until you do the wire that actually disables preemption you can
>> schedule away as much as you want, and after that write you no longer
>> will.
> I was assuming a percpu pointer to current (or preempt count).

So for the same reason that is ok *iff* you have

 - some kind of dedicated percpu register (or other base pointer - x86
has the segment thing) that gets updated when you schedule.

 - an instruction that can load 'current' directly off that register atomically.

But yes, percpu data in general is obviously not safe to access
without preemption.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.