]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/log
mirror_ubuntu-bionic-kernel.git
6 years agoUBUNTU: SAUCE: apparmor: fix display of .ns_name for containers
John Johansen [Wed, 31 Jan 2018 10:23:41 +0000 (11:23 +0100)]
UBUNTU: SAUCE: apparmor: fix display of .ns_name for containers

The .ns_name should not be virtualized by the current ns view. It
needs to report the ns base name as that is being used during startup
as part of determining apparmor policy namespace support.

BugLink: http://bugs.launchpad.net/bugs/1746463
Fixes: d9f02d9c237aa ("apparmor: fix display of ns name")
Reported-by: Serge Hallyn <serge@hallyn.com>
Tested-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Start new release
Seth Forshee [Wed, 31 Jan 2018 11:31:27 +0000 (12:31 +0100)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Ubuntu-4.15.0-6.7
Seth Forshee [Mon, 29 Jan 2018 14:47:32 +0000 (08:47 -0600)]
UBUNTU: Ubuntu-4.15.0-6.7

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoRevert "UBUNTU: SAUCE: mm: disable vma based swap readahead by default"
Seth Forshee [Mon, 29 Jan 2018 14:45:00 +0000 (08:45 -0600)]
Revert "UBUNTU: SAUCE: mm: disable vma based swap readahead by default"

This change was to fix an ADT failure. Revert the patch to run a
kernel through testing so we can see if the failure is still an
issue.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoRevert "UBUNTU: SAUCE: mm: fix memory hotplug in ZONE_HIGHMEM"
Seth Forshee [Mon, 29 Jan 2018 14:43:07 +0000 (08:43 -0600)]
Revert "UBUNTU: SAUCE: mm: fix memory hotplug in ZONE_HIGHMEM"

This patch may no longer be required. Try reverting it to run
a kernel through testing to see if the test failures which
prompted the patch are fixed.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (noup) Update spl to 0.7.5-1ubuntu1, zfs to 0.7.5-1ubuntu1
Colin Ian King [Fri, 26 Jan 2018 23:13:03 +0000 (23:13 +0000)]
UBUNTU: SAUCE: (noup) Update spl to 0.7.5-1ubuntu1, zfs to 0.7.5-1ubuntu1

Sync up kernel drives of SPL and ZFS to version 0.7.5. This has passed
the set of ubuntu autotest ZFS regression tests when built against the
current Bionic unstable 4.15 tip.

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.15
Seth Forshee [Mon, 29 Jan 2018 13:46:51 +0000 (07:46 -0600)]
UBUNTU: Rebase to v4.15

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Packaging] update urgency to medium by default
Andy Whitcroft [Thu, 25 Jan 2018 10:27:43 +0000 (10:27 +0000)]
UBUNTU: [Packaging] update urgency to medium by default

BugLink: http://bugs.launchpad.net/bugs/1745338
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoscsi: libiscsi: Allow sd_shutdown on bad transport
Rafael David Tinoco [Thu, 7 Dec 2017 21:59:13 +0000 (19:59 -0200)]
scsi: libiscsi: Allow sd_shutdown on bad transport

BugLink: https://bugs.launchpad.net/bugs/1569925
If, for any reason, userland shuts down iscsi transport interfaces
before proper logouts - like when logging in to LUNs manually, without
logging out on server shutdown, or when automated scripts can't
umount/logout from logged LUNs - kernel will hang forever on its
sd_sync_cache() logic, after issuing the SYNCHRONIZE_CACHE cmd to all
still existent paths.

PID: 1 TASK: ffff8801a69b8000 CPU: 1 COMMAND: "systemd-shutdow"
 #0 [ffff8801a69c3a30] __schedule at ffffffff8183e9ee
 #1 [ffff8801a69c3a80] schedule at ffffffff8183f0d5
 #2 [ffff8801a69c3a98] schedule_timeout at ffffffff81842199
 #3 [ffff8801a69c3b40] io_schedule_timeout at ffffffff8183e604
 #4 [ffff8801a69c3b70] wait_for_completion_io_timeout at ffffffff8183fc6c
 #5 [ffff8801a69c3bd0] blk_execute_rq at ffffffff813cfe10
 #6 [ffff8801a69c3c88] scsi_execute at ffffffff815c3fc7
 #7 [ffff8801a69c3cc8] scsi_execute_req_flags at ffffffff815c60fe
 #8 [ffff8801a69c3d30] sd_sync_cache at ffffffff815d37d7
 #9 [ffff8801a69c3da8] sd_shutdown at ffffffff815d3c3c

This happens because iscsi_eh_cmd_timed_out(), the transport layer
timeout helper, would tell the queue timeout function (scsi_times_out)
to reset the request timer over and over, until the session state is
back to logged in state. Unfortunately, during server shutdown, this
might never happen again.

Other option would be "not to handle" the issue in the transport
layer. That would trigger the error handler logic, which would also need
the session state to be logged in again.

Best option, for such case, is to tell upper layers that the command was
handled during the transport layer error handler helper, marking it as
DID_NO_CONNECT, which will allow completion and inform about the
problem.

After the session was marked as ISCSI_STATE_FAILED, due to the first
timeout during the server shutdown phase, all subsequent cmds will fail
to be queued, allowing upper logic to fail faster.

Signed-off-by: Rafael David Tinoco <rafael.tinoco@canonical.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit d754941225a7dbc61f6dd2173fa9498049f9a7ee linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Start new release
Seth Forshee [Tue, 23 Jan 2018 16:41:16 +0000 (10:41 -0600)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Ubuntu-4.15.0-5.6
Seth Forshee [Mon, 22 Jan 2018 16:16:19 +0000 (10:16 -0600)]
UBUNTU: Ubuntu-4.15.0-5.6

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Rebase to v4.15-rc9
Seth Forshee [Mon, 22 Jan 2018 15:56:21 +0000 (09:56 -0600)]
UBUNTU: Rebase to v4.15-rc9

Note that updateconfigs deselected a number of B43/B44/SSB config
options due to a new dependency on
CONFIG_PCI_DRIVERS_LEGACY,PCI_DRIVERS_LEGACY, which is only
selectable for the mips architecture.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: enable hio build
Seth Forshee [Fri, 19 Jan 2018 18:08:44 +0000 (12:08 -0600)]
UBUNTU: enable hio build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: hio: updates for timer api changes in 4.15
Seth Forshee [Fri, 19 Jan 2018 20:32:35 +0000 (14:32 -0600)]
UBUNTU: hio: updates for timer api changes in 4.15

init_timer() is gone, and the timer callback prototype has
changed. For 4.15 onward use timer_setup() and new callback
prototype data accessor.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: ubuntu: vbox -- update to 5.2.6-dfsg-2
Seth Forshee [Fri, 19 Jan 2018 17:43:21 +0000 (11:43 -0600)]
UBUNTU: ubuntu: vbox -- update to 5.2.6-dfsg-2

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Debian] pass LOCAL_ENV_CC and LOCAL_ENV_DISTCC_HOSTS properly
Wen-chien Jesse Sung [Thu, 18 Jan 2018 14:20:58 +0000 (22:20 +0800)]
UBUNTU: [Debian] pass LOCAL_ENV_CC and LOCAL_ENV_DISTCC_HOSTS properly

BugLink: https://launchpad.net/bugs/1744077
Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [d-i] Add qede to nic-modules udeb
dann frazier [Tue, 16 Jan 2018 20:36:39 +0000 (13:36 -0700)]
UBUNTU: [d-i] Add qede to nic-modules udeb

BugLink: https://bugs.launchpad.net/bugs/1743638
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: drm/amdgpu: add atpx quirk handling (v2)
Alex Deucher [Tue, 16 Jan 2018 10:48:35 +0000 (12:48 +0200)]
UBUNTU: SAUCE: drm/amdgpu: add atpx quirk handling (v2)

BugLink: https://launchpad.net/bugs/1742759
Add quirks for handling PX/HG systems.  In this case, add
a quirk for a weston dGPU that only seems to properly power
down using ATPX power control rather than HG (_PR3).

v2: append a new weston XT

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> (v2)
Reviewed-and-Tested-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: Revert "scsi: libsas: allow async aborts"
Seth Forshee [Fri, 19 Jan 2018 15:21:13 +0000 (09:21 -0600)]
UBUNTU: SAUCE: Revert "scsi: libsas: allow async aborts"

BugLink: http://bugs.launchpad.net/bugs/1726519
This reverts commit 909657615d9b3ce709be4fd95b9a9e8c8c7c2be6.

Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: ubuntu: vbox: build fixes for 4.15
Larry Finger [Thu, 7 Dec 2017 22:44:10 +0000 (16:44 -0600)]
UBUNTU: ubuntu: vbox: build fixes for 4.15

This patch file makes the necessary changes to the VirtualBox 5.1.30 sources
to allow the kernel modules to build with kernel 4.15.

The API changes are of several types:

1. The timer initialization routine init_timer_pinned() no longer exists, and
   is replaced by timer_setup().
2. The timer callback routine calling sequence is changed as is the technique
   for getting the timer information from the callback parameters.
3. The calling sequence for drm_encoder_find() is changed.
4. The calling sequence for the .get and .set members of the module_param_call()
   calls have changed.

This patch is released under the MIT license when appropriate, GPLv2 otherwise.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
[ saf: The timer-related changes seem to have been applied upstream but
  not those for the module parameter callbacks; adjusted to only apply
  these changes. ]
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: ubuntu: vbox -- update to 5.2.6-dfsg-1
Seth Forshee [Tue, 16 Jan 2018 14:52:56 +0000 (08:52 -0600)]
UBUNTU: ubuntu: vbox -- update to 5.2.6-dfsg-1

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] CONFIG_SERIAL_DEV_BUS=y, CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
Seth Forshee [Tue, 16 Jan 2018 15:10:50 +0000 (09:10 -0600)]
UBUNTU: [Config] CONFIG_SERIAL_DEV_BUS=y, CONFIG_SERIAL_DEV_CTRL_TTYPORT=y

BugLink: http://bugs.launchpad.net/bugs/1739939
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: Import aufs driver
Seth Forshee [Tue, 16 Jan 2018 14:47:14 +0000 (08:47 -0600)]
UBUNTU: SAUCE: Import aufs driver

Import aufs4.x-rcN 20171218 from https://github.com/sfjro/aufs4-standalone
commit 8b9c1be851f351af1104f55952e211ae541695ee.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoRevert "UBUNTU: SAUCE: Import aufs driver"
Seth Forshee [Tue, 16 Jan 2018 14:46:01 +0000 (08:46 -0600)]
Revert "UBUNTU: SAUCE: Import aufs driver"

Remove aufs to import a newer version.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] Update annotations following config review
Seth Forshee [Mon, 15 Jan 2018 17:03:37 +0000 (11:03 -0600)]
UBUNTU: [Config] Update annotations following config review

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] CONFIG_CPU_ISOLATION=y
Seth Forshee [Mon, 15 Jan 2018 16:02:57 +0000 (10:02 -0600)]
UBUNTU: [Config] CONFIG_CPU_ISOLATION=y

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Rebase to v4.15-rc7
Seth Forshee [Mon, 15 Jan 2018 13:54:09 +0000 (07:54 -0600)]
UBUNTU: Rebase to v4.15-rc7

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Start new release
Seth Forshee [Mon, 15 Jan 2018 13:52:46 +0000 (07:52 -0600)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Ubuntu-4.15.0-4.5
Seth Forshee [Wed, 10 Jan 2018 16:24:36 +0000 (10:24 -0600)]
UBUNTU: Ubuntu-4.15.0-4.5

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Debian] autoreconstruct - add resoration of execute permissions
Seth Forshee [Thu, 4 Jan 2018 20:41:30 +0000 (14:41 -0600)]
UBUNTU: [Debian] autoreconstruct - add resoration of execute permissions

Debian source package diffs cannot represent that a file should
be executable. This is a problem for us if a patch adds a script
which is invoked directly during the build, as happened with a
recent stable update for 4.14. Update gen-auto-reconstruct to
detect this situation and restore the execute permissions in the
reconstruct script. Exclude the debian packaging directories as
the scripts here already account for the loss of execute
permissions.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Rebase to v4.15-rc4
Seth Forshee [Mon, 8 Jan 2018 00:03:29 +0000 (18:03 -0600)]
UBUNTU: Rebase to v4.15-rc4

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: Bluetooth: btusb: Add support for 0cf3:e010
AceLan Kao [Fri, 5 Jan 2018 02:30:49 +0000 (10:30 +0800)]
UBUNTU: SAUCE: Bluetooth: btusb: Add support for 0cf3:e010

BugLink: https://bugs.launchpad.net/bugs/1741166
Device 0cf3:e010 is one of the QCA ROME family.

T:  Bus=01 Lev=01 Prnt=01 Port=13 Cnt=03 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0cf3 ProdID=e010 Rev=00.01
C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb

patchwork: https://patchwork.kernel.org/patch/10139897/
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Acked-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Acked-By: Shrirang Bagul <shrirang.bagul@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: drm/i915: Disable writing of TMDS_OE on Lenovo ThinkPad X1 series
Aaron Ma [Sat, 16 Dec 2017 09:00:55 +0000 (17:00 +0800)]
UBUNTU: SAUCE: drm/i915: Disable writing of TMDS_OE on Lenovo ThinkPad X1 series

BugLink: https://bugs.launchpad.net/bugs/1738523
There is a hw design on Lenovo ThinkPad X1 yoga/carbon:
Intel GEN9 display -> AlpineRidge -> PS8407 -> HDMI output

When switch mode on this HDMI output, it failed to writing on
I2C device 0x40/0x50. Then sometimes the HDMI output is disabled.

From Parade's support, tmds_oe is enabled by default, and keep it
enabled to fix this issue.

Add a workaround to bypass this TMDS_OE writing on identified
laptop models.

Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Acked-By: Wen-chien Jesse Sung <jesse.sung@canonical.com>
Acked-By: AceLan Kao <acelan.kao@canonical.com>
[ saf: Fix trivial conflict with 4.15 ]
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Conflicts:
drivers/gpu/drm/i915/intel_bios.c

6 years agoUBUNTU: Start new release
Seth Forshee [Fri, 5 Jan 2018 15:36:30 +0000 (09:36 -0600)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Ubuntu-4.15.0-3.4
Seth Forshee [Thu, 4 Jan 2018 02:21:38 +0000 (20:21 -0600)]
UBUNTU: Ubuntu-4.15.0-3.4

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Rebase to v4.15-rc6
Seth Forshee [Thu, 4 Jan 2018 02:19:40 +0000 (20:19 -0600)]
UBUNTU: Rebase to v4.15-rc6

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [debian] use SRCPKGNAME in linux-headers Depends
Kamal Mostafa [Wed, 20 Dec 2017 22:44:59 +0000 (14:44 -0800)]
UBUNTU: [debian] use SRCPKGNAME in linux-headers Depends

Use the SRCPKGNAME macro instead of hardcoded "linux" in the Depends for
linux-headers-PKGVER-ABINUM-FLAVOUR, to provide the correct package name
for derivative kernels with a different SRCPKGNAME.

Ignore: yes

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Khaled Elmously <khalid.elmously@canonical.com>
Acked-by: Acked-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: make sure ubuntu/xr-usb-serial builds for x86
Wen-chien Jesse Sung [Mon, 20 Nov 2017 08:14:17 +0000 (16:14 +0800)]
UBUNTU: SAUCE: make sure ubuntu/xr-usb-serial builds for x86

BugLink: https://launchpad.net/bugs/1733281
The ubuntu/xr-usb-serial is expected to be built for i386 and x86_64,
and in ubuntu/Makefile it says:

ifneq ($(filter $(ARCH), i386 x86_64),)
obj-y += xr-usb-serial/
endif

Since ARCH is x86 for both i386 and x86_64, this condition will never be
true thus the module will never get a chance to be built.

Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Start new release
Seth Forshee [Wed, 3 Jan 2018 17:24:50 +0000 (11:24 -0600)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Ubuntu-4.15.0-2.3
Seth Forshee [Mon, 18 Dec 2017 15:27:28 +0000 (09:27 -0600)]
UBUNTU: Ubuntu-4.15.0-2.3

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Rebase to v4.15-rc4
Seth Forshee [Mon, 18 Dec 2017 15:15:27 +0000 (09:15 -0600)]
UBUNTU: Rebase to v4.15-rc4

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] CONFIG_SPI_INTEL_SPI_*=n
Seth Forshee [Sat, 16 Dec 2017 06:33:36 +0000 (00:33 -0600)]
UBUNTU: [Config] CONFIG_SPI_INTEL_SPI_*=n

BugLink: http://bugs.launchpad.net/bugs/1734147
Many Lenovo users are ending up with corrupted bios, and
guidance from Intel is that (for now at least) these options
should be disabled. Seems the driver was never really meant for
end users anyway.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Debian] add icp to zfs-modules.ignore
Seth Forshee [Sat, 16 Dec 2017 04:47:40 +0000 (22:47 -0600)]
UBUNTU: [Debian] add icp to zfs-modules.ignore

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] Include ibmvnic in nic-modules
Seth Forshee [Fri, 15 Dec 2017 15:15:16 +0000 (09:15 -0600)]
UBUNTU: [Config] Include ibmvnic in nic-modules

BugLink: http://bugs.launchpad.net/bugs/1521712
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [debian] prep linux-libc-dev only if do_libc_dev_package=true
Kamal Mostafa [Wed, 13 Dec 2017 19:44:25 +0000 (11:44 -0800)]
UBUNTU: [debian] prep linux-libc-dev only if do_libc_dev_package=true

Required for do_libc_dev_package=false to not break the build.

Ignore: yes

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [debian] do not force do_tools_common
Kamal Mostafa [Wed, 13 Dec 2017 19:43:15 +0000 (11:43 -0800)]
UBUNTU: [debian] do not force do_tools_common

Ignore: yes

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [debian] support for ship_extras_package=false
Kamal Mostafa [Wed, 13 Dec 2017 19:43:14 +0000 (11:43 -0800)]
UBUNTU: [debian] support for ship_extras_package=false

If optional .mk variable 'ship_extras_package' is explicitly set to false,
then do not construct the linux-image-extra package; instead just log all
of the "extra" modules which were pointlessly built yet won't be shipped.
This feature may be useful for config debugging and for custom kernel
development.

Ignore: yes

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Enable zfs build
Seth Forshee [Wed, 13 Dec 2017 15:05:06 +0000 (09:05 -0600)]
UBUNTU: Enable zfs build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (noup) Update spl with 4.15 compat fix (LP:#1737761)
Colin Ian King [Tue, 12 Dec 2017 14:59:44 +0000 (14:59 +0000)]
UBUNTU: SAUCE: (noup) Update spl with 4.15 compat fix (LP:#1737761)

Add a 4.15 spl compat fix to detect and use timer_setup instead of the deprecated
init_timer.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] Enable support for emulation of deprecated ARMv8 instructions
Seth Forshee [Wed, 13 Dec 2017 13:18:36 +0000 (07:18 -0600)]
UBUNTU: [Config] Enable support for emulation of deprecated ARMv8 instructions

BugLink: http://bugs.launchpad.net/bugs/1545542
Some binaries used in the Launchpad build farms need this
emulation, so enable the relevant config options and enforce the
values in the annotations file.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Start new release
Seth Forshee [Mon, 18 Dec 2017 15:11:27 +0000 (09:11 -0600)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Ubuntu-4.15.0-1.2
Seth Forshee [Mon, 11 Dec 2017 04:08:23 +0000 (22:08 -0600)]
UBUNTU: Ubuntu-4.15.0-1.2

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Rebase to v4.15-rc3
Seth Forshee [Mon, 11 Dec 2017 03:42:31 +0000 (21:42 -0600)]
UBUNTU: Rebase to v4.15-rc3

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] CONFIG_UNWINDER_FRAME_POINTER=y for amd64
Seth Forshee [Sun, 10 Dec 2017 04:08:25 +0000 (22:08 -0600)]
UBUNTU: [Config] CONFIG_UNWINDER_FRAME_POINTER=y for amd64

During the rebase to 4.15 UNWINDER_ORC was chosen as the stack
unwinder as it promises a 5-10% performance improvement over
using UNWINDER_FRAME_POINTER. However it turns out to have a
couple of downsides. It adds a new requierment for building dkms
modules, and it does not produce the reliable stack traces
required for livepatch. Switch back to UNWINDER_FRAME_POINTER.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Packaging] disable zfs module checks when zfs is disabled
Andy Whitcroft [Fri, 8 Dec 2017 14:01:22 +0000 (14:01 +0000)]
UBUNTU: [Packaging] disable zfs module checks when zfs is disabled

We currently disable the zfs module changes when we disable zfs
builds as part of cross-compilation.  We should disable the zfs
module checks whenever zfs itself is disabled.

Pull the zfs module disablement support such that it is always
present.

BugLink: http://bugs.launchpad.net/bugs/1737176
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Acked-by: Colin Ian King <colin.king@canonical.com>
[ saf: fix invalid syntax ]
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Start new release
Seth Forshee [Fri, 8 Dec 2017 21:49:58 +0000 (15:49 -0600)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Ubuntu-4.15.0-0.1
Seth Forshee [Fri, 8 Dec 2017 19:55:56 +0000 (13:55 -0600)]
UBUNTU: Ubuntu-4.15.0-0.1

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] Enable AUFS config options
Seth Forshee [Fri, 8 Dec 2017 19:42:58 +0000 (13:42 -0600)]
UBUNTU: [Config] Enable AUFS config options

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: Import aufs driver
Seth Forshee [Fri, 8 Dec 2017 19:44:08 +0000 (13:44 -0600)]
UBUNTU: SAUCE: Import aufs driver

Import aufs4.x-rcN 20171204 from https://github.com/sfjro/aufs4-standalone
commit 0a9e7ce73b0ac93a7b2f382a954a3e51870a3ec0.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Disable zfs build
Seth Forshee [Tue, 19 Sep 2017 22:11:35 +0000 (17:11 -0500)]
UBUNTU: Disable zfs build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: [Config] Update kernel lockdown options to fix build errors
Seth Forshee [Fri, 8 Dec 2017 15:18:33 +0000 (09:18 -0600)]
UBUNTU: [Config] Update kernel lockdown options to fix build errors

While the options are available for non-x86 architectures, they
don't actually build there becuase LOCKDOWN_LIFT_KEY is only
defined for x86. Disable lock down options on all other arches so
they will build.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: disable hio build
Seth Forshee [Fri, 8 Dec 2017 14:28:30 +0000 (08:28 -0600)]
UBUNTU: disable hio build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: ubuntu: vbox: build fixes for 4.15
Larry Finger [Thu, 7 Dec 2017 22:44:10 +0000 (16:44 -0600)]
UBUNTU: ubuntu: vbox: build fixes for 4.15

This patch file makes the necessary changes to the VirtualBox 5.1.30 sources
to allow the kernel modules to build with kernel 4.15.

The API changes are of several types:

1. The timer initialization routine init_timer_pinned() no longer exists, and
   is replaced by timer_setup().
2. The timer callback routine calling sequence is changed as is the technique
   for getting the timer information from the callback parameters.
3. The calling sequence for drm_encoder_find() is changed.
4. The calling sequence for the .get and .set members of the module_param_call()
   calls have changed.

This patch is released under the MIT license when appropriate, GPLv2 otherwise.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: ubuntu: vbox -- update to 5.2.2-dfsg-2
Seth Forshee [Thu, 7 Dec 2017 22:32:32 +0000 (16:32 -0600)]
UBUNTU: ubuntu: vbox -- update to 5.2.2-dfsg-2

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Rebase to v4.15-rc2
Seth Forshee [Fri, 8 Dec 2017 14:06:01 +0000 (08:06 -0600)]
UBUNTU: Rebase to v4.15-rc2

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Start new release
Seth Forshee [Thu, 7 Dec 2017 22:10:35 +0000 (16:10 -0600)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: Ubuntu-4.14.0-11.13
Tim Gardner [Thu, 24 Jul 2014 13:28:11 +0000 (07:28 -0600)]
UBUNTU: Ubuntu-4.14.0-11.13

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) efi: Don't print secure boot state from the efi stub
Seth Forshee [Fri, 2 Jun 2017 18:45:22 +0000 (13:45 -0500)]
UBUNTU: SAUCE: (efi-lockdown) efi: Don't print secure boot state from the efi stub

During boot the efi stub prints what amounts to debugging
messages about the secure boot state to the efi console. which
appear on the screen during boot. The same information is printed
in dmesg while the kernel is booting, so they serve no purpose
aside from debugging issues in the efi stub. Remove them.

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

(cherry picked from commit 264bce0892ec5008a9a2955da53b3d427fccd05a
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) MODSIGN: Allow the "db" UEFI variable to be suppressed
Josh Boyer [Fri, 5 May 2017 07:21:59 +0000 (08:21 +0100)]
UBUNTU: SAUCE: (efi-lockdown) MODSIGN: Allow the "db" UEFI variable to be suppressed

If a user tells shim to not use the certs/hashes in the UEFI db variable
for verification purposes, shim will set a UEFI variable called
MokIgnoreDB.  Have the uefi import code look for this and ignore the db
variable if it is found.

Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit 9c38c1c996b55d5332a7e528a26ce3e58a095493
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) MODSIGN: Import certificates from UEFI Secure Boot
Josh Boyer [Fri, 5 May 2017 07:21:59 +0000 (08:21 +0100)]
UBUNTU: SAUCE: (efi-lockdown) MODSIGN: Import certificates from UEFI Secure Boot

Secure Boot stores a list of allowed certificates in the 'db' variable.
This imports those certificates into the system trusted keyring.  This
allows for a third party signing certificate to be used in conjunction
with signed modules.  By importing the public certificate into the 'db'
variable, a user can allow a module signed with that certificate to
load.  The shim UEFI bootloader has a similar certificate list stored
in the 'MokListRT' variable.  We import those as well.

Secure Boot also maintains a list of disallowed certificates in the 'dbx'
variable.  We load those certificates into the newly introduced system
blacklist keyring and forbid any module signed with those from loading and
forbid the use within the kernel of any key with a matching hash.

This facility is enabled by setting CONFIG_LOAD_UEFI_KEYS.

Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit e0047875ca55cb28ea36ad179af21add4495d88e
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) efi: Add an EFI signature blob parser
Dave Howells [Fri, 5 May 2017 07:21:58 +0000 (08:21 +0100)]
UBUNTU: SAUCE: (efi-lockdown) efi: Add an EFI signature blob parser

Add a function to parse an EFI signature blob looking for elements of
interest.  A list is made up of a series of sublists, where all the
elements in a sublist are of the same type, but sublists can be of
different types.

For each sublist encountered, the function pointed to by the
get_handler_for_guid argument is called with the type specifier GUID and
returns either a pointer to a function to handle elements of that type or
NULL if the type is not of interest.

If the sublist is of interest, each element is passed to the handler
function in turn.

Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit a0edbe5bff0d82e1495fde162bf36b51e0f56028
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) efi: Add EFI signature data types
Dave Howells [Fri, 5 May 2017 07:21:58 +0000 (08:21 +0100)]
UBUNTU: SAUCE: (efi-lockdown) efi: Add EFI signature data types

Add the data types that are used for containing hashes, keys and
certificates for cryptographic verification along with their corresponding
type GUIDs.

Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit cf8a2070ce1ab1ed8578a537af141ca0073b46e0
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) KEYS: Allow unrestricted boot-time addition of keys...
David Howells [Fri, 5 May 2017 07:21:56 +0000 (08:21 +0100)]
UBUNTU: SAUCE: (efi-lockdown) KEYS: Allow unrestricted boot-time addition of keys to secondary keyring

Allow keys to be added to the system secondary certificates keyring during
kernel initialisation in an unrestricted fashion.  Such keys are implicitly
trusted and don't have their trust chains checked on link.

This allows keys in the UEFI database to be added in secure boot mode for
the purposes of module signing.

Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit 9ad18fe5e96752b7e39d9e7cc9be7a4aa81630b0
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) efi: Lock down the kernel if booted in secure boot...
David Howells [Thu, 19 Oct 2017 13:05:02 +0000 (14:05 +0100)]
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 38fe03c2891718e53db9d51f414fef96055dacad
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) efi: Add an EFI_SECURE_BOOT flag to indicate secure...
David Howells [Thu, 19 Oct 2017 13:18:53 +0000 (14:18 +0100)]
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
(cherry picked from commit 4d94d64ba9e602db4f552e95631fe2b224e6bb67
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) Lock down /proc/kcore
David Howells [Thu, 19 Oct 2017 12:58:19 +0000 (13:58 +0100)]
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>
(cherry picked from commit 469b1a6094633f0dce4d47a9f0efa851d6d924a6
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) debugfs: Disallow use of debugfs files when the kernel...
David Howells [Wed, 18 Oct 2017 16:28:02 +0000 (17:28 +0100)]
UBUNTU: SAUCE: (efi-lockdown) debugfs: Disallow use of debugfs files when the kernel is locked down

Disallow opening of debugfs files when the kernel is locked down as various
drivers give raw access to hardware through debugfs.

Accesses to tracefs should use /sys/kernel/tracing/ rather than
/sys/kernel/debug/tracing/.  Possibly a symlink should be emplaced.

Normal device interaction should be done through configfs 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.

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 <matthew.garrett@nebula.com>
cc: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit 125da2e1c5d0a6aca5faafba336c8e8506a4e000
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) x86/mmiotrace: Lock down the testmmiotrace module
David Howells [Wed, 24 May 2017 13:56:07 +0000 (14:56 +0100)]
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
(cherry picked from commit 64ce4fc1ef16d4dd818eca47701f803e58444ab2
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) Lock down module params that specify hardware parameter...
David Howells [Wed, 24 May 2017 13:56:06 +0000 (14:56 +0100)]
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>
(cherry picked from commit 33a38c67ed53106458e1858a2101cae3026486e4
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) Lock down TIOCSSERIAL
David Howells [Wed, 24 May 2017 13:56:06 +0000 (14:56 +0100)]
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>
(cherry picked from commit 8d8c1da752c5ea837f1dbe06fa21d4ca891fcd83
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) Prohibit PCMCIA CIS storage when the kernel is locked...
David Howells [Wed, 24 May 2017 13:56:06 +0000 (14:56 +0100)]
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
(cherry picked from commit c5fe6d4762b16204e218f5299d232b9953c4caaa
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) scsi: Lock down the eata driver
David Howells [Wed, 24 May 2017 13:56:06 +0000 (14:56 +0100)]
UBUNTU: SAUCE: (efi-lockdown) scsi: Lock down the eata driver

When the kernel is running in secure boot mode, we lock down the kernel to
prevent userspace from modifying the running kernel image.  Whilst this
includes prohibiting access to things like /dev/mem, it must also prevent
access by means of configuring driver modules in such a way as to cause a
device to access or modify the kernel image.

The eata driver takes a single string parameter that contains a slew of
settings, including hardware resource configuration.  Prohibit use of the
parameter if the kernel is locked down.

Suggested-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Dario Ballabio <ballabio_dario@emc.com>
cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
cc: "Martin K. Petersen" <martin.petersen@oracle.com>
cc: linux-scsi@vger.kernel.org
(cherry picked from commit b6435a0bf222a5ad7b5071be950505b0ef2d622b
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) acpi: Disable APEI error injection if the kernel is...
Linn Crosetto [Wed, 24 May 2017 13:56:05 +0000 (14:56 +0100)]
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>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
cc: linux-acpi@vger.kernel.org
(cherry picked from commit 6b13c1b1c2fcd969b67fbbb1ad338e61ec7e184e
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) acpi: Disable ACPI table override if the kernel is...
Linn Crosetto [Wed, 24 May 2017 13:56:05 +0000 (14:56 +0100)]
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>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
cc: linux-acpi@vger.kernel.org
(cherry picked from commit dd6efccc38c5e28c8f588f8ac576395633313aa3
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) acpi: Ignore acpi_rsdp kernel param when the kernel...
Josh Boyer [Wed, 24 May 2017 13:56:05 +0000 (14:56 +0100)]
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>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
cc: Dave Young <dyoung@redhat.com>
cc: linux-acpi@vger.kernel.org
(cherry picked from commit 54929ddfc652ac9c9c0daecc4bfb00df82ca5b20
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) ACPI: Limit access to custom_method when the kernel...
Matthew Garrett [Wed, 24 May 2017 13:56:04 +0000 (14:56 +0100)]
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 <matthew.garrett@nebula.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
cc: linux-acpi@vger.kernel.org
(cherry picked from commit d42e85dad43a09adc2d0109bea444ddb58bacf38
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) asus-wmi: Restrict debugfs interface when the kernel...
Matthew Garrett [Wed, 24 May 2017 13:56:04 +0000 (14:56 +0100)]
UBUNTU: SAUCE: (efi-lockdown) asus-wmi: Restrict debugfs interface when the kernel is locked down

We have no way of validating what all of the Asus WMI methods do on a given
machine - and there's a risk that some will allow hardware state to be
manipulated in such a way that arbitrary code can be executed in the
kernel, circumventing module loading restrictions.  Prevent that if the
kernel is locked down.

Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
cc: acpi4asus-user@lists.sourceforge.net
cc: platform-driver-x86@vger.kernel.org
(cherry picked from commit fb4033e731796fe16c334810eb5a0b5e2fb23913
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) x86/msr: Restrict MSR access when the kernel is locked...
Matthew Garrett [Wed, 24 May 2017 13:56:04 +0000 (14:56 +0100)]
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 <matthew.garrett@nebula.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
cc: x86@kernel.org
(cherry picked from commit 1ac328ac66d7ae815dc3b0b531a8959a88005f6d
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) x86: Lock down IO port access when the kernel is locked...
Matthew Garrett [Wed, 24 May 2017 13:56:04 +0000 (14:56 +0100)]
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 <matthew.garrett@nebula.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
cc: x86@kernel.org
(cherry picked from commit b1e4bf3ccfea06ae8b1b7f6a8875c241ba68fe43
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) PCI: Lock down BAR access when the kernel is locked...
Matthew Garrett [Wed, 24 May 2017 13:56:03 +0000 (14:56 +0100)]
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 <matthew.garrett@nebula.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
cc: linux-pci@vger.kernel.org
(cherry picked from commit 6999b2411874e2703d2e1bbec9ea42209699a984
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) uswsusp: Disable when the kernel is locked down
Matthew Garrett [Wed, 24 May 2017 13:56:03 +0000 (14:56 +0100)]
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: "Lee, Chun-Yi" <jlee@suse.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
cc: linux-pm@vger.kernel.org
(cherry picked from commit fc55d45a5b3c80d7a751de9650865113293518eb
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) hibernate: Disable when the kernel is locked down
Josh Boyer [Wed, 24 May 2017 13:56:03 +0000 (14:56 +0100)]
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>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
cc: linux-pm@vger.kernel.org
(cherry picked from commit f236f15bb00634ca390c2436f0157a0aa5033e09
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) kexec_file: Disable at runtime if the kernel is locked...
Chun-Yi Lee [Wed, 24 May 2017 13:56:03 +0000 (14:56 +0100)]
UBUNTU: SAUCE: (efi-lockdown) kexec_file: Disable at runtime if the kernel is locked down

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

This code was showed in Matthew's patch but not in git:
https://lkml.org/lkml/2015/3/13/778

Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Chun-Yi Lee <jlee@suse.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
cc: kexec@lists.infradead.org
(cherry picked from commit 6620737c201ed7242dbb672803085b46ae600ce7
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) Copy secure_boot flag in boot params across kexec reboot
Dave Young [Wed, 24 May 2017 13:56:02 +0000 (14:56 +0100)]
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>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
cc: kexec@lists.infradead.org
(cherry picked from commit 046143c089ab19140e210794323944dc46b92a72
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) kexec: Disable at runtime if the kernel is locked down
Matthew Garrett [Wed, 24 May 2017 13:56:02 +0000 (14:56 +0100)]
UBUNTU: SAUCE: (efi-lockdown) kexec: Disable at runtime if the kernel is locked down

kexec 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 in this situation.

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

Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
cc: kexec@lists.infradead.org
(cherry picked from commit 9a7ef0aead9519d42e351d10e0c6f7b8d3bebdb1
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) Restrict /dev/{mem,kmem,port} when the kernel is locked...
Matthew Garrett [Wed, 24 May 2017 13:56:02 +0000 (14:56 +0100)]
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 <matthew.garrett@nebula.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
(cherry picked from commit 2eada4c7af2d4e9522a47523d2a5106d96271cd9
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) Enforce module signatures if the kernel is locked down
David Howells [Wed, 24 May 2017 13:56:01 +0000 (14:56 +0100)]
UBUNTU: SAUCE: (efi-lockdown) Enforce module signatures if the kernel is locked down

If the kernel is locked down, require that all modules have valid
signatures that we can verify.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
(cherry picked from commit b16697f5f6c488ad2e55b02db38e9ef0c3172dbe
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
6 years agoUBUNTU: SAUCE: (efi-lockdown) Add a SysRq option to lift kernel lockdown
Kyle McMartin [Wed, 18 Oct 2017 13:02:25 +0000 (14:02 +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_64 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.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: x86@kernel.org
(cherry picked from commit fa917ff842651e0455d6dab2868e5a08785babf3
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>