Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 28 Jan 2018 11:19:38 -0800
From: Linus Torvalds <>
To: Andy Lutomirski <>
Cc: "the arch/x86 maintainers" <>, LKML <>, 
	Kernel Hardening <>, Borislav Petkov <>
Subject: Re: [PATCH 2/3] x86/asm: Move 'status' from thread_struct to thread_info

On Sun, Jan 28, 2018 at 10:38 AM, Andy Lutomirski <> wrote:
> Linus suggested further changing:
>   ti->status &= ~(TS_COMPAT|TS_I386_REGS_POKED);
> to:
>   if (unlikely(ti->status & (TS_COMPAT|TS_I386_REGS_POKED)))
>           ti->status &= ~(TS_COMPAT|TS_I386_REGS_POKED);
> on the theory that frequently dirtying the cacheline even in pure
> 64-bit code that never needs to modify status hurts performance.
> That could be a reasonable followup patch, but I suspect it matters
> less on top of this patch.

Ack, that should be done separately from the movement anyway.

And yes, it's possible that once it's in the same cacheline with the
thread flags, you can't even see the issue anyway. Although I *think*
all those early fields are normally mostly read-only, so that "read
before clear" may end up being a good idea regardless.


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.