Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
2f5c576e
Commit
2f5c576e
authored
Apr 09, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://linux-dj.bkbits.net/agpgart
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
9709b813
c8690d4e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
61 additions
and
59 deletions
+61
-59
include/linux/sysctl.h
include/linux/sysctl.h
+4
-4
kernel/posix-timers.c
kernel/posix-timers.c
+13
-11
kernel/printk.c
kernel/printk.c
+2
-2
kernel/ptrace.c
kernel/ptrace.c
+9
-10
kernel/softirq.c
kernel/softirq.c
+2
-2
kernel/sysctl.c
kernel/sysctl.c
+26
-25
kernel/time.c
kernel/time.c
+3
-3
kernel/uid16.c
kernel/uid16.c
+2
-2
No files found.
include/linux/sysctl.h
View file @
2f5c576e
...
@@ -679,8 +679,8 @@ extern void sysctl_init(void);
...
@@ -679,8 +679,8 @@ extern void sysctl_init(void);
typedef
struct
ctl_table
ctl_table
;
typedef
struct
ctl_table
ctl_table
;
typedef
int
ctl_handler
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
typedef
int
ctl_handler
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
void
__user
*
newval
,
size_t
newlen
,
void
**
context
);
void
**
context
);
typedef
int
proc_handler
(
ctl_table
*
ctl
,
int
write
,
struct
file
*
filp
,
typedef
int
proc_handler
(
ctl_table
*
ctl
,
int
write
,
struct
file
*
filp
,
...
@@ -707,8 +707,8 @@ extern int do_sysctl (int *name, int nlen,
...
@@ -707,8 +707,8 @@ extern int do_sysctl (int *name, int nlen,
extern
int
do_sysctl_strategy
(
ctl_table
*
table
,
extern
int
do_sysctl_strategy
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
void
**
context
);
void
__user
*
newval
,
size_t
newlen
,
void
**
context
);
extern
ctl_handler
sysctl_string
;
extern
ctl_handler
sysctl_string
;
extern
ctl_handler
sysctl_intvec
;
extern
ctl_handler
sysctl_intvec
;
...
...
kernel/posix-timers.c
View file @
2f5c576e
...
@@ -341,7 +341,7 @@ static void posix_timer_fn(unsigned long __data)
...
@@ -341,7 +341,7 @@ static void posix_timer_fn(unsigned long __data)
* Here we define a mask to get rid of the common bits. The
* Here we define a mask to get rid of the common bits. The
* optimizer should make this costless to all but mips.
* optimizer should make this costless to all but mips.
*/
*/
#if
(ARCH == mips) || (ARCH == mips64
)
#if
defined(ARCH) && ((ARCH == mips) || (ARCH == mips64)
)
#define MIPS_SIGEV ~(SIGEV_NONE & \
#define MIPS_SIGEV ~(SIGEV_NONE & \
SIGEV_SIGNAL & \
SIGEV_SIGNAL & \
SIGEV_THREAD & \
SIGEV_THREAD & \
...
@@ -402,7 +402,8 @@ static void release_posix_timer(struct k_itimer *tmr)
...
@@ -402,7 +402,8 @@ static void release_posix_timer(struct k_itimer *tmr)
asmlinkage
long
asmlinkage
long
sys_timer_create
(
clockid_t
which_clock
,
sys_timer_create
(
clockid_t
which_clock
,
struct
sigevent
*
timer_event_spec
,
timer_t
*
created_timer_id
)
struct
sigevent
__user
*
timer_event_spec
,
timer_t
__user
*
created_timer_id
)
{
{
int
error
=
0
;
int
error
=
0
;
struct
k_itimer
*
new_timer
=
NULL
;
struct
k_itimer
*
new_timer
=
NULL
;
...
@@ -623,7 +624,7 @@ do_timer_gettime(struct k_itimer *timr, struct itimerspec *cur_setting)
...
@@ -623,7 +624,7 @@ do_timer_gettime(struct k_itimer *timr, struct itimerspec *cur_setting)
/* Get the time remaining on a POSIX.1b interval timer. */
/* Get the time remaining on a POSIX.1b interval timer. */
asmlinkage
long
asmlinkage
long
sys_timer_gettime
(
timer_t
timer_id
,
struct
itimerspec
*
setting
)
sys_timer_gettime
(
timer_t
timer_id
,
struct
itimerspec
__user
*
setting
)
{
{
struct
k_itimer
*
timr
;
struct
k_itimer
*
timr
;
struct
itimerspec
cur_setting
;
struct
itimerspec
cur_setting
;
...
@@ -801,8 +802,8 @@ do_timer_settime(struct k_itimer *timr, int flags,
...
@@ -801,8 +802,8 @@ do_timer_settime(struct k_itimer *timr, int flags,
/* Set a POSIX.1b interval timer */
/* Set a POSIX.1b interval timer */
asmlinkage
long
asmlinkage
long
sys_timer_settime
(
timer_t
timer_id
,
int
flags
,
sys_timer_settime
(
timer_t
timer_id
,
int
flags
,
const
struct
itimerspec
*
new_setting
,
const
struct
itimerspec
__user
*
new_setting
,
struct
itimerspec
*
old_setting
)
struct
itimerspec
__user
*
old_setting
)
{
{
struct
k_itimer
*
timr
;
struct
k_itimer
*
timr
;
struct
itimerspec
new_spec
,
old_spec
;
struct
itimerspec
new_spec
,
old_spec
;
...
@@ -985,7 +986,7 @@ int do_posix_clock_monotonic_settime(struct timespec *tp)
...
@@ -985,7 +986,7 @@ int do_posix_clock_monotonic_settime(struct timespec *tp)
}
}
asmlinkage
long
asmlinkage
long
sys_clock_settime
(
clockid_t
which_clock
,
const
struct
timespec
*
tp
)
sys_clock_settime
(
clockid_t
which_clock
,
const
struct
timespec
__user
*
tp
)
{
{
struct
timespec
new_tp
;
struct
timespec
new_tp
;
...
@@ -1002,7 +1003,7 @@ sys_clock_settime(clockid_t which_clock, const struct timespec *tp)
...
@@ -1002,7 +1003,7 @@ sys_clock_settime(clockid_t which_clock, const struct timespec *tp)
}
}
asmlinkage
long
asmlinkage
long
sys_clock_gettime
(
clockid_t
which_clock
,
struct
timespec
*
tp
)
sys_clock_gettime
(
clockid_t
which_clock
,
struct
timespec
__user
*
tp
)
{
{
struct
timespec
rtn_tp
;
struct
timespec
rtn_tp
;
int
error
=
0
;
int
error
=
0
;
...
@@ -1021,7 +1022,7 @@ sys_clock_gettime(clockid_t which_clock, struct timespec *tp)
...
@@ -1021,7 +1022,7 @@ sys_clock_gettime(clockid_t which_clock, struct timespec *tp)
}
}
asmlinkage
long
asmlinkage
long
sys_clock_getres
(
clockid_t
which_clock
,
struct
timespec
*
tp
)
sys_clock_getres
(
clockid_t
which_clock
,
struct
timespec
__user
*
tp
)
{
{
struct
timespec
rtn_tp
;
struct
timespec
rtn_tp
;
...
@@ -1074,7 +1075,7 @@ extern long do_clock_nanosleep(clockid_t which_clock, int flags,
...
@@ -1074,7 +1075,7 @@ extern long do_clock_nanosleep(clockid_t which_clock, int flags,
#ifdef FOLD_NANO_SLEEP_INTO_CLOCK_NANO_SLEEP
#ifdef FOLD_NANO_SLEEP_INTO_CLOCK_NANO_SLEEP
asmlinkage
long
asmlinkage
long
sys_nanosleep
(
struct
timespec
*
rqtp
,
struct
timespec
*
rmtp
)
sys_nanosleep
(
struct
timespec
__user
*
rqtp
,
struct
timespec
__user
*
rmtp
)
{
{
struct
timespec
t
;
struct
timespec
t
;
long
ret
;
long
ret
;
...
@@ -1096,7 +1097,8 @@ sys_nanosleep(struct timespec *rqtp, struct timespec *rmtp)
...
@@ -1096,7 +1097,8 @@ sys_nanosleep(struct timespec *rqtp, struct timespec *rmtp)
asmlinkage
long
asmlinkage
long
sys_clock_nanosleep
(
clockid_t
which_clock
,
int
flags
,
sys_clock_nanosleep
(
clockid_t
which_clock
,
int
flags
,
const
struct
timespec
*
rqtp
,
struct
timespec
*
rmtp
)
const
struct
timespec
__user
*
rqtp
,
struct
timespec
__user
*
rmtp
)
{
{
struct
timespec
t
;
struct
timespec
t
;
int
ret
;
int
ret
;
...
@@ -1218,7 +1220,7 @@ clock_nanosleep_restart(struct restart_block *restart_block)
...
@@ -1218,7 +1220,7 @@ clock_nanosleep_restart(struct restart_block *restart_block)
int
ret
=
do_clock_nanosleep
(
restart_block
->
arg0
,
0
,
&
t
);
int
ret
=
do_clock_nanosleep
(
restart_block
->
arg0
,
0
,
&
t
);
if
((
ret
==
-
ERESTART_RESTARTBLOCK
)
&&
restart_block
->
arg1
&&
if
((
ret
==
-
ERESTART_RESTARTBLOCK
)
&&
restart_block
->
arg1
&&
copy_to_user
((
struct
timespec
*
)(
restart_block
->
arg1
),
&
t
,
copy_to_user
((
struct
timespec
__user
*
)(
restart_block
->
arg1
),
&
t
,
sizeof
(
t
)))
sizeof
(
t
)))
return
-
EFAULT
;
return
-
EFAULT
;
return
ret
;
return
ret
;
...
...
kernel/printk.c
View file @
2f5c576e
...
@@ -155,7 +155,7 @@ __setup("console=", console_setup);
...
@@ -155,7 +155,7 @@ __setup("console=", console_setup);
* 8 -- Set level of messages printed to console
* 8 -- Set level of messages printed to console
* 9 -- Return number of unread characters in the log buffer
* 9 -- Return number of unread characters in the log buffer
*/
*/
int
do_syslog
(
int
type
,
char
*
buf
,
int
len
)
int
do_syslog
(
int
type
,
char
__user
*
buf
,
int
len
)
{
{
unsigned
long
i
,
j
,
limit
,
count
;
unsigned
long
i
,
j
,
limit
,
count
;
int
do_clear
=
0
;
int
do_clear
=
0
;
...
@@ -276,7 +276,7 @@ int do_syslog(int type, char * buf, int len)
...
@@ -276,7 +276,7 @@ int do_syslog(int type, char * buf, int len)
return
error
;
return
error
;
}
}
asmlinkage
long
sys_syslog
(
int
type
,
char
*
buf
,
int
len
)
asmlinkage
long
sys_syslog
(
int
type
,
char
__user
*
buf
,
int
len
)
{
{
return
do_syslog
(
type
,
buf
,
len
);
return
do_syslog
(
type
,
buf
,
len
);
}
}
...
...
kernel/ptrace.c
View file @
2f5c576e
...
@@ -200,7 +200,7 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in
...
@@ -200,7 +200,7 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in
return
buf
-
old_buf
;
return
buf
-
old_buf
;
}
}
int
ptrace_readdata
(
struct
task_struct
*
tsk
,
unsigned
long
src
,
char
*
dst
,
int
len
)
int
ptrace_readdata
(
struct
task_struct
*
tsk
,
unsigned
long
src
,
char
__user
*
dst
,
int
len
)
{
{
int
copied
=
0
;
int
copied
=
0
;
...
@@ -225,7 +225,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char *dst, int l
...
@@ -225,7 +225,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char *dst, int l
return
copied
;
return
copied
;
}
}
int
ptrace_writedata
(
struct
task_struct
*
tsk
,
char
*
src
,
unsigned
long
dst
,
int
len
)
int
ptrace_writedata
(
struct
task_struct
*
tsk
,
char
__user
*
src
,
unsigned
long
dst
,
int
len
)
{
{
int
copied
=
0
;
int
copied
=
0
;
...
@@ -278,19 +278,18 @@ static int ptrace_setoptions(struct task_struct *child, long data)
...
@@ -278,19 +278,18 @@ static int ptrace_setoptions(struct task_struct *child, long data)
return
(
data
&
~
PTRACE_O_MASK
)
?
-
EINVAL
:
0
;
return
(
data
&
~
PTRACE_O_MASK
)
?
-
EINVAL
:
0
;
}
}
static
int
ptrace_getsiginfo
(
struct
task_struct
*
child
,
long
data
)
static
int
ptrace_getsiginfo
(
struct
task_struct
*
child
,
siginfo_t
__user
*
data
)
{
{
if
(
child
->
last_siginfo
==
NULL
)
if
(
child
->
last_siginfo
==
NULL
)
return
-
EINVAL
;
return
-
EINVAL
;
return
copy_siginfo_to_user
((
siginfo_t
*
)
data
,
child
->
last_siginfo
);
return
copy_siginfo_to_user
(
data
,
child
->
last_siginfo
);
}
}
static
int
ptrace_setsiginfo
(
struct
task_struct
*
child
,
long
data
)
static
int
ptrace_setsiginfo
(
struct
task_struct
*
child
,
siginfo_t
__user
*
data
)
{
{
if
(
child
->
last_siginfo
==
NULL
)
if
(
child
->
last_siginfo
==
NULL
)
return
-
EINVAL
;
return
-
EINVAL
;
if
(
copy_from_user
(
child
->
last_siginfo
,
(
siginfo_t
*
)
data
,
if
(
copy_from_user
(
child
->
last_siginfo
,
data
,
sizeof
(
siginfo_t
))
!=
0
)
sizeof
(
siginfo_t
))
!=
0
)
return
-
EFAULT
;
return
-
EFAULT
;
return
0
;
return
0
;
}
}
...
@@ -308,13 +307,13 @@ int ptrace_request(struct task_struct *child, long request,
...
@@ -308,13 +307,13 @@ int ptrace_request(struct task_struct *child, long request,
ret
=
ptrace_setoptions
(
child
,
data
);
ret
=
ptrace_setoptions
(
child
,
data
);
break
;
break
;
case
PTRACE_GETEVENTMSG
:
case
PTRACE_GETEVENTMSG
:
ret
=
put_user
(
child
->
ptrace_message
,
(
unsigned
long
*
)
data
);
ret
=
put_user
(
child
->
ptrace_message
,
(
unsigned
long
__user
*
)
data
);
break
;
break
;
case
PTRACE_GETSIGINFO
:
case
PTRACE_GETSIGINFO
:
ret
=
ptrace_getsiginfo
(
child
,
data
);
ret
=
ptrace_getsiginfo
(
child
,
(
siginfo_t
__user
*
)
data
);
break
;
break
;
case
PTRACE_SETSIGINFO
:
case
PTRACE_SETSIGINFO
:
ret
=
ptrace_setsiginfo
(
child
,
data
);
ret
=
ptrace_setsiginfo
(
child
,
(
siginfo_t
__user
*
)
data
);
break
;
break
;
default:
default:
break
;
break
;
...
...
kernel/softirq.c
View file @
2f5c576e
...
@@ -51,7 +51,7 @@ static inline void wakeup_softirqd(unsigned cpu)
...
@@ -51,7 +51,7 @@ static inline void wakeup_softirqd(unsigned cpu)
wake_up_process
(
tsk
);
wake_up_process
(
tsk
);
}
}
asmlinkage
void
do_softirq
()
asmlinkage
void
do_softirq
(
void
)
{
{
__u32
pending
;
__u32
pending
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -296,7 +296,7 @@ static struct notifier_block tasklet_nb = {
...
@@ -296,7 +296,7 @@ static struct notifier_block tasklet_nb = {
.
next
=
NULL
,
.
next
=
NULL
,
};
};
void
__init
softirq_init
()
void
__init
softirq_init
(
void
)
{
{
open_softirq
(
TASKLET_SOFTIRQ
,
tasklet_action
,
NULL
);
open_softirq
(
TASKLET_SOFTIRQ
,
tasklet_action
,
NULL
);
open_softirq
(
HI_SOFTIRQ
,
tasklet_hi_action
,
NULL
);
open_softirq
(
HI_SOFTIRQ
,
tasklet_hi_action
,
NULL
);
...
...
kernel/sysctl.c
View file @
2f5c576e
...
@@ -403,7 +403,7 @@ int do_sysctl(int *name, int nlen, void *oldval, size_t *oldlenp,
...
@@ -403,7 +403,7 @@ int do_sysctl(int *name, int nlen, void *oldval, size_t *oldlenp,
return
-
ENOTDIR
;
return
-
ENOTDIR
;
}
}
extern
asmlinkage
long
sys_sysctl
(
struct
__sysctl_args
*
args
)
asmlinkage
long
sys_sysctl
(
struct
__sysctl_args
__user
*
args
)
{
{
struct
__sysctl_args
tmp
;
struct
__sysctl_args
tmp
;
int
error
;
int
error
;
...
@@ -444,8 +444,8 @@ static inline int ctl_perm(ctl_table *table, int op)
...
@@ -444,8 +444,8 @@ static inline int ctl_perm(ctl_table *table, int op)
}
}
static
int
parse_table
(
int
*
name
,
int
nlen
,
static
int
parse_table
(
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
void
__user
*
newval
,
size_t
newlen
,
ctl_table
*
table
,
void
**
context
)
ctl_table
*
table
,
void
**
context
)
{
{
int
n
;
int
n
;
...
@@ -485,8 +485,8 @@ static int parse_table(int *name, int nlen,
...
@@ -485,8 +485,8 @@ static int parse_table(int *name, int nlen,
/* Perform the actual read/write of a sysctl table entry. */
/* Perform the actual read/write of a sysctl table entry. */
int
do_sysctl_strategy
(
ctl_table
*
table
,
int
do_sysctl_strategy
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
void
**
context
)
void
__user
*
newval
,
size_t
newlen
,
void
**
context
)
{
{
int
op
=
0
,
rc
;
int
op
=
0
,
rc
;
size_t
len
;
size_t
len
;
...
@@ -787,10 +787,11 @@ static int proc_sys_permission(struct inode *inode, int op)
...
@@ -787,10 +787,11 @@ static int proc_sys_permission(struct inode *inode, int op)
* Returns 0 on success.
* Returns 0 on success.
*/
*/
int
proc_dostring
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
int
proc_dostring
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
)
void
__user
*
buffer
,
size_t
*
lenp
)
{
{
size_t
len
;
size_t
len
;
char
*
p
,
c
;
char
__user
*
p
;
char
c
;
if
(
!
table
->
data
||
!
table
->
maxlen
||
!*
lenp
||
if
(
!
table
->
data
||
!
table
->
maxlen
||
!*
lenp
||
(
filp
->
f_pos
&&
!
write
))
{
(
filp
->
f_pos
&&
!
write
))
{
...
@@ -840,7 +841,7 @@ int proc_dostring(ctl_table *table, int write, struct file *filp,
...
@@ -840,7 +841,7 @@ int proc_dostring(ctl_table *table, int write, struct file *filp,
*/
*/
static
int
proc_doutsstring
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
static
int
proc_doutsstring
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
)
void
__user
*
buffer
,
size_t
*
lenp
)
{
{
int
r
;
int
r
;
...
@@ -863,7 +864,7 @@ static int proc_doutsstring(ctl_table *table, int write, struct file *filp,
...
@@ -863,7 +864,7 @@ static int proc_doutsstring(ctl_table *table, int write, struct file *filp,
#define OP_MIN 4
#define OP_MIN 4
static
int
do_proc_dointvec
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
static
int
do_proc_dointvec
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
,
int
conv
,
int
op
)
void
__user
*
buffer
,
size_t
*
lenp
,
int
conv
,
int
op
)
{
{
int
*
i
,
vleft
,
first
=
1
,
neg
,
val
;
int
*
i
,
vleft
,
first
=
1
,
neg
,
val
;
size_t
left
,
len
;
size_t
left
,
len
;
...
@@ -885,12 +886,12 @@ static int do_proc_dointvec(ctl_table *table, int write, struct file *filp,
...
@@ -885,12 +886,12 @@ static int do_proc_dointvec(ctl_table *table, int write, struct file *filp,
if
(
write
)
{
if
(
write
)
{
while
(
left
)
{
while
(
left
)
{
char
c
;
char
c
;
if
(
get_user
(
c
,(
cha
r
*
)
buffer
))
if
(
get_user
(
c
,(
char
__use
r
*
)
buffer
))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
!
isspace
(
c
))
if
(
!
isspace
(
c
))
break
;
break
;
left
--
;
left
--
;
((
char
*
)
buffer
)
++
;
buffer
++
;
}
}
if
(
!
left
)
if
(
!
left
)
break
;
break
;
...
@@ -979,7 +980,7 @@ static int do_proc_dointvec(ctl_table *table, int write, struct file *filp,
...
@@ -979,7 +980,7 @@ static int do_proc_dointvec(ctl_table *table, int write, struct file *filp,
* Returns 0 on success.
* Returns 0 on success.
*/
*/
int
proc_dointvec
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
int
proc_dointvec
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
)
void
__user
*
buffer
,
size_t
*
lenp
)
{
{
return
do_proc_dointvec
(
table
,
write
,
filp
,
buffer
,
lenp
,
1
,
OP_SET
);
return
do_proc_dointvec
(
table
,
write
,
filp
,
buffer
,
lenp
,
1
,
OP_SET
);
}
}
...
@@ -989,7 +990,7 @@ int proc_dointvec(ctl_table *table, int write, struct file *filp,
...
@@ -989,7 +990,7 @@ int proc_dointvec(ctl_table *table, int write, struct file *filp,
*/
*/
int
proc_dointvec_bset
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
int
proc_dointvec_bset
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
)
void
__user
*
buffer
,
size_t
*
lenp
)
{
{
if
(
!
capable
(
CAP_SYS_MODULE
))
{
if
(
!
capable
(
CAP_SYS_MODULE
))
{
return
-
EPERM
;
return
-
EPERM
;
...
@@ -1015,7 +1016,7 @@ int proc_dointvec_bset(ctl_table *table, int write, struct file *filp,
...
@@ -1015,7 +1016,7 @@ int proc_dointvec_bset(ctl_table *table, int write, struct file *filp,
* Returns 0 on success.
* Returns 0 on success.
*/
*/
int
proc_dointvec_minmax
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
int
proc_dointvec_minmax
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
)
void
__user
*
buffer
,
size_t
*
lenp
)
{
{
int
*
i
,
*
min
,
*
max
,
vleft
,
first
=
1
,
neg
,
val
;
int
*
i
,
*
min
,
*
max
,
vleft
,
first
=
1
,
neg
,
val
;
size_t
len
,
left
;
size_t
len
,
left
;
...
@@ -1043,7 +1044,7 @@ int proc_dointvec_minmax(ctl_table *table, int write, struct file *filp,
...
@@ -1043,7 +1044,7 @@ int proc_dointvec_minmax(ctl_table *table, int write, struct file *filp,
if
(
!
isspace
(
c
))
if
(
!
isspace
(
c
))
break
;
break
;
left
--
;
left
--
;
((
char
*
)
buffer
)
++
;
buffer
++
;
}
}
if
(
!
left
)
if
(
!
left
)
break
;
break
;
...
@@ -1113,7 +1114,7 @@ int proc_dointvec_minmax(ctl_table *table, int write, struct file *filp,
...
@@ -1113,7 +1114,7 @@ int proc_dointvec_minmax(ctl_table *table, int write, struct file *filp,
static
int
do_proc_doulongvec_minmax
(
ctl_table
*
table
,
int
write
,
static
int
do_proc_doulongvec_minmax
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
,
void
__user
*
buffer
,
size_t
*
lenp
,
unsigned
long
convmul
,
unsigned
long
convmul
,
unsigned
long
convdiv
)
unsigned
long
convdiv
)
{
{
...
@@ -1139,12 +1140,12 @@ static int do_proc_doulongvec_minmax(ctl_table *table, int write,
...
@@ -1139,12 +1140,12 @@ static int do_proc_doulongvec_minmax(ctl_table *table, int write,
if
(
write
)
{
if
(
write
)
{
while
(
left
)
{
while
(
left
)
{
char
c
;
char
c
;
if
(
get_user
(
c
,
(
cha
r
*
)
buffer
))
if
(
get_user
(
c
,
(
char
__use
r
*
)
buffer
))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
!
isspace
(
c
))
if
(
!
isspace
(
c
))
break
;
break
;
left
--
;
left
--
;
((
char
*
)
buffer
)
++
;
buffer
++
;
}
}
if
(
!
left
)
if
(
!
left
)
break
;
break
;
...
@@ -1152,7 +1153,7 @@ static int do_proc_doulongvec_minmax(ctl_table *table, int write,
...
@@ -1152,7 +1153,7 @@ static int do_proc_doulongvec_minmax(ctl_table *table, int write,
len
=
left
;
len
=
left
;
if
(
len
>
TMPBUFLEN
-
1
)
if
(
len
>
TMPBUFLEN
-
1
)
len
=
TMPBUFLEN
-
1
;
len
=
TMPBUFLEN
-
1
;
if
(
copy_from_user
(
buf
,
buffer
,
len
))
if
(
copy_from_user
(
buf
,
buffer
,
len
))
return
-
EFAULT
;
return
-
EFAULT
;
buf
[
len
]
=
0
;
buf
[
len
]
=
0
;
p
=
buf
;
p
=
buf
;
...
@@ -1232,7 +1233,7 @@ static int do_proc_doulongvec_minmax(ctl_table *table, int write,
...
@@ -1232,7 +1233,7 @@ static int do_proc_doulongvec_minmax(ctl_table *table, int write,
* Returns 0 on success.
* Returns 0 on success.
*/
*/
int
proc_doulongvec_minmax
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
int
proc_doulongvec_minmax
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
)
void
__user
*
buffer
,
size_t
*
lenp
)
{
{
return
do_proc_doulongvec_minmax
(
table
,
write
,
filp
,
buffer
,
lenp
,
1l
,
1l
);
return
do_proc_doulongvec_minmax
(
table
,
write
,
filp
,
buffer
,
lenp
,
1l
,
1l
);
}
}
...
@@ -1256,7 +1257,7 @@ int proc_doulongvec_minmax(ctl_table *table, int write, struct file *filp,
...
@@ -1256,7 +1257,7 @@ int proc_doulongvec_minmax(ctl_table *table, int write, struct file *filp,
*/
*/
int
proc_doulongvec_ms_jiffies_minmax
(
ctl_table
*
table
,
int
write
,
int
proc_doulongvec_ms_jiffies_minmax
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
)
void
__user
*
buffer
,
size_t
*
lenp
)
{
{
return
do_proc_doulongvec_minmax
(
table
,
write
,
filp
,
buffer
,
return
do_proc_doulongvec_minmax
(
table
,
write
,
filp
,
buffer
,
lenp
,
HZ
,
1000l
);
lenp
,
HZ
,
1000l
);
...
@@ -1279,7 +1280,7 @@ int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int write,
...
@@ -1279,7 +1280,7 @@ int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int write,
* Returns 0 on success.
* Returns 0 on success.
*/
*/
int
proc_dointvec_jiffies
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
int
proc_dointvec_jiffies
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
)
void
__user
*
buffer
,
size_t
*
lenp
)
{
{
return
do_proc_dointvec
(
table
,
write
,
filp
,
buffer
,
lenp
,
HZ
,
OP_SET
);
return
do_proc_dointvec
(
table
,
write
,
filp
,
buffer
,
lenp
,
HZ
,
OP_SET
);
}
}
...
@@ -1345,8 +1346,8 @@ int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int write,
...
@@ -1345,8 +1346,8 @@ int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int write,
/* The generic string strategy routine: */
/* The generic string strategy routine: */
int
sysctl_string
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
int
sysctl_string
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
void
**
context
)
void
__user
*
newval
,
size_t
newlen
,
void
**
context
)
{
{
size_t
l
,
len
;
size_t
l
,
len
;
...
@@ -1453,7 +1454,7 @@ int sysctl_jiffies(ctl_table *table, int *name, int nlen,
...
@@ -1453,7 +1454,7 @@ int sysctl_jiffies(ctl_table *table, int *name, int nlen,
#else
/* CONFIG_SYSCTL */
#else
/* CONFIG_SYSCTL */
extern
asmlinkage
long
sys_sysctl
(
struct
__sysctl_args
*
args
)
extern
asmlinkage
long
sys_sysctl
(
struct
__sysctl_args
__user
*
args
)
{
{
return
-
ENOSYS
;
return
-
ENOSYS
;
}
}
...
...
kernel/time.c
View file @
2f5c576e
...
@@ -90,7 +90,7 @@ asmlinkage long sys_stime(int * tptr)
...
@@ -90,7 +90,7 @@ asmlinkage long sys_stime(int * tptr)
#endif
#endif
asmlinkage
long
sys_gettimeofday
(
struct
timeval
*
tv
,
struct
timezone
*
tz
)
asmlinkage
long
sys_gettimeofday
(
struct
timeval
__user
*
tv
,
struct
timezone
__user
*
tz
)
{
{
if
(
likely
(
tv
!=
NULL
))
{
if
(
likely
(
tv
!=
NULL
))
{
struct
timeval
ktv
;
struct
timeval
ktv
;
...
@@ -166,7 +166,7 @@ int do_sys_settimeofday(struct timeval *tv, struct timezone *tz)
...
@@ -166,7 +166,7 @@ int do_sys_settimeofday(struct timeval *tv, struct timezone *tz)
return
0
;
return
0
;
}
}
asmlinkage
long
sys_settimeofday
(
struct
timeval
*
tv
,
struct
timezone
*
tz
)
asmlinkage
long
sys_settimeofday
(
struct
timeval
__user
*
tv
,
struct
timezone
__user
*
tz
)
{
{
struct
timeval
new_tv
;
struct
timeval
new_tv
;
struct
timezone
new_tz
;
struct
timezone
new_tz
;
...
@@ -387,7 +387,7 @@ leave: if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0
...
@@ -387,7 +387,7 @@ leave: if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0
return
(
result
);
return
(
result
);
}
}
asmlinkage
long
sys_adjtimex
(
struct
timex
*
txc_p
)
asmlinkage
long
sys_adjtimex
(
struct
timex
__user
*
txc_p
)
{
{
struct
timex
txc
;
/* Local copy of parameter */
struct
timex
txc
;
/* Local copy of parameter */
int
ret
;
int
ret
;
...
...
kernel/uid16.c
View file @
2f5c576e
...
@@ -107,7 +107,7 @@ asmlinkage long sys_setfsgid16(old_gid_t gid)
...
@@ -107,7 +107,7 @@ asmlinkage long sys_setfsgid16(old_gid_t gid)
return
sys_setfsgid
((
gid_t
)
gid
);
return
sys_setfsgid
((
gid_t
)
gid
);
}
}
asmlinkage
long
sys_getgroups16
(
int
gidsetsize
,
old_gid_t
*
grouplist
)
asmlinkage
long
sys_getgroups16
(
int
gidsetsize
,
old_gid_t
__user
*
grouplist
)
{
{
old_gid_t
groups
[
NGROUPS
];
old_gid_t
groups
[
NGROUPS
];
int
i
,
j
;
int
i
,
j
;
...
@@ -126,7 +126,7 @@ asmlinkage long sys_getgroups16(int gidsetsize, old_gid_t *grouplist)
...
@@ -126,7 +126,7 @@ asmlinkage long sys_getgroups16(int gidsetsize, old_gid_t *grouplist)
return
i
;
return
i
;
}
}
asmlinkage
long
sys_setgroups16
(
int
gidsetsize
,
old_gid_t
*
grouplist
)
asmlinkage
long
sys_setgroups16
(
int
gidsetsize
,
old_gid_t
__user
*
grouplist
)
{
{
old_gid_t
groups
[
NGROUPS
];
old_gid_t
groups
[
NGROUPS
];
gid_t
new_groups
[
NGROUPS
];
gid_t
new_groups
[
NGROUPS
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment