You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-linus' of git://github.com/richardweinberger/linux
* 'for-linus' of git://github.com/richardweinberger/linux: (90 commits)
um: fix ubd cow size
um: Fix kmalloc argument order in um/vdso/vma.c
um: switch to use of drivers/Kconfig
UserModeLinux-HOWTO.txt: fix a typo
UserModeLinux-HOWTO.txt: remove ^H characters
um: we need sys/user.h only on i386
um: merge delay_{32,64}.c
um: distribute exports to where exported stuff is defined
um: kill system-um.h
um: generic ftrace.h will do...
um: segment.h is x86-only and needed only there
um: asm/pda.h is not needed anymore
um: hw_irq.h can go generic as well
um: switch to generic-y
um: clean Kconfig up a bit
um: a couple of missing dependencies...
um: kill useless argument of free_chan() and free_one_chan()
um: unify ptrace_user.h
um: unify KSTK_...
um: fix gcov build breakage
...
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+1
-113
@@ -1,5 +1,4 @@
|
||||
|
||||
menu "Character Devices"
|
||||
menu "UML Character Devices"
|
||||
|
||||
config STDERR_CONSOLE
|
||||
bool "stderr console"
|
||||
@@ -105,92 +104,6 @@ config SSL_CHAN
|
||||
this if you expect the UML that you build to be run in environments
|
||||
which don't have a set of /dev/pty* devices.
|
||||
|
||||
config UNIX98_PTYS
|
||||
bool "Unix98 PTY support"
|
||||
help
|
||||
A pseudo terminal (PTY) is a software device consisting of two
|
||||
halves: a master and a slave. The slave device behaves identical to
|
||||
a physical terminal; the master device is used by a process to
|
||||
read data from and write data to the slave, thereby emulating a
|
||||
terminal. Typical programs for the master side are telnet servers
|
||||
and xterms.
|
||||
|
||||
Linux has traditionally used the BSD-like names /dev/ptyxx for
|
||||
masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
|
||||
has a number of problems. The GNU C library glibc 2.1 and later,
|
||||
however, supports the Unix98 naming standard: in order to acquire a
|
||||
pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
|
||||
terminal is then made available to the process and the pseudo
|
||||
terminal slave can be accessed as /dev/pts/<number>. What was
|
||||
traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
|
||||
|
||||
All modern Linux systems use the Unix98 ptys. Say Y unless
|
||||
you're on an embedded system and want to conserve memory.
|
||||
|
||||
config LEGACY_PTYS
|
||||
bool "Legacy (BSD) PTY support"
|
||||
default y
|
||||
help
|
||||
A pseudo terminal (PTY) is a software device consisting of two
|
||||
halves: a master and a slave. The slave device behaves identical to
|
||||
a physical terminal; the master device is used by a process to
|
||||
read data from and write data to the slave, thereby emulating a
|
||||
terminal. Typical programs for the master side are telnet servers
|
||||
and xterms.
|
||||
|
||||
Linux has traditionally used the BSD-like names /dev/ptyxx
|
||||
for masters and /dev/ttyxx for slaves of pseudo
|
||||
terminals. This scheme has a number of problems, including
|
||||
security. This option enables these legacy devices; on most
|
||||
systems, it is safe to say N.
|
||||
|
||||
config RAW_DRIVER
|
||||
tristate "RAW driver (/dev/raw/rawN)"
|
||||
depends on BLOCK
|
||||
help
|
||||
The raw driver permits block devices to be bound to /dev/raw/rawN.
|
||||
Once bound, I/O against /dev/raw/rawN uses efficient zero-copy I/O.
|
||||
See the raw(8) manpage for more details.
|
||||
|
||||
Applications should preferably open the device (eg /dev/hda1)
|
||||
with the O_DIRECT flag.
|
||||
|
||||
config MAX_RAW_DEVS
|
||||
int "Maximum number of RAW devices to support (1-8192)"
|
||||
depends on RAW_DRIVER
|
||||
default "256"
|
||||
help
|
||||
The maximum number of RAW devices that are supported.
|
||||
Default is 256. Increase this number in case you need lots of
|
||||
raw devices.
|
||||
|
||||
config LEGACY_PTY_COUNT
|
||||
int "Maximum number of legacy PTY in use"
|
||||
depends on LEGACY_PTYS
|
||||
default "256"
|
||||
help
|
||||
The maximum number of legacy PTYs that can be used at any one time.
|
||||
The default is 256, and should be more than enough. Embedded
|
||||
systems may want to reduce this to save memory.
|
||||
|
||||
When not in use, each legacy PTY occupies 12 bytes on 32-bit
|
||||
architectures and 24 bytes on 64-bit architectures.
|
||||
|
||||
config WATCHDOG
|
||||
bool "Watchdog Timer Support"
|
||||
|
||||
config WATCHDOG_NOWAYOUT
|
||||
bool "Disable watchdog shutdown on close"
|
||||
depends on WATCHDOG
|
||||
|
||||
config SOFT_WATCHDOG
|
||||
tristate "Software Watchdog"
|
||||
depends on WATCHDOG
|
||||
|
||||
config UML_WATCHDOG
|
||||
tristate "UML watchdog"
|
||||
depends on WATCHDOG
|
||||
|
||||
config UML_SOUND
|
||||
tristate "Sound support"
|
||||
help
|
||||
@@ -211,29 +124,4 @@ config HOSTAUDIO
|
||||
tristate
|
||||
default UML_SOUND
|
||||
|
||||
#It is selected elsewhere, so kconfig would warn without this.
|
||||
config HW_RANDOM
|
||||
tristate
|
||||
default n
|
||||
|
||||
config UML_RANDOM
|
||||
tristate "Hardware random number generator"
|
||||
help
|
||||
This option enables UML's "hardware" random number generator. It
|
||||
attaches itself to the host's /dev/random, supplying as much entropy
|
||||
as the host has, rather than the small amount the UML gets from its
|
||||
own drivers. It registers itself as a standard hardware random number
|
||||
generator, major 10, minor 183, and the canonical device name is
|
||||
/dev/hwrng.
|
||||
The way to make use of this is to install the rng-tools package
|
||||
(check your distro, or download from
|
||||
http://sourceforge.net/projects/gkernel/). rngd periodically reads
|
||||
/dev/hwrng and injects the entropy into /dev/random.
|
||||
|
||||
config MMAPPER
|
||||
tristate "iomem emulation driver"
|
||||
help
|
||||
This driver allows a host file to be used as emulated IO memory inside
|
||||
UML.
|
||||
|
||||
endmenu
|
||||
|
||||
+1
-22
@@ -2,20 +2,14 @@ source "init/Kconfig"
|
||||
|
||||
source "kernel/Kconfig.freezer"
|
||||
|
||||
source "drivers/block/Kconfig"
|
||||
|
||||
source "arch/um/Kconfig.char"
|
||||
|
||||
source "drivers/base/Kconfig"
|
||||
source "drivers/Kconfig"
|
||||
|
||||
source "net/Kconfig"
|
||||
|
||||
source "arch/um/Kconfig.net"
|
||||
|
||||
source "drivers/net/Kconfig"
|
||||
|
||||
source "drivers/connector/Kconfig"
|
||||
|
||||
source "fs/Kconfig"
|
||||
|
||||
source "security/Kconfig"
|
||||
@@ -24,19 +18,4 @@ source "crypto/Kconfig"
|
||||
|
||||
source "lib/Kconfig"
|
||||
|
||||
source "drivers/scsi/Kconfig"
|
||||
|
||||
source "drivers/md/Kconfig"
|
||||
|
||||
if BROKEN
|
||||
source "drivers/mtd/Kconfig"
|
||||
endif
|
||||
|
||||
source "drivers/leds/Kconfig"
|
||||
|
||||
#This is just to shut up some Kconfig warnings, so no prompt.
|
||||
config INPUT
|
||||
tristate
|
||||
default n
|
||||
|
||||
source "arch/um/Kconfig.debug"
|
||||
|
||||
@@ -148,5 +148,11 @@ config KERNEL_STACK_ORDER
|
||||
be 1 << order pages. The default is OK unless you're running Valgrind
|
||||
on UML, in which case, set this to 3.
|
||||
|
||||
config MMAPPER
|
||||
tristate "iomem emulation driver"
|
||||
help
|
||||
This driver allows a host file to be used as emulated IO memory inside
|
||||
UML.
|
||||
|
||||
config NO_DMA
|
||||
def_bool y
|
||||
|
||||
+26
-23
@@ -20,15 +20,27 @@ core-y += $(ARCH_DIR)/kernel/ \
|
||||
|
||||
MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas
|
||||
|
||||
HEADER_ARCH := $(SUBARCH)
|
||||
|
||||
# Additional ARCH settings for x86
|
||||
ifeq ($(SUBARCH),i386)
|
||||
HEADER_ARCH := x86
|
||||
endif
|
||||
ifeq ($(SUBARCH),x86_64)
|
||||
HEADER_ARCH := x86
|
||||
endif
|
||||
|
||||
HOST_DIR := arch/$(HEADER_ARCH)
|
||||
|
||||
include $(srctree)/$(ARCH_DIR)/Makefile-skas
|
||||
include $(srctree)/$(HOST_DIR)/Makefile.um
|
||||
|
||||
core-y += $(HOST_DIR)/um/
|
||||
|
||||
SHARED_HEADERS := $(ARCH_DIR)/include/shared
|
||||
ARCH_INCLUDE := -I$(srctree)/$(SHARED_HEADERS)
|
||||
ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH)/shared
|
||||
ifneq ($(KBUILD_SRC),)
|
||||
ARCH_INCLUDE += -I$(SHARED_HEADERS)
|
||||
endif
|
||||
KBUILD_CPPFLAGS += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH)
|
||||
ARCH_INCLUDE += -I$(srctree)/$(HOST_DIR)/um/shared
|
||||
KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/um
|
||||
|
||||
# -Dvmap=kernel_vmap prevents anything from referencing the libpcap.o symbol so
|
||||
# named - it's a common symbol in libpcap, so we get a binary which crashes.
|
||||
@@ -47,14 +59,12 @@ KBUILD_AFLAGS += $(ARCH_INCLUDE)
|
||||
|
||||
USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\
|
||||
$(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
|
||||
$(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64
|
||||
|
||||
include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
|
||||
$(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64 -idirafter include
|
||||
|
||||
#This will adjust *FLAGS accordingly to the platform.
|
||||
include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
|
||||
|
||||
KBUILD_CPPFLAGS += -I$(srctree)/arch/$(HEADER_ARCH)/include
|
||||
KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include
|
||||
|
||||
# -Derrno=kernel_errno - This turns all kernel references to errno into
|
||||
# kernel_errno to separate them from the libc errno. This allows -fno-common
|
||||
@@ -84,10 +94,9 @@ define archhelp
|
||||
echo ' find in the kernel root.'
|
||||
endef
|
||||
|
||||
KBUILD_KCONFIG := arch/um/Kconfig.$(HEADER_ARCH)
|
||||
KBUILD_KCONFIG := $(HOST_DIR)/um/Kconfig
|
||||
|
||||
archprepare: $(SHARED_HEADERS)/user_constants.h
|
||||
archprepare: $(SHARED_HEADERS)/kern_constants.h
|
||||
archprepare: include/generated/user_constants.h
|
||||
|
||||
LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
|
||||
LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib
|
||||
@@ -118,9 +127,7 @@ endef
|
||||
|
||||
# When cleaning we don't include .config, so we don't include
|
||||
# TT or skas makefiles and don't clean skas_ptregs.h.
|
||||
CLEAN_FILES += linux x.i gmon.out \
|
||||
$(SHARED_HEADERS)/user_constants.h \
|
||||
$(SHARED_HEADERS)/kern_constants.h
|
||||
CLEAN_FILES += linux x.i gmon.out
|
||||
|
||||
archclean:
|
||||
@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
|
||||
@@ -128,8 +135,8 @@ archclean:
|
||||
|
||||
# Generated files
|
||||
|
||||
$(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s: FORCE
|
||||
$(Q)$(MAKE) $(build)=$(ARCH_DIR)/sys-$(SUBARCH) $@
|
||||
$(HOST_DIR)/um/user-offsets.s: FORCE
|
||||
$(Q)$(MAKE) $(build)=$(HOST_DIR)/um $@
|
||||
|
||||
define filechk_gen-asm-offsets
|
||||
(set -e; \
|
||||
@@ -144,11 +151,7 @@ define filechk_gen-asm-offsets
|
||||
echo ""; )
|
||||
endef
|
||||
|
||||
$(SHARED_HEADERS)/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s
|
||||
include/generated/user_constants.h: $(HOST_DIR)/um/user-offsets.s
|
||||
$(call filechk,gen-asm-offsets)
|
||||
|
||||
$(SHARED_HEADERS)/kern_constants.h:
|
||||
$(Q)mkdir -p $(dir $@)
|
||||
$(Q)echo '#include "../../../../include/generated/asm-offsets.h"' >$@
|
||||
|
||||
export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH
|
||||
export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# Copyright 2003 - 2004 Pathscale, Inc
|
||||
# Released under the GPL
|
||||
|
||||
core-y += arch/um/sys-x86_64/ arch/x86/crypto/
|
||||
START := 0x60000000
|
||||
|
||||
_extra_flags_ = -fno-builtin -m64
|
||||
|
||||
KBUILD_CFLAGS += $(_extra_flags_)
|
||||
|
||||
CHECKFLAGS += -m64 -D__x86_64__
|
||||
KBUILD_AFLAGS += -m64
|
||||
LDFLAGS += -m elf_x86_64
|
||||
KBUILD_CPPFLAGS += -m64
|
||||
|
||||
ELF_ARCH := i386:x86-64
|
||||
ELF_FORMAT := elf64-x86-64
|
||||
HEADER_ARCH := x86
|
||||
|
||||
# Not on all 64-bit distros /lib is a symlink to /lib64. PLD is an example.
|
||||
|
||||
LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64
|
||||
LINK-y += -m64
|
||||
|
||||
# Do unit-at-a-time unconditionally on x86_64, following the host
|
||||
KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
|
||||
@@ -6,9 +6,9 @@
|
||||
#ifndef __CHAN_KERN_H__
|
||||
#define __CHAN_KERN_H__
|
||||
|
||||
#include "linux/tty.h"
|
||||
#include "linux/list.h"
|
||||
#include "linux/console.h"
|
||||
#include <linux/tty.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/console.h>
|
||||
#include "chan_user.h"
|
||||
#include "line.h"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/tty.h>
|
||||
#include <linux/tty_flip.h>
|
||||
#include "chan_kern.h"
|
||||
#include "chan.h"
|
||||
#include "os.h"
|
||||
|
||||
#ifdef CONFIG_NOCONFIG_CHAN
|
||||
@@ -358,11 +358,11 @@ int chan_window_size(struct list_head *chans, unsigned short *rows_out,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void free_one_chan(struct chan *chan, int delay_free_irq)
|
||||
static void free_one_chan(struct chan *chan)
|
||||
{
|
||||
list_del(&chan->list);
|
||||
|
||||
close_one_chan(chan, delay_free_irq);
|
||||
close_one_chan(chan, 0);
|
||||
|
||||
if (chan->ops->free != NULL)
|
||||
(*chan->ops->free)(chan->data);
|
||||
@@ -372,14 +372,14 @@ static void free_one_chan(struct chan *chan, int delay_free_irq)
|
||||
kfree(chan);
|
||||
}
|
||||
|
||||
static void free_chan(struct list_head *chans, int delay_free_irq)
|
||||
static void free_chan(struct list_head *chans)
|
||||
{
|
||||
struct list_head *ele, *next;
|
||||
struct chan *chan;
|
||||
|
||||
list_for_each_safe(ele, next, chans) {
|
||||
chan = list_entry(ele, struct chan, list);
|
||||
free_one_chan(chan, delay_free_irq);
|
||||
free_one_chan(chan);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -547,7 +547,7 @@ int parse_chan_pair(char *str, struct line *line, int device,
|
||||
char *in, *out;
|
||||
|
||||
if (!list_empty(chans)) {
|
||||
free_chan(chans, 0);
|
||||
free_chan(chans);
|
||||
INIT_LIST_HEAD(chans);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,10 +11,8 @@
|
||||
#include <termios.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include "chan_user.h"
|
||||
#include "kern_constants.h"
|
||||
#include "os.h"
|
||||
#include "um_malloc.h"
|
||||
#include "user.h"
|
||||
|
||||
void generic_close(int fd, void *unused)
|
||||
{
|
||||
@@ -283,7 +281,12 @@ void register_winch(int fd, struct tty_struct *tty)
|
||||
return;
|
||||
|
||||
pid = tcgetpgrp(fd);
|
||||
if (!is_skas_winch(pid, fd, tty) && (pid == -1)) {
|
||||
if (is_skas_winch(pid, fd, tty)) {
|
||||
register_winch_irq(-1, fd, -1, tty, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pid == -1) {
|
||||
thread = winch_tramp(fd, tty, &thread_fd, &stack);
|
||||
if (thread < 0)
|
||||
return;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "kern_util.h"
|
||||
#include "os.h"
|
||||
#include "user.h"
|
||||
#include "um_malloc.h"
|
||||
|
||||
static inline void *cow_malloc(int size)
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include "net_user.h"
|
||||
#include "os.h"
|
||||
#include "um_malloc.h"
|
||||
#include "user.h"
|
||||
|
||||
enum request_type { REQ_NEW_CONTROL };
|
||||
|
||||
|
||||
@@ -9,10 +9,8 @@
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
#include "chan_user.h"
|
||||
#include "kern_constants.h"
|
||||
#include "os.h"
|
||||
#include "um_malloc.h"
|
||||
#include "user.h"
|
||||
|
||||
struct fd_chan {
|
||||
int fd;
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include "os.h"
|
||||
#include "user.h"
|
||||
|
||||
struct dog_data {
|
||||
int stdin;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "linux/kd.h"
|
||||
#include "linux/sched.h"
|
||||
#include "linux/slab.h"
|
||||
#include "chan_kern.h"
|
||||
#include "chan.h"
|
||||
#include "irq_kern.h"
|
||||
#include "irq_user.h"
|
||||
#include "kern_util.h"
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/un.h>
|
||||
#include "kern_constants.h"
|
||||
#include "mconsole.h"
|
||||
#include "user.h"
|
||||
|
||||
static struct mconsole_command commands[] = {
|
||||
/*
|
||||
|
||||
@@ -12,10 +12,8 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/wait.h>
|
||||
#include "net_user.h"
|
||||
#include "kern_constants.h"
|
||||
#include "os.h"
|
||||
#include "um_malloc.h"
|
||||
#include "user.h"
|
||||
|
||||
int tap_open_common(void *dev, char *gate_addr)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user