01 May, 2005

40 commits

  • This patch changes calls to synchronize_kernel(), deprecated in the earlier
    "Deprecate synchronize_kernel, GPL replacement" patch to instead call the new
    synchronize_rcu() and synchronize_sched() APIs.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     
  • The synchronize_kernel() primitive is used for quite a few different purposes:
    waiting for RCU readers, waiting for NMIs, waiting for interrupts, and so on.
    This makes RCU code harder to read, since synchronize_kernel() might or might
    not have matching rcu_read_lock()s. This patch creates a new
    synchronize_rcu() that is to be used for RCU readers and a new
    synchronize_sched() that is used for the rest. These two new primitives
    currently have the same implementation, but this is might well change with
    additional real-time support. Both new primitives are GPL-only, the old
    primitive is deprecated.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     
  • Add a deprecated_for_modules macro that allows symbols to be deprecated only
    when used by modules, as suggested by Andrew Morton some months back.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     
  • The gpl exports need to be put back. Moving them to GPL -- but in a
    measured manner, as I proposed on this list some months ago -- is fine.
    Changing these particular exports precipitously is most definitely -not-
    fine. Here is my earlier proposal:

    http://marc.theaimsgroup.com/?l=linux-kernel&m=110520930301813&w=2

    See below for a patch that puts the exports back, along with an updated
    version of my earlier patch that starts the process of moving them to GPL.
    I will also be following this message with RFC patches that introduce two
    (EXPORT_SYMBOL_GPL) interfaces to replace synchronize_kernel(), which then
    becomes deprecated.

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

    Paul E. McKenney
     
  • The current logic assumes that a /proc//task directory should have a
    hardlink count of 3, probably counting ".", "..", and a directory for a
    single child task.

    It's fairly obvious that this doesn't work out correctly when a PID has
    more than one child task, which is quite often the case.

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

    Daniel Drake
     
  • The pid directories in /proc/ currently return the wrong hardlink count - 3,
    when there are actually 4 : ".", "..", "fd", and "task".

    This is easy to notice using find(1):
    cd /proc/
    find

    In the output, you'll see a message similar to:

    find: WARNING: Hard link count is wrong for .: this may be a bug in your
    filesystem driver. Automatically turning on find's -noleaf option.
    Earlier results may have failed to include directories that should have
    been searched.

    http://bugs.gentoo.org/show_bug.cgi?id=86031

    I also noticed that CONFIG_SECURITY can add a 5th: attr, and performed a
    similar fix on the task directories too.

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

    Daniel Drake
     
  • The attached patch moves the IRQ-related SA_xxx flags (namely, SA_PROBE,
    SA_SAMPLE_RANDOM and SA_SHIRQ) from all the arch-specific headers to
    linux/signal.h. This looks like a left-over after the irq-handling code
    was consolidated. The code was moved to kernel/irq/*, but the flags are
    still left per-arch.

    Right now, adding a new IRQ flag to the arch-specific header, like this
    patch does:
    http://cvs.sourceforge.net/viewcvs.py/*checkout*/alsa/alsa-driver/utils/patches/pcsp-kernel-2.6.10-03.diff?rev=1.1
    no longer works, it breaks the compilation for all other arches, unless you
    add that flag to all the other arch-specific headers too. So I think such
    a clean-up makes sense.

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

    Stas Sergeev
     
  • Arrange for all kernel printks to be no-ops. Only available if
    CONFIG_EMBEDDED.

    This patch saves about 375k on my laptop config and nearly 100k on minimal
    configs.

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

    Matt Mackall
     
  • Remove PAGE_BUG - repalce it with BUG and BUG_ON.

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

    Matt Mackall
     
  • This patch eliminates all kernel BUGs, trims about 35k off the typical
    kernel, and makes the system slightly faster.

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

    Matt Mackall
     
  • Add a pair of rlimits for allowing non-root tasks to raise nice and rt
    priorities. Defaults to traditional behavior. Originally written by
    Chris Wright.

    The patch implements a simple rlimit ceiling for the RT (and nice) priorities
    a task can set. The rlimit defaults to 0, meaning no change in behavior by
    default. A value of 50 means RT priority levels 1-50 are allowed. A value of
    100 means all 99 privilege levels from 1 to 99 are allowed. CAP_SYS_NICE is
    blanket permission.

    (akpm: see http://www.uwsg.iu.edu/hypermail/linux/kernel/0503.1/1921.html for
    tips on integrating this with PAM).

    Signed-off-by: Matt Mackall
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Mackall
     
  • Synchronize documentation with current interface.

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

    Cornelia Huck
     
  • The ioctl32_conversion routines will be deprecated: Remove them from the
    crypto driver.

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

    Cornelia Huck
     
  • The ioctl32_conversion routines will be deprecated: Remove them from dasd_cmb
    and handle the three cmb ioctls like all other dasd ioctls.

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

    Cornelia Huck
     
  • The first blocks on a cdl formatted dasd device are smaller than the blocksize
    of the device. Read requests are padded with a 'e5' pattern. Write requests
    should not pad the (user) buffer with 'e5' because a write request is not
    allowed to modify the buffer.

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

    Horst Hummel
     
  • The DASD device driver never reorders the I/O requests and relies on the
    hardware to write all data to nonvolatile storage before signaling a
    successful write. Hence, the only thing we have to do to support write
    barriers is to set the queue ordered flag.

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

    Stefan Weinhuber
     
  • The independent read-only flags in devmap, dasd_device and gendisk are not
    kept in sync. Use one bit per feature in the dasd driver and keep that bit in
    sync with the gendisk bit.

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

    Horst Hummel
     
  • The current limitation of 16 characters of the debug feature names turned out
    to be insufficient. Increase it to 64 characters.

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

    Michael Holzheu
     
  • An arbitrary guest must not be allowed to trigger cmm actions. Only one
    specific guest namely the one that serves as the resource monitor may send cmm
    messages. Add a parameter that allows to specify the guest that may send
    messages. z/VMs resource manager has the name 'VMRMSVM' which is the default.

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

    Martin Schwidefsky
     
  • Provide an easy way to define a non-zero storage key at compile time. This is
    useful for debugging purposes.

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

    Peter Oberparleiter
     
  • The memory setup didn't take care of memory holes and this makes the memory
    management think there would be more memory available than there is in
    reality. That causes the OOM killer to kill processes even if there is enough
    memory left that can be written to the swap space.

    The patch fixes this by using free_area_init_node with an array of memory
    holes instead of free_area_init. Further the patch cleans up the code in
    setup.c by splitting setup_arch into smaller pieces.

    Signed-off-by: Martin Schwidefsky

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

    Heiko Carstens
     
  • Fix overflow in calculation of the new tod value in stop_hz_timer and fix
    wrong virtual timer list idle time in case the virtual timer is already
    expired in stop_cpu_timer.

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

    Martin Schwidefsky
     
  • Regenerate the default configuration for s390.

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

    Martin Schwidefsky
     
  • Use the set_disk_ro() API when the backing file is read-only, to mark the disk
    read-only, during the ->open(). The current hack does not work when doing a
    mount -o remount.

    Also, mark explicitly the code paths which should no more be triggerable (I've
    removed the WARN_ON(1) things). They should actually become BUG()s probably
    but I'll avoid that since I'm not so sure the change works so well. I gave it
    only some limited testing.

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

    Paolo 'Blaisorblade' Giarrusso
     
  • Add some commentary about UML internals, for a strange trick.

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

    Paolo 'Blaisorblade' Giarrusso
     
  • Use this:
    .set_page_dirty = __set_page_dirty_nobuffers,

    We already dropped the inclusion of , and we don't have a
    backing block device for this FS.

    "Without having looked at it, I'm sure that hostfs does not use buffer_heads.
    So setting your ->set_page_dirty a_op to point at __set_page_dirty_nobuffers()
    is a reasonable thing to do - it'll provide a slight speedup."

    This speedup is one less spinlock held and one less conditional branch, which
    isn't bad.

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

    Paolo 'Blaisorblade' Giarrusso
     
  • Fix some console locking problems (including scheduling in atomic) and various
    reorderings and cleanup in that code. Not yet ready for 2.6.12 probably.

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

    Paolo 'Blaisorblade' Giarrusso
     
  • Reuse asm-x86-64/unistd.h to build our syscall table, like x86-64 already
    does.

    Like for i386, we must add some #defines for all the (right!) changes UML does
    to x86-64 syscall table.

    Note: I noted a bogus:
    [ __NR_sched_yield ] = (syscall_handler_t *) yield,

    while doing this patch (which could only be a workaround for some strange bug,
    but I would ignore this possibility). I'm changing this without notice.

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

    Paolo 'Blaisorblade' Giarrusso
     
  • Fix the moved syscall table for the x86_64 SUBARCH:

    - redirect __NR_chown and such to versions aware of 32-bit UIDs,

    - avoid the useless hack for sys_nfsservctl,

    - use sys_sendfile64 in the table rather than sys_sendfile.

    - __NR_uselib is sys_ni_syscall on x86_64 (which does not support A.OUT).

    - __NR_getrlimit is sys_getrlimit, not sys_old_getrlimit

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

    Paolo 'Blaisorblade' Giarrusso
     
  • Split the i386 entry.S files into entry.S and syscall_table.S which is
    included in the previous one (so actually there is no difference between them)
    and use the syscall_table.S in the UML build, instead of tracking by hand the
    syscall table changes (which is inherently error-prone).

    We must only insert the right #defines to inject the changes we need from the
    i386 syscall table (for instance some different function names); also, we
    don't implement some i386 syscalls, as ioperm(), nor some TLS-related ones
    (yet to provide).

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

    Paolo 'Blaisorblade' Giarrusso
     
  • GCC 2.95 uses __va_copy instead of va_copy. Handle it inside compiler.h
    instead of in a casual file, and avoid the risk that this breaks with a newer
    compiler (which it could do).

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

    Paolo 'Blaisorblade' Giarrusso
     
  • Cleanup: make an inline of this empty proc.

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

    Paolo 'Blaisorblade' Giarrusso
     
  • We want to make possible, for the user, to enable the i586 AES implementation.
    This requires a restructure.

    - Add a CONFIG_UML_X86 to notify that we are building a UML for i386.

    - Rename CONFIG_64_BIT to CONFIG_64BIT as is used for all other archs

    - Tell crypto/Kconfig that UML_X86 is as good as X86

    - Tell it that it must exclude not X86_64 but 64BIT, which will give the
    same results.

    - Tell kbuild to descend down into arch/i386/crypto/ to build what's needed.

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

    Paolo 'Blaisorblade' Giarrusso
     
  • Old versions of sed from 1998 (predating the first release of gcc 2.95, but
    still in use by debian stable) don't understand the single-line version of the
    sed append command. Since newer versions of sed still understand the...
    ahem, "vintage" form of the command, change our code to use that.

    Signed-off-by: Rob Landley
    Acked-by: Ian McDonald
    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rob Landley
     
  • Paolo 'Blaisorblade' Giarrusso

    Fix the error path, which is triggered when the processor misses the fpx
    regs (i.e. the "fxsr" cpuinfo feature). For instance by VIA C3 Samuel2.

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

    Andree Leidenfrost
     
  • This trick is useless, because sys_ni.c will handle this problem by itself,
    like it does even on UML for other syscalls.

    Also, it does not provide the NFSD syscall when NFSD is compiled as a
    module, which is a big problem.

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

    blaisorblade@yahoo.it
     
  • Paolo 'Blaisorblade' Giarrusso

    Prevent the kernel from oopsing during the extable sorting, as it can do
    now, because the extable is in the readonly section of the binary.

    Jeff says: The exception table turned RO in 2.6.11-rc3-mm1 for some reason.
    Moving it causes it to land in the writable data section of the binary.

    Paolo says: This patch fixes a oops on startup, which can be easily
    triggered by compiling with CONFIG_MODE_TT disabled, and STATIC_LINK either
    disabled or enabled. The resulting kernel will always Oops on startup,
    after printing this simple output:

    I've verified, by binary search on the BitKeeper repository (synced up as
    of 2.6.12-rc2), starting from the range 2.6.11-2.6.12-rc1, that this bug
    shows up on BitKeeper revisions in the range [@1.1994.11.168,+inf), i.e.
    starting from this:

    [PATCH] lib/sort: Replace insertion sort in exception tables

    Since UML does not use the exception table, it's likely that insertion sort
    didn't happen to write anything on the table.

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

    Jeff Dike
     
  • Those cards really need A in their names. Otherwise it is pretty hard
    to find anything about them on the net.

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

    Pavel Machek
     
  • This strcpy can run off the end of saved_command_line, and we don't need it any more anyway.

    Signed-off-by: Alexander Nyberg
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Nyberg
     
  • Brings sanitize_e820_map() in x86-64 in sync with that of i386.

    x86_64 version was missing the changes from this patch.
    http://linux.bkbits.net:8080/linux-2.6/cset@3e5e4083Y3HevldZl5KCy94V4DcZww?nav=index.html|src/|src/arch|src/arch/i386|src/arch/i386/kernel|related/arch/i386/kernel/setup.c

    Signed-off-by: Venkatesh Pallipadi
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Venkatesh Pallipadi