Kernel
Threads by month
- ----- 2025 -----
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- 26 participants
- 18028 discussions
Backport 5.10.87 LTS patches from upstream.
Adrian Hunter (8):
perf inject: Fix itrace space allowed for new attributes
perf intel-pt: Fix some PGE (packet generation enable/control flow
packets) usage
perf intel-pt: Fix sync state when a PSB (synchronization) packet is
found
perf intel-pt: Fix intel_pt_fup_event() assumptions about setting
state type
perf intel-pt: Fix state setting when receiving overflow (OVF) packet
perf intel-pt: Fix next 'err' value, walking trace
perf intel-pt: Fix missing 'instruction' events with 'q' option
perf intel-pt: Fix error timestamp setting on the decoder error path
Alexander Stein (1):
Revert "tty: serial: fsl_lpuart: drop earlycon entry for i.MX8QXP"
Antoine Tenart (1):
ethtool: do not perform operations on net devices being unregistered
Armin Wolf (1):
hwmon: (dell-smm) Fix warning on /proc/i8k creation error
Bui Quang Minh (1):
bpf: Fix integer overflow in argument calculation for
bpf_map_area_alloc
Chen Jun (1):
tracing: Fix a kmemleak false positive in tracing_map
Erik Ekman (1):
net/mlx4_en: Update reported link modes for 1/10G
Harshit Mogalapalli (1):
net: netlink: af_netlink: Prevent empty skb by adding a check on len.
Helge Deller (1):
parisc/agp: Annotate parisc agp init functions with __init
Ilie Halip (1):
s390/test_unwind: use raw opcode instead of invalid instruction
Kai Vehmanen (2):
ALSA: hda: Add Intel DG2 PCI ID and HDMI codec vid
ALSA: hda/hdmi: fix HDA codec entry table order for ADL-P
Marc Zyngier (1):
KVM: arm64: Save PSTATE early on exit
Mike Rapoport (4):
memblock: free_unused_memmap: use pageblock units instead of MAX_ORDER
memblock: align freed memory map on pageblock boundaries with
SPARSEMEM
arm: extend pfn_valid to take into account freed memory map alignment
arm: ioremap: don't abuse pfn_valid() to check if pfn is in RAM
Miklos Szeredi (1):
fuse: make sure reclaim doesn't write the inode
Mustapha Ghaddar (1):
drm/amd/display: Fix for the no Audio bug with Tiled Displays
Nikita Yushchenko (1):
staging: most: dim2: use device release method
Ondrej Jirman (1):
i2c: rk3x: Handle a spurious start completion interrupt flag
Perry Yuan (1):
drm/amd/display: add connector type check for CRC source set
Philip Chen (1):
drm/msm/dsi: set default num_data_lanes
Sean Christopherson (1):
KVM: x86: Ignore sparse banks size for an "all CPUs", non-sparse IPI
req
Tadeusz Struk (1):
nfc: fix segfault in nfc_genl_dump_devices_done
arch/arm/mm/init.c | 37 ++++++---
arch/arm/mm/ioremap.c | 4 +-
arch/arm64/kvm/hyp/include/hyp/switch.h | 6 ++
arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 7 +-
arch/s390/lib/test_unwind.c | 5 +-
arch/x86/kvm/hyperv.c | 7 +-
drivers/char/agp/parisc-agp.c | 6 +-
.../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 8 ++
.../gpu/drm/amd/display/dc/core/dc_resource.c | 4 +
drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +
drivers/hwmon/dell-smm-hwmon.c | 7 +-
drivers/i2c/busses/i2c-rk3x.c | 4 +-
.../net/ethernet/mellanox/mlx4/en_ethtool.c | 6 +-
drivers/staging/most/dim2/dim2.c | 55 ++++++------
drivers/tty/serial/fsl_lpuart.c | 1 +
fs/fuse/dir.c | 8 ++
fs/fuse/file.c | 15 ++++
fs/fuse/fuse_i.h | 1 +
fs/fuse/inode.c | 3 +
kernel/bpf/devmap.c | 4 +-
kernel/trace/tracing_map.c | 3 +
net/core/sock_map.c | 2 +-
net/ethtool/netlink.h | 3 +
net/netlink/af_netlink.c | 5 ++
net/nfc/netlink.c | 6 +-
sound/pci/hda/hda_intel.c | 12 ++-
sound/pci/hda/patch_hdmi.c | 3 +-
tools/perf/builtin-inject.c | 2 +-
.../util/intel-pt-decoder/intel-pt-decoder.c | 83 ++++++++++++-------
tools/perf/util/intel-pt.c | 1 +
30 files changed, 220 insertions(+), 90 deletions(-)
--
2.20.1
1
32

[PATCH openEuler-5.10 1/5] cgroup: cgroup.{procs,threads} factor out common parts
by Zheng Zengkai 14 Jan '22
by Zheng Zengkai 14 Jan '22
14 Jan '22
From: Michal Koutný <mkoutny(a)suse.com>
mainline inclusion
from mainline-v5.12-rc1
commit da70862efe0065bada33d67a903270cdbbaf07d9
bugzilla: 186050 https://gitee.com/openeuler/kernel/issues/I4DDEL
CVE: CVE-2021-4197
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
The functions cgroup_threads_write and cgroup_procs_write are almost
identical. In order to reduce duplication, factor out the common code in
similar fashion we already do for other threadgroup/task functions. No
functional changes are intended.
Suggested-by: Hao Lee <haolee.swjtu(a)gmail.com>
Signed-off-by: Michal Koutný <mkoutny(a)suse.com>
Reviewed-by: Daniel Jordan <daniel.m.jordan(a)oracle.com>
Signed-off-by: Tejun Heo <tj(a)kernel.org>
Signed-off-by: Lu Jialin <lujialin4(a)huawei.com>
Signed-off-by: Zheng Zengkai <zhengzengkai(a)huawei.com>
---
kernel/cgroup/cgroup.c | 55 +++++++++++-------------------------------
1 file changed, 14 insertions(+), 41 deletions(-)
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 353369a1bc6b..c76dbb03e887 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -4835,8 +4835,8 @@ static int cgroup_attach_permissions(struct cgroup *src_cgrp,
return ret;
}
-static ssize_t cgroup_procs_write(struct kernfs_open_file *of,
- char *buf, size_t nbytes, loff_t off)
+static ssize_t __cgroup_procs_write(struct kernfs_open_file *of, char *buf,
+ bool threadgroup)
{
struct cgroup *src_cgrp, *dst_cgrp;
struct task_struct *task;
@@ -4847,7 +4847,7 @@ static ssize_t cgroup_procs_write(struct kernfs_open_file *of,
if (!dst_cgrp)
return -ENODEV;
- task = cgroup_procs_write_start(buf, true, &locked);
+ task = cgroup_procs_write_start(buf, threadgroup, &locked);
ret = PTR_ERR_OR_ZERO(task);
if (ret)
goto out_unlock;
@@ -4857,19 +4857,26 @@ static ssize_t cgroup_procs_write(struct kernfs_open_file *of,
src_cgrp = task_cgroup_from_root(task, &cgrp_dfl_root);
spin_unlock_irq(&css_set_lock);
+ /* process and thread migrations follow same delegation rule */
ret = cgroup_attach_permissions(src_cgrp, dst_cgrp,
- of->file->f_path.dentry->d_sb, true);
+ of->file->f_path.dentry->d_sb, threadgroup);
if (ret)
goto out_finish;
- ret = cgroup_attach_task(dst_cgrp, task, true);
+ ret = cgroup_attach_task(dst_cgrp, task, threadgroup);
out_finish:
cgroup_procs_write_finish(task, locked);
out_unlock:
cgroup_kn_unlock(of->kn);
- return ret ?: nbytes;
+ return ret;
+}
+
+static ssize_t cgroup_procs_write(struct kernfs_open_file *of,
+ char *buf, size_t nbytes, loff_t off)
+{
+ return __cgroup_procs_write(of, buf, true) ?: nbytes;
}
static void *cgroup_threads_start(struct seq_file *s, loff_t *pos)
@@ -4880,41 +4887,7 @@ static void *cgroup_threads_start(struct seq_file *s, loff_t *pos)
static ssize_t cgroup_threads_write(struct kernfs_open_file *of,
char *buf, size_t nbytes, loff_t off)
{
- struct cgroup *src_cgrp, *dst_cgrp;
- struct task_struct *task;
- ssize_t ret;
- bool locked;
-
- buf = strstrip(buf);
-
- dst_cgrp = cgroup_kn_lock_live(of->kn, false);
- if (!dst_cgrp)
- return -ENODEV;
-
- task = cgroup_procs_write_start(buf, false, &locked);
- ret = PTR_ERR_OR_ZERO(task);
- if (ret)
- goto out_unlock;
-
- /* find the source cgroup */
- spin_lock_irq(&css_set_lock);
- src_cgrp = task_cgroup_from_root(task, &cgrp_dfl_root);
- spin_unlock_irq(&css_set_lock);
-
- /* thread migrations follow the cgroup.procs delegation rule */
- ret = cgroup_attach_permissions(src_cgrp, dst_cgrp,
- of->file->f_path.dentry->d_sb, false);
- if (ret)
- goto out_finish;
-
- ret = cgroup_attach_task(dst_cgrp, task, false);
-
-out_finish:
- cgroup_procs_write_finish(task, locked);
-out_unlock:
- cgroup_kn_unlock(of->kn);
-
- return ret ?: nbytes;
+ return __cgroup_procs_write(of, buf, false) ?: nbytes;
}
/* cgroup core interface files for the default hierarchy */
--
2.20.1
1
4

[PATCH openEuler-5.10] netfilter: selftest: conntrack_vrf.sh: fix file permission
by Zheng Zengkai 14 Jan '22
by Zheng Zengkai 14 Jan '22
14 Jan '22
From: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
stable inclusion
from stable-v5.10.86
commit 32414491834c80ab39519467deb3f8d1e4f5bade
bugzilla: 186045 https://gitee.com/openeuler/kernel/issues/I4QVPD
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
When backporting 33b8aad21ac1 ("selftests: netfilter: add a
vrf+conntrack testcase") to this stable branch, the executable bits were
not properly set on the
tools/testing/selftests/netfilter/conntrack_vrf.sh file due to quilt not
honoring them.
Fix this up manually by setting the correct mode.
Reported-by: "Rantala, Tommi T. (Nokia - FI/Espoo)" <tommi.t.rantala(a)nokia.com>
Link: https://lore.kernel.org/r/234d7a6a81664610fdf21ac72730f8bd10d3f46f.camel@no…
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Chen Jun <chenjun102(a)huawei.com>
Signed-off-by: Zheng Zengkai <zhengzengkai(a)huawei.com>
---
tools/testing/selftests/netfilter/conntrack_vrf.sh | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 tools/testing/selftests/netfilter/conntrack_vrf.sh
diff --git a/tools/testing/selftests/netfilter/conntrack_vrf.sh b/tools/testing/selftests/netfilter/conntrack_vrf.sh
old mode 100644
new mode 100755
--
2.20.1
1
0
Backport 5.10.85 LTS patches from upstream.
Alan Young (1):
ALSA: ctl: Fix copy of updated id with element read/write
Alexander Stein (1):
dt-bindings: net: Reintroduce PHY no lane swap binding
Alexander Sverdlin (1):
nfsd: Fix nsfd startup race (again)
Alyssa Ross (1):
iio: trigger: stm32-timer: fix MODULE_ALIAS
Andrea Mayer (1):
seg6: fix the iif in the IPv6 socket control block
Arnaldo Carvalho de Melo (1):
tools build: Remove needless libpython-version feature check that
breaks test-all fast path
Bas Nieuwenhuizen (1):
drm/syncobj: Deal with signalled fences in drm_syncobj_find_fence.
Benjamin Tissoires (1):
HID: bigbenff: prevent null pointer dereference
Billy Tsai (1):
irqchip/aspeed-scu: Replace update_bits with write_bits.
Björn Töpel (1):
bpf, x86: Fix "no previous prototype" warning
Brian Silverman (1):
can: m_can: Disable and ignore ELO interrupt
Dan Carpenter (3):
can: sja1000: fix use after free in ems_pcmcia_add_card()
net: altera: set a couple error code in probe()
net/qla3xxx: fix an error code in ql_adapter_up()
Davidlohr Bueso (1):
block: fix ioprio_get(IOPRIO_WHO_PGRP) vs setuid(2)
Dmitry Baryshkov (1):
clk: qcom: regmap-mux: fix parent clock lookup
Eric Biggers (5):
wait: add wake_up_pollfree()
binder: use wake_up_pollfree()
signalfd: use wake_up_pollfree()
aio: keep poll requests on waitqueue until completed
aio: fix use-after-free due to missing POLLFREE handling
Eric Dumazet (5):
bonding: make tx_rebalance_counter an atomic
netfilter: conntrack: annotate data-races around ct->timeout
devlink: fix netns refcount leak in devlink_nl_cmd_reload()
net/sched: fq_pie: prevent dismantle issue
net, neigh: clear whole pneigh_entry at alloc time
Evgeny Boger (1):
iio: adc: axp20x_adc: fix charging current reporting on AXP22x
Fabrice Gasnier (1):
iio: adc: stm32: fix a current leak by resetting pcsel before
disabling vdda
Florian Westphal (1):
selftests: netfilter: add a vrf+conntrack testcase
Greg Kroah-Hartman (7):
HID: add hid_is_usb() function to make it simpler for USB detection
HID: add USB_HID dependancy to hid-prodikeys
HID: add USB_HID dependancy to hid-chicony
HID: add USB_HID dependancy on some USB HID drivers
HID: wacom: fix problems when device is not a valid USB device
HID: check for valid USB device for many HID drivers
USB: gadget: zero allocate endpoint 0 buffers
Gwendal Grignou (1):
iio: at91-sama5d2: Fix incorrect sign extension
Hannes Reinecke (1):
libata: add horkage for ASMedia 1092
Hans de Goede (1):
HID: quirks: Add quirk for the Microsoft Surface 3 type-cover
Herve Codina (2):
mtd: rawnand: fsmc: Take instruction delay into account
mtd: rawnand: fsmc: Fix timing computation
Ian Rogers (1):
perf tools: Fix SMT detection fast read path
Igor Pylypiv (1):
scsi: pm80xx: Do not call scsi_remove_host() in pm8001_alloc()
J. Bruce Fields (1):
nfsd: fix use-after-free due to delegation race
James Zhu (3):
drm/amdkfd: separate kfd_iommu_resume from kfd_resume
drm/amdgpu: add amdgpu_amdkfd_resume_iommu
drm/amdgpu: move iommu_resume before ip init/resume
Jesse Brandeburg (1):
ice: ignore dropped packets during init
Jeya R (1):
misc: fastrpc: fix improper packet size calculation
Jianglei Nie (1):
nfp: Fix memory leak in nfp_cpp_area_cache_add()
Jianguo Wu (1):
udp: using datalen to cap max gso segments
Jimmy Assarsson (2):
can: kvaser_usb: get CAN clock frequency from device
can: kvaser_pciefd: kvaser_pciefd_rx_error_frame(): increase correct
stats->{rx,tx}_errors counter
Joakim Zhang (1):
net: fec: only clear interrupt of handling queue in
fec_enet_rx_queue()
Josef Bacik (1):
btrfs: clear extent buffer uptodate when we fail to write it
Kai-Heng Feng (1):
xhci: Remove CONFIG_USB_DEFAULT_PERSIST to prevent xHCI from runtime
suspending
Kailang Yang (1):
ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 platform
Karen Sornek (1):
i40e: Fix failed opcode appearing if handling messages from VF
Kelly Devilliv (1):
csky: fix typo of fpu config macro
Kister Genesis Jimenez (1):
iio: gyro: adxrs290: fix data signedness
Krzysztof Kozlowski (1):
nfc: fix potential NULL pointer deref in nfc_genl_dump_ses_done
Lang Yu (1):
drm/amd/amdkfd: adjust dummy functions' placement
Lars-Peter Clausen (8):
iio: trigger: Fix reference counting
iio: stk3310: Don't return error code in interrupt handler
iio: mma8452: Fix trigger reference couting
iio: ltr501: Don't return error code in trigger handler
iio: kxsd9: Don't return error code in trigger handler
iio: itg3200: Call iio_trigger_notify_done() on error
iio: dln2: Check return value of devm_iio_trigger_register()
iio: ad7768-1: Call iio_trigger_notify_done() on error
Lee Jones (1):
net: cdc_ncm: Allow for dwNtbOutMaxSize to be unset or zero
Louis Amas (1):
net: mvpp2: fix XDP rx queues registering
Lukas Bulwahn (1):
MAINTAINERS: adjust GCC PLUGINS after gcc-plugin.sh removal
Manish Chopra (1):
qede: validate non LSO skb length
Manjong Lee (1):
mm: bdi: initialize bdi_min_ratio when bdi is unregistered
Marek Behún (1):
Revert "PCI: aardvark: Fix support for PCI_ROM_ADDRESS1 on emulated
bridge"
Markus Hochholdinger (1):
md: fix update super 1.0 on rdev size change
Masahiro Yamada (3):
gcc-plugins: simplify GCC plugin-dev capability test
kbuild: simplify GCC_PLUGINS enablement in dummy-tools/gcc
doc: gcc-plugins: update gcc-plugins.rst
Mateusz Palczewski (1):
i40e: Fix pre-set max number of queues for VF
Mathias Nyman (1):
xhci: avoid race between disable slot command and host runtime suspend
Maxim Mikityanskiy (2):
bpf: Fix the off-by-two error in range markings
bpf: Add selftests to cover packet access corner cases
Michal Maloszewski (1):
iavf: Fix reporting when setting descriptor count
Mike Marciniszyn (4):
IB/hfi1: Insure use of smp_processor_id() is preempt disabled
IB/hfi1: Fix early init panic
IB/hfi1: Fix leak of rcvhdrtail_dummy_kvaddr
IB/hfi1: Correct guard on eager buffer deallocation
Miles Chen (1):
clk: imx: use module_platform_driver
Mitch Williams (1):
iavf: restore MSI state on reset
Nicolas Dichtel (1):
vrf: don't run conntrack on vrf with !dflt qdisc
Noralf Trønnes (1):
iio: dln2-adc: Fix lockdep complaint
Norbert Zulinski (1):
i40e: Fix NULL pointer dereference in i40e_dbg_dump_desc
Pali Rohár (2):
irqchip/armada-370-xp: Fix return value of armada_370_xp_msi_alloc()
irqchip/armada-370-xp: Fix support for Multi-MSI interrupts
Pavel Hofman (2):
usb: core: config: fix validation of wMaxPacketValue entries
usb: core: config: using bit mask instead of individual bits
Peilin Ye (1):
selftests/fib_tests: Rework fib_rp_filter_test()
Qu Wenruo (1):
btrfs: replace the BUG_ON in btrfs_del_root_ref with proper error
handling
Rafael J. Wysocki (1):
PM: runtime: Fix pm_runtime_active() kerneldoc comment
Rob Clark (1):
ASoC: rt5682: Fix crash due to out of scope stack vars
Robert Karszniewicz (1):
Documentation/Kbuild: Remove references to gcc-plugin.sh
Roman Bolshakov (1):
scsi: qla2xxx: Format log strings only if needed
Sebastian Andrzej Siewior (1):
Documentation/locking/locktypes: Update migrate_disable() bits.
Shin'ichiro Kawasaki (1):
scsi: scsi_debug: Fix buffer size of REPORT ZONES command
Srinivas Kandagatla (4):
ASoC: qdsp6: q6routing: Fix return value from
msm_routing_put_audio_mixer
ASoC: codecs: wsa881x: fix return values from kcontrol put
ASoC: codecs: wcd934x: handle channel mappping list correctly
ASoC: codecs: wcd934x: return correct value from mixer put
Stefano Brivio (1):
nft_set_pipapo: Fix bucket load in AVX2 lookup routine for six 8-bit
groups
Steven Rostedt (VMware) (2):
tracefs: Have new files inherit the ownership of their parent
tracefs: Set all files to the same group ownership as the mount option
Takashi Iwai (3):
ALSA: pcm: oss: Fix negative period/buffer sizes
ALSA: pcm: oss: Limit the period size to 16MB
ALSA: pcm: oss: Handle missing errors in snd_pcm_oss_change_params*()
Thomas Haemmerle (1):
usb: gadget: uvc: fix multiple opens
Tom Lendacky (1):
x86/sme: Explicitly map new EFI memmap table as encrypted
Valdis Kletnieks (1):
gcc-plugins: fix gcc 11 indigestion with plugins...
Vincent Mailhol (1):
can: pch_can: pch_can_rx_normal: fix use after free
Vitaly Kuznetsov (1):
KVM: x86: Wait for IPIs to be delivered when handling Hyper-V TLB
flush hypercall
Vladimir Murzin (1):
irqchip: nvic: Fix offset for Interrupt Priority Offsets
Werner Sembach (1):
ALSA: hda/realtek: Fix quirk for TongFang PHxTxX1
Wolfram Sang (1):
mmc: renesas_sdhi: initialize variable properly when tuning
Wudi Wang (1):
irqchip/irq-gic-v3-its.c: Force synchronisation when issuing INVALL
Yang Yingliang (1):
iio: accel: kxcjk-1013: Fix possible memory leak in probe and remove
Yangyang Li (2):
RDMA/hns: Do not halt commands during reset until later
RDMA/hns: Do not destroy QP resources in the hw resetting phase
Yifan Zhang (2):
drm/amdgpu: init iommu after amdkfd device init
drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
xiazhengqiao (1):
HID: google: add eel USB id
.../devicetree/bindings/net/ethernet-phy.yaml | 8 +
Documentation/kbuild/gcc-plugins.rst | 47 +-
Documentation/locking/locktypes.rst | 9 +-
MAINTAINERS | 1 -
arch/csky/kernel/traps.c | 4 +-
arch/x86/Kconfig | 1 +
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/platform/efi/quirks.c | 3 +-
block/ioprio.c | 3 +
drivers/android/binder.c | 21 +-
drivers/ata/libata-core.c | 2 +
drivers/clk/imx/clk-imx8qxp-lpcg.c | 2 +-
drivers/clk/imx/clk-imx8qxp.c | 2 +-
drivers/clk/qcom/clk-regmap-mux.c | 2 +-
drivers/clk/qcom/common.c | 12 +
drivers/clk/qcom/common.h | 2 +
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 97 +--
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 145 +++-
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +
drivers/gpu/drm/amd/amdkfd/kfd_device.c | 15 +-
drivers/gpu/drm/drm_syncobj.c | 11 +-
drivers/hid/Kconfig | 10 +-
drivers/hid/hid-asus.c | 6 +-
drivers/hid/hid-bigbenff.c | 2 +-
drivers/hid/hid-chicony.c | 8 +-
drivers/hid/hid-corsair.c | 7 +-
drivers/hid/hid-elan.c | 2 +-
drivers/hid/hid-elo.c | 3 +
drivers/hid/hid-google-hammer.c | 2 +
drivers/hid/hid-holtek-kbd.c | 9 +-
drivers/hid/hid-holtek-mouse.c | 9 +
drivers/hid/hid-ids.h | 2 +
drivers/hid/hid-lg.c | 10 +-
drivers/hid/hid-logitech-dj.c | 2 +-
drivers/hid/hid-prodikeys.c | 10 +-
drivers/hid/hid-quirks.c | 1 +
drivers/hid/hid-roccat-arvo.c | 3 +
drivers/hid/hid-roccat-isku.c | 3 +
drivers/hid/hid-roccat-kone.c | 3 +
drivers/hid/hid-roccat-koneplus.c | 3 +
drivers/hid/hid-roccat-konepure.c | 3 +
drivers/hid/hid-roccat-kovaplus.c | 3 +
drivers/hid/hid-roccat-lua.c | 3 +
drivers/hid/hid-roccat-pyra.c | 3 +
drivers/hid/hid-roccat-ryos.c | 3 +
drivers/hid/hid-roccat-savu.c | 3 +
drivers/hid/hid-samsung.c | 3 +
drivers/hid/hid-u2fzero.c | 2 +-
drivers/hid/hid-uclogic-core.c | 3 +
drivers/hid/hid-uclogic-params.c | 3 +-
drivers/hid/wacom_sys.c | 19 +-
drivers/iio/accel/kxcjk-1013.c | 5 +-
drivers/iio/accel/kxsd9.c | 6 +-
drivers/iio/accel/mma8452.c | 2 +-
drivers/iio/adc/ad7768-1.c | 2 +-
drivers/iio/adc/at91-sama5d2_adc.c | 3 +-
drivers/iio/adc/axp20x_adc.c | 18 +-
drivers/iio/adc/dln2-adc.c | 21 +-
drivers/iio/adc/stm32-adc.c | 1 +
drivers/iio/gyro/adxrs290.c | 5 +-
drivers/iio/gyro/itg3200_buffer.c | 2 +-
drivers/iio/industrialio-trigger.c | 1 -
drivers/iio/light/ltr501.c | 2 +-
drivers/iio/light/stk3310.c | 6 +-
drivers/iio/trigger/stm32-timer-trigger.c | 2 +-
drivers/infiniband/hw/hfi1/chip.c | 2 +
drivers/infiniband/hw/hfi1/driver.c | 2 +
drivers/infiniband/hw/hfi1/init.c | 40 +-
drivers/infiniband/hw/hfi1/sdma.c | 2 +-
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 14 +-
drivers/irqchip/irq-armada-370-xp.c | 16 +-
drivers/irqchip/irq-aspeed-scu-ic.c | 4 +-
drivers/irqchip/irq-gic-v3-its.c | 2 +-
drivers/irqchip/irq-nvic.c | 2 +-
drivers/md/md.c | 1 +
drivers/misc/fastrpc.c | 10 +-
drivers/mmc/host/renesas_sdhi_core.c | 2 +-
drivers/mtd/nand/raw/fsmc_nand.c | 36 +-
drivers/net/bonding/bond_alb.c | 14 +-
drivers/net/can/kvaser_pciefd.c | 8 +-
drivers/net/can/m_can/m_can.c | 14 +-
drivers/net/can/pch_can.c | 2 +-
drivers/net/can/sja1000/ems_pcmcia.c | 7 +-
.../net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 101 ++-
drivers/net/ethernet/altera/altera_tse_main.c | 9 +-
drivers/net/ethernet/freescale/fec.h | 3 +
drivers/net/ethernet/freescale/fec_main.c | 2 +-
.../net/ethernet/intel/i40e/i40e_debugfs.c | 8 +
.../ethernet/intel/i40e/i40e_virtchnl_pf.c | 75 ++-
.../ethernet/intel/i40e/i40e_virtchnl_pf.h | 2 +
.../net/ethernet/intel/iavf/iavf_ethtool.c | 43 +-
drivers/net/ethernet/intel/iavf/iavf_main.c | 1 +
drivers/net/ethernet/intel/ice/ice_main.c | 3 +
.../net/ethernet/marvell/mvpp2/mvpp2_main.c | 4 +-
.../netronome/nfp/nfpcore/nfp_cppcore.c | 4 +-
drivers/net/ethernet/qlogic/qede/qede_fp.c | 7 +
drivers/net/ethernet/qlogic/qla3xxx.c | 19 +-
drivers/net/usb/cdc_ncm.c | 2 +
drivers/net/vrf.c | 8 +-
drivers/pci/controller/pci-aardvark.c | 9 -
drivers/scsi/pm8001/pm8001_init.c | 6 +-
drivers/scsi/qla2xxx/qla_dbg.c | 3 +
drivers/scsi/scsi_debug.c | 2 +-
drivers/usb/core/config.c | 6 +-
drivers/usb/gadget/function/uvc.h | 2 +
drivers/usb/gadget/function/uvc_v4l2.c | 49 +-
drivers/usb/gadget/legacy/dbgp.c | 2 +-
drivers/usb/host/xhci-hub.c | 1 +
drivers/usb/host/xhci-ring.c | 1 -
drivers/usb/host/xhci.c | 26 +-
fs/aio.c | 184 ++++-
fs/btrfs/extent_io.c | 6 +
fs/btrfs/root-tree.c | 3 +-
fs/nfsd/nfs4recover.c | 1 +
fs/nfsd/nfs4state.c | 9 +-
fs/nfsd/nfsctl.c | 14 +-
fs/signalfd.c | 12 +-
fs/tracefs/inode.c | 76 +++
include/linux/bpf.h | 1 +
include/linux/hid.h | 5 +
include/linux/pm_runtime.h | 2 +-
include/linux/wait.h | 26 +
include/net/bond_alb.h | 2 +-
include/net/netfilter/nf_conntrack.h | 6 +-
include/uapi/asm-generic/poll.h | 2 +-
kernel/bpf/verifier.c | 2 +-
kernel/sched/wait.c | 7 +
mm/backing-dev.c | 7 +
net/core/devlink.c | 16 +-
net/core/neighbour.c | 3 +-
net/ipv4/udp.c | 2 +-
net/ipv6/seg6_iptunnel.c | 8 +
net/netfilter/nf_conntrack_core.c | 6 +-
net/netfilter/nf_conntrack_netlink.c | 2 +-
net/netfilter/nf_flow_table_core.c | 4 +-
net/netfilter/nft_set_pipapo_avx2.c | 2 +-
net/nfc/netlink.c | 6 +-
net/sched/sch_fq_pie.c | 1 +
scripts/dummy-tools/gcc | 10 +-
scripts/gcc-plugin.sh | 19 -
scripts/gcc-plugins/Kconfig | 2 +-
scripts/gcc-plugins/Makefile | 4 +-
sound/core/control_compat.c | 3 +
sound/core/oss/pcm_oss.c | 37 +-
sound/pci/hda/patch_realtek.c | 80 ++-
sound/soc/codecs/rt5682.c | 10 +-
sound/soc/codecs/wcd934x.c | 126 +++-
sound/soc/codecs/wsa881x.c | 16 +-
sound/soc/qcom/qdsp6/q6routing.c | 8 +-
tools/build/Makefile.feature | 1 -
tools/build/feature/Makefile | 4 -
tools/build/feature/test-all.c | 5 -
tools/build/feature/test-libpython-version.c | 11 -
tools/perf/Makefile.config | 2 -
tools/perf/util/smt.c | 2 +-
.../bpf/verifier/xdp_direct_packet_access.c | 632 +++++++++++++++++-
tools/testing/selftests/net/fib_tests.sh | 59 +-
tools/testing/selftests/netfilter/Makefile | 3 +-
.../selftests/netfilter/conntrack_vrf.sh | 241 +++++++
159 files changed, 2201 insertions(+), 681 deletions(-)
delete mode 100755 scripts/gcc-plugin.sh
delete mode 100644 tools/build/feature/test-libpython-version.c
create mode 100644 tools/testing/selftests/netfilter/conntrack_vrf.sh
--
2.20.1
1
131

14 Jan '22
From: Hangyu Hua <hbh25y(a)gmail.com>
mainline inclusion
from mainline-v5.16-rc6
commit 5f9562ebe710c307adc5f666bf1a2162ee7977c0
bugzilla: 185989 https://gitee.com/openeuler/kernel/issues/I4DDEL
CVE: CVE-2021-45480
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
--------------------------------
__rds_conn_create() did not release conn->c_path when loop_trans != 0 and
trans->t_prefer_loopback != 0 and is_outgoing == 0.
Fixes: aced3ce57cd3 ("RDS tcp loopback connection can hang")
Signed-off-by: Hangyu Hua <hbh25y(a)gmail.com>
Reviewed-by: Sharath Srinivasan <sharath.srinivasan(a)oracle.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Baisong Zhong zhongbaisong(a)huawei.com
Signed-off-by: Zheng Zengkai <zhengzengkai(a)huawei.com>
---
net/rds/connection.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/rds/connection.c b/net/rds/connection.c
index a3bc4b54d491..b4cc699c5fad 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -253,6 +253,7 @@ static struct rds_connection *__rds_conn_create(struct net *net,
* should end up here, but if it
* does, reset/destroy the connection.
*/
+ kfree(conn->c_path);
kmem_cache_free(rds_conn_slab, conn);
conn = ERR_PTR(-EOPNOTSUPP);
goto out;
--
2.20.1
1
2
Backport 5.10.84 LTS patches from upstream.
Aaro Koskinen (1):
i2c: cbus-gpio: set atomic transfer callback
Alain Volmat (3):
i2c: stm32f7: flush TX FIFO upon transfer errors
i2c: stm32f7: recover the bus on access timeout
i2c: stm32f7: stop dma transfer in case of NACK
Alexey Kardashevskiy (1):
powerpc/pseries/ddw: Revert "Extend upper limit for huge DMA window
for persistent memory"
Andreas Gruenbacher (1):
gfs2: Fix length of holes reported at end-of-file
Arnd Bergmann (1):
siphash: use _unaligned version by default
Badhri Jagan Sridharan (1):
usb: typec: tcpm: Wait in SNK_DEBOUNCED until disconnect
Baokun Li (2):
sata_fsl: fix UAF in sata_fsl_port_stop when rmmod sata_fsl
sata_fsl: fix warning in remove_proc_entry when rmmod sata_fsl
Benjamin Coddington (1):
NFSv42: Fix pagecache invalidation after COPY/CLONE
Benjamin Poirier (1):
net: mpls: Fix notifications when deleting a device
Bernard Zhao (1):
drm/amd/amdgpu: fix potential memleak
Bob Peterson (1):
gfs2: release iopen glock early in evict
Catalin Marinas (1):
KVM: arm64: Avoid setting the upper 32 bits of TCR_EL2 and CPTR_EL2 to
1
Christophe JAILLET (1):
net: marvell: mvpp2: Fix the computation of shared CPUs
Dan Carpenter (1):
KVM: VMX: Set failure code in prepare_vmcs02()
Dmitry Bogdanov (2):
atlantic: Increase delay for fw transactions
atlantic: Fix statistics logic for production hardware
Dongliang Mu (1):
dpaa2-eth: destroy workqueue at the end of remove function
Douglas Anderson (1):
drm/msm/a6xx: Allocate enough space for GMU registers
Dust Li (1):
net/smc: fix wrong list_del in smc_lgr_cleanup_early
Eiichi Tsukata (2):
rxrpc: Fix rxrpc_peer leak in rxrpc_look_up_bundle()
rxrpc: Fix rxrpc_local leak in rxrpc_lookup_peer()
Eric Dumazet (2):
net: annotate data-races on txq->xmit_lock_owner
ipv4: convert fib_num_tclassid_users to atomic_t
Feng Tang (2):
x86/tsc: Add a timer to make sure TSC_adjust is always checked
x86/tsc: Disable clocksource watchdog for TSC on qualified platorms
Gustavo A. R. Silva (1):
wireguard: ratelimiter: use kvcalloc() instead of kvzalloc()
Helge Deller (3):
parisc: Fix KBUILD_IMAGE for self-extracting kernel
parisc: Fix "make install" on newer debian releases
parisc: Mark cr16 CPU clocksource unstable on all SMP machines
Ian Rogers (2):
perf hist: Fix memory leak of a perf_hpp_fmt
perf report: Fix memory leaks around perf_tip()
Ioanna Alifieraki (1):
ipmi: Move remove_work to dedicated workqueue
Jason A. Donenfeld (6):
wireguard: selftests: increase default dmesg log size
wireguard: allowedips: add missing __rcu annotation to satisfy sparse
wireguard: selftests: actually test for routing loops
wireguard: device: reset peer src endpoint when netns exits
wireguard: receive: use ring buffer for incoming handshakes
wireguard: receive: drop handshakes if queue lock is contended
Jay Dolan (2):
serial: 8250_pci: Fix ACCES entries in pci_serial_quirks array
serial: 8250_pci: rewrite pericom_do_set_divisor()
Jimmy Wang (1):
platform/x86: thinkpad_acpi: Add support for dual fan control
Joerg Roedel (1):
x86/64/mm: Map all kernel memory into trampoline_pgd
Johan Hovold (1):
serial: core: fix transmit-buffer reset and memleak
Jordy Zomer (1):
ipv6: check return value of ipv6_skip_exthdr
Juergen Gross (1):
x86/pv: Switch SWAPGS to ALTERNATIVE
Julian Braha (1):
drm/sun4i: fix unmet dependency on RESET_CONTROLLER for
PHY_SUN6I_MIPI_DPHY
Lai Jiangshan (4):
KVM: X86: Use vcpu->arch.walk_mmu for kvm_mmu_invlpg()
x86/entry: Use the correct fence macro after swapgs in kernel CR3
x86/xen: Add xenpv_restore_regs_and_return_to_usermode()
x86/entry: Add a fence for kernel entry SWAPGS in paranoid_entry()
Li Zhijian (2):
wireguard: selftests: rename DEBUG_PI_LIST to DEBUG_PLIST
selftests: net: Correct case name
Like Xu (1):
KVM: x86/pmu: Fix reserved bits for AMD PerfEvtSeln register
Lorenzo Bianconi (1):
mt76: mt7915: fix NULL pointer dereference in mt7915_get_phy_mode
Lukas Wunner (1):
serial: 8250: Fix RTS modem control while in rs485 mode
Maciej W. Rozycki (1):
vgacon: Propagate console boot parameters before calling `vc_resize'
Manaf Meethalavalappu Pallikunhi (1):
thermal: core: Reset previous low and high trip during thermal zone
init
Mario Limonciello (2):
ata: ahci: Add Green Sardine vendor ID as board_ahci_mobile
ACPI: Add stubs for wakeup handler functions
Mark Rutland (1):
arm64: ftrace: add missing BTIs
Masami Hiramatsu (1):
kprobes: Limit max data_size of the kretprobe instances
Mathias Nyman (1):
xhci: Fix commad ring abort, write all 64 bits to CRCR register.
Michael Sterritt (1):
x86/sev: Fix SEV-ES INS/OUTS instructions for word, dword, and qword
Mike Christie (1):
scsi: iscsi: Unblock session then wake up error handler
Miklos Szeredi (2):
ovl: simplify file splice
ovl: fix deadlock in splice write
Mordechay Goodstein (1):
iwlwifi: mvm: retry init flow if failed
Nicholas Kazlauskas (1):
drm/amd/display: Allow DSC on supported MST branch devices
Nikita Danilov (2):
atlatnic: enable Nbase-t speeds with base-t
atlantic: Add missing DIDs and fix 115c.
Niklas Schnelle (1):
s390/pci: move pseudo-MMIO to prevent MIO overlap
Ole Ernst (1):
USB: NO_LPM quirk Lenovo Powered USB-C Travel Hub
Paolo Abeni (1):
tcp: fix page frag corruption on page fault
Paolo Bonzini (1):
KVM: x86: Use a stable condition around all VT-d PI paths
Patrik John (1):
serial: tegra: Change lower tolerance baud rate limit for tegra20 and
tegra30
Pierre Gondois (1):
serial: pl011: Add ACPI SBSA UART match id
Pierre-Louis Bossart (1):
ALSA: intel-dsp-config: add quirk for CML devices based on ES8336
codec
Qais Yousef (1):
sched/uclamp: Fix rq->uclamp_max not set on first enqueue
Randy Dunlap (1):
natsemi: xtensa: fix section mismatch warnings
Rob Clark (1):
drm/msm: Do hw_init() before capturing GPU state
Sameer Pujar (9):
ASoC: tegra: Fix wrong value type in ADMAIF
ASoC: tegra: Fix wrong value type in I2S
ASoC: tegra: Fix wrong value type in DMIC
ASoC: tegra: Fix wrong value type in DSPK
ASoC: tegra: Fix kcontrol put callback in ADMAIF
ASoC: tegra: Fix kcontrol put callback in I2S
ASoC: tegra: Fix kcontrol put callback in DMIC
ASoC: tegra: Fix kcontrol put callback in DSPK
ASoC: tegra: Fix kcontrol put callback in AHUB
Sameer Saurabh (3):
atlantic: Fix to display FW bundle version instead of FW mac version.
Remove Half duplex mode speed capabilities.
atlantic: Remove warn trace message.
Sean Christopherson (2):
KVM: Disallow user memslot with size that exceeds "unsigned long"
KVM: nVMX: Flush current VPID (L1 vs. L2) for KVM_REQ_TLB_FLUSH_GUEST
Slark Xiao (1):
platform/x86: thinkpad_acpi: Fix WWAN device disabled issue after S3
deep
Stanislaw Gruszka (1):
rt2x00: do not mark device gone on EPROTO errors during start
Stephen Suryaputra (1):
vrf: Reset IPCB/IP6CB when processing outbound pkts in vrf dev xmit
Steven Rostedt (VMware) (1):
tracing/histograms: String compares should not care about signed
values
Sven Eckelmann (1):
tty: serial: msm_serial: Deactivate RX DMA for polling support
Sven Schuchmann (1):
net: usb: lan78xx: lan78xx_phy_init(): use PHY_POLL instead of "0" if
no IRQ is available
Teng Qi (2):
ethernet: hisilicon: hns: hns_dsaf_misc: fix a possible array overflow
in hns_dsaf_ge_srst_by_port()
net: ethernet: dec: tulip: de4x5: fix possible array overflows in
type3_infoblock()
Tianjia Zhang (1):
net/tls: Fix authentication failure in CCM mode
Tony Lu (1):
net/smc: Keep smc_close_final rc during active close
Vasily Gorbik (1):
s390/setup: avoid using memblock_enforce_memory_limit
Wang Yugui (1):
btrfs: check-integrity: fix a warning on write caching disabled disk
Wei Yongjun (1):
ipmi: msghandler: Make symbol 'remove_work_wq' static
Wen Gu (2):
net/smc: Transfer remaining wait queue entries during fallback
net/smc: Avoid warning of possible recursive locking
William Kucharski (1):
net/rds: correct socket tunable error in rds_tcp_tune()
Xing Song (1):
mac80211: do not access the IV when it was stripped
Zhang Changzhong (1):
can: j1939: j1939_tp_cmd_recv(): check the dst address of TP.CM_BAM
Zhou Qingyang (2):
net: qlogic: qlcnic: Fix a NULL pointer dereference in
qlcnic_83xx_add_rings()
net/mlx4_en: Fix an use-after-free bug in
mlx4_en_try_alloc_resources()
liuguoqiang (1):
net: return correct error code
msizanoen1 (1):
ipv6: fix memory leak in fib6_rule_suppress
shaoyunl (1):
drm/amd/amdkfd: Fix kernel panic when reset failed and been triggered
again
zhangyue (1):
net: tulip: de4x5: fix the problem that the array 'lp->phy[8]' may be
out of bound
arch/arm64/include/asm/kvm_arm.h | 4 +-
arch/arm64/kernel/entry-ftrace.S | 6 +
arch/parisc/Makefile | 5 +
arch/parisc/install.sh | 1 +
arch/parisc/kernel/time.c | 24 +-
arch/powerpc/platforms/pseries/iommu.c | 9 -
arch/s390/include/asm/pci_io.h | 7 +-
arch/s390/kernel/setup.c | 3 -
arch/x86/entry/entry_64.S | 45 ++-
arch/x86/include/asm/irqflags.h | 20 +-
arch/x86/include/asm/paravirt.h | 20 --
arch/x86/include/asm/paravirt_types.h | 2 -
arch/x86/kernel/asm-offsets_64.c | 1 -
arch/x86/kernel/paravirt.c | 1 -
arch/x86/kernel/paravirt_patch.c | 3 -
arch/x86/kernel/sev-es.c | 57 ++--
arch/x86/kernel/tsc.c | 28 +-
arch/x86/kernel/tsc_sync.c | 41 +++
arch/x86/kvm/mmu/mmu.c | 2 +-
arch/x86/kvm/svm/pmu.c | 2 +-
arch/x86/kvm/vmx/nested.c | 4 +-
arch/x86/kvm/vmx/posted_intr.c | 20 +-
arch/x86/kvm/vmx/vmx.c | 23 +-
arch/x86/realmode/init.c | 12 +-
arch/x86/xen/enlighten_pv.c | 3 -
arch/x86/xen/xen-asm.S | 20 ++
drivers/ata/ahci.c | 1 +
drivers/ata/sata_fsl.c | 20 +-
drivers/char/ipmi/ipmi_msghandler.c | 13 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 1 +
.../drm/amd/amdkfd/kfd_device_queue_manager.c | 5 +
.../display/amdgpu_dm/amdgpu_dm_mst_types.c | 20 +-
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 4 +-
drivers/gpu/drm/msm/msm_debugfs.c | 1 +
drivers/gpu/drm/sun4i/Kconfig | 1 +
drivers/i2c/busses/i2c-cbus-gpio.c | 5 +-
drivers/i2c/busses/i2c-stm32f7.c | 31 +-
.../ethernet/aquantia/atlantic/aq_common.h | 27 +-
.../net/ethernet/aquantia/atlantic/aq_hw.h | 2 +
.../net/ethernet/aquantia/atlantic/aq_nic.c | 10 +-
.../ethernet/aquantia/atlantic/aq_pci_func.c | 7 +-
.../net/ethernet/aquantia/atlantic/aq_vec.c | 3 -
.../aquantia/atlantic/hw_atl/hw_atl_utils.c | 15 +-
.../atlantic/hw_atl/hw_atl_utils_fw2x.c | 3 -
.../aquantia/atlantic/hw_atl2/hw_atl2.c | 22 +-
.../aquantia/atlantic/hw_atl2/hw_atl2.h | 2 +
.../aquantia/atlantic/hw_atl2/hw_atl2_utils.h | 38 ++-
.../atlantic/hw_atl2/hw_atl2_utils_fw.c | 110 +++++--
drivers/net/ethernet/dec/tulip/de4x5.c | 34 +-
.../net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 +
.../ethernet/hisilicon/hns/hns_dsaf_misc.c | 4 +
.../net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +-
.../net/ethernet/mellanox/mlx4/en_netdev.c | 9 +-
drivers/net/ethernet/natsemi/xtsonic.c | 2 +-
.../ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 10 +-
drivers/net/usb/lan78xx.c | 2 +-
drivers/net/vrf.c | 2 +
drivers/net/wireguard/allowedips.c | 2 +-
drivers/net/wireguard/device.c | 39 +--
drivers/net/wireguard/device.h | 9 +-
drivers/net/wireguard/queueing.c | 6 +-
drivers/net/wireguard/queueing.h | 2 +-
drivers/net/wireguard/ratelimiter.c | 4 +-
drivers/net/wireguard/receive.c | 39 ++-
drivers/net/wireguard/socket.c | 2 +-
drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 22 +-
drivers/net/wireless/intel/iwlwifi/iwl-drv.h | 3 +
.../net/wireless/intel/iwlwifi/mvm/mac80211.c | 24 +-
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 +
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 3 +
.../net/wireless/mediatek/mt76/mt7915/mcu.c | 4 +-
.../net/wireless/ralink/rt2x00/rt2x00usb.c | 3 +
drivers/platform/x86/thinkpad_acpi.c | 13 +-
drivers/scsi/scsi_transport_iscsi.c | 6 +-
drivers/thermal/thermal_core.c | 2 +
drivers/tty/serial/8250/8250_pci.c | 39 ++-
drivers/tty/serial/8250/8250_port.c | 7 -
drivers/tty/serial/amba-pl011.c | 1 +
drivers/tty/serial/msm_serial.c | 3 +
drivers/tty/serial/serial-tegra.c | 4 +-
drivers/tty/serial/serial_core.c | 18 +-
drivers/usb/core/quirks.c | 3 +
drivers/usb/host/xhci-ring.c | 21 +-
drivers/usb/typec/tcpm/tcpm.c | 4 -
drivers/video/console/vgacon.c | 14 +-
fs/btrfs/disk-io.c | 14 +-
fs/gfs2/bmap.c | 2 +-
fs/gfs2/super.c | 14 +-
fs/nfs/nfs42proc.c | 5 +-
fs/overlayfs/file.c | 59 ++--
include/linux/acpi.h | 9 +
include/linux/kprobes.h | 2 +
include/linux/netdevice.h | 19 +-
include/linux/siphash.h | 14 +-
include/net/dst_cache.h | 11 +
include/net/fib_rules.h | 4 +-
include/net/ip_fib.h | 2 +-
include/net/netns/ipv4.h | 2 +-
include/net/sock.h | 13 +-
kernel/kprobes.c | 3 +
kernel/sched/core.c | 2 +-
kernel/trace/trace_events_hist.c | 2 +-
lib/siphash.c | 12 +-
net/can/j1939/transport.c | 6 +
net/core/dev.c | 5 +-
net/core/dst_cache.c | 19 ++
net/core/fib_rules.c | 2 +-
net/ipv4/devinet.c | 2 +-
net/ipv4/fib_frontend.c | 2 +-
net/ipv4/fib_rules.c | 5 +-
net/ipv4/fib_semantics.c | 4 +-
net/ipv6/esp6.c | 6 +
net/ipv6/fib6_rules.c | 4 +-
net/mac80211/rx.c | 3 +-
net/mpls/af_mpls.c | 68 +++-
net/rds/tcp.c | 2 +-
net/rxrpc/conn_client.c | 14 +-
net/rxrpc/peer_object.c | 14 +-
net/smc/af_smc.c | 14 +
net/smc/smc_close.c | 8 +-
net/smc/smc_core.c | 7 +-
net/tls/tls_sw.c | 4 +-
sound/hda/intel-dsp-config.c | 10 +
sound/soc/tegra/tegra186_dspk.c | 181 +++++++++--
sound/soc/tegra/tegra210_admaif.c | 140 +++++++--
sound/soc/tegra/tegra210_ahub.c | 11 +-
sound/soc/tegra/tegra210_dmic.c | 184 ++++++++---
sound/soc/tegra/tegra210_i2s.c | 296 +++++++++++++-----
tools/perf/builtin-report.c | 15 +-
tools/perf/ui/hist.c | 28 +-
tools/perf/util/hist.h | 1 -
tools/perf/util/util.c | 14 +-
tools/perf/util/util.h | 2 +-
tools/testing/selftests/net/fcnal-test.sh | 4 +-
tools/testing/selftests/wireguard/netns.sh | 30 +-
.../selftests/wireguard/qemu/debug.config | 2 +-
.../selftests/wireguard/qemu/kernel.config | 1 +
virt/kvm/kvm_main.c | 3 +-
138 files changed, 1694 insertions(+), 677 deletions(-)
--
2.20.1
1
121
Backport 5.10.83 LTS patches from upstream.
Adrian Hunter (1):
mmc: sdhci: Fix ADMA for PAGE_SIZE >= 64KiB
Albert Wang (1):
usb: dwc3: gadget: Fix null pointer exception
Alex Deucher (1):
drm/amdgpu/gfx9: switch to golden tsc registers for renoir+
Alexander Aring (1):
net: ieee802154: handle iftypes as u32
Alexander Mikhalitsyn (1):
shm: extend forced shm destroy to support objects from several IPC
nses
Amit Cohen (1):
mlxsw: spectrum: Protect driver from buggy firmware
Arjun Roy (1):
tcp: correctly handle increased zerocopy args struct size
Christophe Leroy (1):
powerpc/32: Fix hardlockup on vmap stack overflow
Dan Carpenter (4):
usb: chipidea: ci_hdrc_imx: fix potential error pointer dereference in
probe
staging: rtl8192e: Fix use after free in _rtl92e_pci_disconnect()
drm/nouveau/acr: fix a couple NULL vs IS_ERR() checks
drm/vc4: fix error code in vc4_create_object()
Daniele Palmas (1):
USB: serial: option: add Telit LE910S1 0x9200 composition
Danielle Ratson (1):
mlxsw: Verify the accessed index doesn't exceed the array length
David Hildenbrand (2):
proc/vmcore: fix clearing user buffer by properly using clear_user()
s390/mm: validate VMA in PGSTE manipulation functions
Davide Caratti (1):
net/sched: sch_ets: don't peek at classes beyond 'nbands'
Diana Wang (1):
nfp: checking parameter process for rx-usecs/tx-usecs is invalid
Dylan Hung (1):
mdio: aspeed: Fix "Link is Down" issue
Eric Dumazet (3):
mptcp: fix delack timer
ipv6: fix typos in __ip6_finish_output()
tcp_cubic: fix spurious Hystart ACK train detections for
not-cwnd-limited flows
Florent Fourcot (2):
netfilter: ctnetlink: fix filtering with CTA_TUPLE_REPLY
netfilter: ctnetlink: do not erase error code with EINVAL
Florian Fainelli (3):
ARM: dts: BCM5301X: Fix I2C controller interrupt
ARM: dts: BCM5301X: Add interrupt properties to GPIO node
ARM: dts: bcm2711: Fix PCIe interrupts
Guo DaXing (1):
net/smc: Fix loop in smc_listen
Hans Verkuil (1):
media: cec: copy sequence field for the reply
Heiner Kallweit (1):
lan743x: fix deadlock in lan743x_phy_link_status_change()
Helge Deller (1):
Revert "parisc: Fix backtrace to always include init funtion names"
Holger Assmann (1):
net: stmmac: retain PTP clock time during SIOCSHWTSTAMP ioctls
Huang Jianan (1):
erofs: fix deadlock when shrink erofs slab
Huang Pei (2):
MIPS: loongson64: fix FTLB configuration
MIPS: use 3-level pgtable for 64KB page size on MIPS_VA_BITS_48
Jakub Kicinski (2):
tls: splice_read: fix record type check
tls: fix replacing proto_ops
Jason Gerecke (1):
HID: wacom: Use "Confidence" flag to prevent reporting invalid
contacts
Jeff Layton (1):
ceph: properly handle statfs on multifs setups
Jesse Brandeburg (1):
igb: fix netpoll exit with traffic
Jiri Olsa (1):
tracing/uprobe: Fix uprobe_perf_open probes iteration
Joakim Zhang (2):
net: stmmac: fix system hang caused by eee_ctrl_timer during
suspend/resume
net: stmmac: platform: fix build warning when with !CONFIG_PM_SLEEP
Joerg Roedel (1):
iommu/amd: Clarify AMD IOMMUv2 initialization messages
Juergen Gross (9):
xen: sync include/xen/interface/io/ring.h with Xen's newest version
xen/blkfront: read response from backend only once
xen/blkfront: don't take local copy of a request from the ring page
xen/blkfront: don't trust the backend response data blindly
xen/netfront: read response from backend only once
xen/netfront: don't read data from request on the ring page
xen/netfront: disentangle tx_skb_freelist
xen/netfront: don't trust the backend response data blindly
tty: hvc: replace BUG_ON() with negative return value
Karsten Graul (1):
net/smc: Fix NULL pointer dereferencing in smc_vlan_by_tcpsk()
Kumar Thangavel (1):
net/ncsi : Add payload to be 32-bit aligned to fix dropped packets
Maciej Fijalkowski (1):
ice: fix vsi->txq_map sizing
Marek Behún (2):
PCI: aardvark: Deduplicate code in advk_pcie_rd_conf()
net: marvell: mvpp2: increase MTU limit when XDP enabled
Mark Rutland (1):
sched/scs: Reset task stack state in bringup_cpu()
Marta Plantykow (1):
ice: avoid bpf_prog refcount underflow
Mathias Nyman (2):
usb: hub: Fix usb enumeration issue due to address0 race
usb: hub: Fix locking issues with address0_mutex
Maurizio Lombardi (1):
nvmet: use IOCB_NOWAIT only if the filesystem supports it
Michael Kelley (1):
firmware: smccc: Fix check for ARCH_SOC_ID not implemented
Mike Christie (1):
scsi: core: sysfs: Fix setting device state to SDEV_RUNNING
Miklos Szeredi (1):
fuse: release pipe buf after last use
Minas Harutyunyan (1):
usb: dwc2: gadget: Fix ISOC flow for elapsed frames
Mingjie Zhang (1):
USB: serial: option: add Fibocom FM101-GL variants
Nathan Chancellor (1):
usb: dwc2: hcd_queue: Fix use of floating point literal
Nicholas Kazlauskas (1):
drm/amd/display: Set plane update flags for all planes in reset
Nicholas Piggin (1):
KVM: PPC: Book3S HV: Prevent POWER7/8 TLB flush flushing SLB
Nikolay Aleksandrov (3):
net: nexthop: fix null pointer dereference when IPv6 is not enabled
net: ipv6: add fib6_nh_release_dsts stub
net: nexthop: release IPv6 per-cpu dsts when replacing a nexthop group
Nitesh B Venkatesh (1):
iavf: Prevent changing static ITR values if adaptive moderation is on
Noralf Trønnes (1):
staging/fbtft: Fix backlight
Ondrej Jirman (1):
usb: typec: fusb302: Fix masking of comparator and bc_lvl interrupts
Pali Rohár (4):
PCI: aardvark: Update comment about disabling link training
PCI: aardvark: Implement re-issuing config requests on CRS response
PCI: aardvark: Simplify initialization of rootcap on virtual bridge
PCI: aardvark: Fix link training
Peng Fan (1):
firmware: arm_scmi: pm: Propagate return value to caller
Pierre-Louis Bossart (1):
ALSA: intel-dsp-config: add quirk for JSL devices based on ES8336
codec
Russell King (Oracle) (2):
net: phylink: Force link down and retrigger resolve on interface
change
net: phylink: Force retrigger in case of latched link-fail indicator
Sakari Ailus (1):
ACPI: Get acpi_device's parent from the parent field
Shin'ichiro Kawasaki (1):
scsi: scsi_debug: Zero clear zones at reset write pointer
Sreekanth Reddy (1):
scsi: mpt3sas: Fix kernel panic during drive powercycle test
Srinivas Kandagatla (3):
ASoC: qdsp6: q6routing: Conditionally reset FrontEnd Mixer
ASoC: qdsp6: q6asm: fix q6asm_dai_prepare error handling
ASoC: codecs: wcd934x: return error code correctly from hw_params
Stefano Garzarella (1):
vhost/vsock: fix incorrect used length reported to the guest
Stefano Stabellini (2):
xen: don't continue xenstore initialization in case of errors
xen: detect uninitialized xenbus in xenbus_init
Steve French (1):
smb3: do not error on fsync when readonly
Steven Rostedt (VMware) (2):
tracing: Fix pid filtering when triggers are attached
tracing: Check pid filtering when creating events
Takashi Iwai (5):
ALSA: ctxfi: Fix out-of-range access
ALSA: hda/realtek: Fix LED on HP ProBook 435 G7
staging: greybus: Add missing rwsem around snd_ctl_remove() calls
ASoC: topology: Add missing rwsem around snd_ctl_remove() calls
ARM: socfpga: Fix crash with CONFIG_FORTIRY_SOURCE
Thinh Nguyen (2):
usb: dwc3: gadget: Ignore NoStream after End Transfer
usb: dwc3: gadget: Check for L1/L2/U3 for Start Transfer
Thomas Zeitlhofer (1):
PM: hibernate: use correct mode for swsusp_close()
Tim Harvey (1):
mmc: sdhci-esdhc-imx: disable CMDQ support
Todd Kjos (1):
binder: fix test regression due to sender_euid change
Tony Lu (2):
net/smc: Ensure the active closing peer first closes clcsock
net/smc: Don't call clcsock shutdown twice when smc shutdown
Trond Myklebust (1):
NFSv42: Don't fail clone() unless the OP_CLONE operation failed
Varun Prakash (1):
nvmet-tcp: fix incomplete data digest send
Vladimir Oltean (2):
net: mscc: ocelot: don't downgrade timestamping RX filters in
SIOCSHWTSTAMP
net: mscc: ocelot: correctly report the timestamping RX filters in
ethtool
Volodymyr Mytnyk (1):
net: marvell: prestera: fix double free issue on err path
Weichao Guo (1):
f2fs: set SBI_NEED_FSCK flag when inconsistent node block found
Werner Sembach (1):
ALSA: hda/realtek: Add quirk for ASRock NUC Box 1100
Will Mortensen (1):
netfilter: flowtable: fix IPv6 tunnel addr match
Ziyang Xuan (1):
net: vlan: fix underflow for the real_dev refcnt
yangxingwu (1):
netfilter: ipvs: Fix reuse connection if RS weight is 0
Documentation/networking/ipvs-sysctl.rst | 3 +-
arch/arm/boot/dts/bcm2711.dtsi | 8 +-
arch/arm/boot/dts/bcm5301x.dtsi | 4 +-
arch/arm/mach-socfpga/core.h | 2 +-
arch/arm/mach-socfpga/platsmp.c | 8 +-
arch/mips/Kconfig | 2 +-
arch/mips/kernel/cpu-probe.c | 4 +-
arch/parisc/kernel/vmlinux.lds.S | 3 +-
arch/powerpc/kernel/head_32.h | 6 +-
arch/powerpc/kvm/book3s_hv_builtin.c | 5 +-
arch/s390/mm/pgtable.c | 13 +
drivers/acpi/property.c | 11 +-
drivers/android/binder.c | 2 +-
drivers/block/xen-blkfront.c | 126 +++++---
drivers/firmware/arm_scmi/scmi_pm_domain.c | 4 +-
drivers/firmware/smccc/soc_id.c | 2 +-
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 46 ++-
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +-
.../gpu/drm/nouveau/nvkm/subdev/acr/gm200.c | 6 +-
.../gpu/drm/nouveau/nvkm/subdev/acr/gp102.c | 6 +-
drivers/gpu/drm/vc4/vc4_bo.c | 2 +-
drivers/hid/wacom_wac.c | 8 +-
drivers/hid/wacom_wac.h | 1 +
drivers/iommu/amd/iommu_v2.c | 6 +-
drivers/media/cec/core/cec-adap.c | 1 +
drivers/mmc/host/sdhci-esdhc-imx.c | 2 -
drivers/mmc/host/sdhci.c | 21 +-
drivers/mmc/host/sdhci.h | 4 +-
.../net/ethernet/intel/iavf/iavf_ethtool.c | 30 +-
drivers/net/ethernet/intel/ice/ice_lib.c | 9 +-
drivers/net/ethernet/intel/ice/ice_main.c | 18 +-
drivers/net/ethernet/intel/igb/igb_main.c | 2 +-
.../net/ethernet/marvell/mvpp2/mvpp2_main.c | 14 +-
.../marvell/prestera/prestera_switchdev.c | 6 +-
drivers/net/ethernet/mellanox/mlxsw/minimal.c | 4 +
.../net/ethernet/mellanox/mlxsw/spectrum.c | 5 +
.../ethernet/mellanox/mlxsw/spectrum_ptp.c | 3 +
.../ethernet/mellanox/mlxsw/spectrum_router.c | 3 +
.../mellanox/mlxsw/spectrum_switchdev.c | 4 +
drivers/net/ethernet/microchip/lan743x_main.c | 12 +-
drivers/net/ethernet/mscc/ocelot.c | 11 +-
drivers/net/ethernet/netronome/nfp/nfp_net.h | 3 -
.../ethernet/netronome/nfp/nfp_net_ethtool.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 +
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 139 +++++----
.../ethernet/stmicro/stmmac/stmmac_platform.c | 44 +++
drivers/net/mdio/mdio-aspeed.c | 7 +
drivers/net/phy/phylink.c | 26 +-
drivers/net/xen-netfront.c | 272 ++++++++++-------
drivers/nvme/target/io-cmd-file.c | 4 +-
drivers/nvme/target/tcp.c | 7 +-
drivers/pci/controller/pci-aardvark.c | 235 +++++++--------
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +-
drivers/scsi/scsi_debug.c | 5 +
drivers/scsi/scsi_sysfs.c | 2 +-
drivers/staging/fbtft/fb_ssd1351.c | 4 -
drivers/staging/fbtft/fbtft-core.c | 9 +-
drivers/staging/greybus/audio_helper.c | 8 +-
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 +-
drivers/tty/hvc/hvc_xen.c | 17 +-
drivers/usb/chipidea/ci_hdrc_imx.c | 18 +-
drivers/usb/core/hub.c | 24 +-
drivers/usb/dwc2/gadget.c | 17 +-
drivers/usb/dwc2/hcd_queue.c | 2 +-
drivers/usb/dwc3/gadget.c | 39 ++-
drivers/usb/serial/option.c | 5 +
drivers/usb/typec/tcpm/fusb302.c | 6 +-
drivers/vhost/vsock.c | 2 +-
drivers/xen/xenbus/xenbus_probe.c | 27 +-
fs/ceph/super.c | 11 +-
fs/cifs/file.c | 35 ++-
fs/erofs/utils.c | 8 +-
fs/f2fs/node.c | 1 +
fs/fuse/dev.c | 10 +-
fs/nfs/nfs42xdr.c | 3 +-
fs/proc/vmcore.c | 16 +-
include/linux/ipc_namespace.h | 15 +
include/linux/sched/task.h | 2 +-
include/net/ip6_fib.h | 1 +
include/net/ipv6_stubs.h | 1 +
include/net/nl802154.h | 7 +-
include/xen/interface/io/ring.h | 278 ++++++++++--------
ipc/shm.c | 189 +++++++++---
kernel/cpu.c | 7 +
kernel/power/hibernate.c | 6 +-
kernel/sched/core.c | 4 -
kernel/trace/trace.h | 24 +-
kernel/trace/trace_events.c | 10 +
kernel/trace/trace_uprobe.c | 1 +
net/8021q/vlan.c | 3 -
net/8021q/vlan_dev.c | 3 +
net/ipv4/nexthop.c | 35 ++-
net/ipv4/tcp.c | 4 +-
net/ipv4/tcp_cubic.c | 5 +-
net/ipv6/af_inet6.c | 1 +
net/ipv6/ip6_output.c | 2 +-
net/ipv6/route.c | 19 ++
net/mptcp/options.c | 3 +-
net/ncsi/ncsi-cmd.c | 24 +-
net/netfilter/ipvs/ip_vs_core.c | 8 +-
net/netfilter/nf_conntrack_netlink.c | 6 +-
net/netfilter/nf_flow_table_offload.c | 4 +-
net/sched/sch_ets.c | 8 +-
net/smc/af_smc.c | 12 +-
net/smc/smc_close.c | 6 +
net/smc/smc_core.c | 35 +--
net/tls/tls_main.c | 47 ++-
net/tls/tls_sw.c | 23 +-
sound/hda/intel-dsp-config.c | 9 +
sound/pci/ctxfi/ctamixer.c | 14 +-
sound/pci/ctxfi/ctdaio.c | 16 +-
sound/pci/ctxfi/ctresource.c | 7 +-
sound/pci/ctxfi/ctresource.h | 4 +-
sound/pci/ctxfi/ctsrc.c | 7 +-
sound/pci/hda/patch_realtek.c | 28 ++
sound/soc/codecs/wcd934x.c | 3 +-
sound/soc/qcom/qdsp6/q6asm-dai.c | 19 +-
sound/soc/qcom/qdsp6/q6routing.c | 6 +-
sound/soc/soc-topology.c | 3 +
119 files changed, 1539 insertions(+), 815 deletions(-)
--
2.20.1
1
119

[PATCH openEuler-5.10 01/16] USB: gadget: detect too-big endpoint 0 requests
by Zheng Zengkai 14 Jan '22
by Zheng Zengkai 14 Jan '22
14 Jan '22
From: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
stable inclusion
form stable-v5.10.85
commit 7193ad3e50e596ac2192531c58ba83b9e6d2444b
bugzilla: 185937 https://gitee.com/openeuler/kernel/issues/I4DDEL
CVE: CVE-2021-39685
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
Sometimes USB hosts can ask for buffers that are too large from endpoint
0, which should not be allowed. If this happens for OUT requests, stall
the endpoint, but for IN requests, trim the request size to the endpoint
buffer size.
Co-developed-by: Szymon Heidrich <szymon.heidrich(a)gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Chen Jun <chenjun102(a)huawei.com>
Signed-off-by: Zheng Zengkai <zhengzengkai(a)huawei.com>
---
drivers/usb/gadget/composite.c | 12 ++++++++++++
drivers/usb/gadget/legacy/dbgp.c | 13 +++++++++++++
drivers/usb/gadget/legacy/inode.c | 16 +++++++++++++++-
3 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index a8704e6498ab..426132988512 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1648,6 +1648,18 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
struct usb_function *f = NULL;
u8 endp;
+ if (w_length > USB_COMP_EP0_BUFSIZ) {
+ if (ctrl->bRequestType == USB_DIR_OUT) {
+ goto done;
+ } else {
+ /* Cast away the const, we are going to overwrite on purpose. */
+ __le16 *temp = (__le16 *)&ctrl->wLength;
+
+ *temp = cpu_to_le16(USB_COMP_EP0_BUFSIZ);
+ w_length = USB_COMP_EP0_BUFSIZ;
+ }
+ }
+
/* partial re-init of the response message; the function or the
* gadget might need to intercept e.g. a control-OUT completion
* when we delegate to it.
diff --git a/drivers/usb/gadget/legacy/dbgp.c b/drivers/usb/gadget/legacy/dbgp.c
index e1d566c9918a..e567afcb2794 100644
--- a/drivers/usb/gadget/legacy/dbgp.c
+++ b/drivers/usb/gadget/legacy/dbgp.c
@@ -345,6 +345,19 @@ static int dbgp_setup(struct usb_gadget *gadget,
void *data = NULL;
u16 len = 0;
+ if (length > DBGP_REQ_LEN) {
+ if (ctrl->bRequestType == USB_DIR_OUT) {
+ return err;
+ } else {
+ /* Cast away the const, we are going to overwrite on purpose. */
+ __le16 *temp = (__le16 *)&ctrl->wLength;
+
+ *temp = cpu_to_le16(DBGP_REQ_LEN);
+ length = DBGP_REQ_LEN;
+ }
+ }
+
+
if (request == USB_REQ_GET_DESCRIPTOR) {
switch (value>>8) {
case USB_DT_DEVICE:
diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c
index 71e7d10dd76b..04b9c4f5f129 100644
--- a/drivers/usb/gadget/legacy/inode.c
+++ b/drivers/usb/gadget/legacy/inode.c
@@ -110,6 +110,8 @@ enum ep0_state {
/* enough for the whole queue: most events invalidate others */
#define N_EVENT 5
+#define RBUF_SIZE 256
+
struct dev_data {
spinlock_t lock;
refcount_t count;
@@ -144,7 +146,7 @@ struct dev_data {
struct dentry *dentry;
/* except this scratch i/o buffer for ep0 */
- u8 rbuf [256];
+ u8 rbuf[RBUF_SIZE];
};
static inline void get_dev (struct dev_data *data)
@@ -1333,6 +1335,18 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
u16 w_value = le16_to_cpu(ctrl->wValue);
u16 w_length = le16_to_cpu(ctrl->wLength);
+ if (w_length > RBUF_SIZE) {
+ if (ctrl->bRequestType == USB_DIR_OUT) {
+ return value;
+ } else {
+ /* Cast away the const, we are going to overwrite on purpose. */
+ __le16 *temp = (__le16 *)&ctrl->wLength;
+
+ *temp = cpu_to_le16(RBUF_SIZE);
+ w_length = RBUF_SIZE;
+ }
+ }
+
spin_lock (&dev->lock);
dev->setup_abort = 0;
if (dev->state == STATE_DEV_UNCONNECTED) {
--
2.20.1
1
15
Backport LTS 5.10.82 patches from upstream.
Adrian Hunter (2):
scsi: ufs: core: Fix task management completion
scsi: ufs: core: Fix task management completion timeout race
Alex Elder (1):
net: ipa: disable HOLB drop when updating timer
Alexander Antonov (2):
perf/x86/intel/uncore: Fix filter_tid mask for CHA events on Skylake
Server
perf/x86/intel/uncore: Fix IIO event constraints for Skylake Server
Alexander Mikhalitsyn (1):
ipc: WARN if trying to remove ipc object which is absent
Alistair Delva (1):
block: Check ADMIN before NICE for IOPRIO_CLASS_RT
Alvin Lee (1):
drm/amd/display: Update swizzle mode enums
Amit Kumar Mahapatra (1):
arm64: zynqmp: Do not duplicate flash partition label property
Anatolij Gustschin (1):
powerpc/5200: dts: fix memory node unit name
AngeloGioacchino Del Regno (1):
arm64: dts: qcom: msm8998: Fix CPU/L2 idle state latency and residency
Arjun Roy (3):
net-zerocopy: Copy straggler unaligned data for TCP Rx. zerocopy.
net-zerocopy: Refactor skb frag fast-forward op.
tcp: Fix uninitialized access in skb frags array for Rx 0cp.
Baoquan He (1):
s390/kexec: fix memory leak of ipl report buffer
Bart Van Assche (1):
MIPS: sni: Fix the build
Bjorn Andersson (1):
pinctrl: qcom: sdm845: Enable dual edge errata
Bongsu Jeon (1):
net: nfc: nci: Change the NCI close sequence
Chao Yu (1):
f2fs: fix incorrect return value in f2fs_sanity_check_ckpt()
Chengfeng Ye (1):
ALSA: gus: fix null pointer dereference on pointer block
Christian Lamparter (1):
ARM: BCM53016: Specify switch ports for Meraki MR32
Christophe JAILLET (1):
platform/x86: hp_accel: Fix an error handling path in
'lis3lv02d_probe()'
Christophe Leroy (2):
powerpc/8xx: Fix Oops with STRICT_KERNEL_RWX without DEBUG_RODATA_TEST
powerpc/8xx: Fix pinned TLBs with CONFIG_STRICT_KERNEL_RWX
Colin Ian King (1):
MIPS: generic/yamon-dt: fix uninitialized variable error
David Heidelberg (1):
ARM: dts: qcom: fix memory and mdio nodes naming for RB3011
Dmitry Baryshkov (1):
clk: qcom: gcc-msm8996: Drop (again) gcc_aggre1_pnoc_ahb_clk
Eric Dumazet (1):
net: reduce indentation level in sk_clone_lock()
Eryk Rybak (3):
i40e: Fix correct max_pkt_size on VF RX queue
i40e: Fix changing previously set num_queue_pairs for PFs
i40e: Fix ping is lost after configuring ADq on VF
Ewan D. Milne (1):
scsi: qla2xxx: Fix mailbox direction flags in qla2xxx_get_adapter_id()
Fabio Aiuto (1):
staging: rtl8723bs: remove possible deadlock when disconnect (v2)
Gao Xiang (1):
f2fs: fix up f2fs_lookup tracepoints
Grzegorz Szczurek (2):
iavf: Fix for setting queues to 0
i40e: Fix display error code in dmesg
Guanghui Feng (1):
tty: tty_buffer: Fix the softlockup issue in flush_to_ldisc
Guo Zhi (1):
scsi: advansys: Fix kernel pointer leak
Hans Verkuil (1):
drm/nouveau: hdmigv100.c: fix corrupted HDMI Vendor InfoFrame
Hans de Goede (1):
ASoC: nau8824: Add DMI quirk mechanism for active-high jack-detect
Heiko Carstens (1):
s390/kexec: fix return code handling
Hyeong-Jun Kim (1):
f2fs: compress: disallow disabling compress on non-empty compressed
file
Ian Rogers (1):
perf bpf: Avoid memory leak from perf_env__insert_btf()
Imre Deak (1):
drm/i915/dp: Ensure sink rate values are always valid
Jacob Keller (1):
iavf: prevent accidental free of filter structure
James Clark (1):
perf tests: Remove bash construct from record+zstd_comp_decomp.sh
James Smart (1):
scsi: lpfc: Fix list_add() corruption in lpfc_drain_txq()
Jan Kara (1):
udf: Fix crash after seekdir
Jedrzej Jagielski (1):
i40e: Fix creation of first queue by omitting it if is not power of
two
Jesse Brandeburg (1):
e100: fix device suspend/resume
Joel Stanley (1):
clk/ast2600: Fix soc revision for AHB
Johan Hovold (1):
drm/udl: fix control-message timeout
Jonathan Davies (1):
net: virtio_net_hdr_to_skb: count transport header in UFO
Josef Bacik (2):
fs: export an inode_update_time helper
btrfs: update device path inode time instead of bd_inode
Jérôme Pouiller (1):
staging: wfx: ensure IRQ is ready before enabling it
Karen Sornek (1):
i40e: Fix warning message and call stack during rmmod i40e driver
Keoseong Park (1):
f2fs: fix to use WHINT_MODE
Leon Romanovsky (2):
RDMA/netlink: Add __maybe_unused to static inline in C file
ice: Delete always true check of PF pointer
Li Yang (2):
ARM: dts: ls1021a: move thermal-zones node out of soc/
ARM: dts: ls1021a-tsn: use generic "jedec,spi-nor" compatible for
flash
Like Xu (1):
perf/x86/vlbr: Add c->flags to vlbr event constraints
Lin Ma (3):
NFC: reorganize the functions in nci_request
NFC: reorder the logic in nfc_{un,}register_device
NFC: add NCI_UNREG flag to eliminate the race
Linus Walleij (1):
ARM: dts: ux500: Skomer regulator fixes
Lu Wei (1):
maple: fix wrong return value of maple_bus_init().
Luis Chamberlain (1):
firmware_loader: fix pre-allocated buf built-in firmware use
Maher Sanalla (1):
net/mlx5: Lag, update tracker when state change event received
Masami Hiramatsu (1):
tracing/histogram: Do not copy the fixed-size char array field over
the field size
Mateusz Palczewski (1):
iavf: Fix return of set the new channel count
Matthew Hagan (1):
ARM: dts: NSP: Fix mpcore, mmc node names
Matthias Brugger (1):
arm64: dts: rockchip: Disable CDN DP on Pinebook Pro
Maxim Levitsky (1):
KVM: nVMX: don't use vcpu->arch.efer when checking host state on
nested state load
Maxime Ripard (3):
ARM: dts: sunxi: Fix OPPs node name
arm64: dts: allwinner: h5: Fix GPU thermal zone node name
arm64: dts: allwinner: a100: Fix thermal zone node name
Meng Li (1):
net: stmmac: socfpga: add runtime suspend/resume callback for
stratix10 platform
Michael Ellerman (2):
powerpc/dcr: Use cmplwi instead of 3-argument cmpli
KVM: PPC: Book3S HV: Use GLOBAL_TOC for kvmppc_h_set_dabr/xdabr()
Michael Walle (2):
arm64: dts: hisilicon: fix arm,sp805 compatible string
arm64: dts: freescale: fix arm,sp805 compatible string
Michal Maloszewski (1):
i40e: Fix NULL ptr dereference on VSI filter sync
Michal Simek (1):
arm64: zynqmp: Fix serial compatible string
Mike Christie (3):
scsi: target: Fix ordered tag handling
scsi: target: Fix alua_tg_pt_gps_count tracking
scsi: core: sysfs: Fix hang when device state is set via sysfs
Mitch Williams (1):
iavf: validate pointers
Nathan Chancellor (2):
hexagon: export raw I/O routines for modules
hexagon: clean up timer-regs.h
Nguyen Dinh Phi (1):
cfg80211: call cfg80211_stop_ap when switch from P2P_GO type
Nicholas Nunley (2):
iavf: check for null in iavf_fix_features
iavf: free q_vectors before queues in iavf_disable_vf
Nick Desaulniers (2):
sh: check return code of request_irq
arm64: vdso32: suppress error message for 'make mrproper'
Nicolas Dichtel (1):
tun: fix bonding active backup with arp monitoring
Nikolay Borisov (1):
btrfs: fix memory ordering between normal and ordered work functions
Ondrej Mosnacek (1):
selinux: fix NULL-pointer dereference when hashtab allocation fails
Paul Cercueil (1):
clk: ingenic: Fix bugs with divided dividers
Pavel Skripkin (2):
net: bnx2x: fix variable dereferenced before check
net: dpaa2-eth: fix use-after-free in dpaa2_eth_remove
Pierre-Louis Bossart (4):
ASoC: SOF: Intel: hda-dai: fix potential locking issue
ALSA: intel-dsp-config: add quirk for APL/GLK/TGL devices based on
ES8336 codec
ALSA: hda: hdac_ext_stream: fix potential locking issues
ALSA: hda: hdac_stream: fix potential locking issue in
snd_hdac_stream_assign()
Piotr Marczak (1):
iavf: Fix failure to exit out from last all-multicast mode
Punit Agrawal (1):
net: stmmac: dwmac-rk: Fix ethernet on rk3399 based devices
Raed Salem (1):
net/mlx5: E-Switch, return error if encap isn't supported
Randy Dunlap (8):
ALSA: ISA: not for M68K
sh: fix kconfig unmet dependency warning for FRAME_POINTER
sh: math-emu: drop unused functions
sh: define __BIG_ENDIAN for math-emu
mips: BCM63XX: ensure that CPU_SUPPORTS_32BIT_KERNEL is set
mips: bcm63xx: add support for clk_get_parent()
mips: lantiq: add support for clk_get_parent()
x86/Kconfig: Fix an unused variable error in dell-smm-hwmon
Roger Quadros (1):
ARM: dts: omap: fix gpmc,mux-add-data type
Roi Dayan (1):
net/mlx5: E-Switch, Change mode lock from mutex to rw semaphore
Rustam Kovhaev (1):
mm: kmemleak: slob: respect SLAB_NOLEAKTRACE flag
Sasha Levin (1):
Revert "perf: Rework perf_event_exit_event()"
Sean Christopherson (1):
x86/hyperv: Fix NULL deref in set_hv_tscchange_cb() if Hyper-V setup
fails
Selvin Xavier (1):
RDMA/bnxt_re: Check if the vlan is valid before reporting
Shawn Guo (1):
arm64: dts: qcom: ipq6018: Fix qcom,controlled-remotely property
Sohaib Mohamed (1):
perf bench futex: Fix memory leak of perf_cpu_map__new()
Sriharsha Basavapatna (1):
bnxt_en: reject indirect blk offload when hw-tc-offload is off
Stefan Riedmueller (1):
clk: imx: imx6ul: Move csi_sel mux to correct base register
Steven Rostedt (VMware) (1):
tracing: Add length protection to histogram string copies
Surabhi Boob (1):
iavf: Fix for the false positive ASQ/ARQ errors while issuing VF reset
Sven Peter (1):
usb: typec: tipd: Remove WARN_ON in tps6598x_block_read
Sven Schnelle (1):
parisc/sticon: fix reverse colors
Tadeusz Struk (1):
tipc: check for null after calling kmemdup
Takashi Iwai (1):
ASoC: DAPM: Cover regression by kctl change notification fix
Teng Qi (1):
iio: imu: st_lsm6dsx: Avoid potential array overflow in
st_lsm6dsx_set_odr()
Tetsuo Handa (1):
sock: fix /proc/net/sockstat underflow in sk_clone_lock()
Tony Lindgren (2):
bus: ti-sysc: Add quirk handling for reinit on context lost
bus: ti-sysc: Use context lost quirk for otg
Uwe Kleine-König (1):
usb: max-3421: Use driver data instead of maintaining a list of bound
devices
Valentine Fatiev (1):
net/mlx5e: nullify cq->dbg pointer in mlx5_debug_cq_remove()
Vincent Donnefort (1):
sched/core: Mitigate race cpus_share_cache()/update_top_cache_domain()
Wen Gu (1):
net/smc: Make sure the link_id is unique
Xin Long (2):
tipc: only accept encrypted MSG_CRYPTO msgs
net: sched: act_mirred: drop dst for the direction from egress to
ingress
Yang Yingliang (2):
usb: musb: tusb6010: check return value after calling
platform_get_resource()
usb: host: ohci-tmio: check return value after calling
platform_get_resource()
hongao (1):
drm/amdgpu: fix set scaling mode Full/Full aspect/Center not works on
vga and dvi connectors
arch/arm/boot/dts/bcm-nsp.dtsi | 4 +-
arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 22 ++
arch/arm/boot/dts/ls1021a-tsn.dts | 2 +-
arch/arm/boot/dts/ls1021a.dtsi | 66 +++---
arch/arm/boot/dts/omap-gpmc-smsc9221.dtsi | 2 +-
.../boot/dts/omap3-overo-tobiduo-common.dtsi | 2 +-
arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 6 +-
.../arm/boot/dts/ste-ux500-samsung-skomer.dts | 8 +-
arch/arm/boot/dts/sun8i-a33.dtsi | 4 +-
arch/arm/boot/dts/sun8i-a83t.dtsi | 4 +-
arch/arm/boot/dts/sun8i-h3.dtsi | 4 +-
.../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 6 +-
.../dts/allwinner/sun50i-a64-cpu-opp.dtsi | 2 +-
.../boot/dts/allwinner/sun50i-h5-cpu-opp.dtsi | 2 +-
arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 2 +-
.../boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi | 2 +-
.../arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 16 +-
.../arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 16 +-
arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 4 +-
arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 2 +-
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +-
arch/arm64/boot/dts/qcom/msm8998.dtsi | 20 +-
.../boot/dts/rockchip/rk3399-pinebook-pro.dts | 4 -
.../dts/xilinx/zynqmp-zc1751-xm016-dc2.dts | 4 +-
arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 4 +-
arch/arm64/kernel/vdso32/Makefile | 3 +-
arch/hexagon/include/asm/timer-regs.h | 26 ---
arch/hexagon/include/asm/timex.h | 3 +-
arch/hexagon/kernel/time.c | 12 +-
arch/hexagon/lib/io.c | 4 +
arch/mips/Kconfig | 3 +
arch/mips/bcm63xx/clk.c | 6 +
arch/mips/generic/yamon-dt.c | 2 +-
arch/mips/lantiq/clk.c | 6 +
arch/mips/sni/time.c | 4 +-
arch/powerpc/boot/dts/charon.dts | 2 +-
arch/powerpc/boot/dts/digsy_mtc.dts | 2 +-
arch/powerpc/boot/dts/lite5200.dts | 2 +-
arch/powerpc/boot/dts/lite5200b.dts | 2 +-
arch/powerpc/boot/dts/media5200.dts | 2 +-
arch/powerpc/boot/dts/mpc5200b.dtsi | 2 +-
arch/powerpc/boot/dts/o2d.dts | 2 +-
arch/powerpc/boot/dts/o2d.dtsi | 2 +-
arch/powerpc/boot/dts/o2dnt2.dts | 2 +-
arch/powerpc/boot/dts/o3dnt.dts | 2 +-
arch/powerpc/boot/dts/pcm032.dts | 2 +-
arch/powerpc/boot/dts/tqm5200.dts | 2 +-
arch/powerpc/kernel/head_8xx.S | 13 +-
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 +-
arch/powerpc/sysdev/dcr-low.S | 2 +-
arch/s390/include/asm/kexec.h | 6 +
arch/s390/kernel/ipl.c | 3 +-
arch/s390/kernel/machine_kexec_file.c | 18 +-
arch/sh/Kconfig.debug | 1 +
arch/sh/include/asm/sfp-machine.h | 8 +
arch/sh/kernel/cpu/sh4a/smp-shx3.c | 5 +-
arch/sh/math-emu/math.c | 103 ----------
arch/x86/Kconfig | 3 +-
arch/x86/events/intel/core.c | 4 +-
arch/x86/events/intel/uncore_snbep.c | 4 +
arch/x86/hyperv/hv_init.c | 3 +
arch/x86/kvm/vmx/nested.c | 22 +-
block/ioprio.c | 9 +-
drivers/base/firmware_loader/main.c | 13 +-
drivers/bus/ti-sysc.c | 110 +++++++++-
drivers/clk/clk-ast2600.c | 12 +-
drivers/clk/imx/clk-imx6ul.c | 2 +-
drivers/clk/ingenic/cgu.c | 6 +-
drivers/clk/qcom/gcc-msm8996.c | 15 --
.../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 1 +
.../drm/amd/display/dc/dcn20/dcn20_resource.c | 4 +-
.../amd/display/dc/dml/display_mode_enums.h | 4 +-
drivers/gpu/drm/i915/display/intel_dp.c | 11 +
.../drm/nouveau/nvkm/engine/disp/hdmigv100.c | 1 -
drivers/gpu/drm/udl/udl_connector.c | 2 +-
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 6 +-
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 12 +-
.../ethernet/broadcom/bnx2x/bnx2x_init_ops.h | 4 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 2 +-
.../net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 +-
drivers/net/ethernet/intel/e100.c | 18 +-
drivers/net/ethernet/intel/i40e/i40e.h | 2 +
drivers/net/ethernet/intel/i40e/i40e_main.c | 160 +++++++++------
.../ethernet/intel/i40e/i40e_virtchnl_pf.c | 121 ++++-------
.../net/ethernet/intel/iavf/iavf_ethtool.c | 30 ++-
drivers/net/ethernet/intel/iavf/iavf_main.c | 14 +-
drivers/net/ethernet/intel/ice/ice_main.c | 3 -
drivers/net/ethernet/mellanox/mlx5/core/cq.c | 5 +-
.../net/ethernet/mellanox/mlx5/core/debugfs.c | 4 +-
.../net/ethernet/mellanox/mlx5/core/eswitch.c | 11 +-
.../net/ethernet/mellanox/mlx5/core/eswitch.h | 2 +-
.../mellanox/mlx5/core/eswitch_offloads.c | 28 +--
drivers/net/ethernet/mellanox/mlx5/core/lag.c | 28 ++-
.../net/ethernet/stmicro/stmmac/dwmac-rk.c | 5 +
.../ethernet/stmicro/stmmac/dwmac-socfpga.c | 24 ++-
drivers/net/ipa/ipa_endpoint.c | 2 +
drivers/net/tun.c | 5 +
drivers/pinctrl/qcom/pinctrl-sdm845.c | 1 +
drivers/platform/x86/hp_accel.c | 2 +
drivers/scsi/advansys.c | 4 +-
drivers/scsi/lpfc/lpfc_sli.c | 1 +
drivers/scsi/qla2xxx/qla_mbx.c | 6 +-
drivers/scsi/scsi_sysfs.c | 30 ++-
drivers/scsi/ufs/ufshcd.c | 57 +++---
drivers/scsi/ufs/ufshcd.h | 1 +
drivers/sh/maple/maple.c | 5 +-
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 7 +-
drivers/staging/rtl8723bs/core/rtw_recv.c | 10 +-
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 22 +-
drivers/staging/rtl8723bs/core/rtw_xmit.c | 16 +-
.../staging/rtl8723bs/hal/rtl8723bs_xmit.c | 2 -
drivers/staging/wfx/bus_sdio.c | 17 +-
drivers/target/target_core_alua.c | 1 -
drivers/target/target_core_device.c | 2 +
drivers/target/target_core_internal.h | 1 +
drivers/target/target_core_transport.c | 76 +++++--
drivers/tty/tty_buffer.c | 3 +
drivers/usb/host/max3421-hcd.c | 25 +--
drivers/usb/host/ohci-tmio.c | 2 +-
drivers/usb/musb/tusb6010.c | 5 +
drivers/usb/typec/tps6598x.c | 2 +-
drivers/video/console/sticon.c | 12 +-
fs/btrfs/async-thread.c | 14 ++
fs/btrfs/volumes.c | 21 +-
fs/f2fs/f2fs.h | 3 +-
fs/f2fs/super.c | 4 +-
fs/inode.c | 7 +-
fs/udf/dir.c | 32 ++-
fs/udf/namei.c | 3 +
fs/udf/super.c | 2 +
include/linux/fs.h | 2 +
include/linux/perf_event.h | 1 -
include/linux/platform_data/ti-sysc.h | 1 +
include/linux/trace_events.h | 2 +-
include/linux/virtio_net.h | 7 +-
include/net/nfc/nci_core.h | 1 +
include/rdma/rdma_netlink.h | 2 +-
include/sound/hdaudio_ext.h | 2 +
include/target/target_core_base.h | 6 +-
include/trace/events/f2fs.h | 12 +-
include/uapi/linux/tcp.h | 2 +
ipc/util.c | 6 +-
kernel/events/core.c | 142 ++++++-------
kernel/sched/core.c | 3 +
kernel/trace/trace_events_hist.c | 14 +-
mm/slab.h | 2 +-
net/core/sock.c | 189 +++++++++---------
net/ipv4/tcp.c | 122 ++++++++---
net/nfc/core.c | 32 +--
net/nfc/nci/core.c | 34 +++-
net/sched/act_mirred.c | 11 +-
net/smc/smc_core.c | 3 +-
net/tipc/crypto.c | 4 +
net/tipc/link.c | 7 +-
net/wireless/util.c | 1 +
security/selinux/ss/hashtab.c | 17 +-
sound/core/Makefile | 2 +
sound/hda/ext/hdac_ext_stream.c | 46 +++--
sound/hda/hdac_stream.c | 4 +-
sound/hda/intel-dsp-config.c | 22 +-
sound/isa/Kconfig | 2 +-
sound/isa/gus/gus_dma.c | 2 +
sound/pci/Kconfig | 1 +
sound/soc/codecs/nau8824.c | 40 ++++
sound/soc/soc-dapm.c | 29 ++-
sound/soc/sof/intel/hda-dai.c | 7 +-
tools/perf/bench/futex-lock-pi.c | 1 +
tools/perf/bench/futex-requeue.c | 1 +
tools/perf/bench/futex-wake-parallel.c | 1 +
tools/perf/bench/futex-wake.c | 1 +
.../tests/shell/record+zstd_comp_decomp.sh | 2 +-
tools/perf/util/bpf-event.c | 6 +-
tools/perf/util/env.c | 5 +-
tools/perf/util/env.h | 2 +-
174 files changed, 1413 insertions(+), 964 deletions(-)
delete mode 100644 arch/hexagon/include/asm/timer-regs.h
--
2.20.1
1
146

[PATCH openEuler-5.10 01/16] drm/i915/guc: Update to use firmware v49.0.1
by Zheng Zengkai 14 Jan '22
by Zheng Zengkai 14 Jan '22
14 Jan '22
From: John Harrison <John.C.Harrison(a)Intel.com>
mainline inclusion
from mainline-5.11-rc1
commit c784e5249e773689e38d2bc1749f08b986621a26
bugzilla: 185850 https://gitee.com/openeuler/kernel/issues/I4DDEL
CVE: CVE-2020-12363, CVE-2020-12364
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
--------------------------------
The latest GuC firmware includes a number of interface changes that
require driver updates to match.
* Starting from Gen11, the ID to be provided to GuC needs to contain
the engine class in bits [0..2] and the instance in bits [3..6].
NOTE: this patch breaks pointer dereferences in some existing GuC
functions that use the guc_id to dereference arrays but these functions
are not used for now as we have GuC submission disabled and we will
update these functions in follow up patch which requires new IDs.
* The new GuC requires the additional data structure (ADS) and associated
'private_data' pointer to be setup. This is basically a scratch area
of memory that the GuC owns. The size is read from the CSS header.
* There is now a physical to logical engine mapping table in the ADS
which needs to be configured in order for the firmware to load. For
now, the table is initialised with a 1 to 1 mapping.
* GUC_CTL_CTXINFO has been removed from the initialization params.
* reg_state_buffer is maintained internally by the GuC as part of
the private data.
* The ADS layout has changed significantly. This patch updates the
shared structure and also adds better documentation of the layout.
* While i915 does not use GuC doorbells, the firmware now requires
that some initialisation is done.
* The number of engine classes and instances supported in the ADS has
been increased.
Signed-off-by: John Harrison <John.C.Harrison(a)Intel.com>
Signed-off-by: Matthew Brost <matthew.brost(a)intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio(a)intel.com>
Signed-off-by: Oscar Mateo <oscar.mateo(a)intel.com>
Signed-off-by: Michel Thierry <michel.thierry(a)intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko(a)intel.com>
Cc: Michal Winiarski <michal.winiarski(a)intel.com>
Cc: Tomasz Lis <tomasz.lis(a)intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen(a)linux.intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio(a)intel.com>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen(a)linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201028145826.2949180-2-John…
Signed-off-by: Chen Jun <chenjun102(a)huawei.com>
Reviewed-by: Xiu Jianfeng <xiujianfeng(a)huawei.com>
Reviewed-by: Jason Yan <yanaijie(a)huawei.com>
Signed-off-by: Chen Jun <chenjun102(a)huawei.com>
Signed-off-by: Zheng Zengkai <zhengzengkai(a)huawei.com>
---
drivers/gpu/drm/i915/gt/intel_engine_cs.c | 3 +-
drivers/gpu/drm/i915/gt/uc/intel_guc.c | 18 ---
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 131 +++++++++++++++----
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 80 +++++------
drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h | 5 +
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 27 ++--
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 2 +
drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h | 6 +-
8 files changed, 176 insertions(+), 96 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index a19537706ed1..c940ac3aae2f 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -305,8 +305,9 @@ static int intel_engine_setup(struct intel_gt *gt, enum intel_engine_id id)
engine->i915 = i915;
engine->gt = gt;
engine->uncore = gt->uncore;
- engine->hw_id = engine->guc_id = info->hw_id;
engine->mmio_base = __engine_mmio_base(i915, info->mmio_bases);
+ engine->hw_id = info->hw_id;
+ engine->guc_id = MAKE_GUC_ID(info->class, info->instance);
engine->class = info->class;
engine->instance = info->instance;
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
index 942c7c187adb..6909da1e1a73 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
@@ -213,23 +213,6 @@ static u32 guc_ctl_feature_flags(struct intel_guc *guc)
return flags;
}
-static u32 guc_ctl_ctxinfo_flags(struct intel_guc *guc)
-{
- u32 flags = 0;
-
- if (intel_guc_submission_is_used(guc)) {
- u32 ctxnum, base;
-
- base = intel_guc_ggtt_offset(guc, guc->stage_desc_pool);
- ctxnum = GUC_MAX_STAGE_DESCRIPTORS / 16;
-
- base >>= PAGE_SHIFT;
- flags |= (base << GUC_CTL_BASE_ADDR_SHIFT) |
- (ctxnum << GUC_CTL_CTXNUM_IN16_SHIFT);
- }
- return flags;
-}
-
static u32 guc_ctl_log_params_flags(struct intel_guc *guc)
{
u32 offset = intel_guc_ggtt_offset(guc, guc->log.vma) >> PAGE_SHIFT;
@@ -291,7 +274,6 @@ static void guc_init_params(struct intel_guc *guc)
BUILD_BUG_ON(sizeof(guc->params) != GUC_CTL_MAX_DWORDS * sizeof(u32));
- params[GUC_CTL_CTXINFO] = guc_ctl_ctxinfo_flags(guc);
params[GUC_CTL_LOG_PARAMS] = guc_ctl_log_params_flags(guc);
params[GUC_CTL_FEATURE] = guc_ctl_feature_flags(guc);
params[GUC_CTL_DEBUG] = guc_ctl_debug_flags(guc);
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
index d44061033f23..7950d28beb8c 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
@@ -10,11 +10,52 @@
/*
* The Additional Data Struct (ADS) has pointers for different buffers used by
- * the GuC. One single gem object contains the ADS struct itself (guc_ads), the
- * scheduling policies (guc_policies), a structure describing a collection of
- * register sets (guc_mmio_reg_state) and some extra pages for the GuC to save
- * its internal state for sleep.
+ * the GuC. One single gem object contains the ADS struct itself (guc_ads) and
+ * all the extra buffers indirectly linked via the ADS struct's entries.
+ *
+ * Layout of the ADS blob allocated for the GuC:
+ *
+ * +---------------------------------------+ <== base
+ * | guc_ads |
+ * +---------------------------------------+
+ * | guc_policies |
+ * +---------------------------------------+
+ * | guc_gt_system_info |
+ * +---------------------------------------+
+ * | guc_clients_info |
+ * +---------------------------------------+
+ * | guc_ct_pool_entry[size] |
+ * +---------------------------------------+
+ * | padding |
+ * +---------------------------------------+ <== 4K aligned
+ * | private data |
+ * +---------------------------------------+
+ * | padding |
+ * +---------------------------------------+ <== 4K aligned
*/
+struct __guc_ads_blob {
+ struct guc_ads ads;
+ struct guc_policies policies;
+ struct guc_gt_system_info system_info;
+ struct guc_clients_info clients_info;
+ struct guc_ct_pool_entry ct_pool[GUC_CT_POOL_SIZE];
+} __packed;
+
+static u32 guc_ads_private_data_size(struct intel_guc *guc)
+{
+ return PAGE_ALIGN(guc->fw.private_data_size);
+}
+
+static u32 guc_ads_private_data_offset(struct intel_guc *guc)
+{
+ return PAGE_ALIGN(sizeof(struct __guc_ads_blob));
+}
+
+static u32 guc_ads_blob_size(struct intel_guc *guc)
+{
+ return guc_ads_private_data_offset(guc) +
+ guc_ads_private_data_size(guc);
+}
static void guc_policy_init(struct guc_policy *policy)
{
@@ -48,26 +89,37 @@ static void guc_ct_pool_entries_init(struct guc_ct_pool_entry *pool, u32 num)
memset(pool, 0, num * sizeof(*pool));
}
+static void guc_mapping_table_init(struct intel_gt *gt,
+ struct guc_gt_system_info *system_info)
+{
+ unsigned int i, j;
+ struct intel_engine_cs *engine;
+ enum intel_engine_id id;
+
+ /* Table must be set to invalid values for entries not used */
+ for (i = 0; i < GUC_MAX_ENGINE_CLASSES; ++i)
+ for (j = 0; j < GUC_MAX_INSTANCES_PER_CLASS; ++j)
+ system_info->mapping_table[i][j] =
+ GUC_MAX_INSTANCES_PER_CLASS;
+
+ for_each_engine(engine, gt, id) {
+ u8 guc_class = engine->class;
+
+ system_info->mapping_table[guc_class][engine->instance] =
+ engine->instance;
+ }
+}
+
/*
* The first 80 dwords of the register state context, containing the
* execlists and ppgtt registers.
*/
#define LR_HW_CONTEXT_SIZE (80 * sizeof(u32))
-/* The ads obj includes the struct itself and buffers passed to GuC */
-struct __guc_ads_blob {
- struct guc_ads ads;
- struct guc_policies policies;
- struct guc_mmio_reg_state reg_state;
- struct guc_gt_system_info system_info;
- struct guc_clients_info clients_info;
- struct guc_ct_pool_entry ct_pool[GUC_CT_POOL_SIZE];
- u8 reg_state_buffer[GUC_S3_SAVE_SPACE_PAGES * PAGE_SIZE];
-} __packed;
-
static void __guc_ads_init(struct intel_guc *guc)
{
struct intel_gt *gt = guc_to_gt(guc);
+ struct drm_i915_private *i915 = gt->i915;
struct __guc_ads_blob *blob = guc->ads_blob;
const u32 skipped_size = LRC_PPHWSP_SZ * PAGE_SIZE + LR_HW_CONTEXT_SIZE;
u32 base;
@@ -99,13 +151,25 @@ static void __guc_ads_init(struct intel_guc *guc)
}
/* System info */
- blob->system_info.slice_enabled = hweight8(gt->info.sseu.slice_mask);
- blob->system_info.rcs_enabled = 1;
- blob->system_info.bcs_enabled = 1;
+ blob->system_info.engine_enabled_masks[RENDER_CLASS] = 1;
+ blob->system_info.engine_enabled_masks[COPY_ENGINE_CLASS] = 1;
+ blob->system_info.engine_enabled_masks[VIDEO_DECODE_CLASS] = VDBOX_MASK(gt);
+ blob->system_info.engine_enabled_masks[VIDEO_ENHANCEMENT_CLASS] = VEBOX_MASK(gt);
+
+ blob->system_info.generic_gt_sysinfo[GUC_GENERIC_GT_SYSINFO_SLICE_ENABLED] =
+ hweight8(gt->info.sseu.slice_mask);
+ blob->system_info.generic_gt_sysinfo[GUC_GENERIC_GT_SYSINFO_VDBOX_SFC_SUPPORT_MASK] =
+ gt->info.vdbox_sfc_access;
+
+ if (INTEL_GEN(i915) >= 12 && !IS_DGFX(i915)) {
+ u32 distdbreg = intel_uncore_read(gt->uncore,
+ GEN12_DIST_DBS_POPULATED);
+ blob->system_info.generic_gt_sysinfo[GUC_GENERIC_GT_SYSINFO_DOORBELL_COUNT_PER_SQIDI] =
+ ((distdbreg >> GEN12_DOORBELLS_PER_SQIDI_SHIFT) &
+ GEN12_DOORBELLS_PER_SQIDI) + 1;
+ }
- blob->system_info.vdbox_enable_mask = VDBOX_MASK(gt);
- blob->system_info.vebox_enable_mask = VEBOX_MASK(gt);
- blob->system_info.vdbox_sfc_support_mask = gt->info.vdbox_sfc_access;
+ guc_mapping_table_init(guc_to_gt(guc), &blob->system_info);
base = intel_guc_ggtt_offset(guc, guc->ads_vma);
@@ -118,11 +182,12 @@ static void __guc_ads_init(struct intel_guc *guc)
/* ADS */
blob->ads.scheduler_policies = base + ptr_offset(blob, policies);
- blob->ads.reg_state_buffer = base + ptr_offset(blob, reg_state_buffer);
- blob->ads.reg_state_addr = base + ptr_offset(blob, reg_state);
blob->ads.gt_system_info = base + ptr_offset(blob, system_info);
blob->ads.clients_info = base + ptr_offset(blob, clients_info);
+ /* Private Data */
+ blob->ads.private_data = base + guc_ads_private_data_offset(guc);
+
i915_gem_object_flush_map(guc->ads_vma->obj);
}
@@ -135,14 +200,15 @@ static void __guc_ads_init(struct intel_guc *guc)
*/
int intel_guc_ads_create(struct intel_guc *guc)
{
- const u32 size = PAGE_ALIGN(sizeof(struct __guc_ads_blob));
+ u32 size;
int ret;
GEM_BUG_ON(guc->ads_vma);
+ size = guc_ads_blob_size(guc);
+
ret = intel_guc_allocate_and_map_vma(guc, size, &guc->ads_vma,
(void **)&guc->ads_blob);
-
if (ret)
return ret;
@@ -156,6 +222,18 @@ void intel_guc_ads_destroy(struct intel_guc *guc)
i915_vma_unpin_and_release(&guc->ads_vma, I915_VMA_RELEASE_MAP);
}
+static void guc_ads_private_data_reset(struct intel_guc *guc)
+{
+ u32 size;
+
+ size = guc_ads_private_data_size(guc);
+ if (!size)
+ return;
+
+ memset((void *)guc->ads_blob + guc_ads_private_data_offset(guc), 0,
+ size);
+}
+
/**
* intel_guc_ads_reset() - prepares GuC Additional Data Struct for reuse
* @guc: intel_guc struct
@@ -168,5 +246,8 @@ void intel_guc_ads_reset(struct intel_guc *guc)
{
if (!guc->ads_vma)
return;
+
__guc_ads_init(guc);
+
+ guc_ads_private_data_reset(guc);
}
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h
index a6b733c146c9..79c560d9c0b6 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h
@@ -26,8 +26,8 @@
#define GUC_VIDEO_ENGINE2 4
#define GUC_MAX_ENGINES_NUM (GUC_VIDEO_ENGINE2 + 1)
-#define GUC_MAX_ENGINE_CLASSES 5
-#define GUC_MAX_INSTANCES_PER_CLASS 16
+#define GUC_MAX_ENGINE_CLASSES 16
+#define GUC_MAX_INSTANCES_PER_CLASS 32
#define GUC_DOORBELL_INVALID 256
@@ -62,12 +62,7 @@
#define GUC_STAGE_DESC_ATTR_PCH BIT(6)
#define GUC_STAGE_DESC_ATTR_TERMINATED BIT(7)
-/* New GuC control data */
-#define GUC_CTL_CTXINFO 0
-#define GUC_CTL_CTXNUM_IN16_SHIFT 0
-#define GUC_CTL_BASE_ADDR_SHIFT 12
-
-#define GUC_CTL_LOG_PARAMS 1
+#define GUC_CTL_LOG_PARAMS 0
#define GUC_LOG_VALID (1 << 0)
#define GUC_LOG_NOTIFY_ON_HALF_FULL (1 << 1)
#define GUC_LOG_ALLOC_IN_MEGABYTE (1 << 3)
@@ -79,11 +74,11 @@
#define GUC_LOG_ISR_MASK (0x7 << GUC_LOG_ISR_SHIFT)
#define GUC_LOG_BUF_ADDR_SHIFT 12
-#define GUC_CTL_WA 2
-#define GUC_CTL_FEATURE 3
+#define GUC_CTL_WA 1
+#define GUC_CTL_FEATURE 2
#define GUC_CTL_DISABLE_SCHEDULER (1 << 14)
-#define GUC_CTL_DEBUG 4
+#define GUC_CTL_DEBUG 3
#define GUC_LOG_VERBOSITY_SHIFT 0
#define GUC_LOG_VERBOSITY_LOW (0 << GUC_LOG_VERBOSITY_SHIFT)
#define GUC_LOG_VERBOSITY_MED (1 << GUC_LOG_VERBOSITY_SHIFT)
@@ -97,12 +92,37 @@
#define GUC_LOG_DISABLED (1 << 6)
#define GUC_PROFILE_ENABLED (1 << 7)
-#define GUC_CTL_ADS 5
+#define GUC_CTL_ADS 4
#define GUC_ADS_ADDR_SHIFT 1
#define GUC_ADS_ADDR_MASK (0xFFFFF << GUC_ADS_ADDR_SHIFT)
#define GUC_CTL_MAX_DWORDS (SOFT_SCRATCH_COUNT - 2) /* [1..14] */
+/* Generic GT SysInfo data types */
+#define GUC_GENERIC_GT_SYSINFO_SLICE_ENABLED 0
+#define GUC_GENERIC_GT_SYSINFO_VDBOX_SFC_SUPPORT_MASK 1
+#define GUC_GENERIC_GT_SYSINFO_DOORBELL_COUNT_PER_SQIDI 2
+#define GUC_GENERIC_GT_SYSINFO_MAX 16
+
+/*
+ * The class goes in bits [0..2] of the GuC ID, the instance in bits [3..6].
+ * Bit 7 can be used for operations that apply to all engine classes&instances.
+ */
+#define GUC_ENGINE_CLASS_SHIFT 0
+#define GUC_ENGINE_CLASS_MASK (0x7 << GUC_ENGINE_CLASS_SHIFT)
+#define GUC_ENGINE_INSTANCE_SHIFT 3
+#define GUC_ENGINE_INSTANCE_MASK (0xf << GUC_ENGINE_INSTANCE_SHIFT)
+#define GUC_ENGINE_ALL_INSTANCES BIT(7)
+
+#define MAKE_GUC_ID(class, instance) \
+ (((class) << GUC_ENGINE_CLASS_SHIFT) | \
+ ((instance) << GUC_ENGINE_INSTANCE_SHIFT))
+
+#define GUC_ID_TO_ENGINE_CLASS(guc_id) \
+ (((guc_id) & GUC_ENGINE_CLASS_MASK) >> GUC_ENGINE_CLASS_SHIFT)
+#define GUC_ID_TO_ENGINE_INSTANCE(guc_id) \
+ (((guc_id) & GUC_ENGINE_INSTANCE_MASK) >> GUC_ENGINE_INSTANCE_SHIFT)
+
/* Work item for submitting workloads into work queue of GuC. */
struct guc_wq_item {
u32 header;
@@ -336,11 +356,6 @@ struct guc_policies {
} __packed;
/* GuC MMIO reg state struct */
-
-
-#define GUC_REGSET_MAX_REGISTERS 64
-#define GUC_S3_SAVE_SPACE_PAGES 10
-
struct guc_mmio_reg {
u32 offset;
u32 value;
@@ -348,28 +363,18 @@ struct guc_mmio_reg {
#define GUC_REGSET_MASKED (1 << 0)
} __packed;
-struct guc_mmio_regset {
- struct guc_mmio_reg registers[GUC_REGSET_MAX_REGISTERS];
- u32 values_valid;
- u32 number_of_registers;
-} __packed;
-
/* GuC register sets */
-struct guc_mmio_reg_state {
- struct guc_mmio_regset engine_reg[GUC_MAX_ENGINE_CLASSES][GUC_MAX_INSTANCES_PER_CLASS];
- u32 reserved[98];
+struct guc_mmio_reg_set {
+ u32 address;
+ u16 count;
+ u16 reserved;
} __packed;
/* HW info */
struct guc_gt_system_info {
- u32 slice_enabled;
- u32 rcs_enabled;
- u32 reserved0;
- u32 bcs_enabled;
- u32 vdbox_enable_mask;
- u32 vdbox_sfc_support_mask;
- u32 vebox_enable_mask;
- u32 reserved[9];
+ u8 mapping_table[GUC_MAX_ENGINE_CLASSES][GUC_MAX_INSTANCES_PER_CLASS];
+ u32 engine_enabled_masks[GUC_MAX_ENGINE_CLASSES];
+ u32 generic_gt_sysinfo[GUC_GENERIC_GT_SYSINFO_MAX];
} __packed;
/* Clients info */
@@ -390,15 +395,16 @@ struct guc_clients_info {
/* GuC Additional Data Struct */
struct guc_ads {
- u32 reg_state_addr;
- u32 reg_state_buffer;
+ struct guc_mmio_reg_set reg_state_list[GUC_MAX_ENGINE_CLASSES][GUC_MAX_INSTANCES_PER_CLASS];
+ u32 reserved0;
u32 scheduler_policies;
u32 gt_system_info;
u32 clients_info;
u32 control_data;
u32 golden_context_lrca[GUC_MAX_ENGINE_CLASSES];
u32 eng_state_size[GUC_MAX_ENGINE_CLASSES];
- u32 reserved[16];
+ u32 private_data;
+ u32 reserved[15];
} __packed;
/* GuC logging structures */
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h
index 1949346e714e..b37fc2ffaef2 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h
@@ -118,6 +118,11 @@ struct guc_doorbell_info {
#define GEN8_DRB_VALID (1<<0)
#define GEN8_DRBREGU(x) _MMIO(0x1000 + (x) * 8 + 4)
+#define GEN12_DIST_DBS_POPULATED _MMIO(0xd08)
+#define GEN12_DOORBELLS_PER_SQIDI_SHIFT 16
+#define GEN12_DOORBELLS_PER_SQIDI (0xff)
+#define GEN12_SQIDIS_DOORBELL_EXIST (0xffff)
+
#define DE_GUCRMR _MMIO(0x44054)
#define GUC_BCS_RCS_IER _MMIO(0xC550)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
index 80e8b6c3bc8c..ee4ac3922277 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
@@ -44,23 +44,19 @@ void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw,
* List of required GuC and HuC binaries per-platform.
* Must be ordered based on platform + revid, from newer to older.
*
- * TGL 35.2 is interface-compatible with 33.0 for previous Gens. The deltas
- * between 33.0 and 35.2 are only related to new additions to support new Gen12
- * features.
- *
* Note that RKL uses the same firmware as TGL.
*/
#define INTEL_UC_FIRMWARE_DEFS(fw_def, guc_def, huc_def) \
- fw_def(ROCKETLAKE, 0, guc_def(tgl, 35, 2, 0), huc_def(tgl, 7, 5, 0)) \
- fw_def(TIGERLAKE, 0, guc_def(tgl, 35, 2, 0), huc_def(tgl, 7, 5, 0)) \
- fw_def(ELKHARTLAKE, 0, guc_def(ehl, 33, 0, 4), huc_def(ehl, 9, 0, 0)) \
- fw_def(ICELAKE, 0, guc_def(icl, 33, 0, 0), huc_def(icl, 9, 0, 0)) \
- fw_def(COMETLAKE, 5, guc_def(cml, 33, 0, 0), huc_def(cml, 4, 0, 0)) \
- fw_def(COFFEELAKE, 0, guc_def(kbl, 33, 0, 0), huc_def(kbl, 4, 0, 0)) \
- fw_def(GEMINILAKE, 0, guc_def(glk, 33, 0, 0), huc_def(glk, 4, 0, 0)) \
- fw_def(KABYLAKE, 0, guc_def(kbl, 33, 0, 0), huc_def(kbl, 4, 0, 0)) \
- fw_def(BROXTON, 0, guc_def(bxt, 33, 0, 0), huc_def(bxt, 2, 0, 0)) \
- fw_def(SKYLAKE, 0, guc_def(skl, 33, 0, 0), huc_def(skl, 2, 0, 0))
+ fw_def(ROCKETLAKE, 0, guc_def(tgl, 49, 0, 1), huc_def(tgl, 7, 5, 0)) \
+ fw_def(TIGERLAKE, 0, guc_def(tgl, 49, 0, 1), huc_def(tgl, 7, 5, 0)) \
+ fw_def(ELKHARTLAKE, 0, guc_def(ehl, 49, 0, 1), huc_def(ehl, 9, 0, 0)) \
+ fw_def(ICELAKE, 0, guc_def(icl, 49, 0, 1), huc_def(icl, 9, 0, 0)) \
+ fw_def(COMETLAKE, 5, guc_def(cml, 49, 0, 1), huc_def(cml, 4, 0, 0)) \
+ fw_def(COFFEELAKE, 0, guc_def(kbl, 49, 0, 1), huc_def(kbl, 4, 0, 0)) \
+ fw_def(GEMINILAKE, 0, guc_def(glk, 49, 0, 1), huc_def(glk, 4, 0, 0)) \
+ fw_def(KABYLAKE, 0, guc_def(kbl, 49, 0, 1), huc_def(kbl, 4, 0, 0)) \
+ fw_def(BROXTON, 0, guc_def(bxt, 49, 0, 1), huc_def(bxt, 2, 0, 0)) \
+ fw_def(SKYLAKE, 0, guc_def(skl, 49, 0, 1), huc_def(skl, 2, 0, 0))
#define __MAKE_UC_FW_PATH(prefix_, name_, major_, minor_, patch_) \
"i915/" \
@@ -371,6 +367,9 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw)
}
}
+ if (uc_fw->type == INTEL_UC_FW_TYPE_GUC)
+ uc_fw->private_data_size = css->private_data_size;
+
obj = i915_gem_object_create_shmem_from_data(i915, fw->data, fw->size);
if (IS_ERR(obj)) {
err = PTR_ERR(obj);
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h
index 23d3a423ac0f..99bb1fe1af66 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h
@@ -88,6 +88,8 @@ struct intel_uc_fw {
u32 rsa_size;
u32 ucode_size;
+
+ u32 private_data_size;
};
#ifdef CONFIG_DRM_I915_DEBUG_GUC
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h
index 029214cdedd5..e41ffc7a7fbc 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h
@@ -69,7 +69,11 @@ struct uc_css_header {
#define CSS_SW_VERSION_UC_MAJOR (0xFF << 16)
#define CSS_SW_VERSION_UC_MINOR (0xFF << 8)
#define CSS_SW_VERSION_UC_PATCH (0xFF << 0)
- u32 reserved[14];
+ u32 reserved0[13];
+ union {
+ u32 private_data_size; /* only applies to GuC */
+ u32 reserved1;
+ };
u32 header_info;
} __packed;
static_assert(sizeof(struct uc_css_header) == 128);
--
2.20.1
1
15