[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 9fea27: linux-user: Fix llseek with high bit
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] 9fea27: linux-user: Fix llseek with high bit of offset_low... |
Date: |
Tue, 16 Aug 2016 09:30:04 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 9fea273c8511dd6e34138d028db774b031c0f70c
https://github.com/qemu/qemu/commit/9fea273c8511dd6e34138d028db774b031c0f70c
Author: Peter Maydell <address@hidden>
Date: 2016-08-16 (Tue, 16 Aug 2016)
Changed paths:
M linux-user/syscall.c
Log Message:
-----------
linux-user: Fix llseek with high bit of offset_low set
The llseek syscall takes two 32-bit arguments, offset_high
and offset_low, which must be combined to form a single
64-bit offset. Unfortunately we were combining them with
(uint64_t)arg2 << 32) | arg3
and arg3 is a signed type; this meant that when promoting
arg3 to a 64-bit type it would be sign-extended. The effect
was that if the offset happened to have bit 31 set then
this bit would get sign-extended into all of bits 63..32.
Explicitly cast arg3 to abi_ulong to avoid the erroneous
sign extension.
Reported-by: Chanho Park <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Tested-by: Chanho Park <address@hidden>
Message-id: address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 9fea27: linux-user: Fix llseek with high bit of offset_low...,
GitHub <=