summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* powerpc: pseries/dtl.c should include asm/firmware.hSachin Sant2009-04-151-0/+1
| | | | | | | | | | | | | | A randconfig build on powerpc failed with: dtl.c: In function 'dtl_init': dtl.c:238: error: implicit declaration of function 'firmware_has_feature' dtl.c:238: error: 'FW_FEATURE_SPLPAR' undeclared (first use in this function) - We need firmware.h for these definitions. Signed-off-by: Sachin Sant <sachinp@in.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Fix data-corrupting bug in __futex_atomic_opPaul Mackerras2009-04-151-6/+6
| | | | | | | | | | | | | | Richard Henderson pointed out that the powerpc __futex_atomic_op has a bug: it will write the wrong value if the stwcx. fails and it has to retry the lwarx/stwcx. loop, since 'oparg' will have been overwritten by the result from the first time around the loop. This happens because it uses the same register for 'oparg' (an input) as it uses for the result. This fixes it by using separate registers for 'oparg' and 'ret'. Cc: stable@kernel.org Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc/pseries: Set error_state to pci_channel_io_normal in eeh_report_reset()Mike Mason2009-04-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While adding native EEH support to Emulex and Qlogic drivers, it was discovered that dev->error_state was set to pci_io_channel_normal too late in the recovery process. These drivers rely on error_state to determine if they can access the device in their slot_reset callback, thus error_state needs to be set to pci_io_channel_normal in eeh_report_reset(). Below is a detailed explanation (courtesy of Richard Lary) as to why this is necessary. Background: PCI MMIO or DMA accesses to a frozen slot generate additional EEH errors. If the number of additional EEH errors exceeds EEH_MAX_FAILS the adapter will be shutdown. To avoid triggering excessive EEH errors and an undesirable adapter shutdown, some drivers use the pci_channel_offline(dev) wrapper function to return a Boolean value based on the value of pci_dev->error_state to determine if PCI MMIO or DMA accesses are safe. If the wrapper returns TRUE, drivers must not make PCI MMIO or DMA access to their hardware. The pci_dev structure member error_state reflects one of three values, 1) pci_channel_io_normal, 2) pci_channel_io_frozen, 3) pci_channel_io_perm_failure. Function pci_channel_offline(dev) returns TRUE if error_state is pci_channel_io_frozen or pci_channel_io_perm_failure. The EEH driver sets pci_dev->error_state to pci_channel_io_frozen at the point where the PCI slot is frozen. Currently, the EEH driver restores dev->error_state to pci_channel_io_normal in eeh_report_resume() before calling the driver's resume callback. However, when the EEH driver calls the driver's slot_reset callback() from eeh_report_reset(), it incorrectly indicates the error state is still pci_channel_io_frozen. Waiting until eeh_report_resume() to restore dev->error_state to pci_channel_io_normal is too late for Emulex and QLogic FC drivers and any other drivers which are designed to use common code paths in these two cases: i) those called after the driver's slot_reset callback() and ii) those called after the PCI slot is frozen but before the driver's slot_reset callback is called. Case i) all driver paths executed to reinitialize the hardware after a reset and case ii) all code paths executed by driver kernel threads that run asynchronous to the main driver thread, such as interrupt handlers and worker threads to process driver work queues. Emulex and QLogic FC drivers are designed with common code paths which require that pci_channel_offline(dev) reflect the true state of the hardware. The state transitions that the hardware takes from Normal Operations to Slot Frozen to Reset to Normal Operations are documented in the Power Architecture™ Platform Requirements+ (PAPR+) in Table 75. PE State Control. PAPR defines the following 3 states: 0 -- Not reset, Not EEH stopped, MMIO load/store allowed, DMA allowed (Normal Operations) 1 -- Reset, Not EEH stopped, MMIO load/store disabled, DMA disabled 2 -- Not reset, EEH stopped, MMIO load/store disabled, DMA disabled (Slot Frozen) An EEH error places the slot in state 2 (Frozen) and the adapter driver is notified that an EEH error was detected. If the adapter driver returns PCI_ERS_RESULT_NEED_RESET, the EEH driver calls eeh_reset_device() to place the slot into state 1 (Reset) and eeh_reset_device completes by placing the slot into State 0 (Normal Operations). Upon return from eeh_reset_device(), the EEH driver calls eeh_report_reset, which then calls the adapter's slot_reset callback. At the time the adapter's slot_reset callback is called, the true state of the hardware is Normal Operations and should be accurately reflected by setting dev->error_state to pci_channel_io_normal. The current implementation of EEH driver does not do so and requires this change to correct this deficiency. Signed-off-by: Mike Mason <mmlnx@us.ibm.com> Acked-by: Linas Vepstas <linasvepstas@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Allow 256kB pages with SHMEMHugh Dickins2009-04-151-1/+1
| | | | | | | | Now that shmem's divisions by zero and SHMEM_MAX_BYTES are fixed, let powerpc 256kB pages coexist with CONFIG_SHMEM again. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Document new FSL I2C bindings and cleanupWolfgang Grandegger2009-04-082-19/+31
| | | | | | | | | This patch documents the new bindings for the MPC I2C bus driver. Furthermore, it removes obsolete FSL device related definitions for I2C. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/mm: Fix compile warningKumar Gala2009-04-071-1/+0
| | | | | | | arch/powerpc/mm/tlb_nohash.c: In function 'flush_tlb_mm': arch/powerpc/mm/tlb_nohash.c:128: warning: unused variable 'cpu_mask' Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/85xx: TQM8548: update defconfigWolfgang Grandegger2009-04-071-116/+48
| | | | | | | | | Enable highmem support for the TQM8548-AG modules and NAND support for the TQM8548-BE modules. Furthermore disable USB, Wireless and IDE support because it's not available on the STK85xx starter kit. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/85xx: TQM8548: use proper phy-handles for enet2 and enet3Wolfgang Grandegger2009-04-072-4/+4
| | | | | | | | For enet2 and enet3 the wrong phy-handles have been used in DTS files of the TQM8548 modules. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/85xx: TQM85xx: correct address of LM75 I2C device nodesWolfgang Grandegger2009-04-076-12/+12
| | | | | | | | | Commit 0f73a449a649acfca91404a98a35353a618b9555 added I2C device nodes for the LM75 thermal sensor on the TQM85xx modules, unfortunately with the wrong I2C address. The LM75s are located at address 0x48. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc: Add support for early tlbilx opcodeKumar Gala2009-04-074-3/+30
| | | | | | | | During the ISA 2.06 development the opcode for tlbilx changed and some early implementations used to old opcode. Add support for a MMU_FTR fixup to deal with this. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc: Fix tlbilx opcodeKumar Gala2009-04-071-1/+1
| | | | | | | | The tlbilx opcode was not matching the Power ISA 2.06 arch spec. The old opcode was an early suggested opcode that changed during the 2.06 architecture process. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc: Fix oops when loading modulesPaul Mackerras2009-04-071-2/+4
| | | | | | | | | | | | | | | This fixes a problem reported by Sean MacLennan where loading any module would cause an oops. We weren't marking the pages containing the module text as having hardware execute permission, due to a bug introduced in commit 8d1cf34e ("powerpc/mm: Tweak PTE bit combination definitions"), hence trying to execute the module text caused an exception on processors that support hardware execute permission. This adds _PAGE_HWEXEC to the definitions of PAGE_KERNEL_X and PAGE_KERNEL_ROX to fix this problem. Reported-by: Sean MacLennan <smaclennan@pikatech.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Wire up preadv and pwritevStephen Rothwell2009-04-072-1/+6
| | | | | | | | [paulus@samba.org: changed to use syscall numbers 320 and 321 since perf_counters is currently using 319.] Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc/ftrace: Fix printf format warningMichael Ellerman2009-04-071-1/+1
| | | | | | | | | | | 'tramp' is an unsigned long, so print it with %lx. Fixes the following build warning: arch/powerpc/kernel/ftrace.c:291: error: format ‘%x’ expects type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc/ftrace: Fix #if that should be #ifdefMichael Ellerman2009-04-071-1/+1
| | | | | | | | | | | | | Commit bb7253403f7a4670a128e4c080fd8ea1bd4d5029 ("powerpc64, ftrace: save toc only on modules for function graph"), added an #if CONFIG_PPC64. This changes it to #ifdef. Fixes the following warning on 32-bit builds: arch/powerpc/kernel/ftrace.c:562:5: error: "CONFIG_PPC64" is not defined Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Fix ptrace compat wrapper for FPU register accessMichael Neuling2009-04-071-4/+11
| | | | | | | | | | | | | | The ptrace compat wrapper mishandles access to the fpu registers. The PTRACE_PEEKUSR and PTRACE_POKEUSR requests miscalculate the index into the fpr array due to the broken FPINDEX macro. The PPC_PTRACE_PEEKUSR_3264 request needs to use the same formula that the native ptrace interface uses when operating on the register number (as opposed to the 4-byte offset). The PPC_PTRACE_POKEUSR_3264 request didn't take TS_FPRWIDTH into account. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Print information about mapping hw irqs to virtual irqsMichael Ellerman2009-04-071-1/+3
| | | | | | | | | | | | | | | The irq remapping layer seems to cause some confusion when people see a different irq number in /proc/interrupts vs the one they request in their driver or DTS. So have the irq remapping layer print out a message when we map an irq. The message is only printed the first time the irq is mapped, and it's KERN_DEBUG so most people won't see it. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Correct dependency of KEXECGeert Uytterhoeven2009-04-071-1/+1
| | | | | | | | | commit 28794d34ecb6815a3fa0a4256027c9b081a17c5f ("powerpc/kconfig: Kill PPC_MULTIPLATFORM") broke KEXEC, by making it dependent on BOOK3S, while it should be PPC_BOOK3S. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Disable VSX or current process in giveup_fpu/altivecMichael Neuling2009-04-072-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | When we call giveup_fpu, we need to need to turn off VSX for the current process. If we don't, on return to userspace it may execute a VSX instruction before the next FP instruction, and not have its register state refreshed correctly from the thread_struct. Ditto for altivec. This caused a bug where an unaligned lfs or stfs results in fix_alignment calling giveup_fpu so it can use the FPRs (in order to do a single <-> double conversion), and then returning to userspace with FP off but VSX on. Then if a VSX instruction is executed, before another FP instruction, it will proceed without another exception and hence have the incorrect register state for VSX registers 0-31. lfs unaligned <- alignment exception turns FP off but leaves VSX on VSX instruction <- no exception since VSX on, hence we get the wrong VSX register values for VSX registers 0-31, which overlap the FPRs. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc/pseries: Enable relay in pseries_defconfigAnton Blanchard2009-04-071-1/+1
| | | | | | | | Enable relay in pseries config, ppc64_defconfig had it enabled but pseries did not. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc/pseries: Fix ibm,client-architecture commentAnton Blanchard2009-04-071-1/+1
| | | | | | | We specify a 64MB RMO, but the comment says 128MB. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc/pseries: Scan for all events in rtasdAnton Blanchard2009-04-071-1/+2
| | | | | | | | Instead of checking for known events, pass in all 1s so we handle future event types. We were currently missing the IO event type. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc/pseries: Add dispatch dispersion statisticsAnton Blanchard2009-04-072-1/+17
| | | | | | | | PHYP tells us how often a shared processor dispatch changed physical cpus. This can highlight performance problems caused by the hypervisor. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Clean up some prom printoutsAnton Blanchard2009-04-071-4/+4
| | | | | | | Make all messages consistent, some have spaces before the "...", some do not. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Print progress of ibm,client-architecture methodAnton Blanchard2009-04-071-3/+5
| | | | | | | | | | | | | | | | | | The ibm,client-architecture method will often cause a reconfiguration reboot. When this happens the last thing we see is: Hypertas detected, assuming LPAR ! Which doesn't explain what just happened. Wrap the ibm,client-architecture so it's clear what is going on: Calling ibm,client-architecture... done In order to maintain the law of conservation of screen real estate, downgrade two other messages to debug. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Remove duplicated #include'sHuang Weiyi2009-04-072-2/+0
| | | | | | | | | Remove duplicated #include's in - arch/powerpc/include/asm/ps3fb.h - arch/powerpc/kernel/setup-common.c Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc/pmac: Fix internal modem IRQ on Wallstreet PowerBookBenjamin Herrenschmidt2009-04-071-0/+15
| | | | | | | | | | | | | | | | | | | | The (relatively) new pmac_zilog driver doesn't use the pre-munged IRQ numbers from the macio_dev unlike other macio things, it directly maps it off the OF device-tree. It does that because it can be initialized much earlier than the registration of the macio devices, in order to get a serial console early. Unfortunately, that means that it "misses" some fixups done by the macio layer to work around missing interrupt descriptions in the device-tree of the Wallstreet machines. This patch brings the necessary workaround into the pmac_zilog driver itself to bring it back to working condition. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc/wdrtas: Update wdrtas_get_interval to use rtas_data_bufMark Nelson2009-04-071-2/+11
| | | | | | | | | | | | | | | The buffer passed to the ibm,get-system-parameter RTAS call must be in the RMA. To ensure we pass an address in the RMA use rtas_data_buf for the actual RTAS call and then copy the result to value. We can't just make it static because this can be compiled in as a module. Also add the WDRTAS_SP_SPI_LEN so we don't litter '4' throughout the function. Signed-off-by: Mark Nelson <markn@au1.ibm.com> Tested-by: Adrian Reber <adrian@lisas.de> Acked-by: Utz Bacher <utz.bacher@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* Merge branch 'next' of ↵Paul Mackerras2009-04-0719-97/+139
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into merge
| * fsl-diu-fb: Pass the proper device for dma mapping routinesAnton Vorontsov2009-04-061-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver should pass a device that specifies internal DMA ops, but currently NULL pointers are passed, and thus following bug pops up: Freescale DIU driver ------------[ cut here ]------------ kernel BUG at arch/powerpc/include/asm/dma-mapping.h:237! Oops: Exception in kernel mode, sig: 5 [#1] ... NIP [c01658b4] allocate_buf+0x0/0x8 LR [c0306554] fsl_diu_probe+0x2b4/0x518 Call Trace: [df02be10] [c030638c] fsl_diu_probe+0xec/0x518 (unreliable) [df02be60] [c020cdec] of_platform_device_probe+0x5c/0x84 [df02be80] [c018f5d0] really_probe+0x78/0x1a0 [df02bea0] [c018f7c0] __driver_attach+0xa4/0xa8 [df02bec0] [c018ea00] bus_for_each_dev+0x60/0x9c [df02bef0] [c018f414] driver_attach+0x24/0x34 [df02bf00] [c018f168] bus_add_driver+0x12c/0x1cc [df02bf20] [c018fbdc] driver_register+0x6c/0x110 [df02bf30] [c020ccb4] of_register_driver+0x54/0x70 [df02bf40] [c03d0a50] fsl_diu_init+0x70/0xa4 ... This patch fixes the issue. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc/pq2fads: Update device tree for use with device-tree-aware u-boot.Scott Wood2009-04-061-6/+14
| | | | | | | | | | | | | | | | | | | | Add aliases, and correct CS0 offset to match how u-boot programs it (this was not a problem with cuImage because the wrapper would reprogram the localbus to match the device tree). Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * cpm_uart: Disable CPM udbg when re-initing CPM uart, even if not the console.Scott Wood2009-04-061-4/+4
| | | | | | | | | | | | | | | | | | | | Previously, if udbg was using the CPM uart, and the normal CPM uart driver was enabled, but the console was directed elsewhere, udbg would not be stopped prior to initialization. This resulted in udbg hanging forever waiting for the CPM to process a descriptor. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * cpm_uart: Initialize port.dev before it's used.Scott Wood2009-04-061-3/+3
| | | | | | | | | | | | | | | | Previously, this caused NULL to sometimes be passed as a device to the DMA code. With recent DMA changes, that now causes a BUG(). Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc: Add support for CoreInt delivery of interrupts on MPICKumar Gala2009-04-062-0/+46
| | | | | | | | | | | | | | | | | | CoreInt provides a mechansim to deliver the IRQ vector directly into the core on an interrupt (via the SPR EPR) rather than having to go IACK on the PIC. This is suppose to provide an improvment in interrupt latency by reducing the time to get the IRQ vector. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc/math-emu: Change types to work on ppc64Kumar Gala2009-04-021-3/+3
| | | | | | | | | | | | | | | | | | | | While normally we don't use the math emulation code on ppc64 it can be useful for doing things like emulating the embedded FP instructions. Since performance isn't critical in this scenario its easier to keep the sizes of the various math-emu the same as on ppc32. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc/85xx: Re-add the device_type soc to socrates.dtsWolfgang Grandegger2009-04-021-0/+1
| | | | | | | | | | | | | | The device_type "soc" is still required for MPC85xx boards. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc: Move SPEFSCR defines to common headerKumar Gala2009-04-022-30/+30
| | | | | | | | | | | | | | | | SPEFSCR is a user space register and doesn't conflict with anything. Moving the defines of the various bit fields makes some emulation code have fewer ifdefs Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc/85xx: Use fsl,mpc85.. as prefix for memory ctrl & l2-cache nodesKumar Gala2009-03-318-16/+16
| | | | | | | | | | | | | | | | | | Older devices tree's used "fsl,85.." instead of the preferred "fsl,mpc85.." for the memory controller & l2 cache controller nodes. The EDAC code is the only use of these and has been updated for some time to support both "fsl,85.." and "fsl,mpc85.." Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc: Remove unused symbols from fsl_devices.hGrant Likely2009-03-311-22/+0
| | | | | | | | | | | | | | | | | | Remove old artifacts leftover from the platform driver gianfar and fsl_i2c drivers. These symbols became unused when the drivers were migrated over to use the of_platform bus. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc: Make LOWMEM_CAM_NUM depend on FSL_BOOKEJosh Boyer2009-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | The recent addition of CONFIG_LOWMEM_CAM_BOOL and CONFIG_LOWMEM_CAM_NUM cause the latter to show up in configs that do not need it during 'make oldconfig'. Make LOWMEM_CAM_NUM depend on FSL_BOOKE. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | Merge branch 'audit.b62' of ↵Linus Torvalds2009-04-054-28/+32
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current * 'audit.b62' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: Audit: remove spaces from audit_log_d_path audit: audit_set_auditable defined but not used audit: incorrect ref counting in audit tree tag_chunk audit: Fix possible return value truncation in audit_get_context() audit: ignore terminating NUL in AUDIT_USER_TTY messages Audit: fix handling of 'strings' with NULL characters make the e->rule.xxx shorter in kernel auditfilter.c auditsc: fix kernel-doc notation audit: EXECVE record - removed bogus newline
| * | Audit: remove spaces from audit_log_d_pathEric Paris2009-04-052-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | audit_log_d_path had spaces in the strings which would be emitted on the error paths. This patch simply replaces those spaces with an _ or removes the needless spaces entirely. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | audit: audit_set_auditable defined but not usedEric Paris2009-04-051-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after 0590b9335a1c72a3f0defcc6231287f7817e07c8 audit_set_auditable() is now only used by the audit tree code. If CONFIG_AUDIT_TREE is unset it will be defined but unused. This patch simply moves the function inside a CONFIG_AUDIT_TREE block. cc1: warnings being treated as errors /home/acme_unencrypted/git/linux-2.6-tip/kernel/auditsc.c:745: error: ‘audit_set_auditable’ defined but not used make[2]: *** [kernel/auditsc.o] Error 1 make[1]: *** [kernel] Error 2 make[1]: *** Waiting for unfinished jobs.... Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | audit: incorrect ref counting in audit tree tag_chunkEric Paris2009-04-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tag_chunk has bad exit paths in which the inotify ref counting is wrong. At the top of the function we found &old_watch using inotify_find_watch(). inotify_find_watch takes a reference to the watch. This is never dropped on an error path. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | audit: Fix possible return value truncation in audit_get_context()Paul Moore2009-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The audit subsystem treats syscall return codes as type long, unfortunately the audit_get_context() function mistakenly converts the return code to an int type in the parameters which could cause problems on systems where the sizeof(int) != sizeof(long). Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | audit: ignore terminating NUL in AUDIT_USER_TTY messagesMiloslav Trmac2009-04-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AUDIT_USER_TTY, like all other messages sent from user-space, is sent NUL-terminated. Unlike other user-space audit messages, which come only from trusted sources, AUDIT_USER_TTY messages are processed using audit_log_n_untrustedstring(). This patch modifies AUDIT_USER_TTY handling to ignore the trailing NUL and use the "quoted_string" representation of the message if possible. Signed-off-by: Miloslav Trmac <mitr@redhat.com> Cc: Eric Paris <eparis@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Steve Grubb <sgrubb@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | Audit: fix handling of 'strings' with NULL charactersMiloslav Trmac2009-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | currently audit_log_n_untrustedstring() uses audit_string_contains_control() to check if the 'string' has any control characters. If the 'string' has an embedded NULL audit_string_contains_control() will return that the data has no control characters and will then pass the string to audit_log_n_string with the total length, not the length up to the first NULL. audit_log_n_string() does a memcpy of the entire length and so the actual audit record emitted may then contain a NULL and then whatever random memory is after the NULL. Since we want to log the entire octet stream (if we can't trust the data to be a string we can't trust that a NULL isn't actually a part of it) we should just consider NULL as a control character. If the caller is certain they want to stop at the first NULL they should be using audit_log_untrustedstring. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | make the e->rule.xxx shorter in kernel auditfilter.cZhenwen Xu2009-04-051-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make the e->rule.xxx shorter in kernel/auditfilter.c -- --------------------------------- Zhenwen Xu - Open and Free Home Page: http://zhwen.org My Studio: http://dim4.cn >From 99692dc640b278f1cb1a15646ce42f22e89c0f77 Mon Sep 17 00:00:00 2001 From: Zhenwen Xu <Helight.Xu@gmail.com> Date: Thu, 12 Mar 2009 22:04:59 +0800 Subject: [PATCH] make the e->rule.xxx shorter in kernel/auditfilter.c Signed-off-by: Zhenwen Xu <Helight.Xu@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | auditsc: fix kernel-doc notationRandy Dunlap2009-04-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix auditsc kernel-doc notation: Warning(linux-2.6.28-git7//kernel/auditsc.c:2156): No description found for parameter 'attr' Warning(linux-2.6.28-git7//kernel/auditsc.c:2156): Excess function parameter 'u_attr' description in '__audit_mq_open' Warning(linux-2.6.28-git7//kernel/auditsc.c:2204): No description found for parameter 'notification' Warning(linux-2.6.28-git7//kernel/auditsc.c:2204): Excess function parameter 'u_notification' description in '__audit_mq_notify' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> cc: Al Viro <viro@zeniv.linux.org.uk> cc: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | audit: EXECVE record - removed bogus newlineJiri Pirko2009-04-051-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (updated) Added hunk that changes the comment, the rest is the same. EXECVE records contain a newline after every argument. auditd converts "\n" to " " so you cannot see newlines even in raw logs, but they're there nevertheless. If you're not using auditd, you need to work round them. These '\n' chars are can be easily replaced by spaces when creating record in kernel. Note there is no need for trailing '\n' in an audit record. record before this patch: "type=EXECVE msg=audit(1231421801.566:31): argc=4 a0=\"./test\"\na1=\"a\"\na2=\"b\"\na3=\"c\"\n" record after this patch: "type=EXECVE msg=audit(1231421801.566:31): argc=4 a0=\"./test\" a1=\"a\" a2=\"b\" a3=\"c\"" Signed-off-by: Jiri Pirko <jpirko@redhat.com> Acked-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
OpenPOWER on IntegriCloud