[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171206160400.yzewed5juhytfwyy@hirez.programming.kicks-ass.net>
Date: Wed, 6 Dec 2017 17:04:00 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Cheng Jian <cj.chengjian@...wei.com>
Cc: tglx@...utronix.de, mingo@...hat.com, dvhart@...radead.org,
linux-kernel@...r.kernel.org, xiexiuqi@...wei.com,
huawei.libin@...wei.com
Subject: Re: [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.
Powered by blists - more mailing lists