05 Jul, 2006

1 commit

  • * git://git.infradead.org/hdrinstall-2.6:
    Remove export of include/linux/isdn/tpam.h
    Remove and from userspace export
    Restrict headers exported to userspace for SPARC and SPARC64
    Add empty Kbuild files for 'make headers_install' in remaining arches.
    Add Kbuild file for Alpha 'make headers_install'
    Add Kbuild file for SPARC 'make headers_install'
    Add Kbuild file for IA64 'make headers_install'
    Add Kbuild file for S390 'make headers_install'
    Add Kbuild file for i386 'make headers_install'
    Add Kbuild file for x86_64 'make headers_install'
    Add Kbuild file for PowerPC 'make headers_install'
    Add generic Kbuild files for 'make headers_install'
    Basic implementation of 'make headers_check'
    Basic implementation of 'make headers_install'

    Linus Torvalds
     

02 Jul, 2006

1 commit

  • Make __copy_*_user_inatomic really atomic to avoid "Sleeping function called in
    atomic context" warnings, especially from futex code.

    This is made by adding another kmap_atomic slot and making copy_*_user_skas
    use kmap_atomic; also copy_*_user() becomes atomic, but that's true and is not
    a problem for i386 (and we can always add might_sleep there as done
    elsewhere). For TT mode kmap is not used, so there's no need for this.

    I've had to use another slot since both KM_USER0 and KM_USER1 are used
    elsewhere and could cause conflicts. Till now we reused the kmap_atomic slot
    list from the subarch, but that's not needed as that list must contain the
    common ones (used by generic code) + the ones used in architecture specific
    code (and Uml till now used none); so I've taken the i386 one after comparing
    it with ones from other archs, and added KM_UML_USERCOPY.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     

01 Jul, 2006

1 commit


30 Jun, 2006

1 commit


21 Jun, 2006

1 commit

  • * git://git.infradead.org/hdrcleanup-2.6: (63 commits)
    [S390] __FD_foo definitions.
    Switch to __s32 types in joystick.h instead of C99 types for consistency.
    Add to headers included for userspace in
    Move inclusion of out of user scope in asm-x86_64/mtrr.h
    Remove struct fddi_statistics from user view in
    Move user-visible parts of drivers/s390/crypto/z90crypt.h to include/asm-s390
    Revert include/media changes: Mauro says those ioctls are only used in-kernel(!)
    Include and use __uXX types in
    Use __uXX types in , include too
    Remove private struct dx_hash_info from public view in
    Include and use __uXX types in
    Use __uXX types in for struct divert_blk et al.
    Use __u32 for elf_addr_t in , not u32. It's user-visible.
    Remove PPP_FCS from user view in , remove __P mess entirely
    Use __uXX types in user-visible structures in
    Don't use 'u32' in user-visible struct ip_conntrack_old_tuple.
    Use __uXX types for S390 DASD volume label definitions which are user-visible
    S390 BIODASDREADCMB ioctl should use __u64 not u64 type.
    Remove unneeded inclusion of from
    Fix private integer types used in V4L2 ioctls.
    ...

    Manually resolve conflict in include/linux/mtd/physmap.h

    Linus Torvalds
     

18 Jun, 2006

1 commit


06 Jun, 2006

2 commits

  • From: Al Viro

    uml __user annotations

    Signed-off-by: Al Viro
    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • From: Jeff Dike

    Add an empty asm/irqflags.h, which seems to satisfy the lock validator enough
    that UML builds.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

26 Apr, 2006

1 commit


11 Apr, 2006

1 commit


01 Apr, 2006

4 commits

  • If running on a host not supporting TLS (for instance 2.4) we should report
    that cleanly to the user, instead of printing not comprehensible "error 5" for
    that.

    Additionally, i386 and x86_64 support different ranges for
    user_desc->entry_number, and we must account for that; we couldn't pass
    ourselves -1 because we need to override previously existing TLS descriptors
    which glibc has possibly set, so test at startup the range to use.

    x86 and x86_64 existing ranges are hardcoded.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Acked-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Implement sys_[gs]et_thread_area and the corresponding ptrace operations for
    UML. This is the main chunk, additional parts follow. This implementation is
    now well tested and has run reliably for some time, and we've understood all
    the previously existing problems.

    Their implementation saves the new GDT content and then forwards the call to
    the host when appropriate, i.e. immediately when the target process is
    running or on context switch otherwise (i.e. on fork and on ptrace() calls).

    In SKAS mode, we must switch registers on each context switch (because SKAS
    does not switches tls_array together with current->mm).

    Also, added get_cpu() locking; this has been done for SKAS mode, since TT does
    not need it (it does not use smp_processor_id()).

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Acked-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • ldt-{i386,x86_64}.h is made of two different parts - some code for parsing of
    LDT descriptors, which is arch-dependant, and the code to handle uml_ldt_t (an
    LDT block inside UML), which is mostly arch-independant (among x86 and x86_64,
    at least).

    Join the common part in a single file (ldt.h) and split the rest away
    (host_ldt-{i386,x86_64}.h).

    This is needed because processor.h, with next patches, will start including
    the LDT descriptor parsing macros in host_ldt.h, but it can't include ldt.h
    because it uses semaphores (and to define semaphores one must first include
    processor.h!).

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Acked-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • misc sparse annotations

    Signed-off-by: Al Viro
    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     

28 Mar, 2006

2 commits

  • UML can use generic funcs.

    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • Fix a gcc warning about losing qualifiers to the first argument of
    copy_from_user. The typeof change for correctness, and fixes a lot of the
    warnings, but there are some cases where x has some extra qualifiers, like
    volatile, which copy_from_user can't know about. For these, the void * cast
    seems to be necessary.

    Also cleaned up some of the whitespace and got rid of the emacs comment at the
    bottom.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

23 Mar, 2006

1 commit

  • Implement SMP alternatives, i.e. switching at runtime between different
    code versions for UP and SMP. The code can patch both SMP->UP and UP->SMP.
    The UP->SMP case is useful for CPU hotplug.

    With CONFIG_CPU_HOTPLUG enabled the code switches to UP at boot time and
    when the number of CPUs goes down to 1, and switches to SMP when the number
    of CPUs goes up to 2.

    Without CONFIG_CPU_HOTPLUG or on non-SMP-capable systems the code is
    patched once at boot time (if needed) and the tables are released
    afterwards.

    The changes in detail:

    * The current alternatives bits are moved to a separate file,
    the SMP alternatives code is added there.

    * The patch adds some new elf sections to the kernel:
    .smp_altinstructions
    like .altinstructions, also contains a list
    of alt_instr structs.
    .smp_altinstr_replacement
    like .altinstr_replacement, but also has some space to
    save original instruction before replaving it.
    .smp_locks
    list of pointers to lock prefixes which can be nop'ed
    out on UP.
    The first two are used to replace more complex instruction
    sequences such as spinlocks and semaphores. It would be possible
    to deal with the lock prefixes with that as well, but by handling
    them as special case the table sizes become much smaller.

    * The sections are page-aligned and padded up to page size, so they
    can be free if they are not needed.

    * Splitted the code to release init pages to a separate function and
    use it to release the elf sections if they are unused.

    Signed-off-by: Gerd Hoffmann
    Signed-off-by: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gerd Hoffmann
     

02 Feb, 2006

3 commits


19 Jan, 2006

3 commits


13 Jan, 2006

1 commit


11 Jan, 2006

1 commit

  • )

    From: Adrian Bunk

    - create one common dump_thread() prototype in kernel.h

    - dump_thread() is only used in fs/binfmt_aout.c and can therefore be
    removed on all architectures where CONFIG_BINFMT_AOUT is not
    available

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    akpm@osdl.org
     

10 Jan, 2006

1 commit

  • add the per-arch mutex.h files for the remaining architectures.

    We default to asm-generic/mutex-dec.h, because that performs
    quite well on most arches. Arches that do not have atomic
    decrement/increment instructions should switch to mutex-xchg.h
    instead. Arches can also provide their own implementation for
    the mutex fastpath primitives.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Ingo Molnar

    Arjan van de Ven
     

09 Jan, 2006

3 commits

  • Remove various things which were checking for gcc-1.x and gcc-2.x compilers.

    From: Adrian Bunk

    Some documentation updates and removes some code paths for gcc < 3.2.

    Acked-by: Russell King
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Most of the architectures have the same asm/futex.h. This consolidates them
    into asm-generic, with the arches including it from their own asm/futex.h.

    In the case of UML, this reverts the old broken futex.h and goes back to using
    the same one as almost everyone else.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Kill L1_CACHE_SHIFT from all arches. Since L1_CACHE_SHIFT_MAX is not used
    anymore with the introduction of INTERNODE_CACHE, kill L1_CACHE_SHIFT_MAX.

    Signed-off-by: Ravikiran Thirumalai
    Signed-off-by: Shai Fultheim
    Signed-off-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ravikiran G Thirumalai
     

23 Nov, 2005

1 commit

  • This gives a name to the anonymous union introduced in skas-hold-own-ldt,
    allowing to build on a wider range of gccs.

    It also removes ldt.h, which somehow became real, and replaces it with a
    symlink, and creates ldt-x86_64.h as a copy of ldt-i386.h for now.

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

07 Nov, 2005

2 commits

  • Patch imlements full LDT handling in SKAS:
    * UML holds it's own LDT table, used to deliver data on
    modify_ldt(READ)
    * UML disables the default_ldt, inherited from the host (SKAS3)
    or resets LDT entries, set by host's clib and inherited in
    SKAS0
    * A new global variable skas_needs_stub is inserted, that
    can be used to decide, whether stub-pages must be supported
    or not.
    * Uses the syscall-stub to replace missing PTRACE_LDT (therefore,
    write_ldt_entry needs to be modified)

    Signed-off-by: Bodo Stroesser
    Signed-off-by: Jeff Dike
    Cc: Paolo Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bodo Stroesser
     
  • Not quite, something along the lines of the patch below works correctly (and
    makes aio performance not suffer from multiple second delays), as skas0 mode
    correctly switches mm contexts, unlike TT (which should probably get nuked
    from the kernel now that skas0 seems to be working).

    Signed-off-by: Benjamin LaHaise
    Signed-off-by: Jeff Dike
    Cc: Paolo Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Lahaise
     

31 Oct, 2005

2 commits

  • This was used in the old dark age of 2.4, ARCH_CFLAGS doesn't work any more
    since some time, and UM_FASTCALL was never used in 2.6.

    Instead, reintroduce the thing more properly now, directly in
    include/asm-um/linkage.h.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Make UML share the underlying cpu-specific tuning done on i386.

    Actually, for now many config options aren't used a lot - but that can be done
    later. Also, UML relies on GCC optimization for things like memcpy and such
    more than i386, so specifying the correct -march and -mtune should be enough.
    Later, we may want to correct some other stuff.

    For instance, since FPU context switching, for us, is done (at least
    partially, i.e. between our kernelspace and userspace) by the host, we may
    allow usage of FPU operations by GCC. This doesn't hold for kernelspace vs.
    kernelspace, but we don't support preemption.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     

30 Oct, 2005

1 commit

  • Convert those common loops using page_table_lock on the outside and
    pte_offset_map within to use just pte_offset_map_lock within instead.

    These all hold mmap_sem (some exclusively, some not), so at no level can a
    page table be whipped away from beneath them. But whereas pte_alloc loops
    tested with the "atomic" pmd_present, these loops are testing with pmd_none,
    which on i386 PAE tests both lower and upper halves.

    That's now unsafe, so add a cast into pmd_none to test only the vital lower
    half: we lose a little sensitivity to a corrupt middle directory, but not
    enough to worry about. It appears that i386 and UML were the only
    architectures vulnerable in this way, and pgd and pud no problem.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     

28 Oct, 2005

2 commits


05 Oct, 2005

1 commit

  • The old code had the IP and SP coming from the registers in the thread
    struct, which are completely wrong since those are the userspace
    registers. This fixes that by pulling the correct values from the
    jmp_buf in which the kernel state of each thread is stored.

    Signed-off-by: Allan Graves
    Signed-off-by: Jeff Dike
    Signed-off-by: Linus Torvalds

    Allan Graves
     

30 Sep, 2005

1 commit


23 Sep, 2005

1 commit