qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2.2 v3] linux-user: Fix up timer id handling


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 2.2 v3] linux-user: Fix up timer id handling
Date: Mon, 10 Nov 2014 18:24:09 +0000

On 10 November 2014 18:21, Alexander Graf <address@hidden> wrote:
> When creating a timer handle, we give the timer id a special magic offset
> of 0xcafe0000. However, we never mask that offset out of the timer id before
> we start using it to dereference our timer array. So we always end up aborting
> timer operations because the timer id is out of bounds.
>
> This was not an issue before my patch e52a99f756e ("linux-user: Simplify
> timerid checks on g_posix_timers range") because before we would blindly mask
> anything above the first 16 bits.
>
> This patch simplifies the code around timer id creation by introducing a 
> proper
> target_timer_id typedef that is s32, just like Linux has it. It also changes 
> the
> magic offset to a value that makes all timer ids be positive.
>
> Reported-by: Tom Musta <address@hidden>
> Signed-off-by: Alexander Graf <address@hidden>

Reviewed-by: Peter Maydell <address@hidden>

Thanks for putting up with all my nitpicking...

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]