qemu-devel
[Top][All Lists]
Advanced

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

[Bug 1894071] Re: qemu-i386-static ioctl return -14 (Bad Address)


From: Tony.LI
Subject: [Bug 1894071] Re: qemu-i386-static ioctl return -14 (Bad Address)
Date: Fri, 04 Sep 2020 03:51:17 -0000

Hi,I found some problems, but I don't know if how to solve it better(I'm
not really familiar with the source code).

When I use ioctl() and use a structure like this:

struct drm_mode_card_res {
        __u64 fb_id_ptr;
        __u64 crtc_id_ptr;
        __u64 connector_id_ptr;
        __u64 encoder_id_ptr;
        __u32 count_fbs;
        ....
};

Look,"fb_id_ptr" is a pointer,and apply for memory allocation through 
malloc.But I use qemu-i386 on 64 bit ARM.As a result, my pointer has no problem 
in QEMU, but it is wrong when I use ioctl(bad address).This address is actually 
an address in QEMU, but it is not the correct address in a 64 bit machine.
Is there any better way to solve this problem?

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1894071

Title:
  qemu-i386-static ioctl return -14 (Bad Address)

Status in QEMU:
  New

Bug description:
  I use qemu-i386-static on 64 bit ARM.But I don't know how to solve some 
problems.
  First I added some ioctl operations.
  Then I tried to do some DRM operations like test.c.
  This is successful when I use qemu-x86_64-static,but it failed when I use 
qemu-i386-static.
  I can get some strace info like this:

  403 openat(AT_FDCWD,"/dev/dri/card0",O_RDWR|O_LARGEFILE|O_CLOEXEC) = 4
  403 ioctl(4,DRM_IOCTL_GET_CAP,{1,0}) = 0 ({1,1})
  403 ioctl(4,DRM_IOCTL_MODE_GETRESOURCES,{0,0,0,0,0,0,0,0,0,0,0,0}) = 0 
({0,0,0,0,0,2,2,2,0,16384,0,16384})
  403 brk(NULL) = 0x40006000
  403 brk(0x40027000) = 0x40027000
  403 brk(0x40028000) = 0x40028000
  403 
ioctl(4,DRM_IOCTL_MODE_GETRESOURCES,{0,1073766816,1073766832,1073766848,0,2,2,2,0,16384,0,16384})
 = -1 errno=14 (Bad address)

  And there are similar errors in other self driven operations.
  I want to know if it is QEMU's problem, so I hope to get some help. 
  Thank you!

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1894071/+subscriptions



reply via email to

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