[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug 1858461] Re: Please refactor linux-user/mips/cpu_loop.c
From: |
puchuu |
Subject: |
[Bug 1858461] Re: Please refactor linux-user/mips/cpu_loop.c |
Date: |
Mon, 06 Jan 2020 23:32:39 -0000 |
Please do not use previous workaround in prod, it is bad, just proof of
concept.
It looks like nobody is maintaining syscall list. It is not possible to
trust it.
We have "arch/mips/kernel/syscalls/syscall_o32.tbl", we need to create
generator. Generator should provide maximum possible number of arguments
for syscall. For example:
> sync_file_range sys_sync_file_range sys32_sync_file_range
"sys_sync_file_range" has 4 arguments, "sys32_sync_file_range" - 7
arguments. Maximum value - 7 should be stored inside our table.
The problem is that some syscalls in kernel code is prefixed by
SYSCALL_DEFINE{N} or COMPAT_SYSCALL_DEFINE{N}. but some (like
"sys_sync_file_range" and "sys32_sync_file_range") are not prefixed.
So I think we may have a generator that provides "WAT?" if it don't know
the arguments count and require to update value manualy.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1858461
Title:
Please refactor linux-user/mips/cpu_loop.c
Status in QEMU:
New
Bug description:
Hello. I am working with qemu on test images. I've added a new syscall
(436) to qemu but received ENOSYS from mips application.
Please open "linux-user/mips/cpu_loop.c". I've added at the end of
"mips_syscall_args" the following:
```
MIPS_SYS(sys_getdents64_x32, 3)
```
But
```
syscall_num = env->active_tc.gpr[2] - 4000;
if (syscall_num >= sizeof(mips_syscall_args)) {
ret = -TARGET_ENOSYS;
```
returns -TARGET_ENOSYS
We can see that "linux-user/mips/cpu_loop.c" differs a lot from
"linux-user/arm/cpu_loop.c". Arm has it's own "ARM_NR_BASE" and etc.
Can you please refactor mips cpu loop in the same way as arm? Thank
you.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1858461/+subscriptions
- [Bug 1858461] [NEW] Please refactor linux-user/mips/cpu_loop.c, puchuu, 2020/01/06
- [Bug 1858461] Re: Please refactor linux-user/mips/cpu_loop.c, puchuu, 2020/01/06
- [Bug 1858461] Re: Please refactor linux-user/mips/cpu_loop.c,
puchuu <=
- [Bug 1858461] Re: Please refactor linux-user/mips/cpu_loop.c, puchuu, 2020/01/06
- [Bug 1858461] Re: Please refactor linux-user/mips/cpu_loop.c, puchuu, 2020/01/07
- [Bug 1858461] Re: Please refactor linux-user/mips/cpu_loop.c, puchuu, 2020/01/07
- [Bug 1858461] Re: Please refactor linux-user/mips/cpu_loop.c, puchuu, 2020/01/07
- [Bug 1858461] Re: Please refactor linux-user/mips/cpu_loop.c, Aleksandar Markovic, 2020/01/07
- [Bug 1858461] Re: Please refactor linux-user/mips/cpu_loop.c, Aleksandar Markovic, 2020/01/08
- [Bug 1858461] Re: Please refactor linux-user/mips/cpu_loop.c, puchuu, 2020/01/08
- [Bug 1858461] Re: Please refactor linux-user/mips/cpu_loop.c, puchuu, 2020/01/08