lkml.org 
[lkml]   [2017]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] futex: use fault_in to avoid infinite loop
On Wed, Dec 06, 2017 at 10:21:07PM +0800, Cheng Jian wrote:
> It will cause softlockup(infinite loop) in kernel
> space when we use SYS_set_robust_list in futex which
> incoming a misaligned address from user space.

Urgh, we should not allow that in the first place.

See how get_futex_key() does:

if (unlikely(address % sizeof(u32)))
return -EINVAL;

That same should also be true for the robust list. Using unaligned
variables is insane.

\
 
 \ /
  Last update: 2017-12-06 17:04    [W:0.054 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site