]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/log
mirror_ubuntu-jammy-kernel.git
2 years agoUBUNTU: [Packaging] Add support for ODM drivers
Stefan Bader [Fri, 11 Jun 2021 10:01:28 +0000 (18:01 +0800)]
UBUNTU: [Packaging] Add support for ODM drivers

BugLink: https://bugs.launchpad.net/bugs/1912789
We want to be able to selectively turn on ODM driver support for those
kernels/arches we have to but otherwise not inherit this to other
derivatives. This is done by a new config option which we will have to
depend on in the new drivers config options. Support is toggled by
changing a makefile rule variable. The new config option will be hidden
as long as not at least one of the arches supported turns on the rule
variable.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
(cherry picked from commit 4aeffc246531a666c1fad1925ebf1a6e68a704e4
focal)
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: ODM: mfd: Add support for IO functions of AAEON devices
Kunyang_Fan [Wed, 16 Jun 2021 05:56:58 +0000 (13:56 +0800)]
UBUNTU: ODM: mfd: Add support for IO functions of AAEON devices

BugLink: https://bugs.launchpad.net/bugs/1929504
This adds the supports for multiple IO functions of the
AAEON x86 devices and makes use of the WMI interface to
control the these IO devices including:

- GPIO
- LED
- Watchdog
- HWMON

It also adds the mfd child device drivers to support
the above IO functions.

Signed-off-by: Kunyang_Fan <kunyang_fan@asus.com>
Review-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Review-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: ODM: gpio: add driver for AAEON devices
Kunyang_Fan [Wed, 16 Jun 2021 05:56:59 +0000 (13:56 +0800)]
UBUNTU: ODM: gpio: add driver for AAEON devices

BugLink: https://bugs.launchpad.net/bugs/1929504
This patch add support for the GPIO pins whose control are
transported to BIOS through ASUS WMI interface.

Signed-off-by: Kunyang_Fan <kunyang_fan@asus.com>
Review-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Review-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: ODM: watchdog: add driver for AAEON devices
Kunyang_Fan [Wed, 16 Jun 2021 05:57:00 +0000 (13:57 +0800)]
UBUNTU: ODM: watchdog: add driver for AAEON devices

BugLink: https://bugs.launchpad.net/bugs/1929504
This patch adds support for the watchdog whose control are
transported to BIOS through ASUS WMI interface.

This driver imitates the old type SIO watchdog driver to
provide the basic control for watchdog functions.

Signed-off-by: Kunyang_Fan <kunyang_fan@asus.com>
Review-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Review-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: ODM: leds: add driver for AAEON devices
Kunyang_Fan [Wed, 16 Jun 2021 05:57:02 +0000 (13:57 +0800)]
UBUNTU: ODM: leds: add driver for AAEON devices

BugLink: https://bugs.launchpad.net/bugs/1929504
This patch adds support for the led devices which can
be controlled from sysfs through ASUS WMI interface.

Signed-off-by: Kunyang_Fan <kunyang_fan@asus.com>
Review-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Review-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: ODM: hwmon: add driver for AAEON devices
Kunyang_Fan [Wed, 16 Jun 2021 05:57:01 +0000 (13:57 +0800)]
UBUNTU: ODM: hwmon: add driver for AAEON devices

BugLink: https://bugs.launchpad.net/bugs/1929504
This refator patch adds support for the hwmon information
which are transported to userspace through ASUS WMI interface.

Signed-off-by: Kunyang_Fan <kunyang_fan@asus.com>
Review-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Review-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: ODM: [Config] update config for AAEON devices
Chia-Lin Kao (AceLan) [Wed, 16 Jun 2021 05:57:03 +0000 (13:57 +0800)]
UBUNTU: ODM: [Config] update config for AAEON devices

BugLink: https://bugs.launchpad.net/bugs/1929504
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Packaging]: Add kernel command line condition to hv-kvp-daemon service
Dimitri John Ledkov [Tue, 15 Jun 2021 22:42:58 +0000 (23:42 +0100)]
UBUNTU: [Packaging]: Add kernel command line condition to hv-kvp-daemon service

linux-cloud-tools-common ships a service for hyper-v hypervisor. It is
known to be prohibited on certain instance types. Add a kernel command
line condition to skip starting this service there.

BugLink: https://bugs.launchpad.net/bugs/1932081
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
cc: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoPCI: Coalesce host bridge contiguous apertures
Kai-Heng Feng [Mon, 7 Jun 2021 16:39:10 +0000 (00:39 +0800)]
PCI: Coalesce host bridge contiguous apertures

BugLink: https://bugs.launchpad.net/bugs/1931147
Built-in graphics on HP EliteDesk 805 G6 doesn't work because graphics
can't get the BAR it needs:

  pci_bus 0000:00: root bus resource [mem 0x10020200000-0x100303fffff window]
  pci_bus 0000:00: root bus resource [mem 0x10030400000-0x100401fffff window]

  pci 0000:00:08.1:   bridge window [mem 0xd2000000-0xd23fffff]
  pci 0000:00:08.1:   bridge window [mem 0x10030000000-0x100401fffff 64bit pref]
  pci 0000:00:08.1: can't claim BAR 15 [mem 0x10030000000-0x100401fffff 64bit pref]: no compatible bridge window
  pci 0000:00:08.1: [mem 0x10030000000-0x100401fffff 64bit pref] clipped to [mem 0x10030000000-0x100303fffff 64bit pref]
  pci 0000:00:08.1:   bridge window [mem 0x10030000000-0x100303fffff 64bit pref]
  pci 0000:07:00.0: can't claim BAR 0 [mem 0x10030000000-0x1003fffffff 64bit pref]: no compatible bridge window
  pci 0000:07:00.0: can't claim BAR 2 [mem 0x10040000000-0x100401fffff 64bit pref]: no compatible bridge window

However, the root bus has two contiguous apertures that can contain the
child resource requested.

Coalesce contiguous apertures so we can allocate from the entire contiguous
region.

[bhelgaas: fold in https://lore.kernel.org/r/20210528170242.1564038-1-kai.heng.feng@canonical.com]
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212013
Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20210401131252.531935-1-kai.heng.feng@canonical.com
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
(cherry picked from commit 65db04053efea3f3e412a7e0cc599962999c96b4 linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: SAUCE: Revert "net/tls(TLS_SW): Add selftest for 'chunked' sendfile test"
Seth Forshee [Thu, 17 Jun 2021 19:48:08 +0000 (14:48 -0500)]
UBUNTU: SAUCE: Revert "net/tls(TLS_SW): Add selftest for 'chunked' sendfile test"

This reverts commit 0e6fbe39bdf71b4e665767bcbf53567a3e6d0623. Based
on the commit message, this commit was added to demonstrate a problem
with sendfile when using ktls, but there's no indication that this
problem has ever been fixed. I'm inquiring about this upstream [1],
but in the mean time let's remove this test as it looks like its
expected to fail.

[1] https://lore.kernel.org/netdev/YMumgy19CXCk5rZD@ubuntu-x1/

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
2 years agoUBUNTU: SAUCE: selftests: seccomp: bump up timeout to 5min
Andrea Righi [Wed, 16 Jun 2021 09:05:12 +0000 (11:05 +0200)]
UBUNTU: SAUCE: selftests: seccomp: bump up timeout to 5min

 DEBUG| [stdout] # selftests: seccomp: seccomp_benchmark
 DEBUG| [stdout] # net.core.bpf_jit_enable = 1
 DEBUG| [stdout] # net.core.bpf_jit_harden = 0
 DEBUG| [stdout] #
 DEBUG| [stdout] not ok 2 selftests: seccomp: seccomp_benchmark # TIMEOUT 120 seconds

This test can easily fail if the testing environment is a bit
overloaded, so bump up the timeout to 5min to prevent false positive
failures.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
2 years agoUBUNTU: Ubuntu-unstable-5.13.0-8.8
Andrea Righi [Tue, 15 Jun 2021 13:07:34 +0000 (15:07 +0200)]
UBUNTU: Ubuntu-unstable-5.13.0-8.8

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Tue, 15 Jun 2021 12:57:18 +0000 (14:57 +0200)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1932018
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Start new release
Andrea Righi [Tue, 15 Jun 2021 12:54:58 +0000 (14:54 +0200)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: update dkms package versions
Andrea Righi [Tue, 15 Jun 2021 12:53:35 +0000 (14:53 +0200)]
UBUNTU: update dkms package versions

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Config] enable signing for ppc64el
Seth Forshee [Mon, 14 Jun 2021 12:22:48 +0000 (07:22 -0500)]
UBUNTU: [Config] enable signing for ppc64el

A bug in 5.13 is preventing IBM from testing secure boot. They will
provide a fix, and we will need to provide a new signed kernel build
for them to test. Thus we must re-enable signing.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
2 years agoUBUNTU: [Config] use ZSTD to compress amd64 kernels
Seth Forshee [Mon, 14 Jun 2021 12:08:19 +0000 (07:08 -0500)]
UBUNTU: [Config] use ZSTD to compress amd64 kernels

BugLink: https://bugs.launchpad.net/bugs/1931725
Testing shows that while LZ4 decompresses faster than ZSTD, ZSTD
compresses much better, and the decreased load time for the smaller
kernel image more than makes up for the slower decompression. Switch
to ZSTD for kernel compression on amd64, which is the only arch which
currently supports it.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
2 years agoUBUNTU: Ubuntu-unstable-5.13.0-7.7
Andrea Righi [Mon, 14 Jun 2021 09:53:08 +0000 (11:53 +0200)]
UBUNTU: Ubuntu-unstable-5.13.0-7.7

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Config] update toolchain versions
Andrea Righi [Mon, 14 Jun 2021 08:36:48 +0000 (10:36 +0200)]
UBUNTU: [Config] update toolchain versions

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Mon, 14 Jun 2021 07:53:00 +0000 (09:53 +0200)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1931840
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Rebase to v5.13-rc6
Andrea Righi [Mon, 14 Jun 2021 07:43:43 +0000 (09:43 +0200)]
UBUNTU: Rebase to v5.13-rc6

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Start new release
Andrea Righi [Mon, 14 Jun 2021 07:42:59 +0000 (09:42 +0200)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: update dkms package versions
Andrea Righi [Mon, 14 Jun 2021 07:38:31 +0000 (09:38 +0200)]
UBUNTU: update dkms package versions

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Packaging] update helper scripts
Andrea Righi [Mon, 14 Jun 2021 07:35:08 +0000 (09:35 +0200)]
UBUNTU: [Packaging] update helper scripts

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Packaging] resync getabis
Andrea Righi [Mon, 14 Jun 2021 07:35:08 +0000 (09:35 +0200)]
UBUNTU: [Packaging] resync getabis

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Config] update annotations after configs review
Andrea Righi [Thu, 10 Jun 2021 08:37:29 +0000 (10:37 +0200)]
UBUNTU: [Config] update annotations after configs review

Also update toolchain version (gcc) in amd64 config.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Config] CONFIG_DEBUG_INFO_COMPRESSED=n
Seth Forshee [Mon, 7 Jun 2021 16:11:39 +0000 (11:11 -0500)]
UBUNTU: [Config] CONFIG_DEBUG_INFO_COMPRESSED=n

BugLink: https://bugs.launchpad.net/bugs/1930713
Now that we've worked around the build size issues, turn this option
off again to reduce size of ddebs.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
2 years agoUBUNTU: [Config] enable signing for s390x
Seth Forshee [Mon, 7 Jun 2021 16:05:50 +0000 (11:05 -0500)]
UBUNTU: [Config] enable signing for s390x

We now have lockdown testing for 5.13 on s390, so we can turn this
back on.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
2 years agoUBUNTU: [Config] remove now unsued do_dkms_nvidia* build variables
Seth Forshee [Tue, 1 Jun 2021 13:29:38 +0000 (08:29 -0500)]
UBUNTU: [Config] remove now unsued do_dkms_nvidia* build variables

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
2 years agoUBUNTU: [Debian] remove nvidia dkms build support
Seth Forshee [Tue, 1 Jun 2021 13:26:19 +0000 (08:26 -0500)]
UBUNTU: [Debian] remove nvidia dkms build support

We no longer need to generate signatures for nvidia modules during our
kernel build, as they are signed using the ubuntu drivers key. Remove
support for building the nvidia modules.

We must still keep the dkms-build--* scripts for now, as our tooling
currently syncs these scripts from the kernel tree into
linux-restricted-modules.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
2 years agoUBUNTU: update dkms package versions
Andrea Righi [Tue, 8 Jun 2021 06:03:44 +0000 (08:03 +0200)]
UBUNTU: update dkms package versions

Manually fix nvidia packages / versions.

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Ubuntu-unstable-5.13.0-6.6
Andrea Righi [Mon, 7 Jun 2021 08:45:13 +0000 (10:45 +0200)]
UBUNTU: Ubuntu-unstable-5.13.0-6.6

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Mon, 7 Jun 2021 07:00:27 +0000 (09:00 +0200)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1931071
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Config] CONFIG_SND_SOC_RT1308 can only be enabled on amd64
Andrea Righi [Mon, 7 Jun 2021 06:32:03 +0000 (08:32 +0200)]
UBUNTU: [Config] CONFIG_SND_SOC_RT1308 can only be enabled on amd64

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Rebase to v5.13-rc5
Andrea Righi [Mon, 7 Jun 2021 05:43:26 +0000 (07:43 +0200)]
UBUNTU: Rebase to v5.13-rc5

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Start new release
Andrea Righi [Mon, 7 Jun 2021 05:42:37 +0000 (07:42 +0200)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Debian] exclude $(DEBIAN)/__abi.current from linux-source
Seth Forshee [Wed, 2 Jun 2021 20:16:14 +0000 (15:16 -0500)]
UBUNTU: [Debian] exclude $(DEBIAN)/__abi.current from linux-source

BugLink: https://bugs.launchpad.net/bugs/1930713
Previously install-source ran before the flavour install, but that is
no longer the case. As a result the __abi.current driectory ends up
in the linux-source package. Explicitly exclude it when installing
files for linux-source.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
2 years agoUBUNTU: [Debian] dkms-build -- use fakeroot if not running as root
Seth Forshee [Tue, 1 Jun 2021 15:36:03 +0000 (10:36 -0500)]
UBUNTU: [Debian] dkms-build -- use fakeroot if not running as root

BugLink: https://bugs.launchpad.net/bugs/1930713
Some dkms builds require running as root, or at least the illusion of
doing so. However we need to do dkms builds before deleting the
flavour build directory in order to sign the modules, and this may
happen without fakeroot. Detect whether or not dkms-build has been
invoked as root, and if not use fakeroot to do the dkms build.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
2 years agoUBUNTU: [Debian] remove dh_testroot from install targets
Seth Forshee [Fri, 21 May 2021 00:50:29 +0000 (19:50 -0500)]
UBUNTU: [Debian] remove dh_testroot from install targets

BugLink: https://bugs.launchpad.net/bugs/1930713
When invoked during the build phase we do not expect to be running as
root or under fakeroot.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
2 years agoUBUNTU: [Debian] run install-$(flavour) targets during build phase
Seth Forshee [Thu, 20 May 2021 21:15:13 +0000 (16:15 -0500)]
UBUNTU: [Debian] run install-$(flavour) targets during build phase

BugLink: https://bugs.launchpad.net/bugs/1930713
Move installation of files from the flavour build directories to the
build phase. This results in cleaning up of one flavour build
directory before starting the build of the next flavour, significantly
reducing the amount of space needed on builders.

Note that this will result in incorrect ownership of files in cases
where the build and binary phases of building packages are run
separately. This will be addressed in a later commit.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
2 years agoUBUNTU: [Debian] use stamps for flavour install targets
Seth Forshee [Thu, 20 May 2021 20:32:25 +0000 (15:32 -0500)]
UBUNTU: [Debian] use stamps for flavour install targets

BugLink: https://bugs.launchpad.net/bugs/1930713
In preparation for moving installation of files from the flavour
build directories over to the build phase, convert relevant install-*
targets to use stamps.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
2 years agoUBUNTU: [Debian] install kvm_stat systemd service
Krzysztof Kozlowski [Mon, 31 May 2021 15:04:55 +0000 (17:04 +0200)]
UBUNTU: [Debian] install kvm_stat systemd service

Install the kvm_stat systemd service in linux-host-tools package,
disabled by default.  The service logs KVM kernel module trace events to
/var/log/kvm_stat.csv.

This tool is useful for observing guest behavior from the host
perspective.  Often conclusions about performance or buggy behavior can
be drawn from the output.

BugLink: https://bugs.launchpad.net/bugs/1921870
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: [Packaging] Build and include GDB Python scripts into debug packages
Krzysztof Kozlowski [Wed, 19 May 2021 16:17:47 +0000 (12:17 -0400)]
UBUNTU: [Packaging] Build and include GDB Python scripts into debug packages

The kernel comes with useful GDB debugging scripts/commands (enabled
with CONFIG_GDB_SCRIPTS), however these are built either with "all" make
target or with "scripts_gdb".  Build these in
"$(stampdir)/stamp-build-%" target and package in "install-%" under
/usr/share/gdb/auto-load.

BugLink: https://bugs.launchpad.net/bugs/1928715
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: iwlwifi: add new pci id for 6235
Alex Hung [Sat, 22 May 2021 00:12:03 +0000 (18:12 -0600)]
UBUNTU: SAUCE: iwlwifi: add new pci id for 6235

lspci output:
Network controller [0280]: Intel Corporation Centrino Advanced-N6235
 [8086:088f] (rev 24)
 Subsystem: Intel Corporation Centrino Advanced-N 6235 [8086:526a]

BugLink: https://bugs.launchpad.net/bugs/1920180
Signed-off-by: Alex Hung <alex.hung@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: [Config] enable soundwire audio mach driver
Hui Wang [Fri, 14 May 2021 04:06:34 +0000 (12:06 +0800)]
UBUNTU: [Config] enable soundwire audio mach driver

BugLink: https://bugs.launchpad.net/bugs/1921632
The soundwire audio driver in the kernel could work on some Dell cml
machines, so enable the machine driver and some needed codec driver.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: Ubuntu-unstable-5.13.0-5.5
Andrea Righi [Mon, 31 May 2021 10:32:38 +0000 (12:32 +0200)]
UBUNTU: Ubuntu-unstable-5.13.0-5.5

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Config] set CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
Andrea Righi [Mon, 31 May 2021 10:02:50 +0000 (12:02 +0200)]
UBUNTU: [Config] set CONFIG_BPF_UNPRIV_DEFAULT_OFF=y

This option will disable uprivileged BPF by default. It can be reenabled,
though, as it uses the new value 2 for the kernel.unprivileged_bpf_disabled
sysctl. That value disables it, but allows the sysctl knob to be set back
to 0.

This allows sysadmins to enable unprivileged BPF back by using sysctl
config files.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Mon, 31 May 2021 09:46:14 +0000 (11:46 +0200)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1930205
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Start new release
Andrea Righi [Mon, 31 May 2021 09:22:20 +0000 (11:22 +0200)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: update dkms package versions
Andrea Righi [Mon, 31 May 2021 09:12:55 +0000 (11:12 +0200)]
UBUNTU: update dkms package versions

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Ubuntu-unstable-5.13.0-4.4
Andrea Righi [Mon, 24 May 2021 11:06:17 +0000 (13:06 +0200)]
UBUNTU: Ubuntu-unstable-5.13.0-4.4

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Mon, 24 May 2021 11:05:26 +0000 (13:05 +0200)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1929404
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: update dkms package versions
Andrea Righi [Mon, 24 May 2021 09:39:28 +0000 (11:39 +0200)]
UBUNTU: update dkms package versions

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Rebase to v5.13-rc3
Andrea Righi [Mon, 24 May 2021 09:39:12 +0000 (11:39 +0200)]
UBUNTU: Rebase to v5.13-rc3

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Start new release
Andrea Righi [Mon, 24 May 2021 09:38:47 +0000 (11:38 +0200)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Config] Temporarily disable signing for ppc64el and s390x
Seth Forshee [Wed, 19 May 2021 15:21:20 +0000 (10:21 -0500)]
UBUNTU: [Config] Temporarily disable signing for ppc64el and s390x

We're awaiting testing of lockdown under secureboot on these
architectures. Disable signing in the meantime to allow putting
linux-unstable into -proposed.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
2 years agoUBUNTU: SAUCE: integrity: add informational messages when revoking certs
Dimitri John Ledkov [Tue, 18 May 2021 09:56:42 +0000 (10:56 +0100)]
UBUNTU: SAUCE: integrity: add informational messages when revoking certs

integrity_load_cert() prints messages of the source and cert details
when adding certs as trusted. Mirror those messages in
uefi_revocation_list_x509() when adding certs as revoked.

Sample dmesg with this change:

    integrity: Platform Keyring initialized
    integrity: Loading X.509 certificate: UEFI:db
    integrity: Loaded X.509 cert 'Microsoft Corporation UEFI CA 2011: 13adbf4309bd82709c8cd54f316ed522988a1bd4'
    integrity: Revoking X.509 certificate: UEFI:MokListXRT (MOKvar table)
    blacklist: Revoked X.509 cert 'Canonical Ltd. Secure Boot Signing: 61482aa2830d0ab2ad5af10b7250da9033ddcef0'
    integrity: Loading X.509 certificate: UEFI:MokListRT (MOKvar table)
    integrity: Loaded X.509 cert 'Canonical Ltd. Master Certificate Authority: ad91990bc22ab1f517048c23b6655a268e345a63'

BugLink: https://bugs.launchpad.net/bugs/1928679
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
2 years agoUBUNTU: SAUCE: integrity: Load mokx certs from the EFI MOK config table
Dimitri John Ledkov [Tue, 18 May 2021 09:56:41 +0000 (10:56 +0100)]
UBUNTU: SAUCE: integrity: Load mokx certs from the EFI MOK config table

Refactor load_moklist_certs() to load either MokListRT into db, or
MokListXRT into dbx. Call load_moklist_certs() twice - first to load
mokx certs into dbx, then mok certs into db.

This thus now attempts to load mokx certs via the EFI MOKvar config
table first, and if that fails, via the EFI variable. Previously mokx
certs were only loaded via the EFI variable. Which fails when
MokListXRT is large. Instead of large MokListXRT variable, only
MokListXRT{1,2,3} are available which are not loaded. This is the case
with Ubuntu's 15.4 based shim. This patch is required to address
CVE-2020-26541 when certificates are revoked via MokListXRT.

Fixes: ebd9c2ae369a ("integrity: Load mokx variables into the blacklist keyring")
BugLink: https://bugs.launchpad.net/bugs/1928679
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
2 years agoUBUNTU: Ubuntu-unstable-5.13.0-3.3
Andrea Righi [Mon, 17 May 2021 09:55:02 +0000 (11:55 +0200)]
UBUNTU: Ubuntu-unstable-5.13.0-3.3

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Mon, 17 May 2021 09:51:30 +0000 (11:51 +0200)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1928655
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Rebase to v5.13-rc2
Andrea Righi [Mon, 17 May 2021 08:21:27 +0000 (10:21 +0200)]
UBUNTU: Rebase to v5.13-rc2

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Start new release
Andrea Righi [Mon, 17 May 2021 08:20:56 +0000 (10:20 +0200)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Ubuntu-unstable-5.13.0-2.2
Andrea Righi [Fri, 14 May 2021 07:19:03 +0000 (09:19 +0200)]
UBUNTU: Ubuntu-unstable-5.13.0-2.2

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Start new release
Andrea Righi [Fri, 14 May 2021 06:46:05 +0000 (08:46 +0200)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Config] enable CONFIG_DEBUG_INFO_COMPRESSED
Andrea Righi [Fri, 14 May 2021 06:43:53 +0000 (08:43 +0200)]
UBUNTU: [Config] enable CONFIG_DEBUG_INFO_COMPRESSED

Enable CONFIG_DEBUG_INFO_COMPRESSED to reduce the amount of space
required during the build.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Ubuntu-unstable-5.13.0-1.1
Andrea Righi [Wed, 12 May 2021 09:35:23 +0000 (11:35 +0200)]
UBUNTU: Ubuntu-unstable-5.13.0-1.1

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Rebase to v5.13-rc1
Andrea Righi [Wed, 12 May 2021 09:30:33 +0000 (11:30 +0200)]
UBUNTU: Rebase to v5.13-rc1

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: Start new release
Andrea Righi [Wed, 12 May 2021 09:26:41 +0000 (11:26 +0200)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Packaging] add ignore.* for each arch
Andrea Righi [Tue, 11 May 2021 10:41:19 +0000 (12:41 +0200)]
UBUNTU: [Packaging] add ignore.* for each arch

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Packaging] correctly support the new ABI schema
Andrea Righi [Wed, 12 May 2021 08:38:17 +0000 (10:38 +0200)]
UBUNTU: [Packaging] correctly support the new ABI schema

The ABI directory is now <DEBIAN>abi/. Update the helper scripts to
properly support this naming when we need to re-use the previous ABI.

Also manually transition to the new ABI schema.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Packaging] Drop the processing of perm-blacklist
Juerg Haefliger [Mon, 3 May 2021 08:47:07 +0000 (10:47 +0200)]
UBUNTU: [Packaging] Drop the processing of perm-blacklist

perm-blacklist lists modules and/or symbols that are permanently excluded
from the ABI check. AFAICT this hasn't been used in ages and with the
previous commit it would move up one level which puts it outside of the
ABI directory. That in itelf is not problematic just not pretty. Take this
opportunity to get rid of the whole (unsued) concept. We can always add it
back later should the need arise (and then should probably rename it to
abi.perm-blacklist to make it clear that it's a file related to the ABI).

Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Packaging] Move the ABI files up by one directory level
Juerg Haefliger [Mon, 3 May 2021 08:47:06 +0000 (10:47 +0200)]
UBUNTU: [Packaging] Move the ABI files up by one directory level

The current ABI root directory name is <DEBIAN/abi/previous/. This commit
drops the 'previous' path component and moves the ABI up one level. We
still need a temporary directory for downloading the current ABIs which now
has to reside outside of the ABI tree. For that, use <DEBIAN>/__abi.current/
which should clearly indicate that it's a temporary directory.

Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: update dkms package versions
Andrea Righi [Tue, 11 May 2021 09:20:45 +0000 (11:20 +0200)]
UBUNTU: update dkms package versions

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: SAUCE: make ASYNCB_INITIALIZED available for the kernel
Andrea Righi [Tue, 11 May 2021 07:30:51 +0000 (09:30 +0200)]
UBUNTU: SAUCE: make ASYNCB_INITIALIZED available for the kernel

The flag ASYNCB_INITIALIZED is required by our driver
ubuntu/xr-usb-serial. Make it available to kernel code to prevent the
following build failure:

 ./build/ubuntu/xr-usb-serial/xr_usb_serial_common.c:1613:15: error: 'ASYNCB_INITIALIZED' undeclared (first use in this function); did you mean 'RCU_INITIALIZER'?
  1613 |  if (test_bit(ASYNCB_INITIALIZED, &xr_usb_serial->port.flags))
       |               ^~~~~~~~~~~~~~~~~~
       |               RCU_INITIALIZER

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Config] update configs/annotations after rebase to 5.13
Andrea Righi [Tue, 11 May 2021 07:21:47 +0000 (09:21 +0200)]
UBUNTU: [Config] update configs/annotations after rebase to 5.13

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Packaging] do not check for previous revision for new upstream kernels
Andrea Righi [Tue, 11 May 2021 07:00:12 +0000 (09:00 +0200)]
UBUNTU: [Packaging] do not check for previous revision for new upstream kernels

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Packaging] bump up kernel version to 5.13
Andrea Righi [Tue, 11 May 2021 06:41:55 +0000 (08:41 +0200)]
UBUNTU: [Packaging] bump up kernel version to 5.13

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: [Packaging] initial packaging import from linux-unstable-5.12
Andrea Righi [Mon, 22 Feb 2021 13:55:09 +0000 (14:55 +0100)]
UBUNTU: [Packaging] initial packaging import from linux-unstable-5.12

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: SAUCE: shiftfs: handle copy_to_user() return values correctly
Seth Forshee [Fri, 9 Apr 2021 18:10:37 +0000 (13:10 -0500)]
UBUNTU: SAUCE: shiftfs: handle copy_to_user() return values correctly

shiftfs expects copy_to_user() to return a negative error code on
failure, when it actually returns the amount of uncopied data. Fix all
code using copy_to_user() to handle the return values correctly.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
CVE-2021-3492
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
2 years agoUBUNTU: SAUCE: shiftfs: free allocated memory in shiftfs_btrfs_ioctl_fd_replace(...
Seth Forshee [Fri, 9 Apr 2021 18:01:06 +0000 (13:01 -0500)]
UBUNTU: SAUCE: shiftfs: free allocated memory in shiftfs_btrfs_ioctl_fd_replace() error paths

Many error paths in shiftfs_btrfs_ioctl_fd_replace() do not free memory
allocated near the top of the function. Fix up these error paths to free
the memory.

Additionally, the addresses for the allocated memory are assigned to
return parameters early in the function, before we know whether or not
the function as a whole will return success. Wait to assign these values
until we know the function was successful, and for good measure
initialize the return parameters to NULL at the start.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
CVE-2021-3492
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
2 years agoUBUNTU: SAUCE: apparmor: Fix build error, make sk parameter const
Colin Ian King [Mon, 29 Mar 2021 09:26:15 +0000 (10:26 +0100)]
UBUNTU: SAUCE: apparmor: Fix build error, make sk parameter const

Make the sk parameter const to fix a build error with clang:

security/apparmor/net.c:143:35: error: passing 'const struct sock *' to
parameter of type 'struct sock *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                        audit_unix_sk_addr(ab, "addr", sa->u.net->sk);
                                                       ^~~~~~~~~~~~~
/home/ubuntu/hirsute/security/apparmor/net.c:98:24: note: passing argument
to parameter 'sk' here
                               struct sock *sk)
                                            ^

Fixes: 2775e0786896 ("UBUNTU: SAUCE: apparmor: af_unix mediation")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: xr-usb-serial: clean up build warnings
Colin Ian King [Fri, 26 Mar 2021 16:54:41 +0000 (16:54 +0000)]
UBUNTU: SAUCE: xr-usb-serial: clean up build warnings

Clean up a few build warnings on unused variable 'tty'. Only declare
tty for specific kernel versions where the code requires it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: xr-usb-serial: clean up indentation
Colin Ian King [Fri, 26 Mar 2021 16:54:40 +0000 (16:54 +0000)]
UBUNTU: SAUCE: xr-usb-serial: clean up indentation

Cosmetic changes, clean up indentation to make the code easier
to read.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: (lockdown) powerpc: lock down kernel in secure boot mode
Daniel Axtens [Thu, 2 Apr 2020 05:16:32 +0000 (16:16 +1100)]
UBUNTU: SAUCE: (lockdown) powerpc: lock down kernel in secure boot mode

BugLink: https://bugs.launchpad.net/bugs/1855668
PowerNV has recently gained Secure Boot support. If it's enabled through
the firmware and bootloader stack, then lock down the kernel.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
(cherry picked from commit d4f3f12e040caf3ec669726efb67b27550a4713f)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: (lockdown) security: lockdown: Make CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOO...
Seth Forshee [Thu, 10 Oct 2019 16:19:32 +0000 (11:19 -0500)]
UBUNTU: SAUCE: (lockdown) security: lockdown: Make CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT more generic

s390 supports secure boot which is not based on EFI. Change the
config option to be more generic, and allow it to be enabled on
s390.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
(cherry picked from commit dd9548a9eb3f2a34ee7c60abce157f8e2868e7c7)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: (lockdown) arm64: Allow locking down the kernel under EFI secure boot
Seth Forshee [Thu, 10 Oct 2019 15:57:25 +0000 (10:57 -0500)]
UBUNTU: SAUCE: (lockdown) arm64: Allow locking down the kernel under EFI secure boot

Add support to arm64 for the CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT
option. When enabled the lockdown LSM will be enabled with
maximum confidentiality when booted under EFI secure boot.

Based on an earlier patch by Linn Crosetto.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
[v2: ported to 5.7-rc1 and adapted to the new fdt parsing mechanism]
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
(cherry picked from commit fb9c9645d977e23e9b494ce008d31507d872ffef)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: (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: (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>
Signed-off-by: Jeremy Cline <jcline@redhat.com>
(cherry picked from commit b697ff5e26974fee8fcd31a1e221e9dd41515efc
from https://gitlab.com/cki-project/kernel-ark)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: (lockdown) s390: Lock down the kernel when the IPL secure flag is set
Jeremy Cline [Wed, 30 Oct 2019 14:37:49 +0000 (14:37 +0000)]
UBUNTU: SAUCE: (lockdown) s390: Lock down the kernel when the IPL secure flag is set

Automatically lock down the kernel to LOCKDOWN_CONFIDENTIALITY_MAX if
the IPL secure flag is set.

Upstream Status: RHEL only
Suggested-by: Philipp Rudo <prudo@redhat.com>
Signed-off-by: Jeremy Cline <jcline@redhat.com>
(cherry picked from commit 2384646bf71d8c282cf49bb20321fdf802c61cce
https://gitlab.com/cki-project/kernel-ark)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: (lockdown) efi: Lock down the kernel if booted in secure boot mode
David Howells [Mon, 30 Sep 2019 21:28:16 +0000 (21:28 +0000)]
UBUNTU: SAUCE: (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.

Upstream Status: RHEL only
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jeremy Cline <jcline@redhat.com>
(cherry picked from commit 5850c93175b9d2e1081873f4bbe08dead202cb08
from https://gitlab.com/cki-project/kernel-ark)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: (lockdown) efi: Add an EFI_SECURE_BOOT flag to indicate secure boot...
David Howells [Tue, 27 Feb 2018 10:04:55 +0000 (10:04 +0000)]
UBUNTU: SAUCE: (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.

Upstream Status: RHEL only
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
[Rebased for context; efi_is_table_address was moved to arch/x86]
Signed-off-by: Jeremy Cline <jcline@redhat.com>
(cherry picked from commit 53250b991f841be025fa4d264850dadc0fae2861
from https://gitlab.com/cki-project/kernel-ark)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: (lockdown) security: lockdown: expose a hook to lock the kernel down
Jeremy Cline [Mon, 30 Sep 2019 21:22:47 +0000 (21:22 +0000)]
UBUNTU: SAUCE: (lockdown) security: lockdown: expose a hook to lock the kernel down

In order to automatically lock down kernels running on UEFI machines
booted in Secure Boot mode, expose the lock_kernel_down() hook.

Upstream Status: RHEL only
Signed-off-by: Jeremy Cline <jcline@redhat.com>
(cherry picked from commit 72223fd1241cc5c70b96a491db14d54c83beadd8
from https://gitlab.com/cki-project/kernel-ark)

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: (lockdown) Make get_cert_list() use efi_status_to_str() to print error...
Peter Jones [Mon, 2 Oct 2017 22:18:30 +0000 (18:18 -0400)]
UBUNTU: SAUCE: (lockdown) Make get_cert_list() use efi_status_to_str() to print error messages.

Upstream Status: RHEL only
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Jeremy Cline <jcline@redhat.com>
(cherry picked from commit 7ba28f03674fa9346610c3fea7fc93bc58f06d2a
from https://gitlab.com/cki-project/kernel-ark)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: (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: (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.

Upstream Status: RHEL only
Signed-off-by: Peter Jones <pjones@redhat.com>
(cherry picked from commit 2ae9082db0b54d831a9b3782c049d9917e37d89f
from https://gitlab.com/cki-project/kernel-ark)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoclk: sifive: Use reset-simple in prci driver for PCIe driver
Greentime Hu [Tue, 16 Mar 2021 21:31:11 +0000 (21:31 +0000)]
clk: sifive: Use reset-simple in prci driver for PCIe driver

We use reset-simple in this patch so that pcie driver can use
devm_reset_control_get() to get this reset data structure and use
reset_control_deassert() to deassert pcie_power_up_rst_n.

Signed-off-by: Greentime Hu <greentime.hu@sifive.com>
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoriscv: Get CPU manufacturer information
Vincent Chen [Tue, 16 Mar 2021 21:31:07 +0000 (21:31 +0000)]
riscv: Get CPU manufacturer information

Issue 3 SBI calls to get the vendor ID, architecture ID and implementation
ID early in boot so we only need to take the SBI call overhead once.

Signed-off-by: Vincent Chen <vincent.chen@sifive.com>
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoriscv: sifive: unmatched: update for 16GB rev3
David Abdurachmanov [Tue, 16 Mar 2021 21:31:05 +0000 (21:31 +0000)]
riscv: sifive: unmatched: update for 16GB rev3

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoriscv: sifive: fu740: cpu{1, 2, 3, 4} set compatible to sifive, u74-mc
David Abdurachmanov [Tue, 16 Mar 2021 21:31:04 +0000 (21:31 +0000)]
riscv: sifive: fu740: cpu{1, 2, 3, 4} set compatible to sifive, u74-mc

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: PCI: Serialize TGL e1000e PM ops
Kai-Heng Feng [Tue, 16 Mar 2021 13:13:28 +0000 (21:13 +0800)]
UBUNTU: SAUCE: PCI: Serialize TGL e1000e PM ops

BugLink: https://bugs.launchpad.net/bugs/1919321
On TGL systems, PCI_COMMAND may randomly flip to 0 on system resume.
This is devastating to drivers that use pci_set_master(), like NVMe and
xHCI, to enable DMA in their resume routine, as pci_set_master() can
inadvertently disable PCI_COMMAND_IO and PCI_COMMAND_MEMORY, making
resources inaccessible.

The issue is reproducible on all kernel releases, but obviously the
situation is exacerbated by commit 6cecf02e77ab ('Revert "e1000e:
disable s0ix entry and exit flows for ME systems"').

Seems like ME is out to lunch until it's finally out of ULP polling. So
ensure e1000e PM ops are serialized by enforcing device links to
workaround the issue. This is another hacky hackish hack that we can't
upstream :)

Of course this will make suspend and resume a bit slower, but at least
we protect other PCI devices by keeping ME from going full basket case.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212039
Link: https://lore.kernel.org/linux-pci/20210303172223.GA634698@bjorn-Precision-5520/
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2 years agoUBUNTU: SAUCE: Input: i8042 - add dmi quirk
Chia-Lin Kao (AceLan) [Mon, 15 Mar 2021 08:05:40 +0000 (16:05 +0800)]
UBUNTU: SAUCE: Input: i8042 - add dmi quirk

BugLink: https://bugs.launchpad.net/bugs/1919123
On some platforms, the EC doesn't support the register reading sequence
for sentelic[1], and then make the EC can't respond commands for a while
when probing. It leads to the keyboard non-responsive for around 10
seconds while waking up from s2idle.

[   44.304488] i8042: [9804] d4 -> i8042 (command)
[   44.304634] i8042: [9804] f3 -> i8042 (parameter)
[   44.304787] i8042: [9804] fa <- i8042 (interrupt, 1, 12)
[   44.304855] i8042: [9804] d4 -> i8042 (command)
[   44.304938] i8042: [9804] 66 -> i8042 (parameter)
[   44.337698] i8042: [9813] d4 -> i8042 (command)
[   44.905695] i8042: [9942] 88 -> i8042 (parameter)
[   45.497478] i8042: [10102] d4 -> i8042 (command)
[   46.098041] i8042: [10253] f3 -> i8042 (parameter)
[   46.098070] i8042: [10253] fe <- i8042 (interrupt, 1, 12)
[   46.718154] i8042: [10386] d4 -> i8042 (command)
[   47.309915] i8042: [10386] f4 -> i8042 (parameter)
[   47.918961] i8042: [10556] d4 -> i8042 (command)
[   48.402624] i8042: [10556] f6 -> i8042 (parameter)

A DMI quirk to mark this platform doesn't have aux device could avoid those
commands to be sent. And the system could still using i2c interface to
communicate with the touchpad.

1. https://www.kernel.org/doc/html/v5.11/input/devices/sentelic.html#programming-sequence-for-register-reading-writing

Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
(cherry picked from https://lkml.org/lkml/2021/3/15/126)
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2 years agoUBUNTU: SAUCE: selftests: memory-hotplug: bump timeout to 10min
Paolo Pisati [Thu, 18 Feb 2021 14:58:21 +0000 (15:58 +0100)]
UBUNTU: SAUCE: selftests: memory-hotplug: bump timeout to 10min

$ sudo make -C tools/testing/selftests/memory-hotplug run_tests
TAP version 13
1..1
...
15:11:09 DEBUG| [stdout] not ok 1 selftests: memory-hotplug: mem-on-off-test.sh # TIMEOUT 45 seconds

The memory-hotplug selftest can take up to several minutes, depending on memory
size and cpu speed of the testbench, so bump timeout to 10 minutes.

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>