Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 155238 Details for
Bug 240958
utrace: PTRACE_SYSCALL cannot modify syscall parameters
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Testcase workarounding the CLONE_PTRACE kernel bug.
clone.c (text/plain), 1.17 KB, created by
Jan Kratochvil
on 2007-05-23 13:53:57 UTC
(
hide
)
Description:
Testcase workarounding the CLONE_PTRACE kernel bug.
Filename:
MIME Type:
Creator:
Jan Kratochvil
Created:
2007-05-23 13:53:57 UTC
Size:
1.17 KB
patch
obsolete
>#include <unistd.h> >#include <assert.h> >#include <sys/types.h> >#include <sys/wait.h> >#include <stdlib.h> >#include <sched.h> >#include <sys/mman.h> > >//#undef CLONE_PTRACE > >static int >child_func (void *arg) >{ > _exit (EXIT_SUCCESS); > abort (); >} > >int >main (void) >{ >#ifndef PAGE_SIZE >#define PAGE_SIZE 0x1000 >#endif > const size_t stack_size = PAGE_SIZE; > unsigned char *stack = mmap (NULL, stack_size, PROT_READ | PROT_WRITE, > MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); > int child_tid; > pid_t pid_got; > int status; > > assert (stack != NULL); > assert (stack != MAP_FAILED); > stack[0] = 0; > stack[stack_size - 1] = 0; > >#ifndef CLONE_PTRACE >#define CLONE_PTRACE 0 >#endif > >#ifdef __ia64__ > extern int __clone2 (int (*fn) (void *arg), void *child_stack, > size_t stack_size, int flags, void *arg); > child_tid = __clone2 (child_func, stack + stack_size, stack_size, > CLONE_PTRACE, NULL); >#else /* !__ia64__ */ > child_tid = clone (child_func, stack + stack_size, CLONE_PTRACE, NULL); >#endif /* !__ia64__ */ > > pid_got = waitpid (child_tid, &status, __WCLONE); > assert (pid_got == child_tid); > assert (WIFEXITED (status)); > assert (WEXITSTATUS (status) == 0); > > return EXIT_SUCCESS; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 240958
:
155237
| 155238