This is used to re-enable ASPM on RTL8106e, if it is possible.
Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Andy Whitcroft [Wed, 1 Sep 2021 10:59:12 +0000 (11:59 +0100)]
UBUNTU: [Packaging] switch to kernel-versions
Switch to obtaining the DKMS package versions from the kernel-versions
dataset rather than from the archive. This allows it to be more
resilient against parallel update of those versions in the archive.
Replace the existing `update-versions-dkms` script with
`update-dkms-versions`. This change in name is deliberate as the new
script must be called at a different stage of the crank process, it must
follow the `cranky link-tb` stage to obtain the correct versions. See
the crank documentation for details.
BugLink: https://bugs.launchpad.net/bugs/1928921
Properties: no-test-build Acked-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> Signed-off-by: Andy Whitcroft <apw@canonical.com>
UBUNTU: [Config] mark CONFIG_BPF_UNPRIV_DEFAULT_OFF enforced
Setting unprivileged_bpf_disabled to 2 by default will prevent attacks
using BPF by unprivileged users by default. If necessary, the sysadmin will
be able to turn this on again by setting unprivileged_bpf_disabled to 0. On
the other hand, the sysadmin can disable unprivileged BPF without allowing
it to be reenabled by setting unprivileged_bpf_disabled to 1.
Additionaly, there is a CAP_BPF that allows processes to use BPF without
having the complete capability set or CAP_SYS_ADMIN.
Mark the option as enforced so derivative kernels will pick it up.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Acked-by: Colin Ian King <colin.king@canonical.com> Acked-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Drop unused and unmaintained x32 architecture configs.
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Acked-by: Juerg Haefliger <juergh@canonical.com> Acked-by: Andrea Righi <andrea.righi@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
UBUNTU: [Packaging] remove remaining references to ports
Remove remaining few, unused, references to family=ports builds. Also
remove the maintainer targets to operate on ports.
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Acked-by: Juerg Haefliger <juergh@canonical.com> Acked-by: Andrea Righi <andrea.righi@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
UBUNTU: [Config] Enforce SYSTEM_TRUSTED_KEYS and SYSTEM_REVOCATION_KEYS
BugLink: https://bugs.launchpad.net/bugs/1932029
Enforce SYSTEM_TRUSTED_KEYS and SYSTEM_REVOCATION_KEYS on all
architectures, including riscv64. Note that TRUSTED and REVOCATION
keys files are dynamically generated and individual kernels may
add/revoke certificates specific to them, as needed. But all kernels
must trust & revoke a base set of certificates.
Note some kernel flavours don't enherit, or don't enforce all
annotation keys by default, hence enforcement of these options is
required.
Fixes: 503c7ca37e ("UBUNTU: [Config] Configure CONFIG_SYSTEM_REVOCATION_KEYS with revoked keys") Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Kunyang_Fan [Tue, 24 Aug 2021 07:26:59 +0000 (15:26 +0800)]
UBUNTU: ODM: mfd: Check AAEON BFPI version before adding device
BugLink: https://bugs.launchpad.net/bugs/1937897
For the below: error log occurring in some devices:
gpio gpiochip0: (gpio_aaeon): tried to insert a GPIO chip with zero lines
gpiochip_add_data_with_key: GPIOs 0..-1 (gpio_aaeon) failed to register
Add the BFPI version checking mechanism to prevent error log bumping.
Fixes: 424945128781 ("UBUNTU: ODM: mfd: Add support for IO functions of AAEON devices") Signed-off-by: Kunyang_Fan <kunyang_fan@asus.com> Acked-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1931725
Previously v5.13+ based kernels enabled ZSTD kernel image compression
on amd64 & s390x. Due to significant bootspeed impact this change
should be enforced for all derivatives as well. Not all derivatives
currently inherit and enforce all annotations from parent config.
Fixes: f88bdfaeaf ("UBUNTU: [Packaging] use ZSTD to compress s390 kernels") Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Acked-by: Tim Gardner <tim.gardner@canonical.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Kees Cook [Fri, 20 Aug 2021 07:10:02 +0000 (00:10 -0700)]
UBUNTU: [Config] Enable CONFIG_UBSAN_BOUNDS
This enables run-time array index bounds checking for arrays with
compile-time known sizes. This catches some potentially serious issues
at run-time with nearly zero performance impact. Syzkaller is still
catching bugs with this. (See "array-index-out-of-bounds" reports at
https://syzkaller.appspot.com/upstream)
Using UBSAN_TRAP=y has nearly no impact on image size, though it makes
caught conditions much less verbose.
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1914685 Signed-off-by: Kees Cook <kees@ubuntu.com>
[ disable CONFIG_UBSAN_SANITIZE_ALL on armhf - no arch support ] Signed-off-by: Andrea Righi <andrea.righi@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
CONFIG_HARDENED_USERCOPY_FALLBACK was designed to catch old out of tree
drivers doing bad things with CONFIG_HARDENED_USERCOPY, and weakens the
protection. It's been several years now; it's time to turn this off.
Kernel stack offset randomization is a useful security feature
that should be enabled. Benchmarking showed that the impact is
within the noise of various microbenchmarks so I believe this
has some added benefit with minimal performance impact. The
security folk believe this is worth enabling, so lets switch
it on.
Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
(cherry picked from commit 2ea2b647bcdd1baa0b2489e8420875121a39af39) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Because the Realtek WiFi (PCI 06:00.0) is in the same IOMMU group as AMD
graphics (PCI 01:00.0),
[ 1.326166] pci 0000:01:00.0: Adding to iommu group 0
...
[ 1.326268] pci 0000:06:00.0: Adding to iommu group 0
And the AMD graphics supports iommu_v2, so the group uses intentity
mapping based on the query from amd_iommu_def_domain_type().
However, the Realtek WiFi only supports 32bit DMA, so we need to
make sure swiotlb is enabled.
The swiotlb is enabled by pci_swiotlb_detect_4gb() to support legacy
devices on highmen DMA, but it gets disabled later by
amd_iommu_init_dma_ops(). Keep swiotlb enabled to resolve the issue.
I am working on a more dynamic fix for upstream inclusion, but right now
lets keep swiotlb enabled like what Intel and ARM64 do.
You-Sheng Yang [Thu, 19 Aug 2021 06:14:26 +0000 (14:14 +0800)]
UBUNTU: [Config] Enable Cirrus Logic HDA bridge support
BugLink: https://bugs.launchpad.net/bugs/1939541 Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Chris Chiu [Wed, 28 Jul 2021 05:08:20 +0000 (13:08 +0800)]
UBUNTU: [Config] set CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC to y
BugLink: https://bugs.launchpad.net/bugs/1915117
Enable CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC for Intel Skylake
SST with HDA DSP generic machine driver to enable codec playback and
capture on both HDA codec and DMIC port.
Signed-off-by: Chris Chiu <chris.chiu@canonical.com> Acked-by: Tim Gardner <tim.gardner@canonical.com> Acked-by: Kelsey Skunberg <kelsey.skunberg@canonical.com> Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
The USB devices will fail to be detected if the power-on-good delay
of the root hub is not long enough. In the problematic root hub,
it claims 20 ms of bPwrOn2PwrGood in the hub descriptor, but we
have to increase it to 100ms to make all connected USB devices to
be correctly enumerated and detected. Revert the commit until a
formal fix from upstream.
Signed-off-by: Chris Chiu <chris.chiu@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Juerg Haefliger [Mon, 9 Aug 2021 15:22:38 +0000 (17:22 +0200)]
UBUNTU: SAUCE: arm: Fix instruction set selection for GCC 11
BugLink: https://bugs.launchpad.net/bugs/1939308
GCC 11 on ARM now complains like the following when trying to determine if
an arch is supported. Presumably because it enforces the default option
which (in our case) is '--with-float=hard'?
$ arm-linux-gnueabihf-gcc-11 -march=armv7-a -c -x c /dev/null
cc1: error: ‘-mfloat-abi=hard’: selected architecture lacks an FPU
Due to that, the kernel build system selects the wrong compiler options
which throws errros like this:
/tmp/ccrHfZPj.s: Assembler messages:
/tmp/ccrHfZPj.s:116: Error: selected processor does not support `dmb ish' in ARM mode
/tmp/ccrHfZPj.s:150: Error: selected processor does not support `isb ' in ARM mode
/tmp/ccrHfZPj.s:160: Error: selected processor does not support `mrrc p15,1,r4,r5,c14' in ARM mode
/tmp/ccrHfZPj.s:245: Error: selected processor does not support `dmb ish' in ARM mode
/tmp/ccrHfZPj.s:503: Error: selected processor does not support `dmb ish' in ARM mode
/tmp/ccrHfZPj.s:527: Error: selected processor does not support `dmb ish' in ARM mode
/tmp/ccrHfZPj.s:698: Error: selected processor does not support `dmb ish' in ARM mode
/tmp/ccrHfZPj.s:731: Error: selected processor does not support `isb ' in ARM mode
Fix that by moving the option '-msoft-float' up before the
'arch-$(CONFIG_CPU_<foo>)' instruction selection macros.
Signed-off-by: Juerg Haefliger <juergh@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
> default_file_splice_write is the last piece of generic code that uses
> set_fs to make the uaccess routines operate on kernel pointers. It
> implements a "fallback loop" for splicing from files that do not actually
> provide a proper splice_read method. The usual file systems and other
> high bandwidth instances all provide a ->splice_read, so this just removes
> support for various device drivers and procfs/debugfs files. If splice
> support for any of those turns out to be important it can be added back
> by switching them to the iter ops and using generic_file_splice_read.
this means that currently all workloads making use of sendfile() on
shiftfs fail. This includes LXD, Anbox and a range of others. Fix this
by providing explicit .splice_read() and .splice_write() methods which
jus restores the status quo and we keep using a generic method provided
by the vfs.
Cc: Seth Forshee <sforshee@kernel.org> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Kai-Heng Feng [Mon, 9 Aug 2021 05:09:44 +0000 (13:09 +0800)]
UBUNTU: SAUCE: drm/i915/dp: Use max params for older panels
BugLink: https://bugs.launchpad.net/bugs/1936708
Users reported that after commit 2bbd6dba84d4 ("drm/i915: Try to use
fast+narrow link on eDP again and fall back to the old max strategy on
failure"), the screen starts to have wobbly effect.
Commit a5c936add6a2 ("drm/i915/dp: Use slow and wide link training for
everything") doesn't help either, that means the affected panels only
work with max params.
The panels are all DP 1.1 ones, so apply max params to them to resolve
the issue.
Link: https://patchwork.kernel.org/project/intel-gfx/list/?series=526397 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3714 Fixes: 2bbd6dba84d4 ("drm/i915: Try to use fast+narrow link on eDP again and fall back to the old max strategy on failure") Fixes: a5c936add6a2 ("drm/i915/dp: Use slow and wide link training for everything") Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Paolo Pisati [Tue, 3 Aug 2021 15:14:48 +0000 (17:14 +0200)]
UBUNTU: [Config] set CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC to y
BugLink: https://bugs.launchpad.net/bugs/1915117
Enable CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC for Intel Skylake
SST with HDA DSP generic machine driver to enable codec playback and
capture on both HDA codec and DMIC port.
Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Superseded by upstream change 6f4eea9046 ("riscv: Introduce
alternative mechanism to apply errata solution") and the
riscv_fill_cpu_mfr_info() function it implements.
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>