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
cefeddf3
Commit
cefeddf3
authored
Jan 20, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://are.twiddle.net/axp-2.6
into home.osdl.org:/home/torvalds/v2.5/linux
parents
b2a910c7
3a892a64
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
36 deletions
+21
-36
arch/alpha/kernel/signal.c
arch/alpha/kernel/signal.c
+14
-21
include/asm-alpha/elf.h
include/asm-alpha/elf.h
+7
-15
No files found.
arch/alpha/kernel/signal.c
View file @
cefeddf3
...
...
@@ -201,10 +201,13 @@ sys_sigaltstack(const stack_t *uss, stack_t *uoss)
* Do a signal return; undo the signal stack.
*/
#if _NSIG_WORDS > 1
# error "Non SA_SIGINFO frame needs rearranging"
#endif
struct
sigframe
{
struct
sigcontext
sc
;
unsigned
long
extramask
[
_NSIG_WORDS
-
1
];
unsigned
int
retcode
[
3
];
};
...
...
@@ -268,19 +271,20 @@ restore_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
return
err
;
}
/* Note that this syscall is also used by setcontext(3) to install
a given sigcontext. This because it's impossible to set *all*
registers and transfer control from userland. */
asmlinkage
void
do_sigreturn
(
struct
sig
frame
*
frame
,
struct
pt_regs
*
regs
,
do_sigreturn
(
struct
sig
context
*
sc
,
struct
pt_regs
*
regs
,
struct
switch_stack
*
sw
)
{
sigset_t
set
;
/* Verify that it's a good sigcontext before using it */
if
(
verify_area
(
VERIFY_READ
,
frame
,
sizeof
(
*
frame
)))
if
(
verify_area
(
VERIFY_READ
,
sc
,
sizeof
(
*
sc
)))
goto
give_sigsegv
;
if
(
__get_user
(
set
.
sig
[
0
],
&
frame
->
sc
.
sc_mask
)
||
(
_NSIG_WORDS
>
1
&&
__copy_from_user
(
&
set
.
sig
[
1
],
&
frame
->
extramask
,
sizeof
(
frame
->
extramask
))))
if
(
__get_user
(
set
.
sig
[
0
],
&
sc
->
sc_mask
))
goto
give_sigsegv
;
sigdelsetmask
(
&
set
,
~
_BLOCKABLE
);
...
...
@@ -289,7 +293,7 @@ do_sigreturn(struct sigframe *frame, struct pt_regs *regs,
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sighand
->
siglock
);
if
(
restore_sigcontext
(
&
frame
->
sc
,
regs
,
sw
))
if
(
restore_sigcontext
(
sc
,
regs
,
sw
))
goto
give_sigsegv
;
/* Send SIGTRAP if we're single-stepping: */
...
...
@@ -314,10 +318,9 @@ do_rt_sigreturn(struct rt_sigframe *frame, struct pt_regs *regs,
struct
switch_stack
*
sw
)
{
sigset_t
set
;
stack_t
st
;
/* Verify that it's a good
sigcontex
t before using it */
if
(
verify_area
(
VERIFY_READ
,
frame
,
sizeof
(
*
frame
)))
/* Verify that it's a good
ucontext_
t before using it */
if
(
verify_area
(
VERIFY_READ
,
&
frame
->
uc
,
sizeof
(
frame
->
uc
)))
goto
give_sigsegv
;
if
(
__copy_from_user
(
&
set
,
&
frame
->
uc
.
uc_sigmask
,
sizeof
(
set
)))
goto
give_sigsegv
;
...
...
@@ -331,12 +334,6 @@ do_rt_sigreturn(struct rt_sigframe *frame, struct pt_regs *regs,
if
(
restore_sigcontext
(
&
frame
->
uc
.
uc_mcontext
,
regs
,
sw
))
goto
give_sigsegv
;
if
(
__copy_from_user
(
&
st
,
&
frame
->
uc
.
uc_stack
,
sizeof
(
st
)))
goto
give_sigsegv
;
/* It is more difficult to avoid calling this function than to
call it and ignore errors. */
do_sigaltstack
(
&
st
,
NULL
,
rdusp
());
/* Send SIGTRAP if we're single-stepping: */
if
(
ptrace_cancel_bpt
(
current
))
{
siginfo_t
info
;
...
...
@@ -437,10 +434,6 @@ setup_frame(int sig, struct k_sigaction *ka, sigset_t *set,
goto
give_sigsegv
;
err
|=
setup_sigcontext
(
&
frame
->
sc
,
regs
,
sw
,
set
->
sig
[
0
],
oldsp
);
if
(
_NSIG_WORDS
>
1
)
{
err
|=
__copy_to_user
(
frame
->
extramask
,
&
set
->
sig
[
1
],
sizeof
(
frame
->
extramask
));
}
if
(
err
)
goto
give_sigsegv
;
...
...
include/asm-alpha/elf.h
View file @
cefeddf3
...
...
@@ -122,27 +122,19 @@ extern int dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task);
instruction set this CPU supports. This is trivial on Alpha,
but not so on other machines. */
#define ELF_HWCAP \
({ \
/* Sadly, most folks don't yet have assemblers that know about \
amask. This is "amask v0, v0" */
\
register long _v0 __asm("$0") = -1; \
__asm(".long 0x47e00c20" : "=r"(_v0) : "0"(_v0)); \
~_v0; \
})
#define ELF_HWCAP (~amask(-1))
/* This yields a string that ld.so will use to load implementation
specific libraries for optimization. This is more specific in
intent than poking at uname or /proc/cpuinfo.
This might do with checking bwx simultaneously... */
intent than poking at uname or /proc/cpuinfo. */
#define ELF_PLATFORM \
({ \
/* Or "implver v0" ... */
\
register long _v0 __asm("$0"); \
__asm(".long 0x47e03d80" : "=r"(_v0)); \
_v0 == 0 ? "ev4" : "ev5"; \
enum implver_enum i_ = implver(); \
( i_ == IMPLVER_EV4 ? "ev4" \
: i_ == IMPLVER_EV5 \
? (amask(AMASK_BWX) ? "ev5" : "ev56") \
: amask (AMASK_CIX) ? "ev6" : "ev67"); \
})
#ifdef __KERNEL__
...
...
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