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
130f7f92
Commit
130f7f92
authored
Oct 15, 2002
by
Stephen Rothwell
Committed by
David S. Miller
Oct 15, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: arch specific copy_siginfo_to_user no longer needed.
parent
96c935cb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
66 deletions
+3
-66
arch/sparc/kernel/signal.c
arch/sparc/kernel/signal.c
+0
-32
arch/sparc64/kernel/signal.c
arch/sparc64/kernel/signal.c
+0
-32
include/asm-sparc/siginfo.h
include/asm-sparc/siginfo.h
+0
-1
include/asm-sparc64/siginfo.h
include/asm-sparc64/siginfo.h
+0
-1
kernel/signal.c
kernel/signal.c
+3
-0
No files found.
arch/sparc/kernel/signal.c
View file @
130f7f92
...
...
@@ -90,38 +90,6 @@ struct rt_signal_frame {
__siginfo_fpu_t
fpu_state
;
};
int
copy_siginfo_to_user
(
siginfo_t
*
to
,
siginfo_t
*
from
)
{
if
(
!
access_ok
(
VERIFY_WRITE
,
to
,
sizeof
(
siginfo_t
)))
return
-
EFAULT
;
if
(
from
->
si_code
<
0
)
return
__copy_to_user
(
to
,
from
,
sizeof
(
siginfo_t
));
else
{
int
err
;
/* If you change siginfo_t structure, please be sure
this code is fixed accordingly.
It should never copy any pad contained in the structure
to avoid security leaks, but must copy the generic
3 ints plus the relevant union member. */
err
=
__put_user
(
from
->
si_signo
,
&
to
->
si_signo
);
err
|=
__put_user
(
from
->
si_errno
,
&
to
->
si_errno
);
err
|=
__put_user
((
short
)
from
->
si_code
,
&
to
->
si_code
);
switch
(
from
->
si_code
>>
16
)
{
case
__SI_CHLD
>>
16
:
err
|=
__put_user
(
from
->
si_utime
,
&
to
->
si_utime
);
err
|=
__put_user
(
from
->
si_stime
,
&
to
->
si_stime
);
/* case __SI_RT: This is not generated by the kernel as of now. */
err
|=
__put_user
(
from
->
si_status
,
&
to
->
si_status
);
default:
err
|=
__put_user
(
from
->
si_uid
,
&
to
->
si_uid
);
err
|=
__put_user
(
from
->
si_pid
,
&
to
->
si_pid
);
break
;
}
return
err
;
}
}
/* Align macros */
#define SF_ALIGNEDSZ (((sizeof(struct signal_sframe) + 7) & (~7)))
#define NF_ALIGNEDSZ (((sizeof(struct new_signal_frame) + 7) & (~7)))
...
...
arch/sparc64/kernel/signal.c
View file @
130f7f92
...
...
@@ -36,38 +36,6 @@
static
int
do_signal
(
sigset_t
*
oldset
,
struct
pt_regs
*
regs
,
unsigned
long
orig_o0
,
int
ret_from_syscall
);
int
copy_siginfo_to_user
(
siginfo_t
*
to
,
siginfo_t
*
from
)
{
if
(
!
access_ok
(
VERIFY_WRITE
,
to
,
sizeof
(
siginfo_t
)))
return
-
EFAULT
;
if
(
from
->
si_code
<
0
)
return
__copy_to_user
(
to
,
from
,
sizeof
(
siginfo_t
));
else
{
int
err
;
/* If you change siginfo_t structure, please be sure
this code is fixed accordingly.
It should never copy any pad contained in the structure
to avoid security leaks, but must copy the generic
3 ints plus the relevant union member. */
err
=
__put_user
(
*
(
long
*
)
&
from
->
si_signo
,
(
long
*
)
&
to
->
si_signo
);
err
|=
__put_user
((
short
)
from
->
si_code
,
&
to
->
si_code
);
switch
(
from
->
si_code
>>
16
)
{
case
__SI_CHLD
>>
16
:
err
|=
__put_user
(
from
->
si_utime
,
&
to
->
si_utime
);
err
|=
__put_user
(
from
->
si_stime
,
&
to
->
si_stime
);
case
__SI_FAULT
>>
16
:
case
__SI_POLL
>>
16
:
err
|=
__put_user
(
from
->
si_trapno
,
&
to
->
si_trapno
);
default:
err
|=
__put_user
(
from
->
si_addr
,
&
to
->
si_addr
);
break
;
/* case __SI_RT: This is not generated by the kernel as of now. */
}
return
err
;
}
}
/* {set, get}context() needed for 64-bit SparcLinux userland. */
asmlinkage
void
sparc64_set_context
(
struct
pt_regs
*
regs
)
{
...
...
include/asm-sparc/siginfo.h
View file @
130f7f92
...
...
@@ -7,7 +7,6 @@
#define __ARCH_SI_UID_T unsigned int
#define __ARCH_SI_TRAPNO
#define HAVE_ARCH_COPY_SIGINFO_TO_USER
#include <asm-generic/siginfo.h>
...
...
include/asm-sparc64/siginfo.h
View file @
130f7f92
...
...
@@ -8,7 +8,6 @@
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
#define __ARCH_SI_TRAPNO
#define HAVE_ARCH_COPY_SIGINFO_TO_USER
#include <asm-generic/siginfo.h>
...
...
kernel/signal.c
View file @
130f7f92
...
...
@@ -1427,6 +1427,9 @@ int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
break
;
case
__SI_FAULT
:
err
|=
__put_user
(
from
->
si_addr
,
&
to
->
si_addr
);
#ifdef __ARCH_SI_TRAPNO
err
|=
__put_user
(
from
->
si_trapno
,
&
to
->
si_trapno
);
#endif
break
;
case
__SI_CHLD
:
err
|=
__put_user
(
from
->
si_pid
,
&
to
->
si_pid
);
...
...
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