qemu-devel
[Top][All Lists]
Advanced

[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: Wed, 08 Jan 2020 18:13:40 -0000

After applying my patch it seems like another issue was fixed: "emerge"
inside qemu has no permissions bug. Without that patch I was able to
reproduce "emerge" program can't apply any patch (permission denied). So
it looks like old hardcoded table has some wrong values that are not
compatible with current kernel.

So I think that generator is super critical for mips. With that patch I
am able to "emerge app-arch/gzip" inside qemu, works perfect. I will try
to rebuild a complete image inside qemu.

http://patchwork.ozlabs.org/patch/1217454/

I want to say that this patch is not safe. Zero values around "MIPS_SYS"
means that syscall can be processed but arguments won't be received from
stack (please see cpu loop switch). So when main code will receive a new
syscall support - mips will become broken. I can recommend to use -1
intead and add additional check for "nb_args".

-- 
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



reply via email to

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