summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsk7.park <sk7.park@samsung.com>2023-03-20 17:53:19 +0900
committersk7.park <sk7.park@samsung.com>2023-03-20 17:53:19 +0900
commit075051bcdb00c2d645f44d383df2eaa2f1901f4a (patch)
tree77c44e2ede09adeea56a2700884a6882f87012e3
parentd316b70127085c37f24e4b0b756188c445047f73 (diff)
downloadqemu-075051bcdb00c2d645f44d383df2eaa2f1901f4a.tar.gz
qemu-075051bcdb00c2d645f44d383df2eaa2f1901f4a.tar.bz2
qemu-075051bcdb00c2d645f44d383df2eaa2f1901f4a.zip
Fix sendrecvmsg() with QEMU_GUEST_BASEsandbox/soong9/qemu_baselibs
Change-Id: I6b8a4caf6ea224fe99ab2d0f4d81c068c3e5c1a6
-rw-r--r--linux-user/syscall_defs.h2
-rw-r--r--packaging/baselibs.conf12
2 files changed, 1 insertions, 13 deletions
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index cabbfb762..ca90e628c 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -386,7 +386,7 @@ __target_cmsg_nxthdr(struct target_msghdr *__mhdr,
__ptr = (struct target_cmsghdr *)((unsigned char *) __cmsg
+ TARGET_CMSG_ALIGN (tswapal(__cmsg->cmsg_len)));
- if ((unsigned long)((char *)(__ptr+1) - (char *)__cmsg_start)
+ if ((unsigned long)((char *)(h2g(__ptr+1)) - (char *)__cmsg_start)
> tswapal(__mhdr->msg_controllen)) {
/* No more entries. */
return (struct target_cmsghdr *)0;
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
index 1bdecf57a..171880810 100644
--- a/packaging/baselibs.conf
+++ b/packaging/baselibs.conf
@@ -33,12 +33,8 @@ targettype cross package qemu-linux-user
post "# workaround for using ldd on non-pie executable causes segfault"
post "# ex) ldd /usr/bin/which"
post "# ldd: exited with unknown exit code (139)"
- post "%ifarch aarch64 armv7l"
post "%ifarch aarch64"
post "echo 'export QEMU_GUEST_BASE=0x5500000000' > /etc/profile.d/qemu_base.sh"
- post "%else"
- post "echo 'export QEMU_GUEST_BASE=0x3fe3c000' > /etc/profile.d/qemu_base.sh"
- post "%endif"
post "chmod 755 /etc/profile.d/qemu_base.sh"
post "%endif"
@@ -64,12 +60,8 @@ targettype x86_64-cross package qemu-linux-user
post "# workaround for using ldd on non-pie executable causes segfault"
post "# ex) ldd /usr/bin/which"
post "# ldd: exited with unknown exit code (139)"
- post "%ifarch aarch64 armv7l"
post "%ifarch aarch64"
post "echo 'export QEMU_GUEST_BASE=0x5500000000' > /etc/profile.d/qemu_base.sh"
- post "%else"
- post "echo 'export QEMU_GUEST_BASE=0x3fe3c000' > /etc/profile.d/qemu_base.sh"
- post "%endif"
post "chmod 755 /etc/profile.d/qemu_base.sh"
post "%endif"
@@ -95,11 +87,7 @@ targettype x86-cross package qemu-linux-user
post "# workaround for using ldd on non-pie executable causes segfault"
post "# ex) ldd /usr/bin/which"
post "# ldd: exited with unknown exit code (139)"
- post "%ifarch aarch64 armv7l"
post "%ifarch aarch64"
post "echo 'export QEMU_GUEST_BASE=0x5500000000' > /etc/profile.d/qemu_base.sh"
- post "%else"
- post "echo 'export QEMU_GUEST_BASE=0x3fe3c000' > /etc/profile.d/qemu_base.sh"
- post "%endif"
post "chmod 755 /etc/profile.d/qemu_base.sh"
post "%endif"