Messages in this thread | | | Date | Thu, 15 Feb 2018 18:01:04 +0100 | From | Peter Zijlstra <> | Subject | Re: [PATCH V2] posix-timers: Protect posix clock array access against speculation |
| |
On Thu, Feb 15, 2018 at 05:21:55PM +0100, Thomas Gleixner wrote: > The clockid argument of clockid_to_kclock() comes straight from user space > via various syscalls and is used as index into the posix_clocks array. > > Protect it against spectre v1 array out of bounds speculation. Remove the > redundant check for !posix_clock[id] as this is another source for > speculation and does not provide any advantage over the return > posix_clock[id] path which returns NULL in that case anyway. > > Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > Cc: stable@vger.kernel.org
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
It might also be useful to figure out why the automation didn't flag this one, its about as trivial as it gets.
| |