03 Oct, 2006

1 commit

  • These patches make the kernel pass 64-bit inode numbers internally when
    communicating to userspace, even on a 32-bit system. They are required
    because some filesystems have intrinsic 64-bit inode numbers: NFS3+ and XFS
    for example. The 64-bit inode numbers are then propagated to userspace
    automatically where the arch supports it.

    Problems have been seen with userspace (eg: ld.so) using the 64-bit inode
    number returned by stat64() or getdents64() to differentiate files, and
    failing because the 64-bit inode number space was compressed to 32-bits, and
    so overlaps occur.

    This patch:

    Make filldir_t take a 64-bit inode number and struct kstat carry a 64-bit
    inode number so that 64-bit inode numbers can be passed back to userspace.

    The stat functions then returns the full 64-bit inode number where
    available and where possible. If it is not possible to represent the inode
    number supplied by the filesystem in the field provided by userspace, then
    error EOVERFLOW will be issued.

    Similarly, the getdents/readdir functions now pass the full 64-bit inode
    number to userspace where possible, returning EOVERFLOW instead when a
    directory entry is encountered that can't be properly represented.

    Note that this means that some inodes will not be stat'able on a 32-bit
    system with old libraries where they were before - but it does mean that
    there will be no ambiguity over what a 32-bit inode number refers to.

    Note similarly that directory scans may be cut short with an error on a
    32-bit system with old libraries where the scan would work before for the
    same reasons.

    It is judged unlikely that this situation will occur because modern glibc
    uses 64-bit capable versions of stat and getdents class functions
    exclusively, and that older systems are unlikely to encounter
    unrepresentable inode numbers anyway.

    [akpm: alpha build fix]
    Signed-off-by: David Howells
    Cc: Trond Myklebust
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

02 Oct, 2006

4 commits

  • This adds the new kernel_execve function on all architectures that were using
    _syscall3() to implement execve.

    The implementation uses code from the _syscall3 macros provided in the
    unistd.h header file. I don't have cross-compilers for any of these
    architectures, so the patch is untested with the exception of i386.

    Most architectures can probably implement this in a nicer way in assembly or
    by combining it with the sys_execve implementation itself, but this should do
    it for now.

    [bunk@stusta.de: m68knommu build fix]
    [markh@osdl.org: build fix]
    [bero@arklinux.org: build fix]
    [ralf@linux-mips.org: mips fix]
    [schwidefsky@de.ibm.com: s390 fix]
    Signed-off-by: Arnd Bergmann
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Ian Molton
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Hirokazu Takata
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Miles Bader
    Cc: Chris Zankel
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Signed-off-by: Ralf Baechle
    Signed-off-by: Bernhard Rosenkraenzer
    Signed-off-by: Mark Haverkamp
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • Move the init_nsproxy definition out of arch/ into kernel/nsproxy.c. This
    avoids all arches having to be updated. Compiles and boots on s390.

    Signed-off-by: Serge E. Hallyn
    Cc: Kirill Korotaev
    Cc: "Eric W. Biederman"
    Cc: Herbert Poetzl
    Cc: Andrey Savochkin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     
  • This patch adds a nsproxy structure to the task struct. Later patches will
    move the fs namespace pointer into this structure, and introduce a new utsname
    namespace into the nsproxy.

    The vserver and openvz functionality, then, would be implemented in large part
    by virtualizing/isolating more and more resources into namespaces, each
    contained in the nsproxy.

    [akpm@osdl.org: build fix]
    Signed-off-by: Serge Hallyn
    Cc: Kirill Korotaev
    Cc: "Eric W. Biederman"
    Cc: Herbert Poetzl
    Cc: Andrey Savochkin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     
  • kprobe_flush_task() possibly calls kfree function during holding
    kretprobe_lock spinlock, if kfree function is probed by kretprobe that will
    incur spinlock deadlock. This patch moves kfree function out scope of
    kretprobe_lock.

    Signed-off-by: bibo, mao
    Signed-off-by: Ananth N Mavinakayanahalli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    bibo,mao
     

01 Oct, 2006

3 commits

  • This patch vectorizes aio_read() and aio_write() methods to prepare for
    collapsing all aio & vectored operations into one interface - which is
    aio_read()/aio_write().

    Signed-off-by: Badari Pulavarty
    Signed-off-by: Christoph Hellwig
    Cc: Michael Holzheu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Badari Pulavarty
     
  • With 2.6.18-rc4-mm2, now wall_jiffies will always be the same as jiffies.
    So we can kill wall_jiffies completely.

    This is just a cleanup and logically should not change any real behavior
    except for one thing: RTC updating code in (old) ppc and xtensa use a
    condition "jiffies - wall_jiffies == 1". This condition is never met so I
    suppose it is just a bug. I just remove that condition only instead of
    kill the whole "if" block.

    [heiko.carstens@de.ibm.com: s390 build fix and cleanup]
    Signed-off-by: Atsushi Nemoto
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Ian Molton
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Hirokazu Takata
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Miles Bader
    Cc: Chris Zankel
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • Use the new diagnose 0x9c in the spinlock implementation for s390. It
    yields the remaining timeslice of the virtual cpu that tries to acquire a
    lock to the virtual cpu that is the current holder of the lock.

    Signed-off-by: Martin Schwidefsky
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Martin Schwidefsky
     

30 Sep, 2006

3 commits

  • Pass ticks to do_timer() and update_times(), and adjust x86_64 and s390
    timer interrupt handler with this change.

    Currently update_times() calculates ticks by "jiffies - wall_jiffies", but
    callers of do_timer() should know how many ticks to update. Passing ticks
    get rid of this redundant calculation. Also there are another redundancy
    pointed out by Martin Schwidefsky.

    This cleanup make a barrier added by
    5aee405c662ca644980c184774277fc6d0769a84 needless. So this patch removes
    it.

    As a bonus, this cleanup make wall_jiffies can be removed easily, since now
    wall_jiffies is always synced with jiffies. (This patch does not really
    remove wall_jiffies. It would be another cleanup patch)

    Signed-off-by: Atsushi Nemoto
    Cc: Martin Schwidefsky
    Cc: "Eric W. Biederman"
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: john stultz
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Russell King
    Cc: Ian Molton
    Cc: Mikael Starvik
    Acked-by: David Howells
    Cc: Yoshinori Sato
    Cc: Hirokazu Takata
    Acked-by: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Miles Bader
    Cc: Chris Zankel
    Acked-by: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • This is an updated version of Eric Biederman's is_init() patch.
    (http://lkml.org/lkml/2006/2/6/280). It applies cleanly to 2.6.18-rc3 and
    replaces a few more instances of ->pid == 1 with is_init().

    Further, is_init() checks pid and thus removes dependency on Eric's other
    patches for now.

    Eric's original description:

    There are a lot of places in the kernel where we test for init
    because we give it special properties. Most significantly init
    must not die. This results in code all over the kernel test
    ->pid == 1.

    Introduce is_init to capture this case.

    With multiple pid spaces for all of the cases affected we are
    looking for only the first process on the system, not some other
    process that has pid == 1.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Sukadev Bhattiprolu
    Cc: Dave Hansen
    Cc: Serge Hallyn
    Cc: Cedric Le Goater
    Cc:
    Acked-by: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sukadev Bhattiprolu
     
  • Convert s390 page handling macros to functions. In particular this fixes a
    problem with s390's SetPageUptodate macro which uses its input parameter
    twice which again can cause subtle bugs.

    [akpm@osdl.org: build fix]
    Cc: Martin Schwidefsky
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     

28 Sep, 2006

8 commits

  • Major cleanup of all s390 inline assemblies. They now have a common
    coding style. Quite a few have been shortened, mainly by using register
    asm variables. Use of the EX_TABLE macro helps as well. The atomic ops,
    bit ops and locking inlines new use the Q-constraint if a newer gcc
    is used. That results in slightly better code.

    Thanks to Christian Borntraeger for proof reading the changes.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Huge s390 assembly files whitespace cleanup.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • A user space program can read uninitialised kernel memory
    by appending to a file from a bad address and then reading
    the result back. The cause is the copy_from_user function
    that does not clear the remaining bytes of the kernel
    buffer after it got a fault on the user space address.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Add a kernel config option for the IBM System z9. This will produce
    faster code on newer compilers using the -march=z9-109 option.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     
  • The clocksource infrastructure introduced with commit
    ad596171ed635c51a9eef829187af100cbf8dcf7 broke 31 bit s390.
    The reason is that the do_div() primitive for 31 bit always
    had a restriction: it could only divide an unsigned 64 bit
    integer by an unsigned 31 bit integer. The clocksource code
    now uses do_div() with a base value that has the most
    significant bit set. The result is that clock->cycle_interval
    has a funny value which causes the linux time to jump around
    like mad.
    The solution is "obvious": implement a proper __div64_32
    function for 31 bit s390.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • sparse complains, if we use bitwise operations on enums. Cast enum to
    long in order to fix that problem!

    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Michael Holzheu
     
  • Don't use static initialization for struct members containing
    variables because gcc would generate more code and use double space
    on stack.

    Signed-off-by: Gerald Schaefer
    Signed-off-by: Martin Schwidefsky

    Gerald Schaefer
     
  • Lock for mmap_sem is missing on page fault retry for init task
    when it fails due to out of memory.

    Signed-off-by: Akinobu Mita
    Signed-off-by: Martin Schwidefsky

    Akinobu Mita
     

27 Sep, 2006

4 commits

  • Since sys_sysctl is deprecated start allow it to be compiled out. This
    should catch any remaining user space code that cares, and paves the way
    for further sysctl cleanups.

    [akpm@osdl.org: If sys_sysctl() is not compiled-in, emit a warning]
    Signed-off-by: Eric W. Biederman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • This eliminates the i_blksize field from struct inode. Filesystems that want
    to provide a per-inode st_blksize can do so by providing their own getattr
    routine instead of using the generic_fillattr() function.

    Note that some filesystems were providing pretty much random (and incorrect)
    values for i_blksize.

    [bunk@stusta.de: cleanup]
    [akpm@osdl.org: generic_fillattr() fix]
    Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Theodore Ts'o
     
  • The following patches reduce the size of the VFS inode structure by 28 bytes
    on a UP x86. (It would be more on an x86_64 system). This is a 10% reduction
    in the inode size on a UP kernel that is configured in a production mode
    (i.e., with no spinlock or other debugging functions enabled; if you want to
    save memory taken up by in-core inodes, the first thing you should do is
    disable the debugging options; they are responsible for a huge amount of bloat
    in the VFS inode structure).

    This patch:

    The filesystem or device-specific pointer in the inode is inside a union,
    which is pretty pointless given that all 30+ users of this field have been
    using the void pointer. Get rid of the union and rename it to i_private, with
    a comment to explain who is allowed to use the void pointer. This is just a
    cleanup, but it allows us to reuse the union 'u' for something something where
    the union will actually be used.

    [judith@osdl.org: powerpc build fix]
    Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Judith Lebzelter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Theodore Ts'o
     
  • * 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (225 commits)
    [PATCH] Don't set calgary iommu as default y
    [PATCH] i386/x86-64: New Intel feature flags
    [PATCH] x86: Add a cumulative thermal throttle event counter.
    [PATCH] i386: Make the jiffies compares use the 64bit safe macros.
    [PATCH] x86: Refactor thermal throttle processing
    [PATCH] Add 64bit jiffies compares (for use with get_jiffies_64)
    [PATCH] Fix unwinder warning in traps.c
    [PATCH] x86: Allow disabling early pci scans with pci=noearly or disallowing conf1
    [PATCH] x86: Move direct PCI scanning functions out of line
    [PATCH] i386/x86-64: Make all early PCI scans dependent on CONFIG_PCI
    [PATCH] Don't leak NT bit into next task
    [PATCH] i386/x86-64: Work around gcc bug with noreturn functions in unwinder
    [PATCH] Fix some broken white space in ia32_signal.c
    [PATCH] Initialize argument registers for 32bit signal handlers.
    [PATCH] Remove all traces of signal number conversion
    [PATCH] Don't synchronize time reading on single core AMD systems
    [PATCH] Remove outdated comment in x86-64 mmconfig code
    [PATCH] Use string instructions for Core2 copy/clear
    [PATCH] x86: - restore i8259A eoi status on resume
    [PATCH] i386: Split multi-line printk in oops output.
    ...

    Linus Torvalds
     

26 Sep, 2006

4 commits

  • Convert cmm's usage of kernel_thread to kthread_run. Also create the
    cmmthread at module load time, so it is possible to check if creation of
    the thread fails.

    In addition the cmmthread now gets terminated when the module gets unloaded
    instead of leaving a stale kernel thread. Also check the return values of
    other registration functions at module load and handle their return values
    appropriately.

    Cc: Martin Schwidefsky
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • Add a notifer chain to the out of memory killer. If one of the registered
    callbacks could release some memory, do not kill the process but return and
    retry the allocation that forced the oom killer to run.

    The purpose of the notifier is to add a safety net in the presence of
    memory ballooners. If the resource manager inflated the balloon to a size
    where memory allocations can not be satisfied anymore, it is better to
    deflate the balloon a bit instead of killing processes.

    The implementation for the s390 ballooner is included.

    [akpm@osdl.org: cleanups]
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Martin Schwidefsky
     
  • eventcounters: Do not display counters for zones that are not available on an
    arch

    Do not define or display counters for the DMA32 and the HIGHMEM zone if such
    zones were not configured.

    [akpm@osdl.org: s390 fix]
    [heiko.carstens@de.ibm.com: s390 fix]
    Signed-off-by: Christoph Lameter
    Cc: Martin Schwidefsky
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • - Remove unused all_contexts parameter
    No caller used it
    - Move skip argument into the structure (needed for
    followon patches)

    Cc: mingo@elte.hu

    Signed-off-by: Andi Kleen

    Andi Kleen
     

23 Sep, 2006

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (64 commits)
    [BLOCK] dm-crypt: trivial comment improvements
    [CRYPTO] api: Deprecate crypto_digest_* and crypto_alg_available
    [CRYPTO] padlock: Convert padlock-sha to use crypto_hash
    [CRYPTO] users: Use crypto_comp and crypto_has_*
    [CRYPTO] api: Add crypto_comp and crypto_has_*
    [CRYPTO] users: Use crypto_hash interface instead of crypto_digest
    [SCSI] iscsi: Use crypto_hash interface instead of crypto_digest
    [CRYPTO] digest: Remove old HMAC implementation
    [CRYPTO] doc: Update documentation for hash and me
    [SCTP]: Use HMAC template and hash interface
    [IPSEC]: Use HMAC template and hash interface
    [CRYPTO] tcrypt: Use HMAC template and hash interface
    [CRYPTO] hmac: Add crypto template implementation
    [CRYPTO] digest: Added user API for new hash type
    [CRYPTO] api: Mark parts of cipher interface as deprecated
    [PATCH] scatterlist: Add const to sg_set_buf/sg_init_one pointer argument
    [CRYPTO] drivers: Remove obsolete block cipher operations
    [CRYPTO] users: Use block ciphers where applicable
    [SUNRPC] GSS: Use block ciphers where applicable
    [IPSEC] ESP: Use block ciphers where applicable
    ...

    Linus Torvalds
     

21 Sep, 2006

4 commits


20 Sep, 2006

8 commits