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

Commit 4bde961e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull UML updates from Richard Weinberger:

 - a new hrtimer based clocksource by Anton Ivanov

 - ptrace() enhancments by Richard Weinberger

 - random cleanups and bug fixes all over the place

* 'for-linus-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  um: Switch clocksource to hrtimers
  um: net: replace GFP_KERNEL with GFP_ATOMIC when spinlock is held
  um: Report host OOM more nicely
  um: Simplify STUB_DATA loading
  um: Remove dead symbol from i386 syscall stub
  um: Remove dead code from x86_64 syscall stub
  um: Get rid of open coded NR_SYSCALLS
  um: Store syscall number after syscall_trace_enter()
  um: Define PTRACE_OLDSETOPTIONS
parents c6de7f17 2eb5f31b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ export LDS_ELF_FORMAT := $(ELF_FORMAT)
# The wrappers will select whether using "malloc" or the kernel allocator.
LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc

LD_FLAGS_CMDLINE = $(foreach opt,$(LDFLAGS),-Wl,$(opt))
LD_FLAGS_CMDLINE = $(foreach opt,$(LDFLAGS),-Wl,$(opt)) -lrt

# Used by link-vmlinux.sh which has special support for um link
export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE)
+9 −8
Original line number Diff line number Diff line
@@ -388,7 +388,7 @@ static const struct net_device_ops uml_netdev_ops = {
static int driver_registered;

static void eth_configure(int n, void *init, char *mac,
			  struct transport *transport)
			  struct transport *transport, gfp_t gfp_mask)
{
	struct uml_net *device;
	struct net_device *dev;
@@ -397,7 +397,7 @@ static void eth_configure(int n, void *init, char *mac,

	size = transport->private_size + sizeof(struct uml_net_private);

	device = kzalloc(sizeof(*device), GFP_KERNEL);
	device = kzalloc(sizeof(*device), gfp_mask);
	if (device == NULL) {
		printk(KERN_ERR "eth_configure failed to allocate struct "
		       "uml_net\n");
@@ -568,7 +568,7 @@ static LIST_HEAD(transports);
static LIST_HEAD(eth_cmd_line);

static int check_transport(struct transport *transport, char *eth, int n,
			   void **init_out, char **mac_out)
			   void **init_out, char **mac_out, gfp_t gfp_mask)
{
	int len;

@@ -582,7 +582,7 @@ static int check_transport(struct transport *transport, char *eth, int n,
	else if (*eth != '\0')
		return 0;

	*init_out = kmalloc(transport->setup_size, GFP_KERNEL);
	*init_out = kmalloc(transport->setup_size, gfp_mask);
	if (*init_out == NULL)
		return 1;

@@ -609,11 +609,11 @@ void register_transport(struct transport *new)
	list_for_each_safe(ele, next, &eth_cmd_line) {
		eth = list_entry(ele, struct eth_init, list);
		match = check_transport(new, eth->init, eth->index, &init,
					&mac);
					&mac, GFP_KERNEL);
		if (!match)
			continue;
		else if (init != NULL) {
			eth_configure(eth->index, init, mac, new);
			eth_configure(eth->index, init, mac, new, GFP_KERNEL);
			kfree(init);
		}
		list_del(&eth->list);
@@ -631,10 +631,11 @@ static int eth_setup_common(char *str, int index)
	spin_lock(&transports_lock);
	list_for_each(ele, &transports) {
		transport = list_entry(ele, struct transport, list);
	        if (!check_transport(transport, str, index, &init, &mac))
	        if (!check_transport(transport, str, index, &init,
					&mac, GFP_ATOMIC))
			continue;
		if (init != NULL) {
			eth_configure(index, init, mac, transport);
			eth_configure(index, init, mac, transport, GFP_ATOMIC);
			kfree(init);
		}
		found = 1;
+2 −0
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ struct pt_regs {

#define instruction_pointer(regs) PT_REGS_IP(regs)

#define PTRACE_OLDSETOPTIONS 21

struct task_struct;

extern long subarch_ptrace(struct task_struct *child, long request,
+14 −5
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 Anton Ivanov (aivanov@{brocade.com,kot-begemot.co.uk})
 * Copyright (C) 2015 Thomas Meyer (thomas@m3y3r.de)
 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
 * Licensed under the GPL
 */
@@ -183,6 +185,7 @@ extern int create_mem_file(unsigned long long len);
/* process.c */
extern unsigned long os_process_pc(int pid);
extern int os_process_parent(int pid);
extern void os_alarm_process(int pid);
extern void os_stop_process(int pid);
extern void os_kill_process(int pid, int reap_child);
extern void os_kill_ptraced_process(int pid, int reap_child);
@@ -217,7 +220,7 @@ extern int set_umid(char *name);
extern char *get_umid(void);

/* signal.c */
extern void timer_init(void);
extern void timer_set_signal_handler(void);
extern void set_sigstack(void *sig_stack, int size);
extern void remove_sigstack(void);
extern void set_handler(int sig);
@@ -227,6 +230,7 @@ extern void unblock_signals(void);
extern int get_signals(void);
extern int set_signals(int enable);
extern int os_is_signal_stack(void);
extern void deliver_alarm(void);

/* util.c */
extern void stack_protections(unsigned long address);
@@ -238,12 +242,16 @@ extern void um_early_printk(const char *s, unsigned int n);
extern void os_fix_helper_signals(void);

/* time.c */
extern void idle_sleep(unsigned long long nsecs);
extern int set_interval(void);
extern int timer_one_shot(int ticks);
extern long long disable_timer(void);
extern void os_idle_sleep(unsigned long long nsecs);
extern int os_timer_create(void* timer);
extern int os_timer_set_interval(void* timer, void* its);
extern int os_timer_one_shot(int ticks);
extern long long os_timer_disable(void);
extern long os_timer_remain(void* timer);
extern void uml_idle_timer(void);
extern long long os_persistent_clock_emulation(void);
extern long long os_nsecs(void);
extern long long os_vnsecs(void);

/* skas/mem.c */
extern long run_syscall_stub(struct mm_id * mm_idp,
@@ -274,6 +282,7 @@ extern void initial_thread_cb_skas(void (*proc)(void *),
				 void *arg);
extern void halt_skas(void);
extern void reboot_skas(void);
extern int get_syscall(struct uml_pt_regs *regs);

/* irq.c */
extern int os_waiting_for_events(struct irq_fd *active_fds);
+4 −3
Original line number Diff line number Diff line
/*

 * Copyright (C) 2015 Thomas Meyer (thomas@m3y3r.de)
 * Copyright (C) 2005 Jeff Dike (jdike@karaya.com)
 * Licensed under the GPL
 */
@@ -6,12 +8,11 @@
#ifndef __STUB_DATA_H
#define __STUB_DATA_H

#include <sys/time.h>
#include <time.h>

struct stub_data {
	long offset;
	unsigned long offset;
	int fd;
	struct itimerval timer;
	long err;
};

Loading