sfrench/cifs-2.6.git
17 years ago[PATCH] proc: Kill proc_mem_inode_operations
Eric W. Biederman [Mon, 26 Jun 2006 07:25:45 +0000 (00:25 -0700)]
[PATCH] proc: Kill proc_mem_inode_operations

The inode operations only exist to support the proc_permission function.
Currently mem_read and mem_write have all the same permission checks as
ptrace.  The fs check makes no sense in this context, and we can trivially get
around it by calling ptrace.

So simply the code by killing the strange weird case.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] proc: Remove bogus proc_task_permission
Eric W. Biederman [Mon, 26 Jun 2006 07:25:45 +0000 (00:25 -0700)]
[PATCH] proc: Remove bogus proc_task_permission

First we can access every /proc/<tgid>/task/<pid> directory as /proc/<pid> so
proc_task_permission is not usefully limiting visibility.

Second having related filesystems information should have nothing to do with
process visibility.  kill does not implement any checks like that.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] proc: Replace proc_inode.type with proc_inode.fd
Eric W. Biederman [Mon, 26 Jun 2006 07:25:44 +0000 (00:25 -0700)]
[PATCH] proc: Replace proc_inode.type with proc_inode.fd

The sole renaming use of proc_inode.type is to discover the file descriptor
number, so just store the file descriptor number and don't wory about
processing this field.  This removes any /proc limits on the maximum number of
file descriptors, and clears the path to make the hard coded /proc inode
numbers go away.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] proc: Simplify the ownership rules for /proc
Eric W. Biederman [Mon, 26 Jun 2006 07:25:43 +0000 (00:25 -0700)]
[PATCH] proc: Simplify the ownership rules for /proc

Currently in /proc if the task is dumpable all of files are owned by the tasks
effective users.  Otherwise the files are owned by root.  Unless it is the
/proc/<tgid>/ or /proc/<tgid>/task/<pid> directory in that case we always make
the directory owned by the effective user.

However the special case for directories is pointless except as a way to read
the effective user, because the permissions on both of those directories are
world readable, and executable.

/proc/<tgid>/status provides a much better way to read a processes effecitve
userid, so it is silly to try to provide that on the directory.

So this patch simplifies the code by removing a pointless special case and
gets us one step closer to being able to remove the hard coded /proc inode
numbers.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] proc: Remove unnecessary and misleading assignments from proc_pid_make_inode
Eric W. Biederman [Mon, 26 Jun 2006 07:25:42 +0000 (00:25 -0700)]
[PATCH] proc: Remove unnecessary and misleading assignments from proc_pid_make_inode

The removed fields are already set by proc_alloc_inode.  Initializing them in
proc_alloc_inode implies they need it for proper cleanup.  At least ei->pde
was not set on all paths making it look like proc_alloc_inode was buggy.  So
just remove the redundant assignments.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] proc: Remove useless BKL in proc_pid_readlink
Eric W. Biederman [Mon, 26 Jun 2006 07:25:42 +0000 (00:25 -0700)]
[PATCH] proc: Remove useless BKL in proc_pid_readlink

We already call everything except do_proc_readlink outside of the BKL in
proc_pid_followlink, and there appears to be nothing in do_proc_readlink that
needs any special protection.

So remove this leftover from one of the BKL cleanup efforts.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] proc: Fix the .. inode number on /proc/<pid>/fd
Eric W. Biederman [Mon, 26 Jun 2006 07:25:40 +0000 (00:25 -0700)]
[PATCH] proc: Fix the .. inode number on /proc/<pid>/fd

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] nfsd kconfig: select things at the closest tristate instead of bool
Herbert Xu [Mon, 26 Jun 2006 07:25:39 +0000 (00:25 -0700)]
[PATCH] nfsd kconfig: select things at the closest tristate instead of bool

I noticed recently that my CONFIG_CRYPTO_MD5 turned into a y again instead
of m.  It turns out that CONFIG_NFSD_V4 is selecting it to be y even though
I've chosen to compile nfsd as a module.

In general when we have a bool sitting under a tristate it is better to
select things you need from the tristate rather than the bool since that
allows the things you select to be modules.

The following patch does it for nfsd.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] i4l: Gigaset drivers: add IOCTLs to compat_ioctl.h
Hansjoerg Lipp [Mon, 26 Jun 2006 07:25:35 +0000 (00:25 -0700)]
[PATCH] i4l: Gigaset drivers: add IOCTLs to compat_ioctl.h

Add the IOCTLs of the Gigaset drivers to compat_ioctl.h in order to make
them available for 32 bit programs on 64 bit platforms.  Please merge.

Signed-off-by: Hansjoerg Lipp <hjlipp@web.de>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Cc: Karsten Keil <kkeil@suse.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] isdn4linux: Gigaset driver cleanup
Tilman Schmidt [Mon, 26 Jun 2006 07:25:34 +0000 (00:25 -0700)]
[PATCH] isdn4linux: Gigaset driver cleanup

The following patch to the common part of the Siemens Gigaset driver
prevents it from trying to send the +++ break sequence if the device has
been disconnected, and removes a couple of assignments which didn't have
any effect.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Hansjoerg Lipp <hjlipp@web.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] isdn4linux: Gigaset base driver: improve error recovery
Tilman Schmidt [Mon, 26 Jun 2006 07:25:33 +0000 (00:25 -0700)]
[PATCH] isdn4linux: Gigaset base driver: improve error recovery

The following patch to the Siemens Gigaset base driver adds graceful
recovery for some frequently encountered error conditions, by retrying
failed control requests (eg.  stalled control pipe), and by closing and
reopening the AT command channel when it appears to be stuck.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Hansjoerg Lipp <hjlipp@web.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Fix typo in drivers/isdn/hisax/q931.c
Eric Sesterhenn [Mon, 26 Jun 2006 07:25:32 +0000 (00:25 -0700)]
[PATCH] Fix typo in drivers/isdn/hisax/q931.c

This fixes coverity bug #517.

Since IESIZE is greater than IESIZE_NI1 we might run past the end of
ielist_ni1.  This fixes it by using the proper IESIZE_NI1 define.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] CAPI crash / race condition
Michael Buesch [Mon, 26 Jun 2006 07:25:30 +0000 (00:25 -0700)]
[PATCH] CAPI crash / race condition

I am getting more or less reproducible crashes from the CAPI subsystem
using the fcdsl driver:

Unable to handle kernel NULL pointer dereference at virtual address 00000010
 printing eip:
c39bbca4
*pde = 00000000
Oops: 0000 [#1]
Modules linked in: netconsole capi capifs 3c59x mii fcdsl kernelcapi uhci_hcd usbcore ide_cd cdrom
CPU:    0
EIP:    0060:[<c39bbca4>]    Tainted: P      VLI
EFLAGS: 00010202   (2.6.16.11 #3)
EIP is at handle_minor_send+0x17a/0x241 [capi]
eax: c24abbc0   ebx: c0b4c980   ecx: 00000010   edx: 00000010
esi: c1679140   edi: c2783016   ebp: 0000c28d   esp: c0327e24
ds: 007b   es: 007b   ss: 0068
Process swapper (pid: 0, threadinfo=c0326000 task=c02e1300)
Stack: <0>000005b4 c1679180 00000000 c28d0000 c1ce04e0 c2f69654 c221604e c1679140
       c39bc19a 00000038 c20c0400 c075c560 c1f2f800 00000000 c01dc9b5 c1e96a40
       c075c560 c2ed64c0 c1e96a40 c01dcd3b c2fb94e8 c075c560 c0327f00 c1e96a40
Call Trace:
 [<c39bc19a>] capinc_tty_write+0xda/0xf3 [capi]
 [<c01dc9b5>] ppp_sync_push+0x52/0xfe
 [<c01dcd3b>] ppp_sync_send+0x1f5/0x204
 [<c01d9bc1>] ppp_push+0x3e/0x9c
 [<c01dacd4>] ppp_xmit_process+0x422/0x4cc
 [<c01daf3f>] ppp_start_xmit+0x1c1/0x1f6
 [<c0213ea5>] qdisc_restart+0xa7/0x135
 [<c020b112>] dev_queue_xmit+0xba/0x19e
 [<c0223f69>] ip_output+0x1eb/0x236
 [<c0220907>] ip_forward+0x1c1/0x21a
 [<c021fa6c>] ip_rcv+0x38e/0x3ea
 [<c020b4c2>] netif_receive_skb+0x166/0x195
 [<c020b55e>] process_backlog+0x6d/0xd2
 [<c020a30f>] net_rx_action+0x6a/0xff
 [<c0112909>] __do_softirq+0x35/0x7d
 [<c0112973>] do_softirq+0x22/0x26
 [<c0103a9d>] do_IRQ+0x1e/0x25
 [<c010255a>] common_interrupt+0x1a/0x20
 [<c01013c5>] default_idle+0x2b/0x53
 [<c0101426>] cpu_idle+0x39/0x4e
 [<c0328386>] start_kernel+0x20b/0x20d
Code: c0 e8 b3 b6 77 fc 85 c0 75 10 68 d8 c8 9b c3 e8 82 3d 75 fc 8b 43 60 5a eb 50 8d 56 50 c7 00 00 00 00 00 66 89 68 04 eb 02 89
ca <8b> 0a 85 c9 75 f8 89 02 89 da ff 46 54 8b 46 10 e8 30 79 fd ff
 <0>Kernel panic - not syncing: Fatal exception in interrupt

That oops took me to the "ackqueue" implementation in capi.c.  The crash
occured in capincci_add_ack() (auto-inlined by the compiler).

I read the code a bit and finally decided to replace the custom linked list
implementation (struct capiminor->ackqueue) by a struct list_head.  That
did not solve the crash, but produced the following interresting oops:

Unable to handle kernel paging request at virtual address 00200200
 printing eip:
c39bb1f5
*pde = 00000000
Oops: 0002 [#1]
Modules linked in: netconsole capi capifs 3c59x mii fcdsl kernelcapi uhci_hcd usbcore ide_cd cdrom
CPU:    0
EIP:    0060:[<c39bb1f5>]    Tainted: P      VLI
EFLAGS: 00010246   (2.6.16.11 #3)
EIP is at capiminor_del_ack+0x18/0x49 [capi]
eax: 00200200   ebx: c18d41a0   ecx: c1385620   edx: 00100100
esi: 0000d147   edi: 00001103   ebp: 0000d147   esp: c1093f3c
ds: 007b   es: 007b   ss: 0068
Process events/0 (pid: 3, threadinfo=c1092000 task=c1089030)
Stack: <0>c2a17580 c18d41a0 c39bbd16 00000038 c18d41e0 00000000 d147c640 c29e0b68
       c29e0b90 00000212 c29e0b68 c39932b2 c29e0bb0 c10736a0 c0119ef0 c399326c
       c10736a8 c10736a0 c10736b0 c0119f93 c011a06e 00000001 00000000 00000000
Call Trace:
 [<c39bbd16>] handle_minor_send+0x1af/0x241 [capi]
 [<c39932b2>] recv_handler+0x46/0x5f [kernelcapi]
 [<c0119ef0>] run_workqueue+0x5e/0x8d
 [<c399326c>] recv_handler+0x0/0x5f [kernelcapi]
 [<c0119f93>] worker_thread+0x0/0x10b
 [<c011a06e>] worker_thread+0xdb/0x10b
 [<c010c998>] default_wake_function+0x0/0xc
 [<c011c399>] kthread+0x90/0xbc
 [<c011c309>] kthread+0x0/0xbc
 [<c0100a65>] kernel_thread_helper+0x5/0xb
Code: 7e 02 89 ee 89 f0 5a f7 d0 c1 f8 1f 5b 21 f0 5e 5f 5d c3 56 53 8b 48 50 89 d6 89 c3 8b 11 eb 2f 66 39 71 08 75 25 8b 41 04 8b 11 <89> 10 89 42 04 c7 01 00 01 10 00 89 c8 c7 41 04 00 02 20 00 e8

The interresting part of it is the "virtual address 00200200", which is
LIST_POISON2.  I thought about some race condition, but as this is an UP
system, it leads to questions on how it can happen.  If we look at EFLAGS:
00010202, we see that interrupts are enabled at the time of the crash
(eflags & 0x200).

Finally, I don't understand all the capi code, but I think that
handle_minor_send() is racing somehow against capi_recv_message(), which
call both capiminor_del_ack().  So if an IRQ occurs in the middle of
capiminor_del_ack() and another instance of it is invoked, it leads to
linked list corruption.

I came up with the following patch.  With this, I could not reproduce the
crash anymore.  Clearly, this is not the correct fix for the issue.  As this
seems to be some locking issue, there might be more locking issues in that
code.  For example, doesn't the whole struct capiminor have to be locked
somehow?

Cc: Carsten Paeth <calle@calle.de>
Cc: Kai Germaschewski <kai.germaschewski@gmx.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Notify page fault call chain
Anil S Keshavamurthy [Mon, 26 Jun 2006 07:25:29 +0000 (00:25 -0700)]
[PATCH] Notify page fault call chain

With this patch Kprobes now registers for page fault notifications only when
their is an active probe registered.  Once all the active probes are
unregistered their is no need to be notified of page faults and kprobes
unregisters itself from the page fault notifications.  Hence we will have ZERO
side effects when no probes are active.

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>
17 years ago[PATCH] Kprobes registers for notify page fault
Anil S Keshavamurthy [Mon, 26 Jun 2006 07:25:28 +0000 (00:25 -0700)]
[PATCH] Kprobes registers for notify page fault

Kprobes now registers for page fault notifications.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavmurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Notify page fault call chain for sparc64
Anil S Keshavamurthy [Mon, 26 Jun 2006 07:25:27 +0000 (00:25 -0700)]
[PATCH] Notify page fault call chain for sparc64

Overloading of page fault notification with the notify_die() has performance
issues(since the only interested components for page fault is kprobes and/or
kdb) and hence this patch introduces the new notifier call chain exclusively
for page fault notifications their by avoiding notifying unnecessary
components in the do_page_fault() code path.

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>
17 years ago[PATCH] Notify page fault call chain for powerpc
Anil S Keshavamurthy [Mon, 26 Jun 2006 07:25:27 +0000 (00:25 -0700)]
[PATCH] Notify page fault call chain for powerpc

Overloading of page fault notification with the notify_die() has performance
issues(since the only interested components for page fault is kprobes and/or
kdb) and hence this patch introduces the new notifier call chain exclusively
for page fault notifications their by avoiding notifying unnecessary
components in the do_page_fault() code path.

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>
17 years ago[PATCH] Notify page fault call chain for ia64
Anil S Keshavamurthy [Mon, 26 Jun 2006 07:25:26 +0000 (00:25 -0700)]
[PATCH] Notify page fault call chain for ia64

Overloading of page fault notification with the notify_die() has performance
issues(since the only interested components for page fault is kprobes and/or
kdb) and hence this patch introduces the new notifier call chain exclusively
for page fault notifications their by avoiding notifying unnecessary
components in the do_page_fault() code path.

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>
17 years ago[PATCH] Notify page fault call chain for i386
Anil S Keshavamurthy [Mon, 26 Jun 2006 07:25:25 +0000 (00:25 -0700)]
[PATCH] Notify page fault call chain for i386

Overloading of page fault notification with the notify_die() has performance
issues(since the only interested components for page fault is kprobes and/or
kdb) and hence this patch introduces the new notifier call chain exclusively
for page fault notifications their by avoiding notifying unnecessary
components in the do_page_fault() code path.

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>
17 years ago[PATCH] Notify page fault call chain for x86_64
Anil S Keshavamurthy [Mon, 26 Jun 2006 07:25:25 +0000 (00:25 -0700)]
[PATCH] Notify page fault call chain for x86_64

Currently in the do_page_fault() code path, we call notify_die(DIE_PAGE_FAULT,
...) to notify the page fault.  Since notify_die() is highly overloaded, this
page fault notification is currently being sent to all the components
registered with register_die_notification() which uses the same die_chain to
loop for all the registered components which is unnecessary.

In order to optimize the do_page_fault() code path, this critical page fault
notification is now moved to different call chain and the test results showed
great improvements.

And the kprobes which is interested in this notifications, now registers onto
this new call chain only when it need to, i.e Kprobes now registers for page
fault notification only when their are an active probes and unregisters from
this page fault notification when no probes are active.

I have incorporated all the feedback given by Ananth and Keith and everyone,
and thanks for all the review feedback.

This patch:

Overloading of page fault notification with the notify_die() has performance
issues(since the only interested components for page fault is kprobes and/or
kdb) and hence this patch introduces the new notifier call chain exclusively
for page fault notifications their by avoiding notifying unnecessary
components in the do_page_fault() code path.

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>
17 years ago[PATCH] Kprobe: multi kprobe posthandler for booster
mao, bibo [Mon, 26 Jun 2006 07:25:22 +0000 (00:25 -0700)]
[PATCH] Kprobe: multi kprobe posthandler for booster

If there are multi kprobes on the same probepoint, there will be one extra
aggr_kprobe on the head of kprobe list.  The aggr_kprobe has
aggr_post_handler/aggr_break_handler whether the other kprobe
post_hander/break_handler is NULL or not.  This patch modifies this, only
when there is one or more kprobe in the list whose post_handler is not
NULL, post_handler of aggr_kprobe will be set as aggr_post_handler.

[soshima@redhat.com: !CONFIG_PREEMPT fix]
Signed-off-by: bibo, mao <bibo.mao@intel.com>
Cc: Masami Hiramatsu <hiramatu@sdl.hitachi.co.jp>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: "Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>
Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Cc: Yumiko Sugita <sugita@sdl.hitachi.co.jp>
Cc: Hideo Aoki <haoki@redhat.com>
Signed-off-by: Satoshi Oshima <soshima@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] kprobe: boost 2byte-opcodes on i386
Masami Hiramatsu [Mon, 26 Jun 2006 07:25:19 +0000 (00:25 -0700)]
[PATCH] kprobe: boost 2byte-opcodes on i386

Previous kprobe-booster patch has not handled any 2byte opcodes and
prefixes.  I checked whole IA32 opcode map and classified it.

This patch enables kprobe to boost those 2byte opcodes and prefixes.

Signed-off-by: Masami Hiramatsu <hiramatu@sdl.hitachi.co.jp>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: "Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>
Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Cc: Yumiko Sugita <sugita@sdl.hitachi.co.jp>
Cc: Satoshi Oshima <soshima@redhat.com>
Cc: Hideo Aoki <haoki@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] GTOD: add scx200 HRT clocksource
Jim Cromie [Mon, 26 Jun 2006 07:25:19 +0000 (00:25 -0700)]
[PATCH] GTOD: add scx200 HRT clocksource

Add a GTOD clocksource driver based on the Geode SCx200's Hi-Res Timer.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: john stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] fix and optimize clock source update
Roman Zippel [Mon, 26 Jun 2006 07:25:18 +0000 (00:25 -0700)]
[PATCH] fix and optimize clock source update

This fixes the clock source updates in update_wall_time() to correctly
track the time coming in via current_tick_length().  Optimize the fast
paths to be as short as possible to keep the overhead low.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Acked-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] time: fix time going backward w/ clock=pit
john stultz [Mon, 26 Jun 2006 07:25:16 +0000 (00:25 -0700)]
[PATCH] time: fix time going backward w/ clock=pit

Here is the PIT fix against the TOD patches that Tim pointed out.  Many
thanks to Tim for hunting this down.

Cc: Tim Mann <mann@vmware.com>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] generic-time: add macro to simplify/hide mask constants
Jim Cromie [Mon, 26 Jun 2006 07:25:15 +0000 (00:25 -0700)]
[PATCH] generic-time: add macro to simplify/hide mask constants

Add a CLOCKSOURCE_MASK macro to simplify initializing the mask for a struct
clocksource, and use it to replace literal mask constants in the various
clocksource drivers.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] make pmtmr_ioport __read_mostly
Andreas Mohr [Mon, 26 Jun 2006 07:25:14 +0000 (00:25 -0700)]
[PATCH] make pmtmr_ioport __read_mostly

- written on init only, accessed for every timer read --> __read_mostly
- fix broken sentence

Signed-off-by: Andreas Mohr <andi@lisas.de>
Cc: john stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] time: rename clocksource functions
john stultz [Mon, 26 Jun 2006 07:25:14 +0000 (00:25 -0700)]
[PATCH] time: rename clocksource functions

As suggested by Roman Zippel, change clocksource functions to use
clocksource_xyz rather then xyz_clocksource to avoid polluting the
namespace.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Time: i386 Clocksource Drivers
john stultz [Mon, 26 Jun 2006 07:25:12 +0000 (00:25 -0700)]
[PATCH] Time: i386 Clocksource Drivers

Implement the time sources for i386 (acpi_pm, cyclone, hpet, pit, and tsc).
With this patch, the conversion of the i386 arch to the generic timekeeping
code should be complete.

The patch should be fairly straight forward, only adding the new clocksources.

[hirofumi@mail.parknet.co.jp: acpi_pm cleanup]
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Time: i386 Conversion - part 4: Remove Old timer_opts Code
john stultz [Mon, 26 Jun 2006 07:25:12 +0000 (00:25 -0700)]
[PATCH] Time: i386 Conversion - part 4: Remove Old timer_opts Code

Remove the old timers/timer_opts infrastructure which has been disabled.  It
is a fairly straightforward set of deletions

Note that this does not provide any i386 clocksources, so you will only have
the jiffies clocksource.  To get full replacements for the code being removed
here, the timeofday-clocks-i386 patch will be needed.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Time: i386 Conversion - part 3: Enable Generic Timekeeping
john stultz [Mon, 26 Jun 2006 07:25:11 +0000 (00:25 -0700)]
[PATCH] Time: i386 Conversion - part 3: Enable Generic Timekeeping

This converts the i386 arch to use the generic timeofday subsystem.  It
enabled the GENERIC_TIME option, disables the timer_opts code and other arch
specific timekeeping code and reworks the delay code.

While this patch enables the generic timekeeping, please note that this patch
does not provide any i386 clocksource.  Thus only the jiffies clocksource will
be available.  To get full replacements for the code being disabled here, the
timeofday-clocks-i386 patch will needed.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Time: i386 Conversion - part 2: Rework TSC Support
john stultz [Mon, 26 Jun 2006 07:25:10 +0000 (00:25 -0700)]
[PATCH] Time: i386 Conversion - part 2: Rework TSC Support

As part of the i386 conversion to the generic timekeeping infrastructure, this
introduces a new tsc.c file.  The code in this file replaces the TSC
initialization, management and access code currently in timer_tsc.c (which
will be removed) that we want to preserve.

The code also introduces the following functionality:

o tsc_khz: like cpu_khz but stores the TSC frequency on systems that do not
  change TSC frequency w/ CPU frequency

o check/mark_tsc_unstable: accessor/modifier flag for TSC timekeeping
  usability

o minor cleanups to calibration math.

This patch also includes a one line __cpuinitdata fix from Zwane Mwaikambo.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Time: i386 Conversion - part 1: Move timer_pit.c to i8253.c
john stultz [Mon, 26 Jun 2006 07:25:09 +0000 (00:25 -0700)]
[PATCH] Time: i386 Conversion - part 1: Move timer_pit.c to i8253.c

A simple cleanup for the i386 arch in preparation of moving to the generic
timeofday infrastructure.  It simply moves the PIT initialization code, locks,
and other code we want to keep from some code from timer_pit.c (which will be
removed) to i8253.c.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] hangcheck: remove monotomic_clock on x86
Andrew Morton [Mon, 26 Jun 2006 07:25:09 +0000 (00:25 -0700)]
[PATCH] hangcheck: remove monotomic_clock on x86

John's about to nuke x86's monotonic clock without grepping for it first.  The
patch lamely borrows the ppc64 code for x86.

hangcheck-timer shouldn't be doing it this way

a) HAVE_MONOTONIC should be CONFIG_MONOTONIC_CLOCK and it should be defined
   in arch/xxx/Kconfig.

b) That ifdef tangle shouldn't be in hangcheck-timer.c.  It should be using
   arch-provided helper functions, which CONFIG_MONOTONIC_CLOCK-enabling
   architectures implement in arch/something.c

Cc: john stultz <johnstul@us.ibm.com>
Acked-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Time: Introduce arch generic time accessors
john stultz [Mon, 26 Jun 2006 07:25:08 +0000 (00:25 -0700)]
[PATCH] Time: Introduce arch generic time accessors

Introduces clocksource switching code and the arch generic time accessor
functions that use the clocksource infrastructure.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Time: Use clocksource abstraction for NTP adjustments
john stultz [Mon, 26 Jun 2006 07:25:07 +0000 (00:25 -0700)]
[PATCH] Time: Use clocksource abstraction for NTP adjustments

Instead of incrementing xtime by tick_nsec + ntp adjustments, use the
clocksource abstraction to increment and scale time.  Using the clocksource
abstraction allows other clocksources to be used consistently in the face of
late or lost ticks, while preserving the existing behavior via the jiffies
clocksource.

This removes the need to keep time_phase adjustments as we just use the
current_tick_length() function as the NTP interface and accumulate time using
shifted nanoseconds.

The basics of this design was by Roman Zippel, however it is my own
interpretation and implementation, so the credit should go to him and the
blame to me.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Time: Let user request precision from current_tick_length()
john stultz [Mon, 26 Jun 2006 07:25:07 +0000 (00:25 -0700)]
[PATCH] Time: Let user request precision from current_tick_length()

Change the current_tick_length() function so it takes an argument which
specifies how much precision to return in shifted nanoseconds.  This provides
a simple way to convert between NTPs internal nanoseconds shifted by
(SHIFT_SCALE - 10) to other shifted nanosecond units that are used by the
clocksource abstraction.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Time: Use clocksource infrastructure for update_wall_time
john stultz [Mon, 26 Jun 2006 07:25:06 +0000 (00:25 -0700)]
[PATCH] Time: Use clocksource infrastructure for update_wall_time

Modify the update_wall_time function so it increments time using the
clocksource abstraction instead of jiffies.  Since the only clocksource driver
currently provided is the jiffies clocksource, this should result in no
functional change.  Additionally, a timekeeping_init and timekeeping_resume
function has been added to initialize and maintain some of the new timekeping
state.

[hirofumi@mail.parknet.co.jp: fixlet]
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Time: Clocksource Infrastructure
john stultz [Mon, 26 Jun 2006 07:25:05 +0000 (00:25 -0700)]
[PATCH] Time: Clocksource Infrastructure

This introduces the clocksource management infrastructure.  A clocksource is a
driver-like architecture generic abstraction of a free-running counter.  This
code defines the clocksource structure, and provides management code for
registering, selecting, accessing and scaling clocksources.

Additionally, this includes the trivial jiffies clocksource, a lowest common
denominator clocksource, provided mainly for use as an example.

[hirofumi@mail.parknet.co.jp: Don't enable IRQ too early]
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] ext3: Add "-o bh" option
Badari Pulavarty [Mon, 26 Jun 2006 07:25:04 +0000 (00:25 -0700)]
[PATCH] ext3: Add "-o bh" option

This patch adds "-o bh" option to force use of buffer_heads.  This option
is needed when we make "nobh" as default - and if we run into problems.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Add bcm43xx HW RNG support
Michael Buesch [Mon, 26 Jun 2006 07:25:04 +0000 (00:25 -0700)]
[PATCH] Add bcm43xx HW RNG support

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Add TI OMAP CPU family HW RNG driver
Michael Buesch [Mon, 26 Jun 2006 07:25:03 +0000 (00:25 -0700)]
[PATCH] Add TI OMAP CPU family HW RNG driver

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Add ixp4xx HW RNG driver
Michael Buesch [Mon, 26 Jun 2006 07:25:02 +0000 (00:25 -0700)]
[PATCH] Add ixp4xx HW RNG driver

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Add VIA HW RNG driver
Michael Buesch [Mon, 26 Jun 2006 07:25:02 +0000 (00:25 -0700)]
[PATCH] Add VIA HW RNG driver

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Add Geode HW RNG driver
Michael Buesch [Mon, 26 Jun 2006 07:25:01 +0000 (00:25 -0700)]
[PATCH] Add Geode HW RNG driver

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Add AMD HW RNG driver
Michael Buesch [Mon, 26 Jun 2006 07:25:00 +0000 (00:25 -0700)]
[PATCH] Add AMD HW RNG driver

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Add Intel HW RNG driver
Michael Buesch [Mon, 26 Jun 2006 07:24:59 +0000 (00:24 -0700)]
[PATCH] Add Intel HW RNG driver

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Add new generic HW RNG core
Michael Buesch [Mon, 26 Jun 2006 07:24:59 +0000 (00:24 -0700)]
[PATCH] Add new generic HW RNG core

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Remove old HW RNG support
Michael Buesch [Mon, 26 Jun 2006 07:24:58 +0000 (00:24 -0700)]
[PATCH] Remove old HW RNG support

This patch series replaces the old non-generic Hardware Random Number
Generator support by a fully generic RNG API.

This makes it possible to register additional RNGs from modules.  With this
patch series applied, Laptops with a bcm43xx chip (PowerBook) have a HW RNG
available now.

Additionally two new RNG drivers are added for the "ixp4xx" and "omap"
devices.  (Written by Deepak Saxena).  This patch series includes the old
patches by Deepak Saxena.

The old x86-rng driver has beed split.

The userspace RNG daemon can later be updated to select the RNG through
/sys/class/misc/hw_random/ for convenience.  For now it is sufficient to use
cat and echo -n on the sysfs attributes.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] reiserfs: remove reiserfs_aio_write()
Alexey Dobriyan [Mon, 26 Jun 2006 07:24:57 +0000 (00:24 -0700)]
[PATCH] reiserfs: remove reiserfs_aio_write()

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: <reiserfs-dev@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] keys: add a way to store the appropriate context for newly-created keys
Michael LeMay [Mon, 26 Jun 2006 07:24:57 +0000 (00:24 -0700)]
[PATCH] keys: add a way to store the appropriate context for newly-created keys

Add a /proc/<pid>/attr/keycreate entry that stores the appropriate context for
newly-created keys.  Modify the selinux_key_alloc hook to make use of the new
entry.  Update the flask headers to include a new "setkeycreate" permission
for processes.  Update the flask headers to include a new "create" permission
for keys.  Use the create permission to restrict which SIDs each task can
assign to newly-created keys.  Add a new parameter to the security hook
"security_key_alloc" to indicate whether it is being invoked by the kernel, or
from userspace.  If it is being invoked by the kernel, the security hook
should never fail.  Update the documentation to reflect these changes.

Signed-off-by: Michael LeMay <mdlemay@epoch.ncsc.mil>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] keys: restrict contents of /proc/keys to Viewable keys
Michael LeMay [Mon, 26 Jun 2006 07:24:56 +0000 (00:24 -0700)]
[PATCH] keys: restrict contents of /proc/keys to Viewable keys

Restrict /proc/keys such that only those keys to which the current task is
granted View permission are presented.

The documentation is also updated to reflect these changes.

Signed-off-by: Michael LeMay <mdlemay@epoch.ncsc.mil>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] keys: allocate key serial numbers randomly
Michael LeMay [Mon, 26 Jun 2006 07:24:54 +0000 (00:24 -0700)]
[PATCH] keys: allocate key serial numbers randomly

Cause key_alloc_serial() to generate key serial numbers randomly rather than
in linear sequence.

Using an linear sequence permits a covert communication channel to be
established, in which one process can communicate with another by creating or
not creating new keys within a certain timeframe.  The second process can
probe for the expected next key serial number and judge its existence by the
error returned.

This is a problem as the serial number namespace is globally shared between
all tasks, regardless of their context.

For more information on this topic, this old TCSEC guide is recommended:

http://www.radium.ncsc.mil/tpep/library/rainbow/NCSC-TG-030.html

Signed-off-by: Michael LeMay <mdlemay@epoch.ncsc.mil>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] keys: let keyctl_chown() change a key's owner
Fredrik Tolf [Mon, 26 Jun 2006 07:24:51 +0000 (00:24 -0700)]
[PATCH] keys: let keyctl_chown() change a key's owner

Let keyctl_chown() change a key's owner, including attempting to transfer the
quota burden to the new user.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] keys: discard the contents of a key on revocation
David Howells [Mon, 26 Jun 2006 07:24:51 +0000 (00:24 -0700)]
[PATCH] keys: discard the contents of a key on revocation

Cause the keys linked to a keyring to be unlinked from it when revoked and it
causes the data attached to a user-defined key to be discarded when revoked.

This frees up most of the quota a key occupied at that point, rather than
waiting for the key to actually be destroyed.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] keys: sort out key quota system
David Howells [Mon, 26 Jun 2006 07:24:50 +0000 (00:24 -0700)]
[PATCH] keys: sort out key quota system

Add the ability for key creation to overrun the user's quota in some
circumstances - notably when a session keyring is created and assigned to a
process that didn't previously have one.

This means it's still possible to log in, should PAM require the creation of a
new session keyring, and fix an overburdened key quota.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] fs: use list_move()
Akinobu Mita [Mon, 26 Jun 2006 07:24:46 +0000 (00:24 -0700)]
[PATCH] fs: use list_move()

This patch converts the combination of list_del(A) and list_add(A, B) to
list_move(A, B) under fs/.

Cc: Ian Kent <raven@themaw.net>
Acked-by: Joel Becker <joel.becker@oracle.com>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Hans Reiser <reiserfs-dev@namesys.com>
Cc: Urban Widmark <urban@teststation.com>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: Mark Fasheh <mark.fasheh@oracle.com>
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] drivers: use list_move()
Akinobu Mita [Mon, 26 Jun 2006 07:24:41 +0000 (00:24 -0700)]
[PATCH] drivers: use list_move()

This patch converts the combination of list_del(A) and list_add(A, B) to
list_move(A, B) under drivers/.

Acked-by: Corey Minyard <minyard@mvista.com>
Cc: Ben Collins <bcollins@debian.org>
Acked-by: Roland Dreier <rolandd@cisco.com>
Cc: Alasdair Kergon <dm-devel@redhat.com>
Cc: Gerd Knorr <kraxel@bytesex.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frank Pavlic <fpavlic@de.ibm.com>
Acked-by: Matthew Wilcox <matthew@wil.cx>
Cc: Andrew Vasquez <linux-driver@qlogic.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] net/rxrpc: use list_move()
Akinobu Mita [Mon, 26 Jun 2006 07:24:40 +0000 (00:24 -0700)]
[PATCH] net/rxrpc: use list_move()

This patch converts the combination of list_del(A) and list_add(A, B) to
list_move(A, B) under net/rxrpc.

Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] core: use list_move()
Akinobu Mita [Mon, 26 Jun 2006 07:24:40 +0000 (00:24 -0700)]
[PATCH] core: use list_move()

This patch converts the combination of list_del(A) and list_add(A, B) to
list_move(A, B).

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] arch: use list_move()
Akinobu Mita [Mon, 26 Jun 2006 07:24:39 +0000 (00:24 -0700)]
[PATCH] arch: use list_move()

This patch converts the combination of list_del(A) and list_add(A, B) to
list_move(A, B) under arch/.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] use list_add_tail() instead of list_add()
Akinobu Mita [Mon, 26 Jun 2006 07:24:37 +0000 (00:24 -0700)]
[PATCH] use list_add_tail() instead of list_add()

This patch converts list_add(A, B.prev) to list_add_tail(A, &B) for
readability.

Acked-by: Karsten Keil <kkeil@suse.de>
Cc: Jan Harkes <jaharkes@cs.cmu.edu>
Acked-by: Jan Kara <jack@suse.cz>
AOLed-by: David Woodhouse <dwmw2@infradead.org>
Cc: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Correct tty doc
Alan Cox [Mon, 26 Jun 2006 07:24:36 +0000 (00:24 -0700)]
[PATCH] Correct tty doc

This method died some time ago, so kill the doc for it.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] fix magic sysrq on strange keyboards
Fredrik Roubert [Mon, 26 Jun 2006 07:24:35 +0000 (00:24 -0700)]
[PATCH] fix magic sysrq on strange keyboards

Magic sysrq fails to work on many keyboards, particulary most of notebook
keyboards.  This patch fixes it.

The idea is quite simple: Discard the SysRq break code if Alt is still being
held down.  This way the broken keyboard can send the break code (or the user
with a normal keyboard can release the SysRq key) and the kernel waits until
the next key is pressed or the Alt key is released.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] oprofile: Fix unnecessary cleverness
Markus Armbruster [Mon, 26 Jun 2006 07:24:34 +0000 (00:24 -0700)]
[PATCH] oprofile: Fix unnecessary cleverness

nmi_create_files() in arch/i386/oprofile/nmi_int.c depends on
model->num_counters (number of performance counters) being less than 10.
While this is currently the case, it's too clever by half.

Other archs aren't quite as clever: they assume 100.  I suggest to
normalize them all to 1000.

Cc: Philippe Elie <phil.el@wanadoo.fr>
Cc: John Levon <levon@movementarian.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Bluetooth: fix potential NULL ptr deref in dtl1_cs.c::dtl1_hci_send_frame()
Jesper Juhl [Mon, 26 Jun 2006 07:24:33 +0000 (00:24 -0700)]
[PATCH] Bluetooth: fix potential NULL ptr deref in dtl1_cs.c::dtl1_hci_send_frame()

There's a problem in drivers/bluetooth/dtl1_cs.c::dtl1_hci_send_frame()

If bt_skb_alloc() returns NULL, then skb_reserve(s, NSHL); will cause a
NULL pointer deref - ouch.  If we can't allocate the resources we require
we need to tell the caller by returning -ENOMEM.

Found by the coverity checker as bug #409

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Convert kernel/cpu.c to mutexes
Ingo Molnar [Mon, 26 Jun 2006 07:24:32 +0000 (00:24 -0700)]
[PATCH] Convert kernel/cpu.c to mutexes

Convert kernel/cpu.c from semaphore to mutex.

I've reviewed all lock_cpu_hotplug() critical sections, and they all seem to
fit mutex semantics.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] work around ppc64 bootup bug by making mutex-debugging save/restore irqs
Ingo Molnar [Mon, 26 Jun 2006 07:24:31 +0000 (00:24 -0700)]
[PATCH] work around ppc64 bootup bug by making mutex-debugging save/restore irqs

It seems ppc64 wants to lock mutexes in early bootup code, with interrupts
disabled, and they expect interrupts to stay disabled, else they crash.

Work around this bug by making mutex debugging variants save/restore irq
flags.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] fix "USB: move <linux/usb_input.h> to <linux/usb/input.h>"
Andrew Morton [Mon, 26 Jun 2006 07:24:30 +0000 (00:24 -0700)]
[PATCH] fix "USB: move <linux/usb_input.h> to <linux/usb/input.h>"

Update this driver for recent header file movement.

Cc: David Brownell <david-b@pacbell.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] uclinux: use PER_LINUX_32BIT in binfmt_flat
Malcolm Parsons [Mon, 26 Jun 2006 01:49:41 +0000 (11:49 +1000)]
[PATCH] uclinux: use PER_LINUX_32BIT in binfmt_flat

binfmt_flat.c calls set_personality with PER_LINUX as the personality.
On the arm architecture this results in the program running in 26bit
usermode.  PER_LINUX_32BIT should be used instead.  This doesn't affect
other architectures that use binfmt_flat.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: make enable_irq() macro statement
Greg Ungerer [Mon, 26 Jun 2006 01:47:35 +0000 (11:47 +1000)]
[PATCH] m68knommu: make enable_irq() macro statement

Change enable_irq() macro to be a statement, not expression.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: fix ColdFire 5249 PLL set
Greg Ungerer [Mon, 26 Jun 2006 01:43:35 +0000 (11:43 +1000)]
[PATCH] m68knommu: fix ColdFire 5249 PLL set

Fix PLL setting for the Coldfire 5249 CPU. This brings it into line with
the new style frequency configuration of m68knommu parts.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: ColdFire cache flush fixups
Greg Ungerer [Mon, 26 Jun 2006 01:40:44 +0000 (11:40 +1000)]
[PATCH] m68knommu: ColdFire cache flush fixups

Fix flush code for the ColdFire 5206/5206e/5272 cases.
Add support for the new ColdFire 532x CPU family

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: improve syscall entry and fix strace
Philippe De Muyter [Mon, 26 Jun 2006 01:37:57 +0000 (11:37 +1000)]
[PATCH] m68knommu: improve syscall entry and fix strace

Here is a patch to the system call handling for 5307/5272/etc to:

- fix the strace support (one tested the wrong bit)
- make all system calls a little bit faster by inlining set_esp0 and
  supporting ENOSYS out of the critical path.
- remove extraneous spaces

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: force stack alignment on ColdFire
Greg Ungerer [Mon, 26 Jun 2006 01:01:32 +0000 (11:01 +1000)]
[PATCH] m68knommu: force stack alignment on ColdFire

This patch solve a bug triggered by execvp (this function use calloc to
store the argument list and gcc 3.4.x align the stack to word, not to dword).
This situation aren't related to signal handling and all 2.6.x have the bug.
On ColdFire targets we must force the stack to be aligned.

Original patch from Andrea Tarani <andrea.tarani@gilbarco.com>,

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: configurable frequency selection header
Greg Ungerer [Mon, 26 Jun 2006 00:58:09 +0000 (10:58 +1000)]
[PATCH] m68knommu: configurable frequency selection header

Remove list of fixed clock frequency options used for configuring master
clock, and make field an int. Much more flexible this way, no need to add
more options for every new used freqency.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: configurable frequency selection
Greg Ungerer [Mon, 26 Jun 2006 00:55:36 +0000 (10:55 +1000)]
[PATCH] m68knommu: configurable frequency selection

Remove list of fixed clock frequency options used for configuring master
clock, and make field an int. Much more flexible this way, no need to add
more options for every new used freqency.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: configure support for Avnet5282 board
Greg Ungerer [Mon, 26 Jun 2006 00:47:13 +0000 (10:47 +1000)]
[PATCH] m68knommu: configure support for Avnet5282 board

Add support for the AVNET 5282 board.
Patch submitted by Daniel Alomar <dalomar@serrasold.com>.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: ColdFire 532x CPU configure support
Greg Ungerer [Mon, 26 Jun 2006 00:45:45 +0000 (10:45 +1000)]
[PATCH] m68knommu: ColdFire 532x CPU configure support

Add configure support for the new Freescale 532x family of CPUs.
Patch submitted by Matt Waddel <Matt.Waddel@freescale.com>.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years agoRevert "swsusp special saveable pages support" commits
Linus Torvalds [Mon, 26 Jun 2006 01:41:00 +0000 (18:41 -0700)]
Revert "swsusp special saveable pages support" commits

This reverts commits

  3e3318dee0878d42ed62a19c292a2ac284135db3 [PATCH] swsusp: x86_64 mark special saveable/unsaveable pages
  b6370d96e09944c6e3ae8d5743ca8a8ab1f79f6c [PATCH] swsusp: i386 mark special saveable/unsaveable pages
  ce4ab0012b32c1a4a1d6e934aeb73bf3151c48d9 [PATCH] swsusp: add architecture special saveable pages support

because not only do they apparently cause page faults on x86, the
infrastructure doesn't compile on powerpc.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: ColdFire 532x CPU platform build support
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: ColdFire 532x CPU platform build support

Add build support for the new Freescale 532x CPU platforms.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: add ColdFire 532x UART address support
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: add ColdFire 532x UART address support

Add support for the UART addressing on the new Freescale M532x CPU family.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: add ColdFire 532x timer build support
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: add ColdFire 532x timer build support

Add build support for new Freescale M532x CPU family timer.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: cleanup setup.c
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: cleanup setup.c

A cleanup of m68knommu/kernel/setup.c :

- No need to initialize global pointers to NULL, they will have that value
  automatically, and they eat up space in my data segment image in FLASH.
- Remove get_cpuinfo.  It has been replaced by show_cpuinfo.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: check DEBUG defined arch code
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: check DEBUG defined arch code

Don't rely on DEBUG having a value, check for it being defined.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: include ColdFire 532x register definitions
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: include ColdFire 532x register definitions

Include the ColdFire 532x support when including ColdFire peripharp
support definitions.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: add ColdFire 532x cache init
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: add ColdFire 532x cache init

Add cache init support for the new ColdFire 532x CPU family.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: 532x UART support
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: 532x UART support

ColdFire serial driver support for the new 532x CPU family UARTs.

Patch submitted by Matt Waddel <Matt.Waddel@freescale.com>.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: ColdFire 532x register definitions
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: ColdFire 532x register definitions

Register definitions for the new Freescale 532x Coldfire CPU family.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: ColdFire 532x CPU startup code
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: ColdFire 532x CPU startup code

Add kernel startup code for the new Freescale 532x CPU family.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: read/write register access for PIT timer
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: read/write register access for PIT timer

Modify the m68knommu/ColdFire PIT timer code to use register offsets
with raw_read/raw_write access, instead of a mapped struct.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: remove use of rom_length
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: remove use of rom_length

Remove use of rom_length. It serves not real purpose, and when we move
to new stye RAM configuration it will not be needed.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: switch arch config name to CONFIG_M68K
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: switch arch config name to CONFIG_M68K

Switch to naming the architecture config options for the m68knommu branch
as "M68K", dropping "M68KNOMMU".  The CONFIG_MMU separates the 2 now, and
the m68knommu branch is still strictly speaking an M68K (including the
ColdFire parts).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: read/write register access for ColdFire core timer
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: read/write register access for ColdFire core timer

Modify the m68knommu/ColdFire core timer code to use register offsets
with raw_read/raw_write access, instead of a mapped struct.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: 532x FEC eth struct map
Greg Ungerer [Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)]
[PATCH] m68knommu: 532x FEC eth struct map

Specify the struct mapping used on the new Freescale 532x CPU family's
FEC ethernet core.

Patch submitted by Matt Waddel <Matt.Waddel@freescale.com>.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] spufs: update ->flush method proto
Al Viro [Sun, 25 Jun 2006 23:42:33 +0000 (16:42 -0700)]
[PATCH] spufs: update ->flush method proto

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] xfs: update ->flush method proto
Alexey Dobriyan [Sun, 25 Jun 2006 23:42:33 +0000 (16:42 -0700)]
[PATCH] xfs: update ->flush method proto

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Nathan Scott <nathans@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years agoMerge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
Linus Torvalds [Sun, 25 Jun 2006 23:07:58 +0000 (16:07 -0700)]
Merge branch 'for-linus' of /linux/kernel/git/roland/infiniband

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IB/iser: iSER Kconfig and Makefile
  IB/iser: iSER handling of memory for RDMA
  IB/iser: iSER RDMA CM (CMA) and IB verbs interaction
  IB/iser: iSER initiator iSCSI PDU and TX/RX
  IB/iser: iSCSI iSER transport provider high level code
  IB/iser: iSCSI iSER transport provider header file
  IB/uverbs: Remove unnecessary list_del()s
  IB/uverbs: Don't free wr list when it's known to be empty

17 years agoFix NFS2 compile error
Linus Torvalds [Sun, 25 Jun 2006 19:30:33 +0000 (12:30 -0700)]
Fix NFS2 compile error

Trond had apparently merged the same patch twice, causing a duplicate
include of the "internal.h" file, with resulting obvious confusion.

Tssk.  I'm the only one allowed to send out trees that don't even
compile! Who does this Trond guy think he is?

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] i386: Fix softirq accounting with 4K stacks
Björn Steinbrink [Sun, 25 Jun 2006 14:24:40 +0000 (16:24 +0200)]
[PATCH] i386: Fix softirq accounting with 4K stacks

Copy the softirq bits in preempt_count from the current context into the
hardirq context when using 4K stacks to make the softirq_count macro work
correctly and thereby fix softirq cpu time accounting.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>