Commit 10cc5d48 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'work.alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull alpha updates from Al Viro:
 "FEN (floating-point enable) fault fix deals with a really old oopsable
  braino, the rest is alpha/boot compile fixes and minor cleaning up"

* 'work.alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  alpha/boot/misc: trim unused declarations
  alpha/boot/tools/objstrip: fix the check for ELF header
  alpha/boot: fix the breakage from -isystem series...
  alpha: fix FEN fault handling
parents d6b9cf41 beb9797e
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <asm/hwrpb.h> #include <asm/hwrpb.h>
#include <asm/io.h> #include <asm/io.h>
#include <stdarg.h> #include <linux/stdarg.h>
#include "ksize.h" #include "ksize.h"
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <asm/hwrpb.h> #include <asm/hwrpb.h>
#include <asm/io.h> #include <asm/io.h>
#include <stdarg.h> #include <linux/stdarg.h>
#include "kzsize.h" #include "kzsize.h"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <asm/console.h> #include <asm/console.h>
#include <asm/hwrpb.h> #include <asm/hwrpb.h>
#include <stdarg.h> #include <linux/stdarg.h>
#include "ksize.h" #include "ksize.h"
......
...@@ -89,8 +89,6 @@ static ulg output_ptr; ...@@ -89,8 +89,6 @@ static ulg output_ptr;
static ulg bytes_out; static ulg bytes_out;
static void error(char *m); static void error(char *m);
static void gzip_mark(void **);
static void gzip_release(void **);
extern int end; extern int end;
static ulg free_mem_ptr; static ulg free_mem_ptr;
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
/* /*
* Copyright (C) Paul Mackerras 1997. * Copyright (C) Paul Mackerras 1997.
*/ */
#include <stdarg.h> #include <linux/string.h>
#include <stddef.h> #include <linux/stdarg.h>
size_t strnlen(const char * s, size_t count) size_t strnlen(const char * s, size_t count)
{ {
......
...@@ -148,7 +148,7 @@ main (int argc, char *argv[]) ...@@ -148,7 +148,7 @@ main (int argc, char *argv[])
#ifdef __ELF__ #ifdef __ELF__
elf = (struct elfhdr *) buf; elf = (struct elfhdr *) buf;
if (elf->e_ident[0] == 0x7f && str_has_prefix((char *)elf->e_ident + 1, "ELF")) { if (memcmp(&elf->e_ident[EI_MAG0], ELFMAG, SELFMAG) == 0) {
if (elf->e_type != ET_EXEC) { if (elf->e_type != ET_EXEC) {
fprintf(stderr, "%s: %s is not an ELF executable\n", fprintf(stderr, "%s: %s is not an ELF executable\n",
prog_name, inname); prog_name, inname);
......
...@@ -233,7 +233,21 @@ do_entIF(unsigned long type, struct pt_regs *regs) ...@@ -233,7 +233,21 @@ do_entIF(unsigned long type, struct pt_regs *regs)
{ {
int signo, code; int signo, code;
if ((regs->ps & ~IPL_MAX) == 0) { if (type == 3) { /* FEN fault */
/* Irritating users can call PAL_clrfen to disable the
FPU for the process. The kernel will then trap in
do_switch_stack and undo_switch_stack when we try
to save and restore the FP registers.
Given that GCC by default generates code that uses the
FP registers, PAL_clrfen is not useful except for DoS
attacks. So turn the bleeding FPU back on and be done
with it. */
current_thread_info()->pcb.flags |= 1;
__reload_thread(&current_thread_info()->pcb);
return;
}
if (!user_mode(regs)) {
if (type == 1) { if (type == 1) {
const unsigned int *data const unsigned int *data
= (const unsigned int *) regs->pc; = (const unsigned int *) regs->pc;
...@@ -366,20 +380,6 @@ do_entIF(unsigned long type, struct pt_regs *regs) ...@@ -366,20 +380,6 @@ do_entIF(unsigned long type, struct pt_regs *regs)
} }
break; break;
case 3: /* FEN fault */
/* Irritating users can call PAL_clrfen to disable the
FPU for the process. The kernel will then trap in
do_switch_stack and undo_switch_stack when we try
to save and restore the FP registers.
Given that GCC by default generates code that uses the
FP registers, PAL_clrfen is not useful except for DoS
attacks. So turn the bleeding FPU back on and be done
with it. */
current_thread_info()->pcb.flags |= 1;
__reload_thread(&current_thread_info()->pcb);
return;
case 5: /* illoc */ case 5: /* illoc */
default: /* unexpected instruction-fault type */ default: /* unexpected instruction-fault type */
; ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment