summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/binfmt_aout32.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
commit27cfca1ec98e91261b1a5355d10a8996464b63af (patch)
tree8e895a53e372fa682b4c0a585b9377d67ed70d0e /arch/sparc64/kernel/binfmt_aout32.c
parent6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff)
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too o Upgrade to 2.1.89. Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'arch/sparc64/kernel/binfmt_aout32.c')
-rw-r--r--arch/sparc64/kernel/binfmt_aout32.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c
index 98066a321..55ccbc203 100644
--- a/arch/sparc64/kernel/binfmt_aout32.c
+++ b/arch/sparc64/kernel/binfmt_aout32.c
@@ -57,11 +57,12 @@ static void set_brk(unsigned long start, unsigned long end)
* macros to write out all the necessary info.
*/
#define DUMP_WRITE(addr,nr) \
-while (file.f_op->write(inode,&file,(char *)(addr),(nr)) != (nr)) goto close_coredump
+while (file.f_op->write(&file,(char *)(addr),(nr),&file.f_pos) != (nr)) \
+ goto close_coredump
#define DUMP_SEEK(offset) \
if (file.f_op->llseek) { \
- if (file.f_op->llseek(inode,&file,(offset),0) != (offset)) \
+ if (file.f_op->llseek(&file,(offset),0) != (offset)) \
goto close_coredump; \
} else file.f_pos = (offset)
@@ -81,7 +82,7 @@ do_aout32_core_dump(long signr, struct pt_regs * regs)
struct dentry * dentry = NULL;
struct inode * inode = NULL;
struct file file;
- unsigned short fs;
+ mm_segment_t fs;
int has_dumped = 0;
char corefile[6+sizeof(current->comm)];
unsigned long dump_start, dump_size;
@@ -256,7 +257,7 @@ static inline int do_load_aout32_binary(struct linux_binprm * bprm,
unsigned long p = bprm->p;
unsigned long fd_offset;
unsigned long rlim;
- int retval;
+int retval;
ex = *((struct exec *) bprm->buf); /* exec-header */
if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC &&
@@ -285,8 +286,6 @@ static inline int do_load_aout32_binary(struct linux_binprm * bprm,
return retval;
/* OK, This is the point of no return */
- memcpy(&current->tss.core_exec, &ex, sizeof(struct exec));
-
current->mm->end_code = ex.a_text +
(current->mm->start_code = N_TXTADDR(ex));
current->mm->end_data = ex.a_data +
@@ -420,13 +419,13 @@ do_load_aout32_library(int fd)
/* Seek into the file */
if (file->f_op->llseek) {
- if ((error = file->f_op->llseek(inode, file, 0, 0)) != 0)
+ if ((error = file->f_op->llseek(file, 0, 0)) != 0)
return -ENOEXEC;
} else
file->f_pos = 0;
set_fs(KERNEL_DS);
- error = file->f_op->read(inode, file, (char *) &ex, sizeof(ex));
+ error = file->f_op->read(file, (char *) &ex, sizeof(ex), &file->f_pos);
set_fs(USER_DS);
if (error != sizeof(ex))
return -ENOEXEC;