Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148005
b: refs/heads/master
c: 7f3591c
h: refs/heads/master
i:
  148003: d94090b
v: v3
  • Loading branch information
Linus Torvalds committed Jun 12, 2009
1 parent e58ca8c commit d8d2eb1
Show file tree
Hide file tree
Showing 112 changed files with 2,276 additions and 1,227 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: d1f0132e76a11b05167313c606a853953f416081
refs/heads/master: 7f3591cfacf2d79c4f42238e46c7d053da8e020d
2 changes: 2 additions & 0 deletions trunk/Documentation/ide/ide.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ Other kernel parameters for ide_core are:

* "noflush=[interface_number.device_number]" to disable flush requests

* "nohpa=[interface_number.device_number]" to disable Host Protected Area

* "noprobe=[interface_number.device_number]" to skip probing

* "nowerr=[interface_number.device_number]" to ignore the WRERR_STAT bit
Expand Down
7 changes: 2 additions & 5 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -887,11 +887,8 @@ and is between 256 and 4096 characters. It is defined in the file

ide-core.nodma= [HW] (E)IDE subsystem
Format: =0.0 to prevent dma on hda, =0.1 hdb =1.0 hdc
.vlb_clock .pci_clock .noflush .noprobe .nowerr .cdrom
.chs .ignore_cable are additional options
See Documentation/ide/ide.txt.

idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed
.vlb_clock .pci_clock .noflush .nohpa .noprobe .nowerr
.cdrom .chs .ignore_cable are additional options
See Documentation/ide/ide.txt.

ide-pci-generic.all-generic-ide [HW] (E)IDE subsystem
Expand Down
21 changes: 21 additions & 0 deletions trunk/arch/alpha/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,27 @@ void sort_extable(struct exception_table_entry *start,
cmp_ex, swap_ex);
}

#ifdef CONFIG_MODULES
/*
* Any entry referring to the module init will be at the beginning or
* the end.
*/
void trim_init_extable(struct module *m)
{
/*trim the beginning*/
while (m->num_exentries &&
within_module_init(ex_to_addr(&m->extable[0]), m)) {
m->extable++;
m->num_exentries--;
}
/*trim the end*/
while (m->num_exentries &&
within_module_init(ex_to_addr(&m->extable[m->num_exentries-1]),
m))
m->num_exentries--;
}
#endif /* CONFIG_MODULES */

const struct exception_table_entry *
search_extable(const struct exception_table_entry *first,
const struct exception_table_entry *last,
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/avr32/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ void module_free(struct module *mod, void *module_region)
mod->arch.syminfo = NULL;

vfree(module_region);
/* FIXME: if module_region == mod->init_region, trim exception
* table entries. */
}

static inline int check_rela(Elf32_Rela *rela, struct module *module,
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/cris/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
FREE_MODULE(module_region);
/* FIXME: If module_region == mod->init_region, trim exception
table entries. */
}

/* We don't need anything special. */
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/frv/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
vfree(module_region);
/* FIXME: If module_region == mod->init_region, trim exception
table entries. */
}

/* We don't need anything special. */
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/h8300/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
vfree(module_region);
/* FIXME: If module_region == mod->init_region, trim exception
table entries. */
}

/* We don't need anything special. */
Expand Down
26 changes: 26 additions & 0 deletions trunk/arch/ia64/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,32 @@ void sort_extable (struct exception_table_entry *start,
cmp_ex, swap_ex);
}

static inline unsigned long ex_to_addr(const struct exception_table_entry *x)
{
return (unsigned long)&x->insn + x->insn;
}

#ifdef CONFIG_MODULES
/*
* Any entry referring to the module init will be at the beginning or
* the end.
*/
void trim_init_extable(struct module *m)
{
/*trim the beginning*/
while (m->num_exentries &&
within_module_init(ex_to_addr(&m->extable[0]), m)) {
m->extable++;
m->num_exentries--;
}
/*trim the end*/
while (m->num_exentries &&
within_module_init(ex_to_addr(&m->extable[m->num_exentries-1]),
m))
m->num_exentries--;
}
#endif /* CONFIG_MODULES */

const struct exception_table_entry *
search_extable (const struct exception_table_entry *first,
const struct exception_table_entry *last,
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/m32r/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
vfree(module_region);
/* FIXME: If module_region == mod->init_region, trim exception
table entries. */
}

/* We don't need anything special. */
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/m68k/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
vfree(module_region);
/* FIXME: If module_region == mod->init_region, trim exception
table entries. */
}

/* We don't need anything special. */
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/m68knommu/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
vfree(module_region);
/* FIXME: If module_region == mod->init_region, trim exception
table entries. */
}

/* We don't need anything special. */
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/mips/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
vfree(module_region);
/* FIXME: If module_region == mod->init_region, trim exception
table entries. */
}

int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/mn10300/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
vfree(module_region);
/* FIXME: If module_region == mod->init_region, trim exception
* table entries. */
}

/*
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/parisc/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,6 @@ void module_free(struct module *mod, void *module_region)
mod->arch.section = NULL;

vfree(module_region);
/* FIXME: If module_region == mod->init_region, trim exception
table entries. */
}

/* Additional bytes needed in front of individual sections */
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/powerpc/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
vfree(module_region);
/* FIXME: If module_region == mod->init_region, trim exception
table entries. */
}

static const Elf_Shdr *find_section(const Elf_Ehdr *hdr,
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/s390/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
vfree(module_region);
/* FIXME: If module_region == mod->init_region, trim exception
table entries. */
}

static void
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/sh/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
vfree(module_region);
/* FIXME: If module_region == mod->init_region, trim exception
table entries. */
}

/* We don't need anything special. */
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/sparc/include/asm/uaccess_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

#ifndef __ASSEMBLY__

#define ARCH_HAS_SORT_EXTABLE
#define ARCH_HAS_SEARCH_EXTABLE

/* Sparc is not segmented, however we need to be able to fool access_ok()
* when doing system calls from kernel mode legitimately.
*
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/sparc/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
vfree(module_region);
/* FIXME: If module_region == mod->init_region, trim exception
table entries. */
}

/* Make generic code ignore STT_REGISTER dummy undefined symbols. */
Expand Down
29 changes: 29 additions & 0 deletions trunk/arch/sparc/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ search_extable(const struct exception_table_entry *start,
* word 3: last insn address + 4 bytes
* word 4: fixup code address
*
* Deleted entries are encoded as:
* word 1: unused
* word 2: -1
*
* See asm/uaccess.h for more details.
*/

Expand All @@ -39,6 +43,10 @@ search_extable(const struct exception_table_entry *start,
continue;
}

/* A deleted entry; see trim_init_extable */
if (walk->fixup == -1)
continue;

if (walk->insn == value)
return walk;
}
Expand All @@ -57,6 +65,27 @@ search_extable(const struct exception_table_entry *start,
return NULL;
}

#ifdef CONFIG_MODULES
/* We could memmove them around; easier to mark the trimmed ones. */
void trim_init_extable(struct module *m)
{
unsigned int i;
bool range;

for (i = 0; i < m->num_exentries; i += range ? 2 : 1) {
range = m->extable[i].fixup == 0;

if (within_module_init(m->extable[i].insn, m)) {
m->extable[i].fixup = -1;
if (range)
m->extable[i+1].fixup = -1;
}
if (range)
i++;
}
}
#endif /* CONFIG_MODULES */

/* Special extable search, which handles ranges. Returns fixup */
unsigned long search_extables_range(unsigned long addr, unsigned long *g2)
{
Expand Down
7 changes: 6 additions & 1 deletion trunk/arch/um/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,21 @@ extern unsigned long end_iomem;
#else
# define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE)
#endif
#define MODULES_VADDR VMALLOC_START
#define MODULES_END VMALLOC_END
#define MODULES_LEN (MODULES_VADDR - MODULES_END)

#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED | _PAGE_DIRTY)
#define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY)
#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)

#define __PAGE_KERNEL_EXEC \
(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED)
#define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED)
#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED)
#define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC)

/*
* The i386 can't do page protection for execute, and considers that the same
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/sys-i386/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ obj-y = bug.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \

subarch-obj-y = lib/semaphore_32.o lib/string_32.o
subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem_32.o
subarch-obj-$(CONFIG_MODULES) += kernel/module_32.o
subarch-obj-$(CONFIG_MODULES) += kernel/module.o

USER_OBJS := bugs.o ptrace_user.o fault.o

Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/um/sys-x86_64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ obj-y = bug.o bugs.o delay.o fault.o ldt.o mem.o ptrace.o ptrace_user.o \
setjmp.o signal.o stub.o stub_segv.o syscalls.o syscall_table.o \
sysrq.o ksyms.o tls.o

obj-$(CONFIG_MODULES) += um_module.o

subarch-obj-y = lib/csum-partial_64.o lib/memcpy_64.o lib/thunk_64.o
subarch-obj-$(CONFIG_MODULES) += kernel/module_64.o
subarch-obj-$(CONFIG_MODULES) += kernel/module.o

ldt-y = ../sys-i386/ldt.o

Expand Down
21 changes: 0 additions & 21 deletions trunk/arch/um/sys-x86_64/um_module.c

This file was deleted.

4 changes: 4 additions & 0 deletions trunk/arch/x86/include/asm/pgtable_32_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ extern bool __vmalloc_start_set; /* set once high_memory is set */
# define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE)
#endif

#define MODULES_VADDR VMALLOC_START
#define MODULES_END VMALLOC_END
#define MODULES_LEN (MODULES_VADDR - MODULES_END)

#define MAXMEM (VMALLOC_END - PAGE_OFFSET - __VMALLOC_RESERVE)

#endif /* _ASM_X86_PGTABLE_32_DEFS_H */
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o
obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o
obj-$(CONFIG_KPROBES) += kprobes.o
obj-$(CONFIG_MODULES) += module_$(BITS).o
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_EFI) += efi.o efi_$(BITS).o efi_stub_$(BITS).o
obj-$(CONFIG_DOUBLEFAULT) += doublefault_32.o
obj-$(CONFIG_KGDB) += kgdb.o
Expand Down
Loading

0 comments on commit d8d2eb1

Please sign in to comment.