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
a7ddb0fc
Commit
a7ddb0fc
authored
Jan 17, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: remove old signal code, unused on 64bit userspace
parent
251a1272
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
201 deletions
+48
-201
arch/ppc64/kernel/entry.S
arch/ppc64/kernel/entry.S
+0
-4
arch/ppc64/kernel/misc.S
arch/ppc64/kernel/misc.S
+9
-9
arch/ppc64/kernel/ppc_ksyms.c
arch/ppc64/kernel/ppc_ksyms.c
+0
-5
arch/ppc64/kernel/signal.c
arch/ppc64/kernel/signal.c
+2
-180
arch/ppc64/kernel/signal32.c
arch/ppc64/kernel/signal32.c
+37
-3
No files found.
arch/ppc64/kernel/entry.S
View file @
a7ddb0fc
...
...
@@ -229,10 +229,6 @@ _GLOBAL(ppc32_rt_sigreturn)
bl
.
sys32_rt_sigreturn
b
80
f
_GLOBAL
(
ppc64_sigreturn
)
bl
.
sys_sigreturn
b
80
f
_GLOBAL
(
ppc64_rt_sigreturn
)
bl
.
sys_rt_sigreturn
...
...
arch/ppc64/kernel/misc.S
View file @
a7ddb0fc
...
...
@@ -540,7 +540,7 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys32_ssetmask
.
llong
.
sys_setreuid
/*
70
*/
.
llong
.
sys_setregid
.
llong
.
sys_sigsuspend
.
llong
.
sys
32
_sigsuspend
.
llong
.
sys32_sigpending
.
llong
.
sys32_sethostname
.
llong
.
sys32_setrlimit
/*
75
*/
...
...
@@ -783,13 +783,13 @@ _GLOBAL(sys_call_table)
.
llong
.
sys_getppid
.
llong
.
sys_getpgrp
/*
65
*/
.
llong
.
sys_setsid
.
llong
.
sys_
sigaction
.
llong
.
sys_
ni_syscall
/*
32
bit
only
sigaction
*/
.
llong
.
sys_sgetmask
.
llong
.
sys_ssetmask
.
llong
.
sys_setreuid
/*
70
*/
.
llong
.
sys_setregid
.
llong
.
sys_
sigsuspend
.
llong
.
sys_
sigpending
.
llong
.
sys_
ni_syscall
/*
32
bit
only
sigsuspend
*/
.
llong
.
sys_
ni_syscall
/*
32
bit
only
sigpending
*/
.
llong
.
sys_sethostname
.
llong
.
sys_setrlimit
/*
75
*/
.
llong
.
sys_ni_syscall
/*
old
getrlimit
syscall
*/
...
...
@@ -835,14 +835,14 @@ _GLOBAL(sys_call_table)
.
llong
.
sys_sysinfo
.
llong
.
sys_ipc
.
llong
.
sys_fsync
.
llong
.
ppc64_sigreturn
.
llong
.
sys_ni_syscall
/*
32
bit
only
sigreturn
*/
.
llong
.
sys_clone
/*
120
*/
.
llong
.
sys_setdomainname
.
llong
.
ppc64_newuname
.
llong
.
sys_ni_syscall
/*
old
modify_ldt
syscall
*/
.
llong
.
sys_adjtimex
.
llong
.
sys_mprotect
/*
125
*/
.
llong
.
sys_
sigprocmask
.
llong
.
sys_
ni_syscall
/*
32
bit
only
sigprocmask
*/
.
llong
.
sys_ni_syscall
/*
old
create_module
syscall
*/
.
llong
.
sys_init_module
.
llong
.
sys_delete_module
...
...
@@ -948,10 +948,10 @@ _GLOBAL(sys_call_table)
.
llong
.
sys_io_getevents
.
llong
.
sys_io_submit
/*
230
*/
.
llong
.
sys_io_cancel
.
llong
.
sys_ni_syscall
/*
reserved
for
alloc_hugepages
*/
.
llong
.
sys_ni_syscall
/*
reserved
for
free_hugepages
*/
.
llong
.
sys_ni_syscall
.
llong
.
sys_ni_syscall
.
llong
.
sys_exit_group
.
llong
.
sys_lookup_dcookie
/*
2
4
5
*/
.
llong
.
sys_lookup_dcookie
/*
2
3
5
*/
.
llong
.
sys_epoll_create
.
llong
.
sys_epoll_ctl
.
llong
.
sys_epoll_wait
...
...
arch/ppc64/kernel/ppc_ksyms.c
View file @
a7ddb0fc
...
...
@@ -48,14 +48,10 @@
#endif
extern
int
sys_ioctl
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
sys_sigreturn
(
struct
pt_regs
*
regs
);
extern
int
do_signal
(
sigset_t
*
,
struct
pt_regs
*
);
extern
int
register_ioctl32_conversion
(
unsigned
int
cmd
,
int
(
*
handler
)(
unsigned
int
,
unsigned
int
,
unsigned
long
,
struct
file
*
));
extern
int
unregister_ioctl32_conversion
(
unsigned
int
cmd
);
long
long
__ashrdi3
(
long
long
,
int
);
long
long
__ashldi3
(
long
long
,
int
);
long
long
__lshrdi3
(
long
long
,
int
);
int
abs
(
int
);
extern
struct
pci_dev
*
iSeries_veth_dev
;
...
...
@@ -63,7 +59,6 @@ extern struct pci_dev * iSeries_vio_dev;
EXPORT_SYMBOL
(
do_signal
);
EXPORT_SYMBOL
(
sys_ioctl
);
EXPORT_SYMBOL
(
sys_sigreturn
);
EXPORT_SYMBOL
(
enable_irq
);
EXPORT_SYMBOL
(
disable_irq
);
EXPORT_SYMBOL
(
disable_irq_nosync
);
...
...
arch/ppc64/kernel/signal.c
View file @
a7ddb0fc
...
...
@@ -99,40 +99,6 @@ struct rt_sigframe
extern
int
do_signal
(
sigset_t
*
oldset
,
struct
pt_regs
*
regs
);
/*
* Atomically swap in the new signal mask, and wait for a signal.
*/
long
sys_sigsuspend
(
old_sigset_t
mask
,
int
p2
,
int
p3
,
int
p4
,
int
p6
,
int
p7
,
struct
pt_regs
*
regs
)
{
sigset_t
saveset
;
mask
&=
_BLOCKABLE
;
spin_lock_irq
(
&
current
->
sig
->
siglock
);
saveset
=
current
->
blocked
;
siginitset
(
&
current
->
blocked
,
mask
);
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
->
siglock
);
regs
->
result
=
-
EINTR
;
regs
->
gpr
[
3
]
=
EINTR
;
regs
->
ccr
|=
0x10000000
;
while
(
1
)
{
current
->
state
=
TASK_INTERRUPTIBLE
;
schedule
();
if
(
do_signal
(
&
saveset
,
regs
))
/*
* If a signal handler needs to be called,
* do_signal() has set R3 to the signal number (the
* first argument of the signal handler), so don't
* overwrite that with EINTR !
* In the other cases, do_signal() doesn't touch
* R3, so it's still set to -EINTR (see above).
*/
return
regs
->
gpr
[
3
];
}
}
long
sys_rt_sigsuspend
(
sigset_t
*
unewset
,
size_t
sigsetsize
,
int
p3
,
int
p4
,
int
p6
,
int
p7
,
struct
pt_regs
*
regs
)
{
...
...
@@ -170,37 +136,6 @@ long sys_sigaltstack(const stack_t *uss, stack_t *uoss, unsigned long r5,
return
do_sigaltstack
(
uss
,
uoss
,
regs
->
gpr
[
1
]);
}
long
sys_sigaction
(
int
sig
,
const
struct
old_sigaction
*
act
,
struct
old_sigaction
*
oact
)
{
struct
k_sigaction
new_ka
,
old_ka
;
int
ret
;
if
(
act
)
{
old_sigset_t
mask
;
if
(
verify_area
(
VERIFY_READ
,
act
,
sizeof
(
*
act
))
||
__get_user
(
new_ka
.
sa
.
sa_handler
,
&
act
->
sa_handler
)
||
__get_user
(
new_ka
.
sa
.
sa_restorer
,
&
act
->
sa_restorer
))
return
-
EFAULT
;
__get_user
(
new_ka
.
sa
.
sa_flags
,
&
act
->
sa_flags
);
__get_user
(
mask
,
&
act
->
sa_mask
);
siginitset
(
&
new_ka
.
sa
.
sa_mask
,
mask
);
}
ret
=
do_sigaction
(
sig
,
act
?
&
new_ka
:
NULL
,
oact
?
&
old_ka
:
NULL
);
if
(
!
ret
&&
oact
)
{
if
(
verify_area
(
VERIFY_WRITE
,
oact
,
sizeof
(
*
oact
))
||
__put_user
(
old_ka
.
sa
.
sa_handler
,
&
oact
->
sa_handler
)
||
__put_user
(
old_ka
.
sa
.
sa_restorer
,
&
oact
->
sa_restorer
))
return
-
EFAULT
;
__put_user
(
old_ka
.
sa
.
sa_flags
,
&
oact
->
sa_flags
);
__put_user
(
old_ka
.
sa
.
sa_mask
.
sig
[
0
],
&
oact
->
sa_mask
);
}
return
ret
;
}
/*
* When we have rt signals to deliver, we set up on the
* user stack, going down from the original stack pointer:
...
...
@@ -328,116 +263,6 @@ static void setup_rt_frame(struct pt_regs *regs, struct sigregs *frame,
do_exit
(
SIGSEGV
);
}
/*
* Do a signal return; undo the signal stack.
*/
long
sys_sigreturn
(
unsigned
long
r3
,
unsigned
long
r4
,
unsigned
long
r5
,
unsigned
long
r6
,
unsigned
long
r7
,
unsigned
long
r8
,
struct
pt_regs
*
regs
)
{
struct
sigcontext
*
sc
,
sigctx
;
struct
sigregs
*
sr
;
elf_gregset_t
saved_regs
;
/* an array of ELF_NGREG unsigned longs */
sigset_t
set
;
sc
=
(
struct
sigcontext
*
)(
regs
->
gpr
[
1
]
+
__SIGNAL_FRAMESIZE
);
if
(
copy_from_user
(
&
sigctx
,
sc
,
sizeof
(
sigctx
)))
goto
badframe
;
set
.
sig
[
0
]
=
sigctx
.
oldmask
;
#if _NSIG_WORDS > 1
set
.
sig
[
1
]
=
sigctx
.
_unused
[
3
];
#endif
sigdelsetmask
(
&
set
,
~
_BLOCKABLE
);
spin_lock_irq
(
&
current
->
sig
->
siglock
);
current
->
blocked
=
set
;
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
->
siglock
);
if
(
regs
->
msr
&
MSR_FP
)
giveup_fpu
(
current
);
/* restore registers */
sr
=
(
struct
sigregs
*
)
sigctx
.
regs
;
if
(
copy_from_user
(
saved_regs
,
&
sr
->
gp_regs
,
sizeof
(
sr
->
gp_regs
)))
goto
badframe
;
saved_regs
[
PT_MSR
]
=
(
regs
->
msr
&
~
MSR_USERCHANGE
)
|
(
saved_regs
[
PT_MSR
]
&
MSR_USERCHANGE
);
saved_regs
[
PT_SOFTE
]
=
regs
->
softe
;
memcpy
(
regs
,
saved_regs
,
GP_REGS_SIZE
);
if
(
copy_from_user
(
current
->
thread
.
fpr
,
&
sr
->
fp_regs
,
sizeof
(
sr
->
fp_regs
)))
goto
badframe
;
return
regs
->
result
;
badframe:
do_exit
(
SIGSEGV
);
}
/*
* Set up a signal frame.
*/
static
void
setup_frame
(
struct
pt_regs
*
regs
,
struct
sigregs
*
frame
,
unsigned
long
newsp
)
{
/* Handler is *really* a pointer to the function descriptor for
* the signal routine. The first entry in the function
* descriptor is the entry address of signal and the second
* entry is the TOC value we need to use.
*/
struct
funct_descr_entry
{
unsigned
long
entry
;
unsigned
long
toc
;
};
struct
funct_descr_entry
*
funct_desc_ptr
;
unsigned
long
temp_ptr
;
struct
sigcontext
*
sc
=
(
struct
sigcontext
*
)
newsp
;
if
(
verify_area
(
VERIFY_WRITE
,
frame
,
sizeof
(
*
frame
)))
goto
badframe
;
if
(
regs
->
msr
&
MSR_FP
)
giveup_fpu
(
current
);
if
(
__copy_to_user
(
&
frame
->
gp_regs
,
regs
,
GP_REGS_SIZE
)
||
__copy_to_user
(
&
frame
->
fp_regs
,
current
->
thread
.
fpr
,
ELF_NFPREG
*
sizeof
(
double
))
/* li r0, __NR_sigreturn */
||
__put_user
(
0x38000000UL
+
__NR_sigreturn
,
&
frame
->
tramp
[
0
])
/* sc */
||
__put_user
(
0x44000002UL
,
&
frame
->
tramp
[
1
]))
goto
badframe
;
flush_icache_range
((
unsigned
long
)
&
frame
->
tramp
[
0
],
(
unsigned
long
)
&
frame
->
tramp
[
2
]);
current
->
thread
.
fpscr
=
0
;
/* turn off all fp exceptions */
newsp
-=
__SIGNAL_FRAMESIZE
;
if
(
get_user
(
temp_ptr
,
&
sc
->
handler
))
goto
badframe
;
funct_desc_ptr
=
(
struct
funct_descr_entry
*
)
temp_ptr
;
if
(
put_user
(
regs
->
gpr
[
1
],
(
unsigned
long
*
)
newsp
)
||
get_user
(
regs
->
nip
,
&
funct_desc_ptr
->
entry
)
||
get_user
(
regs
->
gpr
[
2
],
&
funct_desc_ptr
->
toc
)
||
get_user
(
regs
->
gpr
[
3
],
&
sc
->
signal
))
goto
badframe
;
regs
->
gpr
[
1
]
=
newsp
;
regs
->
gpr
[
4
]
=
(
unsigned
long
)
sc
;
regs
->
link
=
(
unsigned
long
)
frame
->
tramp
;
return
;
badframe:
#if DEBUG_SIG
printk
(
"badframe in setup_frame, regs=%p frame=%p newsp=%lx
\n
"
,
regs
,
frame
,
newsp
);
#endif
do_exit
(
SIGSEGV
);
}
/*
* OK, we're invoking a handler
*/
...
...
@@ -582,10 +407,7 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
if
(
newsp
==
frame
)
return
0
;
/* no signals delivered */
/* Invoke correct stack setup routine */
if
(
ka
->
sa
.
sa_flags
&
SA_SIGINFO
)
setup_rt_frame
(
regs
,
(
struct
sigregs
*
)
frame
,
newsp
);
else
setup_frame
(
regs
,
(
struct
sigregs
*
)
frame
,
newsp
);
return
1
;
}
arch/ppc64/kernel/signal32.c
View file @
a7ddb0fc
...
...
@@ -114,6 +114,43 @@ struct rt_sigframe_32 {
* setup_frame32
*/
/*
* Atomically swap in the new signal mask, and wait for a signal.
*/
extern
int
do_signal
(
sigset_t
*
oldset
,
struct
pt_regs
*
regs
);
long
sys32_sigsuspend
(
old_sigset_t
mask
,
int
p2
,
int
p3
,
int
p4
,
int
p6
,
int
p7
,
struct
pt_regs
*
regs
)
{
sigset_t
saveset
;
mask
&=
_BLOCKABLE
;
spin_lock_irq
(
&
current
->
sig
->
siglock
);
saveset
=
current
->
blocked
;
siginitset
(
&
current
->
blocked
,
mask
);
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
->
siglock
);
regs
->
result
=
-
EINTR
;
regs
->
gpr
[
3
]
=
EINTR
;
regs
->
ccr
|=
0x10000000
;
while
(
1
)
{
current
->
state
=
TASK_INTERRUPTIBLE
;
schedule
();
if
(
do_signal
(
&
saveset
,
regs
))
/*
* If a signal handler needs to be called,
* do_signal() has set R3 to the signal number (the
* first argument of the signal handler), so don't
* overwrite that with EINTR !
* In the other cases, do_signal() doesn't touch
* R3, so it's still set to -EINTR (see above).
*/
return
regs
->
gpr
[
3
];
}
}
long
sys32_sigaction
(
int
sig
,
struct
old_sigaction32
*
act
,
struct
old_sigaction32
*
oact
)
{
...
...
@@ -800,9 +837,6 @@ long sys32_rt_sigqueueinfo(u32 pid, u32 sig, siginfo_t32 *uinfo)
return
ret
;
}
extern
int
do_signal
(
sigset_t
*
oldset
,
struct
pt_regs
*
regs
);
int
sys32_rt_sigsuspend
(
sigset32_t
*
unewset
,
size_t
sigsetsize
,
int
p3
,
int
p4
,
int
p6
,
int
p7
,
struct
pt_regs
*
regs
)
{
...
...
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