30 Oct, 2010
40 commits
-
Normal syscall audit doesn't catch 5th argument of syscall. It also
doesn't catch the contents of userland structures pointed to be
syscall argument, so for both old and new mmap(2) ABI it doesn't
record the descriptor we are mapping. For old one it also misses
flags.Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Protect the task lookups in audit_receive_msg() with rcu_read_lock()
instead of tasklist_lock and use lock/unlock_sighand to protect
against the exit race.Signed-off-by: Thomas Gleixner
Cc: Al Viro
Cc: Eric Paris
Cc: Oleg Nesterov
Signed-off-by: Al Viro -
audit_receive_msg() sends uninitialized data for AUDIT_TTY_GET when
the task was not found.Send reply only when task was found.
Signed-off-by: Thomas Gleixner
Cc: Al Viro
Cc: Eric Paris
Signed-off-by: Al Viro -
While auditing all tasklist_lock read_lock sites I stumbled over the
following call chain:audit_prepare_user_tty()
read_lock(&tasklist_lock);
tty_audit_push_task();
mutex_lock(&buf->mutex);--> buf->mutex is locked with preemption disabled.
Solve this by acquiring a reference to the task struct under
rcu_read_lock and call tty_audit_push_task outside of the preempt
disabled region.Move all code which needs to be protected by sighand lock into
tty_audit_push_task() and use lock/unlock_sighand as we do not hold
tasklist_lock.Signed-off-by: Thomas Gleixner
Cc: Al Viro
Cc: Eric Paris
Cc: Oleg Nesterov
Signed-off-by: Al Viro -
... while we are not holding spinlocks.
Signed-off-by: Al Viro
-
I was doing some namespace checks and found some simple stuff in
audit that could be cleaned up. Make some functions static, and
put const on make_reply payload arg.Signed-off-by: Stephen Hemminger
Signed-off-by: Al Viro -
Add support for matching by security label (e.g. SELinux context) of
the sender of an user-space audit record.The audit filter code already allows user space to configure such
filters, but they were ignored during evaluation. This patch implements
evaluation of these filters.For example, after application of this patch, PAM authentication logs
caused by cron can be disabled using
auditctl -a user,never -F subj_type=crond_tSigned-off-by: Miloslav Trmac
Acked-by: Eric Paris
Signed-off-by: Al Viro -
…org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, alternative: Call stop_machine_text_poke() on all cpus
x86-32: Restore irq stacks NUMA-aware allocations
x86, memblock: Fix early_node_mem with big reserved region.* 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, uv: More Westmere support on SGI UV
x86, uv: Enable Westmere support on SGI UV -
* 'msm-fixes' of git://codeaurora.org/quic/kernel/dwalker/linux-msm:
msm: Kconfig: drop unused config options
msm: fix compile failure when no debug uart is selected
msm: fix debug-macro.S build failure
msm: timer: Decrease shift on timer clocksource
arm: mach-msm: fix error handling in msm_iommu_probe()
msm: fix Kconfig target board selection
msm: fix compile failure on struct membank node member* 'msm-video' of git://codeaurora.org/quic/kernel/dwalker/linux-msm:
drivers/video/msm/mddi.c: Remove multiple KERN_ uses
drivers: msm: video: add dev_set_name call
drivers: video: msm: fix hang on disable_irq -
* 'for-2637/s3c24xx-all' of git://git.fluff.org/bjdooks/linux:
ARM: h1940: add UDA1380 to i2c devices list
ARM: h1940: Fix backlight and LCD power functions
ARM: S3C2440: fix boot failure introduced by recent changes in gpiolib
ARM: S3C2440: various fixes in Kconfig file
ARM: rx1950: Add UDA1380 to i2c devices list
ARM: rx1950: Add LEDs support
ARM: rx1950: Add battery device
ARM: h1940: Implement mmc_power function
ARM: h1940: Use gpiolib for latch access -
Register UDA1380 codec during H1940 machine init
Signed-off-by: Vasily Khoruzhick
Signed-off-by: Ben Dooks -
Current implementation of LCD and backlight power control functions
is not complete, as result PDA consumes power in suspend.
Fix this issue by managing state of some latch bits, just like
WinMobile does.Signed-off-by: Vasily Khoruzhick
Signed-off-by: Ben Dooks -
Currently, text_poke_smp() passes a NULL as the third argument to
__stop_machine(), which will only run stop_machine_text_poke()
on 1 cpu. Change NULL -> cpu_online_mask, as stop_machine_text_poke()
is intended to be run on all cpus.I actually didn't notice any problems with stop_machine_text_poke()
only being called on 1 cpu, but found this via code inspection.Signed-off-by: Jason Baron
LKML-Reference:
Acked-by: Mathieu Desnoyers
Acked-by: Masami Hiramatsu
Signed-off-by: H. Peter Anvin -
Recent changes in s3c gpio break mini2440 board and may be others.
The problem is that mach-mini2440.c: mini2440_init()
(where we call s3c_gpio_setpull()) is called before s3c2440.c: s3c2440_init()
(where we initialize s3c24xx_gpiocfg_default.set_pull function pointer).
This causes dereferencing of NULL pointer at boot time and a kernel panic.Signed-off-by: Abdoulaye Walsimou Gaye
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Ben Dooks -
* kconfig symbols defined in arch/arm/mach-s3c2440/Kconfig are only available
when ARCH_S3C2410 is selected, so no need to make some of them depend
on ARCH_S3C2410.
* fix CPU_S3C24405B typo in "config S3C2440_DMA".
* mini2440: remove unconditionally select of SND_S3C24XX_SOC_S3C24XX_UDA134X.
Those fixes avoid the following warnings at make time:scripts/kconfig/qconf arch/arm/Kconfig
warning: (MACH_MINI2440 && ARCH_S3C2410) selects SND_S3C24XX_SOC_S3C24XX_UDA134X
which has unmet direct dependencies (SND_S3C24XX_SOC && ARCH_S3C2410)
warning: (CPU_S3C2440 && ARCH_S3C2410 && S3C2410_DMA) selects S3C2440_DMA which
has unmet direct dependencies (ARCH_S3C2410 && CPU_S3C24405B)
warning: (CPU_S3C2440 && ARCH_S3C2410 || CPU_S3C2442 && ARCH_S3C2410)
selects CPU_S3C244X which has unmet direct dependencies (!ARCH_S3C2410)Signed-off-by: Abdoulaye Walsimou Gaye
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Ben Dooks -
* 'for-2637/i2c-all' of git://git.fluff.org/bjdooks/linux:
i2c-intel-mid: Driver depends on PCI
i2c-intel-mid: support for Moorestown and Medfield platform
i2c-nomadik: fixup bus delays
i2c-nomadik: support smbus emulation
i2c-nomadik: dynamic clocking
i2c-nomadik: documentation fixes
i2c-s3c2410: Enable i2c clock only when doing some transfert -
These two config options don't exist, and aren't ever going to.
So I simply delete them.Signed-off-by: Daniel Walker
-
If the board has a debug uart the user is given a choice of which
uart to use. The user can also select NONE, which means not to use one.
In most of our header files when NONE is selected nothing is defined
for MSM_DEBUG_UART_PHYS or MSM_DEBUG_UART_BASE. This causes a compile
failure in debug-macro.S which expect something to be defined there.Example of the failure,
arch/arm/kernel/built-in.o: In function `hexbuf':
linux-2.6/arch/arm/kernel/debug.S:186: undefined reference to `MSM_DEBUG_UART_PHYS'
linux-2.6/arch/arm/kernel/debug.S:186: undefined reference to `MSM_DEBUG_UART_BASE'This fixes the compile failure by adding an ifdef to debug-macro.S
that removes all the debug uart code in the case of NONE.Signed-off-by: Daniel Walker
-
Originally there was an ifdef case to handle when no debug uart
was selected. In commit 0ea1293009826da45e1019f45dfde1e557bb30df
that case was removed which causes the following build failure,linux-2.6/arch/arm/kernel/debug.S: Assembler messages:
linux-2.6/arch/arm/kernel/debug.S:174: Error: bad instruction `addruart r1,r2'
linux-2.6/arch/arm/kernel/debug.S:176: Error: bad instruction `waituart r2,r3'
linux-2.6/arch/arm/kernel/debug.S:177: Error: bad instruction `senduart r1,r3'
linux-2.6/arch/arm/kernel/debug.S:178: Error: bad instruction `busyuart r2,r3'
linux-2.6/arch/arm/kernel/debug.S:190: Error: bad instruction `addruart r1,r2'This is a partial revert to add back the case which was removed with
two caveats. First the API for the addruart macro was updated, and
the new addruart case now return 0xfff00000 so that a know IO mapping
is created instead of a random one.Cc: Jeremy Kerr
Cc: Lorenzo Pieralisi
Cc: Jason Wang
Cc: Tony Lindgren
Cc: Nicolas Pitre
Cc: Russell King - ARM Linux
Signed-off-by: Daniel Walker -
i2c-intel-mid driver uses PCI data structs and interfaces,
so it should depend on PCI. Fixes these build errors:drivers/i2c/busses/i2c-intel-mid.c:977: error: implicit declaration of function 'pci_request_region'
drivers/i2c/busses/i2c-intel-mid.c:1077: error: implicit declaration of function 'pci_release_region'Signed-off-by: Randy Dunlap
Cc: Ba Zheng
Cc: Jean Delvare
Cc: Ben Dooks
Cc: linux-i2c@vger.kernel.org
Signed-off-by: Ben Dooks -
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
PM / Runtime: Fix typo in status comparison causing warning -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig:
kconfig: Have streamline_config process menuconfigs too
kconfig: Fix streamline_config to read multi line deps in Kconfig files
kconfig: Fix missing declaration of variable $dir in streamline_config.pl
kconfig: Fix variable name typo %prompts in streamline_config.pl
kconfig: Make localmodconfig handle environment variables -
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
b43: Fix warning at drivers/mmc/core/core.c:237 in mmc_wait_for_cmd
mac80211: fix failure to check kmalloc return value in key_key_read
libertas: Fix sd8686 firmware reload
ath9k: Fix incorrect access of rate flags in RC
netfilter: xt_socket: Make tproto signed in socket_mt6_v1().
stmmac: enable/disable rx/tx in the core with a single write.
net: atarilance - flags should be unsigned long
netxen: fix kdump
pktgen: Limit how much data we copy onto the stack.
net: Limit socket I/O iovec total length to INT_MAX.
USB: gadget: fix ethernet gadget crash in gether_setup
fib: Fix fib zone and its hash leak on namespace stop
cxgb3: Fix panic in free_tx_desc()
cxgb3: fix crash due to manipulating queues before registration
8390: Don't oops on starting dev queue
dccp ccid-2: Stop polling
dccp: Refine the wait-for-ccid mechanism
dccp: Extend CCID packet dequeueing interface
dccp: Return-value convention of hc_tx_send_packet()
igbvf: fix panic on load
... -
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
Staging: dream: remove dream driver and arch from tree -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6:
eCryptfs: Print mount_auth_tok_only param in ecryptfs_show_options
ecryptfs: added ecryptfs_mount_auth_tok_only mount parameter
ecryptfs: checking return code of ecryptfs_find_auth_tok_for_sig()
ecryptfs: release keys loaded in ecryptfs_keyring_auth_tok_for_sig()
eCryptfs: Clear LOOKUP_OPEN flag when creating lower file
ecryptfs: call vfs_setxattr() in ecryptfs_setxattr() -
Product codenames are OK, but once an actual product name is available,
it should be referenced as well.http://ark.intel.com/chipset.aspx?familyID=52499
Signed-off-by: Valdis Kletnieks
Signed-off-by: Linus Torvalds -
This code is stalled, with no one working on it anymore, and the main
msm code is now going through the proper channels to get merged
correctly.So remove it as it contains a number of kernel information leaks and it
is doubtful if it even still builds anymore.Acked-by: Pavel Machek
Acked-by: Bryan Huntsman
Signed-off-by: Greg Kroah-Hartman -
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
kgdb,ppc: Individual register get/set for ppc
kgdbts: prevent re-entry to kgdbts before it unregisters
debug_core,x86,blackfin: Clean up hw debug disable API
kdb: Fix early debugging crash regression
kgdb,arm: fix register dump
kdb: fix per_cpu command to remove supress mask
kdb: Add kdb kernel module sample -
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
parisc-agp: fix missing slab.h include -
On module removal, the sdio version of b43 generates the following warning:
[ 851.560519] ------------[ cut here ]------------
[ 851.560531] WARNING: at drivers/mmc/core/core.c:237 mmc_wait_for_cmd+0x88/0x90()
[ 851.560534] Hardware name: 20552PG
[ 851.560536] Modules linked in: b43(-) ssb mmc_block binfmt_misc rfcomm sco bnep ppdev l2cap ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge stp kvm_intel kvm arc4 iwlagn snd_hda_codec_conexant snd_hda_intel snd_hda_codec iwlcore snd_hwdep snd_pcm thinkpad_acpi mac80211 snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq r852 joydev snd_timer sm_common pcmcia nand snd_seq_device cfg80211 sdhci_pci btusb psmouse tpm_tis yenta_socket nand_ids lp snd pcmcia_rsrc nand_ecc bluetooth sdhci tpm pcmcia_core parport mtd snd_page_alloc serio_raw tpm_bios soundcore nvram led_class sha256_generic aes_i586 aes_generic dm_crypt i915 drm_kms_helper drm ahci intel_agp i2c_algo_bit intel_gtt e1000e libahci video agpgart output
[ 851.560620] Pid: 2504, comm: rmmod Not tainted 2.6.36-titan0+ #1
[ 851.560622] Call Trace:
[ 851.560631] [] warn_slowpath_common+0x72/0xa0
[ 851.560636] [] ? mmc_wait_for_cmd+0x88/0x90
[ 851.560641] [] ? mmc_wait_for_cmd+0x88/0x90
[ 851.560645] [] warn_slowpath_null+0x22/0x30
[ 851.560649] [] mmc_wait_for_cmd+0x88/0x90
[ 851.560655] [] ? device_release+0x25/0x80
[ 851.560660] [] mmc_io_rw_direct_host+0xa0/0x150
[ 851.560665] [] mmc_io_rw_direct+0x30/0x40
[ 851.560669] [] sdio_disable_func+0x37/0xa0
[ 851.560683] [] b43_sdio_remove+0x30/0x50 [b43]
[ 851.560687] [] sdio_bus_remove+0x1c/0x60
[ 851.560692] [] ? blocking_notifier_call_chain+0x1f/0x30
[ 851.560697] [] __device_release_driver+0x51/0xb0
[ 851.560701] [] driver_detach+0x8f/0xa0
[ 851.560705] [] bus_remove_driver+0x63/0xa0
[ 851.560709] [] driver_unregister+0x49/0x80
[ 851.560713] [] ? driver_unregister+0x49/0x80
[ 851.560718] [] sdio_unregister_driver+0x17/0x20
[ 851.560727] [] b43_sdio_exit+0x12/0x20 [b43]
[ 851.560734] [] b43_exit+0x17/0x3c [b43]
[ 851.560740] [] sys_delete_module+0x13d/0x200
[ 851.560747] [] ? do_munmap+0x212/0x300
[ 851.560752] [] sysenter_do_call+0x12/0x28
[ 851.560757] ---[ end trace 31e14488072d2f7d ]---
[ 851.560759] ------------[ cut here ]------------The warning is caused by b43 not claiming the device before calling
sdio_disable_func().Signed-off-by: Larry Finger
Reported-by: Arnd Hannemann
Tested-by: Arnd Hannemann
Cc: Stable
Signed-off-by: John W. Linville -
I noticed two small issues in mac80211/debugfs_key.c::key_key_read while
reading through the code. Patch below.The key_key_read() function returns ssize_t and the value that's actually
returned is the return value of simple_read_from_buffer() which also
returns ssize_t, so let's hold the return value in a ssize_t local
variable rather than a int one.Also, memory is allocated dynamically with kmalloc() which can fail, but
the return value of kmalloc() is not checked, so we may end up operating
on a null pointer further on. So check for a NULL return and bail out with
-ENOMEM in that case.Signed-off-by: Jesper Juhl
Signed-off-by: John W. Linville -
For the SD8686, we cannot rely on the scratch register to read the firmware
load status, because the same register is used for storing RX packet length.
Broaden the check to account for this.The module can now be unloaded/reloaded successfully.
Based on the implementation from libertas_tf.
Signed-off-by: Daniel Drake
Acked-by: Dan Williams
Signed-off-by: Steve deRosier
Signed-off-by: John W. Linville -
The index variable to access the rate flags should be obtained from the
inner loop counter which corresponds to the rate table structure.This
fixes the invalid rate selection i.e when the supported basic rate is
invalid on a particular band and also the following warning message.
Thanks to Raj for finding this out.Call Trace:
[] warn_slowpath_common+0x7a/0xb0
[] warn_slowpath_null+0x15/0x20
[] ath_get_rate+0x595/0x5b0 [ath9k]
[] ? cpumask_next_and+0x36/0x50
[] rate_control_get_rate+0x86/0x160 [mac80211]
[] invoke_tx_handlers+0x81c/0x12d0 [mac80211]
[] ieee80211_tx+0x89/0x2b0 [mac80211]
[] ? pskb_expand_head+0x1cc/0x1f0
[] ieee80211_xmit+0xb5/0x1c0 [mac80211]
[] ieee80211_tx_skb+0x4f/0x60 [mac80211]
[] ieee80211_send_nullfunc+0x46/0x60 [mac80211]
[] ieee80211_offchannel_stop_station+0x107/0x150
[mac80211][] ? pskb_expand_head+0x1cc/0x1f0
[] ieee80211_xmit+0xb5/0x1c0 [mac80211]
[] ieee80211_tx_skb+0x4f/0x60 [mac80211]
[] ieee80211_send_nullfunc+0x46/0x60 [mac80211]
[] ieee80211_offchannel_stop_station+0x107/0x150
[mac80211][] ieee80211_scan_work+0x146/0x600 [mac80211]
[] ? schedule+0x2f5/0x8e0
[] ? ieee80211_scan_work+0x0/0x600 [mac80211]
[] process_one_work+0x10f/0x380
[] worker_thread+0x162/0x340
[] ? worker_thread+0x0/0x340
Cc: stable@kernel.org
Signed-off-by: Mohammed Shafi Shajakhan
Signed-off-by: John W. Linville -
commit 534af1082329392bc29f6badf815e69ae2ae0f4c(kgdb,kdb: individual
register set and and get API) introduce dbg_get_reg/dbg_set_reg API
for individual register get and set.This patch implement those APIs for ppc.
Signed-off-by: Dongdong Deng
Signed-off-by: Jason Wessel -
The "kgdb_connected" variable of debug_core just indicates whether or
not kgdbts is connected to the debug_core. It does not completely
prevent a script from trying invoke kgdbts again and possibly crashing
the system (see Call Trace below).The configured variable in kgtbts can be used instead of
kgdb_connected instead of kgdb_connected. The cleanup_kgdbts() can
also be removed because there is no possible way to build kgdbts as a
kernel module that you could unload with rmmod.Call Trace:
-----------------------------------------------------------------
root:/$ echo kgdbts=V1S1000 > /sys/module/kgdbts/parameters/kgdbts
kgdb: Unregistered I/O driver kgdbts, debugger disabled.
------------[ cut here ]------------
WARNING: at kernel/debug/debug_core.c:1002
kgdb_unregister_io_module+0xec/0x100()
Hardware name: Moon Creek platform
Modules linked in:
Pid: 664, comm: sh Not tainted 2.6.34.1-WR4.0.0.0_standard #58
Call Trace:
[] warn_slowpath_common+0x6d/0xa0
[] ? kgdb_unregister_io_module+0xec/0x100
[] ? kgdb_unregister_io_module+0xec/0x100
[] ? param_attr_store+0x0/0x20
[] warn_slowpath_null+0x15/0x20
[] kgdb_unregister_io_module+0xec/0x100
[] cleanup_kgdbts+0x1a/0x20
[] param_set_kgdbts_var+0x6d/0xb0
[] ? param_set_kgdbts_var+0x0/0xb0
[] param_attr_store+0x17/0x20
[] module_attr_store+0x2c/0x40
[] sysfs_write_file+0x94/0xf0
[] vfs_write+0x96/0x130
[] ? sysfs_write_file+0x0/0xf0
[] sys_write+0x46/0xd0
[] system_call_done+0x0/0x4
---[ end trace 4eb028c6ee43154c ]---
kgdb: Unregistered I/O driver kgdbts, debugger disabled.
-----------------------------------------------------------------[jason.wessel@windriver.com: remove cleanup_kgdbts() ]
Signed-off-by: Dongdong Deng
Signed-off-by: Jason Wessel