Re: [PATCH] fix fanotify_mark() breakage on big endian 32bit kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Dave
--
John David Anglin	dave.anglin@xxxxxxxx



--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux