[PATCH 14/16] x86, mpx: do 32-bit-only cmpxchg for 32-bit apps

2015-03-31 Thread Dave Hansen
From: Dave Hansen user_atomic_cmpxchg_inatomic() actually looks at sizeof(*ptr) to figure out how many bytes to copy. If we run it on a 64-bit kernel with a 64-bit pointer, it will copy a 64-bit bounds directory entry. That's fine, except when we have 32-bit programs with 32-bit bounds

[PATCH 14/16] x86, mpx: do 32-bit-only cmpxchg for 32-bit apps

2015-03-31 Thread Dave Hansen
From: Dave Hansen dave.han...@linux.intel.com user_atomic_cmpxchg_inatomic() actually looks at sizeof(*ptr) to figure out how many bytes to copy. If we run it on a 64-bit kernel with a 64-bit pointer, it will copy a 64-bit bounds directory entry. That's fine, except when we have 32-bit