platform/upstream/kernel-adaptation-pc.git
10 years agoThis is a backport of two upstream (3.13) patches: 67/11767/1 tizen
Casey Schaufler [Fri, 1 Nov 2013 20:59:39 +0000 (13:59 -0700)]
This is a backport of two upstream (3.13) patches:

commit b5dfd8075bc26636d11c3d8888940198afbf5112

    Smack: Ptrace access check mode

    When the ptrace security hooks were split the addition of
    a mode parameter was not taken advantage of in the Smack
    ptrace access check. This changes the access check from
    always looking for read and write access to using the
    passed mode. This will make use of /proc much happier.

commit c0ab6e56dcb7ca9903d460247cb464e769ae6e77

    Smack: Implement lock security mode

    Linux file locking does not follow the same rules
    as other mechanisms. Even though it is a write operation
    a process can set a read lock on files which it has open
    only for read access. Two programs with read access to
    a file can use read locks to communicate.

    This is not acceptable in a Mandatory Access Control
    environment. Smack treats setting a read lock as the
    write operation that it is. Unfortunately, many programs
    assume that setting a read lock is a read operation.
    These programs are unhappy in the Smack environment.

    This patch introduces a new access mode (lock) to address
    this problem. A process with lock access to a file can
    set a read lock. A process with write access to a file can
    set a read lock or a write lock. This prevents a situation
    where processes are granted write access just so they can
    set read locks.

Also, a provisonal fix for setting the Smack value on the
cgroup filesystem root to "*". Cgroupfs is not a real filesystem
and does not get mounted in the usual way.

Change-Id: I2a6c5448a379db636aa6452664414c75a6b63da5
Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agochangelog accepted/tizen/20131001.201856 submit/tizen/20131001.200407 submit/tizen/20131001.200749
William Douglas [Tue, 1 Oct 2013 20:03:39 +0000 (13:03 -0700)]
changelog

Change-Id: I2577f70cd3b97e45ed055681ca06fca627d39b45
Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoUpdate to v3.11.3 34/10434/1
William Douglas [Tue, 1 Oct 2013 19:47:37 +0000 (12:47 -0700)]
Update to v3.11.3

Change-Id: If40dde37b0856f3c671bd145b24a73525204733b
Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoUpdate to v3.11.2 64/10364/2
William Douglas [Mon, 30 Sep 2013 18:55:19 +0000 (11:55 -0700)]
Update to v3.11.2

Change-Id: I1406788353552edc4e80377850566057b9d366d8
Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agochangelog
William Douglas [Fri, 27 Sep 2013 19:22:28 +0000 (12:22 -0700)]
changelog

Change-Id: I03eae1cf56c876da1a4b6b8153386a5f3602e692
Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoUpdate to v3.11.1
William Douglas [Wed, 25 Sep 2013 22:51:25 +0000 (15:51 -0700)]
Update to v3.11.1

Change-Id: Iace0154a979982667cc5b7a74a5a380941b9e962
Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoEnable ftrace data in kernel/power/suspend.c
Michael Ikey Doherty [Tue, 20 Aug 2013 12:41:14 +0000 (13:41 +0100)]
Enable ftrace data in kernel/power/suspend.c

Initial patch at https://github.com/01org/suspendresume/
Bug-Tizen: TZPC-4362

10 years agoUpdate to v3.10.7
William Douglas [Fri, 16 Aug 2013 19:12:01 +0000 (12:12 -0700)]
Update to v3.10.7

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoremove patch previously fixing smack kernel panic
Anas Nashif [Wed, 14 Aug 2013 21:09:32 +0000 (17:09 -0400)]
remove patch previously fixing smack kernel panic

10 years agoFix TZPC-4326 - Missing WiFi driver for Ralink 3290
Shane Bryan [Wed, 14 Aug 2013 00:11:44 +0000 (17:11 -0700)]
Fix TZPC-4326 - Missing WiFi driver for Ralink 3290

Signed-off-by: Shane Bryan <shane.bryan@intel.com>
10 years agochangelog
William Douglas [Tue, 13 Aug 2013 18:36:30 +0000 (11:36 -0700)]
changelog

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoUpdate to v3.10.6
William Douglas [Tue, 13 Aug 2013 17:49:26 +0000 (10:49 -0700)]
Update to v3.10.6

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agochangelog
William Douglas [Mon, 12 Aug 2013 17:34:33 +0000 (10:34 -0700)]
changelog

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoUpdate to v3.10.5
William Douglas [Fri, 9 Aug 2013 18:15:54 +0000 (11:15 -0700)]
Update to v3.10.5

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agochangelog
William Douglas [Tue, 6 Aug 2013 18:32:27 +0000 (11:32 -0700)]
changelog

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years ago[TZPC-4132] Fix spec to build devel pkg with all headers
Shane Bryan [Wed, 31 Jul 2013 21:31:24 +0000 (14:31 -0700)]
[TZPC-4132] Fix spec to build devel pkg with all headers

Signed-off-by: Shane Bryan <shane.bryan@intel.com>
10 years agochangelog
Michael I Doherty [Thu, 1 Aug 2013 14:56:01 +0000 (15:56 +0100)]
changelog

10 years agochangelog
William Douglas [Wed, 31 Jul 2013 21:57:06 +0000 (14:57 -0700)]
changelog

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoUpdate to v3.10.4
William Douglas [Wed, 31 Jul 2013 21:25:02 +0000 (14:25 -0700)]
Update to v3.10.4

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agochangelog
William Douglas [Wed, 24 Jul 2013 23:06:08 +0000 (16:06 -0700)]
changelog

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoUpdate to v3.10.2
William Douglas [Wed, 24 Jul 2013 17:28:31 +0000 (10:28 -0700)]
Update to v3.10.2

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agochangelog
William Douglas [Tue, 23 Jul 2013 21:01:23 +0000 (14:01 -0700)]
changelog

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoUpdate to 3.10.1
William Douglas [Fri, 19 Jul 2013 18:45:04 +0000 (11:45 -0700)]
Update to 3.10.1

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agochangelog
William Douglas [Fri, 19 Jul 2013 00:12:15 +0000 (17:12 -0700)]
changelog

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoRemove hibernate support.
William Douglas [Fri, 12 Jul 2013 18:18:27 +0000 (11:18 -0700)]
Remove hibernate support.

Hibernate not supported in Tizen-PC.

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agochangelog
William Douglas [Fri, 12 Jul 2013 16:44:04 +0000 (09:44 -0700)]
changelog

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoenable ricoh mmc module
William Douglas [Thu, 11 Jul 2013 22:35:56 +0000 (15:35 -0700)]
enable ricoh mmc module

Needed for quirk handling a device specific work arounds with an sd
card reader.

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoRemove empty %files section to fix the build
Patrick McCarty [Wed, 10 Jul 2013 18:19:32 +0000 (11:19 -0700)]
Remove empty %files section to fix the build

Change-Id: I1e4d3fad5a710df0ec5e97b24cac797fd48f9247
Signed-off-by: Patrick McCarty <patrick.mccarty@linux.intel.com>
10 years agoresetting manifest requested domain to floor
Alexandru Cornea [Fri, 28 Jun 2013 22:15:26 +0000 (01:15 +0300)]
resetting manifest requested domain to floor

10 years agoAdd Samsung laptop module to config
William Douglas [Fri, 28 Jun 2013 16:38:50 +0000 (09:38 -0700)]
Add Samsung laptop module to config

Needed to enable SABI to make certain Fn keys work correctly.

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoRevert "Panic on oops"
Markus Lehtonen [Tue, 25 Jun 2013 17:49:55 +0000 (20:49 +0300)]
Revert "Panic on oops"

Which broke booting / installation on many platforms.

This reverts commit f2ecb03582b5fb4fac0459f27001fa55bfacbab8.

Change-Id: If6181017b01302d68c71c1e98034e4c2dbaadf7f

10 years agoAdd network bridge support
Anas Nashif [Mon, 24 Jun 2013 11:39:48 +0000 (07:39 -0400)]
Add network bridge support

10 years agochanges: update (touchscreen, oops, stackprotector, yama)
Philippe Coval [Fri, 14 Jun 2013 16:29:03 +0000 (18:29 +0200)]
changes: update (touchscreen, oops, stackprotector, yama)

10 years agoadd: touchscreen support for wacom driver for default arch x86 too
Philippe Coval [Tue, 14 May 2013 15:15:16 +0000 (17:15 +0200)]
add: touchscreen support for wacom driver for default arch x86 too

10 years agoadd: touchscreen support for wacom driver
Philippe Coval [Wed, 24 Apr 2013 12:26:26 +0000 (14:26 +0200)]
add: touchscreen support for wacom driver

10 years agoPanic on oops
Michael Leibowitz [Fri, 7 Jun 2013 08:11:00 +0000 (01:11 -0700)]
Panic on oops

Change-Id: I4205c8ada87c95731b85fd52ed453241dacaf2a4
Signed-off-by: Michael Leibowitz <michael.leibowitz@intel.com>
10 years agoEnable CC_STACKPROTECTOR
Michael Leibowitz [Fri, 7 Jun 2013 05:30:12 +0000 (22:30 -0700)]
Enable CC_STACKPROTECTOR

Change-Id: I5581b145e3a77d335748c262df4e3710f54394fa
Signed-off-by: Michael Leibowitz <michael.leibowitz@intel.com>
10 years agoEnable YAMA
Michael Leibowitz [Fri, 7 Jun 2013 05:29:01 +0000 (22:29 -0700)]
Enable YAMA

Change-Id: I3bddafd75a0cc2fa9f4982276b3ddb158d411722
Signed-off-by: Michael Leibowitz <michael.leibowitz@intel.com>
10 years agofixed smack kernel panic
Anas Nashif [Tue, 4 Jun 2013 21:18:40 +0000 (17:18 -0400)]
fixed smack kernel panic

10 years agoSupport generic x86_64 cpu, not Atom
Anas Nashif [Tue, 4 Jun 2013 20:11:59 +0000 (16:11 -0400)]
Support generic x86_64 cpu, not Atom

10 years agoUpdate to 3.9.4
Anas Nashif [Tue, 4 Jun 2013 16:16:47 +0000 (12:16 -0400)]
Update to 3.9.4

10 years agoupdate configs for new kernel
Anas Nashif [Tue, 4 Jun 2013 16:16:03 +0000 (12:16 -0400)]
update configs for new kernel

10 years agobump to 3.9.4
Anas Nashif [Tue, 4 Jun 2013 15:40:42 +0000 (11:40 -0400)]
bump to 3.9.4

10 years agoadd gbs.conf
Anas Nashif [Tue, 4 Jun 2013 15:40:01 +0000 (11:40 -0400)]
add gbs.conf

10 years agoSet license using %license
Anas Nashif [Sat, 11 May 2013 05:43:12 +0000 (01:43 -0400)]
Set license using %license

10 years agoUpdate configs for latest release
Anas Nashif [Thu, 11 Apr 2013 10:06:11 +0000 (03:06 -0700)]
Update configs for latest release

10 years agoUpdate to 3.8.6
Anas Nashif [Mon, 8 Apr 2013 23:00:17 +0000 (16:00 -0700)]
Update to 3.8.6

10 years agoUpdate to 3.8.5
Anas Nashif [Fri, 29 Mar 2013 14:03:09 +0000 (07:03 -0700)]
Update to 3.8.5

10 years agoadd support for systemd-nspawn
William Douglas [Mon, 25 Mar 2013 22:24:19 +0000 (15:24 -0700)]
add support for systemd-nspawn

Change-Id: I34892a371acd8c71d0e923728b35737e5eec4358
Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoadd support for systemd-nspawn
William Douglas [Mon, 25 Mar 2013 22:24:19 +0000 (15:24 -0700)]
add support for systemd-nspawn

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoadd oprofile as a module
William Douglas [Fri, 15 Mar 2013 19:32:01 +0000 (12:32 -0700)]
add oprofile as a module

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoSupport iptables
Anas Nashif [Sun, 10 Mar 2013 19:35:27 +0000 (12:35 -0700)]
Support iptables

10 years agoUpdate to 3.8.2
Anas Nashif [Wed, 6 Mar 2013 08:32:30 +0000 (00:32 -0800)]
Update to 3.8.2

10 years agoadapt configs for new kernel
Anas Nashif [Wed, 6 Mar 2013 07:59:13 +0000 (23:59 -0800)]
adapt configs for new kernel

10 years agoupdate to 3.8.2
Anas Nashif [Wed, 6 Mar 2013 07:51:13 +0000 (23:51 -0800)]
update to 3.8.2

10 years agoUpdate to v3.8
Anas Nashif [Thu, 21 Feb 2013 15:12:56 +0000 (07:12 -0800)]
Update to v3.8

10 years agoupdate to v3.8
Anas Nashif [Thu, 21 Feb 2013 02:34:50 +0000 (18:34 -0800)]
update to v3.8

10 years agoCorrect build link
William Douglas [Thu, 7 Feb 2013 23:16:52 +0000 (15:16 -0800)]
Correct build link

Because /lib/ -> /usr/lib we need to go down one more level to /.

Change-Id: If078fcc6f7709da2e3a1de55de16968f055dff23
Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoUpdate options for 32bit to match 64bit config
William Douglas [Wed, 6 Feb 2013 22:47:40 +0000 (14:47 -0800)]
Update options for 32bit to match 64bit config

While 32bit platforms aren't yet working with checkpoint
restore in userspace (criu), the config options used for
enabling the feature on our 64bit kernel should be applied
to our 32bit kernel as well.

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoUpdate options for criu support
William Douglas [Wed, 6 Feb 2013 22:39:35 +0000 (14:39 -0800)]
Update options for criu support

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoUpdate to 3.7.5
Anas Nashif [Sun, 3 Feb 2013 00:35:38 +0000 (16:35 -0800)]
Update to 3.7.5

10 years agoUpdate to 3.7.5
Anas Nashif [Sun, 3 Feb 2013 00:32:01 +0000 (16:32 -0800)]
Update to 3.7.5

10 years agoEnable camera
Anas Nashif [Sun, 3 Feb 2013 00:29:02 +0000 (16:29 -0800)]
Enable camera

10 years agoAdd default kernel link to boot latest kernel
William Douglas [Thu, 31 Jan 2013 22:21:47 +0000 (14:21 -0800)]
Add default kernel link to boot latest kernel

Signed-off-by: William Douglas <william.douglas@intel.com>
10 years agoenable CONFIG_BINFMT_MISC, needed by MIC and GBS
Patrick McCarty [Thu, 17 Jan 2013 20:16:44 +0000 (12:16 -0800)]
enable CONFIG_BINFMT_MISC, needed by MIC and GBS

MIC and GBS use binfmt_misc to build ARM images/packages, but it needs
to be enabled in the kernel for this to work.

Change-Id: I4aece08ba2d0859d5b02e983797b26a20d0618fe

10 years agoupdate to 3.7.2
Anas Nashif [Wed, 16 Jan 2013 19:37:07 +0000 (11:37 -0800)]
update to 3.7.2

10 years agoenable CONFIG_MEMCG for i686
Anas Nashif [Wed, 16 Jan 2013 18:52:37 +0000 (10:52 -0800)]
enable CONFIG_MEMCG for i686

10 years agoUpdate to 3.7.2
Anas Nashif [Wed, 16 Jan 2013 18:38:38 +0000 (10:38 -0800)]
Update to 3.7.2

10 years agoinitrd -> initramfs
Anas Nashif [Tue, 1 Jan 2013 22:20:00 +0000 (14:20 -0800)]
initrd -> initramfs

10 years agoconfig: enable Smack security module
Patrick McCarty [Thu, 20 Dec 2012 23:15:12 +0000 (15:15 -0800)]
config: enable Smack security module

Change-Id: I81135a644d4361cb515a9cf7de24c4e92db1803f

10 years agoadd changelog file
Anas Nashif [Fri, 14 Dec 2012 23:48:24 +0000 (15:48 -0800)]
add changelog file

10 years agoupdate to 3.7
Anas Nashif [Fri, 14 Dec 2012 19:44:08 +0000 (11:44 -0800)]
update to 3.7

10 years agoupdate to 3.7
Anas Nashif [Fri, 14 Dec 2012 19:26:07 +0000 (11:26 -0800)]
update to 3.7

10 years agoenable CGROUP Memory
Anas Nashif [Sun, 9 Dec 2012 21:18:07 +0000 (13:18 -0800)]
enable CGROUP Memory

10 years agomove /lib/* to /usr/lib/*
Anas Nashif [Sun, 9 Dec 2012 18:29:02 +0000 (10:29 -0800)]
move /lib/* to /usr/lib/*

10 years agoadd packaging
Anas Nashif [Sun, 9 Dec 2012 16:51:33 +0000 (08:51 -0800)]
add packaging

10 years agoLinux 3.11.3 upstream v3.11.3
Greg Kroah-Hartman [Tue, 1 Oct 2013 16:41:12 +0000 (09:41 -0700)]
Linux 3.11.3

10 years agonetfilter: ipset: Fix serious failure in CIDR tracking
Oliver Smith [Mon, 16 Sep 2013 18:30:57 +0000 (20:30 +0200)]
netfilter: ipset: Fix serious failure in CIDR tracking

commit 2cf55125c64d64cc106e204d53b107094762dfdf upstream.

This fixes a serious bug affecting all hash types with a net element -
specifically, if a CIDR value is deleted such that none of the same size
exist any more, all larger (less-specific) values will then fail to
match. Adding back any prefix with a CIDR equal to or more specific than
the one deleted will fix it.

Steps to reproduce:
ipset -N test hash:net
ipset -A test 1.1.0.0/16
ipset -A test 2.2.2.0/24
ipset -T test 1.1.1.1           #1.1.1.1 IS in set
ipset -D test 2.2.2.0/24
ipset -T test 1.1.1.1           #1.1.1.1 IS NOT in set

This is due to the fact that the nets counter was unconditionally
decremented prior to the iteration that shifts up the entries. Now, we
first check if there is a proceeding entry and if not, decrement it and
return. Otherwise, we proceed to iterate and then zero the last element,
which, in most cases, will already be zero.

Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agocw1200: Don't perform SPI transfers in interrupt context
Solomon Peachy [Wed, 28 Aug 2013 00:29:46 +0000 (20:29 -0400)]
cw1200: Don't perform SPI transfers in interrupt context

commit aec8e88c947b7017e2b4bbcb68a4bfc4a1f8ad35 upstream.

When we get an interrupt from the hardware, the first thing the driver does
is tell the device to mask off the interrupt line.  Unfortunately this
involves a SPI transaction in interrupt context.  Some (most?) SPI
controllers perform the transfer asynchronously and try to sleep.
This is bad, and triggers a BUG().

So, work around this by using adding a hwbus hook for the cw1200 driver
core to call.  The cw1200_spi driver translates this into
irq_disable()/irq_enable() calls instead, which can safely be called in
interrupt context.

Apparently the platforms I used to develop the cw1200_spi driver used
synchronous spi_sync() implementations, which is why this didn't surface
until now.

Many thanks to Dave Sizeburns for the inital bug report and his services
as a tester.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agocw1200: Prevent a lock-related hang in the cw1200_spi driver
Solomon Peachy [Wed, 28 Aug 2013 00:29:47 +0000 (20:29 -0400)]
cw1200: Prevent a lock-related hang in the cw1200_spi driver

commit 85ba8f529c57ac6e2fca9be0d9e17920a1afb2e8 upstream.

The cw1200_spi driver tries to mirror the cw1200_sdio driver's lock
API, which relies on sdio_claim_host/sdio_release_host to serialize
hardware operations across multiple threads.

Unfortunately the implementation was flawed, as it lacked a way to wake
up the lock requestor when there was contention, often resulting in a
hang.

This problem was uncovered while trying to fix the
spi-transfers-in-interrupt-context BUG() corrected in the previous
patch.  Many thanks to Dave Sizeburns for his assistance in fixing this.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agorpc: let xdr layer allocate gssproxy receieve pages
J. Bruce Fields [Fri, 23 Aug 2013 21:26:28 +0000 (17:26 -0400)]
rpc: let xdr layer allocate gssproxy receieve pages

commit d4a516560fc96a9d486a9939bcb567e3fdce8f49 upstream.

In theory the linux cred in a gssproxy reply can include up to
NGROUPS_MAX data, 256K of data.  In the common case we expect it to be
shorter.  So do as the nfsv3 ACL code does and let the xdr code allocate
the pages as they come in, instead of allocating a lot of pages that
won't typically be used.

Tested-by: Simo Sorce <simo@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agorpc: fix huge kmalloc's in gss-proxy
J. Bruce Fields [Tue, 20 Aug 2013 22:13:27 +0000 (18:13 -0400)]
rpc: fix huge kmalloc's in gss-proxy

commit 9dfd87da1aeb0fd364167ad199f40fe96a6a87be upstream.

The reply to a gssproxy can include up to NGROUPS_MAX gid's, which will
take up more than a page.  We therefore need to allocate an array of
pages to hold the reply instead of trying to allocate a single huge
buffer.

Tested-by: Simo Sorce <simo@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agorpc: comment on linux_cred encoding, treat all as unsigned
J. Bruce Fields [Fri, 23 Aug 2013 15:17:53 +0000 (11:17 -0400)]
rpc: comment on linux_cred encoding, treat all as unsigned

commit 6a36978e6931e6601be586eb313375335f2cfaa3 upstream.

The encoding of linux creds is a bit confusing.

Also: I think in practice it doesn't really matter whether we treat any
of these things as signed or unsigned, but unsigned seems more
straightforward: uid_t/gid_t are unsigned and it simplifies the ngroups
overflow check.

Tested-by: Simo Sorce <simo@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agorpc: clean up decoding of gssproxy linux creds
J. Bruce Fields [Wed, 21 Aug 2013 14:32:52 +0000 (10:32 -0400)]
rpc: clean up decoding of gssproxy linux creds

commit 778e512bb1d3315c6b55832248cd30c566c081d7 upstream.

We can use the normal coding infrastructure here.

Two minor behavior changes:

- we're assuming no wasted space at the end of the linux cred.
  That seems to match gss-proxy's behavior, and I can't see why
  it would need to do differently in the future.

- NGROUPS_MAX check added: note groups_alloc doesn't do this,
  this is the caller's responsibility.

Tested-by: Simo Sorce <simo@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agocfq: explicitly use 64bit divide operation for 64bit arguments
Anatol Pomozov [Sun, 22 Sep 2013 18:43:47 +0000 (12:43 -0600)]
cfq: explicitly use 64bit divide operation for 64bit arguments

commit f3cff25f05f2ac29b2ee355e611b0657482f6f1d upstream.

'samples' is 64bit operant, but do_div() second parameter is 32.
do_div silently truncates high 32 bits and calculated result
is invalid.

In case if low 32bit of 'samples' are zeros then do_div() produces
kernel crash.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Cc: Jonghwan Choi <jhbird.choi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agobio-integrity: Fix use of bs->bio_integrity_pool after free
Bjorn Helgaas [Wed, 29 May 2013 22:29:55 +0000 (16:29 -0600)]
bio-integrity: Fix use of bs->bio_integrity_pool after free

commit adbe6991efd36104ac9eaf751993d35eaa7f493a upstream.

This fixes a copy and paste error introduced by 9f060e2231
("block: Convert integrity to bvec_alloc_bs()").

Found by Coverity (CID 1020654).

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Kent Overstreet <koverstreet@google.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Cc: Jonghwan Choi <jhbird.choi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agomm: fix aio performance regression for database caused by THP
Khalid Aziz [Wed, 11 Sep 2013 21:22:20 +0000 (14:22 -0700)]
mm: fix aio performance regression for database caused by THP

commit 7cb2ef56e6a8b7b368b2e883a0a47d02fed66911 upstream.

I am working with a tool that simulates oracle database I/O workload.
This tool (orion to be specific -
<http://docs.oracle.com/cd/E11882_01/server.112/e16638/iodesign.htm#autoId24>)
allocates hugetlbfs pages using shmget() with SHM_HUGETLB flag.  It then
does aio into these pages from flash disks using various common block
sizes used by database.  I am looking at performance with two of the most
common block sizes - 1M and 64K.  aio performance with these two block
sizes plunged after Transparent HugePages was introduced in the kernel.
Here are performance numbers:

pre-THP 2.6.39 3.11-rc5
1M read 8384 MB/s 5629 MB/s 6501 MB/s
64K read 7867 MB/s 4576 MB/s 4251 MB/s

I have narrowed the performance impact down to the overheads introduced by
THP in __get_page_tail() and put_compound_page() routines.  perf top shows
>40% of cycles being spent in these two routines.  Every time direct I/O
to hugetlbfs pages starts, kernel calls get_page() to grab a reference to
the pages and calls put_page() when I/O completes to put the reference
away.  THP introduced significant amount of locking overhead to get_page()
and put_page() when dealing with compound pages because hugepages can be
split underneath get_page() and put_page().  It added this overhead
irrespective of whether it is dealing with hugetlbfs pages or transparent
hugepages.  This resulted in 20%-45% drop in aio performance when using
hugetlbfs pages.

Since hugetlbfs pages can not be split, there is no reason to go through
all the locking overhead for these pages from what I can see.  I added
code to __get_page_tail() and put_compound_page() to bypass all the
locking code when working with hugetlbfs pages.  This improved performance
significantly.  Performance numbers with this patch:

pre-THP 3.11-rc5 3.11-rc5 + Patch
1M read 8384 MB/s 6501 MB/s 8371 MB/s
64K read 7867 MB/s 4251 MB/s 6510 MB/s

Performance with 64K read is still lower than what it was before THP, but
still a 53% improvement.  It does mean there is more work to be done but I
will take a 53% improvement for now.

Please take a look at the following patch and let me know if it looks
reasonable.

[akpm@linux-foundation.org: tweak comments]
Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Cc: Pravin B Shelar <pshelar@nicira.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Rik van Riel <riel@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
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>
10 years agoaudit: fix endless wait in audit_log_start()
Konstantin Khlebnikov [Tue, 24 Sep 2013 22:27:42 +0000 (15:27 -0700)]
audit: fix endless wait in audit_log_start()

commit 8ac1c8d5deba65513b6a82c35e89e73996c8e0d6 upstream.

After commit 829199197a43 ("kernel/audit.c: avoid negative sleep
durations") audit emitters will block forever if userspace daemon cannot
handle backlog.

After the timeout the waiting loop turns into busy loop and runs until
daemon dies or returns back to work.  This is a minimal patch for that
bug.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Richard Guy Briggs <rgb@redhat.com>
Cc: Eric Paris <eparis@redhat.com>
Cc: Chuck Anderson <chuck.anderson@oracle.com>
Cc: Dan Duval <dan.duval@oracle.com>
Cc: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoudf: Refuse RW mount of the filesystem instead of making it RO
Jan Kara [Thu, 25 Jul 2013 14:15:16 +0000 (16:15 +0200)]
udf: Refuse RW mount of the filesystem instead of making it RO

commit e729eac6f65e11c5f03b09adcc84bd5bcb230467 upstream.

Refuse RW mount of udf filesystem. So far we just silently changed it
to RO mount but when the media is writeable, block layer won't notice
this change and thus will think device is used RW and will block eject
button of the drive. That is unexpected by users because for
non-writeable media eject button works just fine.

Userspace mount(8) command handles this just fine and retries mounting
with MS_RDONLY set so userspace shouldn't see any regression.  Plus any
tool mounting udf is likely confronted with the case of read-only
media where block layer already refuses to mount the filesystem without
MS_RDONLY set so our behavior shouldn't be anything new for it.

Reported-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoudf: Standardize return values in mount sequence
Jan Kara [Thu, 25 Jul 2013 17:10:59 +0000 (19:10 +0200)]
udf: Standardize return values in mount sequence

commit d759bfa4e7919b89357de50a2e23817079889195 upstream.

Change all function used in filesystem discovery during mount to user
standard kernel return values - -errno on error, 0 on success instead
of 1 on failure and 0 on success. This allows us to pass error number
(not just failure / success) so we can abort device scanning earlier
in case of errors like EIO or ENOMEM . Also we will be able to return
EROFS in case writeable mount is requested but writing isn't supported.

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoskge: fix broken driver
Mikulas Patocka [Thu, 19 Sep 2013 18:13:17 +0000 (14:13 -0400)]
skge: fix broken driver

commit c194992cbe71c20bb3623a566af8d11b0bfaa721 upstream.

The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver.
Note this part of the patch:
+               if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
+                       dev_kfree_skb(nskb);
+                       goto resubmit;
+               }
+
                pci_unmap_single(skge->hw->pdev,
                                 dma_unmap_addr(e, mapaddr),
                                 dma_unmap_len(e, maplen),
                                 PCI_DMA_FROMDEVICE);
                skb = e->skb;
                prefetch(skb->data);
-               skge_rx_setup(skge, e, nskb, skge->rx_buf_size);

The function skge_rx_setup modifies e->skb to point to the new skb. Thus,
after this change, the new buffer, not the old, is returned to the
networking stack.

This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1. The patch should
be queued for 3.11-stable.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Vasiliy Glazov <vascom2@gmail.com>
Tested-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrm/radeon: avoid UVD corruptions on AGP cards
Christian König [Sun, 15 Sep 2013 11:31:28 +0000 (13:31 +0200)]
drm/radeon: avoid UVD corruptions on AGP cards

commit 4f66c59922cbcda14c9e103e6c7f4ee616360d43 upstream.

Putting everything into VRAM seems to help.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrm/radeon: fix panel scaling with eDP and LVDS bridges
Alex Deucher [Fri, 13 Sep 2013 22:33:16 +0000 (18:33 -0400)]
drm/radeon: fix panel scaling with eDP and LVDS bridges

commit 855f5f1d882a34e4e9dd27b299737cd3508a5624 upstream.

We were using the wrong set_properly callback so we always
ended up with Full scaling even if something else (Center or
Full aspect) was selected.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrm/radeon/dpm/rs780: don't enable sclk scaling if not required
Alex Deucher [Fri, 13 Sep 2013 14:55:10 +0000 (10:55 -0400)]
drm/radeon/dpm/rs780: don't enable sclk scaling if not required

commit e40210cca98068835acd5a4fe760bf96b3a1aa48 upstream.

If the low and high sclks are the same, there is no need to
enable sclk scaling.  This causes display stability issues on
certain boards.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=60857

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrm/radeon/dpm: fix fallback for empty UVD clocks
Alex Deucher [Tue, 10 Sep 2013 13:40:37 +0000 (09:40 -0400)]
drm/radeon/dpm: fix fallback for empty UVD clocks

commit 84f3d9f7b4781dea6e11dcaf7f81367c1b39fef0 upstream.

Some older 6xx-7xx boards didn't always fill in the
UVD clocks properly in the UVD power states.  This
leads to the driver trying to set a 0 clock which
results in slow or broken UVD playback.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=69120

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrm/radeon/dpm: handle bapm on trinity
Alex Deucher [Mon, 9 Sep 2013 22:56:50 +0000 (18:56 -0400)]
drm/radeon/dpm: handle bapm on trinity

commit ef4e03658420bbf91365647615460668c2510e79 upstream.

bapm is a power management feature for handling the
power budget between the CPU and GPU on APUs.  This
patch adds support for enabling or disabling it.
For now disable it by default.  Enabling it properly
requires quite a bit more work and will be addressed
in a separate patch.

This patch fixes hangs on boot on certain trinity
laptops when the system is on battery power.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrm/radeon/atom: workaround vbios bug in transmitter table on rs880 (v2)
Alex Deucher [Mon, 9 Sep 2013 14:54:22 +0000 (10:54 -0400)]
drm/radeon/atom: workaround vbios bug in transmitter table on rs880 (v2)

commit 91f3a6aaf280294b07c05dfe606e6c27b7ba3c72 upstream.

The OUTPUT_ENABLE action jumps past the point in the coder where
the data_offset is set on certain rs780 cards.  This worked
previously because the OUTPUT_ENABLE action is always called
immediately after the ENABLE action so the data_offset remained
set.  In 6f8bbaf568c7f2c497558bfd04654c0b9841ad57
(drm/radeon/atom: initialize more atom interpretor elements to 0),
we explictly reset data_offset to 0 between atom calls which then
caused this to fail.  The fix is to just skip calling the
OUTPUT_ENABLE action on the problematic chipsets.  The ENABLE
action does the same thing and more.  Ultimately, we could
probably drop the OUTPUT_ENABLE action all together on DCE3
asics.

fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=60791

v2: only rs880 seems to be affected

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrm/radeon/r6xx: add a stubbed out set_uvd_clocks callback
Alex Deucher [Thu, 5 Sep 2013 13:52:37 +0000 (09:52 -0400)]
drm/radeon/r6xx: add a stubbed out set_uvd_clocks callback

commit 1b9ba70a49ba92e910d8e5df702edf8c1858cecf upstream.

Certain r6xx boards use the same power state for both UVD
and other things.  Since we don't support UVD on r6xx boards
at the moment, there was no callback installed for setting
the UVD clocks, however, on systems that use the same power
state, this leads to a NULL pointer dereference.  Fill
in a stubbed out implementation for now to avoid the crash.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=66963

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrm/radeon: add some additional berlin pci ids
Alex Deucher [Wed, 4 Sep 2013 20:48:40 +0000 (16:48 -0400)]
drm/radeon: add some additional berlin pci ids

commit 9a71677874d200865433647e9282fcf9fa6b05dd upstream.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agotg3: Expand led off fix to include 5720
Nithin Sujir [Thu, 12 Sep 2013 21:01:31 +0000 (14:01 -0700)]
tg3: Expand led off fix to include 5720

commit 300cf9b93f74c3d969a0ad50bdac65416107c44c upstream.

Commit 989038e217e94161862a959e82f9a1ecf8dda152 ("tg3: Don't turn off
led on 5719 serdes port 0") added code to skip turning led off on port
0 of the 5719 since it powered down other ports. This workaround needs
to be enabled on the 5720 as well.

Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>