lkml.org 
[lkml]   [2015]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC]: Possible race condition in kernel futex code
From
Date
Hi Thomas,

On 9 okt. 2015, at 11:06, Thomas Gleixner <tglx@linutronix.de> wrote:
On Mon, 5 Oct 2015, Jaccon Bastiaansen wrote:
>> We did some tests with different compilers, kernel versions and kernel
>> configs, with the following results:

> You cannot use an explicit 32bit read. We need an access which handles the fault gracefully.

The reason for the explicit read suggestion is to avoid the _builtin_constant_p() in __copy_from_user_nocheck(). The GCC manual says that there may be situations where it returns 0 even though the argument is a constant. Although none of the compiler/kernel combinations we have tried showed this happening, we think it is probably better to be safe than sorry.

With kind regards,
Hans Zuidam



\
 
 \ /
  Last update: 2015-10-09 12:01    [W:0.088 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site