The patch below does not apply to the 5.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
Possible dependencies:
ca76d7d2812b ("perf record: Fix cpu mask bit setting for mixed mmaps")
cbd7bfc7fd99 ("tools/perf: Fix out of bound access to cpu mask array")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From ca76d7d2812b46124291f99c9b50aaf63a936f23 Mon Sep 17 00:00:00 2001
From: Adrian Hunter <adrian.hunter(a)intel.com>
Date: Thu, 15 Sep 2022 15:26:11 +0300
Subject: [PATCH] perf record: Fix cpu mask bit setting for mixed mmaps
With mixed per-thread and (system-wide) per-cpu maps, the "any cpu" value
-1 must be skipped when setting CPU mask bits.
Prior to commit cbd7bfc7fd99acdd ("tools/perf: Fix out of bound access
to cpu mask array") the invalid setting went unnoticed, but since then
it causes perf record to fail with an error.
Example:
Before:
$ perf record -e intel_pt// --per-thread uname
Failed to initialize parallel data streaming masks
After:
$ perf record -e intel_pt// --per-thread uname
Linux
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.068 MB perf.data ]
Fixes: ae4f8ae16a078964 ("libperf evlist: Allow mixing per-thread and per-cpu mmaps")
Signed-off-by: Adrian Hunter <adrian.hunter(a)intel.com>
Acked-by: Namhyung Kim <namhyung(a)kernel.org>
Cc: Athira Rajeev <atrajeev(a)linux.vnet.ibm.com>
Cc: Ian Rogers <irogers(a)google.com>
Cc: Jiri Olsa <jolsa(a)kernel.org>
Cc: stable(a)vger.kernel.org
Link: https://lore.kernel.org/r/20220915122612.81738-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme(a)redhat.com>
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index f87ef43eb820..0f711f88894c 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -3371,6 +3371,8 @@ static int record__mmap_cpu_mask_init(struct mmap_cpu_mask *mask, struct perf_cp
return 0;
perf_cpu_map__for_each_cpu(cpu, idx, cpus) {
+ if (cpu.cpu == -1)
+ continue;
/* Return ENODEV is input cpu is greater than max cpu */
if ((unsigned long)cpu.cpu > mask->nbits)
return -ENODEV;
This is the start of the stable review cycle for the 4.19.260 release.
There are 55 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 28 Sep 2022 16:35:25 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.260-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.260-rc2
Raymond Tan <raymond.tan(a)intel.com>
usb: dwc3: pci: Allow Elkhart Lake to utilize DSM method for PM functionality
Jan Kara <jack(a)suse.cz>
ext4: make directory inode spreading reflect flexbg size
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
workqueue: don't skip lockdep work dependency in cancel_work_sync()
Nathan Huckleberry <nhuck(a)google.com>
drm/rockchip: Fix return type of cdn_dp_connector_mode_valid
Yao Wang1 <Yao.Wang1(a)amd.com>
drm/amd/display: Limit user regamma to a valid value
Vitaly Kuznetsov <vkuznets(a)redhat.com>
Drivers: hv: Never allocate anything besides framebuffer from framebuffer memory region
Stefan Haberland <sth(a)linux.ibm.com>
s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup
Ilpo Järvinen <ilpo.jarvinen(a)linux.intel.com>
serial: tegra: Use uart_xmit_advance(), fixes icount.tx accounting
Ilpo Järvinen <ilpo.jarvinen(a)linux.intel.com>
serial: Create uart_xmit_advance()
Sean Anderson <seanga2(a)gmail.com>
net: sunhme: Fix packet reception for len < RX_COPY_THRESHOLD
Adrian Hunter <adrian.hunter(a)intel.com>
perf kcore_copy: Do not check /proc/modules is unchanged
Lieven Hey <lieven.hey(a)kdab.com>
perf jit: Include program header in ELF files
Marc Kleine-Budde <mkl(a)pengutronix.de>
can: gs_usb: gs_can_open(): fix race dev->can.state condition
Florian Westphal <fw(a)strlen.de>
netfilter: ebtables: fix memory leak when blob is malformed
Liang He <windhl(a)126.com>
of: mdio: Add of_node_put() when breaking out of for_each_xx
Michal Jaron <michalx.jaron(a)intel.com>
i40e: Fix set max_tx_rate when it is lower than 1 Mbps
Michal Jaron <michalx.jaron(a)intel.com>
i40e: Fix VF set max MTU size
Randy Dunlap <rdunlap(a)infradead.org>
MIPS: lantiq: export clk_get_io() for lantiq_wdt.ko
Benjamin Poirier <bpoirier(a)nvidia.com>
net: team: Unsync device addresses on ndo_stop
Lu Wei <luwei32(a)huawei.com>
ipvlan: Fix out-of-bound bugs caused by unset skb->mac_header
Brett Creeley <brett.creeley(a)intel.com>
iavf: Fix cached head and tail value for iavf_get_tx_pending
David Leadbeater <dgl(a)dgl.cx>
netfilter: nf_conntrack_irc: Tighten matching on DCC message
Igor Ryzhov <iryzhov(a)nfware.com>
netfilter: nf_conntrack_sip: fix ct_sip_walk_headers
Fabio Estevam <festevam(a)denx.de>
arm64: dts: rockchip: Remove 'enable-active-low' from rk3399-puma
zain wang <wzz(a)rock-chips.com>
arm64: dts: rockchip: Set RK3399-Gru PCLK_EDP to 24 MHz
Chao Yu <chao.yu(a)oppo.com>
mm/slub: fix to return errno if kmalloc() fails
Ard Biesheuvel <ardb(a)kernel.org>
efi: libstub: check Shim mode using MokSBStateRT
Callum Osmotherly <callum.osmotherly(a)gmail.com>
ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5530 laptop
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ALSA: hda: add Intel 5 Series / 3400 PCI DID
Mohan Kumar <mkumard(a)nvidia.com>
ALSA: hda/tegra: set depop delay for tegra
jerry meng <jerry-meng(a)foxmail.com>
USB: serial: option: add Quectel RM520N
Carl Yin(殷张成) <carl.yin(a)quectel.com>
USB: serial: option: add Quectel BG95 0x0203 composition
Alan Stern <stern(a)rowland.harvard.edu>
USB: core: Fix RST error in hub.c
Siddh Raman Pant <code(a)siddh.me>
wifi: mac80211: Fix UAF in ieee80211_scan_rx()
Heikki Krogerus <heikki.krogerus(a)linux.intel.com>
usb: dwc3: pci: add support for the Intel Alder Lake-S
Heikki Krogerus <heikki.krogerus(a)linux.intel.com>
usb: dwc3: pci: add support for the Intel Jasper Lake
Heikki Krogerus <heikki.krogerus(a)linux.intel.com>
usb: dwc3: pci: add support for the Intel Tiger Lake PCH -H variant
Felipe Balbi <felipe.balbi(a)linux.intel.com>
usb: dwc3: pci: add support for TigerLake Devices
Felipe Balbi <felipe.balbi(a)linux.intel.com>
usb: dwc3: pci: Add Support for Intel Elkhart Lake Devices
Takashi Iwai <tiwai(a)suse.de>
ALSA: hda/sigmatel: Fix unused variable warning for beep power change
Hyunwoo Kim <imv4bel(a)gmail.com>
video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write
Youling Tang <tangyouling(a)loongson.cn>
mksysmap: Fix the mismatch of 'L0' symbols in System.map
Alexander Sverdlin <alexander.sverdlin(a)nokia.com>
MIPS: OCTEON: irq: Fix octeon_irq_force_ciu_mapping()
jerry.meng <jerry-meng(a)foxmail.com>
net: usb: qmi_wwan: add Quectel RM520N
Takashi Iwai <tiwai(a)suse.de>
ALSA: hda/sigmatel: Keep power up while beep is enabled
David Howells <dhowells(a)redhat.com>
rxrpc: Fix local destruction being repeated
Xiaolei Wang <xiaolei.wang(a)windriver.com>
regulator: pfuze100: Fix the global-out-of-bounds access in pfuze100_regulator_probe()
Takashi Iwai <tiwai(a)suse.de>
ASoC: nau8824: Fix semaphore unbalance at error paths
Stefan Metzmacher <metze(a)samba.org>
cifs: don't send down the destination address to sendmsg for a SOCK_STREAM
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
mvpp2: no need to check return value of debugfs_create functions
Bart Van Assche <bvanassche(a)acm.org>
nvmet: fix a use-after-free
Yang Yingliang <yangyingliang(a)huawei.com>
parisc: ccio-dma: Add missing iounmap in error path in ccio_probe()
Stuart Menefy <stuart.menefy(a)mathembedded.com>
drm/meson: Correct OSD1 global alpha value
Pali Rohár <pali(a)kernel.org>
gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx
Sergey Shtylyov <s.shtylyov(a)omp.ru>
of: fdt: fix off-by-one error in unflatten_dt_nodes()
-------------
Diffstat:
Makefile | 4 +--
.../boot/dts/rockchip/rk3399-gru-chromebook.dtsi | 8 +++++
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 1 -
arch/mips/cavium-octeon/octeon-irq.c | 10 +++++++
arch/mips/lantiq/clk.c | 1 +
drivers/firmware/efi/libstub/secureboot.c | 8 ++---
drivers/gpio/gpio-mpc8xxx.c | 1 +
.../drm/amd/display/modules/color/color_gamma.c | 4 +++
drivers/gpu/drm/meson/meson_plane.c | 2 +-
drivers/gpu/drm/rockchip/cdn-dp-core.c | 5 ++--
drivers/hv/vmbus_drv.c | 10 ++++++-
drivers/net/can/usb/gs_usb.c | 4 +--
drivers/net/ethernet/intel/i40e/i40e_main.c | 32 ++++++++++++++++----
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 20 +++++++++++++
drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 5 +++-
drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c | 19 +-----------
drivers/net/ethernet/sun/sunhme.c | 4 +--
drivers/net/ipvlan/ipvlan_core.c | 6 ++--
drivers/net/team/team.c | 24 +++++++++++----
drivers/net/usb/qmi_wwan.c | 1 +
drivers/nvme/target/core.c | 5 ++--
drivers/of/fdt.c | 2 +-
drivers/of/of_mdio.c | 1 +
drivers/parisc/ccio-dma.c | 1 +
drivers/regulator/pfuze100-regulator.c | 2 +-
drivers/s390/block/dasd_alias.c | 9 ++++--
drivers/tty/serial/serial-tegra.c | 5 ++--
drivers/usb/core/hub.c | 2 +-
drivers/usb/dwc3/dwc3-pci.c | 23 ++++++++++++++-
drivers/usb/serial/option.c | 6 ++++
drivers/video/fbdev/pxa3xx-gcu.c | 2 +-
fs/cifs/transport.c | 4 +--
fs/ext4/ialloc.c | 2 +-
include/linux/serial_core.h | 17 +++++++++++
kernel/workqueue.c | 6 ++--
mm/slub.c | 5 +++-
net/bridge/netfilter/ebtables.c | 4 ++-
net/mac80211/scan.c | 11 ++++---
net/netfilter/nf_conntrack_irc.c | 34 ++++++++++++++++++----
net/netfilter/nf_conntrack_sip.c | 4 +--
net/rxrpc/local_object.c | 3 ++
scripts/mksysmap | 2 +-
sound/pci/hda/hda_intel.c | 2 ++
sound/pci/hda/patch_hdmi.c | 1 +
sound/pci/hda/patch_realtek.c | 1 +
sound/pci/hda/patch_sigmatel.c | 24 +++++++++++++++
sound/soc/codecs/nau8824.c | 17 ++++++-----
tools/perf/util/genelf.c | 14 +++++++++
tools/perf/util/genelf.h | 4 +++
tools/perf/util/symbol-elf.c | 7 ++---
50 files changed, 295 insertions(+), 94 deletions(-)
This reverts commit 24cd0b9bfdff126c066032b0d40ab0962d35e777.
1) commit 4e89dce72521 ("iommu/iova: Retry from last rb tree node if
iova search fails") tries to fix that iova allocation can fail while
there are still free space available. This is not backported to 5.10
stable.
2) commit fce54ed02757 ("scsi: hisi_sas: Limit max hw sectors for v3
HW") fix the performance regression introduced by 1), however, this
is just a temporary solution and will cause io performance regression
because it limit max io size to PAGE_SIZE * 32(128k for 4k page_size).
3) John Garry posted a patchset to fix the problem.
4) The temporary solution is reverted.
It's weird that the patch in 2) is backported to 5.10 stable alone,
while the right thing to do is to backport them all together.
Signed-off-by: Yu Kuai <yukuai3(a)huawei.com>
---
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index dfe7e6370d84..cd41dc061d87 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -2738,7 +2738,6 @@ static int slave_configure_v3_hw(struct scsi_device *sdev)
struct hisi_hba *hisi_hba = shost_priv(shost);
struct device *dev = hisi_hba->dev;
int ret = sas_slave_configure(sdev);
- unsigned int max_sectors;
if (ret)
return ret;
@@ -2756,12 +2755,6 @@ static int slave_configure_v3_hw(struct scsi_device *sdev)
}
}
- /* Set according to IOMMU IOVA caching limit */
- max_sectors = min_t(size_t, queue_max_hw_sectors(sdev->request_queue),
- (PAGE_SIZE * 32) >> SECTOR_SHIFT);
-
- blk_queue_max_hw_sectors(sdev->request_queue, max_sectors);
-
return 0;
}
--
2.31.1