Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232009
b: refs/heads/master
c: 6a108a1
h: refs/heads/master
i:
  232007: d096969
v: v3
  • Loading branch information
David Rientjes authored and Linus Torvalds committed Jan 21, 2011
1 parent 9ba6702 commit 9398a04
Show file tree
Hide file tree
Showing 627 changed files with 1,229 additions and 1,456 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc887b15d935ead2a00aef5779a18034e7c69ee1
refs/heads/master: 6a108a14fa356ef607be308b68337939e56ea94e
73 changes: 8 additions & 65 deletions trunk/Documentation/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
#include <limits.h>
#include <stddef.h>
#include <signal.h>
#include <pwd.h>
#include <grp.h>

#include <linux/virtio_config.h>
#include <linux/virtio_net.h>
#include <linux/virtio_blk.h>
Expand Down Expand Up @@ -301,27 +298,20 @@ static void *map_zeroed_pages(unsigned int num)

/*
* We use a private mapping (ie. if we write to the page, it will be
* copied). We allocate an extra two pages PROT_NONE to act as guard
* pages against read/write attempts that exceed allocated space.
* copied).
*/
addr = mmap(NULL, getpagesize() * (num+2),
PROT_NONE, MAP_PRIVATE, fd, 0);

addr = mmap(NULL, getpagesize() * num,
PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, fd, 0);
if (addr == MAP_FAILED)
err(1, "Mmapping %u pages of /dev/zero", num);

if (mprotect(addr + getpagesize(), getpagesize() * num,
PROT_READ|PROT_WRITE) == -1)
err(1, "mprotect rw %u pages failed", num);

/*
* One neat mmap feature is that you can close the fd, and it
* stays mapped.
*/
close(fd);

/* Return address after PROT_NONE page */
return addr + getpagesize();
return addr;
}

/* Get some more pages for a device. */
Expand Down Expand Up @@ -353,7 +343,7 @@ static void map_at(int fd, void *addr, unsigned long offset, unsigned long len)
* done to it. This allows us to share untouched memory between
* Guests.
*/
if (mmap(addr, len, PROT_READ|PROT_WRITE,
if (mmap(addr, len, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_FIXED|MAP_PRIVATE, fd, offset) != MAP_FAILED)
return;

Expand Down Expand Up @@ -583,10 +573,10 @@ static void *_check_pointer(unsigned long addr, unsigned int size,
unsigned int line)
{
/*
* Check if the requested address and size exceeds the allocated memory,
* or addr + size wraps around.
* We have to separately check addr and addr+size, because size could
* be huge and addr + size might wrap around.
*/
if ((addr + size) > guest_limit || (addr + size) < addr)
if (addr >= guest_limit || addr + size >= guest_limit)
errx(1, "%s:%i: Invalid address %#lx", __FILE__, line, addr);
/*
* We return a pointer for the caller's convenience, now we know it's
Expand Down Expand Up @@ -1882,8 +1872,6 @@ static struct option opts[] = {
{ "block", 1, NULL, 'b' },
{ "rng", 0, NULL, 'r' },
{ "initrd", 1, NULL, 'i' },
{ "username", 1, NULL, 'u' },
{ "chroot", 1, NULL, 'c' },
{ NULL },
};
static void usage(void)
Expand All @@ -1906,12 +1894,6 @@ int main(int argc, char *argv[])
/* If they specify an initrd file to load. */
const char *initrd_name = NULL;

/* Password structure for initgroups/setres[gu]id */
struct passwd *user_details = NULL;

/* Directory to chroot to */
char *chroot_path = NULL;

/* Save the args: we "reboot" by execing ourselves again. */
main_args = argv;

Expand Down Expand Up @@ -1968,14 +1950,6 @@ int main(int argc, char *argv[])
case 'i':
initrd_name = optarg;
break;
case 'u':
user_details = getpwnam(optarg);
if (!user_details)
err(1, "getpwnam failed, incorrect username?");
break;
case 'c':
chroot_path = optarg;
break;
default:
warnx("Unknown argument %s", argv[optind]);
usage();
Expand Down Expand Up @@ -2047,37 +2021,6 @@ int main(int argc, char *argv[])
/* If we exit via err(), this kills all the threads, restores tty. */
atexit(cleanup_devices);

/* If requested, chroot to a directory */
if (chroot_path) {
if (chroot(chroot_path) != 0)
err(1, "chroot(\"%s\") failed", chroot_path);

if (chdir("/") != 0)
err(1, "chdir(\"/\") failed");

verbose("chroot done\n");
}

/* If requested, drop privileges */
if (user_details) {
uid_t u;
gid_t g;

u = user_details->pw_uid;
g = user_details->pw_gid;

if (initgroups(user_details->pw_name, g) != 0)
err(1, "initgroups failed");

if (setresgid(g, g, g) != 0)
err(1, "setresgid failed");

if (setresuid(u, u, u) != 0)
err(1, "setresuid failed");

verbose("Dropping privileges completed\n");
}

/* Finally, run the Guest. This doesn't return. */
run_guest();
}
Expand Down
5 changes: 0 additions & 5 deletions trunk/Documentation/lguest/lguest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ Running Lguest:

for general information on how to get bridging to work.

- Random number generation. Using the --rng option will provide a
/dev/hwrng in the guest that will read from the host's /dev/random.
Use this option in conjunction with rng-tools (see ../hw_random.txt)
to provide entropy to the guest kernel's /dev/random.

There is a helpful mailing list at http://ozlabs.org/mailman/listinfo/lguest

Good luck!
Expand Down
50 changes: 25 additions & 25 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ L: linux-serial@vger.kernel.org
W: http://serial.sourceforge.net
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6.git
F: drivers/tty/serial/8250*
F: drivers/serial/8250*
F: include/linux/serial_8250.h

8390 NETWORK DRIVERS [WD80x3/SMC-ELITE, SMC-ULTRA, NE2000, 3C503, etc.]
Expand Down Expand Up @@ -888,8 +888,8 @@ F: arch/arm/mach-msm/
F: drivers/video/msm/
F: drivers/mmc/host/msm_sdcc.c
F: drivers/mmc/host/msm_sdcc.h
F: drivers/tty/serial/msm_serial.h
F: drivers/tty/serial/msm_serial.c
F: drivers/serial/msm_serial.h
F: drivers/serial/msm_serial.c
T: git git://codeaurora.org/quic/kernel/davidb/linux-msm.git
S: Maintained

Expand Down Expand Up @@ -1256,7 +1256,7 @@ F: drivers/mmc/host/atmel-mci-regs.h
ATMEL AT91 / AT32 SERIAL DRIVER
M: Nicolas Ferre <nicolas.ferre@atmel.com>
S: Supported
F: drivers/tty/serial/atmel_serial.c
F: drivers/serial/atmel_serial.c

ATMEL LCDFB DRIVER
M: Nicolas Ferre <nicolas.ferre@atmel.com>
Expand Down Expand Up @@ -1412,7 +1412,7 @@ M: Sonic Zhang <sonic.zhang@analog.com>
L: uclinux-dist-devel@blackfin.uclinux.org
W: http://blackfin.uclinux.org
S: Supported
F: drivers/tty/serial/bfin_5xx.c
F: drivers/serial/bfin_5xx.c

BLACKFIN WATCHDOG DRIVER
M: Mike Frysinger <vapier.adi@gmail.com>
Expand Down Expand Up @@ -1877,7 +1877,7 @@ L: linux-cris-kernel@axis.com
W: http://developer.axis.com
S: Maintained
F: arch/cris/
F: drivers/tty/serial/crisv10.*
F: drivers/serial/crisv10.*

CRYPTO API
M: Herbert Xu <herbert@gondor.apana.org.au>
Expand Down Expand Up @@ -2216,7 +2216,7 @@ F: drivers/net/wan/dscc4.c
DZ DECSTATION DZ11 SERIAL DRIVER
M: "Maciej W. Rozycki" <macro@linux-mips.org>
S: Maintained
F: drivers/tty/serial/dz.*
F: drivers/serial/dz.*

EATA-DMA SCSI DRIVER
M: Michael Neuffer <mike@i-Connect.Net>
Expand Down Expand Up @@ -2643,7 +2643,7 @@ FREESCALE QUICC ENGINE UCC UART DRIVER
M: Timur Tabi <timur@freescale.com>
L: linuxppc-dev@lists.ozlabs.org
S: Supported
F: drivers/tty/serial/ucc_uart.c
F: drivers/serial/ucc_uart.c

FREESCALE SOC SOUND DRIVERS
M: Timur Tabi <timur@freescale.com>
Expand Down Expand Up @@ -3350,7 +3350,7 @@ IOC3 SERIAL DRIVER
M: Pat Gefre <pfg@sgi.com>
L: linux-serial@vger.kernel.org
S: Maintained
F: drivers/tty/serial/ioc3_serial.c
F: drivers/serial/ioc3_serial.c

IP MASQUERADING
M: Juanjo Ciarlante <jjciarla@raiz.uncu.edu.ar>
Expand Down Expand Up @@ -3527,7 +3527,7 @@ JSM Neo PCI based serial card
M: Breno Leitao <leitao@linux.vnet.ibm.com>
L: linux-serial@vger.kernel.org
S: Maintained
F: drivers/tty/serial/jsm/
F: drivers/serial/jsm/

K10TEMP HARDWARE MONITORING DRIVER
M: Clemens Ladisch <clemens@ladisch.de>
Expand Down Expand Up @@ -3677,7 +3677,7 @@ L: kgdb-bugreport@lists.sourceforge.net
S: Maintained
F: Documentation/DocBook/kgdb.tmpl
F: drivers/misc/kgdbts.c
F: drivers/tty/serial/kgdboc.c
F: drivers/serial/kgdboc.c
F: include/linux/kdb.h
F: include/linux/kgdb.h
F: kernel/debug/
Expand Down Expand Up @@ -5545,7 +5545,7 @@ M: Pat Gefre <pfg@sgi.com>
L: linux-ia64@vger.kernel.org
S: Supported
F: Documentation/ia64/serial.txt
F: drivers/tty/serial/ioc?_serial.c
F: drivers/serial/ioc?_serial.c
F: include/linux/ioc?.h

SGI VISUAL WORKSTATION 320 AND 540
Expand All @@ -5567,7 +5567,7 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
F: Documentation/arm/Sharp-LH/ADC-LH7-Touchscreen
F: arch/arm/mach-lh7a40x/
F: drivers/tty/serial/serial_lh7a40x.c
F: drivers/serial/serial_lh7a40x.c
F: drivers/usb/gadget/lh7a40*
F: drivers/usb/host/ohci-lh7a40*

Expand Down Expand Up @@ -5787,14 +5787,14 @@ L: sparclinux@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git
S: Maintained
F: drivers/tty/serial/suncore.c
F: drivers/tty/serial/suncore.h
F: drivers/tty/serial/sunhv.c
F: drivers/tty/serial/sunsab.c
F: drivers/tty/serial/sunsab.h
F: drivers/tty/serial/sunsu.c
F: drivers/tty/serial/sunzilog.c
F: drivers/tty/serial/sunzilog.h
F: drivers/serial/suncore.c
F: drivers/serial/suncore.h
F: drivers/serial/sunhv.c
F: drivers/serial/sunsab.c
F: drivers/serial/sunsab.h
F: drivers/serial/sunsu.c
F: drivers/serial/sunzilog.c
F: drivers/serial/sunzilog.h

SPEAR PLATFORM SUPPORT
M: Viresh Kumar <viresh.kumar@st.com>
Expand Down Expand Up @@ -6124,8 +6124,8 @@ TTY LAYER
M: Greg Kroah-Hartman <gregkh@suse.de>
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6.git
F: drivers/tty/*
F: drivers/tty/serial/serial_core.c
F: drivers/char/tty_*
F: drivers/serial/serial_core.c
F: include/linux/serial_core.h
F: include/linux/serial.h
F: include/linux/tty.h
Expand Down Expand Up @@ -6870,7 +6870,7 @@ XILINX UARTLITE SERIAL DRIVER
M: Peter Korsgaard <jacmet@sunsite.dk>
L: linux-serial@vger.kernel.org
S: Maintained
F: drivers/tty/serial/uartlite.c
F: drivers/serial/uartlite.c

YAM DRIVER FOR AX.25
M: Jean-Paul Roubelat <jpr@f6fbb.org>
Expand Down Expand Up @@ -6916,7 +6916,7 @@ F: drivers/media/video/zoran/
ZS DECSTATION Z85C30 SERIAL DRIVER
M: "Maciej W. Rozycki" <macro@linux-mips.org>
S: Maintained
F: drivers/tty/serial/zs.*
F: drivers/serial/zs.*

GRE DEMULTIPLEXER DRIVER
M: Dmitry Kozlov <xeb@mail.ru>
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/configs/ag5evm_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CONFIG_NAMESPACES=y
# CONFIG_PID_NS is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_EMBEDDED=y
CONFIG_EXPERT=y
CONFIG_SLAB=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_IOSCHED_DEADLINE is not set
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/configs/am200epdkit_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CONFIG_LOCALVERSION="gum"
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_EMBEDDED=y
CONFIG_EXPERT=y
# CONFIG_SYSCTL_SYSCALL is not set
# CONFIG_EPOLL is not set
# CONFIG_SHMEM is not set
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/configs/at572d940hfek_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_EMBEDDED=y
CONFIG_EXPERT=y
CONFIG_SLAB=y
CONFIG_PROFILING=y
CONFIG_OPROFILE=m
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/configs/badge4_defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CONFIG_EXPERIMENTAL=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_EMBEDDED=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_ARCH_SA1100=y
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/configs/bcmring_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y
# CONFIG_LOCALVERSION_AUTO is not set
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
CONFIG_EMBEDDED=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_EXTRA_PASS=y
# CONFIG_HOTPLUG is not set
# CONFIG_ELF_CORE is not set
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/configs/cm_x2xx_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_EMBEDDED=y
CONFIG_EXPERT=y
# CONFIG_VM_EVENT_COUNTERS is not set
# CONFIG_SLUB_DEBUG is not set
# CONFIG_COMPAT_BRK is not set
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/configs/colibri_pxa270_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_EMBEDDED=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_EXTRA_PASS=y
CONFIG_SLAB=y
CONFIG_MODULES=y
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/configs/collie_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_BLK_DEV_INITRD=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_EMBEDDED=y
CONFIG_EXPERT=y
# CONFIG_BASE_FULL is not set
# CONFIG_EPOLL is not set
CONFIG_SLOB=y
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/configs/corgi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CONFIG_BSD_PROCESS_ACCT=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_SYSFS_DEPRECATED_V2=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_EMBEDDED=y
CONFIG_EXPERT=y
CONFIG_PROFILING=y
CONFIG_OPROFILE=m
CONFIG_MODULES=y
Expand Down
Loading

0 comments on commit 9398a04

Please sign in to comment.