]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/log
mirror_ubuntu-artful-kernel.git
6 years agoUBUNTU: SAUCE: Import aufs driver
Seth Forshee [Sun, 10 Sep 2017 23:06:06 +0000 (18:06 -0500)]
UBUNTU: SAUCE: Import aufs driver

Import aufs4.13 20170911 from https://github.com/sfjro/aufs4-standalone
commit c830153a78eb31b1925b8d7c3f96aba278738f48.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoRevert "UBUNTU: SAUCE: Import aufs driver"
Seth Forshee [Fri, 8 Sep 2017 16:36:54 +0000 (11:36 -0500)]
Revert "UBUNTU: SAUCE: Import aufs driver"

This reverts commit 18507e1a7540b8a6542e4f4f50d2272fba82b3cb to
import a newer aufs version.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoPCI: Disable VF decoding before pcibios_sriov_disable() updates resources
Gavin Shan [Fri, 8 Sep 2017 13:45:29 +0000 (09:45 -0400)]
PCI: Disable VF decoding before pcibios_sriov_disable() updates resources

BugLink: http://bugs.launchpad.net/bugs/1715073
A struct resource represents the address space consumed by a device.  We
should not modify that resource while the device is actively using the
address space.  For VFs, pci_iov_update_resource() enforces this by
printing a warning and doing nothing if the VFE (VF Enable) and MSE (VF
Memory Space Enable) bits are set.

Previously, both sriov_enable() and sriov_disable() called the
pcibios_sriov_disable() arch hook, which may update the struct resource,
while VFE and MSE were enabled.  This effectively dropped the resource
update pcibios_sriov_disable() intended to do.

Disable VF memory decoding before calling pcibios_sriov_disable().

Reported-by: Carol L Soto <clsoto@us.ibm.com>
Tested-by: Carol L Soto <clsoto@us.ibm.com>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
[bhelgaas: changelog]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: shan.gavin@gmail.com
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
(cherry picked from linux-next commit 0fc690a7c3f7053613dcbab6a7613bb6586d8ee2)
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: selftests/seccomp: Support glibc 2.26 siginfo_t.h
Kees Cook [Thu, 7 Sep 2017 23:32:46 +0000 (16:32 -0700)]
UBUNTU: SAUCE: selftests/seccomp: Support glibc 2.26 siginfo_t.h

The 2.26 release of glibc changed how siginfo_t is defined, and the earlier
work-around to using the kernel definition are no longer needed. The old
way needs to stay around for a while, though.

Reported-by: Seth Forshee <seth.forshee@canonical.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Will Drewry <wad@chromium.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoi40e: point wb_desc at the nvm_wb_desc during i40e_read_nvm_aq
Jacob Keller [Fri, 1 Sep 2017 20:43:08 +0000 (13:43 -0700)]
i40e: point wb_desc at the nvm_wb_desc during i40e_read_nvm_aq

BugLink: http://bugs.launchpad.net/bugs/1715578
When introducing the functions to read the NVM through the AdminQ, we
did not correctly mark the wb_desc.

Fixes: 7073f46e443e ("i40e: Add AQ commands for NVM Update for X722", 2015-06-05)
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 3c8f3e96af3a6799841761923d000566645f0942)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoi40e: avoid NVM acquire deadlock during NVM update
Anjali Singhai Jain [Fri, 1 Sep 2017 20:42:49 +0000 (13:42 -0700)]
i40e: avoid NVM acquire deadlock during NVM update

BugLink: http://bugs.launchpad.net/bugs/1715578
X722 devices use the AdminQ to access the NVM, and this requires taking
the AdminQ lock. Because of this, we lock the AdminQ during
i40e_read_nvm(), which is also called in places where the lock is
already held, such as the firmware update path which wants to lock once
and then unlock when finished after performing several tasks.

Although this should have only affected X722 devices, commit
96a39aed25e6 ("i40e: Acquire NVM lock before reads on all devices",
2016-12-02) added locking for all NVM reads, regardless of device
family.

This resulted in us accidentally causing NVM acquire timeouts on all
devices, causing failed firmware updates which left the eeprom in
a corrupt state.

Create unsafe non-locked variants of i40e_read_nvm_word and
i40e_read_nvm_buffer, __i40e_read_nvm_word and __i40e_read_nvm_buffer
respectively. These variants will not take the NVM lock and are expected
to only be called in places where the NVM lock is already held if
needed.

Since the only caller of i40e_read_nvm_buffer() was in such a path,
remove it entirely in favor of the unsafe version. If necessary we can
always add it back in the future.

Additionally, we now need to hold the NVM lock in i40e_validate_checksum
because the call to i40e_calc_nvm_checksum now assumes that the NVM lock
is held. We can further move the call to read I40E_SR_SW_CHECKSUM_WORD
up a bit so that we do not need to acquire the NVM lock twice.

This should resolve firmware updates and also fix potential raise that
could have caused the driver to report an invalid NVM checksum upon
driver load.

Reported-by: Stefan Assmann <sassmann@kpanic.de>
Fixes: 96a39aed25e6 ("i40e: Acquire NVM lock before reads on all devices", 2016-12-02)
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 09f79fd49d94cda5837e9bfd0cb222232b3b6d9f)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoperf vendor events powerpc: Remove duplicate events
Sukadev Bhattiprolu [Thu, 31 Aug 2017 01:42:23 +0000 (21:42 -0400)]
perf vendor events powerpc: Remove duplicate events

BugLink: http://bugs.launchpad.net/bugs/1714571
Some POWER PMU event names have multiple/alternate event codes. These
alternate event codes were listed in the POWER9 JSON files for
reference.

But the perf tool does not seem to handle duplicates cleanly. 'perf
list' shows such duplicate events only once, but 'perf stat' ends up
counting the first event code twice, multiplexing if necessary and we
end up with double the event counts.

Remove the duplicate event codes from the JSON files for now.

Reported-by: Michael Petlan <mpetlan@redhat.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Anton Blanchard <anton@au1.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Link: http://lkml.kernel.org/r/20170830231506.GB20351@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(cherry picked from commit 2a118e1bd22cad57318520d37e3a184b8846c6a2
 git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] Include vmd in storage-core-modules udeb
Seth Forshee [Wed, 6 Sep 2017 12:54:37 +0000 (07:54 -0500)]
UBUNTU: [Config] Include vmd in storage-core-modules udeb

BugLink: http://bugs.launchpad.net/bugs/1703339
This is a secondary PCIe host bridge which may have NVMe devices
behind it. The module is needed in the installer to install to
these disks.

Note that while theoretically non-disk devices such as NICs could
be connected in a VMD domain, Intel says they do not support such
usage at this time. If supported in the future vmd should be
moved to the kernel-image udeb.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state...
Gautham R. Shenoy [Thu, 31 Aug 2017 11:47:41 +0000 (17:17 +0530)]
UBUNTU: SAUCE: powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline

BugLink: http://bugs.launchpad.net/bugs/1715064
commit 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via
stop-api only on Hotplug") clears the PECE1 bit of the LPCR via
stop-api during CPU-Hotplug to prevent wakeup due to a decrementer on
an offlined CPU which is in a deep stop state.

In the case where the stop-api support is found to be lacking, the
commit 785a12afdb4a ("powerpc/powernv/idle: Disable LOSE_FULL_CONTEXT
states when stop-api fails") disables deep states that lose hypervisor
context. Thus in this case, the offlined CPU will be put to some
shallow idle state.

However, we currently unconditionally clear the PECE1 in LPCR via
stop-api during CPU-Hotplug even when deep states are disabled due to
stop-api failure.

Fix this by clearing PECE1 of LPCR via stop-api during CPU-Hotplug
*only* when the offlined CPU will be put to a deep state that loses
hypervisor context.

Fixes: commit 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via
stop-api only on Hotplug")

Reported-by: Pavithra Prakash <pavirampu@linux.vnet.ibm.com>
Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
(Applied from mailing list patch https://patchwork.ozlabs.org/patch/808233/)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agopowerpc/powernv: Clear PECE1 in LPCR via stop-api only on Hotplug
Gautham R. Shenoy [Fri, 21 Jul 2017 11:01:34 +0000 (16:31 +0530)]
powerpc/powernv: Clear PECE1 in LPCR via stop-api only on Hotplug

BugLink: http://bugs.launchpad.net/bugs/1715064
Currently we use the stop-api provided by the firmware to program the
SLW engine to restore the values of hypervisor resources that get lost
on deeper idle states (such as winkle). Since the deep states were
only used for CPU-Hotplug on POWER8 systems, we would program the LPCR
to have the PECE1 bit since Hotplugged CPUs shouldn't be spuriously
woken up by decrementer.

On POWER9, some of the deep platform idle states such as stop4 can be
used in cpuidle as well. In this case, we want the CPU in stop4 to be
woken up by the decrementer when some timer on the CPU expires.

In this patch, we program the stop-api for LPCR with PECE1
bit cleared only when we are offlining the CPU and set it
back once the CPU is online.

Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 24be85a23d1fcdc72264a062a2e4ebaaea48feab linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agopowerpc/powernv: Save/Restore additional SPRs for stop4 cpuidle
Gautham R. Shenoy [Fri, 21 Jul 2017 10:41:37 +0000 (16:11 +0530)]
powerpc/powernv: Save/Restore additional SPRs for stop4 cpuidle

BugLink: http://bugs.launchpad.net/bugs/1715064
The stop4 idle state on POWER9 is a deep idle state which loses
hypervisor resources, but whose latency is low enough that it can be
exposed via cpuidle.

Until now, the deep idle states which lose hypervisor resources (eg:
winkle) were only exposed via CPU-Hotplug.  Hence currently on wakeup
from such states, barring a few SPRs which need to be restored to
their older value, rest of the SPRS are reinitialized to their values
corresponding to that at boot time.

When stop4 is used in the context of cpuidle, we want these additional
SPRs to be restored to their older value, to ensure that the context
on the CPU coming back from idle is same as it was before going idle.

In this patch, we define a SPR save area in PACA (since we have used
up the volatile register space in the stack) and on POWER9, we restore
SPRN_PID, SPRN_LDBAR, SPRN_FSCR, SPRN_HFSCR, SPRN_MMCRA, SPRN_MMCR1,
SPRN_MMCR2 to the values they had before entering stop.

Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit e1c1cfed54326fd2b17c78f0c85092167fc0783b linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Start new release
Seth Forshee [Sun, 10 Sep 2017 21:59:31 +0000 (16:59 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Ubuntu-4.13.0-9.10
Seth Forshee [Tue, 5 Sep 2017 12:54:54 +0000 (07:54 -0500)]
UBUNTU: Ubuntu-4.13.0-9.10

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Rebase to v4.13
Seth Forshee [Tue, 5 Sep 2017 12:37:04 +0000 (07:37 -0500)]
UBUNTU: Rebase to v4.13

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] CONFIG_EDAC_GHES=n
Seth Forshee [Fri, 1 Sep 2017 15:15:54 +0000 (10:15 -0500)]
UBUNTU: [Config] CONFIG_EDAC_GHES=n

BugLink: http://bugs.launchpad.net/bugs/1714112
This causes a conflict with the sbridge module, the advice from
upstream is to disable the option until a fix is available.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: ubuntu: vbox -- update to 5.1.26-dfsg-2
Seth Forshee [Fri, 1 Sep 2017 13:41:58 +0000 (08:41 -0500)]
UBUNTU: ubuntu: vbox -- update to 5.1.26-dfsg-2

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Start new release
Seth Forshee [Fri, 1 Sep 2017 13:37:15 +0000 (08:37 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Ubuntu-4.13.0-8.9
Seth Forshee [Thu, 31 Aug 2017 19:27:58 +0000 (14:27 -0500)]
UBUNTU: Ubuntu-4.13.0-8.9

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: apparmor: fix apparmorfs DAC access, permissions
John Johansen [Thu, 31 Aug 2017 17:05:41 +0000 (10:05 -0700)]
UBUNTU: SAUCE: apparmor: fix apparmorfs DAC access, permissions

The DAC access permissions for several apparmorfs files are wrong.

.access - needs to be writable by all tasks to perform queries
the others in the set only provide a read fn so should be read only.

With policy namespace virtualization all apparmor needs to control
the permission and visibility checks directly which means DAC
access has to be allowed for all user, group, and other.

BugLink: http://bugs.launchpad.net/bugs/1713103
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] Update annotations for 4.13
Seth Forshee [Thu, 31 Aug 2017 16:36:08 +0000 (11:36 -0500)]
UBUNTU: [Config] Update annotations for 4.13

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] CONFIG_SCSI_MQ_DEFAULT=n for s390x
Seth Forshee [Thu, 31 Aug 2017 14:40:16 +0000 (09:40 -0500)]
UBUNTU: [Config] CONFIG_SCSI_MQ_DEFAULT=n for s390x

This option somehow got flipped from what it was in previous
kernels, change it back.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] Disable CONFIG_MDIO_* options for s390x
Seth Forshee [Thu, 31 Aug 2017 13:52:37 +0000 (08:52 -0500)]
UBUNTU: [Config] Disable CONFIG_MDIO_* options for s390x

Several options got defaulted to y when rebasing to 4.13 bug
don't actually look to be relevant to s390. Change these options
to n.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] CONFIG_I2C_SLAVE=n for amd64, i386, ppc64el
Seth Forshee [Wed, 30 Aug 2017 21:08:51 +0000 (16:08 -0500)]
UBUNTU: [Config] CONFIG_I2C_SLAVE=n for amd64, i386, ppc64el

This was mistakenly flipped from n to y when updating configs for
4.13. Flip it back.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] CONFIG_CRYPTO_DEV_NITROX_CNN55XX=n for s390x
Seth Forshee [Wed, 30 Aug 2017 19:29:09 +0000 (14:29 -0500)]
UBUNTU: [Config] CONFIG_CRYPTO_DEV_NITROX_CNN55XX=n for s390x

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] Enable CONFIG_ARCH_SUNXI and related options for arm64
Seth Forshee [Wed, 30 Aug 2017 17:17:30 +0000 (12:17 -0500)]
UBUNTU: [Config] Enable CONFIG_ARCH_SUNXI and related options for arm64

BugLink: http://bugs.launchpad.net/bugs/1701137
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: selftests/powerpc: Disable some ptrace selftests
Seth Forshee [Wed, 30 Aug 2017 13:14:06 +0000 (08:14 -0500)]
UBUNTU: SAUCE: selftests/powerpc: Disable some ptrace selftests

The ptrace-tm-vsx, ptrace-tm-spd-vsx, and ptrace-tm-spr tests
FTBFS with the gcc in artful due to inline asm which includes r2
in the clobber list. Disable these tests until a solution is
found.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: Import aufs driver
Seth Forshee [Mon, 28 Aug 2017 19:44:30 +0000 (14:44 -0500)]
UBUNTU: SAUCE: Import aufs driver

Import aufs4.x-rcN 20170828 from https://github.com/sfjro/aufs4-standalone
commit 9aa6b2e732a0ae7057e247cabc7bd6869714e8a3.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoRevert "UBUNTU: SAUCE: Import aufs driver"
Seth Forshee [Mon, 28 Aug 2017 19:42:38 +0000 (14:42 -0500)]
Revert "UBUNTU: SAUCE: Import aufs driver"

This reverts commit 47f3f9ddbed0ea6859032e0aea8da0eadb9cbb79 to
import a newer version.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: i2c: i801: Restore the presence state of P2SB PCI device after reading BAR
Qiuxu Zhuo [Mon, 14 Aug 2017 16:04:50 +0000 (00:04 +0800)]
UBUNTU: SAUCE: i2c: i801: Restore the presence state of P2SB PCI device after reading BAR

BugLink: http://bugs.launchpad.net/bugs/1709257
Sun, Yunying reported the following failure on Denverton micro-server:

 EDAC DEBUG: pnd2_init:
 EDAC DEBUG: pnd2_probe:
 EDAC DEBUG: dnv_rd_reg: Read b_cr_tolud_pci=00000000_80000000
 EDAC DEBUG: dnv_rd_reg: Read b_cr_touud_lo_pci=00000000_80000000
 EDAC DEBUG: dnv_rd_reg: Read b_cr_touud_hi_pci=00000000_00000004
 EDAC DEBUG: dnv_rd_reg: Read b_cr_asym_mem_region0_mchbar=00000000_00000000
 EDAC DEBUG: dnv_rd_reg: Read b_cr_asym_mem_region1_mchbar=00000000_00000000
 EDAC DEBUG: dnv_rd_reg: Read b_cr_mot_out_base_mchbar=00000000_00000000
 EDAC DEBUG: dnv_rd_reg: Read b_cr_mot_out_mask_mchbar=00000000_00000000
 EDAC pnd2: Failed to register device with error -19.

On Denverton micro-server, the presence of the P2SB bridge PCI device is
enabled or disabled by the item 'RelaxSecConf' in BIOS setup menu. When
'RelaxSecConf' is enabled, the P2SB PCI device is present and the pnd2_edac
EDAC driver also uses it to get BAR. Hiding the P2SB PCI device caused the
pnd2_edac EDAC driver failed to get BAR then reported the above failure.

Therefor, store the presence state of P2SB PCI device before unhiding it
for reading BAR and restore the presence state after reading BAR.

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Reported-by: Yunying Sun <yunying.sun@intel.com>
Tested-by: Yunying Sun <yunying.sun@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit bfd4473b850c8cfaa1cdf56b8ef52fae4e8a6ee5
 git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoEDAC, pnd2: Properly toggle hidden state for P2SB PCI device
Qiuxu Zhuo [Mon, 14 Aug 2017 15:49:05 +0000 (23:49 +0800)]
EDAC, pnd2: Properly toggle hidden state for P2SB PCI device

BugLink: http://bugs.launchpad.net/bugs/1709257
Properly handle hidden state of P2SB PCI device (DEV:D, FUN:0) for
Apollo Lake.

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20170814154905.21707-1-qiuxu.zhuo@intel.com
Signed-off-by: Borislav Petkov <bp@suse.de>
(cherry picked from commit bc8f10babcc27c1f4d8e80d91cc543eabf9125c4 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoEDAC, pnd2: Conditionally unhide/hide the P2SB PCI device to read BAR
Qiuxu Zhuo [Mon, 14 Aug 2017 15:48:45 +0000 (23:48 +0800)]
EDAC, pnd2: Conditionally unhide/hide the P2SB PCI device to read BAR

BugLink: http://bugs.launchpad.net/bugs/1709257
On Deverton server, the P2SB PCI device (DEV:1F, FUN:1) is used by multiple
device drivers.

If it's hidden by some device driver (e.g. with the i801 I2C driver,
the commit

  9424693035a5 ("i2c: i801: Create iTCO device on newer Intel PCHs")

unconditionally hid the P2SB PCI device wrongly) it will make the
pnd2_edac driver read out an invalid BAR value of 0xffffffff and then
fail on ioremap().

Therefore, store the presence state of P2SB PCI device before unhiding
it for reading BAR and restore the presence state after reading BAR.

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: linux-i2c@vger.kernel.org
Link: http://lkml.kernel.org/r/20170814154845.21663-1-qiuxu.zhuo@intel.com
Signed-off-by: Borislav Petkov <bp@suse.de>
(cherry picked from commit 5fd77cb3bac77f690d1d9cf57dc7851fcb3e7945 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoEDAC, pnd2: Mask off the lower four bits of a BAR
Qiuxu Zhuo [Mon, 14 Aug 2017 15:48:13 +0000 (23:48 +0800)]
EDAC, pnd2: Mask off the lower four bits of a BAR

BugLink: http://bugs.launchpad.net/bugs/1709257
Bit[0] of BAR is always zero. Bit[2:1] and bit[3] of BAR contain the
information of 'type' and the 'prefetchable' accordingly. Therefore,
mask the lower four bits to retrieve the actual base address of a BAR.

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20170814154813.21619-1-qiuxu.zhuo@intel.com
Signed-off-by: Borislav Petkov <bp@suse.de>
(cherry picked from commit d84676a9e12817c8435e836911800bdcc67928a0 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoEDAC, pnd2: Build in a minimal sideband driver for Apollo Lake
Tony Luck [Thu, 3 Aug 2017 21:05:36 +0000 (14:05 -0700)]
EDAC, pnd2: Build in a minimal sideband driver for Apollo Lake

BugLink: http://bugs.launchpad.net/bugs/1709257
I've been waing a long time for the generic sideband driver to
appear. Patience has run out, so include the minimum here to
just read registers.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Cc: Aristeu Rozanski <arozansk@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Patrick Geary <patrickg@supermicro.com>
Cc: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20170803210536.5662-1-tony.luck@intel.com
Signed-off-by: Borislav Petkov <bp@suse.de>
(cherry picked from commit 3e5d2bd19138d6683f69de26a34d7eb9ab3823ed linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Start new release
Seth Forshee [Mon, 28 Aug 2017 19:12:22 +0000 (14:12 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Ubuntu-4.13.0-7.8
Seth Forshee [Mon, 28 Aug 2017 13:12:41 +0000 (08:12 -0500)]
UBUNTU: Ubuntu-4.13.0-7.8

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoseccomp: Action to log before allowing
Tyler Hicks [Fri, 11 Aug 2017 04:33:57 +0000 (04:33 +0000)]
seccomp: Action to log before allowing

https://launchpad.net/bugs/1567597

Add a new action, SECCOMP_RET_LOG, that logs a syscall before allowing
the syscall. At the implementation level, this action is identical to
the existing SECCOMP_RET_ALLOW action. However, it can be very useful when
initially developing a seccomp filter for an application. The developer
can set the default action to be SECCOMP_RET_LOG, maybe mark any
obviously needed syscalls with SECCOMP_RET_ALLOW, and then put the
application through its paces. A list of syscalls that triggered the
default action (SECCOMP_RET_LOG) can be easily gleaned from the logs and
that list can be used to build the syscall whitelist. Finally, the
developer can change the default action to the desired value.

This provides a more friendly experience than seeing the application get
killed, then updating the filter and rebuilding the app, seeing the
application get killed due to a different syscall, then updating the
filter and rebuilding the app, etc.

The functionality is similar to what's supported by the various LSMs.
SELinux has permissive mode, AppArmor has complain mode, SMACK has
bring-up mode, etc.

SECCOMP_RET_LOG is given a lower value than SECCOMP_RET_ALLOW as allow
while logging is slightly more restrictive than quietly allowing.

Unfortunately, the tests added for SECCOMP_RET_LOG are not capable of
inspecting the audit log to verify that the syscall was logged.

With this patch, the logic for deciding if an action will be logged is:

if action == RET_ALLOW:
  do not log
else if action == RET_KILL && RET_KILL in actions_logged:
  log
else if action == RET_LOG && RET_LOG in actions_logged:
  log
else if filter-requests-logging && action in actions_logged:
  log
else if audit_enabled && process-is-being-audited:
  log
else:
  do not log

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
(cherry picked from commit 59f5cf44a38284eb9e76270c786fb6cc62ef8ac4 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoseccomp: Filter flag to log all actions except SECCOMP_RET_ALLOW
Tyler Hicks [Fri, 11 Aug 2017 04:33:56 +0000 (04:33 +0000)]
seccomp: Filter flag to log all actions except SECCOMP_RET_ALLOW

Add a new filter flag, SECCOMP_FILTER_FLAG_LOG, that enables logging for
all actions except for SECCOMP_RET_ALLOW for the given filter.

SECCOMP_RET_KILL actions are always logged, when "kill" is in the
actions_logged sysctl, and SECCOMP_RET_ALLOW actions are never logged,
regardless of this flag.

This flag can be used to create noisy filters that result in all
non-allowed actions to be logged. A process may have one noisy filter,
which is loaded with this flag, as well as a quiet filter that's not
loaded with this flag. This allows for the actions in a set of filters
to be selectively conveyed to the admin.

Since a system could have a large number of allocated seccomp_filter
structs, struct packing was taken in consideration. On 64 bit x86, the
new log member takes up one byte of an existing four byte hole in the
struct. On 32 bit x86, the new log member creates a new four byte hole
(unavoidable) and consumes one of those bytes.

Unfortunately, the tests added for SECCOMP_FILTER_FLAG_LOG are not
capable of inspecting the audit log to verify that the actions taken in
the filter were logged.

With this patch, the logic for deciding if an action will be logged is:

if action == RET_ALLOW:
  do not log
else if action == RET_KILL && RET_KILL in actions_logged:
  log
else if filter-requests-logging && action in actions_logged:
  log
else if audit_enabled && process-is-being-audited:
  log
else:
  do not log

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
(cherry picked from commit e66a39977985b1e69e17c4042cb290768eca9b02 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoseccomp: Selftest for detection of filter flag support
Tyler Hicks [Fri, 11 Aug 2017 04:33:55 +0000 (04:33 +0000)]
seccomp: Selftest for detection of filter flag support

Userspace needs to be able to reliably detect the support of a filter
flag. A good way of doing that is by attempting to enter filter mode,
with the flag bit(s) in question set, and a NULL pointer for the args
parameter of seccomp(2). EFAULT indicates that the flag is valid and
EINVAL indicates that the flag is invalid.

This patch adds a selftest that can be used to test this method of
detection in userspace.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
(cherry picked from commit 2b7ea5b5b5799f2878ed454bb48032bed6d101d3 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoseccomp: Sysctl to configure actions that are allowed to be logged
Tyler Hicks [Fri, 11 Aug 2017 04:33:54 +0000 (04:33 +0000)]
seccomp: Sysctl to configure actions that are allowed to be logged

Adminstrators can write to this sysctl to set the seccomp actions that
are allowed to be logged. Any actions not found in this sysctl will not
be logged.

For example, all SECCOMP_RET_KILL, SECCOMP_RET_TRAP, and
SECCOMP_RET_ERRNO actions would be loggable if "kill trap errno" were
written to the sysctl. SECCOMP_RET_TRACE actions would not be logged
since its string representation ("trace") wasn't present in the sysctl
value.

The path to the sysctl is:

 /proc/sys/kernel/seccomp/actions_logged

The actions_avail sysctl can be read to discover the valid action names
that can be written to the actions_logged sysctl with the exception of
"allow". SECCOMP_RET_ALLOW actions cannot be configured for logging.

The default setting for the sysctl is to allow all actions to be logged
except SECCOMP_RET_ALLOW. While only SECCOMP_RET_KILL actions are
currently logged, an upcoming patch will allow applications to request
additional actions to be logged.

There's one important exception to this sysctl. If a task is
specifically being audited, meaning that an audit context has been
allocated for the task, seccomp will log all actions other than
SECCOMP_RET_ALLOW despite the value of actions_logged. This exception
preserves the existing auditing behavior of tasks with an allocated
audit context.

With this patch, the logic for deciding if an action will be logged is:

if action == RET_ALLOW:
  do not log
else if action == RET_KILL && RET_KILL in actions_logged:
  log
else if audit_enabled && task-is-being-audited:
  log
else:
  do not log

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
(cherry picked from commit 0ddec0fc8900201c0897b87b762b7c420436662f linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoseccomp: Operation for checking if an action is available
Tyler Hicks [Fri, 11 Aug 2017 04:33:53 +0000 (04:33 +0000)]
seccomp: Operation for checking if an action is available

Userspace code that needs to check if the kernel supports a given action
may not be able to use the /proc/sys/kernel/seccomp/actions_avail
sysctl. The process may be running in a sandbox and, therefore,
sufficient filesystem access may not be available. This patch adds an
operation to the seccomp(2) syscall that allows userspace code to ask
the kernel if a given action is available.

If the action is supported by the kernel, 0 is returned. If the action
is not supported by the kernel, -1 is returned with errno set to
-EOPNOTSUPP. If this check is attempted on a kernel that doesn't support
this new operation, -1 is returned with errno set to -EINVAL meaning
that userspace code will have the ability to differentiate between the
two error cases.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Suggested-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
(cherry picked from commit d612b1fd8010d0d67b5287fe146b8b55bcbb8655 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoseccomp: Sysctl to display available actions
Tyler Hicks [Fri, 11 Aug 2017 04:33:52 +0000 (04:33 +0000)]
seccomp: Sysctl to display available actions

This patch creates a read-only sysctl containing an ordered list of
seccomp actions that the kernel supports. The ordering, from left to
right, is the lowest action value (kill) to the highest action value
(allow). Currently, a read of the sysctl file would return "kill trap
errno trace allow". The contents of this sysctl file can be useful for
userspace code as well as the system administrator.

The path to the sysctl is:

  /proc/sys/kernel/seccomp/actions_avail

libseccomp and other userspace code can easily determine which actions
the current kernel supports. The set of actions supported by the current
kernel may be different than the set of action macros found in kernel
headers that were installed where the userspace code was built.

In addition, this sysctl will allow system administrators to know which
actions are supported by the kernel and make it easier to configure
exactly what seccomp logs through the audit subsystem. Support for this
level of logging configuration will come in a future patch.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
(cherry picked from commit 8e5f1ad116df6b0de65eac458d5e7c318d1c05af linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoseccomp: Provide matching filter for introspection
Kees Cook [Wed, 2 Aug 2017 22:00:40 +0000 (15:00 -0700)]
seccomp: Provide matching filter for introspection

Both the upcoming logging improvements and changes to RET_KILL will need
to know which filter a given seccomp return value originated from. In
order to delay logic processing of result until after the seccomp loop,
this adds a single pointer assignment on matches. This will allow both
log and RET_KILL logic to work off the filter rather than doing more
expensive tests inside the time-critical run_filters loop.

Running tight cycles of getpid() with filters attached shows no measurable
difference in speed.

Suggested-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Tyler Hicks <tyhicks@canonical.com>
(cherry picked from commit deb4de8b31bc5bf21efb6ac31150a01a631cd647 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoRevert "UBUNTU: SAUCE: seccomp: log actions even when audit is disabled"
Seth Forshee [Mon, 28 Aug 2017 12:59:01 +0000 (07:59 -0500)]
Revert "UBUNTU: SAUCE: seccomp: log actions even when audit is disabled"

This reverts commit bab4da0031a958c04405765e1e077bdb9dceff0c. Upcoming
changes that improve seccomp logging controls make this patch obsolete.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
6 years agoUBUNTU: Rebase to v4.13-rc7
Seth Forshee [Mon, 28 Aug 2017 12:49:42 +0000 (07:49 -0500)]
UBUNTU: Rebase to v4.13-rc7

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: selftests/powerpc: Use snprintf to construct DSCR sysfs interface...
Seth Forshee [Fri, 25 Aug 2017 19:47:29 +0000 (14:47 -0500)]
UBUNTU: SAUCE: selftests/powerpc: Use snprintf to construct DSCR sysfs interface paths

BugLink: http://bugs.launchpad.net/bugs/1710904
Currently sprintf is used, and while paths should never exceed
the size of the buffer it is theoretically possible since
dirent.d_name is 256 bytes. As a result this trips
-Wformat-overflow, and since the test is built with -Wall -Werror
the causes the build to fail. Switch to using snprintf and skip
any paths which are too long for the filename buffer.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Start new release
Seth Forshee [Fri, 25 Aug 2017 17:01:46 +0000 (12:01 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Ubuntu-4.13.0-6.7
Seth Forshee [Wed, 23 Aug 2017 13:11:07 +0000 (08:11 -0500)]
UBUNTU: Ubuntu-4.13.0-6.7

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: HID: multitouch: Support ALPS PTP stick with pid 0x120A
Shrirang Bagul [Wed, 23 Aug 2017 07:32:23 +0000 (15:32 +0800)]
UBUNTU: SAUCE: HID: multitouch: Support ALPS PTP stick with pid 0x120A

BugLink:  https://bugs.launchpad.net/bugs/1712481

This patch adds ALPS PTP sticks with pid/device id 0x120A to the list of
devices supported by hid-multitouch.

Signed-off-by: Shrirang Bagul <shrirang.bagul@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: apparmor: af_unix mediation
John Johansen [Wed, 19 Jul 2017 06:27:23 +0000 (23:27 -0700)]
UBUNTU: SAUCE: apparmor: af_unix mediation

af_socket mediation did not make it into 4.14 so add remaining out
of tree patch

Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: fix incorrect type assignment when freeing proxies
John Johansen [Wed, 16 Aug 2017 16:33:48 +0000 (09:33 -0700)]
apparmor: fix incorrect type assignment when freeing proxies

sparse reports

poisoning the proxy->label before freeing the struct is resulting in
a sparse build warning.
../security/apparmor/label.c:52:30: warning: incorrect type in assignment (different address spaces)
../security/apparmor/label.c:52:30:    expected struct aa_label [noderef] <asn:4>*label
../security/apparmor/label.c:52:30:    got struct aa_label *<noident>

fix with RCU_INIT_POINTER as this is one of those cases where
rcu_assign_pointer() is not needed.

Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 76e22e212a850bbd16cf49f9c586d4635507e0b5 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: ensure unconfined profiles have dfas initialized
John Johansen [Wed, 16 Aug 2017 12:48:06 +0000 (05:48 -0700)]
apparmor: ensure unconfined profiles have dfas initialized

Generally unconfined has early bailout tests and does not need the
dfas initialized, however if an early bailout test is ever missed
it will result in an oops.

Be defensive and initialize the unconfined profile to have null dfas
(no permission) so if an early bailout test is missed we fail
closed (no perms granted) instead of oopsing.

Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 034ad2d248927722bdcd1aedb62634cdc2049113 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: fix race condition in null profile creation
John Johansen [Wed, 16 Aug 2017 12:40:49 +0000 (05:40 -0700)]
apparmor: fix race condition in null profile creation

There is a race when null- profile is being created between the
initial lookup/creation of the profile and lock/addition of the
profile. This could result in multiple version of a profile being
added to the list which need to be removed/replaced.

Since these are learning profile their is no affect on mediation.

Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 3aa3de2a4fb8f33ec62b00998bc6b6c6850d41b1 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: move new_null_profile to after profile lookup fns()
John Johansen [Wed, 16 Aug 2017 15:59:57 +0000 (08:59 -0700)]
apparmor: move new_null_profile to after profile lookup fns()

new_null_profile will need to use some of the profile lookup fns()
so move instead of doing forward fn declarations.

Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit cf1e50dfc6f627bc2989b57076b129c330fb3f0a linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: add base infastructure for socket mediation
John Johansen [Wed, 19 Jul 2017 06:18:33 +0000 (23:18 -0700)]
apparmor: add base infastructure for socket mediation

Provide a basic mediation of sockets. This is not a full net mediation
but just whether a spcific family of socket can be used by an
application, along with setting up some basic infrastructure for
network mediation to follow.

the user space rule hav the basic form of
  NETWORK RULE = [ QUALIFIERS ] 'network' [ DOMAIN ]
                 [ TYPE | PROTOCOL ]

  DOMAIN = ( 'inet' | 'ax25' | 'ipx' | 'appletalk' | 'netrom' |
             'bridge' | 'atmpvc' | 'x25' | 'inet6' | 'rose' |
     'netbeui' | 'security' | 'key' | 'packet' | 'ash' |
     'econet' | 'atmsvc' | 'sna' | 'irda' | 'pppox' |
     'wanpipe' | 'bluetooth' | 'netlink' | 'unix' | 'rds' |
     'llc' | 'can' | 'tipc' | 'iucv' | 'rxrpc' | 'isdn' |
     'phonet' | 'ieee802154' | 'caif' | 'alg' | 'nfc' |
     'vsock' | 'mpls' | 'ib' | 'kcm' ) ','

  TYPE = ( 'stream' | 'dgram' | 'seqpacket' |  'rdm' | 'raw' |
           'packet' )

  PROTOCOL = ( 'tcp' | 'udp' | 'icmp' )

eg.
  network,
  network inet,

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit 56387cbe3f287034ee6959cb9e8f419889e38bd9 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: add more debug asserts to apparmorfs
John Johansen [Wed, 19 Jul 2017 06:41:13 +0000 (23:41 -0700)]
apparmor: add more debug asserts to apparmorfs

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit 52c9542126fb04df1f12c605b6c22719c9096794 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: make policy_unpack able to audit different info messages
John Johansen [Wed, 19 Jul 2017 06:37:18 +0000 (23:37 -0700)]
apparmor: make policy_unpack able to audit different info messages

Switch unpack auditing to using the generic name field in the audit
struct and make it so we can start adding new info messages about
why an unpack failed.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit 1489d896c5649e9ce1b6000b4857f8baa7a6ab63 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: add support for absolute root view based labels
John Johansen [Sun, 6 Aug 2017 12:39:08 +0000 (05:39 -0700)]
apparmor: add support for absolute root view based labels

With apparmor policy virtualization based on policy namespace View's
we don't generally want/need absolute root based views, however there
are cases like debugging and some secid based conversions where
using a root based view is important.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit eadfbf0898eda94cee0d982626aa24a3146db48b linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: cleanup conditional check for label in label_print
John Johansen [Sun, 6 Aug 2017 12:36:40 +0000 (05:36 -0700)]
apparmor: cleanup conditional check for label in label_print

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit 7e57939b9d67dcfc2c8348fd0e2c76a2f0349c75 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: add mount mediation
John Johansen [Wed, 19 Jul 2017 06:04:47 +0000 (23:04 -0700)]
apparmor: add mount mediation

Add basic mount mediation. That allows controlling based on basic
mount parameters. It does not include special mount parameters for
apparmor, super block labeling, or any triggers for apparmor namespace
parameter modifications on pivot root.

default userspace policy rules have the form of
  MOUNT RULE = ( MOUNT | REMOUNT | UMOUNT )

  MOUNT = [ QUALIFIERS ] 'mount' [ MOUNT CONDITIONS ] [ SOURCE FILEGLOB ]
          [ '->' MOUNTPOINT FILEGLOB ]

  REMOUNT = [ QUALIFIERS ] 'remount' [ MOUNT CONDITIONS ]
            MOUNTPOINT FILEGLOB

  UMOUNT = [ QUALIFIERS ] 'umount' [ MOUNT CONDITIONS ] MOUNTPOINT FILEGLOB

  MOUNT CONDITIONS = [ ( 'fstype' | 'vfstype' ) ( '=' | 'in' )
                       MOUNT FSTYPE EXPRESSION ]
       [ 'options' ( '=' | 'in' ) MOUNT FLAGS EXPRESSION ]

  MOUNT FSTYPE EXPRESSION = ( MOUNT FSTYPE LIST | MOUNT EXPRESSION )

  MOUNT FSTYPE LIST = Comma separated list of valid filesystem and
                      virtual filesystem types (eg ext4, debugfs, etc)

  MOUNT FLAGS EXPRESSION = ( MOUNT FLAGS LIST | MOUNT EXPRESSION )

  MOUNT FLAGS LIST = Comma separated list of MOUNT FLAGS.

  MOUNT FLAGS = ( 'ro' | 'rw' | 'nosuid' | 'suid' | 'nodev' | 'dev' |
                  'noexec' | 'exec' | 'sync' | 'async' | 'remount' |
  'mand' | 'nomand' | 'dirsync' | 'noatime' | 'atime' |
  'nodiratime' | 'diratime' | 'bind' | 'rbind' | 'move' |
  'verbose' | 'silent' | 'loud' | 'acl' | 'noacl' |
  'unbindable' | 'runbindable' | 'private' | 'rprivate' |
  'slave' | 'rslave' | 'shared' | 'rshared' |
  'relatime' | 'norelatime' | 'iversion' | 'noiversion' |
  'strictatime' | 'nouser' | 'user' )

  MOUNT EXPRESSION = ( ALPHANUMERIC | AARE ) ...

  PIVOT ROOT RULE = [ QUALIFIERS ] pivot_root [ oldroot=OLD PUT FILEGLOB ]
                    [ NEW ROOT FILEGLOB ]

  SOURCE FILEGLOB = FILEGLOB

  MOUNTPOINT FILEGLOB = FILEGLOB

eg.
  mount,
  mount /dev/foo,
  mount options=ro /dev/foo -> /mnt/,
  mount options in (ro,atime) /dev/foo -> /mnt/,
  mount options=ro options=atime,

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit fa488437d0f95b2e5db1e624341fe0d5a233f729 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: add the ability to mediate signals
John Johansen [Wed, 19 Jul 2017 05:56:22 +0000 (22:56 -0700)]
apparmor: add the ability to mediate signals

Add signal mediation where the signal can be mediated based on the
signal, direction, or the label or the peer/target. The signal perms
are verified on a cross check to ensure policy consistency in the case
of incremental policy load/replacement.

The optimization of skipping the cross check when policy is guaranteed
to be consistent (single compile unit) remains to be done.

policy rules have the form of
  SIGNAL_RULE = [ QUALIFIERS ] 'signal' [ SIGNAL ACCESS PERMISSIONS ]
                [ SIGNAL SET ] [ SIGNAL PEER ]

  SIGNAL ACCESS PERMISSIONS = SIGNAL ACCESS | SIGNAL ACCESS LIST

  SIGNAL ACCESS LIST = '(' Comma or space separated list of SIGNAL
                           ACCESS ')'

  SIGNAL ACCESS = ( 'r' | 'w' | 'rw' | 'read' | 'write' | 'send' |
                    'receive' )

  SIGNAL SET = 'set' '=' '(' SIGNAL LIST ')'

  SIGNAL LIST = Comma or space separated list of SIGNALS

  SIGNALS = ( 'hup' | 'int' | 'quit' | 'ill' | 'trap' | 'abrt' |
              'bus' | 'fpe' | 'kill' | 'usr1' | 'segv' | 'usr2' |
      'pipe' | 'alrm' | 'term' | 'stkflt' | 'chld' | 'cont' |
      'stop' | 'stp' | 'ttin' | 'ttou' | 'urg' | 'xcpu' |
      'xfsz' | 'vtalrm' | 'prof' | 'winch' | 'io' | 'pwr' |
      'sys' | 'emt' | 'exists' | 'rtmin+0' ... 'rtmin+32'
            )

  SIGNAL PEER = 'peer' '=' AARE

eg.
  signal,                                 # allow all signals
  signal send set=(hup, kill) peer=foo,

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit c6bf1adaecaa719d7c56338cc43b2982214f2f44 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: Redundant condition: prev_ns. in [label.c:1498]
John Johansen [Tue, 1 Aug 2017 06:44:37 +0000 (23:44 -0700)]
apparmor: Redundant condition: prev_ns. in [label.c:1498]

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit d323d2c17cfcc54b6845bfc1d13bca5cef210fc7 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: Fix an error code in aafs_create()
Dan Carpenter [Thu, 13 Jul 2017 07:39:20 +0000 (10:39 +0300)]
apparmor: Fix an error code in aafs_create()

We accidentally forgot to set the error code on this path.  It means we
return NULL instead of an error pointer.  I looked through a bunch of
callers and I don't think it really causes a big issue, but the
documentation says we're supposed to return error pointers here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit aee58bf341db52a3a3563c6b972bfd4fc2d41e46 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: Fix logical error in verify_header()
Christos Gkekas [Sat, 8 Jul 2017 19:50:21 +0000 (20:50 +0100)]
apparmor: Fix logical error in verify_header()

verify_header() is currently checking whether interface version is less
than 5 *and* greater than 7, which always evaluates to false. Instead it
should check whether it is less than 5 *or* greater than 7.

Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit c54a2175e3a6bf6c697d249bba1aa729e06c7ba8 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoapparmor: Fix shadowed local variable in unpack_trans_table()
Geert Uytterhoeven [Thu, 6 Jul 2017 08:56:21 +0000 (10:56 +0200)]
apparmor: Fix shadowed local variable in unpack_trans_table()

with W=2:

    security/apparmor/policy_unpack.c: In function â€˜unpack_trans_table’:
    security/apparmor/policy_unpack.c:469: warning: declaration of â€˜pos’ shadows a previous local
    security/apparmor/policy_unpack.c:451: warning: shadowed declaration is here

Rename the old "pos" to "saved_pos" to fix this.

Fixes: 5379a3312024a8be ("apparmor: support v7 transition format compatible with label_parse")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 966d631935a578fadb5770f17a957ee1a969d868 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Packaging] sort ABI files with C.UTF-8 locale
Thadeu Lima de Souza Cascardo [Tue, 22 Aug 2017 14:15:47 +0000 (11:15 -0300)]
UBUNTU: [Packaging] sort ABI files with C.UTF-8 locale

BugLink: https://bugs.launchpad.net/bugs/1712345
Whenever we update the ABI files, the files may be sorted in a different
order, even though their contents are the same. That happens because the
system updating the ABI files may use a different locale than the one
that was used previously.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: igb: add support for using Broadcom 54616 as PHY
Wen-chien Jesse Sung [Mon, 21 Aug 2017 09:11:20 +0000 (17:11 +0800)]
UBUNTU: SAUCE: igb: add support for using Broadcom 54616 as PHY

BugLink: https://launchpad.net/bugs/1712024
Ported from packages/base/any/kernels/3.18.25/patches/driver-support-intel-igb-bcm54616-phy.patch
in OpenNetworkLinux https://github.com/opencomputeproject/OpenNetworkLinux/

Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-By: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agopowerpc/mm/radix: Avoid flushing the PWC on every flush_tlb_range
Benjamin Herrenschmidt [Wed, 19 Jul 2017 04:49:06 +0000 (14:49 +1000)]
powerpc/mm/radix: Avoid flushing the PWC on every flush_tlb_range

BugLink: http://bugs.launchpad.net/bugs/1709220
We do that because it's used by THP pmd collapsing, so use
instead a dedicated flush function.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 424de9c6e3f89399fc11afc1f53f89c5329132da)
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agopowerpc/mm/radix: Improve TLB/PWC flushes
Benjamin Herrenschmidt [Wed, 19 Jul 2017 04:49:05 +0000 (14:49 +1000)]
powerpc/mm/radix: Improve TLB/PWC flushes

BugLink: http://bugs.launchpad.net/bugs/1709220
At the moment we have to rather sub-optimal flushing behaviours:

 - flush_tlb_mm() will flush the PWC which is unnecessary (for example
   when doing a fork)

 - A large unmap will call flush_tlb_pwc() multiple times causing us
   to perform that fairly expensive operation repeatedly. This happens
   often in batches of 3 on every new process.

So we change flush_tlb_mm() to only flush the TLB, and we use the
existing "need_flush_all" flag in struct mmu_gather to indicate
that the PWC needs flushing.

Unfortunately, flush_tlb_range() still needs to do a full flush
for now as it's used by the THP collapsing. We will fix that later.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit a46cc7a90fd8d95bfbb2b27080efe872a1a51db4)
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agopowerpc/mm/radix: Improve _tlbiel_pid to be usable for PWC flushes
Benjamin Herrenschmidt [Wed, 19 Jul 2017 04:49:04 +0000 (14:49 +1000)]
powerpc/mm/radix: Improve _tlbiel_pid to be usable for PWC flushes

BugLink: http://bugs.launchpad.net/bugs/1709220
The PWC flush only needs a single set call, just like the
full (RIC=2) flush.

This will allow us to get rid of the dedicated _tlbiel_pwc()

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 5ce5fe14ed0302315061cf97ce67accd1b25b938)
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Rebase to v4.13-rc6
Seth Forshee [Wed, 23 Aug 2017 11:58:55 +0000 (06:58 -0500)]
UBUNTU: Rebase to v4.13-rc6

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) MODSIGN: Fix module signature verification
Fedora Kernel Team [Thu, 3 Aug 2017 18:46:51 +0000 (13:46 -0500)]
UBUNTU: SAUCE: (efi-lockdown) MODSIGN: Fix module signature verification

BugLink: http://bugs.launchpad.net/bugs/1712168
Currently mod_verify_sig() calls verify_pkcs_7_signature() with
trusted_keys=NULL, which causes only the builtin keys to be used
to verify the signature. This breaks self-signing of modules with
a MOK, as the MOK is loaded into the secondary trusted keyring.
Fix this by passing the spacial value trusted_keys=(void *)1UL,
which tells verify_pkcs_7_signature() to use the secondary
keyring instead.

(cherry picked from commit cff4523d65b848f9c41c9e998a735ae2a820da2d
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
[ saf: Taken from fedora commit without authorship information or much
  of a commit message; modified so that commit will describe the
  problem being fixed. ]
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] CONFIG_BLK_DEV_NVME=m for s390
Seth Forshee [Fri, 18 Aug 2017 13:12:49 +0000 (08:12 -0500)]
UBUNTU: [Config] CONFIG_BLK_DEV_NVME=m for s390

BugLink: http://bugs.launchpad.net/bugs/1708432
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] CONFIG_INTEL_ATOMISP=n
Seth Forshee [Thu, 17 Aug 2017 12:40:27 +0000 (07:40 -0500)]
UBUNTU: [Config] CONFIG_INTEL_ATOMISP=n

BugLink: http://bugs.launchpad.net/bugs/1711298
This is a staging driver which is causing a panic in xen pv
guests. The driver makes no sense for xen, but it can only be
configured as built-in and unconditionally registers a platform
device. Disable this driver until it is in better shape.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Start new release
Seth Forshee [Wed, 16 Aug 2017 13:10:26 +0000 (08:10 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Ubuntu-4.13.0-5.6
Seth Forshee [Tue, 15 Aug 2017 14:24:31 +0000 (09:24 -0500)]
UBUNTU: Ubuntu-4.13.0-5.6

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Packaging] switch up to debhelper 9
Andy Whitcroft [Sun, 6 Aug 2017 14:00:25 +0000 (15:00 +0100)]
UBUNTU: [Packaging] switch up to debhelper 9

Signed-off-by: Andy Whitcroft <apw@canonical.com>
6 years agoUBUNTU: SAUCE: perf vendor events powerpc: Update POWER9 events
Sukadev Bhattiprolu [Thu, 27 Jul 2017 06:23:57 +0000 (02:23 -0400)]
UBUNTU: SAUCE: perf vendor events powerpc: Update POWER9 events

BugLink: http://bugs.launchpad.net/bugs/1708630
Update and cleanup POWER9 PMU events.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Anton Blanchard <anton@au1.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Link: http://lkml.kernel.org/r/20170802174617.GA32545@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(cherry picked from commit 3c22ba5243040c13f9a79e3ae70399c0ae0872a4
 git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: perf vendor events powerpc: remove suffix in mapfile
Sukadev Bhattiprolu [Thu, 27 Jul 2017 05:42:29 +0000 (01:42 -0400)]
UBUNTU: SAUCE: perf vendor events powerpc: remove suffix in mapfile

BugLink: http://bugs.launchpad.net/bugs/1708630
Drop the .json suffix for events directory in the mapfile.csv.

Now that we have separate JSON files for each topic in a CPU (eg: see
tools/perf/pmu-events/arch/powerpc/power8/*.json) the .json suffix in
the mapfile is misleading and redundant.

Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Anton Blanchard <anton@au1.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20170802174617.GA32545@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(cherry picked from commit 2862a16875452b697c65d8e06cc010c922d19171
 git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoperf vendor events: Add POWER9 PVRs to mapfile
Sukadev Bhattiprolu [Tue, 11 Jul 2017 18:00:31 +0000 (13:00 -0500)]
perf vendor events: Add POWER9 PVRs to mapfile

BugLink: http://bugs.launchpad.net/bugs/1708630
Add currently supported POWER9 PVRs to the mapfile

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Shriya <shriyak@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-k1pe02sn5gh6nrzp8ditye94@git.kernel.org
[ Fix conflict with a87006fd5629 ("perf pmu-events: Support additional POWER8+ PVR in mapfile") ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(cherry picked from commit 80e63ffb09a1b7ac645e9dd1c16b7b08956a7f5b linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoperf vendor events: Add POWER9 PMU events
Sukadev Bhattiprolu [Tue, 11 Jul 2017 21:16:00 +0000 (17:16 -0400)]
perf vendor events: Add POWER9 PMU events

BugLink: http://bugs.launchpad.net/bugs/1708630
Add POWER9 PMU events.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Link: http://lkml.kernel.org/n/tip-i08irl1x1i914xsikiomvqip@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(cherry picked from commit 826db0f154ba5bee7d913635644a6f61f993a9b3 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoperf pmu-events: Support additional POWER8+ PVR in mapfile
Shriya [Mon, 19 Jun 2017 06:30:42 +0000 (12:00 +0530)]
perf pmu-events: Support additional POWER8+ PVR in mapfile

BugLink: http://bugs.launchpad.net/bugs/1708630
Add support for POWER8+ PVR 004c0100 for Garrison

Signed-off-by: Shriya <shriyak@linux.vnet.ibm.com>
Reviewed-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1497853842-11023-1-git-send-email-shriyak@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(cherry picked from commit 8b3cf3d812140dada8e82650c96d3980e5cd1b73 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=n for ppc64el
Seth Forshee [Mon, 14 Aug 2017 20:49:27 +0000 (15:49 -0500)]
UBUNTU: [Config] CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=n for ppc64el

BugLink: http://bugs.launchpad.net/bugs/1709171
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Rebase to v4.13-rc5
Seth Forshee [Mon, 14 Aug 2017 14:18:45 +0000 (09:18 -0500)]
UBUNTU: Rebase to v4.13-rc5

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Debian] Don't depend on initramfs-tools
Marcelo Henrique Cerri [Tue, 8 Aug 2017 19:16:05 +0000 (16:16 -0300)]
UBUNTU: [Debian] Don't depend on initramfs-tools

BugLink: http://bugs.launchpad.net/bugs/1700972
Allow images to be created without the need of an initrd and also allow
users to run without an initrd if they want to.

Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: powerpc: Always initialize input array when calling epapr_hypercall()
Seth Forshee [Thu, 10 Aug 2017 17:07:04 +0000 (12:07 -0500)]
UBUNTU: SAUCE: powerpc: Always initialize input array when calling epapr_hypercall()

Several callers to epapr_hypercall() pass an uninitialized stack
allocated array for the input arguments, presumably because they
have no input arguments. However this can produce errors like
this one

 arch/powerpc/include/asm/epapr_hcalls.h:470:42: error: 'in' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  unsigned long register r3 asm("r3") = in[0];
                                        ~~^~~

Fix callers to this function to always zero-initialize the input
arguments array to prevent this.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Enable zfs build
Seth Forshee [Wed, 9 Aug 2017 20:54:09 +0000 (15:54 -0500)]
UBUNTU: Enable zfs build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (noup) Update spl to 0.6.5.11-ubuntu1, zfs to 0.6.5.11-1ubuntu3
Colin Ian King [Wed, 9 Aug 2017 16:16:31 +0000 (17:16 +0100)]
UBUNTU: SAUCE: (noup) Update spl to 0.6.5.11-ubuntu1, zfs to 0.6.5.11-1ubuntu3

This includes backports of upstream 4.13 compat fixes from ZFS and SPL

SPL:
  120faefed90a ("Update struct member intializers to C89")
  944117514d2a ("Linux 4.13 compat: wait queues")

ZFS:
  36ba27e9e07b ("Linux 4.13 compat: bio->bi_status and blk_status_t")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] Enable aufs
Seth Forshee [Tue, 8 Aug 2017 18:38:49 +0000 (13:38 -0500)]
UBUNTU: [Config] Enable aufs

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: aufs -- Add missing argument to loop_switch() call
Seth Forshee [Tue, 8 Aug 2017 19:26:51 +0000 (14:26 -0500)]
UBUNTU: SAUCE: aufs -- Add missing argument to loop_switch() call

The aufs patches add an argument to loop_switch(), but an
additional call to this function was added since the patches were
last updated. This causes a FTBFS:

  drivers/block/loop.c: In function 'loop_flush':
  drivers/block/loop.c:624:9: error: too few arguments to function 'loop_switch'
    return loop_switch(lo, NULL);
           ^~~~~~~~~~~
  drivers/block/loop.c:596:12: note: declared here
   static int loop_switch(struct loop_device *lo, struct file *file,
              ^~~~~~~~~~~

This new call is meant only to induce a flush of queued bios and
does not use the file arguments at all, so just pass NULL.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: Import aufs driver
Seth Forshee [Tue, 8 Aug 2017 18:32:30 +0000 (13:32 -0500)]
UBUNTU: SAUCE: Import aufs driver

Import aufs4.x-rcN 20170703 from https://github.com/sfjro/aufs4-standalone
commit aa7bfb3653b447154d5bb2ad89832c4617fd8d63.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Start new release
Seth Forshee [Tue, 8 Aug 2017 18:29:50 +0000 (13:29 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Ubuntu-4.13.0-4.5
Seth Forshee [Tue, 8 Aug 2017 16:32:02 +0000 (11:32 -0500)]
UBUNTU: Ubuntu-4.13.0-4.5

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [debian] use all rather than amd64 dkms debs for sync
Colin Ian King [Mon, 7 Aug 2017 14:19:19 +0000 (15:19 +0100)]
UBUNTU: [debian] use all rather than amd64 dkms debs for sync

Use the all arch deb rather than amd64 for the zfs and spl
dkms deb sync

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (noup) Update spl to 0.6.5.11-1, zfs to 0.6.5.11-1ubuntu1
Colin Ian King [Mon, 7 Aug 2017 14:15:35 +0000 (15:15 +0100)]
UBUNTU: SAUCE: (noup) Update spl to 0.6.5.11-1, zfs to 0.6.5.11-1ubuntu1

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Rebase to v4.13-rc4
Seth Forshee [Mon, 7 Aug 2017 13:08:16 +0000 (08:08 -0500)]
UBUNTU: Rebase to v4.13-rc4

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (no-up) HID: Add quirk for Lenovo Yoga 910 with ITE Chips
Patrick Pedersen [Sat, 15 Jul 2017 12:27:21 +0000 (14:27 +0200)]
UBUNTU: SAUCE: (no-up) HID: Add quirk for Lenovo Yoga 910 with ITE Chips

BugLink: http://bugs.launchpad.net/bugs/1708120
As with previous generations of this device (see https://patchwork.kernel.org/patch/7887361/), the ITE
HID Sensor Hub, responsible for the accelerometer and als sensor, requires a quirk entry.

Without the entry, the Sensor Hub can't be accessed and the kernel fails to report any movements. As a result
iio-sensor-proxy receives no new data.

It shall additionally be noted that the i2c-hid 'sleep' bug (present since kernel ver. 4.3)
still affects the driver. This means that the sensor hub will not report any movement, until
the device is suspended and resumed.

Signed-off-by: Patrick Pedersen <ctx.xda@gmail.com>
Signed-off-by: Chris MacNaughton <chris.macnaughton@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Enable hio build
Seth Forshee [Wed, 2 Aug 2017 16:08:19 +0000 (11:08 -0500)]
UBUNTU: Enable hio build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: hio: Build fixes for 4.13
Seth Forshee [Wed, 2 Aug 2017 16:07:51 +0000 (11:07 -0500)]
UBUNTU: SAUCE: hio: Build fixes for 4.13

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] Add vmd driver to generic inclusion list
Seth Forshee [Wed, 2 Aug 2017 14:13:06 +0000 (09:13 -0500)]
UBUNTU: [Config] Add vmd driver to generic inclusion list

BugLink: http://bugs.launchpad.net/bugs/1703339
Necessary to install on NVMe disks under VMD PCI domains.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] CONFIG_SATA_HIGHBANK=y
Seth Forshee [Wed, 2 Aug 2017 14:43:28 +0000 (09:43 -0500)]
UBUNTU: [Config] CONFIG_SATA_HIGHBANK=y

BugLink: http://bugs.launchpad.net/bugs/1703430
This changed from y to m after trusty without justification.
Having it built as a module causes issues with booting on some
ARM systems.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>