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
Kirill Smelkov
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
Show 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);
typedef
struct
ctl_table
ctl_table
;
typedef
int
ctl_handler
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
__user
*
newval
,
size_t
newlen
,
void
**
context
);
typedef
int
proc_handler
(
ctl_table
*
ctl
,
int
write
,
struct
file
*
filp
,
...
...
@@ -707,8 +707,8 @@ extern int do_sysctl (int *name, int nlen,
extern
int
do_sysctl_strategy
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
void
**
context
);
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
__user
*
newval
,
size_t
newlen
,
void
**
context
);
extern
ctl_handler
sysctl_string
;
extern
ctl_handler
sysctl_intvec
;
...
...
kernel/posix-timers.c
View file @
2f5c576e
...
...
@@ -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
* 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 & \
SIGEV_SIGNAL & \
SIGEV_THREAD & \
...
...
@@ -402,7 +402,8 @@ static void release_posix_timer(struct k_itimer *tmr)
asmlinkage
long
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
;
struct
k_itimer
*
new_timer
=
NULL
;
...
...
@@ -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. */
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
itimerspec
cur_setting
;
...
...
@@ -801,8 +802,8 @@ do_timer_settime(struct k_itimer *timr, int flags,
/* Set a POSIX.1b interval timer */
asmlinkage
long
sys_timer_settime
(
timer_t
timer_id
,
int
flags
,
const
struct
itimerspec
*
new_setting
,
struct
itimerspec
*
old_setting
)
const
struct
itimerspec
__user
*
new_setting
,
struct
itimerspec
__user
*
old_setting
)
{
struct
k_itimer
*
timr
;
struct
itimerspec
new_spec
,
old_spec
;
...
...
@@ -985,7 +986,7 @@ int do_posix_clock_monotonic_settime(struct timespec *tp)
}
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
;
...
...
@@ -1002,7 +1003,7 @@ sys_clock_settime(clockid_t which_clock, const struct timespec *tp)
}
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
;
int
error
=
0
;
...
...
@@ -1021,7 +1022,7 @@ sys_clock_gettime(clockid_t which_clock, struct timespec *tp)
}
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
;
...
...
@@ -1074,7 +1075,7 @@ extern long do_clock_nanosleep(clockid_t which_clock, int flags,
#ifdef FOLD_NANO_SLEEP_INTO_CLOCK_NANO_SLEEP
asmlinkage
long
sys_nanosleep
(
struct
timespec
*
rqtp
,
struct
timespec
*
rmtp
)
sys_nanosleep
(
struct
timespec
__user
*
rqtp
,
struct
timespec
__user
*
rmtp
)
{
struct
timespec
t
;
long
ret
;
...
...
@@ -1096,7 +1097,8 @@ sys_nanosleep(struct timespec *rqtp, struct timespec *rmtp)
asmlinkage
long
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
;
int
ret
;
...
...
@@ -1218,7 +1220,7 @@ clock_nanosleep_restart(struct restart_block *restart_block)
int
ret
=
do_clock_nanosleep
(
restart_block
->
arg0
,
0
,
&
t
);
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
)))
return
-
EFAULT
;
return
ret
;
...
...
kernel/printk.c
View file @
2f5c576e
...
...
@@ -155,7 +155,7 @@ __setup("console=", console_setup);
* 8 -- Set level of messages printed to console
* 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
;
int
do_clear
=
0
;
...
...
@@ -276,7 +276,7 @@ int do_syslog(int type, char * buf, int len)
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
);
}
...
...
kernel/ptrace.c
View file @
2f5c576e
...
...
@@ -200,7 +200,7 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in
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
;
...
...
@@ -225,7 +225,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char *dst, int l
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
;
...
...
@@ -278,19 +278,18 @@ static int ptrace_setoptions(struct task_struct *child, long data)
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
)
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
)
return
-
EINVAL
;
if
(
copy_from_user
(
child
->
last_siginfo
,
(
siginfo_t
*
)
data
,
sizeof
(
siginfo_t
))
!=
0
)
if
(
copy_from_user
(
child
->
last_siginfo
,
data
,
sizeof
(
siginfo_t
))
!=
0
)
return
-
EFAULT
;
return
0
;
}
...
...
@@ -308,13 +307,13 @@ int ptrace_request(struct task_struct *child, long request,
ret
=
ptrace_setoptions
(
child
,
data
);
break
;
case
PTRACE_GETEVENTMSG
:
ret
=
put_user
(
child
->
ptrace_message
,
(
unsigned
long
*
)
data
);
ret
=
put_user
(
child
->
ptrace_message
,
(
unsigned
long
__user
*
)
data
);
break
;
case
PTRACE_GETSIGINFO
:
ret
=
ptrace_getsiginfo
(
child
,
data
);
ret
=
ptrace_getsiginfo
(
child
,
(
siginfo_t
__user
*
)
data
);
break
;
case
PTRACE_SETSIGINFO
:
ret
=
ptrace_setsiginfo
(
child
,
data
);
ret
=
ptrace_setsiginfo
(
child
,
(
siginfo_t
__user
*
)
data
);
break
;
default:
break
;
...
...
kernel/softirq.c
View file @
2f5c576e
...
...
@@ -51,7 +51,7 @@ static inline void wakeup_softirqd(unsigned cpu)
wake_up_process
(
tsk
);
}
asmlinkage
void
do_softirq
()
asmlinkage
void
do_softirq
(
void
)
{
__u32
pending
;
unsigned
long
flags
;
...
...
@@ -296,7 +296,7 @@ static struct notifier_block tasklet_nb = {
.
next
=
NULL
,
};
void
__init
softirq_init
()
void
__init
softirq_init
(
void
)
{
open_softirq
(
TASKLET_SOFTIRQ
,
tasklet_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,
return
-
ENOTDIR
;
}
extern
asmlinkage
long
sys_sysctl
(
struct
__sysctl_args
*
args
)
asmlinkage
long
sys_sysctl
(
struct
__sysctl_args
__user
*
args
)
{
struct
__sysctl_args
tmp
;
int
error
;
...
...
@@ -444,8 +444,8 @@ static inline int ctl_perm(ctl_table *table, int op)
}
static
int
parse_table
(
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
__user
*
newval
,
size_t
newlen
,
ctl_table
*
table
,
void
**
context
)
{
int
n
;
...
...
@@ -485,8 +485,8 @@ static int parse_table(int *name, int nlen,
/* Perform the actual read/write of a sysctl table entry. */
int
do_sysctl_strategy
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
void
**
context
)
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
__user
*
newval
,
size_t
newlen
,
void
**
context
)
{
int
op
=
0
,
rc
;
size_t
len
;
...
...
@@ -787,10 +787,11 @@ static int proc_sys_permission(struct inode *inode, int op)
* Returns 0 on success.
*/
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
;
char
*
p
,
c
;
char
__user
*
p
;
char
c
;
if
(
!
table
->
data
||
!
table
->
maxlen
||
!*
lenp
||
(
filp
->
f_pos
&&
!
write
))
{
...
...
@@ -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
,
void
*
buffer
,
size_t
*
lenp
)
void
__user
*
buffer
,
size_t
*
lenp
)
{
int
r
;
...
...
@@ -863,7 +864,7 @@ static int proc_doutsstring(ctl_table *table, int write, struct file *filp,
#define OP_MIN 4
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
;
size_t
left
,
len
;
...
...
@@ -885,12 +886,12 @@ static int do_proc_dointvec(ctl_table *table, int write, struct file *filp,
if
(
write
)
{
while
(
left
)
{
char
c
;
if
(
get_user
(
c
,(
cha
r
*
)
buffer
))
if
(
get_user
(
c
,(
char
__use
r
*
)
buffer
))
return
-
EFAULT
;
if
(
!
isspace
(
c
))
break
;
left
--
;
((
char
*
)
buffer
)
++
;
buffer
++
;
}
if
(
!
left
)
break
;
...
...
@@ -979,7 +980,7 @@ static int do_proc_dointvec(ctl_table *table, int write, struct file *filp,
* Returns 0 on success.
*/
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
);
}
...
...
@@ -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
,
void
*
buffer
,
size_t
*
lenp
)
void
__user
*
buffer
,
size_t
*
lenp
)
{
if
(
!
capable
(
CAP_SYS_MODULE
))
{
return
-
EPERM
;
...
...
@@ -1015,7 +1016,7 @@ int proc_dointvec_bset(ctl_table *table, int write, struct file *filp,
* Returns 0 on success.
*/
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
;
size_t
len
,
left
;
...
...
@@ -1043,7 +1044,7 @@ int proc_dointvec_minmax(ctl_table *table, int write, struct file *filp,
if
(
!
isspace
(
c
))
break
;
left
--
;
((
char
*
)
buffer
)
++
;
buffer
++
;
}
if
(
!
left
)
break
;
...
...
@@ -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
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
,
void
__user
*
buffer
,
size_t
*
lenp
,
unsigned
long
convmul
,
unsigned
long
convdiv
)
{
...
...
@@ -1139,12 +1140,12 @@ static int do_proc_doulongvec_minmax(ctl_table *table, int write,
if
(
write
)
{
while
(
left
)
{
char
c
;
if
(
get_user
(
c
,
(
cha
r
*
)
buffer
))
if
(
get_user
(
c
,
(
char
__use
r
*
)
buffer
))
return
-
EFAULT
;
if
(
!
isspace
(
c
))
break
;
left
--
;
((
char
*
)
buffer
)
++
;
buffer
++
;
}
if
(
!
left
)
break
;
...
...
@@ -1152,7 +1153,7 @@ static int do_proc_doulongvec_minmax(ctl_table *table, int write,
len
=
left
;
if
(
len
>
TMPBUFLEN
-
1
)
len
=
TMPBUFLEN
-
1
;
if
(
copy_from_user
(
buf
,
buffer
,
len
))
if
(
copy_from_user
(
buf
,
buffer
,
len
))
return
-
EFAULT
;
buf
[
len
]
=
0
;
p
=
buf
;
...
...
@@ -1232,7 +1233,7 @@ static int do_proc_doulongvec_minmax(ctl_table *table, int write,
* Returns 0 on success.
*/
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
);
}
...
...
@@ -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
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
)
void
__user
*
buffer
,
size_t
*
lenp
)
{
return
do_proc_doulongvec_minmax
(
table
,
write
,
filp
,
buffer
,
lenp
,
HZ
,
1000l
);
...
...
@@ -1279,7 +1280,7 @@ int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int write,
* Returns 0 on success.
*/
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
);
}
...
...
@@ -1345,8 +1346,8 @@ int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int write,
/* The generic string strategy routine: */
int
sysctl_string
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
void
**
context
)
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
__user
*
newval
,
size_t
newlen
,
void
**
context
)
{
size_t
l
,
len
;
...
...
@@ -1453,7 +1454,7 @@ int sysctl_jiffies(ctl_table *table, int *name, int nlen,
#else
/* CONFIG_SYSCTL */
extern
asmlinkage
long
sys_sysctl
(
struct
__sysctl_args
*
args
)
extern
asmlinkage
long
sys_sysctl
(
struct
__sysctl_args
__user
*
args
)
{
return
-
ENOSYS
;
}
...
...
kernel/time.c
View file @
2f5c576e
...
...
@@ -90,7 +90,7 @@ asmlinkage long sys_stime(int * tptr)
#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
))
{
struct
timeval
ktv
;
...
...
@@ -166,7 +166,7 @@ int do_sys_settimeofday(struct timeval *tv, struct timezone *tz)
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
timezone
new_tz
;
...
...
@@ -387,7 +387,7 @@ leave: if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0
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 */
int
ret
;
...
...
kernel/uid16.c
View file @
2f5c576e
...
...
@@ -107,7 +107,7 @@ asmlinkage long sys_setfsgid16(old_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
];
int
i
,
j
;
...
...
@@ -126,7 +126,7 @@ asmlinkage long sys_getgroups16(int gidsetsize, old_gid_t *grouplist)
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
];
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