puzzle of ioctl decode in file_ioctl.c and userfaultfd.c

2016-12-11 Thread jingpiao chen
Version:4.14-ab28d7f1e5ab9b51f5708741bd13f92e768123d4 1.file_ioctl.c:130 125 int 126 file_ioctl(struct tcb *tcp, const unsigned int code, const long arg) 127 { 128 switch (code) { 129 case FICLONE: /* W */ 130 tprintf(", %d", (int) arg); 131 break

Patch: Fix libunwind segfault when -p is passed before -k

2016-12-11 Thread Sean Stangl
There is a segfault if strace is called as `strace -p 2260 -k`. The -k flag sets a global bool stack_trace_enabled. But -p already consults stack_trace_enabled during tcb initialization. So if -p is passed first, the libunwind components of the tcb are uninitialized. The attached patch fixes this