Chuck Ebbert [Thu, 15 Jun 2006 08:41:52 +0000 (04:41 -0400)]
[PATCH] PCI: fix issues with extended conf space when MMCONFIG disabled because of e820
On 15 Jun 2006 03:45:10 +0200, Andi Kleen wrote:
> Anyways I would say that if the BIOS can't get MCFG right then
> it's likely not been validated on that board and shouldn't be used.
According to Petr Vandrovec:
... "What is important (and checked) is address of MMCONFIG reported by MCFG
table... Unfortunately code does not bother with printing that address :-(
"Another problem is that code has hardcoded that MMCONFIG area is 256MB large.
Unfortunately for the code PCI specification allows any power of two between 2MB
and 256MB if vendor knows that such amount of busses (from 2 to 128) will be
sufficient for system. With notebook it is quite possible that not full 8 bits
are implemented for MMCONFIG bus number."
So here is a patch. Unfortunately my system still fails the test because
it doesn't reserve any part of the MMCONFIG area, but this may fix others.
Booted on x86_64, only compiled on i386. x86_64 still remaps the max area
(256MB) even though only 2MB is checked... but 2.6.16 had no check at all
so it is still better.
PCI: reduce size of x86 MMCONFIG reserved area check
1. Print the address of the MMCONFIG area when the test for that area
being reserved fails.
2. Only check if the first 2MB is reserved, as that is the minimum.
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Doug Thompson [Wed, 14 Jun 2006 23:59:48 +0000 (16:59 -0700)]
[PATCH] PCI: Bus Parity Status sysfs interface
From: Doug Thompson <norsk5@yahoo.com>
This patch adds the 'broken_parity_status' sysfs attribute file to a PCI device.
Reading this attribute a userland program can determine if PCI device provides false
positives (value of 1) in its generation of PCI Parity status, or not (value of 0).
As PCI devices are found to be 'bad' in this regard, userland programs can also set
the appropriate value (root access only) of a faulty device. This per device
information will be used in the EDAC PCI Parity scanner code in a future patch once
this interface becomes available.
Signed-off-by: Doug Thompson <norsk5@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Konrad Rzeszutek [Thu, 15 Jun 2006 16:08:30 +0000 (12:08 -0400)]
[PATCH] PCI: fix memory leak in MMCONFIG error path
This a bit late (yours patch was posted about a year ago), but
a co-worker of spotted part of the code that looks like a memory
leak. Looking at the code it seems that pci_mmcfg_config should
be free-ed if MMCONFIG is above 4GB.
From: Konrad Rzeszutek <konradr@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Tue, 6 Jun 2006 20:58:25 +0000 (16:58 -0400)]
[PATCH] PCI: fix error with pci_get_device() call in the mpc85xx driver
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Chris Wedgwood [Mon, 5 Jun 2006 07:13:21 +0000 (00:13 -0700)]
[PATCH] PCI: MSI-K8T-Neo2-Fir: run only where needed
Be more selective when running the MSI-K8T-Neo2Fir soundcard PCI quirk so
as not to run this on hardware where it's probably not needed.
Signed-off-by: Chris Wedgwood <cw@f00f.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Zhang Yanmin [Fri, 2 Jun 2006 04:35:43 +0000 (12:35 +0800)]
[PATCH] PCI: fix race with pci_walk_bus and pci_destroy_dev
pci_walk_bus has a race with pci_destroy_dev. When cb is called
in pci_walk_bus, pci_destroy_dev might unlink the dev pointed by next.
Later on in the next loop, pointer next becomes NULL and cause
kernel panic.
Below patch against 2.6.17-rc4 fixes it by changing pci_bus_lock (spin_lock)
to pci_bus_sem (rw_semaphore).
Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Grant Grundler [Thu, 1 Jun 2006 17:15:59 +0000 (11:15 -0600)]
[PATCH] PCI: clean up pci documentation to be more specific
On Thu, Jun 01, 2006 at 02:46:11AM -0700, Rajesh Shah wrote:
> This patch assumes that pci_request_region() will always be called
> after pci_enable_device() and pci_release_region() will always
> be called before pci_disable_device(). We cannot make this
> assumption,since it's perfectly legal to disable a device
> first and then release it's regions. So, I think that patch
> needs to change.
Patch below clarifies comments in Documentation/pci.txt.
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Grant Grundler [Thu, 1 Jun 2006 06:35:47 +0000 (23:35 -0700)]
[PATCH] PCI: remove unneeded msi code
The code is really not needed.
Roland Dreier/Greg KH removed the release_mem_region() calls that
were the only consumers of phys_addr:
http://www.ussg.iu.edu/hypermail/linux/kernel/0503.0/1540.html
patch below deletes the "dead" code.
Signed-off-by: Grant Grundler <iod00d@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kimball Murray [Wed, 31 May 2006 18:20:04 +0000 (14:20 -0400)]
[PATCH] PCI: don't move ioapics below PCI bridge
A recent Stratus x86_64 platform uses a system ioapic that is a PCI device
located below a PCI bridge. Other platforms like this may exist.
This patch fixes a problem wherein the kernel's PCI setup code moves
the ioapic to an address other than that assigned by the BIOS. It simply
adds another exclusion (which already includes classless devices and host
bridges) to the function pbus_assign_resources_sorted so that it will not
move the ioapic.
If the ioapic is moved, the fixmap mapping to it is broken, so the OS should
leave it alone.
From: Kimball Murray <kimball.murray@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
bibo,mao [Wed, 31 May 2006 10:17:33 +0000 (18:17 +0800)]
[PATCH] PCI: cleanup unused variable about msi driver
In IA64 platform, msi driver does not use irq_vector variable, and in
x86 platform LAST_DEVICE_VECTOR should one before FIRST_SYSTEM_VECTOR,
this patch modify this.
Signed-off-by: bibo, mao <bibo.mao@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Shaohua Li [Fri, 26 May 2006 02:58:27 +0000 (10:58 +0800)]
[PATCH] PCI: disable msi mode in pci_disable_device
Brice said the pci_save_msi_state breaks his driver in his special usage
(not in suspend/resume), as pci_save_msi_state will disable msi mode. In
his usage, pci_save_state will be called at runtime, and later (after
the device operates for some time and has an error) pci_restore_state
will be called.
In another hand, suspend/resume needs disable msi mode, as device should
stop working completely. This patch try to workaround this issue.
Drivers are expected call pci_disable_device in suspend time after
pci_save_state.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Rajesh Shah [Tue, 23 May 2006 17:14:36 +0000 (10:14 -0700)]
[PATCH] PCI: Allow MSI to work on kexec kernel
We recently ran into a problem where the e1000 device failed to
work properly on the kexec kernel. MSI was enabled for the
device in the main kernel when it crashed. The e1000 driver
tried to enable MSI on the kexec kernel, but the code bailed
early when it found that MSI was already enabled in the hardware,
even though the software state was not properly set up in the
kexec'd kernel. This patch fixes the problem by moving the
early return to after making sure that the software state
is properly initialized.
Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Brice Goglin [Tue, 23 May 2006 07:05:27 +0000 (03:05 -0400)]
[PATCH] PCI: AMD 8131 MSI quirk called too late, bus_flags not inherited ?
The PCI_BUS_FLAGS_NO_MSI bus flags does not appear do be inherited
correctly from the amd8131 MSI quirk to its parent busses. It makes
devices behind a bridge behind amd8131 try to enable MSI while the
amd8131 does not support it.
We fix this by looking at flags of all parent busses in
pci_enable_msi() and pci_enable_msix().
By the way, also add the missing dev->no_msi check in pci_enable_msix()
Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Brent Casavant [Wed, 10 May 2006 08:49:14 +0000 (01:49 -0700)]
[PATCH] PCI: Move various PCI IDs to header file
Move various QLogic, Vitesse, and Intel storage controller PCI IDs to the
main header file.
Signed-off-by: Brent Casavant <bcasavan@sgi.com>
Acked-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Doug Thompson [Tue, 9 May 2006 00:06:09 +0000 (17:06 -0700)]
[PATCH] PCI Bus Parity Status-broken hardware attribute, EDAC foundation
Currently, the EDAC (error detection and correction) modules that are in
the kernel contain some features that need to be moved. After some good
feedback on the PCI Parity detection code and interface
(http://www.ussg.iu.edu/hypermail/linux/kernel/0603.1/0897.html) this
patch ADDs an new attribute to the pci_dev structure: Namely the
'broken_parity_status' bit.
When set this indicates that the respective hardware generates false
positives of Parity errors.
The EDAC "blacklist" solution was inferior and will be removed in a
future patch.
Also in this patch is a PCI quirk.c entry for an Infiniband PCI-X card
which generates false positive parity errors.
I am requesting comments on this AND on the possibility of a exposing
this 'broken_parity_status' bit to userland via the PCI device sysfs
directory for devices. This access would allow for enabling of this
feature on new devices and for old devices that have their drivers
updated. (SLES 9 SP3 did this on an ATI motherboard video device). There
is a need to update such a PCI attribute between kernel releases.
This patch just adds a storage place for the attribute and a quirk entry
for a known bad PCI device. PCI Parity reaper/harvestor operations are
in EDAC itself and will be refactored to use this PCI attribute instead
of its own mechanisms (which are currently disabled) in the future.
Signed-off-by: Doug Thompson <norsk5@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Rajesh Shah [Wed, 3 May 2006 22:27:47 +0000 (15:27 -0700)]
[PATCH] PCI: i386/x86_84: disable PCI resource decode on device disable
When a PCI device is disabled via pci_disable_device(), it's still
left decoding its BAR resource ranges even though its driver
will have likely released those regions (and may even have
unloaded). pci_enable_device() already explicitly enables
BAR resource decode for the device being enabled. This patch
disables resource decode for the PCI device being disabled,
making it symmetric with the enable call.
I saw this while doing something else, not because of a
problem report. Still, seems to be the correct thing to do.
Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Muthu Kumar [Fri, 28 Apr 2006 07:42:21 +0000 (00:42 -0700)]
[PATCH] PCI ACPI: Rename the functions to avoid multiple instances.
There were two instances of pci_acpi_init(), one in
drivers/pci/pci-acpi.c and another in arch/i386/pci/acpi.c.
Rename the one in pci-acpi.c and make it consistent with
other names in the same file.
Signed-off-by: Muthukumar R <muthur@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kristen Accardi [Fri, 28 Apr 2006 18:37:38 +0000 (11:37 -0700)]
[PATCH] PCI: don't enable device if already enabled
If a device is already enabled, don't bother reenabling it.
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Acked-By: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arjan van de Ven [Sat, 29 Apr 2006 08:59:08 +0000 (10:59 +0200)]
[PATCH] PCI: Add a "enable" sysfs attribute to the pci devices to allow userspace (Xorg) to enable devices without doing foul direct access
This patch adds an "enable" sysfs attribute to each PCI device. When read it
shows the "enabled-ness" of the device, but you can write a "0" into it to
disable a device, and a "1" to enable it.
This later is needed for X and other cases where userspace wants to enable
the BARs on a device (typical example: to run the video bios on a secundary
head). Right now X does all this "by hand" via bitbanging, that's just evil.
This allows X to no longer do that but to just let the kernel do this.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
CC: Peter Jones <pjones@redhat.com>
Acked-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kumar Gala [Mon, 1 May 2006 15:43:46 +0000 (10:43 -0500)]
[PATCH] PCI: Add pci_assign_resource_fixed -- allow fixed address assignments
PCI: Add pci_assign_resource_fixed -- allow fixed address assignments
On some embedded systems the PCI address for hotplug devices are not only
known a priori but are required to be at a given PCI address for other
master in the system to be able to access.
An example of such a system would be an FPGA which is setup from user space
after the system has booted. The FPGA may be access by DSPs in the system
and those DSPs expect the FPGA at a fixed PCI address.
Added pci_assign_resource_fixed() as a way to allow assignment of the PCI
devices's BARs at fixed PCI addresses.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bjorn Helgaas [Fri, 9 Jun 2006 18:28:29 +0000 (11:28 -0700)]
[PATCH] PCI: fix to pci ignore pre-set 64-bit bars on 32-bit platforms
When we detect a 64-bit pre-set address in a BAR on a 32-bit platform,
we disable it and treat it as if it had been unset, thus allowing the
general address assignment code to assign a new address to it when the
device is enabled. This can happen either if the firmware assigns
64-bit addresses; additionally, some cards have been found "in the
wild" which do not come out of reset with all the BAR registers set to
zero.
Unfortunately, the patch that implemented this tested the low part of
the address instead of the high part of the address. This patch fixes
that.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
H. Peter Anvin [Wed, 19 Apr 2006 00:19:52 +0000 (17:19 -0700)]
[PATCH] PCI: Ignore pre-set 64-bit BARs on 32-bit platforms
[pci] Ignore pre-set 64-bit BARs on 32-bit platforms
Currently, Linux always rejects a device which has a pre-set 64-bit
address on a 32-bit platform. On systems which do not do PCI
initialization in firmware, this causes some devices which don't
correctly power up with all BARs zero to fail.
This patch makes the kernel automatically zero out such an address
(thus treating it as if it had not been set at all, meaning it will
assign an address if necessary).
I have done this only for devices, not bridges. It seems potentially
hazardous to do for bridges.
Signed-off-by: H. Peter Anvin <hpa@c2micro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Maule [Fri, 14 Apr 2006 21:03:54 +0000 (16:03 -0500)]
[PATCH] PCI: altix: msi support
MSI callouts for altix. Involves a fair amount of code reorg in sn irq.c
code as well as adding some extensions to the altix PCI provider abstaction.
Signed-off-by: Mark Maule <maule@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Maule [Fri, 14 Apr 2006 21:03:49 +0000 (16:03 -0500)]
[PATCH] PCI: per-platform IA64_{FIRST,LAST}_DEVICE_VECTOR definitions
Abstract IA64_FIRST_DEVICE_VECTOR/IA64_LAST_DEVICE_VECTOR since SN platforms
use a subset of the IA64 range. Implement this by making the above macros
global variables which the platform can override in it setup code.
Also add a reserve_irq_vector() routine used by SN to mark a vector's as
in-use when that weren't allocated through assign_irq_vector().
Signed-off-by: Mark Maule <maule@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Maule [Tue, 11 Apr 2006 02:17:48 +0000 (21:17 -0500)]
[PATCH] PCI: msi abstractions and support for altix
Abstract portions of the MSI core for platforms that do not use standard
APIC interrupt controllers. This is implemented through a new arch-specific
msi setup routine, and a set of msi ops which can be set on a per platform
basis.
Signed-off-by: Mark Maule <maule@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Brice Goglin [Tue, 9 May 2006 17:52:09 +0000 (10:52 -0700)]
[PATCH] PCI: Add PCI_CAP_ID_VNDR
Add the vendor-specific extended capability PCI_CAP_ID_VNDR. It will be
used by the Myri-10G Ethernet driver (will be submitted soon).
Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Linus Torvalds [Wed, 21 Jun 2006 18:23:13 +0000 (11:23 -0700)]
Merge /pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (30 commits)
[PATCH] PCI Hotplug: Fix recovery path from errors during pcie_init()
[PATCH] PCI Hotplug: fake NULL pointer dereferences in IBM Hot Plug Controller Driver
[PATCH] shpchp: Cleanup improper info messages
[PATCH] shpchp: Remove Unused hpc_evelnt_lock
[PATCH] shpchp: Cleanup interrupt polling timer
[PATCH] shpchp: Cleanup SHPC commands
[PATCH] shpchp: Cleanup interrupt handler
[PATCH] shpchp: Remove unnecessary hpc_ctlr_handle check
[PATCH] pciehp: Implement get_address callback
[PATCH] pciehp: Add missing pci_dev_put
[PATCH] pciehp: Replace pci_find_slot() with pci_get_slot()
[PATCH] SGI Hotplug: Incorrect power status
[PATCH] shpchp: Create shpchpd at controller probe time
[PATCH] shpchp: Mask Global SERR and Intr at controller release time
[PATCH] SHPC: Fix SHPC Contoller SERR-INT Register bits access
[PATCH] SHPC: Fix SHPC Logical Slot Register bits access
[PATCH] SHPC: Cleanup SHPC Logical Slot Register bits access
[PATCH] SHPC: Cleanup SHPC Logical Slot Register access
[PATCH] SHPC: Cleanup SHPC register access
[PATCH] pciehp: Fix programming hotplug parameters
...
Linus Torvalds [Wed, 21 Jun 2006 18:18:25 +0000 (11:18 -0700)]
Merge /pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (85 commits)
[SCSI] 53c700: remove reliance on deprecated cmnd fields
[SCSI] hptiop: don't use cmnd->bufflen
[SCSI] hptiop: HighPoint RocketRAID 3xxx controller driver
[SCSI] aacraid: small misc. cleanups
[SCSI] aacraid: Update supported product information
[SCSI] aacraid: Fix return code interpretation
[SCSI] scsi_transport_sas: fix panic in sas_free_rphy
[SCSI] remove RQ_SCSI_* flags
[SCSI] remove scsi_request infrastructure
[SCSI] mptfusion: change driver revision to 3.03.10
[SCSI] mptfc: abort of board reset leaves port dead requiring reboot
[SCSI] mptfc: fix fibre channel infinite request/response loop
[SCSI] mptfc: set fibre channel fw target missing timers to one second
[SCSI] mptfusion: move fc event/reset handling to mptfc
[SCSI] spi transport: don't allow dt to be set on SE or HVD buses
[SCSI] aic7xxx: expose the bus setting to sysfs
[SCSI] scsi: remove Documentation/scsi/cpqfc.txt
[SCSI] drivers/scsi: Use ARRAY_SIZE macro
[SCSI] Remove last page_address from dc395x.c
[SCSI] hptiop: HighPoint RocketRAID 3xxx controller driver
...
Fixed up conflicts in drivers/message/fusion/mptbase.c manually (due to
the sparc interrupt cleanups)
Brice Goglin [Wed, 21 Jun 2006 03:03:02 +0000 (20:03 -0700)]
[PATCH] add __iowrite64_copy
Introduce __iowrite64_copy. It will be used by the Myri-10G Ethernet
driver to post requests to the NIC. This driver will be submitted soon.
__iowrite64_copy copies to I/O memory in units of 64 bits when possible (on
64 bit architectures). It reverts to __iowrite32_copy on 32 bit
architectures.
Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Wed, 21 Jun 2006 03:01:16 +0000 (20:01 -0700)]
Merge git://git./linux/kernel/git/bcollins/linux1394-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bcollins/linux1394-2.6: (28 commits)
eth1394: replace __constant_htons by htons
ieee1394: adjust code formatting in highlevel.c
ieee1394: hl_irqs_lock is taken in hardware interrupt context
ieee1394_core: switch to kthread API
ieee1394: sbp2: Kconfig fix
ieee1394: add preprocessor constant for invalid csr address
sbp2: fix deregistration of status fifo address space
[PATCH] eth1394: endian fixes
Fix broken suspend/resume in ohci1394
sbp2: use __attribute__((packed)) for on-the-wire structures
sbp2: provide helptext for CONFIG_IEEE1394_SBP2_PHYS_DMA and mark it experimental
Update feature removal of obsolete raw1394 ISO requests.
sbp2: fix S800 transfers if phys_dma is off
sbp2: remove ohci1394 specific constant
ohci1394: make phys_dma parameter read-only
ohci1394: set address range properties
ieee1394: extend lowlevel API for address range properties
sbp2: log number of supported concurrent logins
sbp2: remove manipulation of inquiry response
ieee1394: save RAM by using a single tlabel for broadcast transactions
...
Cedric Le Goater [Tue, 20 Jun 2006 04:10:44 +0000 (21:10 -0700)]
[PATCH] s390: add __raw_writeq required by __iowrite64_copy
It also adds all the related quad routines.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Wed, 21 Jun 2006 02:44:03 +0000 (19:44 -0700)]
Fix up CFQ scheduler for recent rbtree node shrinkage
The color is now in the low bits of the parent pointer, and initializing
it to 0 happens as part of the whole memset above, so just remove the
unnecessary RB_CLEAR_COLOR.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Herbert Xu [Wed, 21 Jun 2006 00:53:54 +0000 (10:53 +1000)]
[FORCEDETH] Fix xmit_lock/netif_tx_lock after merge
There has been an update to the forcedeth driver that added a few new
uses of xmit_lock which is no longer meant to be used directly. This
patch replaces them with netif_tx_lock_bh.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Wed, 21 Jun 2006 00:52:36 +0000 (17:52 -0700)]
Merge branch 'devel' of /home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (42 commits)
[ARM] Fix tosa build error
[ARM] 3610/1: Make reboot work on Versatile
[ARM] 3609/1: S3C24XX: defconfig update for s3c2410_defconfig
[ARM] 3591/1: Anubis: IDE device definitions
[ARM] Include asm/hardware.h not asm/arch/hardware.h
[ARM] 3594/1: Poodle: Add touchscreen support + other updates
[ARM] 3564/1: sharpsl_pm: Abstract some machine specific parameters
[ARM] 3561/1: Poodle: Correct the MMC/SD power control
[ARM] 3593/1: Add reboot and shutdown handlers for Zaurus handhelds
[ARM] 3599/1: AT91RM9200 remove global variables
[ARM] 3607/1: AT91RM9200 misc fixes
[ARM] 3605/1: AT91RM9200 Power Management
[ARM] 3604/1: AT91RM9200 New boards
[ARM] 3603/1: AT91RM9200 remove old files
[ARM] 3592/1: AT91RM9200 Serial driver update
[ARM] 3590/1: AT91RM9200 Platform devices support
[ARM] 3589/1: AT91RM9200 DK/EK board update
[ARM] 3588/1: AT91RM9200 CSB337/637 board update
[ARM] 3587/1: AT91RM9200 hardware headers
[ARM] 3586/1: AT91RM9200 header update
...
Linus Torvalds [Wed, 21 Jun 2006 00:39:53 +0000 (17:39 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[ATM]: fix broken uses of NIPQUAD in net/atm
[SCTP]: sctp_unpack_cookie() fix
[SCTP]: Fix unintentional change to SCTP_ASSERT when !SCTP_DEBUG
[NET]: Prevent multiple qdisc runs
[CONNECTOR]: Initialize subsystem earlier.
[NETFILTER]: xt_sctp: fix endless loop caused by 0 chunk length
Linus Torvalds [Wed, 21 Jun 2006 00:39:28 +0000 (17:39 -0700)]
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: Update defconfig.
[SPARC64]: Don't double-export synchronize_irq.
[SPARC64]: Move over to GENERIC_HARDIRQS.
[SPARC64]: Virtualize IRQ numbers.
[SPARC64]: Kill ino_bucket->pil
[SPARC]: Kill __irq_itoa().
[SPARC64]: bp->pil can never be zero
[SPARC64]: Send all device interrupts via one PIL.
[SPARC]: Fix iommu_flush_iotlb end address
[SPARC]: Mark smp init functions as cpuinit
[SPARC]: Add missing rw can_lock macros
[SPARC]: Setup cpu_possible_map
[SPARC]: Add topology_init()
Linus Torvalds [Tue, 20 Jun 2006 22:38:12 +0000 (15:38 -0700)]
Merge branch 'rio.b19' of git://git./linux/kernel/git/viro/bird
* 'rio.b19' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/bird:
[PATCH] missing readb/readw in rio
[PATCH] copy_to_user() from iomem is a bad thing
[PATCH] forgotten swap of copyout() arguments
[PATCH] handling rio MEMDUMP
[PATCH] fix rio_copy_to_card() for OLDPCI case
[PATCH] uses of ->Copy() in rioroute are bogus
[PATCH] bogus order of copy_from_user() arguments
[PATCH] rio ->Copy() expects the sourse as first argument
[PATCH] trivial annotations in rio
Linus Torvalds [Tue, 20 Jun 2006 22:37:56 +0000 (15:37 -0700)]
Merge branch 'audit.b21' of git://git./linux/kernel/git/viro/audit-current
* 'audit.b21' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: (25 commits)
[PATCH] make set_loginuid obey audit_enabled
[PATCH] log more info for directory entry change events
[PATCH] fix AUDIT_FILTER_PREPEND handling
[PATCH] validate rule fields' types
[PATCH] audit: path-based rules
[PATCH] Audit of POSIX Message Queue Syscalls v.2
[PATCH] fix se_sen audit filter
[PATCH] deprecate AUDIT_POSSBILE
[PATCH] inline more audit helpers
[PATCH] proc_loginuid_write() uses simple_strtoul() on non-terminated array
[PATCH] update of IPC audit record cleanup
[PATCH] minor audit updates
[PATCH] fix audit_krule_to_{rule,data} return values
[PATCH] add filtering by ppid
[PATCH] log ppid
[PATCH] collect sid of those who send signals to auditd
[PATCH] execve argument logging
[PATCH] fix deadlocks in AUDIT_LIST/AUDIT_LIST_RULES
[PATCH] audit_panic() is audit-internal
[PATCH] inotify (5/5): update kernel documentation
...
Manual fixup of conflict in unclude/linux/inotify.h
Russell King [Tue, 20 Jun 2006 22:27:37 +0000 (23:27 +0100)]
[ARM] Fix tosa build error
tosa.c references mdelay(), but was missing linux/delay.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Linus Torvalds [Tue, 20 Jun 2006 22:10:08 +0000 (15:10 -0700)]
Merge git://git.infradead.org/hdrcleanup-2.6
* git://git.infradead.org/hdrcleanup-2.6: (63 commits)
[S390] __FD_foo definitions.
Switch to __s32 types in joystick.h instead of C99 types for consistency.
Add <sys/types.h> to headers included for userspace in <linux/input.h>
Move inclusion of <linux/compat.h> out of user scope in asm-x86_64/mtrr.h
Remove struct fddi_statistics from user view in <linux/if_fddi.h>
Move user-visible parts of drivers/s390/crypto/z90crypt.h to include/asm-s390
Revert include/media changes: Mauro says those ioctls are only used in-kernel(!)
Include <linux/types.h> and use __uXX types in <linux/cramfs_fs.h>
Use __uXX types in <linux/i2o_dev.h>, include <linux/ioctl.h> too
Remove private struct dx_hash_info from public view in <linux/ext3_fs.h>
Include <linux/types.h> and use __uXX types in <linux/affs_hardblocks.h>
Use __uXX types in <linux/divert.h> for struct divert_blk et al.
Use __u32 for elf_addr_t in <asm-powerpc/elf.h>, not u32. It's user-visible.
Remove PPP_FCS from user view in <linux/ppp_defs.h>, remove __P mess entirely
Use __uXX types in user-visible structures in <linux/nbd.h>
Don't use 'u32' in user-visible struct ip_conntrack_old_tuple.
Use __uXX types for S390 DASD volume label definitions which are user-visible
S390 BIODASDREADCMB ioctl should use __u64 not u64 type.
Remove unneeded inclusion of <linux/time.h> from <linux/ufs_fs.h>
Fix private integer types used in V4L2 ioctls.
...
Manually resolve conflict in include/linux/mtd/physmap.h
Linus Torvalds [Tue, 20 Jun 2006 21:51:22 +0000 (14:51 -0700)]
Merge git://git.infradead.org/~dwmw2/rbtree-2.6
* git://git.infradead.org/~dwmw2/rbtree-2.6:
[RBTREE] Switch rb_colour() et al to en_US spelling of 'color' for consistency
Update UML kernel/physmem.c to use rb_parent() accessor macro
[RBTREE] Update hrtimers to use rb_parent() accessor macro.
[RBTREE] Add explicit alignment to sizeof(long) for struct rb_node.
[RBTREE] Merge colour and parent fields of struct rb_node.
[RBTREE] Remove dead code in rb_erase()
[RBTREE] Update JFFS2 to use rb_parent() accessor macro.
[RBTREE] Update eventpoll.c to use rb_parent() accessor macro.
[RBTREE] Update key.c to use rb_parent() accessor macro.
[RBTREE] Update ext3 to use rb_parent() accessor macro.
[RBTREE] Change rbtree off-tree marking in I/O schedulers.
[RBTREE] Add accessor macros for colour and parent fields of rb_node
Linus Torvalds [Tue, 20 Jun 2006 21:50:31 +0000 (14:50 -0700)]
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (199 commits)
[MTD] NAND: Fix breakage all over the place
[PATCH] NAND: fix remaining OOB length calculation
[MTD] NAND Fixup NDFC merge brokeness
[MTD NAND] S3C2410 driver cleanup
[MTD NAND] s3c24x0 board: Fix clock handling, ensure proper initialisation.
[JFFS2] Check CRC32 on dirent and data nodes each time they're read
[JFFS2] When retiring nextblock, allocate a node_ref for the wasted space
[JFFS2] Mark XATTR support as experimental, for now
[JFFS2] Don't trust node headers before the CRC is checked.
[MTD] Restore MTD_ROM and MTD_RAM types
[MTD] assume mtd->writesize is 1 for NOR flashes
[MTD NAND] Fix s3c2410 NAND driver so it at least _looks_ like it compiles
[MTD] Prepare physmap for 64-bit-resources
[JFFS2] Fix more breakage caused by janitorial meddling.
[JFFS2] Remove stray __exit from jffs2_compressors_exit()
[MTD] Allow alternate JFFS2 mount variant for root filesystem.
[MTD] Disconnect struct mtd_info from ABI
[MTD] replace MTD_RAM with MTD_GENERIC_TYPE
[MTD] replace MTD_ROM with MTD_GENERIC_TYPE
[MTD] remove a forgotten MTD_XIP
...
Linus Torvalds [Tue, 20 Jun 2006 21:49:45 +0000 (14:49 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-serial
* master.kernel.org:/home/rmk/linux-2.6-serial:
[SERIAL] PARPORT_SERIAL should depend on SERIAL_8250_PCI
Linus Torvalds [Tue, 20 Jun 2006 21:49:29 +0000 (14:49 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-mmc
* master.kernel.org:/home/rmk/linux-2.6-mmc:
[MMC] Add (MMC) to entry in MAINTAINERS file
[MMC] sdhci truncated pointer fix
Linus Torvalds [Tue, 20 Jun 2006 21:49:00 +0000 (14:49 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (22 commits)
[ARM] 3559/1: S3C2442: core and serial port
[ARM] 3557/1: S3C24XX: centralise and cleanup uart registration
[ARM] 3558/1: SMDK24XX: LED platform devices
[ARM] 3534/1: add spi support to lubbock platform
[ARM] 3554/1: ARM: Fix dyntick locking
[ARM] 3553/1: S3C24XX: earlier print of cpu idcode info
[ARM] 3552/1: S3C24XX: Move VA of GPIO for low-level debug
[ARM] 3551/1: S3C24XX: PM code failes to compile with CONFIG_DCACHE_WRITETHROUGH
[ARM] 3550/1: OSIRIS: fix serial port map for 1:1
[ARM] 3548/1: Fix the ARMv6 CPU id in compressed/head.S
[ARM] 3335/1: Old-abi Thumb sys_syscall broken
[ARM] 3467/1: [3/3] Support for Philips PNX4008 platform: defconfig
[ARM] 3466/1: [2/3] Support for Philips PNX4008 platform: chip support
[ARM] 3465/1: [1/3] Support for Philips PNX4008 platform: headers
[ARM] 3407/1: lpd7x: documetation update
[ARM] 3406/1: lpd7x: compilation fix for smc91x
[ARM] 3405/1: lpd7a40x: CPLD ssp driver
[ARM] 3404/1: lpd7a40x: AMBA CLCD support
[ARM] 3403/1: lpd7a40x: updated default configurations
[ARM] 3402/1: lpd7a40x: serial driver bug fix
...
Deepak Saxena [Tue, 20 Jun 2006 20:30:44 +0000 (21:30 +0100)]
[ARM] 3610/1: Make reboot work on Versatile
Patch from Deepak Saxena
This patch makes soft reboot work on the Versatile board. Thanks to
Catalin Marinas @ ARM for pointing out the proper way to do this.
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Tue, 20 Jun 2006 19:57:34 +0000 (20:57 +0100)]
Merge S3Cxxxx branch
Thomas Gleixner [Tue, 20 Jun 2006 18:05:05 +0000 (20:05 +0200)]
[MTD] NAND: Fix breakage all over the place
Following problems are addressed:
- wrong status caused early break out of nand_wait()
- removed the bogus status check in nand_wait() which
is a relict of the abandoned support for interrupted
erase.
- status check moved to the correct place in read_oob
- oob support for syndrom based ecc with strange layouts
- use given offset in the AUTOOOB based oob operations
Partially based on a patch from Vitaly Vool <vwool@ru.mvista.com>
Thanks to Savin Zlobec <savin@epico.si> for tracking down the
status problem.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Vitaly Wool [Wed, 7 Jun 2006 05:34:37 +0000 (09:34 +0400)]
[PATCH] NAND: fix remaining OOB length calculation
In nand_read_page_syndrome/nand_write_page_syndrome the calculation of
the remaining oob length which is not used by the prepad/ecc/postpad
areas is wrong.
Signed-off-by: Vitaly Wool <vwool@ru.mvista.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Thomas Gleixner [Fri, 16 Jun 2006 16:10:09 +0000 (18:10 +0200)]
[MTD] NAND Fixup NDFC merge brokeness
Remove the remains of a broken merge.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Russell King [Tue, 20 Jun 2006 18:53:16 +0000 (19:53 +0100)]
[ARM] Include asm/hardware.h not asm/arch/hardware.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Tue, 20 Jun 2006 18:49:07 +0000 (19:49 +0100)]
Merge Zaurus branch
Russell King [Tue, 20 Jun 2006 18:48:18 +0000 (19:48 +0100)]
Merge AT91 branch
Andrew Victor [Tue, 20 Jun 2006 18:31:39 +0000 (19:31 +0100)]
[ARM] 3599/1: AT91RM9200 remove global variables
Patch from Andrew Victor
This patch removes some now unnecessary global variables -
at91_master_clock, at91_serial_map, at91_console_port.
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Ben Dooks [Tue, 20 Jun 2006 18:31:06 +0000 (19:31 +0100)]
[ARM] 3609/1: S3C24XX: defconfig update for s3c2410_defconfig
Patch from Ben Dooks
Update s3c2410_defconfig to latest kernel with the
latest patches
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Andrew Victor [Tue, 20 Jun 2006 18:30:20 +0000 (19:30 +0100)]
[ARM] 3607/1: AT91RM9200 misc fixes
Patch from Andrew Victor
This final patch includes some general fixes.
1. Link in pm.o if CONFIG_PM is enabled. [Should have been included in
patch 3605/1].
2. Use __raw_readl()/__raw_writel() when accessing System Peripheral
registers.
3. Removed some unnecessary includes
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Andrew Victor [Tue, 20 Jun 2006 18:30:19 +0000 (19:30 +0100)]
[ARM] 3605/1: AT91RM9200 Power Management
Patch from Andrew Victor
This patch adds the core Power Management support for the AT91RM9200
processor. It will support suspend-to-RAM and standby modes.
The suspend-to-RAM functionality is not 100% complete. The code that
needs to be execute from the internal SRAM to restore the system is
outstanding. For now we just fall through to Standby mode.
The AT91-specific at91_suspend_entering_slow_clock() function will
eventually be replaced by clk_must_disable() once that functionality is
added to mainline clock API.
Patch from David Brownell.
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Andrew Victor [Tue, 20 Jun 2006 18:30:18 +0000 (19:30 +0100)]
[ARM] 3604/1: AT91RM9200 New boards
Patch from Andrew Victor
This patch adds support for an additional 4 AT91RM9200-based boards:
1. Conitec ARM&EVA [MACH_CARMEVA]
(http://www.conitec.net/english/linuxboard.htm)
2. KwikByte KB920x [MACH_KB9200]
(http://kwikbyte.com/KB9202_description_new.htm)
3. Embest ATEB9200 [MACH_ATEB9200]
(http://www.embedinfo.com/english/product/ATEB9200.asp)
4. Sperry-Sun KAFA board [MACH_KAFA]
(unknown)
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Andrew Victor [Tue, 20 Jun 2006 18:27:34 +0000 (19:27 +0100)]
[ARM] 3603/1: AT91RM9200 remove old files
Patch from Andrew Victor
This patch removes the now unnecessary
include/asm-arm/arch-at91rm9200/pio.h file. The pin configuration is
now handled in the platform-device setup code
(arch/arm/mach-at91rm9200/devices.c).
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Liam Girdwood [Tue, 20 Jun 2006 18:26:42 +0000 (19:26 +0100)]
[ARM] 3606/1: PXA27x SSP Register definitions
Patch from Liam Girdwood
This patch adds some new PXA27x SSP port registers and also fixes the
SSP slots per frame macro
Changes:-
o SSCR0_SlotPerFrm fixed
o Added SSP port TSA, RSA, TSS and ACD registers
Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Lennert Buytenhek [Tue, 20 Jun 2006 18:26:41 +0000 (19:26 +0100)]
[ARM] 3602/1: ixp23xx: fix two typos
Patch from Lennert Buytenhek
Fix two typos in include/asm-arm/arch-ixp23xx.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Al Viro [Tue, 20 Jun 2006 10:27:27 +0000 (03:27 -0700)]
[ATM]: fix broken uses of NIPQUAD in net/atm
NIPQUAD expects an l-value of type __be32, _NOT_ a pointer to __be32.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Al Viro [Tue, 20 Jun 2006 10:26:14 +0000 (03:26 -0700)]
[SCTP]: sctp_unpack_cookie() fix
sizeof(pointer) != sizeof(array)...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Steve Grubb [Mon, 12 Jun 2006 11:48:28 +0000 (07:48 -0400)]
[PATCH] make set_loginuid obey audit_enabled
Hi,
I was doing some testing and noticed that when the audit system was disabled,
I was still getting messages about the loginuid being set. The following patch
makes audit_set_loginuid look at in_syscall to determine if it should create
an audit event. The loginuid will continue to be set as long as there is a context.
Signed-off-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Amy Griffis [Fri, 9 Jun 2006 03:19:31 +0000 (23:19 -0400)]
[PATCH] log more info for directory entry change events
When an audit event involves changes to a directory entry, include
a PATH record for the directory itself. A few other notable changes:
- fixed audit_inode_child() hooks in fsnotify_move()
- removed unused flags arg from audit_inode()
- added audit log routines for logging a portion of a string
Here's some sample output.
before patch:
type=SYSCALL msg=audit(
1149821605.320:26): arch=
40000003 syscall=39 success=yes exit=0 a0=
bf8d3c7c a1=1ff a2=
804e1b8 a3=
bf8d3c7c items=1 ppid=739 pid=800 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS0 comm="mkdir" exe="/bin/mkdir" subj=root:system_r:unconfined_t:s0-s0:c0.c255
type=CWD msg=audit(
1149821605.320:26): cwd="/root"
type=PATH msg=audit(
1149821605.320:26): item=0 name="foo" parent=164068 inode=164010 dev=03:00 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=root:object_r:user_home_t:s0
after patch:
type=SYSCALL msg=audit(
1149822032.332:24): arch=
40000003 syscall=39 success=yes exit=0 a0=
bfdd9c7c a1=1ff a2=
804e1b8 a3=
bfdd9c7c items=2 ppid=714 pid=777 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS0 comm="mkdir" exe="/bin/mkdir" subj=root:system_r:unconfined_t:s0-s0:c0.c255
type=CWD msg=audit(
1149822032.332:24): cwd="/root"
type=PATH msg=audit(
1149822032.332:24): item=0 name="/root" inode=164068 dev=03:00 mode=040750 ouid=0 ogid=0 rdev=00:00 obj=root:object_r:user_home_dir_t:s0
type=PATH msg=audit(
1149822032.332:24): item=1 name="foo" inode=164010 dev=03:00 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=root:object_r:user_home_t:s0
Signed-off-by: Amy Griffis <amy.griffis@hp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Amy Griffis [Fri, 2 Jun 2006 17:16:01 +0000 (13:16 -0400)]
[PATCH] fix AUDIT_FILTER_PREPEND handling
Clear AUDIT_FILTER_PREPEND flag after adding rule to list. This
fixes three problems when a rule is added with the -A syntax:
- auditctl displays filter list as "(null)"
- the rule cannot be removed using -d
- a duplicate rule can be added with -a
Signed-off-by: Amy Griffis <amy.griffis@hp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Mon, 5 Jun 2006 12:15:59 +0000 (08:15 -0400)]
[PATCH] validate rule fields' types
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Amy Griffis [Fri, 7 Apr 2006 20:55:56 +0000 (16:55 -0400)]
[PATCH] audit: path-based rules
In this implementation, audit registers inotify watches on the parent
directories of paths specified in audit rules. When audit's inotify
event handler is called, it updates any affected rules based on the
filesystem event. If the parent directory is renamed, removed, or its
filesystem is unmounted, audit removes all rules referencing that
inotify watch.
To keep things simple, this implementation limits location-based
auditing to the directory entries in an existing directory. Given
a path-based rule for /foo/bar/passwd, the following table applies:
passwd modified -- audit event logged
passwd replaced -- audit event logged, rules list updated
bar renamed -- rule removed
foo renamed -- untracked, meaning that the rule now applies to
the new location
Audit users typically want to have many rules referencing filesystem
objects, which can significantly impact filtering performance. This
patch also adds an inode-number-based rule hash to mitigate this
situation.
The patch is relative to the audit git tree:
http://kernel.org/git/?p=linux/kernel/git/viro/audit-current.git;a=summary
and uses the inotify kernel API:
http://lkml.org/lkml/2006/6/1/145
Signed-off-by: Amy Griffis <amy.griffis@hp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
George C. Wilson [Wed, 24 May 2006 21:09:55 +0000 (16:09 -0500)]
[PATCH] Audit of POSIX Message Queue Syscalls v.2
This patch adds audit support to POSIX message queues. It applies cleanly to
the lspp.b15 branch of Al Viro's git tree. There are new auxiliary data
structures, and collection and emission routines in kernel/auditsc.c. New hooks
in ipc/mqueue.c collect arguments from the syscalls.
I tested the patch by building the examples from the POSIX MQ library tarball.
Build them -lrt, not against the old MQ library in the tarball. Here's the URL:
http://www.geocities.com/wronski12/posix_ipc/libmqueue-4.41.tar.gz
Do auditctl -a exit,always -S for mq_open, mq_timedsend, mq_timedreceive,
mq_notify, mq_getsetattr. mq_unlink has no new hooks. Please see the
corresponding userspace patch to get correct output from auditd for the new
record types.
[fixes folded]
Signed-off-by: George Wilson <ltcgcw@us.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Darrel Goeddel [Wed, 24 May 2006 14:38:25 +0000 (09:38 -0500)]
[PATCH] fix se_sen audit filter
Fix a broken comparison that causes the process clearance to be checked for
both se_clr and se_sen audit filters.
Signed-off-by: Darrel Goeddel <dgoeddel@trustedcs.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Tue, 23 May 2006 05:36:13 +0000 (01:36 -0400)]
[PATCH] deprecate AUDIT_POSSBILE
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Thu, 18 May 2006 20:01:30 +0000 (16:01 -0400)]
[PATCH] inline more audit helpers
pull checks for ->audit_context into inlined wrappers
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Thu, 18 May 2006 12:28:02 +0000 (08:28 -0400)]
[PATCH] proc_loginuid_write() uses simple_strtoul() on non-terminated array
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Linda Knippers [Wed, 17 May 2006 02:03:48 +0000 (22:03 -0400)]
[PATCH] update of IPC audit record cleanup
The following patch addresses most of the issues with the IPC_SET_PERM
records as described in:
https://www.redhat.com/archives/linux-audit/2006-May/msg00010.html
and addresses the comments I received on the record field names.
To summarize, I made the following changes:
1. Changed sys_msgctl() and semctl_down() so that an IPC_SET_PERM
record is emitted in the failure case as well as the success case.
This matches the behavior in sys_shmctl(). I could simplify the
code in sys_msgctl() and semctl_down() slightly but it would mean
that in some error cases we could get an IPC_SET_PERM record
without an IPC record and that seemed odd.
2. No change to the IPC record type, given no feedback on the backward
compatibility question.
3. Removed the qbytes field from the IPC record. It wasn't being
set and when audit_ipc_obj() is called from ipcperms(), the
information isn't available. If we want the information in the IPC
record, more extensive changes will be necessary. Since it only
applies to message queues and it isn't really permission related, it
doesn't seem worth it.
4. Removed the obj field from the IPC_SET_PERM record. This means that
the kern_ipc_perm argument is no longer needed.
5. Removed the spaces and renamed the IPC_SET_PERM field names. Replaced iuid and
igid fields with ouid and ogid in the IPC record.
I tested this with the lspp.22 kernel on an x86_64 box. I believe it
applies cleanly on the latest kernel.
-- ljk
Signed-off-by: Linda Knippers <linda.knippers@hp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Serge E. Hallyn [Thu, 27 Apr 2006 21:45:14 +0000 (16:45 -0500)]
[PATCH] minor audit updates
Just a few minor proposed updates. Only the last one will
actually affect behavior. The rest are just misleading
code.
Several AUDIT_SET functions return 'old' value, but only
return value <0 is checked for. So just return 0.
propagate audit_set_rate_limit and audit_set_backlog_limit
error values
In audit_buffer_free, the audit_freelist_count was being
incremented even when we discard the return buffer, so
audit_freelist_count can end up wrong. This could cause
the actual freelist to shrink over time, eventually
threatening to degrate audit performance.
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Amy Griffis [Tue, 2 May 2006 19:06:01 +0000 (15:06 -0400)]
[PATCH] fix audit_krule_to_{rule,data} return values
Don't return -ENOMEM when callers of these functions are checking for
a NULL return. Bug noticed by Serge Hallyn.
Signed-off-by: Amy Griffis <amy.griffis@hp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Sat, 6 May 2006 12:26:27 +0000 (08:26 -0400)]
[PATCH] add filtering by ppid
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Sat, 6 May 2006 12:22:52 +0000 (08:22 -0400)]
[PATCH] log ppid
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Thu, 25 May 2006 14:19:47 +0000 (10:19 -0400)]
[PATCH] collect sid of those who send signals to auditd
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Wed, 26 Apr 2006 18:04:08 +0000 (14:04 -0400)]
[PATCH] execve argument logging
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Mon, 22 May 2006 05:09:24 +0000 (01:09 -0400)]
[PATCH] fix deadlocks in AUDIT_LIST/AUDIT_LIST_RULES
We should not send a pile of replies while holding audit_netlink_mutex
since we hold the same mutex when we receive commands. As the result,
we can get blocked while sending and sit there holding the mutex while
auditctl is unable to send the next command and get around to receiving
what we'd sent.
Solution: create skb and put them into a queue instead of sending;
once we are done, send what we've got on the list. The former can
be done synchronously while we are handling AUDIT_LIST or AUDIT_LIST_RULES;
we are holding audit_netlink_mutex at that point. The latter is done
asynchronously and without messing with audit_netlink_mutex.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Mon, 22 May 2006 05:36:34 +0000 (01:36 -0400)]
[PATCH] audit_panic() is audit-internal
... no need to provide a stub; note that extern is already gone from
include/linux/audit.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Amy Griffis [Thu, 1 Jun 2006 20:11:07 +0000 (13:11 -0700)]
[PATCH] inotify (5/5): update kernel documentation
Update kernel documentation to include a description of the inotify
kernel API.
Signed-off-by: Amy Griffis <amy.griffis@hp.com>
Acked-by: Robert Love <rml@novell.com>
Acked-by: John McCutchan <john@johnmccutchan.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Amy Griffis [Thu, 1 Jun 2006 20:11:05 +0000 (13:11 -0700)]
[PATCH] inotify (4/5): allow watch removal from event handler
Allow callers to remove watches from their event handler via
inotify_remove_watch_locked(). This functionality can be used to
achieve IN_ONESHOT-like functionality for a subset of events in the
mask.
Signed-off-by: Amy Griffis <amy.griffis@hp.com>
Acked-by: Robert Love <rml@novell.com>
Acked-by: John McCutchan <john@johnmccutchan.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Amy Griffis [Thu, 1 Jun 2006 20:11:03 +0000 (13:11 -0700)]
[PATCH] inotify (3/5): add interfaces to kernel API
Add inotify_init_watch() so caller can use inotify_watch refcounts
before calling inotify_add_watch().
Add inotify_find_watch() to find an existing watch for an (ih,inode)
pair. This is similar to inotify_find_update_watch(), but does not
update the watch's mask if one is found.
Add inotify_rm_watch() to remove a watch via the watch pointer instead
of the watch descriptor.
Signed-off-by: Amy Griffis <amy.griffis@hp.com>
Acked-by: Robert Love <rml@novell.com>
Acked-by: John McCutchan <john@johnmccutchan.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Amy Griffis [Thu, 1 Jun 2006 20:11:01 +0000 (13:11 -0700)]
[PATCH] inotify (2/5): add name's inode to event handler
When an inotify event includes a dentry name, also include the inode
associated with that name.
Signed-off-by: Amy Griffis <amy.griffis@hp.com>
Acked-by: Robert Love <rml@novell.com>
Acked-by: John McCutchan <john@johnmccutchan.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Amy Griffis [Thu, 1 Jun 2006 20:10:59 +0000 (13:10 -0700)]
[PATCH] inotify (1/5): split kernel API from userspace support
The following series of patches introduces a kernel API for inotify,
making it possible for kernel modules to benefit from inotify's
mechanism for watching inodes. With these patches, inotify will
maintain for each caller a list of watches (via an embedded struct
inotify_watch), where each inotify_watch is associated with a
corresponding struct inode. The caller registers an event handler and
specifies for which filesystem events their event handler should be
called per inotify_watch.
Signed-off-by: Amy Griffis <amy.griffis@hp.com>
Acked-by: Robert Love <rml@novell.com>
Acked-by: John McCutchan <john@johnmccutchan.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Fri, 2 Jun 2006 01:39:38 +0000 (21:39 -0400)]
[PATCH] remove config.h from inotify.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
David S. Miller [Tue, 20 Jun 2006 08:27:08 +0000 (01:27 -0700)]
[SPARC64]: Update defconfig.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 20 Jun 2006 08:23:56 +0000 (01:23 -0700)]
[SPARC64]: Don't double-export synchronize_irq.
It is done by the generic IRQ layer now.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 20 Jun 2006 08:23:32 +0000 (01:23 -0700)]
[SPARC64]: Move over to GENERIC_HARDIRQS.
This is the long overdue conversion of sparc64 over to
the generic IRQ layer.
The kernel image is slightly larger, but the BSS is ~60K
smaller due to the reduced size of struct ino_bucket.
A lot of IRQ implementation details, including ino_bucket,
were moved out of asm-sparc64/irq.h and are now private to
arch/sparc64/kernel/irq.c, and most of the code in irq.c
totally disappeared.
One thing that's different at the moment is IRQ distribution,
we do it at enable_irq() time. If the cpu mask is ALL then
we round-robin using a global rotating cpu counter, else
we pick the first cpu in the mask to support single cpu
targetting. This is similar to what powerpc's XICS IRQ
support code does.
This works fine on my UP SB1000, and the SMP build goes
fine and runs on that machine, but lots of testing on
different setups is needed.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 20 Jun 2006 08:22:35 +0000 (01:22 -0700)]
[SPARC64]: Virtualize IRQ numbers.
Inspired by PowerPC XICS interrupt support code.
All IRQs are virtualized in order to keep NR_IRQS from needing
to be too large. Interrupts on sparc64 are arbitrary 11-bit
values, but we don't need to define NR_IRQS to 2048 if we
virtualize the IRQs.
As PCI and SBUS controller drivers build device IRQs, we divy
out virtual IRQ numbers incrementally starting at 1. Zero is
a special virtual IRQ used for the timer interrupt.
So device drivers all see virtual IRQs, and all the normal
interfaces such as request_irq(), enable_irq(), etc. translate
that into a real IRQ number in order to configure the IRQ.
At this point knowledge of the struct ino_bucket is almost
entirely contained within arch/sparc64/kernel/irq.c There are
a few small bits in the PCI controller drivers that need to
be swept away before we can remove ino_bucket's definition
out of asm-sparc64/irq.h and privately into kernel/irq.c
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 20 Jun 2006 08:21:57 +0000 (01:21 -0700)]
[SPARC64]: Kill ino_bucket->pil
And reuse that struct member for virt_irq, which will
be used in future changesets for the implementation of
mapping between real and virtual IRQ numbers.
This nicely kills off a ton of SBUS and PCI controller
PIL assignment code which is no longer necessary.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 20 Jun 2006 08:21:29 +0000 (01:21 -0700)]
[SPARC]: Kill __irq_itoa().
This ugly hack was long overdue to die.
It was a way to print out Sparc interrupts in a more freindly format,
since IRQ numbers were arbitrary opaque 32-bit integers which vectored
into PIL levels. These 32-bit integers were not necessarily in the
0-->NR_IRQS range, but the PILs they vectored to were.
The idea now is that we will increase NR_IRQS a little bit and use a
virtual<-->real IRQ number mapping scheme similar to PowerPC.
That makes this IRQ printing hack irrelevant, and furthermore only a
handful of drivers actually used __irq_itoa() making it even less
useful.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 20 Jun 2006 08:20:30 +0000 (01:20 -0700)]
[SPARC64]: bp->pil can never be zero
Only pil0_dummy_bucket had a pil of zero and we just killed that
off, so we can delete all special case code that used bp->pil==0
as a way to identify a dummy bucket.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 20 Jun 2006 08:20:00 +0000 (01:20 -0700)]
[SPARC64]: Send all device interrupts via one PIL.
This is the first in a series of cleanups that will hopefully
allow a seamless attempt at using the generic IRQ handling
infrastructure in the Linux kernel.
Define PIL_DEVICE_IRQ and vector all device interrupts through
there.
Get rid of the ugly pil0_dummy_{bucket,desc}, instead vector
the timer interrupt directly to a specific handler since the
timer interrupt is the only event that will be signaled on
PIL 14.
The irq_worklist is now in the per-cpu trap_block[].
Signed-off-by: David S. Miller <davem@davemloft.net>
Bob Breuer [Tue, 20 Jun 2006 07:36:56 +0000 (00:36 -0700)]
[SPARC]: Fix iommu_flush_iotlb end address
Fix the calculation of the end address when flushing iotlb entries to
ram. This bug has been a cause of esp dma errors, and it affects
HyperSPARC systems much worse than SuperSPARC systems.
Signed-off-by: Bob Breuer <breuerr@mc.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bob Breuer [Tue, 20 Jun 2006 07:36:10 +0000 (00:36 -0700)]
[SPARC]: Mark smp init functions as cpuinit
Fix the smp related section mismatch warnings by marking the smp init
functions as cpuinit.
Signed-off-by: Bob Breuer <breuerr@mc.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bob Breuer [Tue, 20 Jun 2006 07:35:13 +0000 (00:35 -0700)]
[SPARC]: Add missing rw can_lock macros
Fix a link failure by adding the missing can_lock macros for the rw
locks.
Signed-off-by: Bob Breuer <breuerr@mc.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bob Breuer [Tue, 20 Jun 2006 07:30:31 +0000 (00:30 -0700)]
[SPARC]: Setup cpu_possible_map
Setup cpu_possible_map so the secondary cpus will get started.
Signed-off-by: Bob Breuer <breuerr@mc.net>
Signed-off-by: David S. Miller <davem@davemloft.net>