[lkml]   [2014]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] fix fanotify_mark() breakage on big endian 32bit kernel
On 6-Jul-14, at 5:15 AM, Heiko Carstens wrote:

>> But for the CONFIG_COMPAT=n case (32bit kernel & userspace),
>> compat_fanotify_mark() isn't used and the fanotify_mark syscall
>> implementation
>> is used directly. In that case the upper and lower 32 bits of the
>> 64bit mask
>> parameter is still swapped on big endian machines and thus leads to
>> fanotify_mark failing with -EINVAL.
> Why do you think upper and lower 32 bits are swapped on big endian
> machines?
> At least an s390 the C ABI defines that 64 bit values are split into
> an
> even odd register pair, where the most significant bits are in the
> even numbered
> register.

On hppa, there is no specific rule as to which registers are used to
hold 64-bit integer values
on 32-bit machines except for the first two call arguments which are
passed in registers.
For example, r25 and r26 contain the first argument and the most
significant bits are in r25
and the least significant bits in r26..

In GCC, we typically have an odd even register pair to hold 64-bit
values as register
r0 is not usable.

The rules are different for float values.

John David Anglin

 \ /
  Last update: 2014-07-06 17:41    [W:0.089 / U:27.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site