diff options
| author | Juergen Lock <nox@FreeBSD.org> | 2013-08-20 22:03:10 +0000 |
|---|---|---|
| committer | Juergen Lock <nox@FreeBSD.org> | 2013-08-20 22:03:10 +0000 |
| commit | f2f3e3e60ae9a4520c8bdb2c66d879ab7a9923df (patch) | |
| tree | 6e410f147aab5715db036270b661a814dc7a0536 /emulators/qemu-devel/files/patch-z9d-bsd-user-sson003d | |
| parent | - Update sysutils/rsyslog7 to 7.4.3 (diff) | |
- Update to 1.6.0 - announce message is here:
https://lists.gnu.org/archive/html/qemu-devel/2013-08/msg02245.html
- Remove bsd-user support as sson's patches no longer apply, you can still
use his (older) git tree or my port of it on redports as described here:
https://wiki.freebsd.org/QemuUserModeHowTo
Notes
Notes:
svn path=/head/; revision=325077
Diffstat (limited to 'emulators/qemu-devel/files/patch-z9d-bsd-user-sson003d')
| -rw-r--r-- | emulators/qemu-devel/files/patch-z9d-bsd-user-sson003d | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/emulators/qemu-devel/files/patch-z9d-bsd-user-sson003d b/emulators/qemu-devel/files/patch-z9d-bsd-user-sson003d deleted file mode 100644 index 5dfbaa4ea476..000000000000 --- a/emulators/qemu-devel/files/patch-z9d-bsd-user-sson003d +++ /dev/null @@ -1,92 +0,0 @@ -diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c -index 8abb1dd..c2c3a65 100644 ---- a/bsd-user/elfload.c -+++ b/bsd-user/elfload.c -@@ -798,6 +798,7 @@ static abi_ulong setup_arg_pages(abi_ulong p, struct bsd_binprm *bprm, - p -= roundup(execpath_len, sizeof(abi_ulong)); - /* XXX - check return value of memcpy_to_target() */ - memcpy_to_target(p, execpath, execpath_len); -+ strlcpy(target_proc_pathname, execpath, execpath_len); - } - - /* Add canary for SSP. */ -diff --git a/bsd-user/main.c b/bsd-user/main.c -index bb614de..b6aaa7e 100644 ---- a/bsd-user/main.c -+++ b/bsd-user/main.c -@@ -62,6 +62,7 @@ unsigned long x86_stack_size = 512 * 1024; - - static void save_proc_pathname(void); - char qemu_proc_pathname[PATH_MAX]; -+char target_proc_pathname[PATH_MAX]; - - #ifdef __FreeBSD__ - static void -diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h -index 110b54e..d51f50c 100644 ---- a/bsd-user/qemu.h -+++ b/bsd-user/qemu.h -@@ -224,6 +224,7 @@ void mmap_fork_end(int child); - /* main.c */ - extern unsigned long x86_stack_size; - extern char qemu_proc_pathname[]; -+extern char target_proc_pathname[]; - - /* user access */ - -diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c -index 74b5c86..636083a 100644 ---- a/bsd-user/syscall.c -+++ b/bsd-user/syscall.c -@@ -485,8 +485,6 @@ static abi_long do_freebsd_sysctl(abi_ulong namep, int32_t namelen, abi_ulong ol - abi_ulong oldlen = 0; - int32_t *snamep = g_malloc(sizeof(int32_t) * namelen), *p, *q, i; - uint32_t kind = 0; -- abi_ulong argv, argv0; -- char *fullpath = NULL; - - if (oldlenp) - if (get_user_ual(oldlen, oldlenp)) -@@ -533,30 +531,14 @@ static abi_long do_freebsd_sysctl(abi_ulong namep, int32_t namelen, abi_ulong ol - case KERN_PROC: - switch(snamep[2]) { - case KERN_PROC_PATHNAME: -- if (get_user_ual(argv, TARGET_PS_STRINGS)) { -- ret = -TARGET_EFAULT; -- goto out; -- } -- if (get_user_ual(argv0, argv)) { -- ret = -TARGET_EFAULT; -- goto out; -- } -- -- fullpath = realpath(g2h(argv0), NULL); -- if (NULL == fullpath) -- fullpath = (char *)g2h(argv0); -- holdlen = strlen(fullpath) + 1; -+ holdlen = strlen(target_proc_pathname) + 1; - if (holdp) { - if (oldlen < holdlen) { - ret = -TARGET_EINVAL; - goto out; - } -- if (!access_ok(VERIFY_WRITE, argv0, -- holdlen)) { -- ret = -TARGET_EFAULT; -- goto out; -- } -- strlcpy(holdp, fullpath, oldlen); -+ strlcpy(holdp, target_proc_pathname, -+ oldlen); - } - ret = 0; - goto out; -@@ -597,8 +579,6 @@ static abi_long do_freebsd_sysctl(abi_ulong namep, int32_t namelen, abi_ulong ol - #endif - - out: -- if (fullpath) -- free(fullpath); - if (oldlenp) - put_user_ual(holdlen, oldlenp); - unlock_user(hnamep, namep, 0); |
