]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/log
mirror_ubuntu-eoan-kernel.git
5 years agoRevert "UBUNTU: SAUCE: i2c: designware: Add disable runtime pm quirk"
Kai-Heng Feng [Tue, 13 Aug 2019 18:56:53 +0000 (02:56 +0800)]
Revert "UBUNTU: SAUCE: i2c: designware: Add disable runtime pm quirk"

BugLink: https://bugs.launchpad.net/bugs/1840075
This reverts commit e2fedb6fddb6b1e886976cf8e97e575459fd7613.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoRevert "UBUNTU: SAUCE: i2c: designware: add Inpiron/Vostro 7590 into i2c quirk"
Kai-Heng Feng [Tue, 13 Aug 2019 18:56:52 +0000 (02:56 +0800)]
Revert "UBUNTU: SAUCE: i2c: designware: add Inpiron/Vostro 7590 into i2c quirk"

BugLink: https://bugs.launchpad.net/bugs/1840075
This reverts commit fdfff857ee0613c3a6fae86bf634fbabf0cfea1a.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoRevert "UBUNTU: SAUCE: i2c: designware: add Inpiron 7591 into i2c quirk"
Kai-Heng Feng [Tue, 13 Aug 2019 18:56:51 +0000 (02:56 +0800)]
Revert "UBUNTU: SAUCE: i2c: designware: add Inpiron 7591 into i2c quirk"

BugLink: https://bugs.launchpad.net/bugs/1840075
This reverts commit 25947a1872c38c5066c0ca7e9edc27da6479cd6c.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoRevert "UBUNTU: SAUCE: i2c: designware: add G3 3590 into i2c quirk"
Kai-Heng Feng [Tue, 13 Aug 2019 18:56:50 +0000 (02:56 +0800)]
Revert "UBUNTU: SAUCE: i2c: designware: add G3 3590 into i2c quirk"

BugLink: https://bugs.launchpad.net/bugs/1840075
This reverts commit 6874d7c3765401ca27de5859e9c578ea703a44ba.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoparport: parport_serial: Add support for Sunix Multi I/O boards
Kai-Heng Feng [Tue, 13 Aug 2019 11:55:50 +0000 (19:55 +0800)]
parport: parport_serial: Add support for Sunix Multi I/O boards

BugLink: https://bugs.launchpad.net/bugs/1826716
Sunix Multi I/O boards are different to Timedia's.

This patch adds proper support for Sunix MIO boards with 1 parallel and
up to 4 serial ports.

Cc: Morris Ku <morris_ku@sunix.com>
Cc: Debbie Liu <debbie_liu@sunix.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20190809190130.30773-2-kai.heng.feng@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 605b5b4c90ecc31c5fea234f882bf4248dae4fc8 linux-next)
Acked-by: Anthony Wong <anthony.wong@canonical.com>
Acked-By: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoserial: 8250_pci: Add support for Sunix serial boards
Kai-Heng Feng [Tue, 13 Aug 2019 11:55:48 +0000 (19:55 +0800)]
serial: 8250_pci: Add support for Sunix serial boards

BugLink: https://bugs.launchpad.net/bugs/1826716
Add support to Sunix serial boards with up to 16 ports.

Sunix board need its own setup callback instead of using Timedia's, to
properly support more than 4 ports.

Cc: Morris Ku <morris_ku@sunix.com>
Cc: Debbie Liu <debbie_liu@sunix.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20190809190130.30773-1-kai.heng.feng@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a4b7aca30609899a925cbf24b08bfea79883254c linux-next)
Acked-by: Anthony Wong <anthony.wong@canonical.com>
Acked-By: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: [Config] enable secureboot signing on s390x
Dimitri John Ledkov [Tue, 16 Jul 2019 00:02:04 +0000 (01:02 +0100)]
UBUNTU: [Config] enable secureboot signing on s390x

Link: https://bugs.launchpad.net/bugs/1829749
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUbuntu: [Config] Enable CONFIG_LOCK_DOWN_KERNEL on s390x.
Dimitri John Ledkov [Fri, 9 Aug 2019 14:49:29 +0000 (15:49 +0100)]
Ubuntu: [Config] Enable CONFIG_LOCK_DOWN_KERNEL on s390x.

BugLink: https://bugs.launchpad.net/bugs/1839622
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (lockdown) s390/ipl: lockdown kernel when booted secure
Philipp Rudo [Fri, 9 Aug 2019 14:49:28 +0000 (15:49 +0100)]
UBUNTU: SAUCE: (lockdown) s390/ipl: lockdown kernel when booted secure

BugLink: https://bugs.launchpad.net/bugs/1839622
Signed-off-by: Philipp Rudo <prudo@linux.ibm.com>
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: shiftfs: pass correct point down
Christian Brauner [Fri, 19 Jul 2019 15:50:47 +0000 (17:50 +0200)]
UBUNTU: SAUCE: shiftfs: pass correct point down

BugLink: https://bugs.launchpad.net/bugs/1837231
This used to pass an unsigned long to copy_from_user() instead of a
void __user * pointer. This will produce warning with a sufficiently
advanced compiler.

Cc: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: shiftfs: add O_DIRECT support
Christian Brauner [Fri, 19 Jul 2019 15:50:46 +0000 (17:50 +0200)]
UBUNTU: SAUCE: shiftfs: add O_DIRECT support

BugLink: https://bugs.launchpad.net/bugs/1837223
This enabled O_DIRECT support for shiftfs if the underlay supports it.

Currently shiftfs does not handle O_DIRECT if the underlay supports it.
This is blocking dqlite - an essential part of LXD - from profiting from
the performance benefits of O_DIRECT on suitable filesystems when used
with async io such as aio or io_uring.
Overlayfs cannot support this directly since the upper filesystem in
overlay can be any filesystem. So if the upper filesystem does not
support O_DIRECT but the lower filesystem does you're out of luck.
Shiftfs does not suffer from the same problem since there is not concept
of an upper filesystem in the same way that overlayfs has it.
Essentially, shiftfs is a transparent shim relaying everything to the
underlay while overlayfs' upper layer is not (completely).

Cc: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Start new release
Seth Forshee [Wed, 21 Aug 2019 14:52:57 +0000 (09:52 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Ubuntu-5.3.0-7.8
Paolo Pisati [Mon, 19 Aug 2019 13:31:24 +0000 (15:31 +0200)]
UBUNTU: Ubuntu-5.3.0-7.8

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
5 years agoUBUNTU: remove missing module after updateconfigs
Paolo Pisati [Mon, 19 Aug 2019 13:30:15 +0000 (15:30 +0200)]
UBUNTU: remove missing module after updateconfigs

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
5 years agoUBUNTU: [Config] updateconfigs after v5.3-rc5 rebase
Paolo Pisati [Mon, 19 Aug 2019 12:58:28 +0000 (14:58 +0200)]
UBUNTU: [Config] updateconfigs after v5.3-rc5 rebase

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
5 years agoUBUNTU: rebase to v5.3-rc5
Paolo Pisati [Mon, 19 Aug 2019 12:44:57 +0000 (14:44 +0200)]
UBUNTU: rebase to v5.3-rc5

Ignore: yes
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
5 years agoUBUNTU: [Packaging] resync getabis
Paolo Pisati [Mon, 19 Aug 2019 12:28:39 +0000 (14:28 +0200)]
UBUNTU: [Packaging] resync getabis

BugLink: http://bugs.launchpad.net/bugs/1786013
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
5 years agoUBUNTU: Start new release
Seth Forshee [Fri, 16 Aug 2019 13:26:03 +0000 (08:26 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Ubuntu-5.3.0-6.7
Seth Forshee [Wed, 14 Aug 2019 18:25:01 +0000 (13:25 -0500)]
UBUNTU: Ubuntu-5.3.0-6.7

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: selftests/bpf: prevent headers to be compiled as C code
Andrii Nakryiko [Sun, 28 Jul 2019 03:25:23 +0000 (20:25 -0700)]
UBUNTU: SAUCE: selftests/bpf: prevent headers to be compiled as C code

Apprently listing header as a normal dependency for a binary output
makes it go through compilation as if it was C code. This currently
works without a problem, but in subsequent commits causes problems for
differently generated test.h for test_progs. Marking those headers as
order-only dependency solves the issue.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
(cherry picked from commit 61098e89e6c80d6a141774ef8ee41e38471b069e
 git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Start new release
Seth Forshee [Wed, 14 Aug 2019 17:12:54 +0000 (12:12 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Ubuntu-5.3.0-5.6
Seth Forshee [Tue, 13 Aug 2019 14:16:06 +0000 (09:16 -0500)]
UBUNTU: Ubuntu-5.3.0-5.6

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: [Config] enable zfs build
Seth Forshee [Tue, 13 Aug 2019 14:15:18 +0000 (09:15 -0500)]
UBUNTU: [Config] enable zfs build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: update dkms package versions
Seth Forshee [Tue, 13 Aug 2019 12:24:54 +0000 (07:24 -0500)]
UBUNTU: update dkms package versions

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Start new release
Seth Forshee [Tue, 13 Aug 2019 12:19:11 +0000 (07:19 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Ubuntu-5.3.0-4.5
Seth Forshee [Mon, 12 Aug 2019 15:41:27 +0000 (10:41 -0500)]
UBUNTU: Ubuntu-5.3.0-4.5

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: [Packaging] update helper scripts
Seth Forshee [Mon, 12 Aug 2019 14:08:21 +0000 (09:08 -0500)]
UBUNTU: [Packaging] update helper scripts

BugLink: http://bugs.launchpad.net/bugs/1786013
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: [Packaging] resync getabis
Seth Forshee [Mon, 12 Aug 2019 14:08:20 +0000 (09:08 -0500)]
UBUNTU: [Packaging] resync getabis

BugLink: http://bugs.launchpad.net/bugs/1786013
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: enable nvidia dkms build
Seth Forshee [Mon, 12 Aug 2019 14:38:29 +0000 (09:38 -0500)]
UBUNTU: enable nvidia dkms build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: update dkms package versions
Seth Forshee [Mon, 12 Aug 2019 12:30:23 +0000 (07:30 -0500)]
UBUNTU: update dkms package versions

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: rebase to v5.3-rc4
Seth Forshee [Mon, 12 Aug 2019 12:29:43 +0000 (07:29 -0500)]
UBUNTU: rebase to v5.3-rc4

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: bcache: fix deadlock in bcache_allocator
Andrea Righi [Wed, 7 Aug 2019 12:58:47 +0000 (14:58 +0200)]
UBUNTU: SAUCE: bcache: fix deadlock in bcache_allocator

bcache_allocator() can call the following:

 bch_allocator_thread()
  -> bch_prio_write()
     -> bch_bucket_alloc()
        -> wait on &ca->set->bucket_wait

But the wake up event on bucket_wait is supposed to come from
bch_allocator_thread() itself => deadlock:

[ 1158.490744] INFO: task bcache_allocato:15861 blocked for more than 10 seconds.
[ 1158.495929]       Not tainted 5.3.0-050300rc3-generic #201908042232
[ 1158.500653] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 1158.504413] bcache_allocato D    0 15861      2 0x80004000
[ 1158.504419] Call Trace:
[ 1158.504429]  __schedule+0x2a8/0x670
[ 1158.504432]  schedule+0x2d/0x90
[ 1158.504448]  bch_bucket_alloc+0xe5/0x370 [bcache]
[ 1158.504453]  ? wait_woken+0x80/0x80
[ 1158.504466]  bch_prio_write+0x1dc/0x390 [bcache]
[ 1158.504476]  bch_allocator_thread+0x233/0x490 [bcache]
[ 1158.504491]  kthread+0x121/0x140
[ 1158.504503]  ? invalidate_buckets+0x890/0x890 [bcache]
[ 1158.504506]  ? kthread_park+0xb0/0xb0
[ 1158.504510]  ret_from_fork+0x35/0x40

Fix by making the call to bch_prio_write() non-blocking, so that
bch_allocator_thread() never waits on itself.

Moreover, make sure to wake up the garbage collector thread when
bch_prio_write() is failing to allocate buckets.

BugLink: https://bugs.launchpad.net/bugs/1784665
BugLink: https://bugs.launchpad.net/bugs/1796292
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: shiftfs: enable overlayfs on shiftfs
Christian Brauner [Thu, 1 Aug 2019 18:08:29 +0000 (20:08 +0200)]
UBUNTU: SAUCE: shiftfs: enable overlayfs on shiftfs

BugLink: https://bugs.launchpad.net/bugs/1838677
This patch enables overlayfs to use shiftfs as an underlay.

Currently it is not possible to use overlayfs on top of shiftfs. This
means Docker inside of LXD cannot make user of the overlay2 graph driver
which is blocking users such as Travis from making use of it
efficiently.

Co-Developed-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
5 years agoUBUNTU: SAUCE: Revert "kbuild: modpost: do not parse unnecessary rules for vmlinux...
Seth Forshee [Thu, 8 Aug 2019 14:13:18 +0000 (09:13 -0500)]
UBUNTU: SAUCE: Revert "kbuild: modpost: do not parse unnecessary rules for vmlinux modpost"

This reverts commit a721588d9475cbbf9e8b3ae1a69b1dea88d01653.
This commit is causing issues building zfs, so reverting until
a fix is available upstream.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Start new release
Seth Forshee [Thu, 8 Aug 2019 14:06:23 +0000 (09:06 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Ubuntu-5.3.0-3.4
Paolo Pisati [Mon, 5 Aug 2019 16:17:10 +0000 (18:17 +0200)]
UBUNTU: Ubuntu-5.3.0-3.4

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
5 years agoUBUNTU: [Config] add mux-* to modules.ignore
Paolo Pisati [Mon, 5 Aug 2019 16:13:40 +0000 (18:13 +0200)]
UBUNTU: [Config] add mux-* to modules.ignore

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
5 years agoUBUNTU: SAUCE: aufs: add "WITH Linux-syscall-note" to SPDX tag of uapi headers
Paolo Pisati [Mon, 5 Aug 2019 15:17:51 +0000 (17:17 +0200)]
UBUNTU: SAUCE: aufs: add "WITH Linux-syscall-note" to SPDX tag of uapi headers

See also:

commit d9c5252295218df4cfe64353aa860d7b5c8700ef
Author: Masahiro Yamada <yamada.masahiro@socionext.com>
Date:   Thu Jul 25 16:58:31 2019 +0900

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
5 years agoUBUNTU: update dkms package versions
Paolo Pisati [Mon, 5 Aug 2019 13:23:50 +0000 (15:23 +0200)]
UBUNTU: update dkms package versions

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
5 years agoUBUNTU: rebase to v5.3-rc3
Paolo Pisati [Mon, 5 Aug 2019 13:20:09 +0000 (15:20 +0200)]
UBUNTU: rebase to v5.3-rc3

Ignore: yes
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
5 years agoUBUNTU: Start new release
Seth Forshee [Thu, 1 Aug 2019 13:21:24 +0000 (09:21 -0400)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Ubuntu-5.3.0-2.3
Seth Forshee [Mon, 29 Jul 2019 16:18:46 +0000 (12:18 -0400)]
UBUNTU: Ubuntu-5.3.0-2.3

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: [Packaging] add build dependincy on fontconfig
Seth Forshee [Mon, 29 Jul 2019 16:09:53 +0000 (12:09 -0400)]
UBUNTU: [Packaging] add build dependincy on fontconfig

fc-list is now being run as part of generating the html docs, so
add the required build dependency to pull this in.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Start new release
Seth Forshee [Mon, 29 Jul 2019 16:17:08 +0000 (12:17 -0400)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Ubuntu-5.3.0-1.2
Seth Forshee [Mon, 29 Jul 2019 03:10:16 +0000 (23:10 -0400)]
UBUNTU: Ubuntu-5.3.0-1.2

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: [Config] enable vbox dkms build
Seth Forshee [Mon, 29 Jul 2019 01:30:20 +0000 (21:30 -0400)]
UBUNTU: [Config] enable vbox dkms build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: update dkms package versions
Seth Forshee [Mon, 29 Jul 2019 01:28:47 +0000 (21:28 -0400)]
UBUNTU: update dkms package versions

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: rebase to v5.3-rc2
Seth Forshee [Mon, 29 Jul 2019 01:24:49 +0000 (21:24 -0400)]
UBUNTU: rebase to v5.3-rc2

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: drm/i915: Enable hotplug retry
José Roberto de Souza [Fri, 12 Jul 2019 00:53:43 +0000 (17:53 -0700)]
UBUNTU: SAUCE: drm/i915: Enable hotplug retry

BugLink: http://bugs.launchpad.net/bugs/1835001
Right now we are aware of two cases that needs another hotplug retry:
- Unpowered type-c dongles
- HDMI slow unplug

Both have a complete explanation in the code to schedule another run
of the hotplug handler.

It could have more checks to just trigger the retry in those two
specific cases but why would sink signal a long pulse if there is
no change? Also the drawback of running the hotplug handler again
is really low and that could fix another cases that we are not
aware.

Also retrying for old DP ports(non-DDI) to make it consistent and not
cause CI failures if those systems are connected to chamelium boards
that will be used to simulate the issues reported in here.

v2: Also retrying for old DP ports(non-DDI)(Imre)

v4: Renamed INTEL_HOTPLUG_NOCHANGE to INTEL_HOTPLUG_UNCHANGED to keep
it consistent(Rodrigo)

Tested-by: Timo Aaltonen <tjaalton@ubuntu.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190712005343.24571-2-jose.souza@intel.com
(cherry picked from commit bb80c9255770fa1ed54e889a6bee628bdd0f6762
 git://anongit.freedesktop.org/drm-intel)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: drm/i915: Add support for retrying hotplug
Imre Deak [Fri, 12 Jul 2019 00:53:42 +0000 (17:53 -0700)]
UBUNTU: SAUCE: drm/i915: Add support for retrying hotplug

BugLink: http://bugs.launchpad.net/bugs/1835001
There is some scenarios that we are aware that sink probe can fail,
so lets add the infrastructure to let hotplug() hook to request
another probe after some time.

v2: Handle shared HPD pins (Imre)
v3: Rebased
v4: Renamed INTEL_HOTPLUG_NOCHANGE to INTEL_HOTPLUG_UNCHANGED to keep
it consistent(Rodrigo)
v5: Making the working queue used explicit through all the callers to
hotplug_work (Ville)

Tested-by: Timo Aaltonen <tjaalton@ubuntu.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190712005343.24571-1-jose.souza@intel.com
(cherry picked from commit 3944709df8e9298225fc2b29e53ee8e6f4b26618
 git://anongit.freedesktop.org/drm-intel)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: [Config] Enable CONFIG_SCSI_UFS_QCOM as a module on arm64.
Dimitri John Ledkov [Sun, 21 Jul 2019 18:59:06 +0000 (15:59 -0300)]
UBUNTU: [Config] Enable CONFIG_SCSI_UFS_QCOM as a module on arm64.

SCSI_UFS_QCOM enables UFS storage on QCOM based laptops such as Lenovo
Yoga C630.

BugLink: https://bugs.launchpad.net/bugs/1837332
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: [Config] update annotations after enabling ARCH_MESON for arm64
Seth Forshee [Fri, 26 Jul 2019 20:46:19 +0000 (15:46 -0500)]
UBUNTU: [Config] update annotations after enabling ARCH_MESON for arm64

BugLink: https://bugs.launchpad.net/bugs/1820530
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: remove missing module
Paolo Pisati [Fri, 19 Jul 2019 14:54:28 +0000 (16:54 +0200)]
UBUNTU: remove missing module

BugLink: https://bugs.launchpad.net/bugs/1820530
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
[ saf: also remove module for generic-lpae ]
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: [Config] enable ARCH_MESON
Paolo Pisati [Fri, 19 Jul 2019 14:54:27 +0000 (16:54 +0200)]
UBUNTU: [Config] enable ARCH_MESON

BugLink: https://bugs.launchpad.net/bugs/1820530
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Start new release
Seth Forshee [Fri, 26 Jul 2019 20:30:14 +0000 (15:30 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Ubuntu-5.3.0-0.1
Seth Forshee [Wed, 24 Jul 2019 02:45:44 +0000 (21:45 -0500)]
UBUNTU: Ubuntu-5.3.0-0.1

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: [Packaging] resync git-ubuntu-log
Seth Forshee [Wed, 24 Jul 2019 01:31:05 +0000 (20:31 -0500)]
UBUNTU: [Packaging] resync git-ubuntu-log

BugLink: http://bugs.launchpad.net/bugs/1786013
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: perf diff: use llabs for s64 vaules
Seth Forshee [Tue, 23 Jul 2019 23:35:06 +0000 (18:35 -0500)]
UBUNTU: SAUCE: perf diff: use llabs for s64 vaules

labs(3) takes a long argument, and passing an s64 value may cause
trunction on 32-bit architectures. Use llabs(3) instead, which
takes a long long.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: [Config] disable vbox dkms build
Seth Forshee [Wed, 24 Jul 2019 02:43:51 +0000 (21:43 -0500)]
UBUNTU: [Config] disable vbox dkms build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: [Config] disable nvidia dkms build
Seth Forshee [Tue, 23 Jul 2019 21:16:34 +0000 (16:16 -0500)]
UBUNTU: [Config] disable nvidia dkms build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: [Config] disable zfs dkms build
Seth Forshee [Tue, 23 Jul 2019 21:00:13 +0000 (16:00 -0500)]
UBUNTU: [Config] disable zfs dkms build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: aufs: rwsem owner changed to atmoic_long_t in 5.3
Seth Forshee [Tue, 23 Jul 2019 19:05:22 +0000 (14:05 -0500)]
UBUNTU: SAUCE: aufs: rwsem owner changed to atmoic_long_t in 5.3

Commit 94a9717b3c40 ("locking/rwsem: Make rwsem->owner an
atomic_long_t") in 5.3-rc1 changed rwsem->owner from a task
struct pointer to an atomic long. Update aufs accordingly.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: Rebase to v5.3-rc1
Seth Forshee [Tue, 23 Jul 2019 18:57:08 +0000 (13:57 -0500)]
UBUNTU: Rebase to v5.3-rc1

Update configs and annotations following rebase to v5.3-rc1.

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: import aufs driver
Seth Forshee [Mon, 22 Jul 2019 16:01:35 +0000 (11:01 -0500)]
UBUNTU: SAUCE: import aufs driver

Import aufs4.x-rcN 20190610 from https://github.com/sfjro/aufs4-standalone
commit 7e40ffd672319117c7dc102545b0c75188d241fe.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) arm64: add kernel config option to lock down when in...
Linn Crosetto [Wed, 20 Feb 2019 15:48:23 +0000 (16:48 +0100)]
UBUNTU: SAUCE: (efi-lockdown) arm64: add kernel config option to lock down when in Secure Boot mode

Add a kernel configuration option to lock down the kernel, to restrict
userspace's ability to modify the running kernel when UEFI Secure Boot is
enabled. Based on the x86 patch by Matthew Garrett.

Determine the state of Secure Boot in the EFI stub and pass this to the
kernel using the FDT.

Signed-off-by: Linn Crosetto <linn@hpe.com>
[bwh: Forward-ported to 4.10: adjust context]
[Lukas Wunner: Forward-ported to 4.11: drop parts applied upstream]
[bwh: Forward-ported to 4.15 and lockdown patch set:
 - Pass result of efi_get_secureboot() in stub through to
   efi_set_secure_boot() in main kernel
 - Use lockdown API and naming]
[bwh: Forward-ported to 4.19.3: adjust context in update_fdt()]
[dannf: Moved init_lockdown() call after uefi_init(), fixing SB detection]
(from https://salsa.debian.org/kernel-team/linux/blob/4c4f3e03fdaaa674275c7197cae156e606dfaa4b/debian/patches/features/all/lockdown/arm64-add-kernel-config-option-to-lock-down-when.patch)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) furter KEXEC_VERIFY_SIG -> KEXEC_SIG updates
Seth Forshee [Wed, 8 May 2019 19:33:19 +0000 (14:33 -0500)]
UBUNTU: SAUCE: (efi-lockdown) furter KEXEC_VERIFY_SIG -> KEXEC_SIG updates

"kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and
KEXEC_SIG_FORCE" missed several locations which used the old
option, and also missed the fact that arm64 also supports kexec
image signature verification. Finish the changes started in that
patch.

Fixes: "kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE"
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) efi: Sanitize boot_params in efi stub
Seth Forshee [Thu, 4 May 2017 13:09:04 +0000 (08:09 -0500)]
UBUNTU: SAUCE: (efi-lockdown) efi: Sanitize boot_params in efi stub

The efi stub will set the value of boot_params.secure_boot
without first checking whether boot_params has been sanitized. If
they have not, the value of secure_boot will be cleared later
when boot_params is sanitized. This currently happens with grub
as it currently does not clear the sentinel, and thus the kernel
cannot determine the secure boot state.

Since the efi stub is modifying a field in an area subject to
sanitization, it must first sanitize boot_params if needed. Later
sanitization by the decompressor will do nothing as the sentinel
value will have been cleared.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) KEYS: Make use of platform keyring for module signature...
Robert Holmes [Tue, 23 Apr 2019 07:39:29 +0000 (07:39 +0000)]
UBUNTU: SAUCE: (efi-lockdown) KEYS: Make use of platform keyring for module signature verify

This patch completes commit 278311e417be ("kexec, KEYS: Make use of
platform keyring for signature verify") which, while adding the
platform keyring for bzImage verification, neglected to also add
this keyring for module verification.

As such, kernel modules signed with keys from the MokList variable
were not successfully verified.

Signed-off-by: Robert Holmes <robeholmes@gmail.com>
(cherry picked from commit 0beb1b712d4d8e2a3ca5dc4d7b6a018a55a5342e
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) efi: Lock down the kernel if booted in secure boot...
David Howells [Tue, 27 Feb 2018 10:04:55 +0000 (10:04 +0000)]
UBUNTU: SAUCE: (efi-lockdown) efi: Lock down the kernel if booted in secure boot mode

UEFI Secure Boot provides a mechanism for ensuring that the firmware will
only load signed bootloaders and kernels.  Certain use cases may also
require that all kernel modules also be signed.  Add a configuration option
that to lock down the kernel - which includes requiring validly signed
modules - if the kernel is secure-booted.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
cc: linux-efi@vger.kernel.org
(cherry picked from commit 55346ce033dd548bf74d489d6ddf2bfc702c7d40
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) efi: Add an EFI_SECURE_BOOT flag to indicate secure...
David Howells [Tue, 27 Feb 2018 10:04:55 +0000 (10:04 +0000)]
UBUNTU: SAUCE: (efi-lockdown) efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode

UEFI machines can be booted in Secure Boot mode.  Add an EFI_SECURE_BOOT
flag that can be passed to efi_enabled() to find out whether secure boot is
enabled.

Move the switch-statement in x86's setup_arch() that inteprets the
secure_boot boot parameter to generic code and set the bit there.

Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
cc: linux-efi@vger.kernel.org
Signed-off-by: Jeremy Cline <jcline@redhat.com>
(cherry picked from commit 80cc4bec33ca9429c01082ef9ad51c9f2cbc3f23
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) Make get_cert_list() use efi_status_to_str() to print...
Peter Jones [Mon, 2 Oct 2017 22:18:30 +0000 (18:18 -0400)]
UBUNTU: SAUCE: (efi-lockdown) Make get_cert_list() use efi_status_to_str() to print error messages.

Signed-off-by: Peter Jones <pjones@redhat.com>
(cherry picked from commit 6e56736bc779dab3c1d80fd27796520420aab987
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) Add efi_status_to_str() and rework efi_status_to_err().
Peter Jones [Mon, 2 Oct 2017 22:22:13 +0000 (18:22 -0400)]
UBUNTU: SAUCE: (efi-lockdown) Add efi_status_to_str() and rework efi_status_to_err().

This adds efi_status_to_str() for use when printing efi_status_t
messages, and reworks efi_status_to_err() so that the two use a common
list of errors.

Signed-off-by: Peter Jones <pjones@redhat.com>
(cherry picked from commit 2d698a1d7806399a4c032b1a4a8a789eb0d6a836
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) Make get_cert_list() not complain about cert lists...
Peter Jones [Mon, 2 Oct 2017 22:25:29 +0000 (18:25 -0400)]
UBUNTU: SAUCE: (efi-lockdown) Make get_cert_list() not complain about cert lists that aren't present.

Signed-off-by: Peter Jones <pjones@redhat.com>
(cherry picked from commit 9141f57f44623aad2ee5dfa29a44c63bfe4102ad
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) debugfs: avoid EPERM when no open file operation defined
Vasily Gorbik [Wed, 21 Nov 2018 12:05:10 +0000 (13:05 +0100)]
UBUNTU: SAUCE: (efi-lockdown) debugfs: avoid EPERM when no open file operation defined

With "debugfs: Restrict debugfs when the kernel is locked down"
return code "r" is unconditionally set to -EPERM, which stays like that
until function return if no "open" file operation defined, effectivelly
resulting in "Operation not permitted" for all such files despite kernel
lock down status or CONFIG_LOCK_DOWN_KERNEL being enabled.

In particular this breaks 2 debugfs files on s390:
/sys/kernel/debug/s390_hypfs/diag_304
/sys/kernel/debug/s390_hypfs/diag_204

To address that set EPERM return code only when debugfs_is_locked_down
returns true.

Fixes: 3fc322605158 ("debugfs: Restrict debugfs when the kernel is locked down")
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
(cherry picked from commit f53c8aa05a37fb1c7b10f0b8fd84d9e0ad980c8c
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) Add a SysRq option to lift kernel lockdown
Kyle McMartin [Mon, 9 Apr 2018 08:52:45 +0000 (09:52 +0100)]
UBUNTU: SAUCE: (efi-lockdown) Add a SysRq option to lift kernel lockdown

Make an option to provide a sysrq key that will lift the kernel lockdown,
thereby allowing the running kernel image to be accessed and modified.

On x86 this is triggered with SysRq+x, but this key may not be available on
all arches, so it is set by setting LOCKDOWN_LIFT_KEY in asm/setup.h.
Since this macro must be defined in an arch to be able to use this facility
for that arch, the Kconfig option is restricted to arches that support it.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: x86@kernel.org
(cherry picked from commit e99a8098e8012d51d4651a609179b2f403e6d2fd
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) kexec: Allow kexec_file() with appropriate IMA policy...
Matthew Garrett [Tue, 12 Mar 2019 19:50:30 +0000 (12:50 -0700)]
UBUNTU: SAUCE: (efi-lockdown) kexec: Allow kexec_file() with appropriate IMA policy when locked down

Systems in lockdown mode should block the kexec of untrusted kernels.
For x86 and ARM we can ensure that a kernel is trustworthy by validating
a PE signature, but this isn't possible on other architectures. On those
platforms we can use IMA digital signatures instead. Add a function to
determine whether IMA has or will verify signatures for a given event type,
and if so permit kexec_file() even if the kernel is otherwise locked down.
This is restricted to cases where CONFIG_INTEGRITY_TRUSTED_KEYRING is set
in order to prevent an attacker from loading additional keys at runtime.

Signed-off-by: Matthew Garrett <mjg59@google.com>
Acked-by: Mimi Zohar <zohar@linux.ibm.com>
Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
Cc: linux-integrity@vger.kernel.org
(cherry picked from commit 9996a08884dc0ab6ef563a512e98aa1a90bef217
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) lockdown: Print current->comm in restriction messages
David Howells [Wed, 28 Feb 2018 14:43:03 +0000 (14:43 +0000)]
UBUNTU: SAUCE: (efi-lockdown) lockdown: Print current->comm in restriction messages

Print the content of current->comm in messages generated by lockdown to
indicate a restriction that was hit.  This makes it a bit easier to find
out what caused the message.

The message now patterned something like:

Lockdown: <comm>: <what> is restricted; see man kernel_lockdown.7

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit baf80953aa8cb1cf9fbc261e7592ac2f9281fbba
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) debugfs: Restrict debugfs when the kernel is locked...
David Howells [Mon, 18 Feb 2019 12:45:02 +0000 (12:45 +0000)]
UBUNTU: SAUCE: (efi-lockdown) debugfs: Restrict debugfs when the kernel is locked down

Disallow opening of debugfs files that might be used to muck around when
the kernel is locked down as various drivers give raw access to hardware
through debugfs.  Given the effort of auditing all 2000 or so files and
manually fixing each one as necessary, I've chosen to apply a heuristic
instead.  The following changes are made:

 (1) chmod and chown are disallowed on debugfs objects (though the root dir
     can be modified by mount and remount, but I'm not worried about that).

 (2) When the kernel is locked down, only files with the following criteria
     are permitted to be opened:

- The file must have mode 00444
- The file must not have ioctl methods
- The file must not have mmap

 (3) When the kernel is locked down, files may only be opened for reading.

Normal device interaction should be done through configfs, sysfs or a
miscdev, not debugfs.

Note that this makes it unnecessary to specifically lock down show_dsts(),
show_devs() and show_call() in the asus-wmi driver.

I would actually prefer to lock down all files by default and have the
the files unlocked by the creator.  This is tricky to manage correctly,
though, as there are 19 creation functions and ~1600 call sites (some of
them in loops scanning tables).

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Andy Shevchenko <andy.shevchenko@gmail.com>
cc: acpi4asus-user@lists.sourceforge.net
cc: platform-driver-x86@vger.kernel.org
cc: Matthew Garrett <mjg59@srcf.ucam.org>
cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 9a9439ed9619f31bb154952821a6ad3072414d03
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) Lock down perf
David Howells [Mon, 18 Feb 2019 12:45:02 +0000 (12:45 +0000)]
UBUNTU: SAUCE: (efi-lockdown) Lock down perf

Disallow the use of certain perf facilities that might allow userspace to
access kernel data.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
(cherry picked from commit b2b2655041fdec92c203f27a412cf1b58fb9cd4a
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) bpf: Restrict kernel image access functions when the...
David Howells [Mon, 18 Feb 2019 12:45:02 +0000 (12:45 +0000)]
UBUNTU: SAUCE: (efi-lockdown) bpf: Restrict kernel image access functions when the kernel is locked down

There are some bpf functions can be used to read kernel memory:
bpf_probe_read, bpf_probe_write_user and bpf_trace_printk.  These allow
private keys in kernel memory (e.g. the hibernation image signing key) to
be read by an eBPF program and kernel memory to be altered without
restriction.

Completely prohibit the use of BPF when the kernel is locked down.

Suggested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: netdev@vger.kernel.org
cc: Chun-Yi Lee <jlee@suse.com>
cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 179926cf8ba00329494df6f45fc537ab9540d485
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) Lock down kprobes
David Howells [Mon, 18 Feb 2019 12:45:02 +0000 (12:45 +0000)]
UBUNTU: SAUCE: (efi-lockdown) Lock down kprobes

Disallow the creation of kprobes when the kernel is locked down by
preventing their registration.  This prevents kprobes from being used to
access kernel memory, either to make modifications or to steal crypto data.

Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
Cc: Naveen N. Rao <naveen.n.rao@linux.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: davem@davemloft.net
Cc: Masami Hiramatsu <mhiramat@kernel.org>
(cherry picked from commit 54f9245ac0c09112c81a54801aafae01fdb866bf
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) Lock down /proc/kcore
David Howells [Mon, 18 Feb 2019 12:45:02 +0000 (12:45 +0000)]
UBUNTU: SAUCE: (efi-lockdown) Lock down /proc/kcore

Disallow access to /proc/kcore when the kernel is locked down to prevent
access to cryptographic data.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit ae7a30d69a5422bcbc803592b49640330811030a
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) x86/mmiotrace: Lock down the testmmiotrace module
David Howells [Mon, 18 Feb 2019 12:45:01 +0000 (12:45 +0000)]
UBUNTU: SAUCE: (efi-lockdown) x86/mmiotrace: Lock down the testmmiotrace module

The testmmiotrace module shouldn't be permitted when the kernel is locked
down as it can be used to arbitrarily read and write MMIO space.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David Howells <dhowells@redhat.com
cc: Thomas Gleixner <tglx@linutronix.de>
cc: Steven Rostedt <rostedt@goodmis.org>
cc: Ingo Molnar <mingo@kernel.org>
cc: "H. Peter Anvin" <hpa@zytor.com>
cc: x86@kernel.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 5674f831317a0d02726fd79929eb36d9461175e9
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) Lock down module params that specify hardware parameter...
David Howells [Mon, 18 Feb 2019 12:45:01 +0000 (12:45 +0000)]
UBUNTU: SAUCE: (efi-lockdown) Lock down module params that specify hardware parameters (eg. ioport)

Provided an annotation for module parameters that specify hardware
parameters (such as io ports, iomem addresses, irqs, dma channels, fixed
dma buffers and other types).

Suggested-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 95f8983c4f29cca06b6b0816f8b115894883e525
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) Lock down TIOCSSERIAL
David Howells [Mon, 18 Feb 2019 12:45:00 +0000 (12:45 +0000)]
UBUNTU: SAUCE: (efi-lockdown) Lock down TIOCSSERIAL

Lock down TIOCSSERIAL as that can be used to change the ioport and irq
settings on a serial port.  This only appears to be an issue for the serial
drivers that use the core serial code.  All other drivers seem to either
ignore attempts to change port/irq or give an error.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 2c55c6b218596f35387d393e98a6aee61a8d3924
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) Prohibit PCMCIA CIS storage when the kernel is locked...
David Howells [Mon, 18 Feb 2019 12:45:00 +0000 (12:45 +0000)]
UBUNTU: SAUCE: (efi-lockdown) Prohibit PCMCIA CIS storage when the kernel is locked down

Prohibit replacement of the PCMCIA Card Information Structure when the
kernel is locked down.

Suggested-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-pcmcia@lists.infradead.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 5633e51f0da66af67d82c6e346ff0afc49bfc49b
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) acpi: Disable APEI error injection if the kernel is...
Linn Crosetto [Mon, 18 Feb 2019 12:45:00 +0000 (12:45 +0000)]
UBUNTU: SAUCE: (efi-lockdown) acpi: Disable APEI error injection if the kernel is locked down

ACPI provides an error injection mechanism, EINJ, for debugging and testing
the ACPI Platform Error Interface (APEI) and other RAS features.  If
supported by the firmware, ACPI specification 5.0 and later provide for a
way to specify a physical memory address to which to inject the error.

Injecting errors through EINJ can produce errors which to the platform are
indistinguishable from real hardware errors.  This can have undesirable
side-effects, such as causing the platform to mark hardware as needing
replacement.

While it does not provide a method to load unauthenticated privileged code,
the effect of these errors may persist across reboots and affect trust in
the underlying hardware, so disable error injection through EINJ if
the kernel is locked down.

Signed-off-by: Linn Crosetto <linn@hpe.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-acpi@vger.kernel.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 927e9ae3b060cc59c5ba3807bc1813132987efe2
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) acpi: Disable ACPI table override if the kernel is...
Linn Crosetto [Mon, 18 Feb 2019 12:45:00 +0000 (12:45 +0000)]
UBUNTU: SAUCE: (efi-lockdown) acpi: Disable ACPI table override if the kernel is locked down

From the kernel documentation (initrd_table_override.txt):

  If the ACPI_INITRD_TABLE_OVERRIDE compile option is true, it is possible
  to override nearly any ACPI table provided by the BIOS with an
  instrumented, modified one.

When securelevel is set, the kernel should disallow any unauthenticated
changes to kernel space.  ACPI tables contain code invoked by the kernel,
so do not allow ACPI tables to be overridden if the kernel is locked down.

Signed-off-by: Linn Crosetto <linn@hpe.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-acpi@vger.kernel.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit b74b5755481ca47342cd5c189324acd3c24617f9
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) acpi: Ignore acpi_rsdp kernel param when the kernel...
Josh Boyer [Mon, 18 Feb 2019 12:44:59 +0000 (12:44 +0000)]
UBUNTU: SAUCE: (efi-lockdown) acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down

This option allows userspace to pass the RSDP address to the kernel, which
makes it possible for a user to modify the workings of hardware .  Reject
the option when the kernel is locked down.

Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Dave Young <dyoung@redhat.com>
cc: linux-acpi@vger.kernel.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 9042ec0d455fc5d2d33e55ebab11a7ed6f8e53b1
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) ACPI: Limit access to custom_method when the kernel...
Matthew Garrett [Mon, 18 Feb 2019 12:44:59 +0000 (12:44 +0000)]
UBUNTU: SAUCE: (efi-lockdown) ACPI: Limit access to custom_method when the kernel is locked down

custom_method effectively allows arbitrary access to system memory, making
it possible for an attacker to circumvent restrictions on module loading.
Disable it if the kernel is locked down.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-acpi@vger.kernel.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit e957c3c8a2931bdc152ec19956cc68eb4a381e87
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) x86/msr: Restrict MSR access when the kernel is locked...
Matthew Garrett [Mon, 18 Feb 2019 12:44:59 +0000 (12:44 +0000)]
UBUNTU: SAUCE: (efi-lockdown) x86/msr: Restrict MSR access when the kernel is locked down

Writing to MSRs should not be allowed if the kernel is locked down, since
it could lead to execution of arbitrary code in kernel mode.  Based on a
patch by Kees Cook.

MSR accesses are logged for the purposes of building up a whitelist as per
Alan Cox's suggestion.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
cc: x86@kernel.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 683add52823d549d892a2ff4d977938867d3e6c9
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) x86: Lock down IO port access when the kernel is locked...
Matthew Garrett [Mon, 18 Feb 2019 12:44:59 +0000 (12:44 +0000)]
UBUNTU: SAUCE: (efi-lockdown) x86: Lock down IO port access when the kernel is locked down

IO port access would permit users to gain access to PCI configuration
registers, which in turn (on a lot of hardware) give access to MMIO
register space. This would potentially permit root to trigger arbitrary
DMA, so lock it down by default.

This also implicitly locks down the KDADDIO, KDDELIO, KDENABIO and
KDDISABIO console ioctls.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
cc: x86@kernel.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 893a1e17e5f77f86249afbc431fc62b69669e3d0
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) PCI: Lock down BAR access when the kernel is locked...
Matthew Garrett [Mon, 18 Feb 2019 12:44:59 +0000 (12:44 +0000)]
UBUNTU: SAUCE: (efi-lockdown) PCI: Lock down BAR access when the kernel is locked down

Any hardware that can potentially generate DMA has to be locked down in
order to avoid it being possible for an attacker to modify kernel code,
allowing them to circumvent disabled module loading or module signing.
Default to paranoid - in future we can potentially relax this for
sufficiently IOMMU-isolated devices.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
cc: linux-pci@vger.kernel.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit ee84290b96136e075f20536e6b468250173cf17c
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) uswsusp: Disable when the kernel is locked down
Matthew Garrett [Mon, 18 Feb 2019 12:44:59 +0000 (12:44 +0000)]
UBUNTU: SAUCE: (efi-lockdown) uswsusp: Disable when the kernel is locked down

uswsusp allows a user process to dump and then restore kernel state, which
makes it possible to modify the running kernel.  Disable this if the kernel
is locked down.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
cc: linux-pm@vger.kernel.org
Cc: pavel@ucw.cz
Cc: rjw@rjwysocki.net
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 1fda303f0b571217eec1a85d53fc92004f756a19
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) hibernate: Disable when the kernel is locked down
Josh Boyer [Mon, 18 Feb 2019 12:44:59 +0000 (12:44 +0000)]
UBUNTU: SAUCE: (efi-lockdown) hibernate: Disable when the kernel is locked down

There is currently no way to verify the resume image when returning
from hibernate.  This might compromise the signed modules trust model,
so until we can work with signed hibernate images we disable it when the
kernel is locked down.

Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: rjw@rjwysocki.net
Cc: pavel@ucw.cz
cc: linux-pm@vger.kernel.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 97b9f22ab87edc9163138f13adfc3f9593d2cd8b
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) kexec_file: Restrict at runtime if the kernel is locked...
Jiri Bohac [Mon, 18 Feb 2019 12:44:58 +0000 (12:44 +0000)]
UBUNTU: SAUCE: (efi-lockdown) kexec_file: Restrict at runtime if the kernel is locked down

When KEXEC_SIG is not enabled, kernel should not load images through
kexec_file systemcall if the kernel is locked down.

[Modified by David Howells to fit with modifications to the previous patch
 and to return -EPERM if the kernel is locked down for consistency with
 other lockdowns. Modified by Matthew Garrett to remove the IMA
 integration, which will be replaced by integrating with the IMA
 architecture policy patches.]

Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jiri Bohac <jbohac@suse.cz>
cc: kexec@lists.infradead.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 0534109a5184b15bdec4cb66822894478c689603
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and...
Jiri Bohac [Mon, 18 Feb 2019 12:44:58 +0000 (12:44 +0000)]
UBUNTU: SAUCE: (efi-lockdown) kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE

This is a preparatory patch for kexec_file_load() lockdown.  A locked down
kernel needs to prevent unsigned kernel images from being loaded with
kexec_file_load().  Currently, the only way to force the signature
verification is compiling with KEXEC_VERIFY_SIG.  This prevents loading
usigned images even when the kernel is not locked down at runtime.

This patch splits KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE.
Analogous to the MODULE_SIG and MODULE_SIG_FORCE for modules, KEXEC_SIG
turns on the signature verification but allows unsigned images to be
loaded.  KEXEC_SIG_FORCE disallows images without a valid signature.

[Modified by David Howells such that:

 (1) verify_pefile_signature() differentiates between no-signature and
     sig-didn't-match in its returned errors.

 (2) kexec fails with EKEYREJECTED and logs an appropriate message if
     signature checking is enforced and an signature is not found, uses
     unsupported crypto or has no matching key.

 (3) kexec fails with EKEYREJECTED if there is a signature for which we
     have a key, but signature doesn't match - even if in non-forcing mode.

 (4) kexec fails with EBADMSG or some other error if there is a signature
     which cannot be parsed - even if in non-forcing mode.

 (5) kexec fails with ELIBBAD if the PE file cannot be parsed to extract
     the signature - even if in non-forcing mode.

]

Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jiri Bohac <jbohac@suse.cz>
cc: kexec@lists.infradead.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 76f8617a4f9ddd1dae5cbd9c4efc509d43eb2503
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) Copy secure_boot flag in boot params across kexec reboot
Dave Young [Mon, 18 Feb 2019 12:44:58 +0000 (12:44 +0000)]
UBUNTU: SAUCE: (efi-lockdown) Copy secure_boot flag in boot params across kexec reboot

Kexec reboot in case secure boot being enabled does not keep the secure
boot mode in new kernel, so later one can load unsigned kernel via legacy
kexec_load.  In this state, the system is missing the protections provided
by secure boot.

Adding a patch to fix this by retain the secure_boot flag in original
kernel.

secure_boot flag in boot_params is set in EFI stub, but kexec bypasses the
stub.  Fixing this issue by copying secure_boot flag across kexec reboot.

Signed-off-by: Dave Young <dyoung@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: kexec@lists.infradead.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit b2c28f94329d925b643127e79203cdd75cf8f7f7
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) kexec_load: Disable at runtime if the kernel is locked...
Matthew Garrett [Mon, 18 Feb 2019 12:44:58 +0000 (12:44 +0000)]
UBUNTU: SAUCE: (efi-lockdown) kexec_load: Disable at runtime if the kernel is locked down

The kexec_load() syscall permits the loading and execution of arbitrary
code in ring 0, which is something that lock-down is meant to prevent. It
makes sense to disable kexec_load() in this situation.

This does not affect kexec_file_load() syscall which can check for a
signature on the image to be booted.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
cc: kexec@lists.infradead.org
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit 84b4c7089ba216902c63f5ab7a43690b99b78376
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
5 years agoUBUNTU: SAUCE: (efi-lockdown) Restrict /dev/{mem,kmem,port} when the kernel is locked...
Matthew Garrett [Mon, 18 Feb 2019 12:44:58 +0000 (12:44 +0000)]
UBUNTU: SAUCE: (efi-lockdown) Restrict /dev/{mem,kmem,port} when the kernel is locked down

Allowing users to read and write to core kernel memory makes it possible
for the kernel to be subverted, avoiding module loading restrictions, and
also to steal cryptographic information.

Disallow /dev/mem and /dev/kmem from being opened this when the kernel has
been locked down to prevent this.

Also disallow /dev/port from being opened to prevent raw ioport access and
thus DMA from being used to accomplish the same thing.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
Cc: x86@kernel.org
(cherry picked from commit cd7e24db6a2d88ed9ce9b1813b0bf05966ce287f
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>