5.10.81-rc1 review
Greg Kroah-Hartman
maintainercover 5.10.81-rc1 review
This is the start of the stable review cycle for the 5.10.81 release. There are 21 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 Sun, 21 Nov 2021 17:14:35 +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/v5.x/stable-review/patch-5.10.81-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.10.81-rc1
Subbaraman Narayanamurthy <[email protected]>
thermal: Fix NULL pointer dereferences in of_thermal_ functions
Greg Thelen <[email protected]>
perf/core: Avoid put_page() when GUP fails
Nathan Chancellor <[email protected]>
scripts/lld-version.sh: Rewrite based on upstream ld-version.sh
Gao Xiang <[email protected]>
erofs: fix unsafe pagevec reuse of hooked pclusters
Yue Hu <[email protected]>
erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()
Marc Zyngier <[email protected]>
PCI: Add MSI masking quirk for Nvidia ION AHCI
Marc Zyngier <[email protected]>
PCI/MSI: Deal with devices lying about their MSI mask capability
Thomas Gleixner <[email protected]>
PCI/MSI: Destroy sysfs before freeing entries
Sven Schnelle <[email protected]>
parisc/entry: fix trace test in syscall exit path
Peter Zijlstra <[email protected]>
x86/iopl: Fake iopl(3) CLI/STI usage
Nick Desaulniers <[email protected]>
arm64: vdso32: suppress error message for 'make mrproper'
Michael Riesch <[email protected]>
net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings
Wong Vee Khee <[email protected]>
net: stmmac: fix issue where clk is being unprepared twice
Joakim Zhang <[email protected]>
net: stmmac: fix system hang if change mac address after interface ifdown
Yang Yingliang <[email protected]>
net: stmmac: fix missing unlock on error in stmmac_suspend()
Wei Yongjun <[email protected]>
net: stmmac: platform: fix build error with !CONFIG_PM_SLEEP
Joakim Zhang <[email protected]>
net: stmmac: add clocks management for gmac driver
Masami Hiramatsu <[email protected]>
bootconfig: init: Fix memblock leak in xbc_make_cmdline()
Xie Yongji <[email protected]>
loop: Use blk_validate_block_size() to validate block size
Xie Yongji <[email protected]>
block: Add a helper to validate the block size
Kees Cook <[email protected]>
fortify: Explicitly disable Clang support
-------------
Diffstat:
Makefile | 4 +- arch/arm64/kernel/vdso32/Makefile | 3 +- arch/parisc/kernel/entry.S | 2 +- arch/x86/include/asm/insn-eval.h | 1 + arch/x86/include/asm/processor.h | 1 + arch/x86/kernel/process.c | 1 + arch/x86/kernel/traps.c | 34 +++++++ arch/x86/lib/insn-eval.c | 2 +- drivers/block/loop.c | 17 +--- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 9 -- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 87 ++++++++++++++-- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 111 ++++++++++++++++----- .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 30 ++++-- drivers/pci/msi.c | 27 ++--- drivers/pci/quirks.c | 6 ++ drivers/thermal/thermal_of.c | 9 +- fs/erofs/zdata.c | 15 ++- fs/erofs/zpvec.h | 14 ++- include/linux/blkdev.h | 8 ++ include/linux/pci.h | 2 + init/main.c | 1 + kernel/events/core.c | 10 +- scripts/lld-version.sh | 35 +++++-- security/Kconfig | 3 + 25 files changed, 320 insertions(+), 113 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/21 fortify: Explicitly disable Clang support
From: Kees Cook <[email protected]>
commit a52f8a59aef46b59753e583bf4b28fccb069ce64 upstream.
Clang has never correctly compiled the FORTIFY_SOURCE defenses due to a couple bugs:
Eliding inlines with matching __builtin_* names https://bugs.llvm.org/show_bug.cgi?id=50322 Incorrect __builtin_constant_p() of some globals https://bugs.llvm.org/show_bug.cgi?id=41459
In the process of making improvements to the FORTIFY_SOURCE defenses, the first (silent) bug (coincidentally) becomes worked around, but exposes the latter which breaks the build. As such, Clang must not be used with CONFIG_FORTIFY_SOURCE until at least latter bug is fixed (in Clang 13), and the fortify routines have been rearranged.
Update the Kconfig to reflect the reality of the current situation.
--- security/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
security/Kconfig +3 -0
@@ -191,6 +191,9 @@ config HARDENED_USERCOPY_PAGESPAN config FORTIFY_SOURCE bool "Harden common str/mem functions against buffer overflows" depends on ARCH_HAS_FORTIFY_SOURCE + # https://bugs.llvm.org/show_bug.cgi?id=50322 + # https://bugs.llvm.org/show_bug.cgi?id=41459 + depends on !CC_IS_CLANG help Detect overflows of buffers in common string and memory functions where the compiler can determine and validate the buffer sizes.
Greg Kroah-Hartman
maintainerPATCH 2/21 block: Add a helper to validate the block size
In reply to Greg Kroah-HartmanFrom: Xie Yongji <[email protected]>
commit 570b1cac477643cbf01a45fa5d018430a1fddbce upstream.
There are some duplicated codes to validate the block size in block drivers. This limitation actually comes from block layer, so this patch tries to add a new block layer helper for that.
--- include/linux/blkdev.h | 8 ++++++++ 1 file changed, 8 insertions(+)
include/linux/blkdev.h +8 -0
@@ -59,6 +59,14 @@ struct blk_keyslot_manager;*/ #define BLKCG_MAX_POLS 5 +static inline int blk_validate_block_size (unsigned int bsize) +{ +if (bsize <512 || bsize >PAGE_SIZE || !is_power_of_2 (bsize)) +return -EINVAL ; + +return 0 ; +} +typedef void (rq_end_io_fn )(struct request *,blk_status_t );/*
Greg Kroah-Hartman
maintainerPATCH 3/21 loop: Use blk_validate_block_size() to validate block size
In reply to Greg Kroah-HartmanFrom: Xie Yongji <[email protected]>
commit af3c570fb0df422b4906ebd11c1bf363d89961d5 upstream.
Remove loop_validate_block_size() and use the block layer helper to validate block size.
--- drivers/block/loop.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-)
drivers/block/loop.c +2 -15
@@ -229,19 +229,6 @@ static void __loop_update_dio(struct loo }/** -* loop_validate_block_size() - validates the passed in block size -* @bsize: size to validate -*/ -static int -loop_validate_block_size (unsigned short bsize) -{ -if (bsize <512 || bsize >PAGE_SIZE || !is_power_of_2 (bsize)) -return -EINVAL ; - -return 0 ; -} - -/** * loop_set_size() - sets device size and notifies userspace * @lo: struct loop_device to set the size for * @size: new size of the loop device
@@ -1121,7 +1108,7 @@ static int loop_configure(struct loop_de }if (config->block_size) { - error =loop_validate_block_size (config->block_size); + error =blk_validate_block_size (config->block_size);if (error) goto out_unlock; }
@@ -1617,7 +1604,7 @@ static int loop_set_block_size(struct loif (lo->lo_state != Lo_bound)return -ENXIO ; - err =loop_validate_block_size (arg); + err =blk_validate_block_size (arg);if (err)return err;
Re: [PATCH 5.10 03/21] loop: Use blk_validate_block_size() to validate block size
Hi!
Quoted 4 lines
commit
af3c570fb0df422b4906ebd11c1bf363d89961d5upstream.Remove
loop_validate_block_size()and use the block layer helper to validate block size.
This is just a cleanup, and it needs previous cleanup to be applied. I would not mind if both were dropped from stable series.
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 03/21] loop: Use blk_validate_block_size() to validate block size
Quoted 9 lines · Pavel Machek
Hi!
Quoted 4 lines
commit
af3c570fb0df422b4906ebd11c1bf363d89961d5upstream.Remove
loop_validate_block_size()and use the block layer helper to validate block size.This is just a cleanup, and it needs previous cleanup to be applied. I would not mind if both were dropped from stable series.
No, it is not a cleanup, it fixes a real bug as reported on the stable mailing list.
greg k-h
Re: [PATCH 5.10 03/21] loop: Use blk_validate_block_size() to validate block size
Quoted 5 lines · Greg Kroah-Hartman
Quoted 4 lines · Pavel Machek
Hi!
Quoted 2 lines
commit
af3c570fb0df422b4906ebd11c1bf363d89961d5upstream.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Remove
loop_validate_block_size()and use the block layer helper to validate block size.This is just a cleanup, and it needs previous cleanup to be applied. I would not mind if both were dropped from stable series.
No, it is not a cleanup, it fixes a real bug as reported on the stable mailing list.
Aha:
https://lore.kernel.org/all/[email protected]/
Thanks for explanation.
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Greg Kroah-Hartman
maintainerPATCH 4/21 bootconfig: init: Fix memblock leak in xbc_make_cmdline()
In reply to Greg Kroah-HartmanFrom: Masami Hiramatsu <[email protected]>
commit 1ae43851b18afe861120ebd7c426dc44f06bb2bd upstream.
Free unused memblock in a error case to fix memblock leak in xbc_make_cmdline().
--- init/main.c | 1 + 1 file changed, 1 insertion(+)
init/main.c +1 -0
@@ -380,6 +380,7 @@ static char * __init xbc_make_cmdline(co ret =xbc_snprint_cmdline (new_cmdline, len +1 , root);if (ret <0 || ret > len) {pr_err ("Failed to print extra kernel cmdline.\n" ); +memblock_free (__pa (new_cmdline), len +1 );return NULL ; }
Greg Kroah-Hartman
maintainerPATCH 5/21 net: stmmac: add clocks management for gmac driver
In reply to Greg Kroah-HartmanFrom: Joakim Zhang <[email protected]>
commit 5ec55823438e850c91c6b92aec93fb04ebde29e2 upstream.
This patch intends to add clocks management for stmmac driver:
If CONFIG_PM enabled:
1. Keep clocks disabled after driver probed.
2. Enable clocks when up the net device, and disable clocks when down the net device.
If CONFIG_PM disabled:
Keep clocks always enabled after driver probed.
Note:
1. It is fine for ethtool, since the way of implementing ethtool_ops::begin in stmmac is only can be accessed when interface is enabled, so the clocks are ticked.
2. The MDIO bus has a different life cycle to the MAC, need ensure clocks are enabled when _mdio_read/write() need clocks, because these functions can be called while the interface it not opened.
Stable backport notes:
When run below command to remove ethernet driver on stratix10 platform, there will be warning trace as below:
$ cd /sys/class/net/eth0/device/driver/ $ echo ff800000.ethernet > unbind
WARNING: CPU: 3 PID: 386 at drivers/clk/clk.c:810 clk_core_unprepare+0x114/0x274 Modules linked in: sch_fq_codel CPU: 3 PID: 386 Comm: sh Tainted: G W 5.10.74-yocto-standard #1 Hardware name: SoCFPGA Stratix 10 SoCDK (DT) pstate: 00000005 (nzcv daif -PAN -UAO -TCO BTYPE=--) pc : clk_core_unprepare+0x114/0x274 lr : clk_core_unprepare+0x114/0x274 sp : ffff800011bdbb10 clk_core_unprepare+0x114/0x274 clk_unprepare+0x38/0x50 stmmac_remove_config_dt+0x40/0x80 stmmac_pltfr_remove+0x64/0x80 platform_drv_remove+0x38/0x60 ... .. el0_sync_handler+0x1a4/0x1b0 el0_sync+0x180/0x1c0
This issue is introduced by introducing upstream commit 8f269102baf7 ("net: stmmac: disable clocks in stmmac_remove_config_dt()")
But in latest mainline kernel, there is no this issue. Because this patch improved clocks management for stmmac driver. Therefore, backport it and its fixing patches to stable kernel v5.10.
--- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 75 ++++++++++-- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 111 +++++++++++++----- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 24 +++ 4 files changed, 174 insertions(+), 37 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac.h +1 -0
@@ -270,6 +270,7 @@ void stmmac_disable_eee_mode(struct stmmbool stmmac_eee_init (struct stmmac_priv *priv);int stmmac_reinit_queues (struct net_device *dev,u32 rx_cnt,u32 tx_cnt);int stmmac_reinit_ringparam (struct net_device *dev,u32 rx_size,u32 tx_size); +int stmmac_bus_clks_config (struct stmmac_priv *priv,bool enabled);#if IS_ENABLED (CONFIG_STMMAC_SELFTESTS ) void stmmac_selftest_run(struct net_device *dev,
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +66 -9
167 lines not on this page · raw message
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +85 -26
219 lines not on this page · raw message
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +22 -2
@@ -760,10 +760,30 @@ static int stmmac_pltfr_resume(struct dereturn stmmac_resume (dev); } + +static int stmmac_runtime_suspend (struct device *dev) +{ +struct net_device *ndev =dev_get_drvdata (dev); +struct stmmac_priv *priv =netdev_priv (ndev); + +stmmac_bus_clks_config (priv, false); + +return 0 ; +} + +static int stmmac_runtime_resume (struct device *dev) +{ +struct net_device *ndev =dev_get_drvdata (dev); +struct stmmac_priv *priv =netdev_priv (ndev); + +return stmmac_bus_clks_config (priv, true); +}#endif /* CONFIG_PM_SLEEP */ -SIMPLE_DEV_PM_OPS (stmmac_pltfr_pm_ops, stmmac_pltfr_suspend, - stmmac_pltfr_resume); +const struct dev_pm_ops stmmac_pltfr_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(stmmac_pltfr_suspend, stmmac_pltfr_resume) +SET_RUNTIME_PM_OPS (stmmac_runtime_suspend, stmmac_runtime_resume,NULL ) +};EXPORT_SYMBOL_GPL (stmmac_pltfr_pm_ops);MODULE_DESCRIPTION ("STMMAC 10/100/1000 Ethernet platform support" );
Greg Kroah-Hartman
maintainerPATCH 6/21 net: stmmac: platform: fix build error with !CONFIG_PM_SLEEP
In reply to Greg Kroah-HartmanFrom: Wei Yongjun <[email protected]>
commit 7ec05a6035480f3a5934b2b31222620b2e906163 upstream
Get rid of the CONFIG_PM_SLEEP ifdefery to fix the build error and use __maybe_unused for the suspend()/resume() hooks to avoid build warning:
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:769:21:
error: 'stmmac_runtime_suspend' undeclared here (not in a function); did you mean 'stmmac_suspend'?
769 | SET_RUNTIME_PM_OPS(stmmac_runtime_suspend, stmmac_runtime_resume, NULL)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/linux/pm.h:342:21: note: in definition of macro 'SET_RUNTIME_PM_OPS'
342 | .runtime_suspend = suspend_fn, \
| ^~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:769:45:
error: 'stmmac_runtime_resume' undeclared here (not in a function)
769 | SET_RUNTIME_PM_OPS(stmmac_runtime_suspend, stmmac_runtime_resume, NULL)
| ^~~~~~~~~~~~~~~~~~~~~
./include/linux/pm.h:343:20: note: in definition of macro 'SET_RUNTIME_PM_OPS'
343 | .runtime_resume = resume_fn, \
| ^~~~~~~~~--- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +4 -6
@@ -720,7 +720,6 @@ int stmmac_pltfr_remove(struct platform_ }EXPORT_SYMBOL_GPL (stmmac_pltfr_remove); -#ifdef CONFIG_PM_SLEEP /** * stmmac_pltfr_suspend * @dev: device pointer
@@ -728,7 +727,7 @@ EXPORT_SYMBOL_GPL(stmmac_pltfr_remove);* call the main suspend function and then, if required, on some platform, it * can call an exit helper. */ -static int stmmac_pltfr_suspend (struct device *dev) +static int __maybe_unused stmmac_pltfr_suspend (struct device *dev) {int ret;struct net_device *ndev =dev_get_drvdata (dev);
@@ -749,7 +748,7 @@ static int stmmac_pltfr_suspend(struct d* the main resume function, on some platforms, it can call own init helper * if required. */ -static int stmmac_pltfr_resume (struct device *dev) +static int __maybe_unused stmmac_pltfr_resume (struct device *dev) {struct net_device *ndev =dev_get_drvdata (dev);struct stmmac_priv *priv =netdev_priv (ndev);
@@ -761,7 +760,7 @@ static int stmmac_pltfr_resume(struct dereturn stmmac_resume (dev); } -static int stmmac_runtime_suspend (struct device *dev) +static int __maybe_unused stmmac_runtime_suspend (struct device *dev) {struct net_device *ndev =dev_get_drvdata (dev);struct stmmac_priv *priv =netdev_priv (ndev);
@@ -771,14 +770,13 @@ static int stmmac_runtime_suspend(structreturn 0 ; } -static int stmmac_runtime_resume (struct device *dev) +static int __maybe_unused stmmac_runtime_resume (struct device *dev) {struct net_device *ndev =dev_get_drvdata (dev);struct stmmac_priv *priv =netdev_priv (ndev);return stmmac_bus_clks_config (priv, true); } -#endif /* CONFIG_PM_SLEEP */ const struct dev_pm_ops stmmac_pltfr_pm_ops = {SET_SYSTEM_SLEEP_PM_OPS (stmmac_pltfr_suspend, stmmac_pltfr_resume)
Greg Kroah-Hartman
maintainerPATCH 7/21 net: stmmac: fix missing unlock on error in stmmac_suspend()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
commit 30f347ae7cc1178c431f968a89d4b4a375bc0d39 upstream
Add the missing unlock before return from stmmac_suspend() in the error handling case.
--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +3 -1
@@ -5275,8 +5275,10 @@ int stmmac_suspend(struct device *dev)/* Disable clock in case of PWM is off */ clk_disable_unprepare (priv->plat->clk_ptp_ref); ret =pm_runtime_force_suspend (dev); -if (ret) +if (ret) { +mutex_unlock (&priv->lock);return ret; + } }mutex_unlock (&priv->lock);
Greg Kroah-Hartman
maintainerPATCH 8/21 net: stmmac: fix system hang if change mac address after interface ifdown
In reply to Greg Kroah-HartmanFrom: Joakim Zhang <[email protected]>
commit 4691ffb18ac908609aab07d13af7995b6b89d33c upstream.
Fix system hang with below sequences:
~# ifconfig ethx down
~# ifconfig ethx hw ether xx:xx:xx:xx:xx:xx
After ethx down, stmmac all clocks gated off and then register access causes system hang.
--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +10 -1
@@ -4324,12 +4324,21 @@ static int stmmac_set_mac_address(structstruct stmmac_priv *priv =netdev_priv (ndev);int ret =0 ; + ret =pm_runtime_get_sync (priv->device); +if (ret <0 ) { +pm_runtime_put_noidle (priv->device); +return ret; + } + ret =eth_mac_addr (ndev, addr);if (ret) -return ret; + goto set_mac_error;stmmac_set_umac_addr (priv, priv->hw, ndev->dev_addr,0 ); +set_mac_error: +pm_runtime_put (priv->device); +return ret; }
Greg Kroah-Hartman
maintainerPATCH 9/21 net: stmmac: fix issue where clk is being unprepared twice
In reply to Greg Kroah-HartmanFrom: Wong Vee Khee <[email protected]>
commit ab00f3e051e851a8458f0d0eb1bb426deadb6619 upstream.
In the case of MDIO bus registration failure due to no external PHY devices is connected to the MAC, clk_disable_unprepare() is called in stmmac_bus_clk_config() and intel_eth_pci_probe() respectively.
The second call in intel_eth_pci_probe() will caused the following:-
[ 16.578605] intel-eth-pci 0000:00:1e.5: No PHY found [ 16.583778] intel-eth-pci 0000:00:1e.5: stmmac_dvr_probe: MDIO bus (id: 2) registration failed [ 16.680181] ------------[ cut here ]------------ [ 16.684861] stmmac-0000:00:1e.5 already disabled [ 16.689547] WARNING: CPU: 13 PID: 2053 at drivers/clk/clk.c:952 clk_core_disable+0x96/0x1b0 [ 16.697963] Modules linked in: dwc3 iTCO_wdt mei_hdcp iTCO_vendor_support udc_core x86_pkg_temp_thermal kvm_intel marvell10g kvm sch_fq_codel nfsd irqbypass dwmac_intel(+) stmmac uio ax88179_178a pcs_xpcs phylink uhid spi_pxa2xx_platform usbnet mei_me pcspkr tpm_crb mii i2c_i801 dw_dmac dwc3_pci thermal dw_dmac_core intel_rapl_msr libphy i2c_smbus mei tpm_tis intel_th_gth tpm_tis_core tpm intel_th_acpi intel_pmc_core intel_th i915 fuse configfs snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core snd_pcm snd_timer snd soundcore [ 16.746785] CPU: 13 PID: 2053 Comm: systemd-udevd Tainted: G U 5.13.0-rc3-intel-lts #76 [ 16.756134] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-S ADP-S DRR4 CRB, BIOS ADLIFSI1.R00.1494.B00.2012031421 12/03/2020 [ 16.769465] RIP: 0010:clk_core_disable+0x96/0x1b0 [ 16.774222] Code: 00 8b 05 45 96 17 01 85 c0 7f 24 48 8b 5b 30 48 85 db 74 a5 8b 43 7c 85 c0 75 93 48 8b 33 48 c7 c7 6e 32 cc b7 e8 b2 5d 52 00 <0f> 0b 5b 5d c3 65 8b 05 76 31 18 49 89 c0 48 0f a3 05 bc 92 1a 01 [ 16.793016] RSP: 0018:ffffa44580523aa0 EFLAGS: 00010086 [ 16.798287] RAX: 0000000000000000 RBX: ffff8d7d0eb70a00 RCX: 0000000000000000 [ 16.805435] RDX: 0000000000000002 RSI: ffffffffb7c62d5f RDI: 00000000ffffffff [ 16.812610] RBP: 0000000000000287 R08: 0000000000000000 R09: ffffa445805238d0 [ 16.819759] R10: 0000000000000001 R11: 0000000000000001 R12: ffff8d7d0eb70a00 [ 16.826904] R13: ffff8d7d027370c8 R14: 0000000000000006 R15: ffffa44580523ad0 [ 16.834047] FS: 00007f9882fa2600(0000) GS:ffff8d80a0940000(0000) knlGS:0000000000000000 [ 16.842177] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 16.847966] CR2: 00007f9882bea3d8 CR3: 000000010b126001 CR4: 0000000000370ee0 [ 16.855144] Call Trace: [ 16.857614] clk_core_disable_lock+0x1b/0x30 [ 16.861941] intel_eth_pci_probe.cold+0x11d/0x136 [dwmac_intel] [ 16.867913] pci_device_probe+0xcf/0x150 [ 16.871890] really_probe+0xf5/0x3e0 [ 16.875526] driver_probe_device+0x64/0x150 [ 16.879763] device_driver_attach+0x53/0x60 [ 16.883998] __driver_attach+0x9f/0x150 [ 16.887883] ? device_driver_attach+0x60/0x60 [ 16.892288] ? device_driver_attach+0x60/0x60 [ 16.896698] bus_for_each_dev+0x77/0xc0 [ 16.900583] bus_add_driver+0x184/0x1f0 [ 16.904469] driver_register+0x6c/0xc0 [ 16.908268] ? 0xffffffffc07ae000 [ 16.911598] do_one_initcall+0x4a/0x210 [ 16.915489] ? kmem_cache_alloc_trace+0x305/0x4e0 [ 16.920247] do_init_module+0x5c/0x230 [ 16.924057] load_module+0x2894/0x2b70 [ 16.927857] ? __do_sys_finit_module+0xb5/0x120 [ 16.932441] __do_sys_finit_module+0xb5/0x120 [ 16.936845] do_syscall_64+0x42/0x80 [ 16.940476] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 16.945586] RIP: 0033:0x7f98830e5ccd [ 16.949177] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 93 31 0c 00 f7 d8 64 89 01 48 [ 16.967970] RSP: 002b:00007ffc66b60168 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 16.975583] RAX: ffffffffffffffda RBX: 000055885de35ef0 RCX: 00007f98830e5ccd [ 16.982725] RDX: 0000000000000000 RSI: 00007f98832541e3 RDI: 0000000000000012 [ 16.989868] RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000000 [ 16.997042] R10: 0000000000000012 R11: 0000000000000246 R12: 00007f98832541e3 [ 17.004222] R13: 0000000000000000 R14: 0000000000000000 R15: 00007ffc66b60328 [ 17.011369] ---[ end trace df06a3dab26b988c ]--- [ 17.016062] ------------[ cut here ]------------ [ 17.020701] stmmac-0000:00:1e.5 already unprepared
Removing the stmmac_bus_clks_config() call in stmmac_dvr_probe and let dwmac-intel to handle the unprepare and disable of the clk device.
--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +0 -1
@@ -5179,7 +5179,6 @@ error_mdio_register:stmmac_napi_del (ndev); error_hw_init:destroy_workqueue (priv->wq); -stmmac_bus_clks_config (priv, false);return ret; }
Greg Kroah-Hartman
maintainerPATCH 10/21 net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings
In reply to Greg Kroah-HartmanFrom: Michael Riesch <[email protected]>
commit 2d26f6e39afb88d32b8f39e76a51b542c3c51674 upstream.
This reverts commit 2c896fb02e7f65299646f295a007bda043e0f382 "net: stmmac: dwmac-rk: add pd_gmac support for rk3399" and fixes unbalanced pm_runtime_enable warnings.
In the commit to be reverted, support for power management was introduced to the Rockchip glue code. Later, power management support was introduced to the stmmac core code, resulting in multiple invocations of pm_runtime_{enable,disable,get_sync,put_sync}.
The multiple invocations happen in rk_gmac_powerup and stmmac_{dvr_probe, resume} as well as in rk_gmac_powerdown and stmmac_{dvr_remove, suspend}, respectively, which are always called in conjunction.
--- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 9 --------- 1 file changed, 9 deletions(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +0 -9
@@ -21,7 +21,6 @@#include <linux/delay.h> #include <linux/mfd/syscon.h> #include <linux/regmap.h> -#include <linux/pm_runtime.h> #include "stmmac_platform.h"
@@ -1336,9 +1335,6 @@ static int rk_gmac_powerup(struct rk_prireturn ret; } -pm_runtime_enable (dev); -pm_runtime_get_sync (dev); -if (bsp_priv->integrated_phy)rk_gmac_integrated_phy_powerup (bsp_priv);
@@ -1347,14 +1343,9 @@ static int rk_gmac_powerup(struct rk_pristatic void rk_gmac_powerdown (struct rk_priv_data *gmac) { -struct device *dev = &gmac->pdev->dev; -if (gmac->integrated_phy)rk_gmac_integrated_phy_powerdown (gmac); -pm_runtime_put_sync (dev); -pm_runtime_disable (dev); -phy_power_on (gmac, false);gmac_clk_enable (gmac, false); }
Greg Kroah-Hartman
maintainerPATCH 11/21 arm64: vdso32: suppress error message for make mrproper
In reply to Greg Kroah-HartmanFrom: Nick Desaulniers <[email protected]>
commit 14831fad73f5ac30ac61760487d95a538e6ab3cb upstream.
When running the following command without arm-linux-gnueabi-gcc in one's $PATH, the following warning is observed:
$ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make -j72 LLVM=1 mrproper make[1]: arm-linux-gnueabi-gcc: No such file or directory
This is because KCONFIG is not run for mrproper, so CONFIG_CC_IS_CLANG is not set, and we end up eagerly evaluating various variables that try to invoke CC_COMPAT.
This is a similar problem to what was observed in
commit dc960bfeedb0 ("h8300: suppress error messages for 'make clean'")
--- arch/arm64/kernel/vdso32/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/kernel/vdso32/Makefile +2 -1
@@ -48,7 +48,8 @@ cc32-as-instr = $(call try-run,\ # As a result we set our own flags here. # KBUILD_CPPFLAGS and NOSTDINC_FLAGS from top-level Makefile -VDSO_CPPFLAGS := -D__KERNEL__ -nostdinc -isystem $(shell $(CC_COMPAT) -print-file-name=include) +VDSO_CPPFLAGS := -D__KERNEL__ -nostdinc +VDSO_CPPFLAGS += -isystem $(shell $(CC_COMPAT) -print-file-name=include) VDSO_CPPFLAGS += $(LINUXINCLUDE) # Common C and assembly flags
Re: [PATCH 5.10 11/21] arm64: vdso32: suppress error message for make mrproper
Hi!
Quoted 11 lines
commit
14831fad73f5ac30ac61760487d95a538e6ab3cbupstream.When running the following command without arm-linux-gnueabi-gcc in one's $PATH, the following warning is observed:
$ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make -j72 LLVM=1 mrproper make[1]: arm-linux-gnueabi-gcc: No such file or directoryThis is because KCONFIG is not run for mrproper, so
CONFIG_CC_IS_CLANGis not set, and we end up eagerly evaluating various variables that try to invokeCC_COMPAT.
Upstream commit is fine, but 5.10 port misses the 2> part of the change.
arch/arm64/kernel/vdso32/Makefile cc32-as-instr = $(call try-run,\ · line 55
Quoted 12 lines
+++ b/arch/arm64/kernel/vdso32/Makefile
arch/arm64/kernel/vdso32/Makefile +2
-1@@ -48,7 +48,8 @@ cc32-as-instr = $(call try-run,\ # As a result we set our own flags here. # KBUILD_CPPFLAGS and NOSTDINC_FLAGS from top-level Makefile -VDSO_CPPFLAGS := -D__KERNEL__ -nostdinc -isystem $(shell $(CC_COMPAT) -print-file-name=include) +VDSO_CPPFLAGS := -D__KERNEL__ -nostdinc +VDSO_CPPFLAGS += -isystem $(shell $(CC_COMPAT) -print-file-name=include) VDSO_CPPFLAGS += $(LINUXINCLUDE) # Common C and assembly flags
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Re: [PATCH 5.10 11/21] arm64: vdso32: suppress error message for make mrproper
Quoted 11 lines · Pavel Machek
Hi!
Quoted 8 lines
commit
14831fad73f5ac30ac61760487d95a538e6ab3cbupstream.When running the following command without arm-linux-gnueabi-gcc in one's $PATH, the following warning is observed:
$ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make -j72 LLVM=1 mrproper make[1]: arm-linux-gnueabi-gcc: No such file or directory
Quoted 6 lines
Quoted 3 lines
This is because KCONFIG is not run for mrproper, so
CONFIG_CC_IS_CLANGis not set, and we end up eagerly evaluating various variables that try to invokeCC_COMPAT.Upstream commit is fine, but 5.10 port misses the 2> part of the change.
You're right; thanks for the report. Greg, can you drop this version of the backport for 5.10 and 5.4? I'll resubmit an updated version.
Quoted 19 lines
arch/arm64/kernel/vdso32/Makefile cc32-as-instr = $(call try-run,\ · line 55
Quoted 13 lines
+++ b/arch/arm64/kernel/vdso32/Makefile
arch/arm64/kernel/vdso32/Makefile +2
-1@@ -48,7 +48,8 @@ cc32-as-instr = $(call try-run,\ # As a result we set our own flags here. # KBUILD_CPPFLAGS and NOSTDINC_FLAGS from top-level Makefile -VDSO_CPPFLAGS := -D__KERNEL__ -nostdinc -isystem $(shell $(CC_COMPAT) -print-file-name=include) +VDSO_CPPFLAGS := -D__KERNEL__ -nostdinc +VDSO_CPPFLAGS += -isystem $(shell $(CC_COMPAT) -print-file-name=include) VDSO_CPPFLAGS += $(LINUXINCLUDE) # Common C and assembly flagsBest regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Signature · 2 lines
Thanks, ~Nick Desaulniers
Re: [PATCH 5.10 11/21] arm64: vdso32: suppress error message for make mrproper
Quoted 17 lines · Nick Desaulniers
Quoted 15 lines · Pavel Machek
Hi!
Quoted 11 lines
commit
14831fad73f5ac30ac61760487d95a538e6ab3cbupstream.When running the following command without arm-linux-gnueabi-gcc in one's $PATH, the following warning is observed:
$ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make -j72 LLVM=1 mrproper make[1]: arm-linux-gnueabi-gcc: No such file or directoryThis is because KCONFIG is not run for mrproper, so
CONFIG_CC_IS_CLANGis not set, and we end up eagerly evaluating various variables that try to invokeCC_COMPAT.
Quoted 5 lines
Quoted 2 lines
Upstream commit is fine, but 5.10 port misses the 2> part of the change.
You're right; thanks for the report. Greg, can you drop this version of the backport for 5.10 and 5.4? I'll resubmit an updated version.
V2 sent:
https://lore.kernel.org/stable/CAKwvOdkZ1ydLs2VwvVLtT7QK+e1gNB0ZE5RqTxMY15QQvhxZ1w@mail.gmail.com/
Quoted 26 lines
Quoted 12 lines
Quoted 12 lines
+++ b/arch/arm64/kernel/vdso32/Makefile
arch/arm64/kernel/vdso32/Makefile +2
-1@@ -48,7 +48,8 @@ cc32-as-instr = $(call try-run,\ # As a result we set our own flags here. # KBUILD_CPPFLAGS and NOSTDINC_FLAGS from top-level Makefile -VDSO_CPPFLAGS := -D__KERNEL__ -nostdinc -isystem $(shell $(CC_COMPAT) -print-file-name=include) +VDSO_CPPFLAGS := -D__KERNEL__ -nostdinc +VDSO_CPPFLAGS += -isystem $(shell $(CC_COMPAT) -print-file-name=include) VDSO_CPPFLAGS += $(LINUXINCLUDE)Quoted 8 lines
arch/arm64/kernel/vdso32/Makefile cc32-as-instr = $(call try-run,\ · line 55
Quoted 2 lines
arch/arm64/kernel/vdso32/Makefile +0
-0# Common C and assembly flagsBest regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany--
Thanks,
~Nick Desaulniers
Signature · 2 lines
Thanks, ~Nick Desaulniers
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 11/21] arm64: vdso32: suppress error message for make mrproper
In reply to Nick DesaulniersQuoted 16 lines · Nick Desaulniers
Quoted 15 lines · Pavel Machek
Hi!
Quoted 11 lines
commit
14831fad73f5ac30ac61760487d95a538e6ab3cbupstream.When running the following command without arm-linux-gnueabi-gcc in one's $PATH, the following warning is observed:
$ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make -j72 LLVM=1 mrproper make[1]: arm-linux-gnueabi-gcc: No such file or directoryThis is because KCONFIG is not run for mrproper, so
CONFIG_CC_IS_CLANGis not set, and we end up eagerly evaluating various variables that try to invokeCC_COMPAT.
Quoted 5 lines
Quoted 2 lines
Upstream commit is fine, but 5.10 port misses the 2> part of the change.
You're right; thanks for the report. Greg, can you drop this version of the backport for 5.10 and 5.4? I'll resubmit an updated version.
Now dropped, thanks.
greg k-h
Greg Kroah-Hartman
maintainerPATCH 12/21 x86/iopl: Fake iopl(3) CLI/STI usage
In reply to Greg Kroah-HartmanFrom: Peter Zijlstra <[email protected]>
commit b968e84b509da593c50dc3db679e1d33de701f78 upstream.
Since commit c8137ace5638 ("x86/iopl: Restrict iopl() permission scope") it's possible to emulate iopl(3) using ioperm(), except for the CLI/STI usage.
Userspace CLI/STI usage is very dubious (read broken), since any exception taken during that window can lead to rescheduling anyway (or worse). The IOPL(2) manpage even states that usage of CLI/STI is highly discouraged and might even crash the system.
Of course, that won't stop people and HP has the dubious honour of being the first vendor to be found using this in their hp-health package.
In order to enable this 'software' to still 'work', have the #GP treat the CLI/STI instructions as NOPs when iopl(3). Warn the user that their program is doing dubious things.
--- arch/x86/include/asm/insn-eval.h | 1 + arch/x86/include/asm/processor.h | 1 + arch/x86/kernel/process.c | 1 + arch/x86/kernel/traps.c | 34 ++++++++++++++++++++++++++++++++++ arch/x86/lib/insn-eval.c | 2 +- 5 files changed, 38 insertions(+), 1 deletion(-)
arch/x86/include/asm/insn-eval.h +1 -0
@@ -21,6 +21,7 @@ int insn_get_modrm_rm_off(struct insn *iint insn_get_modrm_reg_off (struct insn *insn,struct pt_regs *regs);unsigned long insn_get_seg_base (struct pt_regs *regs,int seg_reg_idx);int insn_get_code_seg_params (struct pt_regs *regs); +unsigned long insn_get_effective_ip (struct pt_regs *regs);int insn_fetch_from_user (struct pt_regs *regs,unsigned char buf[MAX_INSN_SIZE ]); int insn_fetch_from_user_inatomic(struct pt_regs *regs,
arch/x86/include/asm/processor.h +1 -0
@@ -534,6 +534,7 @@ struct thread_struct {*/ unsigned long iopl_emul; + unsigned int iopl_warn:1; unsigned int sig_on_uaccess_err:1;/* Floating point and extended processor state */
arch/x86/kernel/process.c +1 -0
@@ -138,6 +138,7 @@ int copy_thread(unsigned long clone_flag frame->ret_addr = (unsigned long ) ret_from_fork; p->thread.sp = (unsigned long ) fork_frame; p->thread.io_bitmap =NULL ; + p->thread.iopl_warn =0 ;memset (p->thread.ptrace_bps,0 ,sizeof (p->thread.ptrace_bps));#ifdef CONFIG_X86_64
arch/x86/kernel/traps.c +34 -0
@@ -523,6 +523,37 @@ static enum kernel_gp_hint get_kernel_gp#define GPFSTR "general protection fault" +static bool fixup_iopl_exception (struct pt_regs *regs) +{ +struct thread_struct *t = ¤t->thread; +unsigned char byte; +unsigned long ip; + +if (!IS_ENABLED (CONFIG_X86_IOPL_IOPERM ) || t->iopl_emul !=3 ) +return false; + + ip =insn_get_effective_ip (regs); +if (!ip) +return false; + +if (get_user (byte, (const char __user *)ip)) +return false; + +if (byte !=0xfa && byte !=0xfb ) +return false; + +if (!t->iopl_warn &&printk_ratelimit ()) { +pr_err ("%s[%d] attempts to use CLI/STI, pretending it's a NOP, ip:%lx" , + current->comm,task_pid_nr (current), ip); +print_vma_addr (KERN_CONT " in " , ip); +pr_cont ("\n" ); + t->iopl_warn =1 ; + } + + regs->ip +=1 ; +return true; +} +DEFINE_IDTENTRY_ERRORCODE (exc_general_protection) {char desc[sizeof (GPFSTR ) +50 +2 *sizeof (unsigned long ) +1 ] =GPFSTR ;
@@ -548,6 +579,9 @@ DEFINE_IDTENTRY_ERRORCODE(exc_general_pr tsk = current;if (user_mode (regs)) { +if (fixup_iopl_exception (regs)) + goto exit; + tsk->thread.error_code = error_code; tsk->thread.trap_nr =X86_TRAP_GP ;
arch/x86/lib/insn-eval.c +1 -1
@@ -1415,7 +1415,7 @@ void __user *insn_get_addr_ref(struct in } } -static unsigned long insn_get_effective_ip (struct pt_regs *regs) +unsigned long insn_get_effective_ip (struct pt_regs *regs) {unsigned long seg_base =0 ;
Greg Kroah-Hartman
maintainerPATCH 13/21 parisc/entry: fix trace test in syscall exit path
In reply to Greg Kroah-HartmanFrom: Sven Schnelle <[email protected]>
commit 3ec18fc7831e7d79e2d536dd1f3bc0d3ba425e8a upstream.
commit 8779e05ba8aa ("parisc: Fix ptrace check on syscall return") fixed testing of TI_FLAGS. This uncovered a bug in the test mask. syscall_restore_rfi is only used when the kernel needs to exit to usespace with single or block stepping and the recovery counter enabled. The test however used _TIF_SYSCALL_TRACE_MASK, which includes a lot of bits that shouldn't be tested here.
Fix this by using TIF_SINGLESTEP and TIF_BLOCKSTEP directly.
I encountered this bug by enabling syscall tracepoints. Both in qemu and on real hardware. As soon as i enabled the tracepoint (sys_exit_read, but i guess it doesn't really matter which one), i got random page faults in userspace almost immediately.
--- arch/parisc/kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/parisc/kernel/entry.S +1 -1
@@ -1849,7 +1849,7 @@ syscall_restore: /* Are we being ptraced? */ LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19 - ldi _TIF_SYSCALL_TRACE_MASK,%r2 + ldi _TIF_SINGLESTEP|_TIF_BLOCKSTEP,%r2 and,COND(=) %r19,%r2,%r0 b,n syscall_restore_rfi
Greg Kroah-Hartman
maintainerPATCH 14/21 PCI/MSI: Destroy sysfs before freeing entries
In reply to Greg Kroah-HartmanFrom: Thomas Gleixner <[email protected]>
commit 3735459037114d31e5acd9894fad9aed104231a0 upstream.
free_msi_irqs() frees the MSI entries before destroying the sysfs entries which are exposing them. Nothing prevents a concurrent free while a sysfs file is read and accesses the possibly freed entry.
Move the sysfs release ahead of freeing the entries.
--- drivers/pci/msi.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/pci/msi.c +12 -12
@@ -396,18 +396,6 @@ static void free_msi_irqs(struct pci_devfor (i =0 ; i < entry->nvec_used; i++)BUG_ON (irq_has_action (entry->irq + i)); -pci_msi_teardown_msi_irqs (dev); - -list_for_each_entry_safe (entry, tmp, msi_list, list) { -if (entry->msi_attrib.is_msix) { -if (list_is_last (&entry->list, msi_list)) -iounmap (entry->mask_base); - } - -list_del (&entry->list); -free_msi_entry (entry); - } -if (dev->msi_irq_groups) {sysfs_remove_groups (&dev->dev.kobj, dev->msi_irq_groups); msi_attrs = dev->msi_irq_groups[0 ]->attrs;
@@ -423,6 +411,18 @@ static void free_msi_irqs(struct pci_devkfree (dev->msi_irq_groups); dev->msi_irq_groups =NULL ; } + +pci_msi_teardown_msi_irqs (dev); + +list_for_each_entry_safe (entry, tmp, msi_list, list) { +if (entry->msi_attrib.is_msix) { +if (list_is_last (&entry->list, msi_list)) +iounmap (entry->mask_base); + } + +list_del (&entry->list); +free_msi_entry (entry); + } }static void pci_intx_for_msi (struct pci_dev *dev,int enable)
Greg Kroah-Hartman
maintainerPATCH 15/21 PCI/MSI: Deal with devices lying about their MSI mask capability
In reply to Greg Kroah-HartmanFrom: Marc Zyngier <[email protected]>
commit 2226667a145db2e1f314d7f57fd644fe69863ab9 upstream.
It appears that some devices are lying about their mask capability, pretending that they don't have it, while they actually do. The net result is that now that we don't enable MSIs on such endpoint.
Add a new per-device flag to deal with this. Further patches will make use of it, sadly.
--- drivers/pci/msi.c | 3 +++ include/linux/pci.h | 2 ++ 2 files changed, 5 insertions(+)
drivers/pci/msi.c +3 -0
@@ -592,6 +592,9 @@ msi_setup_entry(struct pci_dev *dev, int goto out;pci_read_config_word (dev, dev->msi_cap +PCI_MSI_FLAGS , &control); +/* Lies, damned lies, and MSIs */ +if (dev->dev_flags &PCI_DEV_FLAGS_HAS_MSI_MASKING ) + control |=PCI_MSI_FLAGS_MASKBIT ; entry->msi_attrib.is_msix =0 ; entry->msi_attrib.is_64 = !!(control &PCI_MSI_FLAGS_64BIT );
include/linux/pci.h +2 -0
@@ -227,6 +227,8 @@ enum pci_dev_flags {PCI_DEV_FLAGS_NO_FLR_RESET = (__force pci_dev_flags_t) (1 <<10 ),/* Don't use Relaxed Ordering for TLPs directed at this device */ PCI_DEV_FLAGS_NO_RELAXED_ORDERING = (__force pci_dev_flags_t) (1 <<11 ), +/* Device does honor MSI masking despite saying otherwise */ + PCI_DEV_FLAGS_HAS_MSI_MASKING = (__force pci_dev_flags_t) (1 << 12), }; enum pci_irq_reroute_variant {
Greg Kroah-Hartman
maintainerPATCH 16/21 PCI: Add MSI masking quirk for Nvidia ION AHCI
In reply to Greg Kroah-HartmanFrom: Marc Zyngier <[email protected]>
commit f21082fb20dbfb3e42b769b59ef21c2a7f2c7c1f upstream.
The ION AHCI device pretends that MSI masking isn't a thing, while it actually implements it and needs MSIs to be unmasked to work. Add a quirk to that effect.
--- drivers/pci/quirks.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/pci/quirks.c +6 -0
@@ -5756,3 +5756,9 @@ static void apex_pci_fixup_class(struct }DECLARE_PCI_FIXUP_CLASS_HEADER (0x1ac1 ,0x089a ,PCI_CLASS_NOT_DEFINED ,8 , apex_pci_fixup_class); + +static void nvidia_ion_ahci_fixup (struct pci_dev *pdev) +{ + pdev->dev_flags |=PCI_DEV_FLAGS_HAS_MSI_MASKING ; +} +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_NVIDIA ,0x0ab8 , nvidia_ion_ahci_fixup);
Greg Kroah-Hartman
maintainerPATCH 17/21 erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()
In reply to Greg Kroah-HartmanFrom: Yue Hu <[email protected]>
commit 7dea3de7d384f4c8156e8bd93112ba6db1eb276c upstream.
No any behavior to variable occupied in z_erofs_attach_page() which is only caller to z_erofs_pagevec_enqueue().
--- fs/erofs/zdata.c | 4 +--- fs/erofs/zpvec.h | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-)
fs/erofs/zdata.c +1 -3
@@ -282,7 +282,6 @@ static int z_erofs_attach_page(struct z_ enum z_erofs_page_type type) {int ret; -bool occupied;/* give priority for inplaceio */ if (clt->mode >= COLLECT_PRIMARY &&
@@ -290,8 +289,7 @@ static int z_erofs_attach_page(struct z_ z_erofs_try_inplace_io(clt, page))return 0 ; - ret =z_erofs_pagevec_enqueue (&clt->vector, - page, type, &occupied); + ret =z_erofs_pagevec_enqueue (&clt->vector, page, type); clt->cl->vcnt += (unsigned int )ret;return ret ?0 : -EAGAIN ;
fs/erofs/zpvec.h +1 -4
@@ -107,10 +107,8 @@ static inline void z_erofs_pagevec_ctor_static inline bool z_erofs_pagevec_enqueue (struct z_erofs_pagevec_ctor *ctor,struct page *page, -enum z_erofs_page_type type, -bool *occupied) +enum z_erofs_page_type type) { - *occupied = false;if (!ctor->next && type)if (ctor->index +1 == ctor->nr)return false;
@@ -125,7 +123,6 @@ static inline bool z_erofs_pagevec_enque/* should remind that collector->next never equal to 1, 2 */ if (type == (uintptr_t )ctor->next) { ctor->next = page; - *occupied = true; } ctor->pages[ctor->index++] =tagptr_fold (erofs_vtptr_t, page, type);return true;
Greg Kroah-Hartman
maintainerPATCH 18/21 erofs: fix unsafe pagevec reuse of hooked pclusters
In reply to Greg Kroah-HartmanFrom: Gao Xiang <[email protected]>
commit 86432a6dca9bed79111990851df5756d3eb5f57c upstream.
There are pclusters in runtime marked with Z_EROFS_PCLUSTER_TAIL before actual I/O submission. Thus, the decompression chain can be extended if the following pcluster chain hooks such tail pcluster.
As the related comment mentioned, if some page is made of a hooked pcluster and another followed pcluster, it can be reused for in-place I/O (since I/O should be submitted anyway):
_______________________________________________________________
| tail (partial) page | head (partial) page | |_____PRIMARY_HOOKED___|____________PRIMARY_FOLLOWED____________|
However, it's by no means safe to reuse as pagevec since if such PRIMARY_HOOKED pclusters finally move into bypass chain without I/O submission. It's somewhat hard to reproduce with LZ4 and I just found it (general protection fault) by ro_fsstressing a LZMA image for long time.
I'm going to actively clean up related code together with multi-page folio adaption in the next few months. Let's address it directly for easier backporting for now.
Call trace for reference:
z_erofs_decompress_pcluster+0x10a/0x8a0 [erofs] z_erofs_decompress_queue.isra.36+0x3c/0x60 [erofs] z_erofs_runqueue+0x5f3/0x840 [erofs] z_erofs_readahead+0x1e8/0x320 [erofs] read_pages+0x91/0x270 page_cache_ra_unbounded+0x18b/0x240 filemap_get_pages+0x10a/0x5f0 filemap_read+0xa9/0x330 new_sync_read+0x11b/0x1a0 vfs_read+0xf1/0x190
--- fs/erofs/zdata.c | 13 +++++++------ fs/erofs/zpvec.h | 13 ++++++++++--- 2 files changed, 17 insertions(+), 9 deletions(-)
fs/erofs/zdata.c +7 -6
@@ -278,8 +278,8 @@ static inline bool z_erofs_try_inplace_i/* callers must be with collection lock held */ static int z_erofs_attach_page (struct z_erofs_collector *clt, -struct page *page, -enum z_erofs_page_type type) +struct page *page,enum z_erofs_page_type type, +bool pvec_safereuse) {int ret;
@@ -289,9 +289,9 @@ static int z_erofs_attach_page(struct z_ z_erofs_try_inplace_io(clt, page))return 0 ; - ret =z_erofs_pagevec_enqueue (&clt->vector, page, type); + ret =z_erofs_pagevec_enqueue (&clt->vector, page, type, + pvec_safereuse); clt->cl->vcnt += (unsigned int )ret; -return ret ?0 : -EAGAIN ; }
@@ -645,7 +645,8 @@ hitted: tight &= (clt->mode >=COLLECT_PRIMARY_FOLLOWED ); retry: - err =z_erofs_attach_page (clt, page, page_type); + err =z_erofs_attach_page (clt, page, page_type, + clt->mode >=COLLECT_PRIMARY_FOLLOWED );/* should allocate an additional staging page for pagevec */ if (err == -EAGAIN ) { struct page *const newpage =
@@ -653,7 +654,7 @@ retry: newpage->mapping =Z_EROFS_MAPPING_STAGING ; err =z_erofs_attach_page (clt, newpage, -Z_EROFS_PAGE_TYPE_EXCLUSIVE ); +Z_EROFS_PAGE_TYPE_EXCLUSIVE , true);if (!err) goto retry; }
fs/erofs/zpvec.h +10 -3
@@ -107,11 +107,18 @@ static inline void z_erofs_pagevec_ctor_static inline bool z_erofs_pagevec_enqueue (struct z_erofs_pagevec_ctor *ctor,struct page *page, -enum z_erofs_page_type type) +enum z_erofs_page_type type, +bool pvec_safereuse) { -if (!ctor->next && type) -if (ctor->index +1 == ctor->nr) +if (!ctor->next) { +/* some pages cannot be reused as pvec safely without I/O */ +if (type ==Z_EROFS_PAGE_TYPE_EXCLUSIVE && !pvec_safereuse) + type =Z_EROFS_VLE_PAGE_TYPE_TAIL_SHARED ; + +if (type !=Z_EROFS_PAGE_TYPE_EXCLUSIVE && + ctor->index +1 == ctor->nr)return false; + }if (ctor->index >= ctor->nr)z_erofs_pagevec_ctor_pagedown (ctor, false);
Greg Kroah-Hartman
maintainerPATCH 19/21 scripts/lld-version.sh: Rewrite based on upstream ld-version.sh
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
This patch is for linux-5.10.y only.
When scripts/lld-version.sh was initially written, it did not account for the LLD_VENDOR cmake flag, which changes the output of ld.lld's --version flag slightly.
Without LLD_VENDOR:
$ ld.lld --version LLD 14.0.0 (compatible with GNU linkers)
With LLD_VENDOR:
$ ld.lld --version Debian LLD 14.0.0 (compatible with GNU linkers)
As a result, CONFIG_LLD_VERSION is messed up and configuration values that are dependent on it cannot be selected:
scripts/lld-version.sh: 20: printf: LLD: expected numeric value scripts/lld-version.sh: 20: printf: LLD: expected numeric value scripts/lld-version.sh: 20: printf: LLD: expected numeric value init/Kconfig:52:warning: 'LLD_VERSION': number is invalid .config:11:warning: symbol value '00000' invalid for LLD_VERSION .config:8800:warning: override: CPU_BIG_ENDIAN changes choice state
This was fixed upstream by commit 1f09af062556 ("kbuild: Fix ld-version.sh script if LLD was built with LLD_VENDOR") in 5.12 but that was done to ld-version.sh after it was massively rewritten in commit 02aff8592204 ("kbuild: check the minimum linker version in Kconfig").
To avoid bringing in that change plus its prerequisites and fixes, just modify lld-version.sh to make it similar to the upstream ld-version.sh, which handles ld.lld with or without LLD_VENDOR and ld.bfd without any errors.
--- scripts/lld-version.sh | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-)
scripts/lld-version.sh +26 -9
@@ -6,15 +6,32 @@ # Print the linker version of `ld.lld' in a 5 or 6-digit form # such as `100001' for ld.lld 10.0.1 etc. -linker_string="$($* --version)" +set -e -if ! ( echo $linker_string | grep -q LLD ); then +# Convert the version string x.y.z to a canonical 5 or 6-digit form. +get_canonical_version() +{ + IFS=. + set -- $1 + + # If the 2nd or 3rd field is missing, fill it with a zero. + echo $((10000 * $1 + 100 * ${2:-0} + ${3:-0})) +} + +# Get the first line of the --version output. +IFS=' +' +set -- $(LC_ALL=C "$@" --version) + +# Split the line on spaces. +IFS=' ' +set -- $1 + +while [ $# -gt 1 -a "$1" != "LLD" ]; do + shift +done +if [ "$1" = LLD ]; then + echo $(get_canonical_version ${2%-*}) +else echo 0 - exit 1 fi - -VERSION=$(echo $linker_string | cut -d ' ' -f 2) -MAJOR=$(echo $VERSION | cut -d . -f 1) -MINOR=$(echo $VERSION | cut -d . -f 2) -PATCHLEVEL=$(echo $VERSION | cut -d . -f 3) -printf "%d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL
Greg Kroah-Hartman
maintainerPATCH 20/21 perf/core: Avoid put_page() when GUP fails
In reply to Greg Kroah-HartmanFrom: Greg Thelen <[email protected]>
commit 4716023a8f6a0f4a28047f14dd7ebdc319606b84 upstream.
PEBS PERF_SAMPLE_PHYS_ADDR events use perf_virt_to_phys() to convert PMU sampled virtual addresses to physical using get_user_page_fast_only() and page_to_phys().
Some get_user_page_fast_only() error cases return false, indicating no page reference, but still initialize the output page pointer with an unreferenced page. In these error cases perf_virt_to_phys() calls put_page(). This causes page reference count underflow, which can lead to unintentional page sharing.
Fix perf_virt_to_phys() to only put_page() if get_user_page_fast_only() returns a referenced page.
--- kernel/events/core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
kernel/events/core.c +5 -5
@@ -7036,7 +7036,6 @@ void perf_output_sample(struct perf_outpstatic u64 perf_virt_to_phys (u64 virt) {u64 phys_addr =0 ; -struct page *p =NULL ;if (!virt)return 0 ;
@@ -7055,14 +7054,15 @@ static u64 perf_virt_to_phys(u64 virt)* If failed, leave phys_addr as 0. */ if (current->mm !=NULL ) { +struct page *p; +pagefault_disable (); -if (get_user_page_fast_only (virt,0 , &p)) +if (get_user_page_fast_only (virt,0 , &p)) { phys_addr =page_to_phys (p) + virt %PAGE_SIZE ; +put_page (p); + }pagefault_enable (); } - -if (p) -put_page (p); }return phys_addr;
Greg Kroah-Hartman
maintainerPATCH 21/21 thermal: Fix NULL pointer dereferences in of_thermal_ functions
In reply to Greg Kroah-HartmanFrom: Subbaraman Narayanamurthy <[email protected]>
commit 96cfe05051fd8543cdedd6807ec59a0e6c409195 upstream.
of_parse_thermal_zones() parses the thermal-zones node and registers a thermal_zone device for each subnode. However, if a thermal zone is consuming a thermal sensor and that thermal sensor device hasn't probed yet, an attempt to set trip_point_*_temp for that thermal zone device can cause a NULL pointer dereference. Fix it.
console:/sys/class/thermal/thermal_zone87 # echo 120000 > trip_point_0_temp
...
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020 ... Call trace: of_thermal_set_trip_temp+0x40/0xc4 trip_point_temp_store+0xc0/0x1dc dev_attr_store+0x38/0x88 sysfs_kf_write+0x64/0xc0 kernfs_fop_write_iter+0x108/0x1d0 vfs_write+0x2f4/0x368 ksys_write+0x7c/0xec __arm64_sys_write+0x20/0x30 el0_svc_common.llvm.7279915941325364641+0xbc/0x1bc do_el0_svc+0x28/0xa0 el0_svc+0x14/0x24 el0_sync_handler+0x88/0xec el0_sync+0x1c0/0x200
While at it, fix the possible NULL pointer dereference in other functions as well: of_thermal_get_temp(), of_thermal_set_emul_temp(), of_thermal_get_trend().
--- drivers/thermal/thermal_of.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/thermal/thermal_of.c +6 -3
@@ -89,7 +89,7 @@ static int of_thermal_get_temp(struct th {struct __thermal_zone *data = tz->devdata; -if (!data->ops->get_temp) +if (!data->ops || !data->ops->get_temp)return -EINVAL ;return data->ops->get_temp (data->sensor_data, temp);
@@ -186,6 +186,9 @@ static int of_thermal_set_emul_temp(stru {struct __thermal_zone *data = tz->devdata; +if (!data->ops || !data->ops->set_emul_temp) +return -EINVAL ; +return data->ops->set_emul_temp (data->sensor_data, temp); }
@@ -194,7 +197,7 @@ static int of_thermal_get_trend(struct t {struct __thermal_zone *data = tz->devdata; -if (!data->ops->get_trend) +if (!data->ops || !data->ops->get_trend)return -EINVAL ;return data->ops->get_trend (data->sensor_data, trip, trend);
@@ -301,7 +304,7 @@ static int of_thermal_set_trip_temp(struif (trip >= data->ntrips || trip <0 )return -EDOM ; -if (data->ops->set_trip_temp) { +if (data->ops && data->ops->set_trip_temp) {int ret; ret = data->ops->set_trip_temp (data->sensor_data, trip, temp);
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.81 release. There are 21 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 Sun, 21 Nov 2021 17:14:35 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.81-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels:
Signature · 1 line
Florian
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.81 release. There are 21 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 Sun, 21 Nov 2021 17:14:35 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.81-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
5.10.81-rc1 Successfully Compiled and booted on my Raspberry PI 4b (8g) (bcm2711)
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.81 release. There are 21 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 Sun, 21 Nov 2021 17:14:35 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.81-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 5.10.81 release. There are 21 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.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-5.10.y
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Hi Greg,
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.81 release. There are 21 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 Sun, 21 Nov 2021 17:14:35 +0000. Anything received after that time might be too late.
Build test:
mips (gcc version 11.2.1 20211112): 63 configs -> no new failure arm (gcc version 11.2.1 20211112): 105 configs -> no new failure arm64 (gcc version 11.2.1 20211112): 3 configs -> no failure x86_64 (gcc version 11.2.1 20211112): 4 configs -> no failure
Boot test:x86_64: Booted on my test laptop. No regression.x86_64: Booted on qemu. No regression. [1]
arm64: Booted on rpi4b (4GB model). No regression. [2]
[1]. https://openqa.qa.codethink.co.uk/tests/410
[2]. https://openqa.qa.codethink.co.uk/tests/409
--
Regards
Sudip
Hello!
Quoted 16 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.81 release. There are 21 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 Sun, 21 Nov 2021 17:14:35 +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/v5.x/stable-review/patch-5.10.81-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
Quoted 7 lines
greg k-h
-------------
Pseudo-Shortlog of commits:Greg Kroah-Hartman <[email protected]>
Linux 5.10.81-rc1
[...]> Peter Zijlstra <[email protected]>
Quoted 1 line
x86/iopl: Fake iopl(3) CLI/STI usage
[...]
Results from Linaro's test farm.
Regressions found on x86_64 and i386, on iopl. Here's an excerpt of the selftest:
[ 0.000000] Linux version 5.10.81-rc1 (oe-user@oe-host) (x86_64-linaro-linux-gcc (GCC) 7.3.0, GNU ld (GNU Binutils) 2.30.0.20180208) #1 SMP Fri Nov 19 19:48:55 UTC 2021 [...] [ 170.351838] traps: iopl_64[2769] attempts to use CLI/STI, pretending it's a NOP, ip:400dde in iopl_64[400000+2000]
[...]
# selftests: x86: iopl_64
# [FAIL] CLI worked
# [FAIL] STI worked
# [OK] outb to 0x80 worked
# [OK] outb to 0x80 worked
# [OK] outb to 0xed failed
# child: set IOPL to 3
# [RUN] child: write to 0x80
# [FAIL] CLI worked
# [FAIL] STI worked
# [OK] outb to 0x80 worked
# [OK] outb to 0x80 worked
# [OK] outb to 0xed failed
# [OK] Child succeeded
# [RUN] parent: write to 0x80 (should fail)
# [OK] outb to 0x80 failed
# [OK] CLI faulted
# [OK] STI faulted
# iopl(3)
# Drop privileges
# [RUN] iopl(3) unprivileged but with IOPL==3
# [RUN] iopl(0) unprivileged
# [RUN] iopl(3) unprivileged
# [OK] Failed as expected
not ok 7 selftests: x86: iopl_64 # exit=1
The baseline kernel (v5.10.80) exhibited this output:
# selftests: x86: iopl_64
# [OK] CLI faulted
# [OK] STI faulted
# [OK] outb to 0x80 worked
# [OK] outb to 0x80 worked
# [OK] outb to 0xed failed
# child: set IOPL to 3
# [RUN] child: write to 0x80
# [OK] CLI faulted
# [OK] STI faulted
# [OK] outb to 0x80 worked
# [OK] outb to 0x80 worked
# [OK] outb to 0xed failed
# [OK] Child succeeded
# [RUN] parent: write to 0x80 (should fail)
# [OK] outb to 0x80 failed
# [OK] CLI faulted
# [OK] STI faulted
# iopl(3)
# Drop privileges
# [RUN] iopl(3) unprivileged but with IOPL==3
# [RUN] iopl(0) unprivileged
# [RUN] iopl(3) unprivileged
# [OK] Failed as expected
ok 7 selftests: x86: iopl_64
## Build
* kernel: 5.10.81-rc1
* git: ['https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git', 'https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc']
* git branch: linux-5.10.y
* git commit: ed689bd1df46a07911fffa509cd06c5ec7beb9c1
* git describe: v5.10.80-22-ged689bd1df46
* test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.80-22-ged689bd1df46
## Regressions (compared to v5.10.80)
* i386, kselftest-x86
- x86.iopl_32
* qemu_x86_64, kselftest-x86
- x86.iopl_64
* x86, kselftest-x86
- x86.iopl_64
## No fixes (compared to v5.10.80)
## Test result summary
total: 91125, pass: 77560, fail: 574, skip: 12243, xfail: 748
## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 259 total, 259 passed, 0 failed
* arm64: 37 total, 37 passed, 0 failed
* dragonboard-410c: 1 total, 1 passed, 0 failed
* hi6220-hikey: 1 total, 1 passed, 0 failed
* i386: 36 total, 36 passed, 0 failed
* juno-r2: 1 total, 1 passed, 0 failed
* mips: 34 total, 34 passed, 0 failed
* parisc: 12 total, 12 passed, 0 failed
* powerpc: 54 total, 46 passed, 8 failed
* riscv: 24 total, 24 passed, 0 failed
* s390: 18 total, 18 passed, 0 failed
* sh: 24 total, 24 passed, 0 failed
* sparc: 12 total, 12 passed, 0 failed
* x15: 1 total, 1 passed, 0 failed
* x86: 1 total, 1 passed, 0 failed
* x86_64: 37 total, 37 passed, 0 failed
## Test suites summary
* fwts
* igt-gpu-tools
* kselftest-android
* kselftest-bpf
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers
* kselftest-efivarfs
* kselftest-filesystems
* kselftest-firmware
* kselftest-fpu
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-vm
* kselftest-x86
* kselftest-zram
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-controllers-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-open-posix-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* ltp-tracing-tests
* network-basic-tests
* packetdrill
* perf
* rcutorture
* ssuite
* v4l2-compliance
Greetings!
Daniel Díaz
[email protected]
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Naresh Kamboju
Acked-by Thomas Gleixner+ Peter Zijlstra
+ Thomas Gleixner
+ Borislav Petkov
+ Ondrej Zary
Quoted 20 lines · Daniel Díaz
Hello!
Quoted 16 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.81 release. There are 21 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 Sun, 21 Nov 2021 17:14:35 +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/v5.x/stable-review/patch-5.10.81-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
Quoted 9 lines
Quoted 7 lines
greg k-h
-------------
Pseudo-Shortlog of commits:Greg Kroah-Hartman <[email protected]>
Linux 5.10.81-rc1[...]> Peter Zijlstra <[email protected]>
Quoted 1 line
x86/iopl: Fake iopl(3) CLI/STI usage
This is due to ^ new kernel code + old test case (Test case needs to be updated)
Quoted 5 lines
[...]
Results from Linaro's test farm.
Regressions found onx86_64and i386, on iopl. Here's an excerpt of the selftest:
Quoted 7 lines
[ 0.000000] Linux version 5.10.81-rc1 (oe-user@oe-host) (x86_64-linaro-linux-gcc (GCC) 7.3.0, GNU ld (GNU Binutils) 2.30.0.20180208) #1 SMP Fri Nov 19 19:48:55 UTC 2021 [...] [ 170.351838] traps: iopl_64[2769] attempts to use CLI/STI, pretending it's a NOP, ip:400dde in iopl_64[400000+2000][...]
# selftests: x86:iopl_64
# [FAIL] CLI worked
# [FAIL] STI worked
This failure was detected on linux next and the later test case has been fixed. The Following patch could fix this problem across 5.10, 5.14 and 5.15.
Patch details,
---
selftests/x86/iopl: Adjust to the faked iopl CLI/STI usage
Commit in Fixes changed the iopl emulation to not #GP on CLI and STI because it would break some insane luserspace tools which would toggle interrupts.
The corresponding selftest would rely on the fact that executing CLI/STI would trigger a #GP and thus detect it this way but since that #GP is not happening anymore, the detection is now wrong too.
Extend the test to actually look at the IF flag and whether executing those insns had any effect on it. The STI detection needs to have the fact that interrupts were previously disabled, passed in so do that from the previous CLI test, i.e., STI test needs to follow a previous CLI one for it to make sense.
Quoted 203 lines
# [OK] outb to 0x80 worked # [OK] outb to 0x80 worked # [OK] outb to 0xed failed # child: set IOPL to 3 # [RUN] child: write to 0x80 # [FAIL] CLI worked # [FAIL] STI worked # [OK] outb to 0x80 worked # [OK] outb to 0x80 worked # [OK] outb to 0xed failed # [OK] Child succeeded # [RUN] parent: write to 0x80 (should fail) # [OK] outb to 0x80 failed # [OK] CLI faulted # [OK] STI faulted # iopl(3) # Drop privileges # [RUN] iopl(3) unprivileged but with IOPL==3 # [RUN] iopl(0) unprivileged # [RUN] iopl(3) unprivileged # [OK] Failed as expectednot ok 7 selftests: x86:
iopl_64# exit=1The baseline kernel (v5.10.80) exhibited this output:
# selftests: x86:iopl_64# [OK] CLI faulted # [OK] STI faulted # [OK] outb to 0x80 worked # [OK] outb to 0x80 worked # [OK] outb to 0xed failed # child: set IOPL to 3 # [RUN] child: write to 0x80 # [OK] CLI faulted # [OK] STI faulted # [OK] outb to 0x80 worked # [OK] outb to 0x80 worked # [OK] outb to 0xed failed # [OK] Child succeeded # [RUN] parent: write to 0x80 (should fail) # [OK] outb to 0x80 failed # [OK] CLI faulted # [OK] STI faulted # iopl(3) # Drop privileges # [RUN] iopl(3) unprivileged but with IOPL==3 # [RUN] iopl(0) unprivileged # [RUN] iopl(3) unprivileged # [OK] Failed as expectedok 7 selftests: x86:
iopl_64## Build
* kernel: 5.10.81-rc1
* git: ['https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git', 'https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc']
* git branch: linux-5.10.y
* git commit:ed689bd1df46a07911fffa509cd06c5ec7beb9c1
* git describe: v5.10.80-22-ged689bd1df46
* test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.80-22-ged689bd1df46## Regressions (compared to v5.10.80)
* i386, kselftest-x86
- x86.iopl_32*
qemu_x86_64, kselftest-x86
- x86.iopl_64* x86, kselftest-x86
- x86.iopl_64## No fixes (compared to v5.10.80)
## Test result summary
total: 91125, pass: 77560, fail: 574, skip: 12243, xfail: 748## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 259 total, 259 passed, 0 failed
* arm64: 37 total, 37 passed, 0 failed
* dragonboard-410c: 1 total, 1 passed, 0 failed
* hi6220-hikey: 1 total, 1 passed, 0 failed
* i386: 36 total, 36 passed, 0 failed
* juno-r2: 1 total, 1 passed, 0 failed
* mips: 34 total, 34 passed, 0 failed
* parisc: 12 total, 12 passed, 0 failed
* powerpc: 54 total, 46 passed, 8 failed
* riscv: 24 total, 24 passed, 0 failed
* s390: 18 total, 18 passed, 0 failed
* sh: 24 total, 24 passed, 0 failed
* sparc: 12 total, 12 passed, 0 failed
* x15: 1 total, 1 passed, 0 failed
* x86: 1 total, 1 passed, 0 failed
*x86_64: 37 total, 37 passed, 0 failed## Test suites summary
* fwts
* igt-gpu-tools
* kselftest-android
* kselftest-bpf
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers
* kselftest-efivarfs
* kselftest-filesystems
* kselftest-firmware
* kselftest-fpu
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-vm
* kselftest-x86
* kselftest-zram
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-controllers-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-open-posix-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* ltp-tracing-tests
* network-basic-tests
* packetdrill
* perf
* rcutorture
* ssuite
* v4l2-complianceGreetings!
Daniel Díaz
[email protected]--
Linaro LKFT
https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 74 lines · Naresh Kamboju
+ Peter Zijlstra
+ Thomas Gleixner
+ Borislav Petkov
+ Ondrej ZaryQuoted 20 lines · Daniel Díaz
Hello!
Quoted 16 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.81 release. There are 21 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 Sun, 21 Nov 2021 17:14:35 +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/v5.x/stable-review/patch-5.10.81-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
Quoted 9 lines
Quoted 7 lines
greg k-h
-------------
Pseudo-Shortlog of commits:Greg Kroah-Hartman <[email protected]>
Linux 5.10.81-rc1[...]> Peter Zijlstra <[email protected]>
Quoted 1 line
x86/iopl: Fake iopl(3) CLI/STI usage
This is due to ^ new kernel code + old test case (Test case needs to be updated)
Quoted 5 lines
[...]
Results from Linaro's test farm.
Regressions found onx86_64and i386, on iopl. Here's an excerpt of the selftest:Quoted 7 lines
[ 0.000000] Linux version 5.10.81-rc1 (oe-user@oe-host) (x86_64-linaro-linux-gcc (GCC) 7.3.0, GNU ld (GNU Binutils) 2.30.0.20180208) #1 SMP Fri Nov 19 19:48:55 UTC 2021 [...] [ 170.351838] traps: iopl_64[2769] attempts to use CLI/STI, pretending it's a NOP, ip:400dde in iopl_64[400000+2000][...]
# selftests: x86:iopl_64
# [FAIL] CLI worked
# [FAIL] STI workedThis failure was detected on linux next and the later test case has been fixed. The Following patch could fix this problem across 5.10, 5.14 and 5.15.
Patch details,
---
selftests/x86/iopl: Adjust to the faked iopl CLI/STI usageCommit in Fixes changed the iopl emulation to not #GP on CLI and STI because it would break some insane luserspace tools which would toggle interrupts.
The corresponding selftest would rely on the fact that executing CLI/STI would trigger a #GP and thus detect it this way but since that #GP is not happening anymore, the detection is now wrong too.
Extend the test to actually look at the IF flag and whether executing those insns had any effect on it. The STI detection needs to have the fact that interrupts were previously disabled, passed in so do that from the previous CLI test, i.e., STI test needs to follow a previous CLI one for it to make sense.
Quoted 5 lines
Fixes b968e84b509d ("x86/iopl: Fake iopl(3) CLI/STI usage")Suggested-by Thomas Gleixner <[email protected]>Signed-off-by Borislav Petkov <[email protected]>Acked-by Thomas Gleixner <[email protected]>
Now queued up, thanks,
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.81 release. There are 21 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 Sun, 21 Nov 2021 17:14:35 +0000. Anything received after that time might be too late.
Build results:
total: 159 pass: 159 fail: 0 Qemu test results: total: 474 pass: 474 fail: 0
Guenter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.81 release. There are 21 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 Sun, 21 Nov 2021 17:14:35 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.81-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Tested on arm64 and x86 for 5.10.81-rc1,
Kernel repo:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Branch: linux-5.10.y
Version: 5.10.81-rc1
Commit: ed689bd1df46a07911fffa509cd06c5ec7beb9c1
Compiler: gcc version 7.3.0 (GCC)
arm64:
--------------------------------------------------------------------
Testcase Result Summary:
total: 9019
passed: 9019
failed: 0
timeout: 0
--------------------------------------------------------------------
x86:
--------------------------------------------------------------------
Testcase Result Summary:
total: 9019
passed: 9019
failed: 0
timeout: 0
--------------------------------------------------------------------