06 May, 2005

40 commits

  • This patch make elh.h a symlink to the new arch-specific include files of the
    form elf-.h, as in the same way already is done for some other
    includes. Also moves Elf-stuff from archparam-.h and elf.h to the
    new elf-.h files.

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

    Bodo Stroesser
     
  • This cleans up the error handling and fixes a crash if a hostfs mount fails.

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

    Jeff Dike
     
  • The completion cleanup got rid of some semaphores, but didn't remove the
    inclusion of asm/semaphore.h from xterm_kern.c.

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

    Jeff Dike
     
  • Just some breaking of some overly-long lines.

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

    Jeff Dike
     
  • This makes SIGWINCH work again, and fixes a couple of SIGWINCH-associated
    crashes. First, the sigio thread disables SIGWINCH because all hell breaks
    loose if it ever gets one and tries to call the signal handling code. Second,
    there was a problem with deferencing tty structs after they were freed. The
    SIGWINCH support for a tty wasn't being turned off or freed after the tty went
    away.

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

    Jeff Dike
     
  • This patch removes the arch-specific fault/trap-infos from thread and
    skas-regs.

    It adds a new struct faultinfo, that is arch-specific defined in
    sysdep/faultinfo.h.

    The structure is inserted in thread.arch and thread.regs.skas and
    thread.regs.tt

    Now, segv and other trap-handlers can copy the contents from regs.X.faultinfo
    to thread.arch.faultinfo with one simple assignment.

    Also, the number of macros necessary is reduced to

    FAULT_ADDRESS(struct faultinfo)
    extracts the faulting address from faultinfo

    FAULT_WRITE(struct faultinfo)
    extracts the "is_write" flag

    SEGV_IS_FIXABLE(struct faultinfo)
    is true for the fixable segvs, i.e. (TRAP == 14)
    on i386

    UPT_FAULTINFO(regs)
    result is (struct faultinfo *) to the faultinfo
    in regs->skas.faultinfo

    GET_FAULTINFO_FROM_SC(struct faultinfo, struct sigcontext *)
    copies the relevant parts of the sigcontext to
    struct faultinfo.

    On SIGSEGV, call user_signal() instead of handle_segv(), if the architecture
    provides the information needed in PTRACE_FAULTINFO, or if PTRACE_FAULTINFO is
    missing, because segv-stub will provide the info.

    The benefit of the change is, that in case of a non-fixable SIGSEGV, we can
    give user processes a SIGSEGV, instead of possibly looping on pagefault
    handling.

    Since handle_segv() sikked arch_fixup() implicitly by passing ip==0 to segv(),
    I changed segv() to call arch_fixup() only, if !is_user.

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

    Bodo Stroesser
     
  • This fixes write_ldt_entry to treat userspace_pid as an array.

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

    Jeff Dike
     
  • O=... builds support. Very easy, actually.

    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
     
  • make distclean et.al. are missing arch/um/sys-x86_64/utils; fixed the same
    way we have it done for sys-i386 counterpart.

    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
     
  • helpers in arch/um/util (mk_task and mk_constants) converted. That's it -
    none of the helpers depends on build and target being the same architecture
    anymore.

    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
     
  • mk_thread converted

    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
     
  • The next group of helpers is a bit trickier - they want the constants similar
    to those in user-offsets.h, but we need target sc.h for it. So we can't put
    that into user-offsets (sc.h depends on it) and need the second generated
    header for that stuff (kernel-offsets.h. BFD...

    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
     
  • Ditto for mk_sc

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

    Al Viro
     
  • mk_ptregs converted. Nothing new here, it's the same situation as with
    mk_user_constants.

    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
     
  • Beginning of cross-build fixes. Instead of expecting that mk_user_constants
    (compiled and executed on the build box) will see the sizeof, etc. for target
    box, we do what every architecture already does for asm-offsets. Namely, have
    user-offsets.c compiled *for* *target* into user-offsets.s and sed it into the
    header with relevant constants. We don't need to reinvent any wheels - all
    tools are already there.

    This patch deals with mk_user_constants. It doesn't assume any relationship
    between target and build environment anymore - we pick all defines we need
    from user-offsets.h. Later patches will deal with the rest of mk_... helpers
    in the same way.

    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
     
  • Use explicit os-... in make dependencies instead of playing with symlinks
    (symlink in question is still created - it's needed for other things; however,
    there's no reason to complicate ordering here).

    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
     
  • Make vmlinux.lds.S include appopriate script instead of playing games with
    symlinks.

    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
     
  • - Fix some problems with usage of $(targets) (sometimes missing, sometimes
    used badly) that trigger partial rebuilds when doing a rebuild.

    - At that purpose, also factor out some common code for symlinks creation.

    - Fix a x86-64 build warning, caused by -L/usr/lib, which is anyway useless,
    and invalid in the x86-64 case.

    Tested on x86_64 and x86.

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

    Paolo 'Blaisorblade' Giarrusso
     
  • In include/asm-x86_64/string.h there are such comments:

    /* Use C out of line version for memcmp */
    #define memcmp __builtin_memcmp
    int memcmp(const void * cs,const void * ct,size_t count);

    This would mean that if the compiler does not decide to use __builtin_memcmp,
    it emits a call to memcmp to be satisfied by the C out-of-line version in
    lib/string.c. What happens is that after preprocessing, in lib/string.i you
    may find the definition of "__builtin_strcmp".

    Actually, by accident, in the object you will find the definition of strcmp
    and such (maybe a trick intended to redirect calls to __builtin_memcmp to the
    default memcmp when the definition is not expanded); however, this particular
    case is not a documented feature as far as I can see.

    Also, the EXPORT_SYMBOL does not work, so it's duplicated in the arch.

    I simply added some #undef to lib/string.c and removed the (now duplicated)
    exports in x86-64 and UML/x86_64 subarchs (the second ones are introduced by
    another patch I just posted for -mm).

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

    Paolo 'Blaisorblade' Giarrusso
     
  • These are some trivial fixes for the x86-64 subarch module support. The only
    potential problem is that I have to modify arch/x86_64/kernel/module.c, to
    avoid copying the whole of it.

    I can't use it verbatim because it depends on a special vmalloc-like area for
    modules, which for now (maybe that's to fix, I guess not) UML/x86-64 has not.
    I went the easy way and reused the i386 vmalloc()-based allocator.

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

    Paolo 'Blaisorblade' Giarrusso
     
  • This patch does some totally trivial compilation fixes. It also restores the
    debugregs manipulation, which was commented out simply because it doesn't
    compile on x86_64 (we haven't yet implemented there debugregs handling).

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

    Paolo 'Blaisorblade' Giarrusso
     
  • This patch started as simply removing a few never-used macros from
    asm-ppc64/pgtable.h, then kind of grew. It now makes a bunch of
    cleanups to the ppc64 low-level header files (with corresponding
    changes to .c files where necessary) such as:
    - Abolishing never-used macros
    - Eliminating multiple #defines with the same purpose
    - Removing pointless macros (cases where just expanding the
    macro everywhere turns out clearer and more sensible)
    - Removing some cases where macros which could be defined in
    terms of each other weren't
    - Moving imalloc() related definitions from pgtable.h to their
    own header file (imalloc.h)
    - Re-arranging headers to group things more logically
    - Moving all VSID allocation related things to mmu.h, instead
    of being split between mmu.h and mmu_context.h
    - Removing some reserved space for flags from the PMD - we're
    not using it.
    - Fix some bugs which broke compile with STRICT_MM_TYPECHECKS.

    Signed-off-by: David Gibson
    Acked-by: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Gibson
     
  • There's no help text for CONFIG_DEBUG_STACKOVERFLOW - add one.

    Signed-off-by: Jesper Juhl
    Signed-off-by: Anton Blanchard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • While looking at code generated by gcc4.0 I noticed some functions still
    had frame pointers, even after we stopped ppc64 from defining
    CONFIG_FRAME_POINTER. It turns out kernel/Makefile hardwires
    -fno-omit-frame-pointer on when compiling schedule.c.

    Create CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER and define it on architectures
    that dont require frame pointers in sched.c code.

    (akpm: blame me for the name)

    Signed-off-by: Anton Blanchard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Blanchard
     
  • We can identify new Freescale PPC cores by the fact that the MSB of the PVR
    is set. If we are a new Freescale core the decode of major/minor revision
    numbers is simplified so we dont have to add new case checks for a every
    new Freescale core.

    Signed-off-by: Kumar Gala
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kumar Gala
     
  • The PPC32 kernel puts platform-specific functions into separate sections so
    that unneeded parts of it can be freed when we've booted and actually
    worked out what we're running on today.

    This makes kallsyms ignore those functions, because they're not between
    _[se]text or _[se]inittext. Rather than teaching kallsyms about the
    various pmac/chrp/etc sections, this patch adds '_[se]extratext' markers
    for kallsyms.

    Signed-off-by: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Woodhouse
     
  • The following patch works around the misdetection of the CXT48 codec as a
    modem by the OSS ac97 driver.

    Signed-off-by: Herbert Xu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Herbert Xu
     
  • Fixes for big-endian systems in soundcard.h and awe_voice.h

    This patch fixes the AFMT_S16_NE (include/linux/soundcard.h) and AWE_PATCH
    (awe_voice.h) macros on big-endian systems.

    It also moves _PATCHKEY into a new file, patchkey.h, in order to remove a
    duplicate definition of it from awe_voice.h.

    Signed-off-by: Stuart Brady
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stuart Brady
     
  • Fix bug #4509

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

    Andrew Morton
     
  • This patch fixes a typo in the Intel AC'97 audio driver intel8x0.c for
    Intel ESB2.

    Signed-off-by: Jason Gaston
    Cc:
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Gaston
     
  • This makes sure that reclaimable buffer headers and reclaimable inodes
    are accounted properly during the overcommit checks.

    Signed-off-by: Andrea Arcangeli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • The recent change fix-crash-in-entrys-restore_all.patch

    childregs->esp = esp;

    p->thread.esp = (unsigned long) childregs;
    - p->thread.esp0 = (unsigned long) (childregs+1);
    + p->thread.esp0 = (unsigned long) (childregs+1) - 8;

    p->thread.eip = (unsigned long) ret_from_fork;

    introduces an inconsistency between esp and esp0 before the task is run the
    first time. esp0 is no longer the actual start of the stack, but 8 bytes
    off.

    This shows itself clearly in a scenario when a ptracer that is set to also
    ptrace eventual children traces program1 which then clones thread1. Now
    the ptracer wants to modify the registers of thread1. The x86 ptrace
    implementation bases it's knowledge about saved user-space registers upon
    p->thread.esp0. But this will be a few bytes off causing certain writes to
    the kernel stack to overwrite a saved kernel function address making the
    kernel when actually running thread1 jump out into user-space. Very
    spectacular.

    The testcase I've used is:
    /* start with strace -f ./a.out */
    #include
    #include

    void *do_thread(void *p)
    {
    for (;;);
    }

    int main()
    {
    pthread_t one;
    pthread_create(&one, NULL, &do_thread, NULL);
    for (;;);
    return 0;
    }

    So, my solution is to instead of just adjusting esp0 that creates an
    inconsitent state I adjust where the user-space registers are saved with -8
    bytes. This gives us the wanted extra bytes on the start of the stack and
    esp0 is now correct. This solves the issues I saw from the original
    testcase from Mateusz Berezecki and has survived testing here. I think
    this should go into -mm a round or two first however as there might be some
    cruft around depending on pt_regs lying on the start of the stack. That
    however would have broken with the first change too!

    It's actually a 2-line diff but I had to move the comment of why the -8 bytes
    are there a few lines up. Thanks to Zwane for helping me with this.

    Signed-off-by: Alexander Nyberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Nyberg
     
  • Linus Torvalds
     
  • Linus Torvalds
     
  • Linus Torvalds
     
  • Patch from Nicolas Pitre

    Signed-off-by: Nicolas Pitre
    Signed-off-by: Russell King

    Nicolas Pitre
     
  • Patch from Nicolas Pitre

    This better express things, and should cover RMK's weird SMP toys.

    Signed-off-by: Nicolas Pitre
    Signed-off-by: Russell King

    Nicolas Pitre
     
  • This patch adds i18n support for make *config, allowing users to have the
    config process in their own language.

    No printk was harmed in the process, don't worry, so all the bug reports,
    kernel messages, etc, remain in english, just the user tools to configure
    the kernel are internationalized.

    Users not interested in translations can just unset the related LANG,
    LC_ALL, etc env variables and have the config process in plain english,
    something like:

    LANG= make menuconfig

    is enough for having the whole config process in english. Or just don't
    install any translation file.

    Translations for brazilian portuguese are being done by a team of
    volunteers at:

    http://www.visionflex.inf.br/kernel_ptbr/pmwiki.php/Principal/Traducoes

    To start the translation process:

    make update-po-config

    This will generate the pot template named scripts/kconfig/linux.pot,
    copy it to, say, ~/es.po, to start the translation for spanish.

    To test your translation, as root issue this command:

    msgfmt -o /usr/share/locale/es/LC_MESSAGES/linux.mo ~/es.po

    Replace "es" with your language code.

    Then execute, for instance:

    make menuconfig

    The current patch doesn't use any optimization to reduce the size of the
    generated .mo file, it is possible to use the config option as a key, but
    this doesn't prevent the current patch from being used or the translations
    done under the current scheme to be in any way lost if we chose to do any
    kind of keying.

    Thanks to Fabricio Vaccari for starting the pt_BR (brazilian portuguese)
    translation effort, Thiago Maciera for helping me with the gconf.cc (QT
    frontent) i18n coding and to all the volunteers that are already working on
    the first translation, to pt_BR.

    I left the question on whether to ship the translations with the stock kernel
    sources to be discussed here, please share your suggestions.

    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnaldo Carvalho de Melo
     
  • Currently sparc and sparc64's UP cpu_idle() checks current pid. This
    is old time legacy. Now it's paranoia.

    Signed-off-by: Coywolf Qi Hunt
    Acked-by: William Irwin
    Signed-off-by: David S. Miller

    Coywolf Qi Hunt
     
  • Signed-off-by: David S. Miller

    David S. Miller