Skip to content

Commit 10cc5d4

Browse files
committed
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
2 parents d6b9cf4 + beb9797 commit 10cc5d4

File tree

7 files changed

+21
-23
lines changed

7 files changed

+21
-23
lines changed

arch/alpha/boot/bootp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <asm/hwrpb.h>
1919
#include <asm/io.h>
2020

21-
#include <stdarg.h>
21+
#include <linux/stdarg.h>
2222

2323
#include "ksize.h"
2424

arch/alpha/boot/bootpz.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <asm/hwrpb.h>
2121
#include <asm/io.h>
2222

23-
#include <stdarg.h>
23+
#include <linux/stdarg.h>
2424

2525
#include "kzsize.h"
2626

arch/alpha/boot/main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <asm/console.h>
1616
#include <asm/hwrpb.h>
1717

18-
#include <stdarg.h>
18+
#include <linux/stdarg.h>
1919

2020
#include "ksize.h"
2121

arch/alpha/boot/misc.c

-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ static ulg output_ptr;
8989
static ulg bytes_out;
9090

9191
static void error(char *m);
92-
static void gzip_mark(void **);
93-
static void gzip_release(void **);
9492

9593
extern int end;
9694
static ulg free_mem_ptr;

arch/alpha/boot/stdio.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/*
33
* Copyright (C) Paul Mackerras 1997.
44
*/
5-
#include <stdarg.h>
6-
#include <stddef.h>
5+
#include <linux/string.h>
6+
#include <linux/stdarg.h>
77

88
size_t strnlen(const char * s, size_t count)
99
{

arch/alpha/boot/tools/objstrip.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ main (int argc, char *argv[])
148148
#ifdef __ELF__
149149
elf = (struct elfhdr *) buf;
150150

151-
if (elf->e_ident[0] == 0x7f && str_has_prefix((char *)elf->e_ident + 1, "ELF")) {
151+
if (memcmp(&elf->e_ident[EI_MAG0], ELFMAG, SELFMAG) == 0) {
152152
if (elf->e_type != ET_EXEC) {
153153
fprintf(stderr, "%s: %s is not an ELF executable\n",
154154
prog_name, inname);

arch/alpha/kernel/traps.c

+15-15
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,21 @@ do_entIF(unsigned long type, struct pt_regs *regs)
233233
{
234234
int signo, code;
235235

236-
if ((regs->ps & ~IPL_MAX) == 0) {
236+
if (type == 3) { /* FEN fault */
237+
/* Irritating users can call PAL_clrfen to disable the
238+
FPU for the process. The kernel will then trap in
239+
do_switch_stack and undo_switch_stack when we try
240+
to save and restore the FP registers.
241+
242+
Given that GCC by default generates code that uses the
243+
FP registers, PAL_clrfen is not useful except for DoS
244+
attacks. So turn the bleeding FPU back on and be done
245+
with it. */
246+
current_thread_info()->pcb.flags |= 1;
247+
__reload_thread(&current_thread_info()->pcb);
248+
return;
249+
}
250+
if (!user_mode(regs)) {
237251
if (type == 1) {
238252
const unsigned int *data
239253
= (const unsigned int *) regs->pc;
@@ -366,20 +380,6 @@ do_entIF(unsigned long type, struct pt_regs *regs)
366380
}
367381
break;
368382

369-
case 3: /* FEN fault */
370-
/* Irritating users can call PAL_clrfen to disable the
371-
FPU for the process. The kernel will then trap in
372-
do_switch_stack and undo_switch_stack when we try
373-
to save and restore the FP registers.
374-
375-
Given that GCC by default generates code that uses the
376-
FP registers, PAL_clrfen is not useful except for DoS
377-
attacks. So turn the bleeding FPU back on and be done
378-
with it. */
379-
current_thread_info()->pcb.flags |= 1;
380-
__reload_thread(&current_thread_info()->pcb);
381-
return;
382-
383383
case 5: /* illoc */
384384
default: /* unexpected instruction-fault type */
385385
;

0 commit comments

Comments
 (0)