]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86: thread_info.h: move RDS from index 5 to 23
authorMihai Carabas <mihai.carabas@oracle.com>
Fri, 18 May 2018 09:42:44 +0000 (12:42 +0300)
committerBrian Maly <brian.maly@oracle.com>
Mon, 21 May 2018 22:04:32 +0000 (18:04 -0400)
commitcaa8c564e0623d57622a4610852087b1fb6f29aa
tree2cfc1170f3474d157170a16cc2264dc7d75c9a8f
parent42992cc10f204cb600499030a31eb1299bca3e78
x86: thread_info.h: move RDS from index 5 to 23

In UEK4, the thread flags field is split in two parts:
- lower bits of the word which are used usually for "pending work-to-be-done"
- upper bits of the word

There is a comment in arch/x86/include/asm/thread_info.h:88 where it says that
the lower bits are hard-coded in entry_64.S. In entry_64.S a mask of 0x0000ffff
is used to check the state of the thread and determine if it would go to
userspace or not. Because we used bit "5", which was in the lower bits part,
one of the checked condition was always true and the program never returned
from kernel.

We moved RDS to bit 23 which was free to solve the issue.

OraBug: 28041771
CVE: CVE-2018-3639

Signed-off-by: Mihai Carabas <mihai.carabas@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/include/asm/thread_info.h