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
8e368e79
Commit
8e368e79
authored
Apr 16, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more user pointer annotations.
parent
3f069ce5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
8 deletions
+13
-8
arch/i386/kernel/process.c
arch/i386/kernel/process.c
+8
-5
fs/exec.c
fs/exec.c
+2
-1
include/linux/binfmts.h
include/linux/binfmts.h
+1
-1
include/linux/sched.h
include/linux/sched.h
+1
-1
include/linux/uio.h
include/linux/uio.h
+1
-0
No files found.
arch/i386/kernel/process.c
View file @
8e368e79
...
@@ -324,7 +324,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
...
@@ -324,7 +324,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
int
idx
;
int
idx
;
err
=
-
EFAULT
;
err
=
-
EFAULT
;
if
(
copy_from_user
(
&
info
,
(
void
*
)
childregs
->
esi
,
sizeof
(
info
)))
if
(
copy_from_user
(
&
info
,
(
void
__user
*
)
childregs
->
esi
,
sizeof
(
info
)))
goto
out
;
goto
out
;
err
=
-
EINVAL
;
err
=
-
EINVAL
;
if
(
LDT_empty
(
&
info
))
if
(
LDT_empty
(
&
info
))
...
@@ -567,11 +567,14 @@ asmlinkage int sys_execve(struct pt_regs regs)
...
@@ -567,11 +567,14 @@ asmlinkage int sys_execve(struct pt_regs regs)
int
error
;
int
error
;
char
*
filename
;
char
*
filename
;
filename
=
getname
((
char
*
)
regs
.
ebx
);
filename
=
getname
((
char
__user
*
)
regs
.
ebx
);
error
=
PTR_ERR
(
filename
);
error
=
PTR_ERR
(
filename
);
if
(
IS_ERR
(
filename
))
if
(
IS_ERR
(
filename
))
goto
out
;
goto
out
;
error
=
do_execve
(
filename
,
(
char
**
)
regs
.
ecx
,
(
char
**
)
regs
.
edx
,
&
regs
);
error
=
do_execve
(
filename
,
(
char
__user
*
__user
*
)
regs
.
ecx
,
(
char
__user
*
__user
*
)
regs
.
edx
,
&
regs
);
if
(
error
==
0
)
{
if
(
error
==
0
)
{
current
->
ptrace
&=
~
PT_DTRACE
;
current
->
ptrace
&=
~
PT_DTRACE
;
/* Make sure we don't return using sysenter.. */
/* Make sure we don't return using sysenter.. */
...
@@ -633,7 +636,7 @@ static int get_free_idx(void)
...
@@ -633,7 +636,7 @@ static int get_free_idx(void)
/*
/*
* Set a given TLS descriptor:
* Set a given TLS descriptor:
*/
*/
asmlinkage
int
sys_set_thread_area
(
struct
user_desc
*
u_info
)
asmlinkage
int
sys_set_thread_area
(
struct
user_desc
__user
*
u_info
)
{
{
struct
thread_struct
*
t
=
&
current
->
thread
;
struct
thread_struct
*
t
=
&
current
->
thread
;
struct
user_desc
info
;
struct
user_desc
info
;
...
@@ -700,7 +703,7 @@ asmlinkage int sys_set_thread_area(struct user_desc *u_info)
...
@@ -700,7 +703,7 @@ asmlinkage int sys_set_thread_area(struct user_desc *u_info)
#define GET_PRESENT(desc) (((desc)->b >> 15) & 1)
#define GET_PRESENT(desc) (((desc)->b >> 15) & 1)
#define GET_USEABLE(desc) (((desc)->b >> 20) & 1)
#define GET_USEABLE(desc) (((desc)->b >> 20) & 1)
asmlinkage
int
sys_get_thread_area
(
struct
user_desc
*
u_info
)
asmlinkage
int
sys_get_thread_area
(
struct
user_desc
__user
*
u_info
)
{
{
struct
user_desc
info
;
struct
user_desc
info
;
struct
desc_struct
*
desc
;
struct
desc_struct
*
desc
;
...
...
fs/exec.c
View file @
8e368e79
...
@@ -491,7 +491,8 @@ int kernel_read(struct file *file, unsigned long offset,
...
@@ -491,7 +491,8 @@ int kernel_read(struct file *file, unsigned long offset,
old_fs
=
get_fs
();
old_fs
=
get_fs
();
set_fs
(
get_ds
());
set_fs
(
get_ds
());
result
=
vfs_read
(
file
,
addr
,
count
,
&
pos
);
/* The cast to a user pointer is valid due to the set_fs() */
result
=
vfs_read
(
file
,
(
void
__user
*
)
addr
,
count
,
&
pos
);
set_fs
(
old_fs
);
set_fs
(
old_fs
);
return
result
;
return
result
;
}
}
...
...
include/linux/binfmts.h
View file @
8e368e79
...
@@ -56,7 +56,7 @@ extern void remove_arg_zero(struct linux_binprm *);
...
@@ -56,7 +56,7 @@ extern void remove_arg_zero(struct linux_binprm *);
extern
int
search_binary_handler
(
struct
linux_binprm
*
,
struct
pt_regs
*
);
extern
int
search_binary_handler
(
struct
linux_binprm
*
,
struct
pt_regs
*
);
extern
int
flush_old_exec
(
struct
linux_binprm
*
bprm
);
extern
int
flush_old_exec
(
struct
linux_binprm
*
bprm
);
extern
int
setup_arg_pages
(
struct
linux_binprm
*
bprm
);
extern
int
setup_arg_pages
(
struct
linux_binprm
*
bprm
);
extern
int
copy_strings
(
int
argc
,
char
*
*
argv
,
struct
linux_binprm
*
bprm
);
extern
int
copy_strings
(
int
argc
,
char
__user
*
__user
*
argv
,
struct
linux_binprm
*
bprm
);
extern
int
copy_strings_kernel
(
int
argc
,
char
**
argv
,
struct
linux_binprm
*
bprm
);
extern
int
copy_strings_kernel
(
int
argc
,
char
**
argv
,
struct
linux_binprm
*
bprm
);
extern
void
compute_creds
(
struct
linux_binprm
*
binprm
);
extern
void
compute_creds
(
struct
linux_binprm
*
binprm
);
extern
int
do_coredump
(
long
signr
,
int
exit_code
,
struct
pt_regs
*
regs
);
extern
int
do_coredump
(
long
signr
,
int
exit_code
,
struct
pt_regs
*
regs
);
...
...
include/linux/sched.h
View file @
8e368e79
...
@@ -629,7 +629,7 @@ extern void daemonize(const char *, ...);
...
@@ -629,7 +629,7 @@ extern void daemonize(const char *, ...);
extern
int
allow_signal
(
int
);
extern
int
allow_signal
(
int
);
extern
task_t
*
child_reaper
;
extern
task_t
*
child_reaper
;
extern
int
do_execve
(
char
*
,
char
**
,
char
*
*
,
struct
pt_regs
*
);
extern
int
do_execve
(
char
*
,
char
__user
*
__user
*
,
char
__user
*
__user
*
,
struct
pt_regs
*
);
extern
struct
task_struct
*
do_fork
(
unsigned
long
,
unsigned
long
,
struct
pt_regs
*
,
unsigned
long
,
int
*
,
int
*
);
extern
struct
task_struct
*
do_fork
(
unsigned
long
,
unsigned
long
,
struct
pt_regs
*
,
unsigned
long
,
int
*
,
int
*
);
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
...
...
include/linux/uio.h
View file @
8e368e79
#ifndef __LINUX_UIO_H
#ifndef __LINUX_UIO_H
#define __LINUX_UIO_H
#define __LINUX_UIO_H
#include <linux/compiler.h>
#include <linux/types.h>
#include <linux/types.h>
/*
/*
...
...
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