25 Jan, 2006

2 commits


20 Jan, 2006

10 commits


19 Jan, 2006

28 commits

  • This also includes by necessity _TIF_RESTORE_SIGMASK support,
    which actually resulted in a lot of cleanups.

    The sparc signal handling code is quite a mess and I should
    clean it up some day.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: David S. Miller

    David S. Miller
     
  • Linus Torvalds
     
  • some driver clean ups, and a re-posting of changes that are needed

    to match the updated TPS.

    Signed-off-by: Mark Gross
    Signed-off-by: Linus Torvalds

    mark gross
     
  • This is a subset of the bluesmoke project core code, stripped of the NMI work
    which isn't ready to merge and some of the "interesting" proc functionality
    that needs reworking or just has no place in kernel. It requires no core
    kernel changes except the added scrub functions already posted.

    The goal is to merge further functionality only after the core code is
    accepted and proven in the base kernel, and only at the point the upstream
    extras are really ready to merge.

    From: doug thompson

    This converts EDAC to sysfs and is the final chunk neccessary before EDAC
    has a stable user space API and can be considered for submission into the
    base kernel.

    Signed-off-by: Alan Cox
    Signed-off-by: Adrian Bunk
    Signed-off-by: Jesper Juhl
    Signed-off-by: doug thompson
    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • EDAC requires a way to scrub memory if an ECC error is found and the chipset
    does not do the work automatically. That means rewriting memory locations
    atomically with respect to all CPUs _and_ bus masters. That means we can't
    use atomic_add(foo, 0) as it gets optimised for non-SMP

    This adds a function to include/asm-foo/atomic.h for the platforms currently
    supported which implements a scrub of a mapped block.

    It also adjusts a few other files include order where atomic.h is included
    before types.h as this now causes an error as atomic_scrub uses u32.

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

    Alan Cox
     
  • Add the sys_pselect6() and sys_poll() calls to the i386 syscall table.

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

    David Woodhouse
     
  • The following implementation of ppoll() and pselect() system calls
    depends on the architecture providing a TIF_RESTORE_SIGMASK flag in the
    thread_info.

    These system calls have to change the signal mask during their
    operation, and signal handlers must be invoked using the new, temporary
    signal mask. The old signal mask must be restored either upon successful
    exit from the system call, or upon returning from the invoked signal
    handler if the system call is interrupted. We can't simply restore the
    original signal mask and return to userspace, since the restored signal
    mask may actually block the signal which interrupted the system call.

    The TIF_RESTORE_SIGMASK flag deals with this by causing the syscall exit
    path to trap into do_signal() just as TIF_SIGPENDING does, and by
    causing do_signal() to use the saved signal mask instead of the current
    signal mask when setting up the stack frame for the signal handler -- or
    by causing do_signal() to simply restore the saved signal mask in the
    case where there is no handler to be invoked.

    The first patch implements the sys_pselect() and sys_ppoll() system
    calls, which are present only if TIF_RESTORE_SIGMASK is defined. That
    #ifdef should go away in time when all architectures have implemented
    it. The second patch implements TIF_RESTORE_SIGMASK for the PowerPC
    kernel (in the -mm tree), and the third patch then removes the
    arch-specific implementations of sys_rt_sigsuspend() and replaces them
    with generic versions using the same trick.

    The fourth and fifth patches, provided by David Howells, implement
    TIF_RESTORE_SIGMASK for FR-V and i386 respectively, and the sixth patch
    adds the syscalls to the i386 syscall table.

    This patch:

    Add the pselect() and ppoll() system calls, providing core routines usable by
    the original select() and poll() system calls and also the new calls (with
    their semantics w.r.t timeouts).

    Signed-off-by: David Woodhouse
    Cc: Michael Kerrisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Woodhouse
     
  • Use the generic sys_rt_sigsuspend.

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

    Jeff Dike
     
  • Add support for TIF_RESTORE_SIGMASK. I copy the i386 handling of the flag.
    sys_sigsuspend is also changed to follow i386.
    Also a bit of cleanup -
    turn an if into a switch
    get rid of a couple more emacs formatting comments

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

    Jeff Dike
     
  • Implement the TIF_RESTORE_SIGMASK flag in the new arch/powerpc kernel, for
    both 32-bit and 64-bit system call paths.

    Signed-off-by: David Woodhouse
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Woodhouse
     
  • Handle TIF_RESTORE_SIGMASK as added by David Woodhouse's patch entitled:

    [PATCH] 2/3 Add TIF_RESTORE_SIGMASK support for arch/powerpc
    [PATCH] 3/3 Generic sys_rt_sigsuspend

    It does the following:

    (1) Declares TIF_RESTORE_SIGMASK for i386.

    (2) Invokes it over to do_signal() when TIF_RESTORE_SIGMASK is set.

    (3) Makes do_signal() support TIF_RESTORE_SIGMASK, using the signal mask saved
    in current->saved_sigmask.

    (4) Discards sys_rt_sigsuspend() from the arch, using the generic one instead.

    (5) Makes sys_sigsuspend() save the signal mask and set TIF_RESTORE_SIGMASK
    rather than attempting to fudge the return registers.

    (6) Makes sys_sigsuspend() return -ERESTARTNOHAND rather than looping
    intrinsically.

    (7) Makes setup_frame(), setup_rt_frame() and handle_signal() return 0 or
    -EFAULT rather than true/false to be consistent with the rest of the
    kernel.

    Due to the fact do_signal() is then only called from one place:

    (8) Makes do_signal() no longer have a return value is it was just being
    ignored; force_sig() takes care of this.

    (9) Discards the old sigmask argument to do_signal() as it's no longer
    necessary.

    (10) Makes do_signal() static.

    (11) Marks the second argument to do_notify_resume() as unused. The unused
    argument should remain in the middle as the arguments are passed in as
    registers, and the ordering is specific in entry.S

    Given the way do_signal() is now no longer called from sys_{,rt_}sigsuspend(),
    they no longer need access to the exception frame, and so can just take
    arguments normally.

    This patch depends on sys_rt_sigsuspend patch.

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

    David Howells
     
  • Handle TIF_RESTORE_SIGMASK as added by David Woodhouse's patch entitled:

    [PATCH] 2/3 Add TIF_RESTORE_SIGMASK support for arch/powerpc
    [PATCH] 3/3 Generic sys_rt_sigsuspend

    It does the following:

    (1) Declares TIF_RESTORE_SIGMASK for FRV.

    (2) Invokes it over to do_signal() when TIF_RESTORE_SIGMASK is set.

    (3) Makes do_signal() support TIF_RESTORE_SIGMASK, using the signal mask saved
    in current->saved_sigmask.

    (4) Discards sys_rt_sigsuspend() from the arch, using the generic one instead.

    (5) Makes sys_sigsuspend() save the signal mask and set TIF_RESTORE_SIGMASK
    rather than attempting to fudge the return registers.

    (6) Makes sys_sigsuspend() return -ERESTARTNOHAND rather than looping
    intrinsically.

    (7) Makes setup_frame(), setup_rt_frame() and handle_signal() return 0 or
    -EFAULT rather than true/false to be consistent with the rest of the
    kernel.

    Due to the fact do_signal() is then only called from one place:

    (8) Make do_signal() no longer have a return value is it was just being
    ignored; force_sig() takes care of this.

    (9) Discards the old sigmask argument to do_signal() as it's no longer
    necessary.

    This patch depends on the FRV signalling patches as well as the
    sys_rt_sigsuspend patch.

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

    David Howells
     
  • The TIF_RESTORE_SIGMASK flag allows us to have a generic implementation of
    sys_rt_sigsuspend() instead of duplicating it for each architecture. This
    provides such an implementation and makes arch/powerpc use it.

    It also tidies up the ppc32 sys_sigsuspend() to use TIF_RESTORE_SIGMASK.

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

    David Woodhouse
     
  • Wire up the x86_64 syscalls.

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

    Ulrich Drepper
     
  • Wire up the x86 syscalls

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

    Ulrich Drepper
     
  • Here is a series of patches which introduce in total 13 new system calls
    which take a file descriptor/filename pair instead of a single file
    name. These functions, openat etc, have been discussed on numerous
    occasions. They are needed to implement race-free filesystem traversal,
    they are necessary to implement a virtual per-thread current working
    directory (think multi-threaded backup software), etc.

    We have in glibc today implementations of the interfaces which use the
    /proc/self/fd magic. But this code is rather expensive. Here are some
    results (similar to what Jim Meyering posted before).

    The test creates a deep directory hierarchy on a tmpfs filesystem. Then
    rm -fr is used to remove all directories. Without syscall support I get
    this:

    real 0m31.921s
    user 0m0.688s
    sys 0m31.234s

    With syscall support the results are much better:

    real 0m20.699s
    user 0m0.536s
    sys 0m20.149s

    The interfaces are for obvious reasons currently not much used. But they'll
    be used. coreutils (and Jeff's posixutils) are already using them.
    Furthermore, code like ftw/fts in libc (maybe even glob) will also start using
    them. I expect a patch to make follow soon. Every program which is walking
    the filesystem tree will benefit.

    Signed-off-by: Ulrich Drepper
    Signed-off-by: Alexey Dobriyan
    Cc: Christoph Hellwig
    Cc: Al Viro
    Acked-by: Ingo Molnar
    Cc: Michael Kerrisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ulrich Drepper
     
  • find_exported_dentry contains two duplicate loops to find an alias that the
    acceptable callback likes. Split this out to a new helper and switch from
    list_for_each to list_for_each_entry to make it more readable.

    Signed-off-by: Christoph Hellwig
    Acked-by: NeilBrown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • A recent patch which checked the return status of vfs_getattr in nfsd,
    completely missed the nfsproc.c (NFSv2) part. Here is it.

    This patch moved the call to vfs_getattr from the xdr encoding (at which point
    it is too late to return an error) to the call handling. This means several
    calls to vfs_getattr are needed in nfsproc.c. Many are encapsulated in
    nfsd_return_attrs and nfsd_return_dirop.

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

    David Shaw
     
  • nfsd_sync* return an errno, which usually needs to be converted to an errno,
    sometimes immediately, sometimes a little later.

    Also, nfsd_setattr returns an nfserr which SHOULDN'T be converted from
    an errno (because it isn't one).

    Also some tidyups of the form:
    err = XX
    err = nfserrno(err)
    and
    err = XX
    if (err)
    err = nfserrno(err)
    become
    err = nfserrno(XX)

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

    NeilBrown
     
  • missing nfserrno() in default case of a switch by return value of
    posix_lock_file(); as the result we send negative host-endian to clients that
    expect positive network-endian, preferably mentioned in RFC... BTW, that case
    is not impossible - posix_lock_file() can return -ENOLCK and we do not handle
    that one explicitly.

    Signed-off-by: Al Viro
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • ->rp_status is network-endian and nobody byteswaps it before sending to
    client; putting NFSERR_SERVERFAULT instead of nfserr_serverfault in there is
    not nice...

    Signed-off-by: Al Viro
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • -EINVAL (in host order, no less) is not a good thing to return to client.

    nfsd4_truncate() returns it in one case and its callers expect nfs_.... from
    it. AFAICS, it should be nfserr_inval

    Signed-off-by: Al Viro
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Several failure exits return -E instead of nfserr_ and
    vice versa.

    Signed-off-by: Al Viro
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Clean up some unnecessary special-casing in the setattr code..

    Signed-off-by: Fred Isaman
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fred Isaman