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
7f1f311a
Commit
7f1f311a
authored
Oct 04, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parisc: switch to generic sys_execve()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
4e5ed85a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
92 deletions
+2
-92
arch/parisc/include/asm/unistd.h
arch/parisc/include/asm/unistd.h
+1
-0
arch/parisc/kernel/entry.S
arch/parisc/kernel/entry.S
+0
-46
arch/parisc/kernel/process.c
arch/parisc/kernel/process.c
+0
-23
arch/parisc/kernel/sys_parisc32.c
arch/parisc/kernel/sys_parisc32.c
+0
-22
arch/parisc/kernel/syscall_table.S
arch/parisc/kernel/syscall_table.S
+1
-1
No files found.
arch/parisc/include/asm/unistd.h
View file @
7f1f311a
...
@@ -996,6 +996,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
...
@@ -996,6 +996,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
#define __ARCH_WANT_KERNEL_EXECVE
#define __ARCH_WANT_KERNEL_EXECVE
#define __ARCH_WANT_SYS_EXECVE
#endif
/* __ASSEMBLY__ */
#endif
/* __ASSEMBLY__ */
...
...
arch/parisc/kernel/entry.S
View file @
7f1f311a
...
@@ -1804,52 +1804,6 @@ ENTRY(sys_vfork_wrapper)
...
@@ -1804,52 +1804,6 @@ ENTRY(sys_vfork_wrapper)
ENDPROC
(
sys_vfork_wrapper
)
ENDPROC
(
sys_vfork_wrapper
)
.
macro
execve_wrapper
execve
LDREG
TI_TASK
-
THREAD_SZ_ALGN
-
FRAME_SIZE
(%
r30
),%
r1
ldo
TASK_REGS
(%
r1
),%
r1
/*
get
pt
regs
*/
/
*
*
Do
we
need
to
save
/
restore
r3
-
r18
here
?
*
I
don
't think so. why would new thread need old
*
threads
registers
?
*/
/
*
%
arg0
-
%
arg3
are
already
saved
for
us
.
*/
STREG
%
r2
,-
RP_OFFSET
(%
r30
)
ldo
FRAME_SIZE
(%
r30
),%
r30
#ifdef CONFIG_64BIT
ldo
-
16
(%
r30
),%
r29
/*
Reference
param
save
area
*/
#endif
BL
\
execve
,%
r2
copy
%
r1
,%
arg0
ldo
-
FRAME_SIZE
(%
r30
),%
r30
LDREG
-
RP_OFFSET
(%
r30
),%
r2
/
*
If
exec
succeeded
we
need
to
load
the
args
*/
ldo
-
1024
(%
r0
),%
r1
cmpb
,>>
=
%
r28
,%
r1
,
error_
\
execve
copy
%
r2
,%
r19
error_
\
execve
:
bv
%
r0
(%
r19
)
nop
.
endm
.
import
sys_execve
ENTRY
(
sys_execve_wrapper
)
execve_wrapper
sys_execve
ENDPROC
(
sys_execve_wrapper
)
#ifdef CONFIG_64BIT
.
import
sys32_execve
ENTRY
(
sys32_execve_wrapper
)
execve_wrapper
sys32_execve
ENDPROC
(
sys32_execve_wrapper
)
#endif
ENTRY
(
sys_rt_sigreturn_wrapper
)
ENTRY
(
sys_rt_sigreturn_wrapper
)
LDREG
TI_TASK
-
THREAD_SZ_ALGN
-
FRAME_SIZE
(%
r30
),%
r26
LDREG
TI_TASK
-
THREAD_SZ_ALGN
-
FRAME_SIZE
(%
r30
),%
r26
ldo
TASK_REGS
(%
r26
),%
r26
/*
get
pt
regs
*/
ldo
TASK_REGS
(%
r26
),%
r26
/*
get
pt
regs
*/
...
...
arch/parisc/kernel/process.c
View file @
7f1f311a
...
@@ -314,29 +314,6 @@ unsigned long thread_saved_pc(struct task_struct *t)
...
@@ -314,29 +314,6 @@ unsigned long thread_saved_pc(struct task_struct *t)
return
t
->
thread
.
regs
.
kpc
;
return
t
->
thread
.
regs
.
kpc
;
}
}
/*
* sys_execve() executes a new program.
*/
asmlinkage
int
sys_execve
(
struct
pt_regs
*
regs
)
{
int
error
;
struct
filename
*
filename
;
filename
=
getname
((
const
char
__user
*
)
regs
->
gr
[
26
]);
error
=
PTR_ERR
(
filename
);
if
(
IS_ERR
(
filename
))
goto
out
;
error
=
do_execve
(
filename
->
name
,
(
const
char
__user
*
const
__user
*
)
regs
->
gr
[
25
],
(
const
char
__user
*
const
__user
*
)
regs
->
gr
[
24
],
regs
);
putname
(
filename
);
out:
return
error
;
}
unsigned
long
unsigned
long
get_wchan
(
struct
task_struct
*
p
)
get_wchan
(
struct
task_struct
*
p
)
{
{
...
...
arch/parisc/kernel/sys_parisc32.c
View file @
7f1f311a
...
@@ -53,28 +53,6 @@
...
@@ -53,28 +53,6 @@
#define DBG(x)
#define DBG(x)
#endif
#endif
/*
* sys32_execve() executes a new program.
*/
asmlinkage
int
sys32_execve
(
struct
pt_regs
*
regs
)
{
int
error
;
struct
filename
*
filename
;
DBG
((
"sys32_execve(%p) r26 = 0x%lx
\n
"
,
regs
,
regs
->
gr
[
26
]));
filename
=
getname
((
const
char
__user
*
)
regs
->
gr
[
26
]);
error
=
PTR_ERR
(
filename
);
if
(
IS_ERR
(
filename
))
goto
out
;
error
=
compat_do_execve
(
filename
->
name
,
compat_ptr
(
regs
->
gr
[
25
]),
compat_ptr
(
regs
->
gr
[
24
]),
regs
);
putname
(
filename
);
out:
return
error
;
}
asmlinkage
long
sys32_unimplemented
(
int
r26
,
int
r25
,
int
r24
,
int
r23
,
asmlinkage
long
sys32_unimplemented
(
int
r26
,
int
r25
,
int
r24
,
int
r23
,
int
r22
,
int
r21
,
int
r20
)
int
r22
,
int
r21
,
int
r20
)
{
{
...
...
arch/parisc/kernel/syscall_table.S
View file @
7f1f311a
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
ENTRY_SAME
(
creat
)
ENTRY_SAME
(
creat
)
ENTRY_SAME
(
link
)
ENTRY_SAME
(
link
)
ENTRY_SAME
(
unlink
)
/*
10
*/
ENTRY_SAME
(
unlink
)
/*
10
*/
ENTRY_
DIFF
(
execve_wrapper
)
ENTRY_
COMP
(
execve
)
ENTRY_SAME
(
chdir
)
ENTRY_SAME
(
chdir
)
/
*
See
comments
in
kernel
/
time
.
c
!!!
Maybe
we
don
't need this? */
/
*
See
comments
in
kernel
/
time
.
c
!!!
Maybe
we
don
't need this? */
ENTRY_COMP
(
time
)
ENTRY_COMP
(
time
)
...
...
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