qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v5 05/20] linux-user: mips: Update syscall numbers to kernel


From: Laurent Vivier
Subject: Re: [PATCH v5 05/20] linux-user: mips: Update syscall numbers to kernel 5.5 rc3 level
Date: Tue, 4 Feb 2020 23:34:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1

Le 04/02/2020 à 12:56, Aleksandar Markovic a écrit :
> On Tue, Jan 14, 2020 at 5:40 PM Laurent Vivier <address@hidden> wrote:
>>
>> Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit :
>>> From: Aleksandar Markovic <address@hidden>
>>>
>>> Update mips syscall numbers based on Linux kernel tag v5.5-rc3
>>> (commit 46cf053e).
>>>
>>> Signed-off-by: Aleksandar Markovic <address@hidden>
>>> ---
>>>  linux-user/mips/cpu_loop.c     | 78 
>>> +++++++++++++++++++++++++++++++++++++++++-
>>>  linux-user/mips/syscall_nr.h   | 45 ++++++++++++++++++++++++
>>>  linux-user/mips64/syscall_nr.h | 13 +++++++
>>>  3 files changed, 135 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/linux-user/mips/cpu_loop.c b/linux-user/mips/cpu_loop.c
>>> index 39915b3..b81479b 100644
>>> --- a/linux-user/mips/cpu_loop.c
>>> +++ b/linux-user/mips/cpu_loop.c
>>> @@ -25,8 +25,9 @@
>>>  #include "internal.h"
>>>
>>>  # ifdef TARGET_ABI_MIPSO32
>>> +#  define MIPS_SYSCALL_NUMBER_UNUSED -1
>>
>> I'm not sure you need to introduce this change.
>>
>> The case already exists (stat, fstat, old_select, lstat, ...) and the
>> entry that was used is:
>>
>>            MIPS_SYS(sys_ni_syscall , 0)
>>
>> perhaps you can do the same ?
>>
> 
> I like better the new way of dealing with this (like in this patch), since it 
> is
> more explicit. For now, I won't change this patch, if you agree, and later on
> I will synchronize all such cases to be the same (but this is not critical for
> the time being).

So Perhaps you can do:

#  define MIPS_SYSCALL_NUMBER_UNUSED 0

And so the real availability of the syscall will be detected in
do_syscall1() based on a "#ifdef TARGET_XXXX" (well, not sure
syscall_nr.h differentiates O32 and N32)

By the way, do we really need this table?

It seems kernel is always copying 4 words from the stack.
But kernel code is not really clear, perhaps I'm missing something...

In the end, as you are the MIPS maintainer, you can choose the solution
you prefer.

Thanks,
Laurent



reply via email to

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