Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147960
b: refs/heads/master
c: 20f77f5
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell committed Jun 12, 2009
1 parent 1c95ab7 commit 6f3de9c
Show file tree
Hide file tree
Showing 97 changed files with 1,070 additions and 1,686 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: c34752bc8b3196aee3115d1aa41972604ab0aea8
refs/heads/master: 20f77f5654042cf484d8964b618faf9d620f639b
2 changes: 0 additions & 2 deletions trunk/Documentation/ide/ide.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ 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: 5 additions & 2 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -887,8 +887,11 @@ 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 .nohpa .noprobe .nowerr
.cdrom .chs .ignore_cable are additional options
.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
See Documentation/ide/ide.txt.

ide-pci-generic.all-generic-ide [HW] (E)IDE subsystem
Expand Down
21 changes: 0 additions & 21 deletions trunk/arch/alpha/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,6 @@ 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: 2 additions & 0 deletions trunk/arch/avr32/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ 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: 2 additions & 0 deletions trunk/arch/cris/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ 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: 2 additions & 0 deletions trunk/arch/frv/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ 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: 2 additions & 0 deletions trunk/arch/h8300/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ 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: 0 additions & 26 deletions trunk/arch/ia64/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,32 +53,6 @@ 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: 2 additions & 0 deletions trunk/arch/m32r/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ 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: 2 additions & 0 deletions trunk/arch/m68k/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ 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: 2 additions & 0 deletions trunk/arch/m68knommu/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ 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: 2 additions & 0 deletions trunk/arch/mips/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ 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: 2 additions & 0 deletions trunk/arch/mn10300/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ 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: 2 additions & 0 deletions trunk/arch/parisc/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ 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: 2 additions & 0 deletions trunk/arch/powerpc/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ 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: 2 additions & 0 deletions trunk/arch/s390/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ 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: 2 additions & 0 deletions trunk/arch/sh/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ 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: 0 additions & 3 deletions trunk/arch/sparc/include/asm/uaccess_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

#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: 2 additions & 0 deletions trunk/arch/sparc/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ 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: 0 additions & 29 deletions trunk/arch/sparc/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ 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 @@ -43,10 +39,6 @@ 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 @@ -65,27 +57,6 @@ 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: 1 addition & 6 deletions trunk/arch/um/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,16 @@ 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.o
subarch-obj-$(CONFIG_MODULES) += kernel/module_32.o

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

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/um/sys-x86_64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ 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.o
subarch-obj-$(CONFIG_MODULES) += kernel/module_64.o

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

Expand Down
21 changes: 21 additions & 0 deletions trunk/arch/um/sys-x86_64/um_module.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <linux/vmalloc.h>
#include <linux/moduleloader.h>

/* Copied from i386 arch/i386/kernel/module.c */
void *module_alloc(unsigned long size)
{
if (size == 0)
return NULL;
return vmalloc_exec(size);
}

/* Free memory returned from module_alloc */
void module_free(struct module *mod, void *module_region)
{
vfree(module_region);
/*
* FIXME: If module_region == mod->init_region, trim exception
* table entries.
*/
}

4 changes: 0 additions & 4 deletions trunk/arch/x86/include/asm/pgtable_32_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ 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.o
obj-$(CONFIG_MODULES) += module_$(BITS).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 6f3de9c

Please sign in to comment.