Commit Graph

270493 Commits

Author SHA1 Message Date
Jacob Shin
bd7bca8d19 x86: Exclude E820_RESERVED regions and memory holes above 4 GB from direct mapping.
commit 1bbbbe779a upstream.

On systems with very large memory (1 TB in our case), BIOS may report a
reserved region or a hole in the E820 map, even above the 4 GB range. Exclude
these from the direct mapping.

[ hpa: this should be done not just for > 4 GB but for everything above the legacy
  region (1 MB), at the very least.  That, however, turns out to require significant
  restructuring.  That work is well underway, but is not suitable for rc/stable. ]

Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Link: http://lkml.kernel.org/r/1319145326-13902-1-git-send-email-jacob.shin@amd.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-28 10:02:11 -07:00
Kees Cook
2f3dc85d23 use clamp_t in UNAME26 fix
commit 31fd84b95e upstream.

The min/max call needed to have explicit types on some architectures
(e.g. mn10300). Use clamp_t instead to avoid the warning:

  kernel/sys.c: In function 'override_release':
  kernel/sys.c:1287:10: warning: comparison of distinct pointer types lacks a cast [enabled by default]

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-28 10:02:11 -07:00
Kees Cook
58793e9b6b kernel/sys.c: fix stack memory content leak via UNAME26
commit 2702b1526c upstream.

Calling uname() with the UNAME26 personality set allows a leak of kernel
stack contents.  This fixes it by defensively calculating the length of
copy_to_user() call, making the len argument unsigned, and initializing
the stack buffer to zero (now technically unneeded, but hey, overkill).

CVE-2012-0957

Reported-by: PaX Team <pageexec@freemail.hu>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: PaX Team <pageexec@freemail.hu>
Cc: Brad Spengler <spender@grsecurity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-28 10:02:11 -07:00
Arnd Bergmann
7b48126837 pcmcia: sharpsl: don't discard sharpsl_pcmcia_ops
commit fdc858a466 upstream.

The sharpsl_pcmcia_ops structure gets passed into
sa11xx_drv_pcmcia_probe, where it gets accessed at run-time,
unlike all other pcmcia drivers that pass their structures
into platform_device_add_data, which makes a copy.

This means the gcc warning is valid and the structure
must not be marked as __initdata.

Without this patch, building collie_defconfig results in:

drivers/pcmcia/pxa2xx_sharpsl.c:22:31: fatal error: mach-pxa/hardware.h: No such file or directory
compilation terminated.
make[3]: *** [drivers/pcmcia/pxa2xx_sharpsl.o] Error 1
make[2]: *** [drivers/pcmcia] Error 2
make[1]: *** [drivers] Error 2
make: *** [sub-make] Error 2

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Pavel Machek <pavel@suse.cz>
Cc: linux-pcmcia@lists.infradead.org
Cc: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-28 10:02:11 -07:00
Greg Kroah-Hartman
0fc01fa3b5 Revert: lockd: use rpc client's cl_nodename for id encoding
This reverts 12d63702c5 which was commit
303a7ce920 upstream.

Taking hostname from uts namespace if not safe, because this cuold be
performind during umount operation on child reaper death. And in this case
current->nsproxy is NULL already.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-10-28 10:02:11 -07:00
Sasha Levin
7a104fcedf SUNRPC: Prevent kernel stack corruption on long values of flush
commit 212ba90696 upstream.

The buffer size in read_flush() is too small for the longest possible values
for it. This can lead to a kernel stack corruption:

[   43.047329] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff833e64b4
[   43.047329]
[   43.049030] Pid: 6015, comm: trinity-child18 Tainted: G        W    3.5.0-rc7-next-20120716-sasha #221
[   43.050038] Call Trace:
[   43.050435]  [<ffffffff836c60c2>] panic+0xcd/0x1f4
[   43.050931]  [<ffffffff833e64b4>] ? read_flush.isra.7+0xe4/0x100
[   43.051602]  [<ffffffff810e94e6>] __stack_chk_fail+0x16/0x20
[   43.052206]  [<ffffffff833e64b4>] read_flush.isra.7+0xe4/0x100
[   43.052951]  [<ffffffff833e6500>] ? read_flush_pipefs+0x30/0x30
[   43.053594]  [<ffffffff833e652c>] read_flush_procfs+0x2c/0x30
[   43.053596]  [<ffffffff812b9a8c>] proc_reg_read+0x9c/0xd0
[   43.053596]  [<ffffffff812b99f0>] ? proc_reg_write+0xd0/0xd0
[   43.053596]  [<ffffffff81250d5b>] do_loop_readv_writev+0x4b/0x90
[   43.053596]  [<ffffffff81250fd6>] do_readv_writev+0xf6/0x1d0
[   43.053596]  [<ffffffff812510ee>] vfs_readv+0x3e/0x60
[   43.053596]  [<ffffffff812511b8>] sys_readv+0x48/0xb0
[   43.053596]  [<ffffffff8378167d>] system_call_fastpath+0x1a/0x1f

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-28 10:02:11 -07:00
Dan Carpenter
ef9fccff2f oprofile, x86: Fix wrapping bug in op_x86_get_ctrl()
commit 4400910508 upstream.

The "event" variable is a u16 so the shift will always wrap to zero
making the line a no-op.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-28 10:02:11 -07:00
Trond Myklebust
c303f82bbe NLM: nlm_lookup_file() may return NLMv4-specific error codes
commit cd0b16c1c3 upstream.

If the filehandle is stale, or open access is denied for some reason,
nlm_fopen() may return one of the NLMv4-specific error codes nlm4_stale_fh
or nlm4_failed. These get passed right through nlm_lookup_file(),
and so when nlmsvc_retrieve_args() calls the latter, it needs to filter
the result through the cast_status() machinery.

Failure to do so, will trigger the BUG_ON() in encode_nlm_stat...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Reported-by: Larry McVoy <lm@bitmover.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-28 10:02:11 -07:00
Chris Metcalf
e114f9effa arch/tile: avoid generating .eh_frame information in modules
commit 627072b06c upstream.

The tile tool chain uses the .eh_frame information for backtracing.
The vmlinux build drops any .eh_frame sections at link time, but when
present in kernel modules, it causes a module load failure due to the
presence of unsupported pc-relative relocations.  When compiling to
use compiler feedback support, the compiler by default omits .eh_frame
information, so we don't see this problem.  But when not using feedback,
we need to explicitly suppress the .eh_frame.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-28 10:02:10 -07:00
kfx
b69026678f rk2926 sdk: fix 'tp crash' 2012-10-26 17:39:47 +08:00
kfx
354fcf64b8 rk2928_defconfig: update board-phonepad.c 2012-10-26 17:10:46 +08:00
邱建斌
3493ae41a3 rk_headset : modify key down key up value 2012-10-26 11:16:02 +08:00
赵子初
87db50252a rk2928phonepad: sc6610:add resume and suspend 2012-10-25 20:31:29 +08:00
邱建斌
d8c1ed909a rk2928phonepad modem_sound :
add set volume ioctl cmd
2012-10-25 19:00:45 +08:00
邱建斌
329d4fe212 rk2928phonepad:
modfiy headset driver
	fix hook key source
2012-10-25 18:59:26 +08:00
kfx
da6318d1ca rk2928: update gt811_ts driver 2012-10-25 17:06:48 +08:00
kfx
a7163b9816 rk2928_defconfig: support 'rk2928 phonepad' 2012-10-25 16:06:13 +08:00
张晴
3d362552ec rk2928:rk2926:remove excess pmu file 2012-10-25 14:38:03 +08:00
张晴
c962bab723 rk2928:rk2926:support pmu init voltage reference 2012-10-25 14:19:44 +08:00
kfx
4353a9c6a0 rk2928: tr726: gt811_ts.c optimize(yj) 2012-10-25 10:50:13 +08:00
wlq
40c3af0695 changed sc6610 GPIO define error 2012-10-25 10:10:46 +08:00
Dmitry Shmidt
834029ac9d net: wireless: bcmdhd: Fix WD wakelock behavior
Change-Id: I7ebae2be248cbb4bc98e2b448641f65b77a320f4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

Conflicts:

	drivers/net/wireless/bcmdhd/dhd_linux.c
2012-10-24 13:18:00 -07:00
Dmitry Shmidt
c305cc6ea0 net: wireless: bcmdhd: Fix BSSID report for disassoc
Change-Id: I5e3b01a1a471e5983ab934fc9d65802a389ab1af
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-10-24 13:14:48 -07:00
luowei
98d74a3109 rk30_phonepad:add auto modem support and delete ddr scaling config 2012-10-24 19:17:44 +08:00
linjh
596def0b69 rk2928-phonepad: update power charger support
[reference files]
   arch/arm/configs/rk2928_phonepad_defconfig
   arch/arm/mach-rk2928/board-rk2928-phonepad.c
2012-10-24 18:50:22 +08:00
luowei
fd4a096f0f rk30_phonepad:add board id head file 2012-10-24 18:35:42 +08:00
luowei
01f6479e82 rk30_phonepad:add mt6229 to black list in usb serial 2012-10-24 18:30:22 +08:00
luowei
fa9a169827 rk30_phonepad:add auto modem driver Kconfig 2012-10-24 18:25:59 +08:00
邱建斌
4e1287e2a1 rk2928phonepad:
update rk2928phonepad defconfig,open modem_sound and headset config
2012-10-24 18:19:11 +08:00
张晴
3e3a066643 rk3066b:support pmu init voltage reference 2012-10-24 18:18:15 +08:00
luowei
534cc41268 rk30_phonepad:add auto modem driver support 2012-10-24 18:11:05 +08:00
邱建斌
d5551f9e90 rk2928phonepad:
modfiy modem_sound ioctl cmd
2012-10-24 17:48:13 +08:00
yzq
fdb213ae2c fix backlight shutdown waring and fix switch screen backlight status 2012-10-24 14:56:50 +08:00
linjh
6307cd6953 rk2928_phonepad: adjust ap321xx l/p sensor to compatibale sensor framework
[reference files]

	modified:
		arch/arm/configs/rk2928_phonepad_defconfig
		arch/arm/mach-rk2928/board-rk2928-phonepad.c
		arch/arm/mach-rk2928/include/mach/board.h
		drivers/input/misc/Kconfig
		drivers/input/misc/Makefile
		drivers/input/sensors/lsensor/Kconfig
		drivers/input/sensors/lsensor/Makefile
		drivers/input/sensors/psensor/Kconfig
		drivers/input/sensors/psensor/Makefile
		drivers/input/sensors/sensor-dev.c
		include/linux/sensor-dev.h
	new file:
		drivers/input/sensors/psensor/ps_ap321xx.c
		drivers/input/sensors/lsensor/ls_ap321xx.c
	deleted:
		drivers/input/misc/ap321xx.c
2012-10-24 11:58:12 +08:00
hwg
438f7c6ac6 use default wifi rtl8192cu for rk2928_sdk_defconfig 2012-10-24 10:03:07 +08:00
邱建斌
d581a088d3 rk2928phonepad:
fix inside headset unnot boot
2012-10-23 19:14:38 +08:00
邱建斌
0a46941df7 rk2928phonepad:
update rk2928 codec for modem sound
2012-10-23 18:57:37 +08:00
kfx
5e639842ab rk2928 tb: fixed power_on gpio 2012-10-23 18:45:47 +08:00
kfx
d7d623dd14 adc_factory: return -EINVAL if fail to register adc channel 2012-10-23 18:44:24 +08:00
linjh
8189a7d87d rk2928_phonepad: remove exp gpio
[reference files]
	modified:

	arch/arm/mach-rk2928/include/mach/board.h
    drivers/misc/rk2928_callpad_misc/Kconfig
    drivers/misc/rk2928_callpad_misc/Makefile

	deleted:

	drivers/misc/rk2928_callpad_misc/gpio_exp_callpad.c
    include/linux/gpio_exp_callpad.h
2012-10-23 16:31:44 +08:00
kfx
3e41137abe rk2928_defconfig: support 'rk2928 sdk' 2012-10-23 15:53:13 +08:00
yzq
2ae8a8c95e rk fb: update hdmi scale and switch screen func 2012-10-23 15:10:42 +08:00
chenxing
adb879c9b4 rk2928: rename hclk_nandc as nandc 2012-10-23 12:49:37 +08:00
kfx
21c2aa159e rk2928_defconfig: support 'rk2928 top board' 2012-10-23 10:58:27 +08:00
chenxing
98fee4c608 rk3066b: add loader config dump support 2012-10-23 10:54:05 +08:00
chenxing
a326e2a4b3 rk2928: add loader config dump 2012-10-23 10:44:21 +08:00
黄涛
1c742ff5de rk2928: enable ARM ERRATA 775420 workaround 2012-10-23 10:12:01 +08:00
黄涛
24fcc8339e rk30: enable ARM ERRATA 775420 workaround 2012-10-23 10:08:59 +08:00
黄涛
fd3316fde0 Merge remote-tracking branch 'stable/linux-3.0.y' into develop-3.0
Conflicts:
	Makefile
2012-10-23 10:06:51 +08:00
kfx
767cf3e403 rk2928_defconfig: support 'rk2926 sdk(m713)' 2012-10-23 08:34:49 +08:00