Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fab95c55 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds
Browse files

uml: get rid of do_longjmp



do_longjmp used to be needed when UML didn't have its own implementation of
setjmp and longjmp.  They came from libc, and couldn't be called directly from
kernel code, as the libc jmp_buf couldn't be imported there.  do_longjmp was a
userspace function which served to provide longjmp access to kernel code.

This is gone, and a number of void * pointers can now be jmp_buf *.

Signed-off-by: default avatarJeff Dike <jdike@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0a7675aa
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -193,7 +193,7 @@ extern int os_getpid(void);
extern int os_getpgrp(void);
extern int os_getpgrp(void);


extern void init_new_thread_signals(void);
extern void init_new_thread_signals(void);
extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr);
extern int run_kernel_thread(int (*fn)(void *), void *arg, jmp_buf **jmp_ptr);


extern int os_map_memory(void *virt, int fd, unsigned long long off,
extern int os_map_memory(void *virt, int fd, unsigned long long off,
			 unsigned long len, int r, int w, int x);
			 unsigned long len, int r, int w, int x);
@@ -206,7 +206,7 @@ extern void os_flush_stdout(void);


/* uaccess.c */
/* uaccess.c */
extern unsigned long __do_user_copy(void *to, const void *from, int n,
extern unsigned long __do_user_copy(void *to, const void *from, int n,
				    void **fault_addr, void **fault_catcher,
				    void **fault_addr, jmp_buf **fault_catcher,
				    void (*op)(void *to, const void *from,
				    void (*op)(void *to, const void *from,
					       int n), int *faulted_out);
					       int n), int *faulted_out);


@@ -240,7 +240,6 @@ extern int set_signals(int enable);


/* trap.c */
/* trap.c */
extern void os_fill_handlinfo(struct kern_handlers h);
extern void os_fill_handlinfo(struct kern_handlers h);
extern void do_longjmp(void *p, int val);


/* util.c */
/* util.c */
extern void stack_protections(unsigned long address);
extern void stack_protections(unsigned long address);
+4 −0
Original line number Original line Diff line number Diff line
@@ -30,6 +30,10 @@
extern int copy_from_user(void *to, const void __user *from, int n);
extern int copy_from_user(void *to, const void __user *from, int n);
extern int copy_to_user(void __user *to, const void *from, int n);
extern int copy_to_user(void __user *to, const void *from, int n);


extern int __do_copy_to_user(void *to, const void *from, int n,
			     void **fault_addr, jmp_buf **fault_catcher);
extern void __do_copy(void *to, const void *from, int n);

/*
/*
 * strncpy_from_user: - Copy a NUL terminated string from userspace.
 * strncpy_from_user: - Copy a NUL terminated string from userspace.
 * @dst:   Destination address, in kernel space.  This buffer must be at
 * @dst:   Destination address, in kernel space.  This buffer must be at

arch/um/include/uml_uaccess.h

deleted100644 → 0
+0 −24
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2001 Jeff Dike (jdike@karaya.com)
 * Licensed under the GPL
 */

#ifndef __UML_UACCESS_H__
#define __UML_UACCESS_H__

extern int __do_copy_to_user(void *to, const void *from, int n,
			     void **fault_addr, void **fault_catcher);
void __do_copy(void *to, const void *from, int n);

#endif

/*
 * Overrides for Emacs so that we follow Linus's tabbing style.
 * Emacs will notice this stuff at the end of the file and automatically
 * adjust the settings for this buffer only.  This must remain at the end
 * of the file.
 * ---------------------------------------------------------------------------
 * Local variables:
 * c-file-style: "linux"
 * End:
 */
+1 −1
Original line number Original line Diff line number Diff line
@@ -75,7 +75,7 @@ long um_execve(char *file, char __user *__user *argv, char __user *__user *env)


	err = execve1(file, argv, env);
	err = execve1(file, argv, env);
	if (!err)
	if (!err)
		do_longjmp(current->thread.exec_buf, 1);
		UML_LONGJMP(current->thread.exec_buf, 1);
	return err;
	return err;
}
}


+1 −1
Original line number Original line Diff line number Diff line
@@ -17,7 +17,7 @@
#include "as-layout.h"
#include "as-layout.h"
#include "kern.h"
#include "kern.h"
#include "mem_user.h"
#include "mem_user.h"
#include "uml_uaccess.h"
#include "um_uaccess.h"
#include "os.h"
#include "os.h"
#include "linux/types.h"
#include "linux/types.h"
#include "linux/string.h"
#include "linux/string.h"
Loading