Commit 057863a1 authored by David Mosberger's avatar David Mosberger

Merge tiger.hpl.hp.com:/data1/bk/vanilla/linux-2.5

into tiger.hpl.hp.com:/data1/bk/lia64/to-linus-2.5
parents 218f3aae 1bb0fa18
......@@ -2719,6 +2719,7 @@ Your cooperation is appreciated.
32 = /dev/ttyDB0 DataBooster serial port 0
...
39 = /dev/ttyDB7 DataBooster serial port 7
40 = /dev/ttySG0 SGI Altix console port
205 char Low-density serial ports (alternate device)
0 = /dev/culu0 Callout device for ttyLU0
......@@ -2743,6 +2744,7 @@ Your cooperation is appreciated.
32 = /dev/cudb0 Callout device for ttyDB0
...
39 = /dev/cudb7 Callout device for ttyDB7
40 = /dev/cusg0 Callout device for ttySG0
206 char OnStream SC-x0 tape devices
0 = /dev/osst0 First OnStream SCSI tape, mode 0
......
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 8
EXTRAVERSION =-rc1
EXTRAVERSION =-rc2
NAME=Zonked Quokka
# *DOCUMENTATION*
......
......@@ -448,7 +448,11 @@ void __init set_highmem_pages_init(int bad_ppro)
void __init set_max_mapnr_init(void)
{
#ifdef CONFIG_HIGHMEM
highmem_start_page = NODE_DATA(0)->node_zones[ZONE_HIGHMEM].zone_mem_map;
struct zone *high0 = &NODE_DATA(0)->node_zones[ZONE_HIGHMEM];
if (high0->spanned_pages > 0)
highmem_start_page = high0->zone_mem_map;
else
highmem_start_page = pfn_to_page(max_low_pfn+1);
num_physpages = highend_pfn;
#else
num_physpages = max_low_pfn;
......
......@@ -689,7 +689,7 @@ CONFIG_SERIO_SERPORT=y
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
......@@ -724,8 +724,8 @@ CONFIG_SERIAL_8250_NR_UARTS=4
#
# Non-8250 serial port support
#
# CONFIG_SERIAL_CORE is not set
# CONFIG_SERIAL_PMACZILOG is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_PMACZILOG=y
# CONFIG_SERIAL_PMACZILOG_CONSOLE is not set
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
......
......@@ -659,7 +659,7 @@ static void __init do_boot_cpu (int apicid)
Dprintk("CPU has booted.\n");
} else {
boot_error = 1;
if (*((volatile unsigned char *)phys_to_virt(8192))
if (*((volatile unsigned char *)phys_to_virt(SMP_TRAMPOLINE_BASE))
== 0xA5)
/* trampoline started but...? */
printk("Stuck ??\n");
......@@ -676,9 +676,6 @@ static void __init do_boot_cpu (int apicid)
clear_bit(cpu, &cpu_initialized); /* was set by cpu_init() */
cpucount--;
}
/* mark "stuck" area as not stuck */
*((volatile unsigned *)phys_to_virt(8192)) = 0;
}
cycles_t cacheflush_time;
......
......@@ -371,22 +371,6 @@ config AU1000_UART
If you have an Alchemy AU1000 processor (MIPS based) and you want
to use serial ports, say Y. Otherwise, say N.
config SGI_L1_SERIAL
bool "SGI Altix L1 serial support"
depends on SERIAL_NONSTANDARD && IA64
help
If you have an SGI Altix and you want to use the serial port
connected to the system controller (you want this!), say Y.
Otherwise, say N.
config SGI_L1_SERIAL_CONSOLE
bool "SGI Altix L1 serial console support"
depends on SGI_L1_SERIAL
help
If you have an SGI Altix and you would like to use the system
controller serial port as your console (you want this!),
say Y. Otherwise, say N.
config AU1000_SERIAL_CONSOLE
bool "Enable Au1000 serial console"
depends on AU1000_UART
......
......@@ -41,7 +41,6 @@ obj-$(CONFIG_SX) += sx.o generic_serial.o
obj-$(CONFIG_RIO) += rio/ generic_serial.o
obj-$(CONFIG_HVC_CONSOLE) += hvc_console.o
obj-$(CONFIG_RAW_DRIVER) += raw.o
obj-$(CONFIG_SGI_L1_SERIAL) += sn_serial.o
obj-$(CONFIG_VIOCONS) += viocons.o
obj-$(CONFIG_VIOTAPE) += viotape.o
......
This diff is collapsed.
......@@ -677,5 +677,13 @@ config SERIAL_CPM_SMC2
help
Select the is option to use SMC2 as a serial port
endmenu
config SERIAL_SGI_L1_CONSOLE
bool "SGI Altix L1 serial console support"
depends on IA64_GENERIC || IA64_SGI_SN2
select SERIAL_CORE
help
If you have an SGI Altix and you would like to use the system
controller serial port as your console (you want this!),
say Y. Otherwise, say N.
endmenu
......@@ -38,4 +38,5 @@ obj-$(CONFIG_SERIAL_AU1X00) += au1x00_uart.o
obj-$(CONFIG_SERIAL_DZ) += dz.o
obj-$(CONFIG_SERIAL_SH_SCI) += sh-sci.o
obj-$(CONFIG_SERIAL_BAST_SIO) += bast_sio.o
obj-$(CONFIG_SERIAL_SGI_L1_CONSOLE) += sn_console.o
obj-$(CONFIG_SERIAL_CPM) += cpm_uart/
......@@ -1433,6 +1433,7 @@ static int __init pmz_init_port(struct uart_pmac_port *uap)
ioremap(np->addrs[np->n_addrs - 1].address, 0x1000);
if (uap->rx_dma_regs == NULL) {
iounmap((void *)uap->tx_dma_regs);
uap->tx_dma_regs = NULL;
uap->flags &= ~PMACZILOG_FLAG_HAS_DMA;
goto no_dma;
}
......@@ -1490,7 +1491,6 @@ static int __init pmz_init_port(struct uart_pmac_port *uap)
uap->port.ops = &pmz_pops;
uap->port.type = PORT_PMAC_ZILOG;
uap->port.flags = 0;
spin_lock_init(&uap->port.lock);
/* Setup some valid baud rate information in the register
* shadows so we don't write crap there before baud rate is
......@@ -1508,10 +1508,13 @@ static void pmz_dispose_port(struct uart_pmac_port *uap)
{
struct device_node *np;
iounmap((void *)uap->control_reg);
np = uap->node;
iounmap((void *)uap->rx_dma_regs);
iounmap((void *)uap->tx_dma_regs);
iounmap((void *)uap->control_reg);
uap->node = NULL;
of_node_put(np);
memset(uap, 0, sizeof(struct uart_pmac_port));
}
/*
......@@ -1798,7 +1801,7 @@ static int __init pmz_register(void)
* Register this driver with the serial core
*/
rc = uart_register_driver(&pmz_uart_reg);
if (rc != 0)
if (rc)
return rc;
/*
......@@ -1808,10 +1811,19 @@ static int __init pmz_register(void)
struct uart_pmac_port *uport = &pmz_ports[i];
/* NULL node may happen on wallstreet */
if (uport->node != NULL)
uart_add_one_port(&pmz_uart_reg, &uport->port);
rc = uart_add_one_port(&pmz_uart_reg, &uport->port);
if (rc)
goto err_out;
}
return 0;
err_out:
while (i-- > 0) {
struct uart_pmac_port *uport = &pmz_ports[i];
uart_remove_one_port(&pmz_uart_reg, &uport->port);
}
uart_unregister_driver(&pmz_uart_reg);
return rc;
}
static struct of_match pmz_match[] =
......@@ -1841,6 +1853,7 @@ static struct macio_driver pmz_driver =
static int __init init_pmz(void)
{
int rc, i;
printk(KERN_INFO "%s\n", version);
/*
......@@ -1862,7 +1875,16 @@ static int __init init_pmz(void)
/*
* Now we register with the serial layer
*/
pmz_register();
rc = pmz_register();
if (rc) {
printk(KERN_ERR
"pmac_zilog: Error registering serial device, disabling pmac_zilog.\n"
"pmac_zilog: Did another serial driver already claim the minors?\n");
/* effectively "pmz_unprobe()" */
for (i=0; i < pmz_ports_count; i++)
pmz_dispose_port(&pmz_ports[i]);
return rc;
}
/*
* Then we register the macio driver itself
......
This diff is collapsed.
......@@ -627,8 +627,10 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
executable_stack = EXSTACK_DISABLE_X;
break;
}
#ifdef LEGACY_BINARIES
if (i == elf_ex.e_phnum)
def_flags |= VM_EXEC | VM_MAYEXEC;
current->personality |= READ_IMPLIES_EXEC;
#endif
/* Some simple consistency checks for the interpreter */
if (elf_interpreter) {
......
......@@ -887,8 +887,10 @@ int prepare_binprm(struct linux_binprm *bprm)
if(!(bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID)) {
/* Set-uid? */
if (mode & S_ISUID)
if (mode & S_ISUID) {
current->personality &= ~PER_CLEAR_ON_SETID;
bprm->e_uid = inode->i_uid;
}
/* Set-gid? */
/*
......@@ -896,9 +898,11 @@ int prepare_binprm(struct linux_binprm *bprm)
* is a candidate for mandatory locking, not a setgid
* executable.
*/
if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP))
if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) {
current->personality &= ~PER_CLEAR_ON_SETID;
bprm->e_gid = inode->i_gid;
}
}
/* fill in binprm security blob */
retval = security_bprm_set(bprm);
......
......@@ -213,8 +213,9 @@ __sync_single_inode(struct inode *inode, struct writeback_control *wbc)
} else if (inode->i_state & I_DIRTY) {
/*
* Someone redirtied the inode while were writing back
* the pages: nothing to do.
* the pages.
*/
list_move(&inode->i_list, &sb->s_dirty);
} else if (atomic_read(&inode->i_count)) {
/*
* The inode is clean, inuse
......
......@@ -117,7 +117,13 @@ typedef struct user_fxsr_struct elf_fpxregset_t;
#define AT_SYSINFO_EHDR 33
#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
#define SET_PERSONALITY(ex, ibcs2) do { } while (0)
/*
* A legacy binary, when loaded by the ELF loader, will have the
* READ_IMPLIES_EXEC personality flag set automatically:
*/
#define LEGACY_BINARIES
extern int dump_task_regs (struct task_struct *, elf_gregset_t *);
extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *);
......
......@@ -140,7 +140,9 @@ static __inline__ int get_order(unsigned long size)
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
#define VM_DATA_DEFAULT_FLAGS \
(VM_READ | VM_WRITE | \
((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* __KERNEL__ */
......
......@@ -30,6 +30,7 @@ extern int abi_fake_utsname;
*/
enum {
MMAP_PAGE_ZERO = 0x0100000,
READ_IMPLIES_EXEC = 0x0400000,
ADDR_LIMIT_32BIT = 0x0800000,
SHORT_INODE = 0x1000000,
WHOLE_SECONDS = 0x2000000,
......@@ -37,6 +38,12 @@ enum {
ADDR_LIMIT_3GB = 0x8000000,
};
/*
* Security-relevant compatibility flags that must be
* cleared upon setuid or setgid exec:
*/
#define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC)
/*
* Personality types.
*
......
......@@ -1018,19 +1018,16 @@ static int wait_task_zombie(task_t *p, unsigned int __user *stat_addr, struct ru
if (p->real_parent != p->parent) {
__ptrace_unlink(p);
p->state = TASK_ZOMBIE;
/* If this is a detached thread, this is where it goes away. */
if (p->exit_signal == -1) {
/* release_task takes the lock itself. */
write_unlock_irq(&tasklist_lock);
release_task (p);
}
else {
/*
* If this is not a detached task, notify the parent. If it's
* still not detached after that, don't release it now.
*/
if (p->exit_signal != -1) {
do_notify_parent(p, p->exit_signal);
write_unlock_irq(&tasklist_lock);
}
if (p->exit_signal != -1)
p = NULL;
}
else
}
write_unlock_irq(&tasklist_lock);
}
if (p != NULL)
......
......@@ -750,6 +750,13 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
int accountable = 1;
unsigned long charged = 0;
/*
* Does the application expect PROT_READ to imply PROT_EXEC:
*/
if (unlikely((prot & PROT_READ) &&
(current->personality & READ_IMPLIES_EXEC)))
prot |= PROT_EXEC;
if (file) {
if (is_file_hugepages(file))
accountable = 0;
......@@ -792,12 +799,6 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) |
mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
/*
* mm->def_flags might have VM_EXEC set, which PROT_NONE does NOT want.
*/
if (prot == PROT_NONE)
vm_flags &= ~VM_EXEC;
if (flags & MAP_LOCKED) {
if (!capable(CAP_IPC_LOCK))
return -EPERM;
......
......@@ -17,6 +17,7 @@
#include <linux/highmem.h>
#include <linux/security.h>
#include <linux/mempolicy.h>
#include <linux/personality.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
......@@ -205,6 +206,12 @@ sys_mprotect(unsigned long start, size_t len, unsigned long prot)
return -EINVAL;
if (end == start)
return 0;
/*
* Does the application expect PROT_READ to imply PROT_EXEC:
*/
if (unlikely((prot & PROT_READ) &&
(current->personality & READ_IMPLIES_EXEC)))
prot |= PROT_EXEC;
vm_flags = calc_vm_prot_bits(prot);
......
......@@ -1894,6 +1894,9 @@ static void selinux_bprm_apply_creds(struct linux_binprm *bprm, int unsafe)
task_unlock(current);
}
/* Clear any possibly unsafe personality bits on exec: */
current->personality &= ~PER_CLEAR_ON_SETID;
/* Close files for which the new task SID is not authorized. */
flush_unauthorized_files(current->files);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment