Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90981
b: refs/heads/master
c: 8fb402b
h: refs/heads/master
i:
  90979: cb6fb4e
v: v3
  • Loading branch information
Erik Bosman authored and Ingo Molnar committed Apr 19, 2008
1 parent 06a47ed commit 03a0843
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5deb45e39b946901ae028ccd3a1d0b35fa387475
refs/heads/master: 8fb402bccf203ecca8f9e0202b8fd3c937dece6f
6 changes: 6 additions & 0 deletions trunk/include/linux/prctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,10 @@
#define PR_CAPBSET_READ 23
#define PR_CAPBSET_DROP 24

/* Get/set the process' ability to use the timestamp counter instruction */
#define PR_GET_TSC 25
#define PR_SET_TSC 26
# define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */
# define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */

#endif /* _LINUX_PRCTL_H */
13 changes: 12 additions & 1 deletion trunk/kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
#ifndef SET_ENDIAN
# define SET_ENDIAN(a,b) (-EINVAL)
#endif
#ifndef GET_TSC_CTL
# define GET_TSC_CTL(a) (-EINVAL)
#endif
#ifndef SET_TSC_CTL
# define SET_TSC_CTL(a) (-EINVAL)
#endif

/*
* this is where the system-wide overflow UID and GID are defined, for
Expand Down Expand Up @@ -1737,7 +1743,12 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
#else
return -EINVAL;
#endif

case PR_GET_TSC:
error = GET_TSC_CTL(arg2);
break;
case PR_SET_TSC:
error = SET_TSC_CTL(arg2);
break;
default:
error = -EINVAL;
break;
Expand Down

0 comments on commit 03a0843

Please sign in to comment.