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

Commit 21dc2e6c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml

Pull UML updates from Richard Weinberger:

 - remove hppfs ("HonePot ProcFS")

 - initial support for musl libc

 - uaccess cleanup

 - random cleanups and bug fixes all over the place

* 'for-linus-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: (21 commits)
  um: Don't pollute kernel namespace with uapi
  um: Include sys/types.h for makedev(), major(), minor()
  um: Do not use stdin and stdout identifiers for struct members
  um: Do not use __ptr_t type for stack_t's .ss pointer
  um: Fix mconsole dependency
  um: Handle tracehook_report_syscall_entry() result
  um: Remove copy&paste code from init.h
  um: Stop abusing __KERNEL__
  um: Catch unprotected user memory access
  um: Fix warning in setup_signal_stack_si()
  um: Rework uaccess code
  um: Add uaccess.h to ldt.c
  um: Add uaccess.h to syscalls_64.c
  um: Add asm/elf.h to vma.c
  um: Cleanup mem_32/64.c headers
  um: Remove hppfs
  um: Move syscall() declaration into os.h
  um: kernel: ksyms: Export symbol syscall() for fixing modpost issue
  um/os-Linux: Use char[] for syscall_stub declarations
  um: Use char[] for linker script address declarations
  ...
parents b779157d da028d5e
Loading
Loading
Loading
Loading
+1 −15
Original line number Original line Diff line number Diff line
@@ -44,23 +44,9 @@ config HOSTFS
          If you'd like to be able to work with files stored on the host,
          If you'd like to be able to work with files stored on the host,
          say Y or M here; otherwise say N.
          say Y or M here; otherwise say N.


config HPPFS
	tristate "HoneyPot ProcFS"
	depends on PROC_FS
	help
	  hppfs (HoneyPot ProcFS) is a filesystem which allows UML /proc
	  entries to be overridden, removed, or fabricated from the host.
	  Its purpose is to allow a UML to appear to be a physical machine
	  by removing or changing anything in /proc which gives away the
	  identity of a UML.

	  See <http://user-mode-linux.sf.net/old/hppfs.html> for more information.

	  You only need this if you are setting up a UML honeypot.  Otherwise,
	  it is safe to say 'N' here.

config MCONSOLE
config MCONSOLE
	bool "Management console"
	bool "Management console"
	depends on PROC_FS
	default y
	default y
	help
	help
          The user mode linux management console is a low-level interface to
          The user mode linux management console is a low-level interface to
+4 −3
Original line number Original line Diff line number Diff line
@@ -68,9 +68,10 @@ KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ \


KBUILD_AFLAGS += $(ARCH_INCLUDE)
KBUILD_AFLAGS += $(ARCH_INCLUDE)


USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\
USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \
	$(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
		$(ARCH_INCLUDE) $(MODE_INCLUDE) $(filter -I%,$(CFLAGS)) \
	$(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64 -idirafter include
		-D_FILE_OFFSET_BITS=64 -idirafter include \
		-D__KERNEL__ -D__UM_HOST__


#This will adjust *FLAGS accordingly to the platform.
#This will adjust *FLAGS accordingly to the platform.
include $(ARCH_DIR)/Makefile-os-$(OS)
include $(ARCH_DIR)/Makefile-os-$(OS)
+9 −9
Original line number Original line Diff line number Diff line
@@ -9,8 +9,8 @@
#include <os.h>
#include <os.h>


struct dog_data {
struct dog_data {
	int stdin;
	int stdin_fd;
	int stdout;
	int stdout_fd;
	int close_me[2];
	int close_me[2];
};
};


@@ -18,11 +18,11 @@ static void pre_exec(void *d)
{
{
	struct dog_data *data = d;
	struct dog_data *data = d;


	dup2(data->stdin, 0);
	dup2(data->stdin_fd, 0);
	dup2(data->stdout, 1);
	dup2(data->stdout_fd, 1);
	dup2(data->stdout, 2);
	dup2(data->stdout_fd, 2);
	close(data->stdin);
	close(data->stdin_fd);
	close(data->stdout);
	close(data->stdout_fd);
	close(data->close_me[0]);
	close(data->close_me[0]);
	close(data->close_me[1]);
	close(data->close_me[1]);
}
}
@@ -49,8 +49,8 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
		goto out_close_in;
		goto out_close_in;
	}
	}


	data.stdin = out_fds[0];
	data.stdin_fd = out_fds[0];
	data.stdout = in_fds[1];
	data.stdout_fd = in_fds[1];
	data.close_me[0] = out_fds[1];
	data.close_me[0] = out_fds[1];
	data.close_me[1] = in_fds[0];
	data.close_me[1] = in_fds[0];


+1 −1
Original line number Original line Diff line number Diff line
@@ -7,7 +7,7 @@
#ifndef __MCONSOLE_H__
#ifndef __MCONSOLE_H__
#define __MCONSOLE_H__
#define __MCONSOLE_H__


#ifndef __KERNEL__
#ifdef __UM_HOST__
#include <stdint.h>
#include <stdint.h>
#define u32 uint32_t
#define u32 uint32_t
#endif
#endif
+3 −3
Original line number Original line Diff line number Diff line
@@ -166,7 +166,7 @@ int net_sendto(int fd, void *buf, int len, void *to, int sock_len)


struct change_pre_exec_data {
struct change_pre_exec_data {
	int close_me;
	int close_me;
	int stdout;
	int stdout_fd;
};
};


static void change_pre_exec(void *arg)
static void change_pre_exec(void *arg)
@@ -174,7 +174,7 @@ static void change_pre_exec(void *arg)
	struct change_pre_exec_data *data = arg;
	struct change_pre_exec_data *data = arg;


	close(data->close_me);
	close(data->close_me);
	dup2(data->stdout, 1);
	dup2(data->stdout_fd, 1);
}
}


static int change_tramp(char **argv, char *output, int output_len)
static int change_tramp(char **argv, char *output, int output_len)
@@ -189,7 +189,7 @@ static int change_tramp(char **argv, char *output, int output_len)
		return err;
		return err;
	}
	}
	pe_data.close_me = fds[0];
	pe_data.close_me = fds[0];
	pe_data.stdout = fds[1];
	pe_data.stdout_fd = fds[1];
	pid = run_helper(change_pre_exec, &pe_data, argv);
	pid = run_helper(change_pre_exec, &pe_data, argv);


	if (pid > 0)	/* Avoid hang as we won't get data in failure case. */
	if (pid > 0)	/* Avoid hang as we won't get data in failure case. */
Loading