Commit 3b2a4d39 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging



Fixes in syscall numbers,
disable the build of binaries not needed for linux-user,
update of qemu-binfmt-conf.sh and cleanup around is_error()

# gpg: Signature made Tue 12 Jun 2018 11:57:18 BST
# gpg:                using RSA key F30C38BD3F2FBE3C
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>"
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier2/tags/linux-user-for-3.0-pull-request:
  linux-user/sparc64: Add inotify_rm_watch and tee syscalls
  linux-user/microblaze: Fix typo in accept4 syscall
  linux-user/hppa: Fix typo in mknodat syscall
  linux-user/alpha: Fix epoll syscalls
  qemu-binfmt-conf.sh: ignore the OS/ABI field
  linux-user: disable qemu-bridge-helper and socket_scm_helper build
  linux-user: Use is_error() to avoid warnings and make the code clearer
  linux-user: Export use is_error(), use it to avoid warnings

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 2ab09bf2 dec1c928
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -351,7 +351,7 @@ $(call set-vpath, $(SRC_PATH))

LIBS+=-lz $(LIBS_TOOLS)

HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF)

ifdef BUILD_DOCS
DOCS=qemu-doc.html qemu-doc.txt qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8
+3 −3
Original line number Diff line number Diff line
@@ -343,9 +343,9 @@
#define TARGET_NR_io_cancel			402
#define TARGET_NR_exit_group			405
#define TARGET_NR_lookup_dcookie		406
#define TARGET_NR_sys_epoll_create		407
#define TARGET_NR_sys_epoll_ctl		408
#define TARGET_NR_sys_epoll_wait		409
#define TARGET_NR_epoll_create          407
#define TARGET_NR_epoll_ctl             408
#define TARGET_NR_epoll_wait            409
#define TARGET_NR_remap_file_pages		410
#define TARGET_NR_set_tid_address		411
#define TARGET_NR_restart_syscall		412
+9 −6
Original line number Diff line number Diff line
@@ -224,8 +224,9 @@ static int decompress_exec(
		ret = bprm->file->f_op->read(bprm->file, buf, LBUFSIZE, &fpos);
		if (ret <= 0)
			break;
		if (ret >= (unsigned long) -4096)
                if (is_error(ret)) {
			break;
                }
		len -= ret;

		strm.next_in = buf;
@@ -283,8 +284,7 @@ calc_reloc(abi_ulong r, struct lib_info *p, int curid, int internalp)
                    "in same module (%d != %d)\n",
                    (unsigned) r, curid, id);
            goto failed;
        } else if ( ! p[id].loaded &&
                    load_flat_shared_library(id, p) > (unsigned long) -4096) {
        } else if (!p[id].loaded && is_error(load_flat_shared_library(id, p))) {
            fprintf(stderr, "BINFMT_FLAT: failed to load library %d\n", id);
            goto failed;
        }
@@ -523,10 +523,11 @@ static int load_flat_file(struct linux_binprm * bprm,
                fpos = 0;
                result = bprm->file->f_op->read(bprm->file,
                                (char *) textpos, text_len, &fpos);
                if (result < (unsigned long) -4096)
                if (!is_error(result)) {
                        result = decompress_exec(bprm, text_len, (char *) datapos,
                                         data_len + (relocs * sizeof(unsigned long)), 0);
                }
        }
        else
#endif
        {
@@ -693,8 +694,9 @@ static int load_flat_shared_library(int id, struct lib_info *libs)

	res = prepare_binprm(&bprm);

	if (res <= (unsigned long)-4096)
        if (!is_error(res)) {
		res = load_flat_file(&bprm, libs, id, NULL);
        }
	if (bprm.file) {
		allow_write_access(bprm.file);
		fput(bprm.file);
@@ -737,8 +739,9 @@ int load_flt_binary(struct linux_binprm *bprm, struct image_info *info)


    res = load_flat_file(bprm, libinfo, 0, &stack_len);
    if (res > (unsigned long)-4096)
    if (is_error(res)) {
            return res;
    }

    /* Update data segment pointers for all libraries */
    for (i=0; i<MAX_SHARED_LIBS; i++) {
+1 −1
Original line number Diff line number Diff line
@@ -279,7 +279,7 @@
#define TARGET_NR_ppoll             274
#define TARGET_NR_openat            275
#define TARGET_NR_mkdirat           276
#define TARGET_NR_mknotat           277
#define TARGET_NR_mknodat           277
#define TARGET_NR_fchownat          278
#define TARGET_NR_futimesat         279
#define TARGET_NR_fstatat64         280
+1 −1
Original line number Diff line number Diff line
@@ -363,7 +363,7 @@
#define TARGET_NR_shutdown		359 /* new */
#define TARGET_NR_sendmsg		360 /* new */
#define TARGET_NR_recvmsg		361 /* new */
#define TARGET_NR_accept04		362 /* new */
#define TARGET_NR_accept4               362 /* new */
#define TARGET_NR_preadv                363 /* new */
#define TARGET_NR_pwritev               364 /* new */
#define TARGET_NR_rt_tgsigqueueinfo     365 /* new */
Loading