deliverable/linux.git
19 years ago[PATCH] Keys: Use RCU to manage session keyring pointer
David Howells [Fri, 24 Jun 2005 05:00:53 +0000 (22:00 -0700)] 
[PATCH] Keys: Use RCU to manage session keyring pointer

The attached patch uses RCU to manage the session keyring pointer in struct
signal_struct.  This means that searching need not disable interrupts and get
a the sighand spinlock to access this pointer.  Furthermore, by judicious use
of rcu_read_(un)lock(), this patch also avoids the need to take and put
refcounts on the session keyring itself, thus saving on even more atomic ops.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Keys: Pass session keyring to call_usermodehelper()
David Howells [Fri, 24 Jun 2005 05:00:51 +0000 (22:00 -0700)] 
[PATCH] Keys: Pass session keyring to call_usermodehelper()

The attached patch makes it possible to pass a session keyring through to the
process spawned by call_usermodehelper().  This allows patch 3/3 to pass an
authorisation key through to /sbin/request-key, thus permitting better access
controls when doing just-in-time key creation.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] keys: Discard key spinlock and use RCU for key payload
David Howells [Fri, 24 Jun 2005 05:00:49 +0000 (22:00 -0700)] 
[PATCH] keys: Discard key spinlock and use RCU for key payload

The attached patch changes the key implementation in a number of ways:

 (1) It removes the spinlock from the key structure.

 (2) The key flags are now accessed using atomic bitops instead of
     write-locking the key spinlock and using C bitwise operators.

     The three instantiation flags are dealt with with the construction
     semaphore held during the request_key/instantiate/negate sequence, thus
     rendering the spinlock superfluous.

     The key flags are also now bit numbers not bit masks.

 (3) The key payload is now accessed using RCU. This permits the recursive
     keyring search algorithm to be simplified greatly since no locks need be
     taken other than the usual RCU preemption disablement. Searching now does
     not require any locks or semaphores to be held; merely that the starting
     keyring be pinned.

 (4) The keyring payload now includes an RCU head so that it can be disposed
     of by call_rcu(). This requires that the payload be copied on unlink to
     prevent introducing races in copy-down vs search-up.

 (5) The user key payload is now a structure with the data following it. It
     includes an RCU head like the keyring payload and for the same reason. It
     also contains a data length because the data length in the key may be
     changed on another CPU whilst an RCU protected read is in progress on the
     payload. This would then see the supposed RCU payload and the on-key data
     length getting out of sync.

     I'm tempted to drop the key's datalen entirely, except that it's used in
     conjunction with quota management and so is a little tricky to get rid
     of.

 (6) Update the keys documentation.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64: fix seccomp with 32-bit userland
Andrea Arcangeli [Fri, 24 Jun 2005 05:00:45 +0000 (22:00 -0700)] 
[PATCH] ppc64: fix seccomp with 32-bit userland

The seccomp check has to happen when entering the syscall and not when
exiting it or regs->gpr[0] contains garabge during signal handling in
ppc64_rt_sigreturn (this actually might be a bug too, but an orthogonal
one, since we really have to run the check before invoking the syscall and
not after it).

Signed-off-by: Andrea Arcangeli <andrea@cpushare.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years agoMerge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Fri, 24 Jun 2005 00:27:24 +0000 (17:27 -0700)] 
Merge /pub/scm/linux/kernel/git/aegl/linux-2.6

19 years agoMerge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 24 Jun 2005 00:26:31 +0000 (17:26 -0700)] 
Merge /pub/scm/linux/kernel/git/davem/net-2.6

19 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Fri, 24 Jun 2005 00:19:56 +0000 (17:19 -0700)] 
Merge master.kernel.org:/home/rmk/linux-2.6-arm

19 years agoMerge master.kernel.org:/home/rmk/linux-2.6-serial
Linus Torvalds [Thu, 23 Jun 2005 23:58:55 +0000 (16:58 -0700)] 
Merge master.kernel.org:/home/rmk/linux-2.6-serial

19 years ago[IA64] Fix pfn_to_nid() so the kernel compiles again for !CONFIG_DISCONTIGMEM.
David Mosberger-Tang [Thu, 23 Jun 2005 05:24:00 +0000 (22:24 -0700)] 
[IA64] Fix pfn_to_nid() so the kernel compiles again for !CONFIG_DISCONTIGMEM.

Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
19 years ago[PATCH] Serial: Bugs are not capabilities
Russell King [Thu, 23 Jun 2005 21:26:43 +0000 (22:26 +0100)] 
[PATCH] Serial: Bugs are not capabilities

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
19 years ago[PATCH] ARM: 2730/1: S3C2410 default configuration update
Ben Dooks [Thu, 23 Jun 2005 20:56:48 +0000 (21:56 +0100)] 
[PATCH] ARM: 2730/1: S3C2410 default configuration update

Patch from Ben Dooks

Add support for the DM9000 and bring default configuration
up-to-date with the latest 2.6.12 kernel release

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
19 years ago[PATCH] ARM: 2729/1: DM9000 platform support for S3C2410 machines (BAST, VR1000)
Ben Dooks [Thu, 23 Jun 2005 20:56:47 +0000 (21:56 +0100)] 
[PATCH] ARM: 2729/1: DM9000 platform support for S3C2410 machines (BAST, VR1000)

Patch from Ben Dooks

Add platform_device information for DM9000 chip(s) on the
Simtec BAST and the VR1000 board.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
19 years ago[PATCH] ARM: 2728/1: S3C2410 - fix constant warning on serial device name
Ben Dooks [Thu, 23 Jun 2005 20:56:46 +0000 (21:56 +0100)] 
[PATCH] ARM: 2728/1: S3C2410 - fix constant warning on serial device name

Patch from Ben Dooks

Remove warning of casting `const char *` to a `char *` type.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
19 years ago[PATCH] ARM: 2722/1: remove reliance on udivdi3 for nwfpe
Nicolas Pitre [Thu, 23 Jun 2005 20:56:46 +0000 (21:56 +0100)] 
[PATCH] ARM: 2722/1: remove reliance on udivdi3 for nwfpe

Patch from Nicolas Pitre

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
19 years ago[PATCH] ARM: 2721/1: remove reliance on udivdi3 for pxafb driver
Nicolas Pitre [Thu, 23 Jun 2005 20:56:45 +0000 (21:56 +0100)] 
[PATCH] ARM: 2721/1: remove reliance on udivdi3 for pxafb driver

Patch from Nicolas Pitre

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
19 years ago[TCP]: Add Scalable TCP congestion control module.
John Heffner [Thu, 23 Jun 2005 19:29:07 +0000 (12:29 -0700)] 
[TCP]: Add Scalable TCP congestion control module.

This patch implements Tom Kelly's Scalable TCP congestion control algorithm
for the modular framework.

The algorithm has some nice scaling properties, and has been used a fair bit
in research, though is known to have significant fairness issues, so it's not
really suitable for general purpose use.

Signed-off-by: John Heffner <jheffner@psc.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TCP]: Add H-TCP congestion control module.
Baruch Even [Thu, 23 Jun 2005 19:28:11 +0000 (12:28 -0700)] 
[TCP]: Add H-TCP congestion control module.

H-TCP is a congestion control algorithm developed at the Hamilton Institute, by
Douglas Leith and Robert Shorten. It is extending the standard Reno algorithm
with mode switching is thus a relatively simple modification.

H-TCP is defined in a layered manner as it is still a research platform. The
basic form includes the modification of beta according to the ratio of maxRTT
to min RTT and the alpha=2*factor*(1-beta) relation, where factor is dependant
on the time since last congestion.

The other layers improve convergence by adding appropriate factors to alpha.

The following patch implements the H-TCP algorithm in it's basic form.

Signed-Off-By: Baruch Even <baruch@ev-en.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TCP]: Add TCP Vegas congestion control module.
Stephen Hemminger [Thu, 23 Jun 2005 19:27:19 +0000 (12:27 -0700)] 
[TCP]: Add TCP Vegas congestion control module.

TCP Vegas code modified for the new TCP infrastructure.
Vegas now uses microsecond resolution timestamps for
better estimation of performance over higher speed links.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TCP]: Add TCP Hybla congestion control module.
Daniele Lacamera [Thu, 23 Jun 2005 19:26:34 +0000 (12:26 -0700)] 
[TCP]: Add TCP Hybla congestion control module.

TCP Hybla congestion avoidance.

- "In heterogeneous networks, TCP connections that incorporate a
terrestrial or satellite radio link are greatly disadvantaged with
respect to entirely wired connections, because of their longer round
trip times (RTTs). To cope with this problem, a new TCP proposal, the
TCP Hybla, is presented and discussed in the paper[1]. It stems from an
analytical evaluation of the congestion window dynamics in the TCP
standard versions (Tahoe, Reno, NewReno), which suggests the necessary
modifications to remove the performance dependence on RTT.[...]"[1]

[1]: Carlo Caini, Rosario Firrincieli, "TCP Hybla: a TCP enhancement for
heterogeneous networks",
International Journal of Satellite Communications and Networking
Volume 22, Issue 5 , Pages 547 - 566. September 2004.

Signed-off-by: Daniele Lacamera (root at danielinux.net)net
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TCP]: Add High Speed TCP congestion control module.
John Heffner [Thu, 23 Jun 2005 19:24:58 +0000 (12:24 -0700)] 
[TCP]: Add High Speed TCP congestion control module.

Sally Floyd's high speed TCP congestion control.
This is useful for comparison and research.

Signed-off-by: John Heffner <jheffner@psc.edu>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TCP]: Add TCP Westwood congestion control module.
Stephen Hemminger [Thu, 23 Jun 2005 19:24:09 +0000 (12:24 -0700)] 
[TCP]: Add TCP Westwood congestion control module.

This is the existing 2.6.12 Westwood code moved from tcp_input
to the new congestion framework. A lot of the inline functions
have been eliminated to try and make it clearer.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TCP]: Add TCP BIC congestion control module.
Stephen Hemminger [Thu, 23 Jun 2005 19:23:25 +0000 (12:23 -0700)] 
[TCP]: Add TCP BIC congestion control module.

TCP BIC congestion control reworked to use the new congestion control
infrastructure. This version is more up to date than the BIC
code in 2.6.12; it incorporates enhancements from BICTCP 1.1,
to handle low latency links.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TCP]: Update sysctl and congestion control documentation.
Stephen Hemminger [Thu, 23 Jun 2005 19:22:36 +0000 (12:22 -0700)] 
[TCP]: Update sysctl and congestion control documentation.

Update the documentation to remove the old sysctl values and
include the new congestion control infrastructure. Includes
changes to tcp.txt by Ian McDonald.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TCP]: Report congestion control algorithm in tcp_diag.
Stephen Hemminger [Thu, 23 Jun 2005 19:21:28 +0000 (12:21 -0700)] 
[TCP]: Report congestion control algorithm in tcp_diag.

Enhancement to the tcp_diag interface used by the iproute2 ss command
to report the tcp congestion control being used by a socket.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TCP]: Change tcp_diag to use the existing __RTA_PUT() macro.
Stephen Hemminger [Thu, 23 Jun 2005 19:20:36 +0000 (12:20 -0700)] 
[TCP]: Change tcp_diag to use the existing __RTA_PUT() macro.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TCP]: Add pluggable congestion control algorithm infrastructure.
Stephen Hemminger [Thu, 23 Jun 2005 19:19:55 +0000 (12:19 -0700)] 
[TCP]: Add pluggable congestion control algorithm infrastructure.

Allow TCP to have multiple pluggable congestion control algorithms.
Algorithms are defined by a set of operations and can be built in
or modules.  The legacy "new RENO" algorithm is used as a starting
point and fallback.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[PATCH] Add removal schedule of register_serial/unregister_serial to appropriate...
Russell King [Thu, 23 Jun 2005 13:23:35 +0000 (14:23 +0100)] 
[PATCH] Add removal schedule of register_serial/unregister_serial to appropriate file

19 years ago[PATCH] better USB_MON dependencies
Adrian Bunk [Thu, 23 Jun 2005 09:36:56 +0000 (11:36 +0200)] 
[PATCH] better USB_MON dependencies

This makes the USB_MON less confusing.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years agoMerge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/paulus/ppc64-2.6
Linus Torvalds [Thu, 23 Jun 2005 16:49:55 +0000 (09:49 -0700)] 
Merge /pub/scm/linux/kernel/git/paulus/ppc64-2.6

19 years ago[PATCH] sys_open() cleanup
Telemaque Ndizihiwe [Thu, 23 Jun 2005 07:10:33 +0000 (00:10 -0700)] 
[PATCH] sys_open() cleanup

Clean up tortured logic in sys_open().

Signed-off-by: Telemaque Ndizihiwe <telendiz@eircom.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Convert users to tty_unregister_ldisc()
Alexey Dobriyan [Thu, 23 Jun 2005 07:10:33 +0000 (00:10 -0700)] 
[PATCH] Convert users to tty_unregister_ldisc()

tty_register_ldisc(N_FOO, NULL) => tty_unregister_ldisc(N_FOO)

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Introduce tty_unregister_ldisc()
Alexey Dobriyan [Thu, 23 Jun 2005 07:10:32 +0000 (00:10 -0700)] 
[PATCH] Introduce tty_unregister_ldisc()

It's a bit strange to see tty_register_ldisc call in modules' exit
functions.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] pwc-uncompress warning fix
Andrew Morton [Thu, 23 Jun 2005 07:10:31 +0000 (00:10 -0700)] 
[PATCH] pwc-uncompress warning fix

drivers/usb/media/pwc/pwc-uncompress.c: In function `pwc_decompress':
drivers/usb/media/pwc/pwc-uncompress.c:140: warning: unreachable code at beginning of switch statement

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IDE CD reports current speed
Eric Piel [Thu, 23 Jun 2005 07:10:29 +0000 (00:10 -0700)] 
[PATCH] IDE CD reports current speed

The current ide-cd driver reports the CDROM speed (as found in
/proc/sys/dev/cdrom/info) as the current speed when loading the driver.
Changing the speed of the cdrom drive (by "eject -x" for instance) doesn't
update the speed reported by the kernel.  Updating the info could be
valuable for the user as it's the only way to know if the drive accepted
the request or discarded it.  It could even be used to list all the
available speeds of the drive.

The attached patch modifies the ide-cd driver so that after every speed
change request the new speed is updated.  Please note that the actual
modification is very little but I had to touch quite a few lines in order
to avoid to pre-declare the sub-functions.

Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] add note about verify_area removal to feature-removal-schedule.txt
Jesper Juhl [Thu, 23 Jun 2005 07:10:28 +0000 (00:10 -0700)] 
[PATCH] add note about verify_area removal to feature-removal-schedule.txt

Add note about the soon-to-come removal of verify_area() to
Documentation/feature-removal-schedule.txt.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] aio: make wait_queue ->task ->private
Benjamin LaHaise [Thu, 23 Jun 2005 07:10:27 +0000 (00:10 -0700)] 
[PATCH] aio: make wait_queue ->task ->private

In the upcoming aio_down patch, it is useful to store a private data
pointer in the kiocb's wait_queue.  Since we provide our own wake up
function and do not require the task_struct pointer, it makes sense to
convert the task pointer into a generic private pointer.

Signed-off-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] aio: fix do_sync_(read|write) to properly handle aio retries
Benjamin LaHaise [Thu, 23 Jun 2005 07:10:27 +0000 (00:10 -0700)] 
[PATCH] aio: fix do_sync_(read|write) to properly handle aio retries

When do_sync_(read|write) encounters an aio method that makes use of the
retry mechanism, they fail to correctly retry the operation.  This fixes
that by adding the appropriate sleep and retry mechanism.

Signed-off-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] dpt_i2o: fix waitqueue abuse
Andrew Morton [Thu, 23 Jun 2005 07:10:26 +0000 (00:10 -0700)] 
[PATCH] dpt_i2o: fix waitqueue abuse

The driver plays with waitqueue internals and fails to compile after Ben's
"aio: make wait_queue ->task ->private" patch.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Bug in error recovery in fs/buffer.c::__block_prepare_write()
Anton Altaparmakov [Thu, 23 Jun 2005 07:10:21 +0000 (00:10 -0700)] 
[PATCH] Bug in error recovery in fs/buffer.c::__block_prepare_write()

fs/buffer.c::__block_prepare_write() has broken error recovery.  It calls
the get_block() callback with "create = 1" and if that succeeds it
immediately clears buffer_new on the just allocated buffer (which has
buffer_new set).

The bug is that if an error occurs and get_block() returns != 0, we break
from this loop and go into recovery code.  This code has this comment:

/* Error case: */
/*
 * Zero out any newly allocated blocks to avoid exposing stale
 * data.  If BH_New is set, we know that the block was newly
 * allocated in the above loop.
 */

So the intent is obviously good in that it wants to clear just allocated
and hence not zeroed buffers.  However the code recognises allocated
buffers by checking for buffer_new being set.

Unfortunately __block_prepare_write() as discussed above already cleared
buffer_new on all allocated buffers thus no buffers will be cleared during
error recovery and old data will be leaked.

The simplest way I can see to fix this is to make the current recovery code
work by _not_ clearing buffer_new after calling get_block() in
__block_prepare_write().

We cannot safely allow buffer_new buffers to "leak out" of
__block_prepare_write(), thus we simply do a quick loop over the buffers
clearing buffer_new on each of them if it is set just before returning
"success" from __block_prepare_write().

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] remove <linux/xattr_acl.h>
Christoph Hellwig [Thu, 23 Jun 2005 07:10:19 +0000 (00:10 -0700)] 
[PATCH] remove <linux/xattr_acl.h>

This file duplicates <linux/posix_acl_xattr.h>, using slightly different
names.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] acl endianess annotations
Christoph Hellwig [Thu, 23 Jun 2005 07:10:19 +0000 (00:10 -0700)] 
[PATCH] acl endianess annotations

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] use drivers/Kconfig for sparc32
William Lee Irwin III [Thu, 23 Jun 2005 07:10:18 +0000 (00:10 -0700)] 
[PATCH] use drivers/Kconfig for sparc32

Kconfig is spitting out massive numbers of errors and so on.  This patch
switches arch/sparc/Kconfig to use drivers/Kconfig so those stop.

Signed-off-by: William Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Remove f_error field from struct file
Christoph Lameter [Thu, 23 Jun 2005 07:10:17 +0000 (00:10 -0700)] 
[PATCH] Remove f_error field from struct file

The following patch removes the f_error field and all checks of f_error.

Trond said:

  f_error was introduced for NFS, and made sense when we were guaranteed
  always to have a file pointer around when write errors occurred.  Since
  then, we have (for various reasons) had to introduce the nfs_open_context in
  order to track the file read/write state, and it made sense to move our
  f_error tracking there too.

Signed-off-by: Christoph Lameter <christoph@lameter.com>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] PCDP: handle tables that don't supply baud rate
Bjorn Helgaas [Thu, 23 Jun 2005 07:10:16 +0000 (00:10 -0700)] 
[PATCH] PCDP: handle tables that don't supply baud rate

The HCDP specs (i.e., PCDP revision < 3) allow zero as a default value for
baud rate and data bits.  So if firmware doesn't supply them, let
early_serial_console_init() probe for them rather than telling it the baud
rate is zero.

Also, update the URL for the PCDP spec.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] block: add unlocked_ioctl support for block devices
Arnd Bergmann [Thu, 23 Jun 2005 07:10:15 +0000 (00:10 -0700)] 
[PATCH] block: add unlocked_ioctl support for block devices

This patch allows block device drivers to convert their ioctl functions to
unlocked_ioctl() like character devices and other subsystems.  All
functions that were called with the BKL held before are still used that
way, but I would not be surprised if it could be removed from the ioctl
functions in drivers/block/ioctl.c themselves.

As a side note, I found that compat_blkdev_ioctl() acquires the BKL as
well, which looks like a bug.  I have checked that every user of
disk->fops->compat_ioctl() in the current git tree gets the BKL itself, so
it could easily be removed from compat_blkdev_ioctl().

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] compat: introduce compat_time_t
Stephen Rothwell [Thu, 23 Jun 2005 07:10:14 +0000 (00:10 -0700)] 
[PATCH] compat: introduce compat_time_t

This patch is based on work by Carlos O'Donell and Matthew Wilcox.  It
introduces/updates the compat_time_t type and uses it for compat siginfo
structures.  I have built this on ppc64 and x86_64.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] yenta TI: turn off interrupts during card power-on #2
Daniel Ritz [Thu, 23 Jun 2005 07:10:12 +0000 (00:10 -0700)] 
[PATCH] yenta TI: turn off interrupts during card power-on #2

- make boot-up card recognition more reliable (ie.  redo interrogation
  always if there is no valid 'card inserted' state) (and yes, i saw it
  happening on an o2micro controller that both CB_CBARD and CB_16BITCARD
  bits were set at the same time)

- also redo interrogation before probing the ISA interrupts.  it's safer
  to do the probing with the socket in a clean state.

- make card insert detect more reliable.  yenta_get_status() now returns
  SS_PENDING as long as the card is not completley inserted and one of the
  voltage bits is set.  also !CB_CBARD doesn't mean CB_16BITCARD.  there is
  CB_NOTACARD as well, so make an explicit check for CB_16BITCARD.

- for TI bridges: disable IRQs during power-on.  in all-serial and tied
  interrupt mode the interrupts are always disabled for single-slot
  controllers.  for two-slot contollers the disabling is only done when the
  other slot is empty.  to force disabling there is a new module parameter
  now: pwr_irqs_off=Y (which is a regression for working setups.  that's
  why it's an option, only use when required)

- modparm to disable ISA interrupt probing (isa_probe, defaults to on)

- remove unneeded code/cleanups (ie.  merge yenta_events() into
  yenta_interrupts())

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Add offset.h to dontdiff
Michal Schmidt [Thu, 23 Jun 2005 07:10:09 +0000 (00:10 -0700)] 
[PATCH] Add offset.h to dontdiff

include/asm/offset.h is a generated file on x86_64 and mips.  Let's add it
to Documentation/dontdiff.

Signed-off-by: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Potential null pointer dereference in amiga serial driver
TINNES Julien RD-MAPS-ISS [Thu, 23 Jun 2005 07:10:08 +0000 (00:10 -0700)] 
[PATCH] Potential null pointer dereference in amiga serial driver

A pointer is dereferenced before it is null-checked.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] gconfig: only show scrollbars if needed
Thierry Vignaud [Thu, 23 Jun 2005 07:10:07 +0000 (00:10 -0700)] 
[PATCH] gconfig: only show scrollbars if needed

gconfig: only show scrollbars if needed (which is more user friendly):

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ipcsem: remove superflous decrease variable from sys_semtimedop
Manfred Spraul [Thu, 23 Jun 2005 07:10:06 +0000 (00:10 -0700)] 
[PATCH] ipcsem: remove superflous decrease variable from sys_semtimedop

Patrick noticed that the initial scan of the semaphore operations logs
decrease and increase operations seperately, but then both cases are or'ed
together and decrease is never used.  The attached patch removes the
decrease parameter - it shrinks sys_semtimedop() by 56 bytes.

Signed-Of-By: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Turn off sibling call optimization w/ frame pointers
Matthias Urlichs [Thu, 23 Jun 2005 07:10:05 +0000 (00:10 -0700)] 
[PATCH] Turn off sibling call optimization w/ frame pointers

Frame pointers are supposed to enable debuggers to reliably tell where a
call comes from.  That is defeated by GCC's sibling call optimization (aka
tail recursion elimination).

This patch turns this optimization off when compiling with frame pointers.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Optimize sys_times for a single thread process
Christoph Lameter [Thu, 23 Jun 2005 07:10:05 +0000 (00:10 -0700)] 
[PATCH] Optimize sys_times for a single thread process

Avoid taking the tasklist_lock in sys_times if the process is single
threaded.  In a NUMA system taking the tasklist_lock may cause a bouncing
cacheline if multiple independent processes continually call sys_times to
measure their performance.

Signed-off-by: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Remove eventpoll macro obfuscation
Pekka Enberg [Thu, 23 Jun 2005 07:10:03 +0000 (00:10 -0700)] 
[PATCH] Remove eventpoll macro obfuscation

This patch gets rid of some macro obfuscation from fs/eventpoll.c by
removing slab allocator wrappers and converting macros to static inline
functions.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Improve CD/DVD packet driver write performance
Peter Osterlund [Thu, 23 Jun 2005 07:10:02 +0000 (00:10 -0700)] 
[PATCH] Improve CD/DVD packet driver write performance

This patch improves write performance for the CD/DVD packet writing driver.
 The logic for switching between reading and writing has been changed so
that streaming writes are no longer interrupted by read requests.

Signed-off-by: Peter Osterlund <petero2@telia.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] factor out common code in sys_fsync/sys_fdatasync
Oleg Nesterov [Thu, 23 Jun 2005 07:10:02 +0000 (00:10 -0700)] 
[PATCH] factor out common code in sys_fsync/sys_fdatasync

This patch consolidates sys_fsync and sys_fdatasync.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] mempool - only init waitqueue in slow path
Benjamin LaHaise [Thu, 23 Jun 2005 07:10:01 +0000 (00:10 -0700)] 
[PATCH] mempool - only init waitqueue in slow path

Here's a small patch to improve the performance of mempool_alloc by only
initializing the wait queue when we're about to wait.

Signed-off-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] apply quotation handling to Makefile.build
Jan Beulich [Thu, 23 Jun 2005 07:10:00 +0000 (00:10 -0700)] 
[PATCH] apply quotation handling to Makefile.build

Adding quotation handling to rule_cc_o_c in scripts/Makefile.build as used
elsewhere.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] adjust per_cpu definition in non-SMP case
Jan Beulich [Thu, 23 Jun 2005 07:09:59 +0000 (00:09 -0700)] 
[PATCH] adjust per_cpu definition in non-SMP case

Fix (in the architectures I'm actually building for) the UP definition of
per_cpu so that the cpu specified may be any expression, not just an
identifier or a suffix expression.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ide-floppy adjustments
Jan Beulich [Thu, 23 Jun 2005 07:09:59 +0000 (00:09 -0700)] 
[PATCH] ide-floppy adjustments

Fix a build problem when IDEFLOPPY_DEBUG_BUGS is turned off, and eliminate an
access to memory that is no longer allocated (causing systems to fail booting
when CONFIG_DEBUG_PAGEALLOC is turned on).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Don't force O_LARGEFILE for 32 bit processes on ia64
Yoav Zach [Thu, 23 Jun 2005 07:09:58 +0000 (00:09 -0700)] 
[PATCH] Don't force O_LARGEFILE for 32 bit processes on ia64

In ia64 kernel, the O_LARGEFILE flag is forced when opening a file.  This
is problematic for execution of 32 bit processes, which are not largefile
aware, either by SW emulation or by HW execution.

For such processes, the problem is two-fold:

1) When trying to open a file that is larger than 4G
   the operation should fail, but it's not
2) Writing to offset larger than 4G should fail, but
   it's not

The proposed patch takes advantage of the way 32 bit processes are
identified in ia64 systems.  Such processes have PER_LINUX32 for their
personality.  With the patch, the ia64 kernel will not enforce the
O_LARGEFILE flag if the current process has PER_LINUX32 set.  The behavior
for all other architectures remains unchanged.

Signed-off-by: Yoav Zach <yoav.zach@intel.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] parport: NetMos nm9855 fix
Martin Schitter [Thu, 23 Jun 2005 07:09:55 +0000 (00:09 -0700)] 
[PATCH] parport: NetMos nm9855 fix

kernel 2.6.12-rc2 adopted some code by Bjorn Helgaas supporting NetMos combo
controller cards. this implementation doesn't work for nm9855 based cards!

there are two reasons:

a) the module 'parport_pc' doesn't want to give the resonsibility for
   the netmos_9855 to 'parport_serial' and can not handle the serial lines
   -- trivial to fix...

   http://lists.infradead.org/pipermail/linux-parport/2005-February/000250.html
   http://lkml.org/lkml/2005/3/24/199 b) the support for the nm9855 in

   'parport_serial' still doesn't work because of wrong assumptions about
   the relevant BARs port address layout for this chip:

 0000:00:09.0 Communication controller:
                NetMos Technology PCI 9855
                Multi-I/O Controller (rev 01)
        (= 9710:9855)
         Subsystem: LSI Logic / Symbios Logic 1P4S (= 1000:0014)
    Flags: medium devsel, IRQ 177
 I/O ports at a800 [size=8]  (= parport)
 I/O ports at a400 [size=8]
 I/O ports at a000 [size=8]  (= serial)
 I/O ports at 9800 [size=8]  (= serial)
 I/O ports at 9400 [size=8]  (= serial)
 I/O ports at 9000 [size=16] (= serial)

the following patch will fix the problem.

Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Altix: shut off xmit intr if done xmitting
Pat Gefre [Thu, 23 Jun 2005 07:09:54 +0000 (00:09 -0700)] 
[PATCH] Altix: shut off xmit intr if done xmitting

Small mod to shut off the xmit interrupt if we have nothing to transmit.

Signed-off-by: Patrick Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] O(1) sb list traversing on syncs
Kirill Korotaev [Thu, 23 Jun 2005 07:09:54 +0000 (00:09 -0700)] 
[PATCH] O(1) sb list traversing on syncs

This patch removes O(n^2) super block loops in sync_inodes(),
sync_filesystems() etc.  in favour of using __put_super_and_need_restart()
which I introduced earlier.  We faced a noticably long freezes on sb
syncing when there are thousands of super blocks in the system.

Signed-Off-By: Kirill Korotaev <dev@sw.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Software suspend and recalc sigpending bug fix
Kirill Korotaev [Thu, 23 Jun 2005 07:09:51 +0000 (00:09 -0700)] 
[PATCH] Software suspend and recalc sigpending bug fix

This patch fixes recalc_sigpending() to work correctly with tasks which are
being freezed.

The problem is that freeze_processes() sets PF_FREEZE and TIF_SIGPENDING
flags on tasks, but recalc_sigpending() called from e.g.
sys_rt_sigtimedwait or any other kernel place will clear TIF_SIGPENDING due
to no pending signals queued and the tasks won't be freezed until it
recieves a real signal or freezed_processes() fail due to timeout.

Signed-Off-By: Kirill Korotaev <dev@sw.ru>
Signed-Off-By: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Fix of bogus file max limit messages
Kirill Korotaev [Thu, 23 Jun 2005 07:09:50 +0000 (00:09 -0700)] 
[PATCH] Fix of bogus file max limit messages

This patch fixes incorrect and bogus kernel messages that file-max limit
reached when the allocation fails

Signed-Off-By: Kirill Korotaev <dev@sw.ru>
Signed-Off-By: Denis Lunev <den@sw.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] add some comments to lookup_create()
Christoph Hellwig [Thu, 23 Jun 2005 07:09:49 +0000 (00:09 -0700)] 
[PATCH] add some comments to lookup_create()

In a duplicate of lookup_create in the af_unix code Al commented what's
going on nicely, so let's bring that over to lookup_create before the copy
is going away (I'll send a patch soon)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Document the fact that linux-arm-kernel is subscribers-only.
Alexey Dobriyan [Thu, 23 Jun 2005 07:09:47 +0000 (00:09 -0700)] 
[PATCH] Document the fact that linux-arm-kernel is subscribers-only.

"Non-members are not allowed to post messages to this list.  Blame the
original poster for cross-posting to subscriber-only mailing lists.  "

Signed-off-by: Alexey Dobriyan <adobriyan@mail.ru>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Support for dx directories in ext3_get_parent (NFSD)
Andreas Dilger [Thu, 23 Jun 2005 07:09:45 +0000 (00:09 -0700)] 
[PATCH] Support for dx directories in ext3_get_parent (NFSD)

Henrik Grubbstrom noted:

The 2.6.10 ext3_get_parent attempts to use ext3_find_entry to look up the
entry "..", which fails for dx directories since ".." is not present in the
directory hash table.  The patch below solves this by looking up the dotdot
entry in the dx_root block.

Typical symptoms of the above bug are intermittent claims by nfsd that
files or directories are missing on exported ext3 filesystems.

cf https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=3D150759 and
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=3D144556

ext3_get_parent() is IMHO the wrong place to fix this bug as it introduces
a lot of internals from htree into that function.  Instead, I think this
should be fixed in ext3_find_entry() as in the below patch.  This has the
added advantage that it works for any callers of ext3_find_entry() and not
just ext3_lookup_parent().

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Henrik Grubbstrom <grubba@grubba.org>
Cc: <ext2-devel@lists.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] setuid core dump
Alan Cox [Thu, 23 Jun 2005 07:09:43 +0000 (00:09 -0700)] 
[PATCH] setuid core dump

Add a new `suid_dumpable' sysctl:

This value can be used to query and set the core dump mode for setuid
or otherwise protected/tainted binaries. The modes are

0 - (default) - traditional behaviour.  Any process which has changed
    privilege levels or is execute only will not be dumped

1 - (debug) - all processes dump core when possible.  The core dump is
    owned by the current user and no security is applied.  This is intended
    for system debugging situations only.  Ptrace is unchecked.

2 - (suidsafe) - any binary which normally would not be dumped is dumped
    readable by root only.  This allows the end user to remove such a dump but
    not access it directly.  For security reasons core dumps in this mode will
    not overwrite one another or other files.  This mode is appropriate when
    adminstrators are attempting to debug problems in a normal environment.

(akpm:

> > +EXPORT_SYMBOL(suid_dumpable);
>
> EXPORT_SYMBOL_GPL?

No problem to me.

> >   if (current->euid == current->uid && current->egid == current->gid)
> >   current->mm->dumpable = 1;
>
> Should this be SUID_DUMP_USER?

Actually the feedback I had from last time was that the SUID_ defines
should go because its clearer to follow the numbers. They can go
everywhere (and there are lots of places where dumpable is tested/used
as a bool in untouched code)

> Maybe this should be renamed to `dump_policy' or something.  Doing that
> would help us catch any code which isn't using the #defines, too.

Fair comment. The patch was designed to be easy to maintain for Red Hat
rather than for merging. Changing that field would create a gigantic
diff because it is used all over the place.

)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] jprobes: allow a jprobe to coexist with muliple kprobes
Prasanna S Panchamukhi [Thu, 23 Jun 2005 07:09:41 +0000 (00:09 -0700)] 
[PATCH] jprobes: allow a jprobe to coexist with muliple kprobes

Presently either multiple kprobes or only one jprobe could be inserted.
This patch removes the above limitation and allows one jprobe and multiple
kprobes to coexist at the same address.  However multiple jprobes cannot
coexist with multiple kprobes.  Currently I am working on the prototype to
allow multiple jprobes coexist with multiple kprobes.

Signed-off-by: Ananth N Mavinakayanhalli <amavin@redhat.com>
Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Kprobes/ia64: temporary disarming of reentrant probe
Anil S Keshavamurthy [Thu, 23 Jun 2005 07:09:40 +0000 (00:09 -0700)] 
[PATCH] Kprobes/ia64: temporary disarming of reentrant probe

This patch includes IA64 architecture specific changes(ported form i386) to
support temporary disarming on reentrancy of probes.

In case of reentrancy we single step without calling user handler.

Signed-of-by: Anil S Keshavamurth <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] kprobes: Temporary disarming of reentrant probe for sparc64
Prasanna S Panchamukhi [Thu, 23 Jun 2005 07:09:39 +0000 (00:09 -0700)] 
[PATCH] kprobes: Temporary disarming of reentrant probe for sparc64

This patch includes sparc64 architecture specific changes to support temporary
disarming on reentrancy of probes.

Signed-of-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] kprobes: Temporary disarming of reentrant probe for ppc64
Prasanna S Panchamukhi [Thu, 23 Jun 2005 07:09:38 +0000 (00:09 -0700)] 
[PATCH] kprobes: Temporary disarming of reentrant probe for ppc64

This patch includes ppc64 architecture specific changes to support temporary
disarming on reentrancy of probes.

Signed-of-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] kprobes: Temporary disarming of reentrant probe for x86_64
Prasanna S Panchamukhi [Thu, 23 Jun 2005 07:09:37 +0000 (00:09 -0700)] 
[PATCH] kprobes: Temporary disarming of reentrant probe for x86_64

This patch includes x86_64 architecture specific changes to support temporary
disarming on reentrancy of probes.

Signed-of-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] kprobes: Temporary disarming of reentrant probe for i386
Prasanna S Panchamukhi [Thu, 23 Jun 2005 07:09:37 +0000 (00:09 -0700)] 
[PATCH] kprobes: Temporary disarming of reentrant probe for i386

This patch includes i386 architecture specific changes to support temporary
disarming on reentrancy of probes.

Signed-of-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] kprobes: Temporary disarming of reentrant probe
Prasanna S Panchamukhi [Thu, 23 Jun 2005 07:09:36 +0000 (00:09 -0700)] 
[PATCH] kprobes: Temporary disarming of reentrant probe

In situations where a kprobes handler calls a routine which has a probe on it,
then kprobes_handler() disarms the new probe forever.  This patch removes the
above limitation by temporarily disarming the new probe.  When the another
probe hits while handling the old probe, the kprobes_handler() saves previous
kprobes state and handles the new probe without calling the new kprobes
registered handlers.  kprobe_post_handler() restores back the previous kprobes
state and the normal execution continues.

However on x86_64 architecture, re-rentrancy is provided only through
pre_handler().  If a routine having probe is referenced through
post_handler(), then the probes on that routine are disarmed forever, since
the exception stack is gets changed after the processor single steps the
instruction of the new probe.

This patch includes generic changes to support temporary disarming on
reentrancy of probes.

Signed-of-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Kprobes/IA64: check jprobe break before handling
Keshavamurthy Anil S [Thu, 23 Jun 2005 07:09:35 +0000 (00:09 -0700)] 
[PATCH] Kprobes/IA64: check jprobe break before handling

Once the jprobe instrumented function returns, it executes a jprobe_break
which is a break instruction with __IA64_JPROBE_BREAK value.  The current
patch checks for this break value, before assuming that jprobe instrumented
function just completed.

The previous code was not checking for this value and that was a bug.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Kprobes IA64: safe register kprobe
Anil S Keshavamurthy [Thu, 23 Jun 2005 07:09:34 +0000 (00:09 -0700)] 
[PATCH] Kprobes IA64: safe register kprobe

The current kprobes does not yet handle register kprobes on some of the
following kind of instruction which needs to be emulated in a special way.

1) mov r1=ip
2) chk -- Speculation check instruction

This patch attempts to fail register_kprobes() when user tries to insert
kprobes on the above kind of instruction.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Kprobes IA64: cmp ctype unc support
Anil S Keshavamurthy [Thu, 23 Jun 2005 07:09:33 +0000 (00:09 -0700)] 
[PATCH] Kprobes IA64: cmp ctype unc support

The current Kprobes when patching the original instruction with the break
instruction tries to retain the original qualifying predicate(qp), however
for cmp.crel.ctype where ctype == unc, which is a special instruction
always needs to be executed irrespective of qp.  Hence, if the instruction
we are patching is of this type, then we should not copy the original qp to
the break instruction, this is because we always want the break fault to
happen so that we can emulate the instruction.

This patch is based on the feedback given by David Mosberger

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Kprobes IA64: arch_prepare_kprobes() cleanup
Anil S Keshavamurthy [Thu, 23 Jun 2005 07:09:32 +0000 (00:09 -0700)] 
[PATCH] Kprobes IA64: arch_prepare_kprobes() cleanup

arch_prepare_kprobes() was doing lots of functionality
in just one single function. This patch
attempts to clean up arch_prepare_kprobes() by moving
specific sub task to the following (new)functions
1)valid_kprobe_addr() -->> validate the given kprobe address
2)get_kprobe_inst(slot..)->> Retrives the instruction for a given slot from the bundle
3)prepare_break_inst() -->> Prepares break instruction within the bundle
3a)update_kprobe_inst_flag()-->>Updates the internal flags, required
for proper emulation of the instruction at later
point in time.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Kprobes ia64 qp fix
Rusty Lynch [Thu, 23 Jun 2005 07:09:31 +0000 (00:09 -0700)] 
[PATCH] Kprobes ia64 qp fix

Fix a bug where a kprobe still fires when the instruction is predicated
off.  So given the p6=0, and we have an instruction like:

(p6) move loc1=0

we should not be triggering the kprobe.  This is handled by carrying over
the qp section of the original instruction into the break instruction.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Rusty Lynch <Rusty.lynch@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Kprobes ia64 cleanup
Rusty Lynch [Thu, 23 Jun 2005 07:09:30 +0000 (00:09 -0700)] 
[PATCH] Kprobes ia64 cleanup

A cleanup of the ia64 kprobes implementation such that all of the bundle
manipulation logic is concentrated in arch_prepare_kprobe().

With the current design for kprobes, the arch specific code only has a
chance to return failure inside the arch_prepare_kprobe() function.

This patch moves all of the work that was happening in arch_copy_kprobe()
and most of the work that was happening in arch_arm_kprobe() into
arch_prepare_kprobe().  By doing this we can add further robustness checks
in arch_arm_kprobe() and refuse to insert kprobes that will cause problems.

Signed-off-by: Rusty Lynch <Rusty.lynch@intel.com>
Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Kprobes/IA64: support kprobe on branch/call instructions
Anil S Keshavamurthy [Thu, 23 Jun 2005 07:09:29 +0000 (00:09 -0700)] 
[PATCH] Kprobes/IA64: support kprobe on branch/call instructions

This patch is required to support kprobe on branch/call instructions.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Kprobes/IA64: architecture specific JProbes support
Anil S Keshavamurthy [Thu, 23 Jun 2005 07:09:28 +0000 (00:09 -0700)] 
[PATCH] Kprobes/IA64: architecture specific JProbes support

This patch adds IA64 architecture specific JProbes support on top of Kprobes

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Rusty Lynch <Rusty.lynch@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Kprobes/IA64: arch specific handling
Anil S Keshavamurthy [Thu, 23 Jun 2005 07:09:28 +0000 (00:09 -0700)] 
[PATCH] Kprobes/IA64: arch specific handling

This is an IA64 arch specific handling of Kprobes

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Rusty Lynch <Rusty.lynch@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Kprobes/IA64: kdebug die notification mechanism
Anil S Keshavamurthy [Thu, 23 Jun 2005 07:09:27 +0000 (00:09 -0700)] 
[PATCH] Kprobes/IA64: kdebug die notification mechanism

As many of you know that kprobes exist in the main line kernel for various
architecture including i386, x86_64, ppc64 and sparc64.  Attached patches
following this mail are a port of Kprobes and Jprobes for IA64.

I have tesed this patches for kprobes and Jprobes and this seems to work fine.
 I have tested this patch by inserting kprobes on various slots and various
templates including various types of branch instructions.

I have also tested this patch using the tool
http://marc.theaimsgroup.com/?l=linux-kernel&m=111657358022586&w=2 and the
kprobes for IA64 works great.

Here is list of TODO things and pathes for the same will appear soon.

1) Support kprobes on "mov r1=ip" type of instruction
2) Support Kprobes and Jprobes to exist on the same address
3) Support Return probes
3) Architecture independent cleanup of kprobes

This patch adds the kdebug die notification mechanism needed by Kprobes.

For break instruction on Branch type slot, imm21 is ignored and value
zero is placed in IIM register, hence we need to handle kprobes
for switch case zero.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Rusty Lynch <Rusty.lynch@intel.com>
From: Rusty Lynch <rusty.lynch@intel.com>

At the point in traps.c where we recieve a break with a zero value, we can
not say if the break was a result of a kprobe or some other debug facility.

This simple patch changes the informational string to a more correct "break
0" value, and applies to the 2.6.12-rc2-mm2 tree with all the kprobes
patches that were just recently included for the next mm cut.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] kprobes: moves lock-unlock to non-arch kprobe_flush_task
Hien Nguyen [Thu, 23 Jun 2005 07:09:26 +0000 (00:09 -0700)] 
[PATCH] kprobes: moves lock-unlock to non-arch kprobe_flush_task

This patch moves the lock/unlock of the arch specific kprobe_flush_task()
to the non-arch specific kprobe_flusk_task().

Signed-off-by: Hien Nguyen <hien@us.ibm.com>
Acked-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Move kprobe [dis]arming into arch specific code
Rusty Lynch [Thu, 23 Jun 2005 07:09:25 +0000 (00:09 -0700)] 
[PATCH] Move kprobe [dis]arming into arch specific code

The architecture independent code of the current kprobes implementation is
arming and disarming kprobes at registration time.  The problem is that the
code is assuming that arming and disarming is a just done by a simple write
of some magic value to an address.  This is problematic for ia64 where our
instructions look more like structures, and we can not insert break points
by just doing something like:

*p->addr = BREAKPOINT_INSTRUCTION;

The following patch to 2.6.12-rc4-mm2 adds two new architecture dependent
functions:

     * void arch_arm_kprobe(struct kprobe *p)
     * void arch_disarm_kprobe(struct kprobe *p)

and then adds the new functions for each of the architectures that already
implement kprobes (spar64/ppc64/i386/x86_64).

I thought arch_[dis]arm_kprobe was the most descriptive of what was really
happening, but each of the architectures already had a disarm_kprobe()
function that was really a "disarm and do some other clean-up items as
needed when you stumble across a recursive kprobe." So...  I took the
liberty of changing the code that was calling disarm_kprobe() to call
arch_disarm_kprobe(), and then do the cleanup in the block of code dealing
with the recursive kprobe case.

So far this patch as been tested on i386, x86_64, and ppc64, but still
needs to be tested in sparc64.

Signed-off-by: Rusty Lynch <rusty.lynch@intel.com>
Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] x86_64 specific function return probes
Rusty Lynch [Thu, 23 Jun 2005 07:09:23 +0000 (00:09 -0700)] 
[PATCH] x86_64 specific function return probes

The following patch adds the x86_64 architecture specific implementation
for function return probes.

Function return probes is a mechanism built on top of kprobes that allows
a caller to register a handler to be called when a given function exits.
For example, to instrument the return path of sys_mkdir:

static int sys_mkdir_exit(struct kretprobe_instance *i, struct pt_regs *regs)
{
printk("sys_mkdir exited\n");
return 0;
}
static struct kretprobe return_probe = {
.handler = sys_mkdir_exit,
};

<inside setup function>

return_probe.kp.addr = (kprobe_opcode_t *) kallsyms_lookup_name("sys_mkdir");
if (register_kretprobe(&return_probe)) {
printk(KERN_DEBUG "Unable to register return probe!\n");
/* do error path */
}

<inside cleanup function>
unregister_kretprobe(&return_probe);

The way this works is that:

* At system initialization time, kernel/kprobes.c installs a kprobe
  on a function called kretprobe_trampoline() that is implemented in
  the arch/x86_64/kernel/kprobes.c  (More on this later)

* When a return probe is registered using register_kretprobe(),
  kernel/kprobes.c will install a kprobe on the first instruction of the
  targeted function with the pre handler set to arch_prepare_kretprobe()
  which is implemented in arch/x86_64/kernel/kprobes.c.

* arch_prepare_kretprobe() will prepare a kretprobe instance that stores:
  - nodes for hanging this instance in an empty or free list
  - a pointer to the return probe
  - the original return address
  - a pointer to the stack address

  With all this stowed away, arch_prepare_kretprobe() then sets the return
  address for the targeted function to a special trampoline function called
  kretprobe_trampoline() implemented in arch/x86_64/kernel/kprobes.c

* The kprobe completes as normal, with control passing back to the target
  function that executes as normal, and eventually returns to our trampoline
  function.

* Since a kprobe was installed on kretprobe_trampoline() during system
  initialization, control passes back to kprobes via the architecture
  specific function trampoline_probe_handler() which will lookup the
  instance in an hlist maintained by kernel/kprobes.c, and then call
  the handler function.

* When trampoline_probe_handler() is done, the kprobes infrastructure
  single steps the original instruction (in this case just a top), and
  then calls trampoline_post_handler().  trampoline_post_handler() then
  looks up the instance again, puts the instance back on the free list,
  and then makes a long jump back to the original return instruction.

So to recap, to instrument the exit path of a function this implementation
will cause four interruptions:

  - A breakpoint at the very beginning of the function allowing us to
    switch out the return address
  - A single step interruption to execute the original instruction that
    we replaced with the break instruction (normal kprobe flow)
  - A breakpoint in the trampoline function where our instrumented function
    returned to
  - A single step interruption to execute the original instruction that
    we replaced with the break instruction (normal kprobe flow)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] kprobes: function-return probes
Hien Nguyen [Thu, 23 Jun 2005 07:09:19 +0000 (00:09 -0700)] 
[PATCH] kprobes: function-return probes

This patch adds function-return probes to kprobes for the i386
architecture.  This enables you to establish a handler to be run when a
function returns.

1. API

Two new functions are added to kprobes:

int register_kretprobe(struct kretprobe *rp);
void unregister_kretprobe(struct kretprobe *rp);

2. Registration and unregistration

2.1 Register

  To register a function-return probe, the user populates the following
  fields in a kretprobe object and calls register_kretprobe() with the
  kretprobe address as an argument:

  kp.addr - the function's address

  handler - this function is run after the ret instruction executes, but
  before control returns to the return address in the caller.

  maxactive - The maximum number of instances of the probed function that
  can be active concurrently.  For example, if the function is non-
  recursive and is called with a spinlock or mutex held, maxactive = 1
  should be enough.  If the function is non-recursive and can never
  relinquish the CPU (e.g., via a semaphore or preemption), NR_CPUS should
  be enough.  maxactive is used to determine how many kretprobe_instance
  objects to allocate for this particular probed function.  If maxactive <=
  0, it is set to a default value (if CONFIG_PREEMPT maxactive=max(10, 2 *
  NR_CPUS) else maxactive=NR_CPUS)

  For example:

    struct kretprobe rp;
    rp.kp.addr = /* entrypoint address */
    rp.handler = /*return probe handler */
    rp.maxactive = /* e.g., 1 or NR_CPUS or 0, see the above explanation */
    register_kretprobe(&rp);

  The following field may also be of interest:

  nmissed - Initialized to zero when the function-return probe is
  registered, and incremented every time the probed function is entered but
  there is no kretprobe_instance object available for establishing the
  function-return probe (i.e., because maxactive was set too low).

2.2 Unregister

  To unregiter a function-return probe, the user calls
  unregister_kretprobe() with the same kretprobe object as registered
  previously.  If a probed function is running when the return probe is
  unregistered, the function will return as expected, but the handler won't
  be run.

3. Limitations

3.1 This patch supports only the i386 architecture, but patches for
    x86_64 and ppc64 are anticipated soon.

3.2 Return probes operates by replacing the return address in the stack
    (or in a known register, such as the lr register for ppc).  This may
    cause __builtin_return_address(0), when invoked from the return-probed
    function, to return the address of the return-probes trampoline.

3.3 This implementation uses the "Multiprobes at an address" feature in
    2.6.12-rc3-mm3.

3.4 Due to a limitation in multi-probes, you cannot currently establish
    a return probe and a jprobe on the same function.  A patch to remove
    this limitation is being tested.

This feature is required by SystemTap (http://sourceware.org/systemtap),
and reflects ideas contributed by several SystemTap developers, including
Will Cohen and Ananth Mavinakayanahalli.

Signed-off-by: Hien Nguyen <hien@us.ibm.com>
Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Frederik Deweerdt <frederik.deweerdt@laposte.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] quota: sanitize dentry handling in vfs_quota_on_mount
Christoph Hellwig [Thu, 23 Jun 2005 07:09:16 +0000 (00:09 -0700)] 
[PATCH] quota: sanitize dentry handling in vfs_quota_on_mount

Use lookup_one_len instead of opencoding a simplified lookup using
lookup_hash with a fake hash.

Also there's no need anymore for the d_invalidate as we have a completely
valid dentry now.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] quota: consolidate code surrounding vfs_quota_on_mount
Christoph Hellwig [Thu, 23 Jun 2005 07:09:16 +0000 (00:09 -0700)] 
[PATCH] quota: consolidate code surrounding vfs_quota_on_mount

Move some code duplicated in both callers into vfs_quota_on_mount

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jan Kara <jack@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] avoid resursive oopses
Alexander Nyberg [Thu, 23 Jun 2005 07:09:13 +0000 (00:09 -0700)] 
[PATCH] avoid resursive oopses

Prevent recursive faults in do_exit() by leaving the task alone and wait
for reboot.  This may allow a more graceful shutdown and possibly save the
original oops.

Signed-off-by: Alexander Nyberg <alexn@telia.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] remove duplicate get_dentry functions in various places
Christoph Hellwig [Thu, 23 Jun 2005 07:09:12 +0000 (00:09 -0700)] 
[PATCH] remove duplicate get_dentry functions in various places

Various filesystem drivers have grown a get_dentry() function that's a
duplicate of lookup_one_len, except that it doesn't take a maximum length
argument and doesn't check for \0 or / in the passed in filename.

Switch all these places to use lookup_one_len.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Greg KH <greg@kroah.com>
Cc: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] add check to /proc/devices read routines
Neil Horman [Thu, 23 Jun 2005 07:09:11 +0000 (00:09 -0700)] 
[PATCH] add check to /proc/devices read routines

Patch to add check to get_chrdev_list and get_blkdev_list to prevent reads
of /proc/devices from spilling over the provided page if more than 4096
bytes of string data are generated from all the registered character and
block devices in a system

Signed-off-by: Neil Horman <nhorman@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] remove redundant vm_flags clearing from madvise.c
Pekka Enberg [Thu, 23 Jun 2005 07:09:09 +0000 (00:09 -0700)] 
[PATCH] remove redundant vm_flags clearing from madvise.c

This patch removes redundant VM_ClearReadHint from mm/madvice.c which was
left there by Prasanna's patch.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] preempt_count is int - remove cast and don't assign to unsigned type
Jesper Juhl [Thu, 23 Jun 2005 07:09:09 +0000 (00:09 -0700)] 
[PATCH] preempt_count is int - remove cast and don't assign to unsigned type

In kernel/sched.c the return value from preempt_count() is cast to an int.
That made sense when preempt_count was defined as different types on is not
needed and should go away.  The patch removes the cast.

In kernel/timer.c the return value from preempt_count() is assigned to a
variable of type u32 and then that unsigned value is later compared to
preempt_count().  Since preempt_count() returns an int, an int is what
should be used to store its return value.  Storing the result in an
unsigned 32bit integer made a tiny bit of sense back when preempt_count was
different types on different archs, but no more - let's not play signed vs
unsigned comparison games when we don't have to.  The patch modifies the
code to use an int to hold the value.  While I was around that bit of code
I also made two changes to a nearby (related) printk() - I modified it to
specify the loglevel explicitly and also broke the line into a few pieces
to avoid it being longer than 80 chars and clarified the text a bit.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] streamline preempt_count type across archs
Jesper Juhl [Thu, 23 Jun 2005 07:09:07 +0000 (00:09 -0700)] 
[PATCH] streamline preempt_count type across archs

The preempt_count member of struct thread_info is currently either defined
as int, unsigned int or __s32 depending on arch.  This patch makes the type
of preempt_count an int on all archs.

Having preempt_count be an unsigned type prevents the catching of
preempt_count < 0 bugs, and using int on some archs and __s32 on others is
not exactely "neat" - much nicer when it's just int all over.

A previous version of this patch was already ACK'ed by Robert Love, and the
only change in this version of the patch compared to the one he ACK'ed is
that this one also makes sure the preempt_count member is consistently
commented.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] optimise loop driver a bit
Nick Piggin [Thu, 23 Jun 2005 07:09:06 +0000 (00:09 -0700)] 
[PATCH] optimise loop driver a bit

Looks like locking can be optimised quite a lot.  Increase lock widths
slightly so lo_lock is taken fewer times per request.  Also it was quite
trivial to cover lo_pending with that lock, and remove the atomic
requirement.  This also makes memory ordering explicitly correct, which is
nice (not that I particularly saw any mem ordering bugs).

Test was reading 4 250MB files in parallel on ext2-on-tmpfs filesystem (1K
block size, 4K page size).  System is 2 socket Xeon with HT (4 thread).

intel:/home/npiggin# umount /dev/loop0 ; mount /dev/loop0 /mnt/loop ; /usr/bin/time ./mtloop.sh

Before:
0.24user 5.51system 0:02.84elapsed 202%CPU (0avgtext+0avgdata 0maxresident)k
0.19user 5.52system 0:02.88elapsed 198%CPU (0avgtext+0avgdata 0maxresident)k
0.19user 5.57system 0:02.89elapsed 198%CPU (0avgtext+0avgdata 0maxresident)k
0.22user 5.51system 0:02.90elapsed 197%CPU (0avgtext+0avgdata 0maxresident)k
0.19user 5.44system 0:02.91elapsed 193%CPU (0avgtext+0avgdata 0maxresident)k

After:
0.07user 2.34system 0:01.68elapsed 143%CPU (0avgtext+0avgdata 0maxresident)k
0.06user 2.37system 0:01.68elapsed 144%CPU (0avgtext+0avgdata 0maxresident)k
0.06user 2.39system 0:01.68elapsed 145%CPU (0avgtext+0avgdata 0maxresident)k
0.06user 2.36system 0:01.68elapsed 144%CPU (0avgtext+0avgdata 0maxresident)k
0.06user 2.42system 0:01.68elapsed 147%CPU (0avgtext+0avgdata 0maxresident)k

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This page took 0.048147 seconds and 5 git commands to generate.