qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let lv always match val i


From: Chen Gang
Subject: Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let lv always match val in do_getsockopt()
Date: Thu, 14 Jan 2016 17:37:13 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

On 2016年01月14日 17:10, Laurent Vivier wrote:
> 
> Le 14/01/2016 10:01, Chen Gang a écrit :
>>
>> I am not quite sure whether kernel always returns sizeof(int) (I guess,
>> it should be).
> 
> it can be 1 only if len is 1, but this is managed below.
> 

Excuse me, I do not quite understand your meaning.

For me, if we are sure lv is always 4 for SO_TYPE, we don't need this
patch.

If lv may be 1 for SO_TYPE (it means val >> 8 may be zero), after call
host_to_target_sock_type, val >> 8 may be non-zero, theoretically. In
this case, we need modify lv to 4.

>> For me, if you are sure, we can skip this patch.
> 
> Does it fix something ?
> 

It is only theoretical, not real world, at present.

Thanks.
-- 
Chen Gang (陈刚)

Open, share, and attitude like air, water, and life which God blessed



reply via email to

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