Skip to content

Commit

Permalink
adding sources for updates of patches
Browse files Browse the repository at this point in the history
  • Loading branch information
blurbdust committed Oct 27, 2019
1 parent 1eb2c7d commit 3558573
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions qemu_mode/patches/syscall.diff
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
*** qemu-2.12.1-clean/linux-user/syscall.c 2018-08-02 16:48:53.000000000 -0500
--- qemu-2.12.1/linux-user/syscall.c 2019-10-26 21:21:36.654046752 -0500
--- qemu-2.12.1/linux-user/syscall.c 2019-10-26 21:28:55.618582602 -0500
***************
*** 34,39 ****
--- 34,40 ----
#include <sys/resource.h>
#include <sys/swap.h>
#include <linux/capability.h>
+ #include <linux/sockios.h>
+ #include <linux/sockios.h> // https://lkml.org/lkml/2019/6/3/988
#include <sched.h>
#include <sys/timex.h>
#include <sys/socket.h>
Expand All @@ -30,10 +30,11 @@
#else
/* This is a replacement for the host gettid() and must return a host
errno. */
--- 254,261 ----
--- 254,262 ----
#endif

#ifdef __NR_gettid
! // taken from https://patchwork.kernel.org/patch/10862231/
! #define __NR_sys_gettid __NR_gettid
! _syscall0(int, sys_gettid)
#else
Expand All @@ -48,32 +49,39 @@
task_settid(ts);
if (info->child_tidptr)
put_user_u32(info->tid, info->child_tidptr);
--- 6316,6322 ----
--- 6317,6324 ----
cpu = ENV_GET_CPU(env);
thread_cpu = cpu;
ts = (TaskState *)cpu->opaque;
! // taken from https://patchwork.kernel.org/patch/10862231/
! info->tid = sys_gettid();
task_settid(ts);
if (info->child_tidptr)
put_user_u32(info->tid, info->child_tidptr);
***************
*** 6457,6465 ****
*** 6456,6465 ****
(not implemented) or having *_tidptr to point at a shared memory
mapping. We can't repeat the spinlock hack used above because
the child process gets its own copy of the lock. */
if (flags & CLONE_CHILD_SETTID)
! if (flags & CLONE_CHILD_SETTID)
! put_user_u32(gettid(), child_tidptr);
if (flags & CLONE_PARENT_SETTID)
! if (flags & CLONE_PARENT_SETTID)
! put_user_u32(gettid(), parent_tidptr);
ts = (TaskState *)cpu->opaque;
if (flags & CLONE_SETTLS)
cpu_set_tls (env, newtls);
--- 6461,6469 ----
--- 6462,6475 ----
(not implemented) or having *_tidptr to point at a shared memory
mapping. We can't repeat the spinlock hack used above because
the child process gets its own copy of the lock. */
if (flags & CLONE_CHILD_SETTID)
! if (flags & CLONE_CHILD_SETTID) {
! // taken from https://patchwork.kernel.org/patch/10862231/
! put_user_u32(sys_gettid(), child_tidptr);
if (flags & CLONE_PARENT_SETTID)
! }
! if (flags & CLONE_PARENT_SETTID) {
! // taken from https://patchwork.kernel.org/patch/10862231/
! put_user_u32(sys_gettid(), parent_tidptr);
! }
ts = (TaskState *)cpu->opaque;
if (flags & CLONE_SETTLS)
cpu_set_tls (env, newtls);
Expand All @@ -86,10 +94,11 @@
break;
#ifdef TARGET_NR_readahead
case TARGET_NR_readahead:
--- 11676,11682 ----
--- 11682,11689 ----
break;
#endif
case TARGET_NR_gettid:
! // taken from https://patchwork.kernel.org/patch/10862231/
! ret = get_errno(sys_gettid());
break;
#ifdef TARGET_NR_readahead
Expand Down

0 comments on commit 3558573

Please sign in to comment.