]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/log
mirror_ubuntu-zesty-kernel.git
8 years agoarm64: perf: Rename Cortex A57 events
Jan Glauber [Thu, 18 Feb 2016 16:50:10 +0000 (17:50 +0100)]
arm64: perf: Rename Cortex A57 events

BugLink: http://bugs.launchpad.net/bugs/1559349
The implemented Cortex A57 events are strictly-speaking not
A57 specific. They are ARM recommended implementation defined events
and can be found on other ARMv8 SOCs like Cavium ThunderX too.

Therefore rename these events to allow using them in other
implementations too.

Signed-off-by: Jan Glauber <jglauber@cavium.com>
[will: capitalisation and ordering]
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from linux-next commit 5f140ccef3e1f15873c8e2c47d15b03099623ec0)
[dannf: offset adjustments]
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm64: perf: add format entry to describe event -> config mapping
Will Deacon [Tue, 22 Dec 2015 14:42:57 +0000 (14:42 +0000)]
arm64: perf: add format entry to describe event -> config mapping

BugLink: http://bugs.launchpad.net/bugs/1559350
It's all very well providing an events directory to userspace that
details our events in terms of "event=0xNN", but if we don't define how
to encode the "event" field in the perf attr.config, then it's a waste
of time.

This patch adds a single format entry to describe that the event field
occupies the bottom 10 bits of our config field on ARMv8 (PMUv3).

Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 57d74123954dfe70fad12724d19f743ed14cec90)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoARM: perf: add format entry to describe event -> config mapping
Will Deacon [Tue, 22 Dec 2015 14:42:57 +0000 (14:42 +0000)]
ARM: perf: add format entry to describe event -> config mapping

BugLink: http://bugs.launchpad.net/bugs/1559350
It's all very well providing an events directory to userspace that
details our events in terms of "event=0xNN", but if we don't define how
to encode the "event" field in the perf attr.config, then it's a waste
of time.

This patch adds a single format entry to describe that the event field
occupies the bottom 8 bits of our config field on ARMv7.

Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit abff083ce2046b4d55211c1db5992ec2dd391f3d)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm64: perf: Add event descriptions
Drew Richardson [Thu, 22 Oct 2015 14:07:32 +0000 (07:07 -0700)]
arm64: perf: Add event descriptions

BugLink: http://bugs.launchpad.net/bugs/1559350
Add additional information about the ARM architected hardware events
to make counters self describing. This makes the hardware PMUs easier
to use as perf list contains possible events instead of users having
to refer to documentation like the ARM TRMs.

Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 9e9caa6a496174e53d7753baa4779717771da4a7)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm64: perf: Convert event enums to #defines
Drew Richardson [Thu, 22 Oct 2015 14:07:01 +0000 (07:07 -0700)]
arm64: perf: Convert event enums to #defines

BugLink: http://bugs.launchpad.net/bugs/1559350
The enums are not necessary and this allows the event values to be
used to construct static strings at compile time.

Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 90381cba64591e27d0e8bbfe71bf8a98bd2a3db3)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm: perf: Add event descriptions
Drew Richardson [Wed, 28 Oct 2015 15:20:41 +0000 (08:20 -0700)]
arm: perf: Add event descriptions

BugLink: http://bugs.launchpad.net/bugs/1559350
Add additional information about the ARM architected hardware events
to make counters self describing. This makes the hardware PMUs easier
to use as perf list contains possible events instead of users having
to refer to documentation like the ARM TRMs.

Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 3fbac6ccb6c3a8958239d9026c4d41db60c2f1cf)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm: perf: Convert event enums to #defines
Drew Richardson [Wed, 28 Oct 2015 15:19:56 +0000 (08:19 -0700)]
arm: perf: Convert event enums to #defines

BugLink: http://bugs.launchpad.net/bugs/1559350
The enums are not necessary and this allows the event values to be
used to construct static strings at compile time.

Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit f4ab36cb103a55d02ef83727880a14d9be9823f0)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agodrivers/perf: kill armpmu_register
Mark Rutland [Wed, 28 Oct 2015 12:32:17 +0000 (12:32 +0000)]
drivers/perf: kill armpmu_register

BugLink: http://bugs.launchpad.net/bugs/1559350
Nothing outside of drivers/perf/arm_pmu.c should call armpmu_register
any more, so it no longer needs to be in include/linux/perf/arm_pmu.h.
Additionally, by folding it in to arm_pmu_device_probe we can allow
drivers to override struct pmu fields without getting blatted by the
armpmu code.

This patch folds armpmu_register into arm_pmu_device_probe. The logging
to the console is moved to after the PMU is successfully registered with
the core perf code.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Suggested-by: Will Deacon <will.deacon@arm.com>
Cc: Drew Richardson <drew.richardson@arm.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 86cb273b601488fb02d5706c61a09ee267474aad)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoEDAC/sb_edac: Fix computation of channel address
Luck, Tony [Thu, 10 Mar 2016 00:40:48 +0000 (16:40 -0800)]
EDAC/sb_edac: Fix computation of channel address

BugLink: http://bugs.launchpad.net/bugs/1559904
Large memory Haswell-EX systems with multiple DIMMs per channel were
sometimes reporting the wrong DIMM.

Found three problems:

 1) Debug printouts for socket and channel interleave were not interpreting
    the register fields correctly. The socket interleave field is a 2^X
    value (0=1, 1=2, 2=4, 3=8). The channel interleave is X+1 (0=1, 1=2,
    2=3. 3=4).

 2) Actual use of the socket interleave value didn't interpret as 2^X

 3) Conversion of address to channel address was complicated, and wrong.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Acked-by: Aristeu Rozanski <arozansk@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-edac@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit eb1af3b71f9d83e45f2fd2fd649356e98e1c582c)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Config] disable CONFIG_IP_PNP
Andy Whitcroft [Sun, 20 Mar 2016 13:35:17 +0000 (13:35 +0000)]
UBUNTU: [Config] disable CONFIG_IP_PNP

This support is completely duplicated in the initramfs code.  As things
stand we attempt this PNP when we do not have the devices we could use
loaded and will not be able to load until the initramfs is loaded.

Therefore disable this support in the kernel and rely on the
initramfs-tools code.

BugLink: http://bugs.launchpad.net/bugs/1259861
Signed-off-by: Andy Whitcroft <apw@canonical.com>
8 years agoUBUNTU: [Config] annotations -- fix split between menu and flags for 9P
Andy Whitcroft [Sun, 20 Mar 2016 13:32:21 +0000 (13:32 +0000)]
UBUNTU: [Config] annotations -- fix split between menu and flags for 9P

Ignore: yes
Signed-off-by: Andy Whitcroft <apw@canonical.com>
8 years agoUBUNTU: Start new release
Tim Gardner [Mon, 21 Mar 2016 16:16:01 +0000 (10:16 -0600)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: Ubuntu-4.4.0-15.31
Tim Gardner [Fri, 18 Mar 2016 18:49:37 +0000 (12:49 -0600)]
UBUNTU: Ubuntu-4.4.0-15.31

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: (noup) cxl: Allow initialization on timebase sync failures
Frederic Barrat [Fri, 18 Mar 2016 12:42:21 +0000 (13:42 +0100)]
UBUNTU: SAUCE: (noup) cxl: Allow initialization on timebase sync failures

BugLink: http://bugs.launchpad.net/bugs/1557001
https://patchwork.ozlabs.org/patch/599445/

Failure to synchronize the PSL timebase currently prevents the
initialization of the cxl card, thus rendering the card useless. This
is too extreme for a feature which is rarely used, if at all. No
hardware AFUs or software is currently using PSL timebase.

This patch still tries to synchronize the PSL timebase when the card
is initialized, but ignores the error if it can't. Instead, it reports
a status via /sys.

Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: add a sysctl to enable unprivileged user ns AppArmor policy loading
Tyler Hicks [Thu, 17 Mar 2016 00:19:10 +0000 (19:19 -0500)]
UBUNTU: SAUCE: add a sysctl to enable unprivileged user ns AppArmor policy loading

BugLink: http://bugs.launchpad.net/bugs/1379535
Disabled by default until the AppArmor kernel code is deemed safe enough
to handle untrusted policy. Only developers of container technologies
should turn this on until that time.

If this sysctl is set to non-zero and a process with CAP_MAC_ADMIN in
the root namespace has created an AppArmor policy namespace,
unprivileged processes will be able to change to a profile in the
newly created AppArmor policy namespace and, if the profile allows
CAP_MAC_ADMIN and appropriate file permissions, will be able to load
policy in the respective policy namespace.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: (no-up) apparmor: sync of apparmor3.5-beta1 snapshot
John Johansen [Fri, 18 Mar 2016 13:09:27 +0000 (06:09 -0700)]
UBUNTU: SAUCE: (no-up) apparmor: sync of apparmor3.5-beta1 snapshot

BugLink: http://bugs.launchpad.net/bugs/1379535
This is a sync and squash of the apparmor 3.5-beta1 snapshot. The
set of patches in this squash are available in
  git://kernel.ubuntu.com/jj/ubuntu-xenial.git
using the the tag
  apparmor-3.5-beta1-presuash-snapshot

This fixes multiple bugs and adds the policy namespace stacking features.
BugLink: http://bugs.launchpad.net/bugs/1379535
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: (no-up) apparmor: add parameter to control whether policy...
John Johansen [Fri, 18 Mar 2016 13:06:36 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: (no-up) apparmor: add parameter to control whether policy hashing is used"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 41689645955f8c70ce06d27df993af47540e4536.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: (no-up) apparmor: Sync to apparmor3 - RC1 snapshot"
John Johansen [Fri, 18 Mar 2016 13:06:34 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: (no-up) apparmor: Sync to apparmor3 - RC1 snapshot"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 6bfc18ae5d5688cb93eceb7d07432dcb20c130a7.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: Revert: fix: only allow a single threaded process to ..."
John Johansen [Fri, 18 Mar 2016 13:06:32 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: Revert: fix: only allow a single threaded process to ..."

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 9b3067958c38974b4e447ce1688cba34fdf96b87.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: (no-up) fix: bad unix_addr_fs macro"
John Johansen [Fri, 18 Mar 2016 13:06:29 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: (no-up) fix: bad unix_addr_fs macro"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 14bc1e2030ad4fe9fc76dbf943c34df966a8ab2b.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: apparmor -- follow change to this_cpu_ptr"
John Johansen [Fri, 18 Mar 2016 13:06:27 +0000 (06:06 -0700)]
Revert "UBUNTU: apparmor -- follow change to this_cpu_ptr"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 53f139d625d03defdc30acdac4b02ab598ff9a5f.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: (no-up): apparmor: fix mediation of fs unix sockets"
John Johansen [Fri, 18 Mar 2016 13:06:25 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: (no-up): apparmor: fix mediation of fs unix sockets"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit c5e6ac5156fed943fa87f5a09286d13f59598d5e.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: (no-up) apparmor: fix mount not handling disconnected paths"
John Johansen [Fri, 18 Mar 2016 13:06:23 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: (no-up) apparmor: fix mount not handling disconnected paths"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 1e7328d53e190f2971bc02f09a6fcee5d1c3d9aa.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: (no-up) apparmor: Fix incompatible pointer type warnings"
John Johansen [Fri, 18 Mar 2016 13:06:21 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: (no-up) apparmor: Fix incompatible pointer type warnings"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 5a22abd43300e0763cdd352a530ab011eb100c5c.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: (no-up): apparmor: fix for failed mediation of socket that...
John Johansen [Fri, 18 Mar 2016 13:06:18 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: (no-up): apparmor: fix for failed mediation of socket that is being shutdown"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit e35fe56838480981337153af1236bf49ebb27c8a.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: fix sleep from invalid context"
John Johansen [Fri, 18 Mar 2016 13:06:16 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: fix sleep from invalid context"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit f970350049bdb24c3b3bdf4ef8c162833c4f2dd8.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: fix-up: kern_mount fail path should not be doing put_buffers()"
John Johansen [Fri, 18 Mar 2016 13:06:14 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: fix-up: kern_mount fail path should not be doing put_buffers()"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit bcc4061cfc6cc47f311b0666eef5f69ee5bf392d.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: oops do to invalid null ptr deref in label...
John Johansen [Fri, 18 Mar 2016 13:06:12 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: oops do to invalid null ptr deref in label print fns"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 949769a80df6a9446e63d56a1d7aa7da11cb4d9c.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Disallow update of cred when then subjective !=...
John Johansen [Fri, 18 Mar 2016 13:06:10 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Disallow update of cred when then subjective != the objective cred"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 1f95c6b69724417ab7039e924ec1a46cdc2f3a03.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: rework retrieval of the current label in the profile...
John Johansen [Fri, 18 Mar 2016 13:06:08 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: rework retrieval of the current label in the profile update case"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 8a6a317400fcd5e4eebfc20665ca0b3e8dbc8217.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: insert race between label_update and label_merge"
John Johansen [Fri, 18 Mar 2016 13:06:06 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: insert race between label_update and label_merge"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit c8cf841fc8307461847036d2be2ad27791be485b.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: ensure aa_get_newest will trip debugging if...
John Johansen [Fri, 18 Mar 2016 13:06:04 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: ensure aa_get_newest will trip debugging if the replacedby is not setup"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 9b02a4b233d1b5b9ec3cb4353b894089a1bf9ea0.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: debug: POISON label and replaceby pointer on free"
John Johansen [Fri, 18 Mar 2016 13:06:02 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: debug: POISON label and replaceby pointer on free"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit a74bd8e71cad1328bf5b933aeb7ac75d9f350c87.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: add underscores to indicate aa_label_next_not_in_set...
John Johansen [Fri, 18 Mar 2016 13:06:00 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: add underscores to indicate aa_label_next_not_in_set() use needs locking"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit ee2d7f94c7e6c72e8cbaafc37e78d50a7bbd2323.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: label merge handling of marking unconfined...
John Johansen [Fri, 18 Mar 2016 13:05:58 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: label merge handling of marking unconfined and stale"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 919e68433341077eec6b72c268447e2883f5c0b8.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: refcount race between locating in labelset...
John Johansen [Fri, 18 Mar 2016 13:05:55 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: refcount race between locating in labelset and get"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 3ceb6a970f5eec7580ec740ed493b07c142984f2.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: refcount leak in aa_label_merge"
John Johansen [Fri, 18 Mar 2016 13:05:53 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: refcount leak in aa_label_merge"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit a62647332d731a4d498d7a99d52926d5b0df739a.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: ensure new labels resulting from merge have...
John Johansen [Fri, 18 Mar 2016 13:05:51 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: ensure new labels resulting from merge have a replacedby"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 2928259cc7e695219d348927e7557e4a83fc92c8.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: label_vec_merge insertion"
John Johansen [Fri, 18 Mar 2016 13:05:49 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: label_vec_merge insertion"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 4cce60ba994d9c9e58d731c14cb257ca2c4ddeb6.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: deadlock in aa_put_label() call chain"
John Johansen [Fri, 18 Mar 2016 13:05:47 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: deadlock in aa_put_label() call chain"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 981d09c847dd7a382c069e81b4dd9ae0b180d698.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: add required locking of __aa_update_replacedby...
John Johansen [Fri, 18 Mar 2016 13:05:45 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: add required locking of __aa_update_replacedby on merge path"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit c6a6d05f05cea01eece5d29f0bb9537c401315d1.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: convert replacedby update to be protected by...
John Johansen [Fri, 18 Mar 2016 13:05:43 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: convert replacedby update to be protected by the labelset lock"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 6b05f95e2bd24c98400eae1c25d36a10242e7f5b.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: update replacedby allocation to take a gfp...
John Johansen [Fri, 18 Mar 2016 13:05:41 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: update replacedby allocation to take a gfp parameter"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 7e0977f6bb9ce90dcd316a3bf4c43546aac9f444.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: ensure that repacedby sharing is done correctly"
John Johansen [Fri, 18 Mar 2016 13:05:39 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: ensure that repacedby sharing is done correctly"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit b91470b3c68da4e10aeacfa4dac142327123093f.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor Fix: refcount bug in pivotroot mediation"
John Johansen [Fri, 18 Mar 2016 13:05:37 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor Fix: refcount bug in pivotroot mediation"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 2c30f8bde8c7986abcd2d18b4fa21565eede7dca.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: now that insert can force replacement use it...
John Johansen [Fri, 18 Mar 2016 13:05:34 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: now that insert can force replacement use it instead of remove_and_insert"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 7c2edd90b522bb373a6be6971ba8a3cfbc99ed1d.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: refcount bug when inserting label update that...
John Johansen [Fri, 18 Mar 2016 13:05:32 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: refcount bug when inserting label update that transitions ns"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit cfc72134ff8c7fba8f3e0711f900826e817eed5c.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: break circular refcount for label that is direc...
John Johansen [Fri, 18 Mar 2016 13:05:30 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: break circular refcount for label that is directly freed."

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 5f63d8b8931e1e33c62793583e9e5ed66ca9cc4b.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Don't remove label on rcu callback if the label...
John Johansen [Fri, 18 Mar 2016 13:05:29 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Don't remove label on rcu callback if the label has already been removed"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 838dc2541c639b30a25ecb484cb63c04e2848d8d.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: query label file permission"
John Johansen [Fri, 18 Mar 2016 13:05:26 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: query label file permission"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 07e05b2781aa973f95f31d7cb7789a986ddc9583.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: fix: ref count leak when profile sha1 hash is read"
John Johansen [Fri, 18 Mar 2016 13:05:25 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: fix: ref count leak when profile sha1 hash is read"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit b3df5394a0650d4135f465e3b94c0d6325f3e830.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: fixup: cleanup return handling of labels"
John Johansen [Fri, 18 Mar 2016 13:05:22 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: fixup: cleanup return handling of labels"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 90517b72df39a6cdf78d8bc50045c533d3844f73.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: fix log of apparmor audit message when kern_path...
John Johansen [Fri, 18 Mar 2016 13:05:20 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: fix log of apparmor audit message when kern_path() fails"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit ee0d667727eadf194825ecbb7524faa4c425ab8a.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: fix: replacedby forwarding is not being properly update when...
John Johansen [Fri, 18 Mar 2016 13:05:18 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: fix: replacedby forwarding is not being properly update when ns is destroyed"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 3945d2ba547424551dac4801150b33016519f648.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: fixup: make __share_replacedby private to get rid of build...
John Johansen [Fri, 18 Mar 2016 13:05:16 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: fixup: make __share_replacedby private to get rid of build warning"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 844c52f03735e9d39e76e515e509a103677a71fa.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: fixup: 20/23 locking issue around in __label_update"
John Johansen [Fri, 18 Mar 2016 13:05:14 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: fixup: 20/23 locking issue around in __label_update"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit bd0bf02f160e39b34a63a8ab35ab34fff74efb40.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: fixup: get rid of unused var build warning"
John Johansen [Fri, 18 Mar 2016 13:05:12 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: fixup: get rid of unused var build warning"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 5e08368fa2f94a46ae9d06c37d3519b92abe158e.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: fixup: cast poison values to remove warnings"
John Johansen [Fri, 18 Mar 2016 13:05:10 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: fixup: cast poison values to remove warnings"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 86d51202b3e9fd9e1b44766f231f38f8e88e4c9c.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: fix refcount race when finding a child profile"
John Johansen [Fri, 18 Mar 2016 13:05:08 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: apparmor: fix refcount race when finding a child profile"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 4dd6c2373c433dad655c265616465bb06ca615d9.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: fixup: warning about aa_label_vec_find_or_create not being...
John Johansen [Fri, 18 Mar 2016 13:05:05 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: fixup: warning about aa_label_vec_find_or_create not being static"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 2d9e947542095ff2e927152f013bf82d44948792.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: fix: audit "no_new_privs" case for exec failure"
John Johansen [Fri, 18 Mar 2016 13:05:03 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: fix: audit "no_new_privs" case for exec failure"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit b9eab948e47cad7504c32f5e6e6b65c97ff27345.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: Fixup: __label_update() still doesn't handle some cases correc...
John Johansen [Fri, 18 Mar 2016 13:05:01 +0000 (06:05 -0700)]
Revert "UBUNTU: SAUCE: Fixup: __label_update() still doesn't handle some cases correctly."

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 5d4140b82656bb1910d10a7e3af885d1c9e21a4d.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: Move replacedby allocation into label_alloc"
John Johansen [Fri, 18 Mar 2016 13:04:54 +0000 (06:04 -0700)]
Revert "UBUNTU: SAUCE: Move replacedby allocation into label_alloc"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 17b556348f12791d3d8b37733422c3f645bba668.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Debian] git-ubuntu-log -- git log output is UTF-8
Andy Whitcroft [Fri, 18 Mar 2016 14:20:56 +0000 (14:20 +0000)]
UBUNTU: [Debian] git-ubuntu-log -- git log output is UTF-8

Signed-off-by: Andy Whitcroft <apw@canonical.com>
8 years agoUBUNTU: SAUCE: (noup) arm64, mm, numa: Add NUMA balancing support for arm64.
Ganapatrao Kulkarni [Wed, 9 Mar 2016 21:49:54 +0000 (14:49 -0700)]
UBUNTU: SAUCE: (noup) arm64, mm, numa: Add NUMA balancing support for arm64.

BugLink: http://bugs.launchpad.net/bugs/1558765
Enable NUMA balancing for arm64 platforms.
Add pte, pmd protnone helpers for use by automatic NUMA balancing.

Reviewed-by: Robert Richter <rrichter@cavium.com>
Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
Signed-off-by: David Daney <david.daney@cavium.com>
[ dannf: v15 submittal ]
Reference: http://www.spinics.net/lists/arm-kernel/msg489639.html
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: (noup) arm64, numa: Add NUMA support for arm64 platforms.
Ganapatrao Kulkarni [Wed, 9 Mar 2016 21:47:29 +0000 (14:47 -0700)]
UBUNTU: SAUCE: (noup) arm64, numa: Add NUMA support for arm64 platforms.

BugLink: http://bugs.launchpad.net/bugs/1558765
Attempt to get the memory and CPU NUMA node via of_numa.  If that
fails, default the dummy NUMA node and map all memory and CPUs to node
0.

Tested-by: Shannon Zhao <shannon.zhao@linaro.org>
Reviewed-by: Robert Richter <rrichter@cavium.com>
Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
Signed-off-by: David Daney <david.daney@cavium.com>
[ dannf: v15 submittal ]
Reference: http://www.spinics.net/lists/arm-kernel/msg489640.html
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Config] CONFIG_NUMA=y and CONFIG_NODES_SHIFT=2 on arm64
dann frazier [Fri, 22 Jan 2016 00:48:36 +0000 (17:48 -0700)]
UBUNTU: [Config] CONFIG_NUMA=y and CONFIG_NODES_SHIFT=2 on arm64

BugLink: http://bugs.launchpad.net/bugs/1558765
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: (noup) arm64: Move unflatten_device_tree() call earlier.
David Daney [Wed, 9 Mar 2016 21:45:55 +0000 (14:45 -0700)]
UBUNTU: SAUCE: (noup) arm64: Move unflatten_device_tree() call earlier.

BugLink: http://bugs.launchpad.net/bugs/1558765
In order to extract NUMA information from the device tree, we need to
have the tree in its unflattened form.

Split paging_init() into two pieces.  The first piece maps memory so
that unflatten_device_tree(), can allocate memory.  The second piece
containing the bootmem_init() call that will be patched in a follow-on
patch to add NUMA handling.

Move the unflatten_device_tree() call between the two new pieces.

Signed-off-by: David Daney <david.daney@cavium.com>
[ dannf: v15 submittal ]
Reference: http://www.spinics.net/lists/arm-kernel/msg489637.html
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: (noup) of, numa: Add NUMA of binding implementation.
David Daney [Wed, 9 Mar 2016 21:42:17 +0000 (14:42 -0700)]
UBUNTU: SAUCE: (noup) of, numa: Add NUMA of binding implementation.

BugLink: http://bugs.launchpad.net/bugs/1558765
Add device tree parsing for NUMA topology using device
"numa-node-id" property in distance-map and cpu nodes.

This is a complete rewrite of a previous patch by:
   Ganapatrao Kulkarni<gkulkarni@caviumnetworks.com>

Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: Rob Herring <robh@kernel.org>
[ dannf: v15 submittal ]
Reference: http://www.spinics.net/lists/arm-kernel/msg489638.html
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Config] CONFIG_OF_NUMA=y
dann frazier [Fri, 22 Jan 2016 00:49:38 +0000 (17:49 -0700)]
UBUNTU: [Config] CONFIG_OF_NUMA=y

BugLink: http://bugs.launchpad.net/bugs/1558765
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: (noup) Documentation, dt, numa: dt bindings for NUMA.
Ganapatrao Kulkarni [Wed, 9 Mar 2016 21:41:14 +0000 (14:41 -0700)]
UBUNTU: SAUCE: (noup) Documentation, dt, numa: dt bindings for NUMA.

BugLink: http://bugs.launchpad.net/bugs/1558765
Add DT bindings for numa mapping of memory, CPUs and IOs.

Reviewed-by: Robert Richter <rrichter@cavium.com>
Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: Rob Herring <robh@kernel.org>
[ dannf: v15 submittal ]
Reference: http://www.spinics.net/lists/arm-kernel/msg489636.html
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: (noup) efi: ARM/arm64: ignore DT memory nodes instead of removing...
Ard Biesheuvel [Wed, 9 Mar 2016 21:39:58 +0000 (14:39 -0700)]
UBUNTU: SAUCE: (noup) efi: ARM/arm64: ignore DT memory nodes instead of removing them

BugLink: http://bugs.launchpad.net/bugs/1558765
There are two problems with the UEFI stub DT memory node removal
routine:
- it deletes nodes as it traverses the tree, which happens to work
  but is not supported, as deletion invalidates the node iterator;
- deleting memory nodes entirely may discard annotations in the form
  of additional properties on the nodes.

Since the discovery of DT memory nodes occurs strictly before the
UEFI init sequence, we can simply clear the memblock memory table
before parsing the UEFI memory map. This way, it is no longer
necessary to remove the nodes, so we can remove that logic from the
stub as well.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: David Daney <david.daney@cavium.com>
[ dannf: v15 submittal; backported to v4.4 ]
Reference: http://www.spinics.net/lists/arm-kernel/msg489635.html
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "Revert "af_unix: Revert 'lock_interruptible' in stream receive code""
Joseph Salisbury [Thu, 17 Mar 2016 21:28:51 +0000 (17:28 -0400)]
Revert "Revert "af_unix: Revert 'lock_interruptible' in stream receive code""

BugLink: http://bugs.launchpad.net/bugs/1558447
This reverts commit d45d44e002a9db710bde7c9a5831dd3324b32813.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Debian] git-ubuntu-log -- prevent bug references being split
Andy Whitcroft [Fri, 18 Mar 2016 02:24:41 +0000 (02:24 +0000)]
UBUNTU: [Debian] git-ubuntu-log -- prevent bug references being split

Signed-off-by: Andy Whitcroft <apw@canonical.com>
8 years agoDrivers: hv: vmbus: Support kexec on ws2012 r2 and above
Alex Ng [Fri, 26 Feb 2016 23:13:22 +0000 (15:13 -0800)]
Drivers: hv: vmbus: Support kexec on ws2012 r2 and above

BugLink: http://bugs.launchpad.net/bugs/1558720
WS2012 R2 and above hosts can support kexec in that thay can support
reconnecting to the host (as would be needed in the kexec path)
on any CPU. Enable this. Pre ws2012 r2 hosts don't have this ability
and consequently cannot support kexec.

Signed-off-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from linux-next commit 7268644734f6a300353a4c4ff8bf3e013ba80f89)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: Support handling messages on multiple CPUs
K. Y. Srinivasan [Fri, 26 Feb 2016 23:13:21 +0000 (15:13 -0800)]
Drivers: hv: vmbus: Support handling messages on multiple CPUs

BugLink: http://bugs.launchpad.net/bugs/1558720
Starting with Windows 2012 R2, message inteerupts can be delivered
on any VCPU in the guest. Support this functionality.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from linux-next commit d81274aae61c0a045cd0f34191c51fa64ba58bc4)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agos390/pci: enforce fmb page boundary rule
Sebastian Ott [Mon, 14 Mar 2016 14:47:23 +0000 (15:47 +0100)]
s390/pci: enforce fmb page boundary rule

BugLink: http://bugs.launchpad.net/bugs/1558625
The function measurement block must not cross a page boundary. Ensure
that by raising the alignment requirement to the smallest power of 2
larger than the size of the fmb.

Fixes: d0b088531 ("s390/pci: performance statistics and debug infrastructure")
Cc: stable@vger.kernel.org # v3.8+
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
(cherry picked from commit 80c544ded25ac14d7cc3e555abb8ed2c2da99b84)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agos390/pci: add ioctl interface for CLP
Martin Schwidefsky [Wed, 13 Jan 2016 11:54:28 +0000 (12:54 +0100)]
s390/pci: add ioctl interface for CLP

BugLink: http://bugs.launchpad.net/bugs/1558624
Provide a user space interface to issue call logical-processor instructions.
Only selected CLP commands are allowed, enough to get the full overview of
the installed PCI functions.

Reviewed-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
(cherry picked from commit 988b86e69ded17f0f1209fd3ef1c4c7f1567dcc1)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agos390/pci: remove pdev pointer from arch data
Sebastian Ott [Fri, 29 Jan 2016 14:13:30 +0000 (15:13 +0100)]
s390/pci: remove pdev pointer from arch data

BugLink: http://bugs.launchpad.net/bugs/1558624
For each PCI function we need to maintain arch specific data in
struct zpci_dev which also contains a pointer to struct pci_dev.

When a function is registered or deregistered (which is triggered by PCI
common code) we need to adjust that pointer which could interfere with
the machine check handler (triggered by FW) using zpci_dev->pdev.

Since multiple instances of the same pdev could exist at a time this can't
be solved with locking.

Fix that by ditching the pdev pointer and use a bus walk to reach
struct pci_dev (only one instance of a pdev can be registered at the bus
at a time).

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
(cherry picked from commit 9a99649f2a89fdfc9dde5d5401675561567bf99a)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agos390/pci: remove iomap sanity checks
Sebastian Ott [Fri, 22 Jan 2016 13:11:21 +0000 (14:11 +0100)]
s390/pci: remove iomap sanity checks

BugLink: http://bugs.launchpad.net/bugs/1558624
Since each iomap_entry handles only one bar of one pci function
(even when disjunct ranges of a bar are mapped) the sanity check
in pci_iomap_range is not needed and can be removed.

Also convert the remaining BUG_ONs to WARN_ONs.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
(cherry picked from commit f5e44f82c1848d8e55fb0061308f14c0884e5483)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agos390/pci: set error state for unusable functions
Sebastian Ott [Fri, 22 Jan 2016 13:04:18 +0000 (14:04 +0100)]
s390/pci: set error state for unusable functions

BugLink: http://bugs.launchpad.net/bugs/1558624
We receive special notifications from firmware when an error was detected
and a pci function became unusable. Set the error_state accordingly to give
device drivers a hint that they don't need to try error recovery.

Suggested-by: Alexander Schmidt <alexschm@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
(cherry picked from commit 8ead7efb6379354d0d31efb39342f4399c87cb67)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agos390/pci: fix bar check
Sebastian Ott [Fri, 22 Jan 2016 13:03:06 +0000 (14:03 +0100)]
s390/pci: fix bar check

BugLink: http://bugs.launchpad.net/bugs/1558624
Fix the check which bar space we should map to allow available bars only.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
(cherry picked from commit c0cabaddeeeab13db8ef4e275ab5c7c0e8746324)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agos390/pci: resize iomap
Sebastian Ott [Fri, 22 Jan 2016 13:01:44 +0000 (14:01 +0100)]
s390/pci: resize iomap

BugLink: http://bugs.launchpad.net/bugs/1558624
On s390 we need to maintain a mapping between iomem addresses
and arch specific function identifiers. Currently the mapping
table is created as such that we could span the whole iomem
address space. Since we can only map each bar space from each
possible function we have an upper bound for the number of
mapping entries.

This reduces the size of the iomap from 256K to less than 4K
(using the defconfig).

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
(cherry picked from commit c506fff3d3a8a632e8eb2270680548ec415f0357)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agos390/pci: improve ZPCI_* macros
Sebastian Ott [Fri, 22 Jan 2016 12:59:35 +0000 (13:59 +0100)]
s390/pci: improve ZPCI_* macros

BugLink: http://bugs.launchpad.net/bugs/1558624
Most of the constants defined in pci_io.h depend on each other
and thus can be calculated.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
(back ported from commit bf19c94d5caa100f22c20d756c57e3550c01cdb8)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
 Conflicts:
arch/s390/include/asm/pci_io.h

8 years agos390/pci: provide ZPCI_ADDR macro
Sebastian Ott [Fri, 22 Jan 2016 12:58:42 +0000 (13:58 +0100)]
s390/pci: provide ZPCI_ADDR macro

BugLink: http://bugs.launchpad.net/bugs/1558624
Provide and use a ZPCI_ADDR macro as the complement of ZPCI_IDX
to get rid of some constants in the code.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
(cherry picked from commit 9e00caaea14b90a788c17a2e0c32108a3d7008ec)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agopage_to_phys() always returns a multiple of PAGE_SIZE
Al Viro [Sat, 9 Jan 2016 07:16:04 +0000 (02:16 -0500)]
page_to_phys() always returns a multiple of PAGE_SIZE

BugLink: http://bugs.launchpad.net/bugs/1558624
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit bdb97e91e0140230bda9a83f6dbaa29b0c2e0522)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agos390/pci_dma: fix DMA table corruption with > 4 TB main memory
Gerald Schaefer [Mon, 16 Nov 2015 13:35:48 +0000 (14:35 +0100)]
s390/pci_dma: fix DMA table corruption with > 4 TB main memory

BugLink: http://bugs.launchpad.net/bugs/1558624
DMA addresses returned from map_page() are calculated by using an iommu
bitmap plus a start_dma offset. The size of this bitmap is based on the main
memory size. If we have more than (4 TB - start_dma) main memory, the DMA
address calculation will also produce addresses > 4 TB. Such addresses
cannot be inserted in the 3-level DMA page table, instead the entries
modulo 4 TB will be overwritten.

Fix this by restricting the iommu bitmap size to (4 TB - start_dma).
Also set zdev->end_dma to the actual end address of the usable
range, instead of the theoretical maximum as reported by the hardware,
which fixes a sanity check in dma_map() and also the IOMMU API domain
geometry aperture calculation.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Reviewed-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
(cherry picked from commit 69eea95c48857c9dfcac120d6acea43027627b28)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: (noup) KEYS: Support for inserting a certificate into x86 bzImage
Mehmet Kayaalp [Thu, 10 Mar 2016 21:22:13 +0000 (16:22 -0500)]
UBUNTU: SAUCE: (noup) KEYS: Support for inserting a certificate into x86 bzImage

BugLink: http://bugs.launchpad.net/bugs/1558553
The config option SYSTEM_EXTRA_CERTIFICATE reserves space in vmlinux file,
which is compressed to create the self-extracting bzImage. This patch adds the
capability of extracting the vmlinux, inserting the certificate, and
repackaging the result into a bzImage.

It only works if the resulting compressed vmlinux is smaller than the original.
Otherwise re-linking would be required. To make the reserved space allocate
actual space in bzImage, a null key is inserted into vmlinux before creating
the bzImage:

make vmlinux
scripts/insert-sys-cert -b vmlinux -c /dev/null
make bzImage

After null key insertion, the script populates the rest of the reserved space
with random bytes, which have poor compression. After receiving a bzImage that
is created this way, actual certificate can be inserted into the bzImage:

scripts/insert-sys-cert -s <System.map> -z <bzImage> -c <certfile>

Signed-off-by: Mehmet Kayaalp <mkayaalp@linux.vnet.ibm.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoKEYS: Reserve an extra certificate symbol for inserting without recompiling
Mehmet Kayaalp [Tue, 24 Nov 2015 21:18:05 +0000 (16:18 -0500)]
KEYS: Reserve an extra certificate symbol for inserting without recompiling

BugLink: http://bugs.launchpad.net/bugs/1558553
Place a system_extra_cert buffer of configurable size, right after the
system_certificate_list, so that inserted keys can be readily processed by
the existing mechanism. Added script takes a key file and a kernel image
and inserts its contents to the reserved area. The
system_certificate_list_size is also adjusted accordingly.

Call the script as:

    scripts/insert-sys-cert -b <vmlinux> -c <certfile>

If vmlinux has no symbol table, supply System.map file with -s flag.
Subsequent runs replace the previously inserted key, instead of appending
the new one.

Signed-off-by: Mehmet Kayaalp <mkayaalp@linux.vnet.ibm.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
(cherry picked from commit c4c36105958576fee87d2c75f4b69b6e5bbde772)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoKEYS: Use the symbol value for list size, updated by scripts/insert-sys-cert
Mehmet Kayaalp [Tue, 24 Nov 2015 21:19:03 +0000 (16:19 -0500)]
KEYS: Use the symbol value for list size, updated by scripts/insert-sys-cert

BugLink: http://bugs.launchpad.net/bugs/1558553
When a certificate is inserted to the image using scripts/writekey, the
value of __cert_list_end does not change. The updated size can be found
out by reading the value pointed by the system_certificate_list_size
symbol.

Signed-off-by: Mehmet Kayaalp <mkayaalp@linux.vnet.ibm.com>
Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit 8e1678988897ebcc29b318ed78af4808202772df)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Config] CONFIG_SYSTEM_EXTRA_CERTIFICATE=y, CONFIG_SYSTEM_EXTRA_CERTIFICATE_S...
Tim Gardner [Thu, 17 Mar 2016 21:39:30 +0000 (15:39 -0600)]
UBUNTU: [Config] CONFIG_SYSTEM_EXTRA_CERTIFICATE=y, CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE=4096

BugLink: http://bugs.launchpad.net/bugs/1558553
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoipv4: only create late gso-skb if skb is already set up with CHECKSUM_PARTIAL
Hannes Frederic Sowa [Mon, 22 Feb 2016 17:43:25 +0000 (18:43 +0100)]
ipv4: only create late gso-skb if skb is already set up with CHECKSUM_PARTIAL

BugLink: http://bugs.launchpad.net/bugs/1558025
Otherwise we break the contract with GSO to only pass CHECKSUM_PARTIAL
skbs down. This can easily happen with UDP+IPv4 sockets with the first
MSG_MORE write smaller than the MTU, second write is a sendfile.

Returning -EOPNOTSUPP lets the callers fall back into normal sendmsg path,
were we calculate the checksum manually during copying.

Commit d749c9cbffd6 ("ipv4: no CHECKSUM_PARTIAL on MSG_MORE corked
sockets") started to exposes this bug.

Fixes: d749c9cbffd6 ("ipv4: no CHECKSUM_PARTIAL on MSG_MORE corked sockets")
Reported-by: Jiri Benc <jbenc@redhat.com>
Cc: Jiri Benc <jbenc@redhat.com>
Reported-by: Wakko Warner <wakko@animx.eu.org>
Cc: Wakko Warner <wakko@animx.eu.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit a8c4a2522a0808c5c2143612909717d1115c40cf)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoPCI: thunder: Add driver for ThunderX-pass{1,2} on-chip devices
David Daney [Fri, 4 Mar 2016 22:31:48 +0000 (14:31 -0800)]
PCI: thunder: Add driver for ThunderX-pass{1,2} on-chip devices

BugLink: http://bugs.launchpad.net/bugs/1558342
The cavium,pci-thunder-ecam devices are exactly ECAM-based PCI root
complexes.  These root complexes (loosely referred to as ECAM units in the
hardware manuals) are used to access the Thunder on-chip devices.  They
are special in that all the BARs on devices behind these root complexes are
at fixed addresses.

Add a driver for these devices that synthesizes Enhanced Allocation (EA)
capability entries for each BAR.

Since this EA synthesis is needed for exactly two chip models, we can hard-
code some assumptions about the device topology and the layout of the
config space of specific DEVFNs in the driver.

[bhelgaas: changelog, whitespace]
Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rob Herring <robh@kernel.org>
(cherry picked from linux-next commit 7b6e7ba8e81a862e20d213d90aa5ba1e5a02aba6)
[dannf: offset fixups to apply to v4.4]
Signed-off-by: dann frazier <dann.frazier@canonical.com>
8 years agoPCI: thunder: Add PCIe host driver for ThunderX processors
David Daney [Fri, 4 Mar 2016 22:31:47 +0000 (14:31 -0800)]
PCI: thunder: Add PCIe host driver for ThunderX processors

BugLink: http://bugs.launchpad.net/bugs/1558342
The root complexes used to access off-chip PCIe devices (called PEM units
in the hardware manuals) on some Cavium ThunderX processors require quirky
access methods for the config space of the PCIe bridge.

Add a driver to provide these config space accessor functions.  Use the
pci-host-common code to configure the PCI machinery.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
(cherry picked from linux-next commit f12b76e56ada6e276a3d45b60c4e26e2dda7e547)
[dannf: offset fixups to apply to v4.4]
Signed-off-by: dann frazier <dann.frazier@canonical.com>
8 years agoPCI: generic: Expose pci_host_common_probe() for use by other drivers
David Daney [Fri, 11 Mar 2016 21:35:55 +0000 (15:35 -0600)]
PCI: generic: Expose pci_host_common_probe() for use by other drivers

BugLink: http://bugs.launchpad.net/bugs/1558342
Move pci_host_common_probe() and associated functions to pci-host-common.c,
where it can be shared with other drivers.  Make it public (not static)
and update Kconfig and Makefile to build it.  No functional change
intended.

[bhelgaas: split into separate patch, changelog]
Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Will Deacon <will.deacon@arm.com>
(cherry picked from linux-next commit 4e64dbe226e707b442d45c2096dde2090f34f84d)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
8 years agoPCI: generic: Add pci_host_common_probe(), based on gen_pci_probe()
David Daney [Fri, 11 Mar 2016 21:25:13 +0000 (15:25 -0600)]
PCI: generic: Add pci_host_common_probe(), based on gen_pci_probe()

BugLink: http://bugs.launchpad.net/bugs/1558342
Factor gen_pci_probe(), moving most of it into pci_host_common_probe()
where it can be shared with other drivers that have slightly different
config accessors.  No functional change intended.

[bhelgaas: split into separate patch, changelog]
Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Will Deacon <will.deacon@arm.com>
(cherry picked from linux-next commit d51b371087d7198c733d2ef3c4db8165aee4de4e)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
8 years agoPCI: generic: Move structure definitions to separate header file
David Daney [Fri, 11 Mar 2016 21:18:38 +0000 (15:18 -0600)]
PCI: generic: Move structure definitions to separate header file

BugLink: http://bugs.launchpad.net/bugs/1558342
Move definitions for generic PCI host controller driver structures to a
separate header file so we can share them with other drivers.  No
functional change intended.

[bhelgaas: split into separate patch, changelog]
Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Will Deacon <will.deacon@arm.com>
(cherry picked from linux-next commit 7149b9fdaa5e160a7ee2af9014d9af77e87d9689)
[dannf: modified to move the structures as they were in v4.4]
Signed-off-by: dann frazier <dann.frazier@canonical.com>
8 years agoUBUNTU: [Config] CONFIG_PCI_HOST_THUNDER_ECAM=y
dann frazier [Tue, 15 Mar 2016 23:09:32 +0000 (17:09 -0600)]
UBUNTU: [Config] CONFIG_PCI_HOST_THUNDER_ECAM=y

BugLink: http://bugs.launchpad.net/bugs/1558342
Signed-off-by: dann frazier <dann.frazier@canonical.com>
8 years agoUBUNTU: [Config] CONFIG_PCI_HOST_THUNDER_PEM=y
dann frazier [Tue, 15 Mar 2016 23:07:30 +0000 (17:07 -0600)]
UBUNTU: [Config] CONFIG_PCI_HOST_THUNDER_PEM=y

BugLink: http://bugs.launchpad.net/bugs/1558342
Signed-off-by: dann frazier <dann.frazier@canonical.com>
8 years agoUBUNTU: [Config] CONFIG_PCI_HOST_COMMON=y
dann frazier [Tue, 15 Mar 2016 23:04:27 +0000 (17:04 -0600)]
UBUNTU: [Config] CONFIG_PCI_HOST_COMMON=y

BugLink: http://bugs.launchpad.net/bugs/1558342
Signed-off-by: dann frazier <dann.frazier@canonical.com>