]> git.proxmox.com Git - mirror_ubuntu-kernels.git/log
mirror_ubuntu-kernels.git
18 months agoUBUNTU: Rebase to v5.18-rc7
Andrea Righi [Mon, 16 May 2022 09:23:46 +0000 (11:23 +0200)]
UBUNTU: Rebase to v5.18-rc7

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Start new release
Andrea Righi [Mon, 16 May 2022 09:22:31 +0000 (11:22 +0200)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Ubuntu-unstable-5.18.0-3.3
Andrea Righi [Mon, 9 May 2022 10:15:40 +0000 (12:15 +0200)]
UBUNTU: Ubuntu-unstable-5.18.0-3.3

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Mon, 9 May 2022 10:00:44 +0000 (12:00 +0200)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1972162
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Rebase to v5.18-rc6
Andrea Righi [Mon, 9 May 2022 09:12:55 +0000 (11:12 +0200)]
UBUNTU: Rebase to v5.18-rc6

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Start new release
Andrea Righi [Mon, 9 May 2022 09:12:36 +0000 (11:12 +0200)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Config] disable Intel DMA remapping options by default
Andrea Righi [Thu, 5 May 2022 12:34:59 +0000 (14:34 +0200)]
UBUNTU: [Config] disable Intel DMA remapping options by default

BugLink: https://bugs.launchpad.net/bugs/1971699
It seems that enabling IOMMU can cause some weird gfx problems, see for
example:

 https://bugs.launchpad.net/bugs/1971146
 https://bugs.launchpad.net/bugs/1965882

Even if upstream decided to enable these options by default, it is
probably safer for now to keep IOMMU disabled, to prevent potential
issues like those mentioned above.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Ubuntu-unstable-5.18.0-2.2
Andrea Righi [Tue, 3 May 2022 10:24:49 +0000 (12:24 +0200)]
UBUNTU: Ubuntu-unstable-5.18.0-2.2

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: debian/dkms-versions -- update from kernel-versions (main/master)
Andrea Righi [Tue, 3 May 2022 10:24:22 +0000 (12:24 +0200)]
UBUNTU: debian/dkms-versions -- update from kernel-versions (main/master)

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Tue, 3 May 2022 10:22:20 +0000 (12:22 +0200)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1971340
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Config] update configs after rebase
Andrea Righi [Tue, 3 May 2022 07:52:53 +0000 (09:52 +0200)]
UBUNTU: [Config] update configs after rebase

Disable CONFIG_BLK_DEV_FD_RAWCMD (deprecated) and update toolchain
versions.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Rebase to v5.18-rc5
Andrea Righi [Tue, 3 May 2022 10:20:51 +0000 (12:20 +0200)]
UBUNTU: Rebase to v5.18-rc5

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Start new release
Andrea Righi [Tue, 3 May 2022 07:52:05 +0000 (09:52 +0200)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Packaging] move to kinetic
Andrea Righi [Tue, 3 May 2022 07:49:01 +0000 (09:49 +0200)]
UBUNTU: [Packaging] move to kinetic

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Ubuntu-unstable-5.18.0-1.1
Andrea Righi [Wed, 27 Apr 2022 18:26:42 +0000 (20:26 +0200)]
UBUNTU: Ubuntu-unstable-5.18.0-1.1

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Config] update configs and annotations after rebase to 5.18
Andrea Righi [Wed, 27 Apr 2022 05:43:39 +0000 (07:43 +0200)]
UBUNTU: [Config] update configs and annotations after rebase to 5.18

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Tue, 19 Apr 2022 15:03:36 +0000 (17:03 +0200)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1969476
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Start new release
Andrea Righi [Tue, 19 Apr 2022 14:22:15 +0000 (16:22 +0200)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Packaging] move to kernel 5.18
Andrea Righi [Tue, 19 Apr 2022 14:20:54 +0000 (16:20 +0200)]
UBUNTU: [Packaging] move to kernel 5.18

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Ubuntu-unstable-5.17.0-8.8
Andrea Righi [Thu, 14 Apr 2022 08:30:39 +0000 (10:30 +0200)]
UBUNTU: Ubuntu-unstable-5.17.0-8.8

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: debian/dkms-versions -- update from kernel-versions (main/master)
Andrea Righi [Thu, 14 Apr 2022 08:30:19 +0000 (10:30 +0200)]
UBUNTU: debian/dkms-versions -- update from kernel-versions (main/master)

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Thu, 14 Apr 2022 08:29:57 +0000 (10:29 +0200)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1969016
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Start new release
Andrea Righi [Thu, 14 Apr 2022 08:21:40 +0000 (10:21 +0200)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Ubuntu-unstable-5.17.0-7.7
Andrea Righi [Thu, 14 Apr 2022 06:45:41 +0000 (08:45 +0200)]
UBUNTU: Ubuntu-unstable-5.17.0-7.7

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Thu, 14 Apr 2022 06:41:54 +0000 (08:41 +0200)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1968988
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Start new release
Andrea Righi [Thu, 14 Apr 2022 06:41:05 +0000 (08:41 +0200)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Packaging] remove references to lowlatency flavor
Andrea Righi [Thu, 14 Apr 2022 06:40:16 +0000 (08:40 +0200)]
UBUNTU: [Packaging] remove references to lowlatency flavor

We have a separate kernel for lowlatency now, so we can drop all the
references for the lowlatency flavor.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: SAUCE: Audit: Fix incorrect static inline function declration.
Dimitri John Ledkov [Mon, 21 Mar 2022 15:28:46 +0000 (15:28 +0000)]
UBUNTU: SAUCE: Audit: Fix incorrect static inline function declration.

The LSM attributes SAUCE patches have incorrect syntax for the case
when AUDIT framework is turned off, such as zfcpdump_defconfig. This
in turn breaks building zfcpdump-kernel from Ubuntu patched sources.

Reproducer:

    make ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- zfcpdump_defconfig
    make ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- bzImage

BugLink: https://bugs.launchpad.net/bugs/1965766
Fixes: 558fd844dd ("UBUNTU: SAUCE: Audit: Add a new record for multiple object LSM attributes")
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: SAUCE: iommu: intel-ipu: use IOMMU passthrough mode for Intel IPUs
zouxiaoh [Wed, 23 Feb 2022 02:21:25 +0000 (10:21 +0800)]
UBUNTU: SAUCE: iommu: intel-ipu: use IOMMU passthrough mode for Intel IPUs

BugLink: https://bugs.launchpad.net/bugs/1958004
Intel IPU(Image Processing Unit) has its own (IO)MMU hardware,
The IPU driver allocates its own page table that is not mapped
via the DMA, and thus the Intel IOMMU driver blocks access giving
this error: DMAR: DRHD: handling fault status reg 3 DMAR:
[DMA Read] Request device [00:05.0] PASID ffffffff
fault addr 76406000 [fault reason 06] PTE Read access is not set
As IPU is not an external facing device which is not risky, so use
IOMMU passthrough mode for Intel IPUs.

Change-Id: I6dcccdadac308cf42e20a18e1b593381391e3e6b
Depends-On: Iacd67578e8c6a9b9ac73285f52b4081b72fb68a6
Tracked-On: #JIITL8-411
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: zouxiaoh <xiaohong.zou@intel.com>
Signed-off-by: Xu Chongyang <chongyang.xu@intel.com>
(cherry picked from https://github.com/intel/ipu6-drivers/blob/5d5526d2b2811aa52590c2fa513ba989e7e594ab/patch/IOMMU-passthrough-for-intel-ipu.diff)
Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Config] update configs and annotations after stable updates
Andrea Righi [Thu, 14 Apr 2022 06:21:33 +0000 (08:21 +0200)]
UBUNTU: [Config] update configs and annotations after stable updates

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoASoC: soc-compress: Change the check for codec_dai
Jiasheng Jiang [Thu, 10 Mar 2022 03:00:41 +0000 (11:00 +0800)]
ASoC: soc-compress: Change the check for codec_dai

BugLink: https://bugs.launchpad.net/bugs/1968984
commit ccb4214f7f2a8b75acf493f31128e464ee1a3536 upstream.

It should be better to reverse the check on codec_dai
and returned early in order to be easier to understand.

Fixes: de2c6f98817f ("ASoC: soc-compress: prevent the potentially use of null pointer")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220310030041.1556323-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoplatform/x86: asus-wmi: Fix regression when probing for fan curve control
Hans de Goede [Sat, 5 Feb 2022 11:28:40 +0000 (12:28 +0100)]
platform/x86: asus-wmi: Fix regression when probing for fan curve control

BugLink: https://bugs.launchpad.net/bugs/1968984
commit d717e4509af0380a94dbc28b61839df39f17e1eb upstream.

The fan curve control patches introduced a regression for at least the
TUF FX506 and possibly other TUF series laptops that do not have support
for fan curve control.

As part of the probing process, asus_wmi_evaluate_method_buf is called
to get the factory default fan curve . The WMI management function
returns 0 on certain laptops to indicate lack of fan curve control
instead of ASUS_WMI_UNSUPPORTED_METHOD. This 0 is transformed to
-ENODATA which results in failure when probing.

Fixes: 0f0ac158d28f ("platform/x86: asus-wmi: Add support for custom fan curves")
Reported-and-tested-by: Abhijeet V <abhijeetviswa@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220205112840.33095-1-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoACPI / x86: Add skip i2c clients quirk for Nextbook Ares 8
Hans de Goede [Wed, 23 Feb 2022 13:50:31 +0000 (14:50 +0100)]
ACPI / x86: Add skip i2c clients quirk for Nextbook Ares 8

BugLink: https://bugs.launchpad.net/bugs/1968984
[ Upstream commit f38312c9b569322edf4baae467568206fe46d57b ]

The Nextbook Ares 8 is a x86 ACPI tablet which ships with Android x86
as factory OS. Its DSDT contains a bunch of I2C devices which are not
actually there, causing various resource conflicts (the Android x86
kernel fork ignores I2C devices described in the DSDT).

Add a ACPI_QUIRK_SKIP_I2C_CLIENTS for the Nextbook Ares 8 to the
acpi_quirk_skip_dmi_ids table to woraround this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agonet: bcmgenet: Use stronger register read/writes to assure ordering
Jeremy Linton [Thu, 10 Mar 2022 04:53:58 +0000 (22:53 -0600)]
net: bcmgenet: Use stronger register read/writes to assure ordering

BugLink: https://bugs.launchpad.net/bugs/1968984
[ Upstream commit 8d3ea3d402db94b61075617e71b67459a714a502 ]

GCC12 appears to be much smarter about its dependency tracking and is
aware that the relaxed variants are just normal loads and stores and
this is causing problems like:

[  210.074549] ------------[ cut here ]------------
[  210.079223] NETDEV WATCHDOG: enabcm6e4ei0 (bcmgenet): transmit queue 1 timed out
[  210.086717] WARNING: CPU: 1 PID: 0 at net/sched/sch_generic.c:529 dev_watchdog+0x234/0x240
[  210.095044] Modules linked in: genet(E) nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat]
[  210.146561] ACPI CPPC: PCC check channel failed for ss: 0. ret=-110
[  210.146927] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G            E     5.17.0-rc7G12+ #58
[  210.153226] CPPC Cpufreq:cppc_scale_freq_workfn: failed to read perf counters
[  210.161349] Hardware name: Raspberry Pi Foundation Raspberry Pi 4 Model B/Raspberry Pi 4 Model B, BIOS EDK2-DEV 02/08/2022
[  210.161353] pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  210.161358] pc : dev_watchdog+0x234/0x240
[  210.161364] lr : dev_watchdog+0x234/0x240
[  210.161368] sp : ffff8000080a3a40
[  210.161370] x29: ffff8000080a3a40 x28: ffffcd425af87000 x27: ffff8000080a3b20
[  210.205150] x26: ffffcd425aa00000 x25: 0000000000000001 x24: ffffcd425af8ec08
[  210.212321] x23: 0000000000000100 x22: ffffcd425af87000 x21: ffff55b142688000
[  210.219491] x20: 0000000000000001 x19: ffff55b1426884c8 x18: ffffffffffffffff
[  210.226661] x17: 64656d6974203120 x16: 0000000000000001 x15: 6d736e617274203a
[  210.233831] x14: 2974656e65676d63 x13: ffffcd4259c300d8 x12: ffffcd425b07d5f0
[  210.241001] x11: 00000000ffffffff x10: ffffcd425b07d5f0 x9 : ffffcd4258bdad9c
[  210.248171] x8 : 00000000ffffdfff x7 : 000000000000003f x6 : 0000000000000000
[  210.255341] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000001000
[  210.262511] x2 : 0000000000001000 x1 : 0000000000000005 x0 : 0000000000000044
[  210.269682] Call trace:
[  210.272133]  dev_watchdog+0x234/0x240
[  210.275811]  call_timer_fn+0x3c/0x15c
[  210.279489]  __run_timers.part.0+0x288/0x310
[  210.283777]  run_timer_softirq+0x48/0x80
[  210.287716]  __do_softirq+0x128/0x360
[  210.291392]  __irq_exit_rcu+0x138/0x140
[  210.295243]  irq_exit_rcu+0x1c/0x30
[  210.298745]  el1_interrupt+0x38/0x54
[  210.302334]  el1h_64_irq_handler+0x18/0x24
[  210.306445]  el1h_64_irq+0x7c/0x80
[  210.309857]  arch_cpu_idle+0x18/0x2c
[  210.313445]  default_idle_call+0x4c/0x140
[  210.317470]  cpuidle_idle_call+0x14c/0x1a0
[  210.321584]  do_idle+0xb0/0x100
[  210.324737]  cpu_startup_entry+0x30/0x8c
[  210.328675]  secondary_start_kernel+0xe4/0x110
[  210.333138]  __secondary_switched+0x94/0x98

The assumption when these were relaxed seems to be that device memory
would be mapped non reordering, and that other constructs
(spinlocks/etc) would provide the barriers to assure that packet data
and in memory rings/queues were ordered with respect to device
register reads/writes. This itself seems a bit sketchy, but the real
problem with GCC12 is that it is moving the actual reads/writes around
at will as though they were independent operations when in truth they
are not, but the compiler can't know that. When looking at the
assembly dumps for many of these routines its possible to see very
clean, but not strictly in program order operations occurring as the
compiler would be free to do if these weren't actually register
reads/write operations.

Its possible to suppress the timeout with a liberal bit of dma_mb()'s
sprinkled around but the device still seems unable to reliably
send/receive data. A better plan is to use the safer readl/writel
everywhere.

Since this partially reverts an older commit, which notes the use of
the relaxed variants for performance reasons. I would suggest that
any performance problems with this commit are targeted at relaxing only
the performance critical code paths after assuring proper barriers.

Fixes: 69d2ea9c79898 ("net: bcmgenet: Use correct I/O accessors")
Reported-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Acked-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220310045358.224350-1-jeremy.linton@arm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoASoC: soc-compress: prevent the potentially use of null pointer
Jiasheng Jiang [Fri, 15 Oct 2021 08:13:53 +0000 (08:13 +0000)]
ASoC: soc-compress: prevent the potentially use of null pointer

BugLink: https://bugs.launchpad.net/bugs/1968984
[ Upstream commit de2c6f98817fa5decb9b7d3b3a8a3ab864c10588 ]

There is one call trace that snd_soc_register_card()
->snd_soc_bind_card()->soc_init_pcm_runtime()
->snd_soc_dai_compress_new()->snd_soc_new_compress().
In the trace the 'codec_dai' transfers from card->dai_link,
and we can see from the snd_soc_add_pcm_runtime() in
snd_soc_bind_card() that, if value of card->dai_link->num_codecs
is 0, then 'codec_dai' could be null pointer caused
by index out of bound in 'asoc_rtd_to_codec(rtd, 0)'.
And snd_soc_register_card() is called by various platforms.
Therefore, it is better to add the check in the case of misusing.
And because 'cpu_dai' has already checked in soc_init_pcm_runtime(),
there is no need to check again.
Adding the check as follow, then if 'codec_dai' is null,
snd_soc_new_compress() will not pass through the check
'if (playback + capture != 1)', avoiding the leftover use of
'codec_dai'.

Fixes: 467fece ("ASoC: soc-dai: move snd_soc_dai_stream_valid() to soc-dai.c")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1634285633-529368-1-git-send-email-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agodrm/i915/opregion: check port number bounds for SWSCI display power state
Jani Nikula [Thu, 10 Feb 2022 10:36:42 +0000 (12:36 +0200)]
drm/i915/opregion: check port number bounds for SWSCI display power state

BugLink: https://bugs.launchpad.net/bugs/1968984
commit 24a644ebbfd3b13cda702f98907f9dd123e34bf9 upstream.

The mapping from enum port to whatever port numbering scheme is used by
the SWSCI Display Power State Notification is odd, and the memory of it
has faded. In any case, the parameter only has space for ports numbered
[0..4], and UBSAN reports bit shift beyond it when the platform has port
F or more.

Since the SWSCI functionality is supposed to be obsolete for new
platforms (i.e. ones that might have port F or more), just bail out
early if the mapped and mangled port number is beyond what the Display
Power State Notification can support.

Fixes: 9c4b0a683193 ("drm/i915: add opregion function to notify bios of encoder enable/disable")
Cc: <stable@vger.kernel.org> # v3.13+
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4800
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/cc363f42d6b5a5932b6d218fefcc8bdfb15dbbe5.1644489329.git.jani.nikula@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoALSA: pcm: Fix races among concurrent read/write and buffer changes
Takashi Iwai [Tue, 22 Mar 2022 17:07:18 +0000 (18:07 +0100)]
ALSA: pcm: Fix races among concurrent read/write and buffer changes

BugLink: https://bugs.launchpad.net/bugs/1968982
commit dca947d4d26dbf925a64a6cfb2ddbc035e831a3d upstream.

In the current PCM design, the read/write syscalls (as well as the
equivalent ioctls) are allowed before the PCM stream is running, that
is, at PCM PREPARED state.  Meanwhile, we also allow to re-issue
hw_params and hw_free ioctl calls at the PREPARED state that may
change or free the buffers, too.  The problem is that there is no
protection against those mix-ups.

This patch applies the previously introduced runtime->buffer_mutex to
the read/write operations so that the concurrent hw_params or hw_free
call can no longer interfere during the operation.  The mutex is
unlocked before scheduling, so we don't take it too long.

Cc: <stable@vger.kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220322170720.3529-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: SAUCE: shiftfs: fix missing include required in 5.18
Andrea Righi [Wed, 27 Apr 2022 16:20:41 +0000 (18:20 +0200)]
UBUNTU: SAUCE: shiftfs: fix missing include required in 5.18

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: SAUCE: shiftfs: always rely on init_user_ns
Andrea Righi [Wed, 13 Apr 2022 13:26:22 +0000 (15:26 +0200)]
UBUNTU: SAUCE: shiftfs: always rely on init_user_ns

With the porting of shiftfs from 5.15 to 5.17 some filesystem-related
functions are now passing struct user_namespace as argument, however
shiftfs logic is still relying on the fact that these functions need to
use the main filesystem namespace.

Make sure to always use init_user_ns to prevent breakage of system
components that rely on shiftfs.

Without this fix lxd was showing some issues, like failing to create any
file inside a container when shiftfs was used (e.g., using zfs as
storage pool).

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Ubuntu-unstable-5.17.0-6.6
Andrea Righi [Mon, 21 Mar 2022 08:46:03 +0000 (09:46 +0100)]
UBUNTU: Ubuntu-unstable-5.17.0-6.6

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Mon, 21 Mar 2022 08:44:46 +0000 (09:44 +0100)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1965731
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: rebase to v5.17
Andrea Righi [Mon, 21 Mar 2022 08:12:49 +0000 (09:12 +0100)]
UBUNTU: rebase to v5.17

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Start new release
Andrea Righi [Mon, 21 Mar 2022 08:12:22 +0000 (09:12 +0100)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Packaging] switch dependency from crda to wireless-regdb
Dimitri John Ledkov [Fri, 18 Mar 2022 13:58:06 +0000 (13:58 +0000)]
UBUNTU: [Packaging] switch dependency from crda to wireless-regdb

BugLink: https://bugs.launchpad.net/bugs/1958918
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
18 months agoUBUNTU: [Config] disable CONFIG_SYSFB_SIMPLEFB on amd64
Andrea Righi [Wed, 16 Mar 2022 12:24:26 +0000 (13:24 +0100)]
UBUNTU: [Config] disable CONFIG_SYSFB_SIMPLEFB on amd64

CONFIG_SYSFB_SIMPLEFB was confirmed to break the fb on several x86-64
kits, disable it for now.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Ubuntu-unstable-5.17.0-5.5
Andrea Righi [Mon, 14 Mar 2022 12:15:50 +0000 (13:15 +0100)]
UBUNTU: Ubuntu-unstable-5.17.0-5.5

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Config] update configs and annotations after rebase to v5.17-rc8
Andrea Righi [Mon, 14 Mar 2022 12:15:18 +0000 (13:15 +0100)]
UBUNTU: [Config] update configs and annotations after rebase to v5.17-rc8

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Mon, 14 Mar 2022 10:53:36 +0000 (11:53 +0100)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1964766
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: rebase to v5.17-rc8
Andrea Righi [Mon, 14 Mar 2022 11:31:13 +0000 (12:31 +0100)]
UBUNTU: rebase to v5.17-rc8

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Start new release
Andrea Righi [Mon, 14 Mar 2022 10:52:51 +0000 (11:52 +0100)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Packaging] resync dkms-build{,--nvidia-N} from LRMv5
Andy Whitcroft [Thu, 10 Mar 2022 11:49:06 +0000 (11:49 +0000)]
UBUNTU: [Packaging] resync dkms-build{,--nvidia-N} from LRMv5

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andy Whitcroft <apw@canonical.com>
18 months agoUBUNTU: Ubuntu-unstable-5.17.0-4.4
Andrea Righi [Mon, 7 Mar 2022 09:20:48 +0000 (10:20 +0100)]
UBUNTU: Ubuntu-unstable-5.17.0-4.4

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Mon, 7 Mar 2022 09:16:33 +0000 (10:16 +0100)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1963880
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: rebase to v5.17-rc7
Andrea Righi [Mon, 7 Mar 2022 09:04:23 +0000 (10:04 +0100)]
UBUNTU: rebase to v5.17-rc7

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Start new release
Andrea Righi [Mon, 7 Mar 2022 09:01:50 +0000 (10:01 +0100)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Ubuntu-unstable-5.17.0-3.3
Andrea Righi [Mon, 28 Feb 2022 08:42:32 +0000 (09:42 +0100)]
UBUNTU: Ubuntu-unstable-5.17.0-3.3

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Mon, 28 Feb 2022 08:38:49 +0000 (09:38 +0100)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1962450
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: rebase to v5.17-rc6
Andrea Righi [Mon, 28 Feb 2022 08:20:02 +0000 (09:20 +0100)]
UBUNTU: rebase to v5.17-rc6

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Start new release
Andrea Righi [Mon, 28 Feb 2022 08:19:28 +0000 (09:19 +0100)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Ubuntu-unstable-5.17.0-2.2
Andrea Righi [Thu, 24 Feb 2022 08:41:40 +0000 (09:41 +0100)]
UBUNTU: Ubuntu-unstable-5.17.0-2.2

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Config] update configs and annotations after rebase to v5.17-rc5
Andrea Righi [Thu, 24 Feb 2022 08:39:43 +0000 (09:39 +0100)]
UBUNTU: [Config] update configs and annotations after rebase to v5.17-rc5

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Thu, 24 Feb 2022 08:32:35 +0000 (09:32 +0100)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1962137
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Start new release
Andrea Righi [Thu, 24 Feb 2022 08:05:27 +0000 (09:05 +0100)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: debian/dkms-versions -- update from kernel-versions (main/master)
Andrea Righi [Wed, 23 Feb 2022 14:44:29 +0000 (15:44 +0100)]
UBUNTU: debian/dkms-versions -- update from kernel-versions (main/master)

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Config] drop unused lowlatency configs
Andrea Righi [Wed, 23 Feb 2022 14:43:07 +0000 (15:43 +0100)]
UBUNTU: [Config] drop unused lowlatency configs

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Packaging] update Ubuntu.md
Andrea Righi [Wed, 23 Feb 2022 10:46:41 +0000 (11:46 +0100)]
UBUNTU: [Packaging] update Ubuntu.md

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: SAUCE: Makefile: Fix compiler warnings
Juerg Haefliger [Mon, 14 Feb 2022 10:29:36 +0000 (11:29 +0100)]
UBUNTU: SAUCE: Makefile: Fix compiler warnings

When building out-of-tree (which we do for package builds), the compiler
emits the following warning:

cc1: warning: ubuntu/include: No such file or directory [-Wmissing-include-dirs]

Fix that by (always) using the absolute path of the include directory.

Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Acked-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agoUBUNTU: SAUCE: Makefile: Remove inclusion of lbm header files
Juerg Haefliger [Mon, 14 Feb 2022 10:29:35 +0000 (11:29 +0100)]
UBUNTU: SAUCE: Makefile: Remove inclusion of lbm header files

We haven't produced linux-headers-lbm packages in ages so stop trying
to include their header files.

Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Acked-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agoUBUNTU: [Packaging] use xz compression for ddebs
Dimitri John Ledkov [Mon, 7 Feb 2022 14:21:00 +0000 (14:21 +0000)]
UBUNTU: [Packaging] use xz compression for ddebs

ddebs are huge in size, and rarely used. Keep them xz compressed.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agoUBUNTU: [Packaging] do not use compression for image packages
Dimitri John Ledkov [Mon, 7 Feb 2022 14:20:59 +0000 (14:20 +0000)]
UBUNTU: [Packaging] do not use compression for image packages

linux-image-ABI packages contain compressed content only (vmlinuz,
changelog) and thus the deb does not benefit at all from being
recompressed again. Only copyring file is compressed. We can actually
avoid shipping /doc/ at all, by symlinking it to the modules package
provided /doc/.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agoUBUNTU: [Packaging] use default zstd compression
Dimitri John Ledkov [Mon, 7 Feb 2022 14:20:58 +0000 (14:20 +0000)]
UBUNTU: [Packaging] use default zstd compression

Revert "UBUNTU: [Packaging] enforce xz compression for debs"

This reverts commit 45da4d72dea537910d970211ff8c345f4f9a2775.

The previous commit incorrectly stated that jammy dpkg default has
switched from xz to zstd. This change was done late in impish
cycle. [1] It also incorrectly states that there are no evident benefits
for the kernel packages to use zstd.

It is correct that zstd compression may require more
resources. However, the decompression speed and decompression memory
requirements are a lot faster. The choice to switch from xz to zstd by
default in Ubuntu was done to speed up installation and upgrade of all
packages, at the expense of slightly larger download sizes.

If we do want to futher optimize compression methods it should
probably be done on per subpackage type. For example, linux-image-ABI
already contains compressed kernel image and not much else, we can
choose to not compress that deb at all with compression method
none. Debug symbols are usually rarely installed, thus it might make
sense to keep them small and thus choose compress ddebs with
xz. However modules and tools should remain compressed with zstd.

[1] https://launchpad.net/ubuntu/+source/dpkg/1.20.9ubuntu2

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agoUBUNTU: [Config] disable FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION
Paolo Pisati [Thu, 10 Feb 2022 14:34:09 +0000 (15:34 +0100)]
UBUNTU: [Config] disable FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION

BugLink: https://bugs.launchpad.net/bugs/1960516
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agoRevert "ASoC: mediatek: Check for error clk pointer"
Guenter Roeck [Sat, 5 Feb 2022 01:47:55 +0000 (17:47 -0800)]
Revert "ASoC: mediatek: Check for error clk pointer"

BugLink: https://bugs.launchpad.net/bugs/1960516
This reverts commit 38accfd85e41b7ca547c5a7d4866bbc1462950cb which is
commit 9de2b9286a6dd16966959b3cb34fc2ddfd39213e upstream

With this patch in the tree, Chromebooks running the affected hardware
no longer boot. Bisect points to this patch, and reverting it fixes
the problem.

An analysis of the code with this patch applied shows:

        ret = init_clks(pdev, clk);
        if (ret)
                return ERR_PTR(ret);
...
                for (j = 0; j < MAX_CLKS && data->clk_id[j]; j++) {
                        struct clk *c = clk[data->clk_id[j]];

                        if (IS_ERR(c)) {
                                dev_err(&pdev->dev, "%s: clk unavailable\n",
                                        data->name);
                                return ERR_CAST(c);
                        }

                        scpd->clk[j] = c;
                }

Not all clocks in the clk_names array have to be present. Only the clocks
in the data->clk_id array are actually needed. The code already checks if
the required clocks are available and bails out if not. The assumption that
all clocks have to be present is wrong, and commit 9de2b9286a6d needs to be
reverted.

Fixes: 9de2b9286a6d ("ASoC: mediatek: Check for error clk pointer")
Cc: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: Mark Brown <broonie@kernel.org>
Cc: James Liao <jamesjj.liao@mediatek.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com
Cc: Frank Wunderlich <frank-w@public-files.de>
Cc: Daniel Golle <daniel@makrotopia.org>
Link: https://lore.kernel.org/lkml/20220205014755.699603-1-linux@roeck-us.net/
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agoUBUNTU: [packaging] unhook lowlatency flavours from the build
Paolo Pisati [Thu, 3 Feb 2022 16:18:21 +0000 (17:18 +0100)]
UBUNTU: [packaging] unhook lowlatency flavours from the build

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agodrm/etnaviv: relax submit size limits
Lucas Stach [Thu, 6 Jan 2022 18:10:21 +0000 (19:10 +0100)]
drm/etnaviv: relax submit size limits

BugLink: https://bugs.launchpad.net/bugs/1959879
commit e3d26528e083e612314d4dcd713f3d5a26143ddc upstream.

While all userspace tried to limit commandstreams to 64K in size,
a bug in the Mesa driver lead to command streams of up to 128K
being submitted. Allow those to avoid breaking existing userspace.

Fixes: 6dfa2fab8ddd ("drm/etnaviv: limit submit sizes")
Cc: stable@vger.kernel.org
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agoUBUNTU: [Packaging] Update dependency of pahole / dwarves
Andrea Righi [Fri, 28 Jan 2022 15:56:27 +0000 (16:56 +0100)]
UBUNTU: [Packaging] Update dependency of pahole / dwarves

We need pahole >= 1.21 to properly support BTF, pahole used to be
provided by dwarves, but this package is going to be renamed into pahole
starting with jammy.

So to be as generic as possible, and facilitate the porting of this rule
across all kernels, specify a single dependency as following:

 - if we are in jammy => just depend on pahole
 - all the releases < jammy => depend on dwarves >= 1.21

Also add riscv64 to the list of architectures that require pahole.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agonet: axienet: Wait for PhyRstCmplt after core reset
Robert Hancock [Tue, 18 Jan 2022 21:41:25 +0000 (15:41 -0600)]
net: axienet: Wait for PhyRstCmplt after core reset

BugLink: https://bugs.launchpad.net/bugs/1959376
commit b400c2f4f4c53c86594dd57098970d97d488bfde upstream.

When resetting the device, wait for the PhyRstCmplt bit to be set
in the interrupt status register before continuing initialization, to
ensure that the core is actually ready. When using an external PHY, this
also ensures we do not start trying to access the PHY while it is still
in reset. The PHY reset is initiated by the core reset which is
triggered just above, but remains asserted for 5ms after the core is
reset according to the documentation.

The MgtRdy bit could also be waited for, but unfortunately when using
7-series devices, the bit does not appear to work as documented (it
seems to behave as some sort of link state indication and not just an
indication the transceiver is ready) so it can't really be relied on for
this purpose.

Fixes: 8a3b7a252dca9 ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver")
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agodrm/etnaviv: limit submit sizes
Lucas Stach [Fri, 17 Dec 2021 10:59:28 +0000 (11:59 +0100)]
drm/etnaviv: limit submit sizes

BugLink: https://bugs.launchpad.net/bugs/1959376
commit 6dfa2fab8ddd46faa771a102672176bee7a065de upstream.

Currently we allow rediculous amounts of kernel memory being allocated
via the etnaviv GEM_SUBMIT ioctl, which is a pretty easy DoS vector. Put
some reasonable limits in to fix this.

The commandstream size is limited to 64KB, which was already a soft limit
on older kernels after which the kernel only took submits on a best effort
base, so there is no userspace that tries to submit commandstreams larger
than this. Even if the whole commandstream is a single incrementing address
load, the size limit also limits the number of potential relocs and
referenced buffers to slightly under 64K, so use the same limit for those
arguments. The performance monitoring infrastructure currently supports
less than 50 performance counter signals, so limiting them to 128 on a
single submit seems like a reasonably future-proof number for now. This
number can be bumped if needed without breaking the interface.

Cc: stable@vger.kernel.org
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agoath9k: Fix out-of-bound memcpy in ath9k_hif_usb_rx_stream
Zekun Shen [Thu, 28 Oct 2021 22:21:42 +0000 (18:21 -0400)]
ath9k: Fix out-of-bound memcpy in ath9k_hif_usb_rx_stream

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit 6ce708f54cc8d73beca213cec66ede5ce100a781 ]

Large pkt_len can lead to out-out-bound memcpy. Current
ath9k_hif_usb_rx_stream allows combining the content of two urb
inputs to one pkt. The first input can indicate the size of the
pkt. Any remaining size is saved in hif_dev->rx_remain_len.
While processing the next input, memcpy is used with rx_remain_len.

4-byte pkt_len can go up to 0xffff, while a single input is 0x4000
maximum in size (MAX_RX_BUF_SIZE). Thus, the patch adds a check for
pkt_len which must not exceed 2 * MAX_RX_BUG_SIZE.

BUG: KASAN: slab-out-of-bounds in ath9k_hif_usb_rx_cb+0x490/0xed7 [ath9k_htc]
Read of size 46393 at addr ffff888018798000 by task kworker/0:1/23

CPU: 0 PID: 23 Comm: kworker/0:1 Not tainted 5.6.0 #63
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
BIOS rel-1.10.2-0-g5f4c7b1-prebuilt.qemu-project.org 04/01/2014
Workqueue: events request_firmware_work_func
Call Trace:
 <IRQ>
 dump_stack+0x76/0xa0
 print_address_description.constprop.0+0x16/0x200
 ? ath9k_hif_usb_rx_cb+0x490/0xed7 [ath9k_htc]
 ? ath9k_hif_usb_rx_cb+0x490/0xed7 [ath9k_htc]
 __kasan_report.cold+0x37/0x7c
 ? ath9k_hif_usb_rx_cb+0x490/0xed7 [ath9k_htc]
 kasan_report+0xe/0x20
 check_memory_region+0x15a/0x1d0
 memcpy+0x20/0x50
 ath9k_hif_usb_rx_cb+0x490/0xed7 [ath9k_htc]
 ? hif_usb_mgmt_cb+0x2d9/0x2d9 [ath9k_htc]
 ? _raw_spin_lock_irqsave+0x7b/0xd0
 ? _raw_spin_trylock_bh+0x120/0x120
 ? __usb_unanchor_urb+0x12f/0x210
 __usb_hcd_giveback_urb+0x1e4/0x380
 usb_giveback_urb_bh+0x241/0x4f0
 ? __hrtimer_run_queues+0x316/0x740
 ? __usb_hcd_giveback_urb+0x380/0x380
 tasklet_action_common.isra.0+0x135/0x330
 __do_softirq+0x18c/0x634
 irq_exit+0x114/0x140
 smp_apic_timer_interrupt+0xde/0x380
 apic_timer_interrupt+0xf/0x20

I found the bug using a custome USBFuzz port. It's a research work
to fuzz USB stack/drivers. I modified it to fuzz ath9k driver only,
providing hand-crafted usb descriptors to QEMU.

After fixing the value of pkt_tag to ATH_USB_RX_STREAM_MODE_TAG in QEMU
emulation, I found the KASAN report. The bug is triggerable whenever
pkt_len is above two MAX_RX_BUG_SIZE. I used the same input that crashes
to test the driver works when applying the patch.

Signed-off-by: Zekun Shen <bruceshenzk@gmail.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/YXsidrRuK6zBJicZ@10-18-43-117.dynapool.wireless.nyu.edu
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agoregulator: da9121: Prevent current limit change when enabled
Adam Ward [Mon, 29 Nov 2021 22:10:12 +0000 (22:10 +0000)]
regulator: da9121: Prevent current limit change when enabled

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit 24f0853228f3b98f1ef08d5824376c69bb8124d2 ]

Prevent changing current limit when enabled as a precaution against
possibile instability due to tight integration with switching cycle

Signed-off-by: Adam Ward <Adam.Ward.opensource@diasemi.com>
Link: https://lore.kernel.org/r/52ee682476004a1736c1e0293358987319c1c415.1638223185.git.Adam.Ward.opensource@diasemi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agoASoC: mediatek: Check for error clk pointer
Jiasheng Jiang [Wed, 22 Dec 2021 01:51:57 +0000 (09:51 +0800)]
ASoC: mediatek: Check for error clk pointer

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit 9de2b9286a6dd16966959b3cb34fc2ddfd39213e ]

Yes, you are right and now the return code depending on the
init_clks().

Fixes: 6078c651947a ("soc: mediatek: Refine scpsys to support multiple platform")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20211222015157.1025853-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agortw88: Disable PCIe ASPM while doing NAPI poll on 8821CE
Kai-Heng Feng [Wed, 15 Dec 2021 11:46:34 +0000 (19:46 +0800)]
rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit 24f5e38a13b5ae2b6105cda8bb47c19108e62a9a ]

Many Intel based platforms face system random freeze after commit
9e2fd29864c5 ("rtw88: add napi support").

The commit itself shouldn't be the culprit. My guess is that the 8821CE
only leaves ASPM L1 for a short period when IRQ is raised. Since IRQ is
masked during NAPI polling, the PCIe link stays at L1 and makes RX DMA
extremely slow. Eventually the RX ring becomes messed up:
[ 1133.194697] rtw_8821ce 0000:02:00.0: pci bus timeout, check dma status

Since the 8821CE hardware may fail to leave ASPM L1, manually do it in
the driver to resolve the issue.

Fixes: 9e2fd29864c5 ("rtw88: add napi support")
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=215131
BugLink: https://bugs.launchpad.net/bugs/1927808
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Jian-Hong Pan <jhp@endlessos.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20211215114635.333767-1-kai.heng.feng@canonical.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agortw88: add quirk to disable pci caps on HP 250 G7 Notebook PC
Ping-Ke Shih [Fri, 19 Nov 2021 05:24:37 +0000 (13:24 +0800)]
rtw88: add quirk to disable pci caps on HP 250 G7 Notebook PC

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit c81edb8dddaa36c4defa26240cc19127f147283f ]

8821CE causes random freezes on HP 250 G7 Notebook PC. Add a quirk
to disable pci ASPM capability.

Reported-by: rtl8821cerfe2 <rtl8821cerfe2@protonmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211119052437.8671-1-pkshih@realtek.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agonet: dsa: hellcreek: Allow PTP P2P measurements on blocked ports
Kurt Kanzenbach [Tue, 14 Dec 2021 13:45:07 +0000 (14:45 +0100)]
net: dsa: hellcreek: Allow PTP P2P measurements on blocked ports

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit cad1798d2d0811ded37d1e946c6796102e58013b ]

Allow PTP peer delay measurements on blocked ports by STP. In case of topology
changes the PTP stack can directly start with the correct delays.

Fixes: ddd56dfe52c9 ("net: dsa: hellcreek: Add PTP clock support")
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agoRevert "rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE"
Paolo Pisati [Fri, 28 Jan 2022 09:58:33 +0000 (10:58 +0100)]
Revert "rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE"

This reverts commit 1a0cba8dfcaa4b8e4d3611ee91805109575d696f.

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
18 months agoplatform/x86/intel: hid: add quirk to support Surface Go 3
Alex Hung [Fri, 3 Dec 2021 21:28:10 +0000 (14:28 -0700)]
platform/x86/intel: hid: add quirk to support Surface Go 3

BugLink: https://bugs.launchpad.net/bugs/1958418
commit 01e16cb67cce68afaeb9c7bed72299036dbb0bc1 upstream.

Similar to other systems Surface Go 3 requires a DMI quirk to enable
5 button array for power and volume buttons.

Buglink: https://github.com/linux-surface/linux-surface/issues/595
Cc: stable@vger.kernel.org
Signed-off-by: Alex Hung <alex.hung@canonical.com>
Link: https://lore.kernel.org/r/20211203212810.2666508-1-alex.hung@canonical.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <p.pisati@gmail.com>
18 months agoBluetooth: btbcm: disable read tx power for MacBook Air 8,1 and 8,2
Aditya Garg [Mon, 3 Jan 2022 13:28:42 +0000 (13:28 +0000)]
Bluetooth: btbcm: disable read tx power for MacBook Air 8,1 and 8,2

BugLink: https://bugs.launchpad.net/bugs/1958418
commit 3318ae23bbcb14b7f68e9006756ba6d970955635 upstream.

The MacBook Air 8,1 and 8,2 also need querying of LE Tx power
to be disabled for Bluetooth to work.

Signed-off-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <p.pisati@gmail.com>
18 months agoBluetooth: btusb: Add support for Foxconn MT7922A
Aaron Ma [Fri, 17 Dec 2021 09:51:50 +0000 (17:51 +0800)]
Bluetooth: btusb: Add support for Foxconn MT7922A

BugLink: https://bugs.launchpad.net/bugs/1958418
commit 6932627425d6d3849aecd43c02158a5312895ad4 upstream.

Add 2 USB IDs for MT7922A chip.
These 2 devices got the same description.

T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0489 ProdID=e0d8 Rev= 1.00

T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0489 ProdID=e0d9 Rev= 1.00
S:  Manufacturer=MediaTek Inc.
S:  Product=Wireless_Device
S:  SerialNumber=000000000
C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA
A:  FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=125us
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
I:  If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  63 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  63 Ivl=1ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=8a(I) Atr=03(Int.) MxPS=  64 Ivl=125us
E:  Ad=0a(O) Atr=03(Int.) MxPS=  64 Ivl=125us
I:  If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us
E:  Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us

Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <p.pisati@gmail.com>
18 months agoASoC: Intel: sof_sdw: Add support for SKU 0B12 product
Gongjun Song [Wed, 5 Jan 2022 08:13:05 +0000 (16:13 +0800)]
ASoC: Intel: sof_sdw: Add support for SKU 0B12 product

BugLink: https://bugs.launchpad.net/bugs/1951563
This product supports a SoundWire headset codec, SoundWire
capture from local microphones and two SoundWire amplifiers.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Gongjun Song <gongjun.song@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20211105022646.26305-10-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit f55af7055cd465f6b767a0c1126977d4529c63c8)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoASoC: Intel: sof_sdw: Add support for SKU 0B29 product
Gongjun Song [Wed, 5 Jan 2022 08:13:03 +0000 (16:13 +0800)]
ASoC: Intel: sof_sdw: Add support for SKU 0B29 product

BugLink: https://bugs.launchpad.net/bugs/1951563
This product supports a SoundWire headset codec, SoundWire
capture from local microphones and two SoundWire amplifiers.

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20211105022646.26305-8-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 0c2ed4f03f0bfe2be34efbabbebe9875c3aa9ca9)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoASoC: Intel: sof_sdw: Add support for SKU 0B13 product
Gongjun Song [Wed, 5 Jan 2022 08:13:01 +0000 (16:13 +0800)]
ASoC: Intel: sof_sdw: Add support for SKU 0B13 product

BugLink: https://bugs.launchpad.net/bugs/1951563
This product supports SoundWire capture from local microphones
and one SoundWire amplifier(no headset codec).

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20211105022646.26305-6-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 6448d0596e48dbc16a910f04ffc248c3f3c0a65c)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agox86: ACPI: cstate: Optimize C3 entry on AMD CPUs
Deepak Sharma [Thu, 6 Jan 2022 21:08:37 +0000 (14:08 -0700)]
x86: ACPI: cstate: Optimize C3 entry on AMD CPUs

BugLink: https://bugs.launchpad.net/bugs/1941893
All Zen or newer CPU which support C3 shares cache. Its not necessary to
flush the caches in software before entering C3. This will cause drop in
performance for the cores which share some caches. ARB_DIS is not used
with current AMD C state implementation. So set related flags correctly.

Signed-off-by: Deepak Sharma <deepak.sharma@amd.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit a8fb40966f19ff81520d9ccf8f7e2b95201368b8)
Signed-off-by: Alex Hung <alex.hung@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agonet: wwan: iosm: Keep device at D0 for s2idle case
Kai-Heng Feng [Wed, 5 Jan 2022 10:02:28 +0000 (18:02 +0800)]
net: wwan: iosm: Keep device at D0 for s2idle case

BugLink: https://bugs.launchpad.net/bugs/1956443
We are seeing spurious wakeup caused by Intel 7560 WWAN on AMD laptops.
This prevent those laptops to stay in s2idle state.

>From what I can understand, the intention of ipc_pcie_suspend() is to
put the device to D3cold, and ipc_pcie_suspend_s2idle() is to keep the
device at D0. However, the device can still be put to D3hot/D3cold by
PCI core.

So explicitly let PCI core know this device should stay at D0, to solve
the spurious wakeup.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f4dd5174e2739ab0aeda14b32847e587e78ff3d9 linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Packaging] resync getabis
Andrea Righi [Tue, 22 Feb 2022 15:57:08 +0000 (16:57 +0100)]
UBUNTU: [Packaging] resync getabis

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Ubuntu-unstable-5.17.0-1.1
Andrea Righi [Mon, 21 Feb 2022 07:22:18 +0000 (08:22 +0100)]
UBUNTU: Ubuntu-unstable-5.17.0-1.1

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: debian/dkms-versions -- update from kernel-versions (main/master)
Andrea Righi [Mon, 21 Feb 2022 06:48:36 +0000 (07:48 +0100)]
UBUNTU: debian/dkms-versions -- update from kernel-versions (main/master)

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Config] update configs and annotation after rebase to 5.17-rc1
Andrea Righi [Tue, 1 Feb 2022 08:09:14 +0000 (09:09 +0100)]
UBUNTU: [Config] update configs and annotation after rebase to 5.17-rc1

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: link-to-tracker: update tracking bug
Andrea Righi [Fri, 28 Jan 2022 16:54:58 +0000 (17:54 +0100)]
UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1959422
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: Start new release
Andrea Righi [Fri, 28 Jan 2022 16:27:23 +0000 (17:27 +0100)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
18 months agoUBUNTU: [Packaging] update Ubuntu.md
Andrea Righi [Fri, 28 Jan 2022 16:19:00 +0000 (17:19 +0100)]
UBUNTU: [Packaging] update Ubuntu.md

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>