4.19.301-rc1 review
Subsystems (2)
Greg Kroah-Hartman
maintainercover 4.19.301-rc1 review
This is the start of the stable review cycle for the 4.19.301 release. There are 71 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 Thu, 07 Dec 2023 03:14:57 +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.301-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-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.19.301-rc1
Adrian Hunter <[email protected]>
mmc: block: Retry commands in CQE error recovery
Zheng Yongjun <[email protected]>
mmc: core: convert comma to semicolon
Adrian Hunter <[email protected]>
mmc: cqhci: Fix task clearing in CQE error recovery
Adrian Hunter <[email protected]>
mmc: cqhci: Warn of halt or task clear failure
Adrian Hunter <[email protected]>
mmc: cqhci: Increase recovery halt timeout
Christoph Niedermaier <[email protected]>
cpufreq: imx6q: Don't disable 792 Mhz OPP unnecessarily
Christoph Niedermaier <[email protected]>
cpufreq: imx6q: don't warn for disabling a non-existing frequency
Mimi Zohar <[email protected]>
ima: detect changes to the backing overlay file
Konstantin Khlebnikov <[email protected]>
ovl: skip overlayfs superblocks at global sync
Amir Goldstein <[email protected]>
ima: annotate iint mutex to avoid lockdep false positive warnings
Helge Deller <[email protected]>
fbdev: stifb: Make the STI next font pointer a 32-bit signed offset
Linus Walleij <[email protected]>
mtd: cfi_cmdset_0001: Byte swap OTP info
Jean-Philippe Brucker <[email protected]>
mtd: cfi_cmdset_0001: Support the absence of protection registers
Heiko Carstens <[email protected]>
s390/cmma: fix detection of DAT pages
Alexander Gordeev <[email protected]>
s390/mm: fix phys vs virt confusion in mark_kernel_pXd() functions family
Heiner Kallweit <[email protected]>
Revert "PCI/ASPM: Disable only ASPM_STATE_L1 when driver, disables L1"
Ajay Agarwal <[email protected]>
PCI/ASPM: Disable only ASPM_STATE_L1 when driver disables L1
Heiner Kallweit <[email protected]>
PCI/ASPM: Add L1 PM substate support to pci_disable_link_state()
Krzysztof Wilczynski <[email protected]>
PCI: Move ASPM declarations to linux/pci.h
Heiner Kallweit <[email protected]>
PCI: let pci_disable_link_state propagate errors
Steve French <[email protected]>
smb3: fix touch -h of symlink
Adrian Hunter <[email protected]>
perf intel-pt: Fix async branch flags
Adrian Hunter <[email protected]>
perf intel-pt: Adjust sample flags for VM-Exit
Claudiu Beznea <[email protected]>
net: ravb: Start TX queues after HW initialization succeeded
Yoshihiro Shimoda <[email protected]>
ravb: Fix races between ravb_tx_timeout_work() and net related ops
Zhengchao Shao <[email protected]>
ipv4: igmp: fix refcnt uaf issue when receiving igmp query packet
Max Nguyen <[email protected]>
Input: xpad - add HyperX Clutch Gladiate Support
Jann Horn <[email protected]>
btrfs: send: ensure send_fd is writable
Filipe Manana <[email protected]>
btrfs: fix off-by-one when checking chunk map includes logical address
Timothy Pearson <[email protected]>
powerpc: Don't clobber f0/vs0 during fp|altivec register save
Markus Weippert <[email protected]>
bcache: revert replacing IS_ERR_OR_NULL with IS_ERR
Wu Bo <[email protected]>
dm verity: don't perform FEC for failed readahead IO
Mikulas Patocka <[email protected]>
dm-verity: align struct dm_verity_fec_io properly
Kailang Yang <[email protected]>
ALSA: hda/realtek: Headset Mic VREF to 100%
Takashi Iwai <[email protected]>
ALSA: hda: Disable power-save on KONTRON SinglePC
Adrian Hunter <[email protected]>
mmc: block: Do not lose cache flush during CQE error recovery
Yang Yingliang <[email protected]>
firewire: core: fix possible memory leak in create_units()
Maria Yu <[email protected]>
pinctrl: avoid reload of p state in list iteration
Adrian Hunter <[email protected]>
perf inject: Fix GEN_ELF_TEXT_OFFSET for jit
Johan Hovold <[email protected]>
USB: dwc3: qcom: fix wakeup after probe deferral
Ricardo Ribalda <[email protected]>
usb: dwc3: set the dma max_seg_size
Oliver Neukum <[email protected]>
USB: dwc2: write HCINT with INTMASK applied
Lech Perczak <[email protected]>
USB: serial: option: don't claim interface 4 for ZTE MF290
Puliang Lu <[email protected]>
USB: serial: option: fix FM101R-GL defines
Victor Fragoso <[email protected]>
USB: serial: option: add Fibocom L7xx modules
Rand Deeb <[email protected]>
bcache: prevent potential division by zero error
Coly Li <[email protected]>
bcache: check return value from btree_node_alloc_replacement()
Mikulas Patocka <[email protected]>
dm-delay: fix a race between delay_presuspend and delay_bio
Long Li <[email protected]>
hv_netvsc: Mark VF as slave before exposing it to user-mode
Haiyang Zhang <[email protected]>
hv_netvsc: Fix race of register_netdevice_notifier and VF register
Asuna Yang <[email protected]>
USB: serial: option: add Luat Air72*U series products
Jan Höppner <[email protected]>
s390/dasd: protect device queue against concurrent access
Coly Li <[email protected]>
bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce()
Claire Lin <[email protected]>
mtd: rawnand: brcmnand: Fix ecc chunk calculation for erased page bitfips
Andrew Murray <[email protected]>
KVM: arm64: limit PMU version to PMUv3 for ARMv8.1
Andrew Murray <[email protected]>
arm64: cpufeature: Extract capped perfmon fields
Huacai Chen <[email protected]>
MIPS: KVM: Fix a build warning about variable set but not used
Samuel Holland <[email protected]>
net: axienet: Fix check for partial TX checksum
Raju Rangoju <[email protected]>
amd-xgbe: propagate the correct speed and duplex status
Raju Rangoju <[email protected]>
amd-xgbe: handle the corner-case during tx completion
Raju Rangoju <[email protected]>
amd-xgbe: handle corner-case during sfp hotplug
Stefano Stabellini <[email protected]>
arm/xen: fix xen_vcpu_info allocation alignment
Jose Ignacio Tornos Martinez <[email protected]>
net: usb: ax88179_178a: fix failed operations during ax88179_reset
Kunwu Chan <[email protected]>
ipv4: Correct/silence an endian warning in __ip_do_redirect
Charles Yi <[email protected]>
HID: fix HID device resource race between HID core and debugging support
Benjamin Tissoires <[email protected]>
HID: core: store the unique system identifier in hid_device
Jonas Karlman <[email protected]>
drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
Chen Ni <[email protected]>
ata: pata_isapnp: Add missing error check for devm_ioport_map()
Marek Vasut <[email protected]>
drm/panel: simple: Fix Innolux G101ICE-L01 timings
Christopher Bednarz <[email protected]>
RDMA/irdma: Prevent zero-length STAG registration
Saravana Kannan <[email protected]>
driver core: Release all resources during unbind before updating device links
-------------
Diffstat:
Makefile | 4 +- arch/arm/xen/enlighten.c | 3 +- arch/arm64/include/asm/cpufeature.h | 23 +++++++++++ arch/arm64/include/asm/sysreg.h | 6 +++ arch/arm64/kvm/sys_regs.c | 10 +++++ arch/mips/kvm/mmu.c | 3 +- arch/powerpc/kernel/fpu.S | 13 ++++++ arch/powerpc/kernel/vector.S | 2 + arch/s390/mm/page-states.c | 14 +++---- drivers/acpi/pci_root.c | 1 - drivers/ata/pata_isapnp.c | 3 ++ drivers/base/dd.c | 4 +- drivers/char/xillybus/xillybus_pcie.c | 1 - drivers/cpufreq/imx6q-cpufreq.c | 32 ++++++++------- drivers/firewire/core-device.c | 11 ++---- drivers/gpu/drm/panel/panel-simple.c | 12 +++--- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 14 +++++-- drivers/hid/hid-core.c | 16 ++++++-- drivers/hid/hid-debug.c | 3 ++ drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 6 +++ drivers/infiniband/hw/i40iw/i40iw_type.h | 2 + drivers/infiniband/hw/i40iw/i40iw_verbs.c | 10 ++++- drivers/input/joystick/xpad.c | 2 + drivers/md/bcache/btree.c | 6 ++- drivers/md/bcache/sysfs.c | 2 +- drivers/md/dm-delay.c | 17 +++++--- drivers/md/dm-verity-fec.c | 3 +- drivers/md/dm-verity-target.c | 4 +- drivers/md/dm-verity.h | 6 --- drivers/mmc/core/block.c | 2 + drivers/mmc/core/core.c | 15 ++++--- drivers/mmc/host/cqhci.c | 44 ++++++++++----------- drivers/mtd/chips/cfi_cmdset_0001.c | 29 +++++++++++--- drivers/mtd/nand/raw/brcmnand/brcmnand.c | 5 ++- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 14 +++++++ drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 11 ++++-- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 14 ++++++- drivers/net/ethernet/intel/e1000e/e1000.h | 1 - drivers/net/ethernet/jme.c | 1 - drivers/net/ethernet/realtek/r8169_main.c | 1 - drivers/net/ethernet/renesas/ravb_main.c | 15 +++++-- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- drivers/net/hyperv/netvsc_drv.c | 41 +++++++++++++------ drivers/net/usb/ax88179_178a.c | 4 +- drivers/net/wireless/ath/ath5k/pci.c | 1 - drivers/net/wireless/intel/iwlegacy/3945-mac.c | 1 - drivers/net/wireless/intel/iwlegacy/4965-mac.c | 1 - drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 1 - drivers/pci/pci-acpi.c | 1 - drivers/pci/pcie/aspm.c | 32 +++++++++------ drivers/pci/quirks.c | 1 - drivers/pinctrl/core.c | 6 +-- drivers/s390/block/dasd.c | 24 ++++++------ drivers/scsi/aacraid/linit.c | 1 - drivers/scsi/hpsa.c | 1 - drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 - drivers/usb/dwc2/hcd_intr.c | 15 ++++--- drivers/usb/dwc3/core.c | 2 + drivers/usb/dwc3/dwc3-qcom.c | 8 ++-- drivers/usb/serial/option.c | 11 ++++-- drivers/video/fbdev/sticore.h | 2 +- fs/btrfs/send.c | 2 +- fs/btrfs/volumes.c | 2 +- fs/cifs/cifsfs.c | 1 + fs/overlayfs/super.c | 5 ++- fs/sync.c | 3 +- include/linux/fs.h | 2 + include/linux/hid.h | 5 +++ include/linux/pci-aspm.h | 35 ----------------- include/linux/pci.h | 22 +++++++++++ net/ipv4/igmp.c | 6 ++- net/ipv4/route.c | 2 +- security/integrity/iint.c | 48 +++++++++++++++++------ security/integrity/ima/ima_api.c | 5 +++ security/integrity/ima/ima_main.c | 16 +++++++- security/integrity/integrity.h | 2 + sound/pci/hda/hda_intel.c | 2 + sound/pci/hda/patch_realtek.c | 9 +++++ tools/perf/util/genelf.h | 4 +- tools/perf/util/intel-pt.c | 13 ++++-- 80 files changed, 489 insertions(+), 236 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/71 driver core: Release all resources during unbind before updating device links
4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Saravana Kannan <[email protected]>
commit 2e84dc37920012b458e9458b19fc4ed33f81bc74 upstream.
This commit fixes a bug in commit 9ed9895370ae ("driver core: Functional dependencies tracking support") where the device link status was incorrectly updated in the driver unbind path before all the device's resources were released.
--- drivers/base/dd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/base/dd.c +2 -2
@@ -995,8 +995,6 @@ static void __device_release_driver(struelse if (drv->remove) drv->remove (dev); -device_links_driver_cleanup (dev); -devres_release_all (dev);dma_deconfigure (dev); dev->driver =NULL ;
@@ -1006,6 +1004,8 @@ static void __device_release_driver(strupm_runtime_reinit (dev);dev_pm_set_driver_flags (dev,0 ); +device_links_driver_cleanup (dev); +klist_remove (&dev->p->knode_driver);device_pm_check_callbacks (dev);if (dev->bus)
Greg Kroah-Hartman
maintainerPATCH 2/71 RDMA/irdma: Prevent zero-length STAG registration
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christopher Bednarz <[email protected]>
commit bb6d73d9add68ad270888db327514384dfa44958 upstream.
Currently irdma allows zero-length STAGs to be programmed in HW during the kernel mode fast register flow. Zero-length MR or STAG registration disable HW memory length checks.
Improve gaps in bounds checking in irdma by preventing zero-length STAG or MR registrations except if the IB_PD_UNSAFE_GLOBAL_RKEY is set.
This addresses the disclosure CVE-2023-25775.
--- drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 6 ++++++ drivers/infiniband/hw/i40iw/i40iw_type.h | 2 ++ drivers/infiniband/hw/i40iw/i40iw_verbs.c | 10 ++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-)
drivers/infiniband/hw/i40iw/i40iw_ctrl.c +6 -0
@@ -2945,6 +2945,9 @@ static enum i40iw_status_code i40iw_sc_au64 header;enum i40iw_page_size page_size; +if (!info->total_len && !info->all_memory) +return -EINVAL ; + page_size = (info->page_size ==0x200000 ) ?I40IW_PAGE_SIZE_2M :I40IW_PAGE_SIZE_4K ; cqp = dev->cqp; wqe =i40iw_sc_cqp_get_next_send_wqe (cqp, scratch);
@@ -3003,6 +3006,9 @@ static enum i40iw_status_code i40iw_sc_mu8 addr_type;enum i40iw_page_size page_size; +if (!info->total_len && !info->all_memory) +return -EINVAL ; + page_size = (info->page_size ==0x200000 ) ?I40IW_PAGE_SIZE_2M :I40IW_PAGE_SIZE_4K ;if (info->access_rights & (I40IW_ACCESS_FLAGS_REMOTEREAD_ONLY |I40IW_ACCESS_FLAGS_REMOTEWRITE_ONLY ))
drivers/infiniband/hw/i40iw/i40iw_type.h +2 -0
@@ -779,6 +779,7 @@ struct i40iw_allocate_stag_info {bool use_hmc_fcn_index;u8 hmc_fcn_index;bool use_pf_rid; +bool all_memory; };struct i40iw_reg_ns_stag_info {
@@ -797,6 +798,7 @@ struct i40iw_reg_ns_stag_info {bool use_hmc_fcn_index;u8 hmc_fcn_index;bool use_pf_rid; +bool all_memory; };struct i40iw_fast_reg_stag_info {
drivers/infiniband/hw/i40iw/i40iw_verbs.c +8 -2
@@ -1581,7 +1581,8 @@ static int i40iw_handle_q_mem(struct i40static int i40iw_hw_alloc_stag (struct i40iw_device *iwdev,struct i40iw_mr *iwmr) {struct i40iw_allocate_stag_info *info; -struct i40iw_pd *iwpd =to_iwpd (iwmr->ibmr.pd); +struct ib_pd *pd = iwmr->ibmr.pd; +struct i40iw_pd *iwpd =to_iwpd (pd);enum i40iw_status_code status;int err =0 ;struct i40iw_cqp_request *cqp_request;
@@ -1598,6 +1599,7 @@ static int i40iw_hw_alloc_stag(struct i4 info->stag_idx = iwmr->stag >>I40IW_CQPSQ_STAG_IDX_SHIFT ; info->pd_id = iwpd->sc_pd.pd_id; info->total_len = iwmr->length; + info->all_memory = pd->flags &IB_PD_UNSAFE_GLOBAL_RKEY ; info->remote_access = true; cqp_info->cqp_cmd =OP_ALLOC_STAG ; cqp_info->post_sq =1 ;
@@ -1651,6 +1653,8 @@ static struct ib_mr *i40iw_alloc_mr(stru iwmr->type =IW_MEMREG_TYPE_MEM ; palloc = &iwpbl->pble_alloc; iwmr->page_cnt = max_num_sg; +/* Use system PAGE_SIZE as the sg page sizes are unknown at this point */ + iwmr->length = max_num_sg *PAGE_SIZE ;mutex_lock (&iwdev->pbl_mutex); status =i40iw_get_pble (&iwdev->sc_dev, iwdev->pble_rsrc, palloc, iwmr->page_cnt);mutex_unlock (&iwdev->pbl_mutex);
@@ -1747,7 +1751,8 @@ static int i40iw_hwreg_mr(struct i40iw_d {struct i40iw_pbl *iwpbl = &iwmr->iwpbl;struct i40iw_reg_ns_stag_info *stag_info; -struct i40iw_pd *iwpd =to_iwpd (iwmr->ibmr.pd); +struct ib_pd *pd = iwmr->ibmr.pd; +struct i40iw_pd *iwpd =to_iwpd (pd);struct i40iw_pble_alloc *palloc = &iwpbl->pble_alloc;enum i40iw_status_code status;int err =0 ;
@@ -1767,6 +1772,7 @@ static int i40iw_hwreg_mr(struct i40iw_d stag_info->total_len = iwmr->length; stag_info->access_rights = access; stag_info->pd_id = iwpd->sc_pd.pd_id; + stag_info->all_memory = pd->flags &IB_PD_UNSAFE_GLOBAL_RKEY ; stag_info->addr_type =I40IW_ADDR_TYPE_VA_BASED ; stag_info->page_size = iwmr->page_size;
Greg Kroah-Hartman
maintainerPATCH 3/71 drm/panel: simple: Fix Innolux G101ICE-L01 timings
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <[email protected]>
[ Upstream commit 3f9a91b6c00e655d27bd785dcda1742dbdc31bda ]
The Innolux G101ICE-L01 datasheet [1] page 17 table 6.1 INPUT SIGNAL TIMING SPECIFICATIONS
indicates that maximum vertical blanking time is 40 lines. Currently the driver uses 29 lines.
Fix it, and since this panel is a DE panel, adjust the timings to make them less hostile to controllers which cannot do 1 px HSA/VSA, distribute the delays evenly between all three parts.
[1] https://www.data-modul.com/sites/default/files/products/G101ICE-L01-C2-specification-12042389.pdf
--- drivers/gpu/drm/panel/panel-simple.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/panel/panel-simple.c +6 -6
@@ -1261,13 +1261,13 @@ static const struct panel_desc innolux_g070y2_l01 = {static const struct display_timing innolux_g101ice_l01_timing = { .pixelclock = {60400000 ,71100000 ,74700000 }, .hactive = {1280 ,1280 ,1280 }, - .hfront_porch = {41 ,80 ,100 }, - .hback_porch = {40 ,79 ,99 }, - .hsync_len = {1 ,1 ,1 }, + .hfront_porch = {30 ,60 ,70 }, + .hback_porch = {30 ,60 ,70 }, + .hsync_len = {22 ,40 ,60 }, .vactive = {800 ,800 ,800 }, - .vfront_porch = {5 ,11 ,14 }, - .vback_porch = {4 ,11 ,14 }, - .vsync_len = {1 ,1 ,1 }, + .vfront_porch = {3 ,8 ,14 }, + .vback_porch = {3 ,8 ,14 }, + .vsync_len = {4 ,7 ,12 }, .flags =DISPLAY_FLAGS_DE_HIGH , };
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 4/71 ata: pata_isapnp: Add missing error check for devm_ioport_map()
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ni <[email protected]>
[ Upstream commit a6925165ea82b7765269ddd8dcad57c731aa00de ]
Add missing error return check for devm_ioport_map() and return the error if this function call fails.
--- drivers/ata/pata_isapnp.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/ata/pata_isapnp.c +3 -0
@@ -81,6 +81,9 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *devif (pnp_port_valid (idev,1 )) { ctl_addr =devm_ioport_map (&idev->dev,pnp_port_start (idev,1 ),1 ); +if (!ctl_addr) +return -ENOMEM ; + ap->ioaddr.altstatus_addr = ctl_addr; ap->ioaddr.ctl_addr = ctl_addr; ap->ops = &isapnp_port_ops;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 5/71 drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonas Karlman <[email protected]>
[ Upstream commit bb0a05acd6121ff0e810b44fdc24dbdfaa46b642 ]
Use of DRM_FORMAT_RGB888 and DRM_FORMAT_BGR888 on e.g. RK3288, RK3328 and RK3399 result in wrong colors being displayed.
The issue can be observed using modetest:
modetest -s <connector_id>@<crtc_id>:1920x1080-60@RG24 modetest -s <connector_id>@<crtc_id>:1920x1080-60@BG24
Vendor 4.4 kernel apply an inverted rb swap for these formats on VOP full framework (IP version 3.x) compared to VOP little framework (2.x).
Fix colors by applying different rb swap for VOP full framework (3.x) and VOP little framework (2.x) similar to vendor 4.4 kernel.
--- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +11 -3
@@ -204,14 +204,22 @@ static inline void vop_cfg_done(struct vop *vop)VOP_REG_SET (vop, common, cfg_done,1 ); } -static bool has_rb_swapped (uint32_t format) +static bool has_rb_swapped (uint32_t version,uint32_t format) {switch (format) {case DRM_FORMAT_XBGR8888 :case DRM_FORMAT_ABGR8888 : -case DRM_FORMAT_BGR888 :case DRM_FORMAT_BGR565 :return true; +/* +* full framework (IP version 3.x) only need rb swapped for RGB888 and +* little framework (IP version 2.x) only need rb swapped for BGR888, +* check for 3.x to also only rb swap BGR888 for unknown vop version +*/ +case DRM_FORMAT_RGB888 : +return VOP_MAJOR (version) ==3 ; +case DRM_FORMAT_BGR888 : +return VOP_MAJOR (version) !=3 ;default :return false; }
@@ -798,7 +806,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,VOP_WIN_SET (vop, win, dsp_info, dsp_info);VOP_WIN_SET (vop, win, dsp_st, dsp_st); - rb_swap =has_rb_swapped (fb->format->format); + rb_swap =has_rb_swapped (vop->data->version, fb->format->format);VOP_WIN_SET (vop, win, rb_swap, rb_swap);/*
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 6/71 HID: core: store the unique system identifier in hid_device
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Tissoires <[email protected]>
[ Upstream commit 1e839143d674603b0bbbc4c513bca35404967dbc ]
This unique identifier is currently used only for ensuring uniqueness in sysfs. However, this could be handful for userspace to refer to a specific hid_device by this id.
2 use cases are in my mind: LEDs (and their naming convention), and HID-BPF.
Stable-dep-of: fc43e9c857b7 ("HID: fix HID device resource race between HID core and debugging support")
--- drivers/hid/hid-core.c | 4 +++- include/linux/hid.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/hid/hid-core.c +3 -1
@@ -2259,10 +2259,12 @@ int hid_add_device(struct hid_device *hdev)hid_warn (hdev,"bad device descriptor (%d)\n" , ret); } + hdev->id =atomic_inc_return (&id); +/* XXX hack, any other cleaner solution after the driver core * is converted to allow more than 20 bytes as the device name? */ dev_set_name (&hdev->dev,"%04X:%04X:%04X.%04X" , hdev->bus, - hdev->vendor, hdev->product,atomic_inc_return (&id)); + hdev->vendor, hdev->product, hdev->id);hid_debug_register (hdev,dev_name (&hdev->dev)); ret =device_add (&hdev->dev);
include/linux/hid.h +2 -0
@@ -625,6 +625,8 @@ struct hid_device { /* device report descriptor */struct list_head debug_list;spinlock_t debug_list_lock;wait_queue_head_t debug_wait; + +unsigned int id;/* system unique id */ };#define to_hid_device (pdev) \
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 7/71 HID: fix HID device resource race between HID core and debugging support
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Charles Yi <[email protected]>
[ Upstream commit fc43e9c857b7aa55efba9398419b14d9e35dcc7d ]
hid_debug_events_release releases resources bound to the HID device instance. hid_device_release releases the underlying HID device instance potentially before hid_debug_events_release has completed releasing debug resources bound to the same HID device instance.
Reference count to prevent the HID device instance from being torn down preemptively when HID debugging support is used. When count reaches zero, release core resources of HID device instance using hiddev_free.
The crash:
[ 120.728477][ T4396] kernel BUG at lib/list_debug.c:53! [ 120.728505][ T4396] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [ 120.739806][ T4396] Modules linked in: bcmdhd dhd_static_buf 8822cu pcie_mhi r8168 [ 120.747386][ T4396] CPU: 1 PID: 4396 Comm: hidt_bridge Not tainted 5.10.110 #257 [ 120.754771][ T4396] Hardware name: Rockchip RK3588 EVB4 LP4 V10 Board (DT) [ 120.761643][ T4396] pstate: 60400089 (nZCv daIf +PAN -UAO -TCO BTYPE=--) [ 120.768338][ T4396] pc : __list_del_entry_valid+0x98/0xac [ 120.773730][ T4396] lr : __list_del_entry_valid+0x98/0xac [ 120.779120][ T4396] sp : ffffffc01e62bb60 [ 120.783126][ T4396] x29: ffffffc01e62bb60 x28: ffffff818ce3a200 [ 120.789126][ T4396] x27: 0000000000000009 x26: 0000000000980000 [ 120.795126][ T4396] x25: ffffffc012431000 x24: ffffff802c6d4e00 [ 120.801125][ T4396] x23: ffffff8005c66f00 x22: ffffffc01183b5b8 [ 120.807125][ T4396] x21: ffffff819df2f100 x20: 0000000000000000 [ 120.813124][ T4396] x19: ffffff802c3f0700 x18: ffffffc01d2cd058 [ 120.819124][ T4396] x17: 0000000000000000 x16: 0000000000000000 [ 120.825124][ T4396] x15: 0000000000000004 x14: 0000000000003fff [ 120.831123][ T4396] x13: ffffffc012085588 x12: 0000000000000003 [ 120.837123][ T4396] x11: 00000000ffffbfff x10: 0000000000000003 [ 120.843123][ T4396] x9 : 455103d46b329300 x8 : 455103d46b329300 [ 120.849124][ T4396] x7 : 74707572726f6320 x6 : ffffffc0124b8cb5 [ 120.855124][ T4396] x5 : ffffffffffffffff x4 : 0000000000000000 [ 120.861123][ T4396] x3 : ffffffc011cf4f90 x2 : ffffff81fee7b948 [ 120.867122][ T4396] x1 : ffffffc011cf4f90 x0 : 0000000000000054 [ 120.873122][ T4396] Call trace: [ 120.876259][ T4396] __list_del_entry_valid+0x98/0xac [ 120.881304][ T4396] hid_debug_events_release+0x48/0x12c [ 120.886617][ T4396] full_proxy_release+0x50/0xbc [ 120.891323][ T4396] __fput+0xdc/0x238 [ 120.895075][ T4396] ____fput+0x14/0x24 [ 120.898911][ T4396] task_work_run+0x90/0x148 [ 120.903268][ T4396] do_exit+0x1bc/0x8a4 [ 120.907193][ T4396] do_group_exit+0x8c/0xa4 [ 120.911458][ T4396] get_signal+0x468/0x744 [ 120.915643][ T4396] do_signal+0x84/0x280 [ 120.919650][ T4396] do_notify_resume+0xd0/0x218 [ 120.924262][ T4396] work_pending+0xc/0x3f0
--- drivers/hid/hid-core.c | 12 ++++++++++-- drivers/hid/hid-debug.c | 3 +++ include/linux/hid.h | 3 +++ 3 files changed, 16 insertions(+), 2 deletions(-)
drivers/hid/hid-core.c +10 -2
@@ -701,15 +701,22 @@ static void hid_close_report(struct hid_device *device)* Free a device structure, all reports, and all fields. */ -static void hid_device_release (struct device *dev) +void hiddev_free (struct kref *ref) { -struct hid_device *hid =to_hid_device (dev); + struct hid_device *hid = container_of(ref, struct hid_device, ref);hid_close_report (hid);kfree (hid->dev_rdesc);kfree (hid); } +static void hid_device_release (struct device *dev) +{ +struct hid_device *hid =to_hid_device (dev); + +kref_put (&hid->ref, hiddev_free); +} +/* * Fetch a report description item from the data stream. We support long * items, though they are not used yet.
@@ -2307,6 +2314,7 @@ struct hid_device *hid_allocate_device(void)spin_lock_init (&hdev->debug_list_lock);sema_init (&hdev->driver_input_lock,1 );mutex_init (&hdev->ll_open_lock); +kref_init (&hdev->ref);return hdev; }
drivers/hid/hid-debug.c +3 -0
@@ -1096,6 +1096,7 @@ static int hid_debug_events_open(struct inode *inode, struct file *file) goto out; } list->hdev = (struct hid_device *) inode->i_private; +kref_get (&list->hdev->ref); file->private_data = list;mutex_init (&list->read_mutex);
@@ -1188,6 +1189,8 @@ static int hid_debug_events_release(struct inode *inode, struct file *file)list_del (&list->node);spin_unlock_irqrestore (&list->hdev->debug_list_lock, flags);kfifo_free (&list->hid_debug_fifo); + +kref_put (&list->hdev->ref, hiddev_free);kfree (list);return 0 ;
include/linux/hid.h +3 -0
@@ -625,10 +625,13 @@ struct hid_device { /* device report descriptor */struct list_head debug_list;spinlock_t debug_list_lock;wait_queue_head_t debug_wait; +struct kref ref;unsigned int id;/* system unique id */ }; +void hiddev_free (struct kref *ref); +#define to_hid_device (pdev) \ container_of(pdev, struct hid_device, dev)
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 8/71 ipv4: Correct/silence an endian warning in __ip_do_redirect
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kunwu Chan <[email protected]>
[ Upstream commit c0e2926266af3b5acf28df0a8fc6e4d90effe0bb ]
net/ipv4/route.c:783:46: warning: incorrect type in argument 2 (different base types)net/ipv4/route.c:783:46: expected unsigned int [usertype] keynet/ipv4/route.c:783:46: got restricted __be32 [usertype] new_gw
--- net/ipv4/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/route.c +1 -1
@@ -791,7 +791,7 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow goto reject_redirect; } - n =__ipv4_neigh_lookup (rt->dst.dev, new_gw); + n =__ipv4_neigh_lookup (rt->dst.dev, (__force u32 )new_gw);if (!n) n =neigh_create (&arp_tbl, &new_gw, rt->dst.dev);if (!IS_ERR (n)) {
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 9/71 net: usb: ax88179_178a: fix failed operations during ax88179_reset
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jose Ignacio Tornos Martinez <[email protected]>
[ Upstream commit 0739af07d1d947af27c877f797cb82ceee702515 ]
Using generic ASIX Electronics Corp. AX88179 Gigabit Ethernet device, the following test cycle has been implemented:
- power on
- check logs
- shutdown
- after detecting the system shutdown, disconnect power
- after approximately 60 seconds of sleep, power is restored
Running some cycles, sometimes error logs like this appear:
kernel: ax88179_178a 2-9:1.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -19
kernel: ax88179_178a 2-9:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0001: -19
...These failed operation are happening during ax88179_reset execution, so the initialization could not be correct.
In order to avoid this, we need to increase the delay after reset and clock initial operations. By using these larger values, many cycles have been run and no failed operations appear.
It would be better to check some status register to verify when the operation has finished, but I do not have found any available information (neither in the public datasheets nor in the manufacturer's driver). The only available information for the necessary delays is the maufacturer's driver (original values) but the proposed values are not enough for the tested devices.
--- drivers/net/usb/ax88179_178a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/usb/ax88179_178a.c +2 -2
@@ -1610,11 +1610,11 @@ static int ax88179_reset(struct usbnet *dev) *tmp16 =AX_PHYPWR_RSTCTL_IPRL ;ax88179_write_cmd (dev,AX_ACCESS_MAC ,AX_PHYPWR_RSTCTL ,2 ,2 , tmp16); -msleep (200 ); +msleep (500 ); *tmp =AX_CLK_SELECT_ACS |AX_CLK_SELECT_BCS ;ax88179_write_cmd (dev,AX_ACCESS_MAC ,AX_CLK_SELECT ,1 ,1 , tmp); -msleep (100 ); +msleep (200 );/* Ethernet PHY Auto Detach*/ ax88179_auto_detach (dev,0 );
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 10/71 arm/xen: fix xen_vcpu_info allocation alignment
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefano Stabellini <[email protected]>
[ Upstream commit 7bf9a6b46549852a37e6d07e52c601c3c706b562 ]
xen_vcpu_info is a percpu area than needs to be mapped by Xen. Currently, it could cross a page boundary resulting in Xen being unable to map it:
[ 0.567318] kernel BUG at arch/arm64/xen/../../arm/xen/enlighten.c:164! [ 0.574002] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Fix the issue by using __alloc_percpu and requesting alignment for the memory allocation.
--- arch/arm/xen/enlighten.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/xen/enlighten.c +2 -1
@@ -388,7 +388,8 @@ static int __init xen_guest_init(void)* for secondary CPUs as they are brought up. * For uniformity we use VCPUOP_register_vcpu_info even on cpu0. */ - xen_vcpu_info = alloc_percpu(struct vcpu_info); + xen_vcpu_info =__alloc_percpu (sizeof (struct vcpu_info ), +1 <<fls (sizeof (struct vcpu_info ) -1 ));if (xen_vcpu_info ==NULL )return -ENOMEM ;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 11/71 amd-xgbe: handle corner-case during sfp hotplug
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Raju Rangoju <[email protected]>
[ Upstream commit 676ec53844cbdf2f47e68a076cdff7f0ec6cbe3f ]
Force the mode change for SFI in Fixed PHY configurations. Fixed PHY configurations needs PLL to be enabled while doing mode set. When the SFP module isn't connected during boot, driver assumes AN is ON and attempts auto-negotiation. However, if the connected SFP comes up in Fixed PHY configuration the link will not come up as PLL isn't enabled while the initial mode set command is issued. So, force the mode change for SFI in Fixed PHY configuration to fix link issues.
--- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +13 -1
@@ -1178,7 +1178,19 @@ static int xgbe_phy_config_fixed(struct xgbe_prv_data *pdata)if (pdata->phy.duplex !=DUPLEX_FULL )return -EINVAL ; -xgbe_set_mode (pdata, mode); +/* Force the mode change for SFI in Fixed PHY config. +* Fixed PHY configs needs PLL to be enabled while doing mode set. +* When the SFP module isn't connected during boot, driver assumes +* AN is ON and attempts autonegotiation. However, if the connected +* SFP comes up in Fixed PHY config, the link will not come up as +* PLL isn't enabled while the initial mode set command is issued. +* So, force the mode change for SFI in Fixed PHY configuration to +* fix link issues. +*/ +if (mode ==XGBE_MODE_SFI ) +xgbe_change_mode (pdata, mode); +else +xgbe_set_mode (pdata, mode);return 0 ; }
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 12/71 amd-xgbe: handle the corner-case during tx completion
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Raju Rangoju <[email protected]>
[ Upstream commit 7121205d5330c6a3cb3379348886d47c77b78d06 ]
The existing implementation uses software logic to accumulate tx completions until the specified time (1ms) is met and then poll them. However, there exists a tiny gap which leads to a race between resetting and checking the tx_activate flag. Due to this the tx completions are not reported to upper layer and tx queue timeout kicks-in restarting the device.
To address this, introduce a tx cleanup mechanism as part of the periodic maintenance process.
--- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/net/ethernet/amd/xgbe/xgbe-drv.c +14 -0
@@ -683,10 +683,24 @@ static void xgbe_service(struct work_struct *work)static void xgbe_service_timer (struct timer_list *t) {struct xgbe_prv_data *pdata =from_timer (pdata, t, service_timer); +struct xgbe_channel *channel; +unsigned int i;queue_work (pdata->dev_workqueue, &pdata->service_work);mod_timer (&pdata->service_timer, jiffies +HZ ); + +if (!pdata->tx_usecs) +return ; + +for (i =0 ; i < pdata->channel_count; i++) { + channel = pdata->channel[i]; +if (!channel->tx_ring || channel->tx_timer_active) +break ; + channel->tx_timer_active =1 ; +mod_timer (&channel->tx_timer, + jiffies +usecs_to_jiffies (pdata->tx_usecs)); + } }static void xgbe_init_timers (struct xgbe_prv_data *pdata)
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 13/71 amd-xgbe: propagate the correct speed and duplex status
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Raju Rangoju <[email protected]>
[ Upstream commit 7a2323ac24a50311f64a3a9b54ed5bef5821ecae ]
xgbe_get_link_ksettings() does not propagate correct speed and duplex information to ethtool during cable unplug. Due to which ethtool reports incorrect values for speed and duplex.
Address this by propagating correct information.
--- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c +8 -3
@@ -314,10 +314,15 @@ static int xgbe_get_link_ksettings(struct net_device *netdev, cmd->base.phy_address = pdata->phy.address; - cmd->base.autoneg = pdata->phy.autoneg; - cmd->base.speed = pdata->phy.speed; - cmd->base.duplex = pdata->phy.duplex; +if (netif_carrier_ok (netdev)) { + cmd->base.speed = pdata->phy.speed; + cmd->base.duplex = pdata->phy.duplex; + }else { + cmd->base.speed =SPEED_UNKNOWN ; + cmd->base.duplex =DUPLEX_UNKNOWN ; + } + cmd->base.autoneg = pdata->phy.autoneg; cmd->base.port =PORT_NONE ;XGBE_LM_COPY (cmd, supported, lks, supported);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 14/71 net: axienet: Fix check for partial TX checksum
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Samuel Holland <[email protected]>
[ Upstream commit fd0413bbf8b11f56e8aa842783b0deda0dfe2926 ]
Due to a typo, the code checked the RX checksum feature in the TX path.
--- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +1 -1
@@ -702,7 +702,7 @@ axienet_start_xmit(struct sk_buff *skb, struct net_device *ndev)if (lp->features &XAE_FEATURE_FULL_TX_CSUM ) {/* Tx Full Checksum Offload Enabled */ cur_p->app0 |=2 ; - }else if (lp->features &XAE_FEATURE_PARTIAL_RX_CSUM ) { + }else if (lp->features &XAE_FEATURE_PARTIAL_TX_CSUM ) { csum_start_off =skb_transport_offset (skb); csum_index_off = csum_start_off + skb->csum_offset;/* Tx Partial Checksum Offload Enabled */
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 15/71 MIPS: KVM: Fix a build warning about variable set but not used
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Huacai Chen <[email protected]>
[ Upstream commit 83767a67e7b6a0291cde5681ec7e3708f3f8f877 ]
After commit 411740f5422a ("KVM: MIPS/MMU: Implement KVM_CAP_SYNC_MMU") old_pte is no longer used in kvm_mips_map_page(). So remove it to fix a build warning about variable set but not used:
arch/mips/kvm/mmu.c: In function 'kvm_mips_map_page':
Quoted 1 line
Quoted 1 line
arch/mips/kvm/mmu.c:701:29: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
701 | pte_t *ptep, entry, old_pte;
| ^~~~~~~--- arch/mips/kvm/mmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/mips/kvm/mmu.c +1 -2
@@ -692,7 +692,7 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa,gfn_t gfn = gpa >>PAGE_SHIFT ;int srcu_idx, err;kvm_pfn_t pfn; -pte_t *ptep, entry, old_pte; +pte_t *ptep, entry;bool writeable;unsigned long prot_bits;unsigned long mmu_seq;
@@ -765,7 +765,6 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa, entry =pfn_pte (pfn,__pgprot (prot_bits));/* Write the PTE */ - old_pte = *ptep;set_pte (ptep, entry); err =0 ;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 16/71 arm64: cpufeature: Extract capped perfmon fields
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Murray <[email protected]>
commit 8e35aa642ee4dab01b16cc4b2df59d1936f3b3c2 upstream.
When emulating ID registers there is often a need to cap the version bits of a feature such that the guest will not use features that the host is not aware of. For example, when KVM mediates access to the PMU by emulating register accesses.
Let's add a helper that extracts a performance monitors ID field and caps the version to a given value.
Fields that identify the version of the Performance Monitors Extension do not follow the standard ID scheme, and instead follow the scheme described in ARM DDI 0487E.a page D13-2825 "Alternative ID scheme used for the Performance Monitors Extension version". The value 0xF means an IMPLEMENTATION DEFINED PMU is present, and values 0x0-OxE can be treated the same as an unsigned field with 0x0 meaning no PMU is present.
--- arch/arm64/include/asm/cpufeature.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
arch/arm64/include/asm/cpufeature.h +23 -0
@@ -422,6 +422,29 @@ cpuid_feature_extract_unsigned_field(u64return cpuid_feature_extract_unsigned_field_width (features, field,4 ); } +/* +* Fields that identify the version of the Performance Monitors Extension do +* not follow the standard ID scheme. See ARM DDI 0487E.a page D13-2825, +* "Alternative ID scheme used for the Performance Monitors Extension version". +*/ +static inline u64 __attribute_const__ +cpuid_feature_cap_perfmon_field (u64 features,int field,u64 cap) +{ +u64 val =cpuid_feature_extract_unsigned_field (features, field); +u64 mask =GENMASK_ULL (field +3 , field); + +/* Treat IMPLEMENTATION DEFINED functionality as unimplemented */ +if (val ==0xf ) + val =0 ; + +if (val > cap) { + features &= ~mask; + features |= (cap << field) & mask; + } + +return features; +} +static inline u64 arm64_ftr_mask (const struct arm64_ftr_bits *ftrp) {return (u64 )GENMASK (ftrp->shift + ftrp->width -1 , ftrp->shift);
Greg Kroah-Hartman
maintainerPATCH 17/71 KVM: arm64: limit PMU version to PMUv3 for ARMv8.1
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Murray <[email protected]>
commit c854188ea01062f5a5fd7f05658feb1863774eaa upstream.
We currently expose the PMU version of the host to the guest via emulation of the DFR0_EL1 and AA64DFR0_EL1 debug feature registers. However many of the features offered beyond PMUv3 for 8.1 are not supported in KVM. Examples of this include support for the PMMIR registers (added in PMUv3 for ARMv8.4) and 64-bit event counters added in (PMUv3 for ARMv8.5).
Let's trap the Debug Feature Registers in order to limit PMUVer/PerfMon in the Debug Feature Registers to PMUv3 for ARMv8.1 to avoid unexpected behaviour.
Both ID_AA64DFR0.PMUVer and ID_DFR0.PerfMon follow the "Alternative ID scheme used for the Performance Monitors Extension version" where 0xF means an IMPLEMENTATION DEFINED PMU is implemented, and values 0x0-0xE are treated as with an unsigned field (with 0x0 meaning no PMU is present). As we don't expect to expose an IMPLEMENTATION DEFINED PMU, and our cap is below 0xF, we can treat these fields as unsigned when applying the cap.
--- arch/arm64/include/asm/sysreg.h | 6 ++++++ arch/arm64/kvm/sys_regs.c | 10 ++++++++++ 2 files changed, 16 insertions(+)
arch/arm64/include/asm/sysreg.h +6 -0
@@ -622,6 +622,12 @@#define ID_AA64DFR0_TRACEVER_SHIFT 4#define ID_AA64DFR0_DEBUGVER_SHIFT 0 +#define ID_AA64DFR0_PMUVER_8_1 0x4 + +#define ID_DFR0_PERFMON_SHIFT 24 + +#define ID_DFR0_PERFMON_8_1 0x4 +#define ID_ISAR5_RDM_SHIFT 24#define ID_ISAR5_CRC32_SHIFT 16#define ID_ISAR5_SHA2_SHIFT 12
arch/arm64/kvm/sys_regs.c +10 -0
@@ -1049,6 +1049,16 @@ static u64 read_id_reg(struct sys_reg_dekvm_debug ("LORegions unsupported for guests, suppressing\n" ); val &= ~(0xfUL <<ID_AA64MMFR1_LOR_SHIFT ); + }else if (id ==SYS_ID_AA64DFR0_EL1 ) { +/* Limit guests to PMUv3 for ARMv8.1 */ + val =cpuid_feature_cap_perfmon_field (val, +ID_AA64DFR0_PMUVER_SHIFT , +ID_AA64DFR0_PMUVER_8_1 ); + }else if (id ==SYS_ID_DFR0_EL1 ) { +/* Limit guests to PMUv3 for ARMv8.1 */ + val =cpuid_feature_cap_perfmon_field (val, +ID_DFR0_PERFMON_SHIFT , +ID_DFR0_PERFMON_8_1 ); }return val;
Greg Kroah-Hartman
maintainerPATCH 18/71 mtd: rawnand: brcmnand: Fix ecc chunk calculation for erased page bitfips
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Claire Lin <[email protected]>
commit 7f852cc1579297fd763789f8cd370639d0c654b6 upstream.
In brcmstb_nand_verify_erased_page(), the ECC chunk pointer calculation while correcting erased page bitflips is wrong, fix it.
--- drivers/mtd/nand/raw/brcmnand/brcmnand.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/mtd/nand/raw/brcmnand/brcmnand.c +4 -1
@@ -1753,6 +1753,7 @@ static int brcmstb_nand_verify_erased_paint bitflips =0 ;int page = addr >> chip->page_shift;int ret; +void *ecc_chunk;if (!buf) { buf = chip->data_buf;
@@ -1768,7 +1769,9 @@ static int brcmstb_nand_verify_erased_pareturn ret;for (i =0 ; i < chip->ecc.steps; i++, oob += sas) { - ret =nand_check_erased_ecc_chunk (buf, chip->ecc.size, + ecc_chunk = buf + chip->ecc.size * i; + ret =nand_check_erased_ecc_chunk (ecc_chunk, + chip->ecc.size, oob, sas,NULL ,0 , chip->ecc.strength);if (ret <0 )
Greg Kroah-Hartman
maintainerPATCH 19/71 bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce()
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Coly Li <[email protected]>
commit f72f4312d4388376fc8a1f6cf37cb21a0d41758b upstream.
Commit 028ddcac477b ("bcache: Remove unnecessary NULL point check in node allocations") do the following change inside btree_gc_coalesce(),
31 @@ -1340,7 +1340,7 @@ static int btree_gc_coalesce(
32 memset(new_nodes, 0, sizeof(new_nodes));
33 closure_init_stack(&cl);
34
35 - while (nodes < GC_MERGE_NODES && !IS_ERR_OR_NULL(r[nodes].b))
36 + while (nodes < GC_MERGE_NODES && !IS_ERR(r[nodes].b))
37 keys += r[nodes++].keys;
38
39 blocks = btree_default_blocks(b->c) * 2 / 3;
At line 35 the original r[nodes].b is not always allocatored from __bch_btree_node_alloc(), and possibly initialized as NULL pointer by caller of btree_gc_coalesce(). Therefore the change at line 36 is not correct.
This patch replaces the mistaken IS_ERR() by IS_ERR_OR_NULL() to avoid potential issue.
--- drivers/md/bcache/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/bcache/btree.c +1 -1
@@ -1379,7 +1379,7 @@ static int btree_gc_coalesce(struct btrememset (new_nodes,0 ,sizeof (new_nodes));closure_init_stack (&cl); -while (nodes <GC_MERGE_NODES && !IS_ERR (r[nodes].b)) +while (nodes <GC_MERGE_NODES && !IS_ERR_OR_NULL (r[nodes].b)) keys += r[nodes++].keys; blocks =btree_default_blocks (b->c) *2 /3 ;
Greg Kroah-Hartman
maintainerPATCH 20/71 s390/dasd: protect device queue against concurrent access
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Höppner <[email protected]>
commit db46cd1e0426f52999d50fa72cfa97fa39952885 upstream.
In dasd_profile_start() the amount of requests on the device queue are counted. The access to the device queue is unprotected against concurrent access. With a lot of parallel I/O, especially with alias devices enabled, the device queue can change while dasd_profile_start() is accessing the queue. In the worst case this leads to a kernel panic due to incorrect pointer accesses.
Fix this by taking the device lock before accessing the queue and counting the requests. Additionally the check for a valid profile data pointer can be done earlier to avoid unnecessary locking in a hot path.
--- drivers/s390/block/dasd.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/s390/block/dasd.c +13 -11
@@ -725,18 +725,20 @@ static void dasd_profile_start(struct da* we count each request only once. */ device = cqr->startdev; -if (device->profile.data) { - counter =1 ;/* request is not yet queued on the start device */ -list_for_each (l, &device->ccw_queue) -if (++counter >=31 ) -break ; - } +if (!device->profile.data) +return ; + +spin_lock (get_ccwdev_lock (device->cdev)); + counter =1 ;/* request is not yet queued on the start device */ +list_for_each (l, &device->ccw_queue) +if (++counter >=31 ) +break ; +spin_unlock (get_ccwdev_lock (device->cdev)); +spin_lock (&device->profile.lock); -if (device->profile.data) { - device->profile.data->dasd_io_nr_req[counter]++; -if (rq_data_dir (req) ==READ ) - device->profile.data->dasd_read_nr_req[counter]++; - } + device->profile.data->dasd_io_nr_req[counter]++; +if (rq_data_dir (req) ==READ ) + device->profile.data->dasd_read_nr_req[counter]++;spin_unlock (&device->profile.lock); }
Greg Kroah-Hartman
maintainerPATCH 21/71 USB: serial: option: add Luat Air72*U series products
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Asuna Yang <[email protected]>
commit da90e45d5afc4da2de7cd3ea7943d0f1baa47cc2 upstream.
Update the USB serial option driver support for Luat Air72*U series products.
ID 1782:4e00 Spreadtrum Communications Inc. UNISOC-8910
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 13 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1782 ProdID=4e00 Rev=00.00
S: Manufacturer=UNISOC
S: Product=UNISOC-8910
C: #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=400mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=4096ms
I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
If#= 2: AT
If#= 3: PPP + AT
If#= 4: Debug
--- drivers/usb/serial/option.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/serial/option.c +3 -0
@@ -609,6 +609,8 @@ static void option_instat_callback(struc#define UNISOC_VENDOR_ID 0x1782/* TOZED LT70-C based on UNISOC SL8563 uses UNISOC's vendor ID */ #define TOZED_PRODUCT_LT70C 0x4055 +/* Luat Air72*U series based on UNISOC UIS8910 uses UNISOC's vendor ID */ +#define LUAT_PRODUCT_AIR720U 0x4e00/* Device flags */
@@ -2271,6 +2273,7 @@ static const struct usb_device_id option { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x40) }, { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff, 0, 0) }, + { USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, LUAT_PRODUCT_AIR720U, 0xff, 0, 0) }, { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
Greg Kroah-Hartman
maintainerPATCH 22/71 hv_netvsc: Fix race of register_netdevice_notifier and VF register
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haiyang Zhang <[email protected]>
commit 85520856466ed6bc3b1ccb013cddac70ceb437db upstream.
If VF NIC is registered earlier, NETDEV_REGISTER event is replayed, but NETDEV_POST_INIT is not.
Move register_netdevice_notifier() earlier, so the call back function is set before probing.
--- drivers/net/hyperv/netvsc_drv.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/hyperv/netvsc_drv.c +7 -2
@@ -2514,12 +2514,17 @@ static int __init netvsc_drv_init(void) } netvsc_ring_bytes = ring_size *PAGE_SIZE ; +register_netdevice_notifier (&netvsc_netdev_notifier); + ret =vmbus_driver_register (&netvsc_drv);if (ret) -return ret; + goto err_vmbus_reg; -register_netdevice_notifier (&netvsc_netdev_notifier);return 0 ; + +err_vmbus_reg: +unregister_netdevice_notifier (&netvsc_netdev_notifier); +return ret; }MODULE_LICENSE ("GPL" );
Greg Kroah-Hartman
maintainerPATCH 23/71 hv_netvsc: Mark VF as slave before exposing it to user-mode
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Long Li <[email protected]>
commit c807d6cd089d2f4951baa838081ec5ae3e2360f8 upstream.
When a VF is being exposed form the kernel, it should be marked as "slave" before exposing to the user-mode. The VF is not usable without netvsc running as master. The user-mode should never see a VF without the "slave" flag.
This commit moves the code of setting the slave flag to the time before VF is exposed to user-mode.
--- drivers/net/hyperv/netvsc_drv.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-)
drivers/net/hyperv/netvsc_drv.c +23 -9
@@ -2048,9 +2048,6 @@ static int netvsc_vf_join(struct net_dev goto upper_link_failed; } -/* set slave flag before open to prevent IPv6 addrconf */ - vf_netdev->flags |=IFF_SLAVE ; -schedule_delayed_work (&ndev_ctx->vf_takeover,VF_TAKEOVER_INT );call_netdevice_notifiers (NETDEV_JOIN , vf_netdev);
@@ -2148,16 +2145,18 @@ static struct net_device *get_netvsc_bysreturn hv_get_drvdata (ndev_ctx->device_ctx); } -/* Fallback path to check synthetic vf with -* help of mac addr +/* Fallback path to check synthetic vf with help of mac addr. +* Because this function can be called before vf_netdev is +* initialized (NETDEV_POST_INIT) when its perm_addr has not been copied +* from dev_addr, also try to match to its dev_addr. +* Note: On Hyper-V and Azure, it's not possible to set a MAC address +* on a VF that matches to the MAC of a unrelated NETVSC device. */ list_for_each_entry (ndev_ctx, &netvsc_dev_list, list) { ndev =hv_get_drvdata (ndev_ctx->device_ctx); -if (ether_addr_equal (vf_netdev->perm_addr, ndev->perm_addr)) { -netdev_notice (vf_netdev, -"falling back to mac addr based matching\n" ); +if (ether_addr_equal (vf_netdev->perm_addr, ndev->perm_addr) || +ether_addr_equal (vf_netdev->dev_addr, ndev->perm_addr))return ndev; - } } netdev_notice(vf_netdev,
@@ -2165,6 +2164,19 @@ static struct net_device *get_netvsc_bysreturn NULL ; } +static int netvsc_prepare_bonding (struct net_device *vf_netdev) +{ +struct net_device *ndev; + + ndev =get_netvsc_byslot (vf_netdev); +if (!ndev) +return NOTIFY_DONE ; + +/* set slave flag before open to prevent IPv6 addrconf */ + vf_netdev->flags |=IFF_SLAVE ; +return NOTIFY_DONE ; +} +static int netvsc_register_vf (struct net_device *vf_netdev) {struct net_device_context *net_device_ctx;
@@ -2481,6 +2493,8 @@ static int netvsc_netdev_event(struct noreturn NOTIFY_DONE ;switch (event) { +case NETDEV_POST_INIT : +return netvsc_prepare_bonding (event_dev);case NETDEV_REGISTER :return netvsc_register_vf (event_dev);case NETDEV_UNREGISTER :
Greg Kroah-Hartman
maintainerPATCH 24/71 dm-delay: fix a race between delay_presuspend and delay_bio
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikulas Patocka <[email protected]>
[ Upstream commit 6fc45b6ed921dc00dfb264dc08c7d67ee63d2656 ]
In delay_presuspend, we set the atomic variable may_delay and then stop the timer and flush pending bios. The intention here is to prevent the delay target from re-arming the timer again.
However, this test is racy. Suppose that one thread goes to delay_bio, sees that dc->may_delay is one and proceeds; now, another thread executes delay_presuspend, it sets dc->may_delay to zero, deletes the timer and flushes pending bios. Then, the first thread continues and adds the bio to delayed->list despite the fact that dc->may_delay is false.
Fix this bug by changing may_delay's type from atomic_t to bool and only access it while holding the delayed_bios_lock mutex. Note that we don't have to grab the mutex in delay_resume because there are no bios in flight at this point.
--- drivers/md/dm-delay.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
drivers/md/dm-delay.c +12 -5
@@ -30,7 +30,7 @@ struct delay_c {struct workqueue_struct *kdelayd_wq;struct work_struct flush_expired_bios;struct list_head delayed_bios; -atomic_t may_delay; +bool may_delay;struct delay_class read;struct delay_class write;
@@ -191,7 +191,7 @@ static int delay_ctr(struct dm_target *ti, unsigned int argc, char **argv)INIT_WORK (&dc->flush_expired_bios, flush_expired_bios);INIT_LIST_HEAD (&dc->delayed_bios);mutex_init (&dc->timer_lock); -atomic_set (&dc->may_delay,1 ); + dc->may_delay = true; dc->argc = argc; ret =delay_class_ctr (ti, &dc->read, argv);
@@ -245,7 +245,7 @@ static int delay_bio(struct delay_c *dc, struct delay_class *c, struct bio *bio)struct dm_delay_info *delayed;unsigned long expires =0 ; -if (!c->delay || !atomic_read (&dc->may_delay)) +if (!c->delay)return DM_MAPIO_REMAPPED ; delayed =dm_per_bio_data (bio,sizeof (struct dm_delay_info ));
@@ -254,6 +254,10 @@ static int delay_bio(struct delay_c *dc, struct delay_class *c, struct bio *bio) delayed->expires = expires = jiffies +msecs_to_jiffies (c->delay);mutex_lock (&delayed_bios_lock); +if (unlikely (!dc->may_delay)) { +mutex_unlock (&delayed_bios_lock); +return DM_MAPIO_REMAPPED ; + } c->ops++;list_add_tail (&delayed->list, &dc->delayed_bios);mutex_unlock (&delayed_bios_lock);
@@ -267,7 +271,10 @@ static void delay_presuspend(struct dm_target *ti) {struct delay_c *dc = ti->private; -atomic_set (&dc->may_delay,0 ); +mutex_lock (&delayed_bios_lock); + dc->may_delay = false; +mutex_unlock (&delayed_bios_lock); +del_timer_sync (&dc->delay_timer);flush_bios (flush_delayed_bios (dc,1 )); }
@@ -276,7 +283,7 @@ static void delay_resume(struct dm_target *ti) {struct delay_c *dc = ti->private; -atomic_set (&dc->may_delay,1 ); + dc->may_delay = true; }static int delay_map (struct dm_target *ti,struct bio *bio)
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 25/71 bcache: check return value from btree_node_alloc_replacement()
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Coly Li <[email protected]>
commit 777967e7e9f6f5f3e153abffb562bffaf4430d26 upstream.
In btree_gc_rewrite_node(), pointer 'n' is not checked after it returns from btree_gc_rewrite_node(). There is potential possibility that 'n' is a non NULL ERR_PTR(), referencing such error code is not permitted in following code. Therefore a return value checking is necessary after 'n' is back from btree_node_alloc_replacement().
--- drivers/md/bcache/btree.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/md/bcache/btree.c +2 -0
@@ -1543,6 +1543,8 @@ static int btree_gc_rewrite_node(structreturn 0 ; n =btree_node_alloc_replacement (replace,NULL ); +if (IS_ERR (n)) +return 0 ;/* recheck reserve after allocating replacement node */ if (btree_check_reserve (b,NULL )) {
Greg Kroah-Hartman
maintainerPATCH 26/71 bcache: prevent potential division by zero error
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rand Deeb <[email protected]>
commit 2c7f497ac274a14330208b18f6f734000868ebf9 upstream.
In SHOW(), the variable 'n' is of type 'size_t.' While there is a conditional check to verify that 'n' is not equal to zero before executing the 'do_div' macro, concerns arise regarding potential division by zero error in 64-bit environments.
The concern arises when 'n' is 64 bits in size, greater than zero, and the lower 32 bits of it are zeros. In such cases, the conditional check passes because 'n' is non-zero, but the 'do_div' macro casts 'n' to 'uint32_t,' effectively truncating it to its lower 32 bits. Consequently, the 'n' value becomes zero.
To fix this potential division by zero error and ensure precise division handling, this commit replaces the 'do_div' macro with div64_u64(). div64_u64() is designed to work with 64-bit operands, guaranteeing that division is performed correctly.
This change enhances the robustness of the code, ensuring that division operations yield accurate results in all scenarios, eliminating the possibility of division by zero, and improving compatibility across different 64-bit environments.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/md/bcache/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/bcache/sysfs.c +1 -1
@@ -992,7 +992,7 @@ SHOW(__bch_cache) sum +=INITIAL_PRIO - cached[i];if (n) -do_div (sum, n); + sum =div64_u64 (sum, n);for (i =0 ; i <ARRAY_SIZE (q); i++) q[i] = INITIAL_PRIO - cached[n * (i + 1) /
Greg Kroah-Hartman
maintainerPATCH 27/71 USB: serial: option: add Fibocom L7xx modules
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Victor Fragoso <[email protected]>
commit e389fe8b68137344562fb6e4d53d8a89ef6212dd upstream.
Add support for Fibocom L716-EU module series.
L716-EU is a Fibocom module based on ZTE's V3E/V3T chipset.
Device creates multiple interfaces when connected to PC as follows:
- Network Interface: ECM or RNDIS (set by FW or AT Command)
- ttyUSB0: AT port
- ttyUSB1: Modem port
- ttyUSB2: AT2 port
- ttyUSB3: Trace port for log information
- ADB: ADB port for debugging. ("Driver=usbfs" when ADB server enabled)
Here are the outputs of lsusb and usb-devices:
$ ls /dev/ttyUSB* /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3
usb-devices:
L716-EU (ECM mode):
T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 51 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2cb7 ProdID=0001 Rev= 1.00 S: Manufacturer=Fibocom,Incorporated S: Product=Fibocom Mobile Boardband S: SerialNumber=1234567890ABCDEF C:* #Ifs= 7 Cfg#= 1 Atr=e0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00 I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
L716-EU (RNDIS mode):
T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 49 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2cb7 ProdID=0001 Rev= 1.00 S: Manufacturer=Fibocom,Incorporated S: Product=Fibocom Mobile Boardband S: SerialNumber=1234567890ABCDEF
C:* #Ifs= 7 Cfg#= 1 Atr=e0 MxPwr=500mA
A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=ff Driver=rndis_host
E: Ad=87(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
--- drivers/usb/serial/option.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/serial/option.c +1 -0
@@ -2251,6 +2251,7 @@ static const struct usb_device_id option .driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, { USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */ { USB_DEVICE_INTERFACE_CLASS(0x1782, 0x4d11, 0xff) }, /* Fibocom L610 (ECM/RNDIS mode) */ + { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x0001, 0xff, 0xff, 0xff) }, /* Fibocom L716-EU (ECM/RNDIS mode) */ { USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */ .driver_info = RSVD(4) | RSVD(5) }, { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */
Greg Kroah-Hartman
maintainerPATCH 28/71 USB: serial: option: fix FM101R-GL defines
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Puliang Lu <[email protected]>
commit a1092619dd28ac0fcf23016160a2fdccd98ef935 upstream.
Modify the definition of the two Fibocom FM101R-GL PID macros, which had their PIDs switched.
The correct PIDs are:
- VID:PID 413C:8213, FM101R-GL ESIM are laptop M.2 cards (with MBIM interfaces for Linux)
- VID:PID 413C:8215, FM101R-GL are laptop M.2 cards (with MBIM interface for Linux)
0x8213: mbim, tty0x8215: mbim, tty
--- drivers/usb/serial/option.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/serial/option.c +2 -2
@@ -203,8 +203,8 @@ static void option_instat_callback(struc#define DELL_PRODUCT_5829E_ESIM 0x81e4#define DELL_PRODUCT_5829E 0x81e6 -#define DELL_PRODUCT_FM101R 0x8213 -#define DELL_PRODUCT_FM101R_ESIM 0x8215 +#define DELL_PRODUCT_FM101R_ESIM 0x8213 +#define DELL_PRODUCT_FM101R 0x8215#define KYOCERA_VENDOR_ID 0x0c88#define KYOCERA_PRODUCT_KPC650 0x17da
Greg Kroah-Hartman
maintainerPATCH 29/71 USB: serial: option: dont claim interface 4 for ZTE MF290
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lech Perczak <[email protected]>
commit 8771127e25d6c20d458ad27cf32f7fcfc1755e05 upstream.
Interface 4 is used by for QMI interface in stock firmware of MF28D, the router which uses MF290 modem. Free the interface up, to rebind it to qmi_wwan driver.
The proper configuration is:
Interface mapping is:
0: QCDM, 1: (unknown), 2: AT (PCUI), 2: AT (Modem), 4: QMI
T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=19d2 ProdID=0189 Rev= 0.00 S: Manufacturer=ZTE, Incorporated S: Product=ZTE LTE Technologies MSM C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=86(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
--- drivers/usb/serial/option.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/serial/option.c +2 -1
@@ -1548,7 +1548,8 @@ static const struct usb_device_id option { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0167, 0xff, 0xff, 0xff), .driver_info = RSVD(4) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0189, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0189, 0xff, 0xff, 0xff), + .driver_info = RSVD(4) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0191, 0xff, 0xff, 0xff), /* ZTE EuFi890 */ .driver_info = RSVD(4) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0196, 0xff, 0xff, 0xff) },
Greg Kroah-Hartman
maintainerPATCH 30/71 USB: dwc2: write HCINT with INTMASK applied
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Neukum <[email protected]>
commit 0583bc776ca5b5a3f5752869fc31cf7322df2b35 upstream.
dwc2_hc_n_intr() writes back INTMASK as read but evaluates it with intmask applied. In stress testing this causes spurious interrupts like this:
[Mon Aug 14 10:51:07 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 7 - ChHltd set, but reason is unknown [Mon Aug 14 10:51:07 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001 [Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 0 - ChHltd set, but reason is unknown [Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001 [Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 4 - ChHltd set, but reason is unknown [Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001 [Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_update_urb_state_abn(): trimming xfer length
Applying INTMASK prevents this. The issue exists in all versions of the driver.
--- drivers/usb/dwc2/hcd_intr.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
drivers/usb/dwc2/hcd_intr.c +7 -8
@@ -2045,15 +2045,17 @@ static void dwc2_hc_n_intr(struct dwc2_h {struct dwc2_qtd *qtd;struct dwc2_host_chan *chan; -u32 hcint, hcintmsk; +u32 hcint, hcintraw, hcintmsk; chan = hsotg->hc_ptr_array[chnum]; - hcint =dwc2_readl (hsotg,HCINT (chnum)); + hcintraw =dwc2_readl (hsotg,HCINT (chnum)); hcintmsk =dwc2_readl (hsotg,HCINTMSK (chnum)); + hcint = hcintraw & hcintmsk; +dwc2_writel (hsotg, hcint,HCINT (chnum)); +if (!chan) {dev_err (hsotg->dev,"## hc_ptr_array for channel is NULL ##\n" ); -dwc2_writel (hsotg, hcint,HCINT (chnum));return ; }
@@ -2062,11 +2064,9 @@ static void dwc2_hc_n_intr(struct dwc2_h chnum);dev_vdbg (hsotg->dev," hcint 0x%08x, hcintmsk 0x%08x, hcint&hcintmsk 0x%08x\n" , - hcint, hcintmsk, hcint & hcintmsk); + hcintraw, hcintmsk, hcint); } -dwc2_writel (hsotg, hcint,HCINT (chnum)); -/* * If we got an interrupt after someone called * dwc2_hcd_endpoint_disable() we don't want to crash below
@@ -2076,8 +2076,7 @@ static void dwc2_hc_n_intr(struct dwc2_hreturn ; } - chan->hcint = hcint; - hcint &= hcintmsk; + chan->hcint = hcintraw;/* * If the channel was halted due to a dequeue, the qtd list might
Greg Kroah-Hartman
maintainerPATCH 31/71 usb: dwc3: set the dma max_seg_size
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo Ribalda <[email protected]>
commit 8bbae288a85abed6a1cf7d185d8b9dc2f5dcb12c upstream.
Allow devices to have dma operations beyond 4K, and avoid warnings such as:
DMA-API: dwc3 a600000.usb: mapping sg segment longer than device claims to support [len=86016] [max=65536]
--- drivers/usb/dwc3/core.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/dwc3/core.c +2 -0
@@ -1530,6 +1530,8 @@ static int dwc3_probe(struct platform_depm_runtime_put (dev); +dma_set_max_seg_size (dev,UINT_MAX ); +return 0 ; err5:
Greg Kroah-Hartman
maintainerPATCH 32/71 USB: dwc3: qcom: fix wakeup after probe deferral
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 41f5a0973259db9e4e3c9963d36505f80107d1a0 upstream.
The Qualcomm glue driver is overriding the interrupt trigger types defined by firmware when requesting the wakeup interrupts during probe.
This can lead to a failure to map the DP/DM wakeup interrupts after a probe deferral as the firmware defined trigger types do not match the type used for the initial mapping:
irq: type mismatch, failed to map hwirq-14 for interrupt-controller@b220000!
irq: type mismatch, failed to map hwirq-15 for interrupt-controller@b220000!
Fix this by not overriding the firmware provided trigger types when requesting the wakeup interrupts.
--- drivers/usb/dwc3/dwc3-qcom.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/dwc3/dwc3-qcom.c +4 -4
@@ -329,7 +329,7 @@ static int dwc3_qcom_setup_irq(struct plirq_set_status_flags (irq,IRQ_NOAUTOEN ); ret =devm_request_threaded_irq (qcom->dev, irq,NULL , qcom_dwc3_resume_irq, -IRQF_TRIGGER_HIGH |IRQF_ONESHOT , +IRQF_ONESHOT ,"qcom_dwc3 HS" , qcom);if (ret) {dev_err (qcom->dev,"hs_phy_irq failed: %d\n" , ret);
@@ -343,7 +343,7 @@ static int dwc3_qcom_setup_irq(struct plirq_set_status_flags (irq,IRQ_NOAUTOEN ); ret =devm_request_threaded_irq (qcom->dev, irq,NULL , qcom_dwc3_resume_irq, -IRQF_TRIGGER_HIGH |IRQF_ONESHOT , +IRQF_ONESHOT ,"qcom_dwc3 DP_HS" , qcom);if (ret) {dev_err (qcom->dev,"dp_hs_phy_irq failed: %d\n" , ret);
@@ -357,7 +357,7 @@ static int dwc3_qcom_setup_irq(struct plirq_set_status_flags (irq,IRQ_NOAUTOEN ); ret =devm_request_threaded_irq (qcom->dev, irq,NULL , qcom_dwc3_resume_irq, -IRQF_TRIGGER_HIGH |IRQF_ONESHOT , +IRQF_ONESHOT ,"qcom_dwc3 DM_HS" , qcom);if (ret) {dev_err (qcom->dev,"dm_hs_phy_irq failed: %d\n" , ret);
@@ -371,7 +371,7 @@ static int dwc3_qcom_setup_irq(struct plirq_set_status_flags (irq,IRQ_NOAUTOEN ); ret =devm_request_threaded_irq (qcom->dev, irq,NULL , qcom_dwc3_resume_irq, -IRQF_TRIGGER_HIGH |IRQF_ONESHOT , +IRQF_ONESHOT ,"qcom_dwc3 SS" , qcom);if (ret) {dev_err (qcom->dev,"ss_phy_irq failed: %d\n" , ret);
Greg Kroah-Hartman
maintainerPATCH 33/71 perf inject: Fix GEN_ELF_TEXT_OFFSET for jit
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <[email protected]>
commit 89b15d00527b7825ff19130ed83478e80e3fae99 upstream.
When a program header was added, it moved the text section but GEN_ELF_TEXT_OFFSET was not updated.
Fix by adding the program header size and aligning.
--- tools/perf/util/genelf.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tools/perf/util/genelf.h +3 -1
@@ -2,6 +2,8 @@#ifndef __GENELF_H__#define __GENELF_H__ +#include <linux/math.h> +/* genelf.c */ int jit_write_elf(int fd, uint64_t code_addr, const char *sym, const void *code, int csize, void *debug, int nr_debug_entries,
@@ -64,6 +66,6 @@ int jit_add_debug_info(Elf *e, uint64_t#endif /* The .text section is directly after the ELF header */ -#define GEN_ELF_TEXT_OFFSET sizeof(Elf_Ehdr) +#define GEN_ELF_TEXT_OFFSET round_up(sizeof(Elf_Ehdr) + sizeof(Elf_Phdr), 16)#endif
Greg Kroah-Hartman
maintainerPATCH 34/71 pinctrl: avoid reload of p state in list iteration
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maria Yu <[email protected]>
commit 4198a9b571065978632276264e01d71d68000ac5 upstream.
When in the list_for_each_entry iteration, reload of p->state->settings with a local setting from old_state will turn the list iteration into an infinite loop.
The typical symptom when the issue happens, will be a printk message like:
"not freeing pin xx (xxx) as part of deactivating group xxx - it is
already used for some other setting".
This is a compiler-dependent problem, one instance occurred using Clang version 10.0 on the arm64 architecture with linux version 4.19.
--- drivers/pinctrl/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pinctrl/core.c +3 -3
@@ -1224,17 +1224,17 @@ EXPORT_SYMBOL_GPL(pinctrl_lookup_state);static int pinctrl_commit_state (struct pinctrl *p,struct pinctrl_state *state) {struct pinctrl_setting *setting, *setting2; -struct pinctrl_state *old_state = p->state; +struct pinctrl_state *old_state =READ_ONCE (p->state);int ret; -if (p->state) { +if (old_state) {/* * For each pinmux setting in the old state, forget SW's record * of mux owner for that pingroup. Any pingroups which are * still owned by the new state will be re-acquired by the call * to pinmux_enable_setting() in the loop below. */ -list_for_each_entry (setting, &p->state->settings, node) { +list_for_each_entry (setting, &old_state->settings, node) {if (setting->type !=PIN_MAP_TYPE_MUX_GROUP )continue ;pinmux_disable_setting (setting);
Greg Kroah-Hartman
maintainerPATCH 35/71 firewire: core: fix possible memory leak in create_units()
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yang Yingliang <[email protected]>
commit 891e0eab32a57fca4d36c5162628eb0bcb1f0edf upstream.
If device_register() fails, the refcount of device is not 0, the name allocated in dev_set_name() is leaked. To fix this by calling put_device(), so that it will be freed in callback function kobject_cleanup().
unreferenced object 0xffff9d99035c7a90 (size 8):
comm "systemd-udevd", pid 168, jiffies 4294672386 (age 152.089s) hex dump (first 8 bytes):
66 77 30 2e 30 00 ff ff fw0.0...
backtrace:
[<00000000e1d62bac>] __kmem_cache_alloc_node+0x1e9/0x360
[<00000000bbeaff31>] __kmalloc_node_track_caller+0x44/0x1a0
[<00000000491f2fb4>] kvasprintf+0x67/0xd0
[<000000005b960ddc>] kobject_set_name_vargs+0x1e/0x90
[<00000000427ac591>] dev_set_name+0x4e/0x70
[<000000003b4e447d>] create_units+0xc5/0x110fw_unit_release() will be called in the error path, move fw_device_get() before calling device_register() to keep balanced with fw_device_put() in fw_unit_release().
--- drivers/firewire/core-device.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/firewire/core-device.c +4 -7
@@ -732,14 +732,11 @@ static void create_units(struct fw_devic fw_unit_attributes, &unit->attribute_group); -if (device_register (&unit->device) <0 ) - goto skip_unit; -fw_device_get (device); -continue ; - - skip_unit: -kfree (unit); +if (device_register (&unit->device) <0 ) { +put_device (&unit->device); +continue ; + } } }
Greg Kroah-Hartman
maintainerPATCH 36/71 mmc: block: Do not lose cache flush during CQE error recovery
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <[email protected]>
commit 174925d340aac55296318e43fd96c0e1d196e105 upstream.
During CQE error recovery, error-free data commands get requeued if there is any data left to transfer, but non-data commands are completed even though they have not been processed. Requeue them instead.
Note the only non-data command is cache flush, which would have resulted in a cache flush being lost if it was queued at the time of CQE recovery.
--- drivers/mmc/core/block.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/mmc/core/block.c +2 -0
@@ -1470,6 +1470,8 @@ static void mmc_blk_cqe_complete_rq(strublk_mq_requeue_request (req, true); else__blk_mq_end_request (req ,BLK_STS_OK ); + }else if (mq->in_recovery) { +blk_mq_requeue_request (req, true); }else {blk_mq_end_request (req,BLK_STS_OK ); }
Greg Kroah-Hartman
maintainerPATCH 37/71 ALSA: hda: Disable power-save on KONTRON SinglePC
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit a337c355719c42a6c5b67e985ad753590ed844fb upstream.
It's been reported that the runtime PM on KONTRON SinglePC (PCI SSID 1734:1232) caused a stall of playback after a bunch of invocations. (FWIW, this looks like an timing issue, and the stall happens rather on the controller side.)
As a workaround, disable the default power-save on this platform.
--- sound/pci/hda/hda_intel.c | 2 ++ 1 file changed, 2 insertions(+)
sound/pci/hda/hda_intel.c +2 -0
@@ -2371,6 +2371,8 @@ static struct snd_pci_quirk power_save_bSND_PCI_QUIRK (0x17aa ,0x36a7 ,"Lenovo C50 All in one" ,0 ),/* https://bugs.launchpad.net/bugs/1821663 */ SND_PCI_QUIRK (0x1631 ,0xe017 ,"Packard Bell NEC IMEDIA 5204" ,0 ), +/* KONTRON SinglePC may cause a stall at runtime resume */ + SND_PCI_QUIRK(0x1734, 0x1232, "KONTRON SinglePC", 0), {} };#endif /* CONFIG_PM */
Greg Kroah-Hartman
maintainerPATCH 38/71 ALSA: hda/realtek: Headset Mic VREF to 100%
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kailang Yang <[email protected]>
commit baaacbff64d9f34b64f294431966d035aeadb81c upstream.
This platform need to set Mic VREF to 100%.
--- sound/pci/hda/patch_realtek.c | 9 +++++++++ 1 file changed, 9 insertions(+)
sound/pci/hda/patch_realtek.c +9 -0
@@ -1917,6 +1917,7 @@ enum {ALC887_FIXUP_ASUS_AUDIO ,ALC887_FIXUP_ASUS_HMIC ,ALCS1200A_FIXUP_MIC_VREF , + ALC888VD_FIXUP_MIC_100VREF, }; static void alc889_fixup_coef(struct hda_codec *codec,
@@ -2470,6 +2471,13 @@ static const struct hda_fixup alc882_fix {} } }, + [ALC888VD_FIXUP_MIC_100VREF ] = { + .type =HDA_FIXUP_PINCTLS , + .v.pins = (const struct hda_pintbl []) { + {0x18 ,PIN_VREF100 },/* headset mic */ + {} + } + }, };static const struct snd_pci_quirk alc882_fixup_tbl[] = {
@@ -2539,6 +2547,7 @@ static const struct snd_pci_quirk alc882SND_PCI_QUIRK (0x106b ,0x4a00 ,"Macbook 5,2" ,ALC889_FIXUP_MBA11_VREF ),SND_PCI_QUIRK (0x1071 ,0x8258 ,"Evesham Voyaeger" ,ALC882_FIXUP_EAPD ), +SND_PCI_QUIRK (0x10ec ,0x12d8 ,"iBase Elo Touch" ,ALC888VD_FIXUP_MIC_100VREF ),SND_PCI_QUIRK (0x13fe ,0x1009 ,"Advantech MIT-W101" ,ALC886_FIXUP_EAPD ),SND_PCI_QUIRK (0x1458 ,0xa002 ,"Gigabyte EP45-DS3/Z87X-UD3H" ,ALC889_FIXUP_FRONT_HP_NO_PRESENCE ), SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
Greg Kroah-Hartman
maintainerPATCH 39/71 dm-verity: align struct dm_verity_fec_io properly
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikulas Patocka <[email protected]>
commit 38bc1ab135db87577695816b190e7d6d8ec75879 upstream.
dm_verity_fec_io is placed after the end of two hash digests. If the hash digest has unaligned length, struct dm_verity_fec_io could be unaligned.
This commit fixes the placement of struct dm_verity_fec_io, so that it's aligned.
--- drivers/md/dm-verity-fec.c | 3 ++- drivers/md/dm-verity.h | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-)
drivers/md/dm-verity-fec.c +2 -1
@@ -28,7 +28,8 @@ bool verity_fec_is_enabled(struct dm_ver*/ static inline struct dm_verity_fec_io *fec_io (struct dm_verity_io *io) { -return (struct dm_verity_fec_io *)verity_io_digest_end (io->v, io); +return (struct dm_verity_fec_io *) + ((char *)io + io->v->ti->per_io_data_size -sizeof (struct dm_verity_fec_io )); }/*
drivers/md/dm-verity.h +0 -6
@@ -109,12 +109,6 @@ static inline u8 *verity_io_want_digest(return (u8 *)(io +1 ) + v->ahash_reqsize + v->digest_size; } -static inline u8 *verity_io_digest_end (struct dm_verity *v, -struct dm_verity_io *io) -{ -return verity_io_want_digest (v, io) + v->digest_size; -} - extern int verity_for_bv_block(struct dm_verity *v, struct dm_verity_io *io, struct bvec_iter *iter, int (*process)(struct dm_verity *v,
Greg Kroah-Hartman
maintainerPATCH 40/71 dm verity: dont perform FEC for failed readahead IO
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wu Bo <[email protected]>
commit 0193e3966ceeeef69e235975918b287ab093082b upstream.
We found an issue under Android OTA scenario that many BIOs have to do FEC where the data under dm-verity is 100% complete and no corruption.
Android OTA has many dm-block layers, from upper to lower:
dm-verity
dm-snapshot
dm-origin & dm-cow
dm-linear
ufs
DM tables have to change 2 times during Android OTA merging process. When doing table change, the dm-snapshot will be suspended for a while. During this interval, many readahead IOs are submitted to dm_verity from filesystem. Then the kverity works are busy doing FEC process which cost too much time to finish dm-verity IO. This causes needless delay which feels like system is hung.
After adding debugging it was found that each readahead IO needed around 10s to finish when this situation occurred. This is due to IO amplification:
dm-snapshot suspenderofs_readahead // 300+ io is submitted
dm_submit_bio (dm_verity) dm_submit_bio (dm_snapshot) bio return EIO bio got nothing, it's empty verity_end_io verity_verify_io forloop range(0, io->n_blocks) // each io->nblocks ~= 20 verity_fec_decode fec_decode_rsb fec_read_bufs forloop range(0, v->fec->rsn) // v->fec->rsn = 253 new_read submit_bio (dm_snapshot) end loop end loop
dm-snapshot resume
Readahead BIOs get nothing while dm-snapshot is suspended, so all of them will cause verity's FEC.
Each readahead BIO needs to verify ~20 (io->nblocks) blocks. Each block needs to do FEC, and every block needs to do 253 (v->fec->rsn) reads.
So during the suspend interval(~200ms), 300 readahead BIOs trigger ~1518000 (300*20*253) IOs to dm-snapshot.
As readahead IO is not required by userspace, and to fix this issue, it is best to pass readahead errors to upper layer to handle it.
--- drivers/md/dm-verity-target.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/md/dm-verity-target.c +3 -1
@@ -579,7 +579,9 @@ static void verity_end_io(struct bio *bistruct dm_verity_io *io = bio->bi_private;if (bio->bi_status && - (!verity_fec_is_enabled (io->v) ||verity_is_system_shutting_down ())) { + (!verity_fec_is_enabled (io->v) || +verity_is_system_shutting_down () || + (bio->bi_opf &REQ_RAHEAD ))) {verity_finish_io (io, bio->bi_status);return ; }
Greg Kroah-Hartman
maintainerPATCH 41/71 bcache: revert replacing IS_ERR_OR_NULL with IS_ERR
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Markus Weippert <[email protected]>
commit bb6cc253861bd5a7cf8439e2118659696df9619f upstream.
Commit 028ddcac477b ("bcache: Remove unnecessary NULL point check in node allocations") replaced IS_ERR_OR_NULL by IS_ERR. This leads to a NULL pointer dereference.
BUG: kernel NULL pointer dereference, address: 0000000000000080 Call Trace: ? __die_body.cold+0x1a/0x1f ? page_fault_oops+0xd2/0x2b0 ? exc_page_fault+0x70/0x170 ? asm_exc_page_fault+0x22/0x30 ? btree_node_free+0xf/0x160 [bcache] ? up_write+0x32/0x60 btree_gc_coalesce+0x2aa/0x890 [bcache] ? bch_extent_bad+0x70/0x170 [bcache] btree_gc_recurse+0x130/0x390 [bcache] ? btree_gc_mark_node+0x72/0x230 [bcache] bch_btree_gc+0x5da/0x600 [bcache] ? cpuusage_read+0x10/0x10 ? bch_btree_gc+0x600/0x600 [bcache] bch_gc_thread+0x135/0x180 [bcache]
The relevant code starts with:
new_nodes[0] = NULL;
for (i = 0; i < nodes; i++) {
if (__bch_keylist_realloc(&keylist, bkey_u64s(&r[i].b->key)))
goto out_nocoalesce;
// ...
out_nocoalesce:
// ...
for (i = 0; i < nodes; i++)
if (!IS_ERR(new_nodes[i])) { // IS_ERR_OR_NULL before
028ddcac477b
btree_node_free(new_nodes[i]); // new_nodes[0] is NULL
rw_unlock(true, new_nodes[i]);
}This patch replaces IS_ERR() by IS_ERR_OR_NULL() to fix this.
--- drivers/md/bcache/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/bcache/btree.c +1 -1
@@ -1526,7 +1526,7 @@ out_nocoalesce:atomic_dec (&b->c->prio_blocked);for (i =0 ; i < nodes; i++) -if (!IS_ERR (new_nodes[i])) { +if (!IS_ERR_OR_NULL (new_nodes[i])) {btree_node_free (new_nodes[i]);rw_unlock (true, new_nodes[i]); }
Greg Kroah-Hartman
maintainerPATCH 42/71 powerpc: Dont clobber f0/vs0 during fp|altivec register save
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Timothy Pearson <[email protected]>
commit 5e1d824f9a283cbf90f25241b66d1f69adb3835b upstream.
During floating point and vector save to thread data f0/vs0 are clobbered by the FPSCR/VSCR store routine. This has been obvserved to lead to userspace register corruption and application data corruption with io-uring.
Fix it by restoring f0/vs0 after FPSCR/VSCR store has completed for all the FP, altivec, VMX register save paths.
Tested under QEMU in kvm mode, running on a Talos II workstation with dual POWER9 DD2.2 CPUs.
Additional detail (mpe):
Typically save_fpu() is called from __giveup_fpu() which saves the FP regs and also *turns off FP* in the tasks MSR, meaning the kernel will reload the FP regs from the thread struct before letting the task use FP again. So in that case save_fpu() is free to clobber f0 because the FP regs no longer hold live values for the task.
There is another case though, which is the path via:
sys_clone()
...
copy_process()
dup_task_struct()
arch_dup_task_struct()
flush_all_to_thread()
save_all()That path saves the FP regs but leaves them live. That's meant as an optimisation for a process that's using FP/VSX and then calls fork(), leaving the regs live means the parent process doesn't have to take a fault after the fork to get its FP regs back. The optimisation was added in commit 8792468da5e1 ("powerpc: Add the ability to save FPU without giving it up").
That path does clobber f0, but f0 is volatile across function calls, and typically programs reach copy_process() from userspace via a syscall wrapper function. So in normal usage f0 being clobbered across a syscall doesn't cause visible data corruption.
But there is now a new path, because io-uring can call copy_process() via create_io_thread() from the signal handling path. That's OK if the signal is handled as part of syscall return, but it's not OK if the signal is handled due to some other interrupt.
That path is:
interrupt_return_srr_user()
interrupt_exit_user_prepare()
interrupt_exit_user_prepare_main()
do_notify_resume()
get_signal()
task_work_run()
create_worker_cb()
create_io_worker()
copy_process()
dup_task_struct()
arch_dup_task_struct()
flush_all_to_thread()
save_all()
if (tsk->thread.regs->msr & MSR_FP)
save_fpu()
# f0 is clobbered and potentially live in userspaceNote the above discussion applies equally to save_altivec().
--- arch/powerpc/kernel/fpu.S | 13 +++++++++++++ arch/powerpc/kernel/vector.S | 2 ++ 2 files changed, 15 insertions(+)
arch/powerpc/kernel/fpu.S +13 -0
@@ -29,6 +29,15 @@ #include <asm/feature-fixups.h> #ifdef CONFIG_VSX +#define __REST_1FPVSR(n,c,base) \ +BEGIN_FTR_SECTION \ + b 2f; \ +END_FTR_SECTION_IFSET(CPU_FTR_VSX); \ + REST_FPR(n,base); \ + b 3f; \ +2: REST_VSR(n,c,base); \ +3: + #define __REST_32FPVSRS(n,c,base) \ BEGIN_FTR_SECTION \ b 2f; \
@@ -47,9 +56,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX); 2: SAVE_32VSRS(n,c,base); \ 3: #else +#define __REST_1FPVSR(n,b,base) REST_FPR(n, base) #define __REST_32FPVSRS(n,b,base) REST_32FPRS(n, base) #define __SAVE_32FPVSRS(n,b,base) SAVE_32FPRS(n, base) #endif +#define REST_1FPVSR(n,c,base) __REST_1FPVSR(n,__REG_##c,__REG_##base) #define REST_32FPVSRS(n,c,base) __REST_32FPVSRS(n,__REG_##c,__REG_##base) #define SAVE_32FPVSRS(n,c,base) __SAVE_32FPVSRS(n,__REG_##c,__REG_##base)
@@ -72,6 +83,7 @@ _GLOBAL(store_fp_state) SAVE_32FPVSRS(0, R4, R3) mffs fr0 stfd fr0,FPSTATE_FPSCR(r3) + REST_1FPVSR(0, R4, R3) blr EXPORT_SYMBOL(store_fp_state)
@@ -136,6 +148,7 @@ _GLOBAL(save_fpu) 2: SAVE_32FPVSRS(0, R4, R6) mffs fr0 stfd fr0,FPSTATE_FPSCR(r6) + REST_1FPVSR(0, R4, R6) blr /*
arch/powerpc/kernel/vector.S +2 -0
@@ -31,6 +31,7 @@ _GLOBAL(store_vr_state) mfvscr v0 li r4, VRSTATE_VSCR stvx v0, r4, r3 + lvx v0, 0, r3 blr EXPORT_SYMBOL(store_vr_state)
@@ -101,6 +102,7 @@ _GLOBAL(save_altivec) mfvscr v0 li r4,VRSTATE_VSCR stvx v0,r4,r7 + lvx v0,0,r7 blr #ifdef CONFIG_VSX
Greg Kroah-Hartman
maintainerPATCH 43/71 btrfs: fix off-by-one when checking chunk map includes logical address
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Filipe Manana <[email protected]>
commit 5fba5a571858ce2d787fdaf55814e42725bfa895 upstream.
At btrfs_get_chunk_map() we get the extent map for the chunk that contains the given logical address stored in the 'logical' argument. Then we do sanity checks to verify the extent map contains the logical address. One of these checks verifies if the extent map covers a range with an end offset behind the target logical address - however this check has an off-by-one error since it will consider an extent map whose start offset plus its length matches the target logical address as inclusive, while the fact is that the last byte it covers is behind the target logical address (by 1).
So fix this condition by using '<=' rather than '<' when comparing the extent map's "start + length" against the target logical address.
--- fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/volumes.c +1 -1
@@ -2760,7 +2760,7 @@ static struct extent_map *get_chunk_map(return ERR_PTR (-EINVAL ); } -if (em->start > logical || em->start + em->len < logical) { +if (em->start > logical || em->start + em->len <= logical) {btrfs_crit (fs_info,"found a bad mapping, wanted %llu-%llu, found %llu-%llu" , logical, length, em->start, em->start + em->len);
Greg Kroah-Hartman
maintainerPATCH 44/71 btrfs: send: ensure send_fd is writable
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jann Horn <[email protected]>
commit 0ac1d13a55eb37d398b63e6ff6db4a09a2c9128c upstream.
kernel_write() requires the caller to ensure that the file is writable. Let's do that directly after looking up the ->send_fd.
We don't need a separate bailout path because the "out" path already does fput() if ->send_filp is non-NULL.
This has no security impact for two reasons:
- the ioctl requires CAP_SYS_ADMIN
- __kernel_write() bails out on read-only files - but only since 5.8, see commit a01ac27be472 ("fs: check FMODE_WRITE in __kernel_write")
--- fs/btrfs/send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/send.c +1 -1
@@ -6860,7 +6860,7 @@ long btrfs_ioctl_send(struct file *mnt_f sctx->flags = arg->flags; sctx->send_filp =fget (arg->send_fd); -if (!sctx->send_filp) { +if (!sctx->send_filp || !(sctx->send_filp->f_mode &FMODE_WRITE )) { ret = -EBADF ; goto out; }
Greg Kroah-Hartman
maintainerPATCH 45/71 Input: xpad - add HyperX Clutch Gladiate Support
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Max Nguyen <[email protected]>
commit e28a0974d749e5105d77233c0a84d35c37da047e upstream.
Add HyperX controller support to xpad_device and xpad_table.
--- drivers/input/joystick/xpad.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/input/joystick/xpad.c +2 -0
@@ -133,6 +133,7 @@ static const struct xpad_device { { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX }, { 0x044f, 0x0f10, "Thrustmaster Modena GT Wheel", 0, XTYPE_XBOX }, { 0x044f, 0xb326, "Thrustmaster Gamepad GP XID", 0, XTYPE_XBOX360 }, + { 0x03f0, 0x0495, "HyperX Clutch Gladiate", 0, XTYPE_XBOXONE }, { 0x045e, 0x0202, "Microsoft X-Box pad v1 (US)", 0, XTYPE_XBOX }, { 0x045e, 0x0285, "Microsoft X-Box pad (Japan)", 0, XTYPE_XBOX }, { 0x045e, 0x0287, "Microsoft Xbox Controller S", 0, XTYPE_XBOX },
@@ -445,6 +446,7 @@ static const struct usb_device_id xpad_tXPAD_XBOX360_VENDOR (0x0079 ),/* GPD Win 2 Controller */ XPAD_XBOX360_VENDOR (0x03eb ),/* Wooting Keyboards (Legacy) */ XPAD_XBOX360_VENDOR (0x044f ),/* Thrustmaster X-Box 360 controllers */ +XPAD_XBOXONE_VENDOR (0x03f0 ),/* HP HyperX Xbox One Controllers */ XPAD_XBOX360_VENDOR (0x045e ),/* Microsoft X-Box 360 controllers */ XPAD_XBOXONE_VENDOR (0x045e ),/* Microsoft X-Box One controllers */ XPAD_XBOX360_VENDOR(0x046d), /* Logitech X-Box 360 style controllers */
Greg Kroah-Hartman
maintainerPATCH 46/71 ipv4: igmp: fix refcnt uaf issue when receiving igmp query packet
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhengchao Shao <[email protected]>
[ Upstream commit e2b706c691905fe78468c361aaabc719d0a496f1 ]
When I perform the following test operations:
1.ip link add br0 type bridge
2.brctl addif br0 eth0
3.ip addr add 239.0.0.1/32 dev eth0
4.ip addr add 239.0.0.1/32 dev br0
5.ip addr add 224.0.0.1/32 dev br0
6.while ((1))
do
ifconfig br0 up
ifconfig br0 down
done
7.send IGMPv2 query packets to port eth0 continuously. For example, ./mausezahn ethX -c 0 "01 00 5e 00 00 01 00 72 19 88 aa 02 08 00 45 00 00 1c 00 01 00 00 01 02 0e 7f c0 a8 0a b7 e0 00 00 01 11 64 ee 9b 00 00 00 00"
The preceding tests may trigger the refcnt uaf issue of the mc list. The stack is as follows:
refcount_t: addition on 0; use-after-free. WARNING: CPU: 21 PID: 144 at lib/refcount.c:25 refcount_warn_saturate (lib/refcount.c:25) CPU: 21 PID: 144 Comm: ksoftirqd/21 Kdump: loaded Not tainted 6.7.0-rc1-next-20231117-dirty #80 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 RIP: 0010:refcount_warn_saturate (lib/refcount.c:25) RSP: 0018:ffffb68f00657910 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff8a00c3bf96c0 RCX: ffff8a07b6160908 RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffff8a07b6160900 RBP: ffff8a00cba36862 R08: 0000000000000000 R09: 00000000ffff7fff R10: ffffb68f006577c0 R11: ffffffffb0fdcdc8 R12: ffff8a00c3bf9680 R13: ffff8a00c3bf96f0 R14: 0000000000000000 R15: ffff8a00d8766e00 FS: 0000000000000000(0000) GS:ffff8a07b6140000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055f10b520b28 CR3: 000000039741a000 CR4: 00000000000006f0 Call Trace: <TASK> igmp_heard_query (net/ipv4/igmp.c:1068) igmp_rcv (net/ipv4/igmp.c:1132) ip_protocol_deliver_rcu (net/ipv4/ip_input.c:205) ip_local_deliver_finish (net/ipv4/ip_input.c:234) __netif_receive_skb_one_core (net/core/dev.c:5529) netif_receive_skb_internal (net/core/dev.c:5729) netif_receive_skb (net/core/dev.c:5788) br_handle_frame_finish (net/bridge/br_input.c:216) nf_hook_bridge_pre (net/bridge/br_input.c:294) __netif_receive_skb_core (net/core/dev.c:5423) __netif_receive_skb_list_core (net/core/dev.c:5606) __netif_receive_skb_list (net/core/dev.c:5674) netif_receive_skb_list_internal (net/core/dev.c:5764) napi_gro_receive (net/core/gro.c:609) e1000_clean_rx_irq (drivers/net/ethernet/intel/e1000/e1000_main.c:4467) e1000_clean (drivers/net/ethernet/intel/e1000/e1000_main.c:3805) __napi_poll (net/core/dev.c:6533) net_rx_action (net/core/dev.c:6735) __do_softirq (kernel/softirq.c:554) run_ksoftirqd (kernel/softirq.c:913) smpboot_thread_fn (kernel/smpboot.c:164) kthread (kernel/kthread.c:388) ret_from_fork (arch/x86/kernel/process.c:153) ret_from_fork_asm (arch/x86/entry/entry_64.S:250) </TASK>
The root causes are as follows:
Thread A Thread B
... netif_receive_skbbr_dev_stop ...
br_multicast_leave_snoopers ...
__ip_mc_dec_group ...
__igmp_group_dropped igmp_rcv
igmp_stop_timer igmp_heard_query //ref = 1
ip_ma_put igmp_mod_timer
refcount_dec_and_test igmp_start_timer //ref = 0
... refcount_inc //ref increases from 0
When the device receives an IGMPv2 Query message, it starts the timer immediately, regardless of whether the device is running. If the device is down and has left the multicast group, it will cause the mc list refcount uaf issue.
--- net/ipv4/igmp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
net/ipv4/igmp.c +4 -2
@@ -221,8 +221,10 @@ static void igmp_start_timer(struct ip_mc_list *im, int max_delay)int tv =prandom_u32 () % max_delay; im->tm_running =1 ; -if (!mod_timer (&im->timer, jiffies+tv+2 )) -refcount_inc (&im->refcnt); +if (refcount_inc_not_zero (&im->refcnt)) { +if (mod_timer (&im->timer, jiffies + tv +2 )) +ip_ma_put (im); + } }static void igmp_gq_start_timer (struct in_device *in_dev)
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 47/71 ravb: Fix races between ravb_tx_timeout_work() and net related ops
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yoshihiro Shimoda <[email protected]>
[ Upstream commit 9870257a0a338cd8d6c1cddab74e703f490f6779 ]
Fix races between ravb_tx_timeout_work() and functions of net_device_ops and ethtool_ops by using rtnl_trylock() and rtnl_unlock(). Note that since ravb_close() is under the rtnl lock and calls cancel_work_sync(), ravb_tx_timeout_work() should calls rtnl_trylock(). Otherwise, a deadlock may happen in ravb_tx_timeout_work() like below:
CPU0 CPU1
ravb_tx_timeout()
schedule_work()
...__dev_close_many()
// Under rtnl lockravb_close()cancel_work_sync()
// Waiting
ravb_tx_timeout_work() rtnl_lock() // This is possible to cause a deadlock
If rtnl_trylock() fails, rescheduling the work with sleep for 1 msec.
--- drivers/net/ethernet/renesas/ravb_main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/net/ethernet/renesas/ravb_main.c +10 -1
@@ -1447,6 +1447,12 @@ static void ravb_tx_timeout_work(struct work_struct *work)struct net_device *ndev = priv->ndev;int error; +if (!rtnl_trylock ()) { +usleep_range (1000 ,2000 ); +schedule_work (&priv->work); +return ; + } +netif_tx_stop_all_queues (ndev);/* Stop PTP Clock driver */
@@ -1479,7 +1485,7 @@ static void ravb_tx_timeout_work(struct work_struct *work)*/ netdev_err (ndev,"%s: ravb_dmac_init() failed, error %d\n" , __func__, error); -return ; + goto out_unlock; }ravb_emac_init (ndev);
@@ -1489,6 +1495,9 @@ static void ravb_tx_timeout_work(struct work_struct *work)ravb_ptp_init (ndev, priv->pdev);netif_tx_start_all_queues (ndev); + +out_unlock: +rtnl_unlock (); }/* Packet transmit function for Ethernet AVB */
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 48/71 net: ravb: Start TX queues after HW initialization succeeded
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Claudiu Beznea <[email protected]>
[ Upstream commit 6f32c086602050fc11157adeafaa1c1eb393f0af ]
ravb_phy_start() may fail. If that happens, the TX queues will remain started. Thus, move the netif_tx_start_all_queues() after PHY is successfully initialized.
--- drivers/net/ethernet/renesas/ravb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/renesas/ravb_main.c +2 -2
@@ -1392,13 +1392,13 @@ static int ravb_open(struct net_device *ndev)if (priv->chip_id ==RCAR_GEN2 )ravb_ptp_init (ndev, priv->pdev); -netif_tx_start_all_queues (ndev); -/* PHY control start */ error =ravb_phy_start (ndev);if (error) goto out_ptp_stop; +netif_tx_start_all_queues (ndev); +return 0 ; out_ptp_stop:
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 49/71 perf intel-pt: Adjust sample flags for VM-Exit
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <[email protected]>
[ Upstream commit 695fc4510615f8db40ebaf7a2c011f0a594b5f77 ]
Use the change of NR to detect whether an asynchronous branch is a VM-Exit.
Note VM-Entry is determined from the vmlaunch or vmresume instruction, in which case, sample flags will show "VMentry" even if the VM-Entry fails.
Stable-dep-of: f2d87895cbc4 ("perf intel-pt: Fix async branch flags")
--- tools/perf/util/intel-pt.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
tools/perf/util/intel-pt.c +7 -4
@@ -899,13 +899,16 @@ static void intel_pt_sample_flags(struct intel_pt_queue *ptq)if (ptq->state->flags &INTEL_PT_ABORT_TX ) { ptq->flags =PERF_IP_FLAG_BRANCH |PERF_IP_FLAG_TX_ABORT ; }else if (ptq->state->flags &INTEL_PT_ASYNC ) { -if (ptq->state->to_ip) +if (!ptq->state->to_ip) + ptq->flags =PERF_IP_FLAG_BRANCH | +PERF_IP_FLAG_TRACE_END ; +else if (ptq->state->from_nr && !ptq->state->to_nr) + ptq->flags =PERF_IP_FLAG_BRANCH |PERF_IP_FLAG_CALL | +PERF_IP_FLAG_VMEXIT ; +else ptq->flags =PERF_IP_FLAG_BRANCH |PERF_IP_FLAG_CALL |PERF_IP_FLAG_ASYNC |PERF_IP_FLAG_INTERRUPT ; -else - ptq->flags =PERF_IP_FLAG_BRANCH | -PERF_IP_FLAG_TRACE_END ; ptq->insn_len =0 ; }else {if (ptq->state->from_ip)
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 50/71 perf intel-pt: Fix async branch flags
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <[email protected]>
[ Upstream commit f2d87895cbc4af80649850dcf5da36de6b2ed3dd ]
Ensure PERF_IP_FLAG_ASYNC is set always for asynchronous branches (i.e. interrupts etc).
--- tools/perf/util/intel-pt.c | 2 ++ 1 file changed, 2 insertions(+)
tools/perf/util/intel-pt.c +2 -0
@@ -901,9 +901,11 @@ static void intel_pt_sample_flags(struct intel_pt_queue *ptq) }else if (ptq->state->flags &INTEL_PT_ASYNC ) {if (!ptq->state->to_ip) ptq->flags =PERF_IP_FLAG_BRANCH | +PERF_IP_FLAG_ASYNC |PERF_IP_FLAG_TRACE_END ;else if (ptq->state->from_nr && !ptq->state->to_nr) ptq->flags =PERF_IP_FLAG_BRANCH |PERF_IP_FLAG_CALL | +PERF_IP_FLAG_ASYNC |PERF_IP_FLAG_VMEXIT ;else ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL |
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 51/71 smb3: fix touch -h of symlink
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steve French <[email protected]>
[ Upstream commit 475efd9808a3094944a56240b2711349e433fb66 ]
For example:
touch -h -t 02011200 testfile
where testfile is a symlink would not change the timestamp, but
touch -t 02011200 testfiledoes work to change the timestamp of the target
--- fs/cifs/cifsfs.c | 1 + 1 file changed, 1 insertion(+)
fs/cifs/cifsfs.c +1 -0
@@ -970,6 +970,7 @@ const struct inode_operations cifs_file_inode_ops = {const struct inode_operations cifs_symlink_inode_ops = { .get_link = cifs_get_link, + .setattr = cifs_setattr, .permission = cifs_permission, .listxattr = cifs_listxattr, };
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 52/71 PCI: let pci_disable_link_state propagate errors
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiner Kallweit <[email protected]>
[ Upstream commit 4cfd218855923a07dc02a5bec3d3bb37a118ebc2 ]
Drivers may rely on pci_disable_link_state() having disabled certain ASPM link states. If OS can't control ASPM then pci_disable_link_state() turns into a no-op w/o informing the caller. The driver therefore may falsely assume the respective ASPM link states are disabled. Let pci_disable_link_state() propagate errors to the caller, enabling the caller to react accordingly.
Stable-dep-of: 3cb4f534bac0 ("Revert "PCI/ASPM: Disable only ASPM_STATE_L1 when driver, disables L1"")
--- drivers/pci/pcie/aspm.c | 20 +++++++++++--------- include/linux/pci-aspm.h | 7 ++++--- 2 files changed, 15 insertions(+), 12 deletions(-)
drivers/pci/pcie/aspm.c +11 -9
@@ -1078,18 +1078,18 @@ void pcie_aspm_powersave_config_link(struct pci_dev *pdev)up_read (&pci_bus_sem); } -static void __pci_disable_link_state (struct pci_dev *pdev,int state,bool sem) +static int __pci_disable_link_state (struct pci_dev *pdev,int state,bool sem) {struct pci_dev *parent = pdev->bus->self;struct pcie_link_state *link;if (!pci_is_pcie (pdev)) -return ; +return 0 ;if (pdev->has_secondary_link) parent = pdev;if (!parent || !parent->link_state) -return ; +return -EINVAL ;/* * A driver requested that ASPM be disabled on this device, but
@@ -1101,7 +1101,7 @@ static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem)*/ if (aspm_disabled) {pci_warn (pdev,"can't disable ASPM; OS doesn't have ASPM control\n" ); -return ; +return -EPERM ; }if (sem)
@@ -1120,11 +1120,13 @@ static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem)mutex_unlock (&aspm_lock);if (sem)up_read (&pci_bus_sem); + +return 0 ; } -void pci_disable_link_state_locked (struct pci_dev *pdev,int state) +int pci_disable_link_state_locked (struct pci_dev *pdev,int state) { -__pci_disable_link_state (pdev, state, false); +return __pci_disable_link_state (pdev, state, false); }EXPORT_SYMBOL (pci_disable_link_state_locked);
@@ -1132,14 +1134,14 @@ EXPORT_SYMBOL(pci_disable_link_state_locked);* pci_disable_link_state - Disable device's link state, so the link will * never enter specific states. Note that if the BIOS didn't grant ASPM * control to the OS, this does nothing because we can't touch the LNKCTL -* register. +* register. Returns 0 or a negative errno. * * @pdev: PCI device * @state: ASPM link state to disable */ -void pci_disable_link_state (struct pci_dev *pdev,int state) +int pci_disable_link_state (struct pci_dev *pdev,int state) { -__pci_disable_link_state (pdev, state, true); +return __pci_disable_link_state (pdev, state, true); }EXPORT_SYMBOL (pci_disable_link_state);
include/linux/pci-aspm.h +4 -3
@@ -24,11 +24,12 @@#define PCIE_LINK_STATE_CLKPM 4#ifdef CONFIG_PCIEASPM -void pci_disable_link_state (struct pci_dev *pdev,int state); -void pci_disable_link_state_locked (struct pci_dev *pdev,int state); +int pci_disable_link_state (struct pci_dev *pdev,int state); +int pci_disable_link_state_locked (struct pci_dev *pdev,int state);void pcie_no_aspm (void );#else -static inline void pci_disable_link_state (struct pci_dev *pdev,int state) { } +static inline int pci_disable_link_state (struct pci_dev *pdev,int state) +{return 0 ; }static inline void pcie_no_aspm (void ) { }#endif
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 53/71 PCI: Move ASPM declarations to linux/pci.h
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Wilczynski <[email protected]>
[ Upstream commit 7ce2e76a0420801fb4b53b9e6850940e6b326433 ]
Move ASPM definitions and function prototypes from include/linux/pci-aspm.h to include/linux/pci.h so users only need to include <linux/pci.h>:
PCIE_LINK_STATE_L0S
PCIE_LINK_STATE_L1
PCIE_LINK_STATE_CLKPM
pci_disable_link_state()
pci_disable_link_state_locked()
pcie_no_aspm()
No functional changes intended.
Stable-dep-of: 3cb4f534bac0 ("Revert "PCI/ASPM: Disable only ASPM_STATE_L1 when driver, disables L1"")
--- drivers/acpi/pci_root.c | 1 - drivers/char/xillybus/xillybus_pcie.c | 1 - drivers/net/ethernet/intel/e1000e/e1000.h | 1 - drivers/net/ethernet/jme.c | 1 - drivers/net/ethernet/realtek/r8169_main.c | 1 - drivers/net/wireless/ath/ath5k/pci.c | 1 - .../net/wireless/intel/iwlegacy/3945-mac.c | 1 - .../net/wireless/intel/iwlegacy/4965-mac.c | 1 - .../net/wireless/intel/iwlwifi/pcie/trans.c | 1 - drivers/pci/pci-acpi.c | 1 - drivers/pci/pcie/aspm.c | 1 - drivers/pci/quirks.c | 1 - drivers/scsi/aacraid/linit.c | 1 - drivers/scsi/hpsa.c | 1 - drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 - include/linux/pci-aspm.h | 36 ------------------- include/linux/pci.h | 18 ++++++++++ 17 files changed, 18 insertions(+), 51 deletions(-) delete mode 100644 include/linux/pci-aspm.h
drivers/acpi/pci_root.c +0 -1
@@ -28,7 +28,6 @@#include <linux/pm_runtime.h> #include <linux/pci.h> #include <linux/pci-acpi.h> -#include <linux/pci-aspm.h> #include <linux/dmar.h> #include <linux/acpi.h> #include <linux/slab.h>
drivers/char/xillybus/xillybus_pcie.c +0 -1
@@ -12,7 +12,6 @@#include <linux/module.h> #include <linux/pci.h> -#include <linux/pci-aspm.h> #include <linux/slab.h> #include "xillybus.h"
drivers/net/ethernet/intel/e1000e/e1000.h +0 -1
@@ -13,7 +13,6 @@#include <linux/io.h> #include <linux/netdevice.h> #include <linux/pci.h> -#include <linux/pci-aspm.h> #include <linux/crc32.h> #include <linux/if_vlan.h> #include <linux/timecounter.h>
drivers/net/ethernet/jme.c +0 -1
@@ -27,7 +27,6 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/pci.h> -#include <linux/pci-aspm.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/ethtool.h>
drivers/net/ethernet/realtek/r8169_main.c +0 -1
@@ -28,7 +28,6 @@#include <linux/pm_runtime.h> #include <linux/firmware.h> #include <linux/prefetch.h> -#include <linux/pci-aspm.h> #include <linux/ipv6.h> #include <net/ip6_checksum.h>
drivers/net/wireless/ath/ath5k/pci.c +0 -1
@@ -18,7 +18,6 @@#include <linux/nl80211.h> #include <linux/pci.h> -#include <linux/pci-aspm.h> #include <linux/etherdevice.h> #include <linux/module.h> #include "../ath.h"
drivers/net/wireless/intel/iwlegacy/3945-mac.c +0 -1
@@ -33,7 +33,6 @@#include <linux/module.h> #include <linux/init.h> #include <linux/pci.h> -#include <linux/pci-aspm.h> #include <linux/slab.h> #include <linux/dma-mapping.h> #include <linux/delay.h>
drivers/net/wireless/intel/iwlegacy/4965-mac.c +0 -1
@@ -33,7 +33,6 @@#include <linux/module.h> #include <linux/init.h> #include <linux/pci.h> -#include <linux/pci-aspm.h> #include <linux/slab.h> #include <linux/dma-mapping.h> #include <linux/delay.h>
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +0 -1
@@ -67,7 +67,6 @@* *****************************************************************************/ #include <linux/pci.h> -#include <linux/pci-aspm.h> #include <linux/interrupt.h> #include <linux/debugfs.h> #include <linux/sched.h>
drivers/pci/pci-acpi.c +0 -1
@@ -14,7 +14,6 @@#include <linux/msi.h> #include <linux/pci_hotplug.h> #include <linux/module.h> -#include <linux/pci-aspm.h> #include <linux/pci-acpi.h> #include <linux/pm_runtime.h> #include <linux/pm_qos.h>
drivers/pci/pcie/aspm.c +0 -1
@@ -18,7 +18,6 @@#include <linux/slab.h> #include <linux/jiffies.h> #include <linux/delay.h> -#include <linux/pci-aspm.h> #include "../pci.h" #ifdef MODULE_PARAM_PREFIX
drivers/pci/quirks.c +0 -1
@@ -20,7 +20,6 @@#include <linux/delay.h> #include <linux/acpi.h> #include <linux/dmi.h> -#include <linux/pci-aspm.h> #include <linux/ioport.h> #include <linux/sched.h> #include <linux/ktime.h>
drivers/scsi/aacraid/linit.c +0 -1
@@ -40,7 +40,6 @@#include <linux/moduleparam.h> #include <linux/pci.h> #include <linux/aer.h> -#include <linux/pci-aspm.h> #include <linux/slab.h> #include <linux/mutex.h> #include <linux/spinlock.h>
drivers/scsi/hpsa.c +0 -1
@@ -21,7 +21,6 @@#include <linux/interrupt.h> #include <linux/types.h> #include <linux/pci.h> -#include <linux/pci-aspm.h> #include <linux/kernel.h> #include <linux/slab.h> #include <linux/delay.h>
drivers/scsi/mpt3sas/mpt3sas_scsih.c +0 -1
@@ -51,7 +51,6 @@#include <linux/workqueue.h> #include <linux/delay.h> #include <linux/pci.h> -#include <linux/pci-aspm.h> #include <linux/interrupt.h> #include <linux/aer.h> #include <linux/raid_class.h>
include/linux/pci-aspm.h deleted +0 -36
@@ -1,36 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* -* aspm.h -* -* PCI Express ASPM defines and function prototypes -* -* Copyright (C) 2007 Intel Corp. -* Zhang Yanmin ([email protected]) -* Shaohua Li ([email protected]) -* -* For more information, please consult the following manuals (look at -* http://www.pcisig.com/ for how to get them): -* -* PCI Express Specification -*/ - -#ifndef LINUX_ASPM_H -#define LINUX_ASPM_H - -#include <linux/pci.h> - -#define PCIE_LINK_STATE_L0S 1 -#define PCIE_LINK_STATE_L1 2 -#define PCIE_LINK_STATE_CLKPM 4 - -#ifdef CONFIG_PCIEASPM -int pci_disable_link_state (struct pci_dev *pdev,int state); -int pci_disable_link_state_locked (struct pci_dev *pdev,int state); -void pcie_no_aspm (void ); -#else -static inline int pci_disable_link_state (struct pci_dev *pdev,int state) -{return 0 ; } -static inline void pcie_no_aspm (void ) { } -#endif - -#endif /* LINUX_ASPM_H */
include/linux/pci.h +18 -0
@@ -6,12 +6,18 @@* Copyright 1994, Drew Eckhardt * Copyright 1997--1999 Martin Mares <[email protected]> * +* PCI Express ASPM defines and function prototypes +* Copyright (c) 2007 Intel Corp. +* Zhang Yanmin ([email protected]) +* Shaohua Li ([email protected]) +* * For more information, please consult the following manuals (look at * http://www.pcisig.com/ for how to get them): * * PCI BIOS Specification * PCI Local Bus Specification * PCI to PCI Bridge Specification +* PCI Express Specification * PCI System Design Guide */ #ifndef LINUX_PCI_H
@@ -1490,9 +1496,21 @@ extern bool pcie_ports_native;#define pcie_ports_native false#endif +#define PCIE_LINK_STATE_L0S 1 +#define PCIE_LINK_STATE_L1 2 +#define PCIE_LINK_STATE_CLKPM 4 +#ifdef CONFIG_PCIEASPM +int pci_disable_link_state (struct pci_dev *pdev,int state); +int pci_disable_link_state_locked (struct pci_dev *pdev,int state); +void pcie_no_aspm (void );bool pcie_aspm_support_enabled (void );#else +static inline int pci_disable_link_state (struct pci_dev *pdev,int state) +{return 0 ; } +static inline int pci_disable_link_state_locked (struct pci_dev *pdev,int state) +{return 0 ; } +static inline void pcie_no_aspm (void ) { }static inline bool pcie_aspm_support_enabled (void ) {return false; }#endif
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 54/71 PCI/ASPM: Add L1 PM substate support to pci_disable_link_state()
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiner Kallweit <[email protected]>
[ Upstream commit aff5d0552da4055da3faa27ee4252e48bb1f5821 ]
Add support for disabling states L1.1 and L1.2 to pci_disable_link_state(). Allow separate control of ASPM and PCI PM L1 substates.
Stable-dep-of: 3cb4f534bac0 ("Revert "PCI/ASPM: Disable only ASPM_STATE_L1 when driver, disables L1"")
--- drivers/pci/pcie/aspm.c | 11 ++++++++++- include/linux/pci.h | 10 +++++++--- 2 files changed, 17 insertions(+), 4 deletions(-)
drivers/pci/pcie/aspm.c +10 -1
@@ -1110,7 +1110,16 @@ static int __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem)if (state &PCIE_LINK_STATE_L0S ) link->aspm_disable |=ASPM_STATE_L0S ;if (state &PCIE_LINK_STATE_L1 ) - link->aspm_disable |=ASPM_STATE_L1 ; +/* L1 PM substates require L1 */ + link->aspm_disable |=ASPM_STATE_L1 |ASPM_STATE_L1SS ; +if (state &PCIE_LINK_STATE_L1_1 ) + link->aspm_disable |=ASPM_STATE_L1_1 ; +if (state &PCIE_LINK_STATE_L1_2 ) + link->aspm_disable |=ASPM_STATE_L1_2 ; +if (state &PCIE_LINK_STATE_L1_1_PCIPM ) + link->aspm_disable |=ASPM_STATE_L1_1_PCIPM ; +if (state &PCIE_LINK_STATE_L1_2_PCIPM ) + link->aspm_disable |=ASPM_STATE_L1_2_PCIPM ;pcie_config_aspm_link (link,policy_to_aspm_state (link));if (state &PCIE_LINK_STATE_CLKPM )
include/linux/pci.h +7 -3
@@ -1496,9 +1496,13 @@ extern bool pcie_ports_native;#define pcie_ports_native false#endif -#define PCIE_LINK_STATE_L0S 1 -#define PCIE_LINK_STATE_L1 2 -#define PCIE_LINK_STATE_CLKPM 4 +#define PCIE_LINK_STATE_L0S BIT(0) +#define PCIE_LINK_STATE_L1 BIT(1) +#define PCIE_LINK_STATE_CLKPM BIT(2) +#define PCIE_LINK_STATE_L1_1 BIT(3) +#define PCIE_LINK_STATE_L1_2 BIT(4) +#define PCIE_LINK_STATE_L1_1_PCIPM BIT(5) +#define PCIE_LINK_STATE_L1_2_PCIPM BIT(6)#ifdef CONFIG_PCIEASPM int pci_disable_link_state (struct pci_dev *pdev,int state);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 55/71 PCI/ASPM: Disable only ASPM_STATE_L1 when driver disables L1
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ajay Agarwal <[email protected]>
[ Upstream commit fb097dcd5a28c0a2325632405c76a66777a6bed9 ]
Previously pci_disable_link_state(PCIE_LINK_STATE_L1) disabled L1SS as well as L1. This is unnecessary since pcie_config_aspm_link() takes care that L1SS is not enabled if L1 is disabled.
Disable only ASPM_STATE_L1 when the caller disables L1. No functional changes intended.
This is consistent with aspm_attr_store_common(), which disables only L1, not L1SS, when L1 is disabled via the sysfs "l1_aspm" file.
Stable-dep-of: 3cb4f534bac0 ("Revert "PCI/ASPM: Disable only ASPM_STATE_L1 when driver, disables L1"")
--- drivers/pci/pcie/aspm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pci/pcie/aspm.c +1 -2
@@ -1110,8 +1110,7 @@ static int __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem)if (state &PCIE_LINK_STATE_L0S ) link->aspm_disable |=ASPM_STATE_L0S ;if (state &PCIE_LINK_STATE_L1 ) -/* L1 PM substates require L1 */ - link->aspm_disable |=ASPM_STATE_L1 |ASPM_STATE_L1SS ; + link->aspm_disable |=ASPM_STATE_L1 ;if (state &PCIE_LINK_STATE_L1_1 ) link->aspm_disable |=ASPM_STATE_L1_1 ;if (state &PCIE_LINK_STATE_L1_2 )
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 56/71 Revert "PCI/ASPM: Disable only ASPM_STATE_L1 when driver, disables L1"
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiner Kallweit <[email protected]>
[ Upstream commit 3cb4f534bac010258b2688395c2f13459a932be9 ]
This reverts commit fb097dcd5a28c0a2325632405c76a66777a6bed9.
After fb097dcd5a28 ("PCI/ASPM: Disable only ASPM_STATE_L1 when driver disables L1"), disabling L1 via pci_disable_link_state(PCIE_LINK_STATE_L1), then enabling one substate, e.g., L1.1, via sysfs actually enables *all* the substates.
For example, r8169 disables L1 because of hardware issues on a number of systems, which implicitly disables the L1.1 and L1.2 substates.
On some systems, L1 and L1.1 work fine, but L1.2 causes missed rx packets. Enabling L1.1 via the sysfs "aspm_l1_1" attribute unexpectedly enables L1.2 as well as L1.1.
After fb097dcd5a28, pci_disable_link_state(PCIE_LINK_STATE_L1) adds only ASPM_L1 (but not any of the L1.x substates) to the "aspm_disable" mask:
--- Before fb097dcd5a28
+++ After fb097dcd5a28
# r8169 disables L1:
pci_disable_link_state(PCIE_LINK_STATE_L1)
- disable |= ASPM_L1 | ASPM_L1_1 | ASPM_L1_2 | ... # disable L1, L1.x
+ disable |= ASPM_L1 # disable L1 only # write "1" to sysfs "aspm_l1_1" attribute:
l1_1_aspm
aspm_attr_store_common(state = ASPM_L1_1)
disable &= ~ASPM_L1_1 # enable L1.1
if (state & (ASPM_L1_1 | ...)) # if enabling any substate
disable &= ~ASPM_L1 # enable L1# final state: - disable = ASPM_L1_2 | ... # L1, L1.1 enabled; L1.2 disabled + disable = 0 # L1, L1.1, L1.2 all enabled
Enabling an L1.x substate removes the substate and L1 from the "aspm_disable" mask. After fb097dcd5a28, the substates were not added to the mask when disabling L1, so enabling one substate implicitly enables all of them.
Revert fb097dcd5a28 so enabling one substate doesn't enable the others.
--- drivers/pci/pcie/aspm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/pcie/aspm.c +2 -1
@@ -1110,7 +1110,8 @@ static int __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem)if (state &PCIE_LINK_STATE_L0S ) link->aspm_disable |=ASPM_STATE_L0S ;if (state &PCIE_LINK_STATE_L1 ) - link->aspm_disable |=ASPM_STATE_L1 ; +/* L1 PM substates require L1 */ + link->aspm_disable |=ASPM_STATE_L1 |ASPM_STATE_L1SS ;if (state &PCIE_LINK_STATE_L1_1 ) link->aspm_disable |=ASPM_STATE_L1_1 ;if (state &PCIE_LINK_STATE_L1_2 )
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 57/71 s390/mm: fix phys vs virt confusion in mark_kernel_pXd() functions family
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Gordeev <[email protected]>
[ Upstream commit 3784231b1e091857bd129fd9658a8b3cedbdcd58 ]
Due to historical reasons mark_kernel_pXd() functions misuse the notion of physical vs virtual addresses difference.
Stable-dep-of: 44d930452476 ("s390/cmma: fix detection of DAT pages")
--- arch/s390/mm/page-states.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/s390/mm/page-states.c +4 -4
@@ -118,7 +118,7 @@ static void mark_kernel_pmd(pud_t *pud, unsigned long addr, unsigned long end) next =pmd_addr_end (addr, end);if (pmd_none (*pmd) ||pmd_large (*pmd))continue ; - page =virt_to_page (pmd_val (*pmd)); + page =phys_to_page (pmd_val (*pmd));set_bit (PG_arch_1, &page->flags); }while (pmd++, addr = next, addr != end); }
@@ -136,7 +136,7 @@ static void mark_kernel_pud(p4d_t *p4d, unsigned long addr, unsigned long end)if (pud_none (*pud) ||pud_large (*pud))continue ;if (!pud_folded (*pud)) { - page =virt_to_page (pud_val (*pud)); + page =phys_to_page (pud_val (*pud));for (i =0 ; i <3 ; i++)set_bit (PG_arch_1, &page[i].flags); }
@@ -157,7 +157,7 @@ static void mark_kernel_p4d(pgd_t *pgd, unsigned long addr, unsigned long end)if (p4d_none (*p4d))continue ;if (!p4d_folded (*p4d)) { - page =virt_to_page (p4d_val (*p4d)); + page =phys_to_page (p4d_val (*p4d));for (i =0 ; i <3 ; i++)set_bit (PG_arch_1, &page[i].flags); }
@@ -179,7 +179,7 @@ static void mark_kernel_pgd(void)if (pgd_none (*pgd))continue ;if (!pgd_folded (*pgd)) { - page =virt_to_page (pgd_val (*pgd)); + page =phys_to_page (pgd_val (*pgd));for (i =0 ; i <3 ; i++)set_bit (PG_arch_1, &page[i].flags); }
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 58/71 s390/cmma: fix detection of DAT pages
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Carstens <[email protected]>
[ Upstream commit 44d93045247661acbd50b1629e62f415f2747577 ]
If the cmma no-dat feature is available the kernel page tables are walked to identify and mark all pages which are used for address translation (all region, segment, and page tables). In a subsequent loop all other pages are marked as "no-dat" pages with the ESSA instruction.
This information is visible to the hypervisor, so that the hypervisor can optimize purging of guest TLB entries. The initial loop however is
incorrect: only the first three of the four pages which belong to segment and region tables will be marked as being used for DAT. The last page is incorrectly marked as no-dat.
This can result in incorrect guest TLB flushes.
Fix this by simply marking all four pages.
--- arch/s390/mm/page-states.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/s390/mm/page-states.c +3 -3
@@ -137,7 +137,7 @@ static void mark_kernel_pud(p4d_t *p4d, unsigned long addr, unsigned long end)continue ;if (!pud_folded (*pud)) { page =phys_to_page (pud_val (*pud)); -for (i =0 ; i <3 ; i++) +for (i =0 ; i <4 ; i++)set_bit (PG_arch_1, &page[i].flags); }mark_kernel_pmd (pud, addr, next);
@@ -158,7 +158,7 @@ static void mark_kernel_p4d(pgd_t *pgd, unsigned long addr, unsigned long end)continue ;if (!p4d_folded (*p4d)) { page =phys_to_page (p4d_val (*p4d)); -for (i =0 ; i <3 ; i++) +for (i =0 ; i <4 ; i++)set_bit (PG_arch_1, &page[i].flags); }mark_kernel_pud (p4d, addr, next);
@@ -180,7 +180,7 @@ static void mark_kernel_pgd(void)continue ;if (!pgd_folded (*pgd)) { page =phys_to_page (pgd_val (*pgd)); -for (i =0 ; i <3 ; i++) +for (i =0 ; i <4 ; i++)set_bit (PG_arch_1, &page[i].flags); }mark_kernel_p4d (pgd, addr, next);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 59/71 mtd: cfi_cmdset_0001: Support the absence of protection registers
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jean-Philippe Brucker <[email protected]>
[ Upstream commit b359ed5184aebf9d987e54abc5dae7ac03ed29ae ]
The flash controller implemented by the Arm Base platform behaves like the Intel StrataFlash J3 device, but omits several features. In particular it doesn't implement a protection register, so "Number of Protection register fields" in the Primary Vendor-Specific Extended Query, is 0.
The Intel StrataFlash J3 datasheet only lists 1 as a valid value for NumProtectionFields. It describes the field as:
"Number of Protection register fields in JEDEC ID space. “00h,” indicates that 256 protection bytes are available"
While a value of 0 may arguably not be architecturally valid, the driver's current behavior is certainly wrong: if NumProtectionFields is 0, read_pri_intelext() adds a negative value to the unsigned extra_size, and ends up in an infinite loop.
Fix it by ignoring a NumProtectionFields of 0.
Stable-dep-of: 565fe150624e ("mtd: cfi_cmdset_0001: Byte swap OTP info")
--- drivers/mtd/chips/cfi_cmdset_0001.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/mtd/chips/cfi_cmdset_0001.c +8 -5
@@ -420,8 +420,9 @@ read_pri_intelext(struct map_info *map, __u16 adr) extra_size =0 ;/* Protection Register info */ - extra_size += (extp->NumProtectionFields -1 ) * -sizeof (struct cfi_intelext_otpinfo ); +if (extp->NumProtectionFields) + extra_size += (extp->NumProtectionFields -1 ) * +sizeof (struct cfi_intelext_otpinfo ); }if (extp->MinorVersion >='1' ) {
@@ -695,14 +696,16 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,*/ if (extp && extp->MajorVersion =='1' && extp->MinorVersion >='3' && extp->FeatureSupport & (1 <<9 )) { +int offs =0 ;struct cfi_private *newcfi;struct flchip *chip;struct flchip_shared *shared; -int offs, numregions, numparts, partshift, numvirtchips, i, j; +int numregions, numparts, partshift, numvirtchips, i, j;/* Protection Register info */ - offs = (extp->NumProtectionFields -1 ) * -sizeof (struct cfi_intelext_otpinfo ); +if (extp->NumProtectionFields) + offs = (extp->NumProtectionFields -1 ) * +sizeof (struct cfi_intelext_otpinfo );/* Burst Read info */ offs += extp->extra[offs+1 ]+2 ;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 60/71 mtd: cfi_cmdset_0001: Byte swap OTP info
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <[email protected]>
[ Upstream commit 565fe150624ee77dc63a735cc1b3bff5101f38a3 ]
Currently the offset into the device when looking for OTP bits can go outside of the address of the MTD NOR devices, and if that memory isn't readable, bad things happen on the IXP4xx (added prints that illustrate the problem before the crash):
cfi_intelext_otp_walk walk OTP on chip 0 start at reg_prot_offset 0x00000100 ixp4xx_copy_from copy from 0x00000100 to 0xc880dd78 cfi_intelext_otp_walk walk OTP on chip 0 start at reg_prot_offset 0x12000000 ixp4xx_copy_from copy from 0x12000000 to 0xc880dd78
8<--- cut here ---
Unable to handle kernel paging request at virtual address db000000
[db000000] *pgd=00000000
(...)
This happens in this case because the IXP4xx is big endian and the 32- and 16-bit fields in the struct cfi_intelext_otpinfo are not properly byteswapped. Compare to how the code in read_pri_intelext() byteswaps the fields in struct cfi_pri_intelext.
Adding a small byte swapping loop for the OTP in read_pri_intelext() and the crash goes away.
The problem went unnoticed for many years until I enabled CONFIG_MTD_OTP on the IXP4xx as well, triggering the bug.
--- drivers/mtd/chips/cfi_cmdset_0001.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)
drivers/mtd/chips/cfi_cmdset_0001.c +18 -2
@@ -420,9 +420,25 @@ read_pri_intelext(struct map_info *map, __u16 adr) extra_size =0 ;/* Protection Register info */ -if (extp->NumProtectionFields) +if (extp->NumProtectionFields) { +struct cfi_intelext_otpinfo *otp = + (struct cfi_intelext_otpinfo *)&extp->extra[0 ]; + extra_size += (extp->NumProtectionFields -1 ) * -sizeof (struct cfi_intelext_otpinfo ); +sizeof (struct cfi_intelext_otpinfo ); + +if (extp_size >=sizeof (*extp) + extra_size) { +int i; + +/* Do some byteswapping if necessary */ +for (i =0 ; i < extp->NumProtectionFields -1 ; i++) { + otp->ProtRegAddr =le32_to_cpu (otp->ProtRegAddr); + otp->FactGroups =le16_to_cpu (otp->FactGroups); + otp->UserGroups =le16_to_cpu (otp->UserGroups); + otp++; + } + } + } }if (extp->MinorVersion >='1' ) {
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 61/71 fbdev: stifb: Make the STI next font pointer a 32-bit signed offset
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Helge Deller <[email protected]>
[ Upstream commit 8a32aa17c1cd48df1ddaa78e45abcb8c7a2220d6 ]
The pointer to the next STI font is actually a signed 32-bit offset. With this change the 64-bit kernel will correctly subract the (signed 32-bit) offset instead of adding a (unsigned 32-bit) offset. It has no effect on 32-bit kernels.
This fixes the stifb driver with a 64-bit kernel on qemu.
--- drivers/video/fbdev/sticore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/sticore.h +1 -1
@@ -237,7 +237,7 @@ struct sti_rom_font {u8 height;u8 font_type;/* language type */ u8 bytes_per_char; -u32 next_font; +s32 next_font;/* note: signed int */ u8 underline_height;u8 underline_pos;u8 res008[2 ];
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 62/71 ima: annotate iint mutex to avoid lockdep false positive warnings
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Amir Goldstein <[email protected]>
[ Upstream commit e044374a8a0a99e46f4e6d6751d3042b6d9cc12e ]
It is not clear that IMA should be nested at all, but as long is it measures files both on overlayfs and on underlying fs, we need to annotate the iint mutex to avoid lockdep false positives related to IMA + overlayfs, same as overlayfs annotates the inode mutex.
--- security/integrity/iint.c | 48 ++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 11 deletions(-)
security/integrity/iint.c +37 -11
@@ -69,9 +69,32 @@ struct integrity_iint_cache *integrity_iint_find(struct inode *inode)return iint; } -static void iint_free (struct integrity_iint_cache *iint) +#define IMA_MAX_NESTING (FILESYSTEM_MAX_STACK_DEPTH+1) + +/* +* It is not clear that IMA should be nested at all, but as long is it measures +* files both on overlayfs and on underlying fs, we need to annotate the iint +* mutex to avoid lockdep false positives related to IMA + overlayfs. +* See ovl_lockdep_annotate_inode_mutex_key() for more details. +*/ +static inline void iint_lockdep_annotate (struct integrity_iint_cache *iint, +struct inode *inode) +{ +#ifdef CONFIG_LOCKDEP +static struct lock_class_key iint_mutex_key[IMA_MAX_NESTING ]; + +int depth = inode->i_sb->s_stack_depth; + +if (WARN_ON_ONCE (depth <0 || depth >=IMA_MAX_NESTING )) + depth =0 ; + +lockdep_set_class (&iint->mutex, &iint_mutex_key[depth]); +#endif +} + +static void iint_init_always (struct integrity_iint_cache *iint, +struct inode *inode) { -kfree (iint->ima_hash); iint->ima_hash =NULL ; iint->version =0 ; iint->flags =0UL ;
@@ -83,6 +106,14 @@ static void iint_free(struct integrity_iint_cache *iint) iint->ima_creds_status =INTEGRITY_UNKNOWN ; iint->evm_status =INTEGRITY_UNKNOWN ; iint->measured_pcrs =0 ; +mutex_init (&iint->mutex); +iint_lockdep_annotate (iint, inode); +} + +static void iint_free (struct integrity_iint_cache *iint) +{ +kfree (iint->ima_hash); +mutex_destroy (&iint->mutex);kmem_cache_free (iint_cache, iint); }
@@ -107,6 +138,8 @@ struct integrity_iint_cache *integrity_inode_get(struct inode *inode)if (!iint)return NULL ; +iint_init_always (iint, inode); +write_lock (&integrity_iint_lock); p = &integrity_iint_tree.rb_node;
@@ -156,25 +189,18 @@ void integrity_inode_free(struct inode *inode)iint_free (iint); } -static void init_once (void *foo) +static void iint_init_once (void *foo) {struct integrity_iint_cache *iint = foo;memset (iint,0 ,sizeof (*iint)); - iint->ima_file_status =INTEGRITY_UNKNOWN ; - iint->ima_mmap_status =INTEGRITY_UNKNOWN ; - iint->ima_bprm_status =INTEGRITY_UNKNOWN ; - iint->ima_read_status =INTEGRITY_UNKNOWN ; - iint->ima_creds_status =INTEGRITY_UNKNOWN ; - iint->evm_status =INTEGRITY_UNKNOWN ; -mutex_init (&iint->mutex); }static int __init integrity_iintcache_init (void ) { iint_cache =kmem_cache_create ("iint_cache" ,sizeof (struct integrity_iint_cache ), -0 ,SLAB_PANIC , init_once); +0 ,SLAB_PANIC , iint_init_once);return 0 ; }security_initcall (integrity_iintcache_init);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 63/71 ovl: skip overlayfs superblocks at global sync
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Khlebnikov <[email protected]>
[ Upstream commit 32b1924b210a70dcacdf65abd687c5ef86a67541 ]
Stacked filesystems like overlayfs has no own writeback, but they have to forward syncfs() requests to backend for keeping data integrity.
During global sync() each overlayfs instance calls method ->sync_fs() for backend although it itself is in global list of superblocks too. As a result one syscall sync() could write one superblock several times and send multiple disk barriers.
This patch adds flag SB_I_SKIP_SYNC into sb->sb_iflags to avoid that.
Stable-dep-of: b836c4d29f27 ("ima: detect changes to the backing overlay file")
--- fs/overlayfs/super.c | 5 +++-- fs/sync.c | 3 ++- include/linux/fs.h | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-)
fs/overlayfs/super.c +3 -2
@@ -268,8 +268,8 @@ static int ovl_sync_fs(struct super_block *sb, int wait)return 0 ;/* -* If this is a sync(2) call or an emergency sync, all the super blocks -* will be iterated, including upper_sb, so no need to do anything. +* Not called for sync(2) call or an emergency sync (SB_I_SKIP_SYNC). +* All the super blocks will be iterated, including upper_sb. * * If this is a syncfs(2) call, then we do need to call * sync_filesystem() on upper_sb, but enough if we do it when being
@@ -1664,6 +1664,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent) sb->s_xattr = ovl_xattr_handlers; sb->s_fs_info = ofs; sb->s_flags |=SB_POSIXACL ; + sb->s_iflags |=SB_I_SKIP_SYNC ; err = -ENOMEM ; root_dentry =d_make_root (ovl_new_inode (sb,S_IFDIR ,0 ));
fs/sync.c +2 -1
@@ -76,7 +76,8 @@ static void sync_inodes_one_sb(struct super_block *sb, void *arg)static void sync_fs_one_sb (struct super_block *sb,void *arg) { -if (!sb_rdonly (sb) && sb->s_op->sync_fs) +if (!sb_rdonly (sb) && !(sb->s_iflags &SB_I_SKIP_SYNC ) && + sb->s_op->sync_fs) sb->s_op->sync_fs (sb, *(int *)arg); }
include/linux/fs.h +2 -0
@@ -1351,6 +1351,8 @@ extern int send_sigurg(struct fown_struct *fown);#define SB_I_IMA_UNVERIFIABLE_SIGNATURE 0x00000020#define SB_I_UNTRUSTED_MOUNTER 0x00000040 +#define SB_I_SKIP_SYNC 0x00000100/* Skip superblock at global sync */ +/* Possible states of 'frozen' field */ enum {SB_UNFROZEN =0 ,/* FS is unfrozen */
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 64/71 ima: detect changes to the backing overlay file
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mimi Zohar <[email protected]>
[ Upstream commit b836c4d29f2744200b2af41e14bf50758dddc818 ]
Commit 18b44bc5a672 ("ovl: Always reevaluate the file signature for IMA") forced signature re-evaulation on every file access.
Instead of always re-evaluating the file's integrity, detect a change to the backing file, by comparing the cached file metadata with the backing file's metadata. Verifying just the i_version has not changed is insufficient. In addition save and compare the i_ino and s_dev as well.
--- security/integrity/ima/ima_api.c | 5 +++++ security/integrity/ima/ima_main.c | 16 +++++++++++++++- security/integrity/integrity.h | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-)
security/integrity/ima/ima_api.c +5 -0
@@ -201,6 +201,7 @@ int ima_collect_measurement(struct integrity_iint_cache *iint, {const char *audit_cause ="failed" ;struct inode *inode =file_inode (file); +struct inode *real_inode =d_real_inode (file_dentry (file));const char *filename = file->f_path.dentry->d_name.name;int result =0 ;int length;
@@ -243,6 +244,10 @@ int ima_collect_measurement(struct integrity_iint_cache *iint, iint->ima_hash = tmpbuf;memcpy (iint->ima_hash, &hash, length); iint->version = i_version; +if (real_inode != inode) { + iint->real_ino = real_inode->i_ino; + iint->real_dev = real_inode->i_sb->s_dev; + }/* Possibly temporary failure due to type of read (eg. O_DIRECT) */ if (!result)
security/integrity/ima/ima_main.c +15 -1
@@ -29,6 +29,7 @@#include <linux/ima.h> #include <linux/iversion.h> #include <linux/fs.h> +#include <linux/iversion.h> #include "ima.h"
@@ -170,7 +171,7 @@ static int process_measurement(struct file *file, const struct cred *cred, u32 secid, char *buf, loff_t size, int mask, enum ima_hooks func) { - struct inode *inode = file_inode(file); + struct inode *backing_inode, *inode = file_inode(file);struct integrity_iint_cache *iint =NULL ;struct ima_template_desc *template_desc;char *pathbuf =NULL ;
@@ -242,6 +243,19 @@ static int process_measurement(struct file *file, const struct cred *cred, iint->measured_pcrs =0 ; } +/* Detect and re-evaluate changes made to the backing file. */ + backing_inode =d_real_inode (file_dentry (file)); +if (backing_inode != inode && + (action &IMA_DO_MASK ) && (iint->flags &IMA_DONE_MASK )) { +if (!IS_I_VERSION (backing_inode) || + backing_inode->i_sb->s_dev != iint->real_dev || + backing_inode->i_ino != iint->real_ino || + !inode_eq_iversion (backing_inode, iint->version)) { + iint->flags &= ~IMA_DONE_MASK ; + iint->measured_pcrs =0 ; + } + } +/* Determine if already appraised/measured based on bitmask * (IMA_MEASURE, IMA_MEASURED, IMA_XXXX_APPRAISE, IMA_XXXX_APPRAISED, * IMA_AUDIT, IMA_AUDITED)
security/integrity/integrity.h +2 -0
@@ -122,6 +122,8 @@ struct integrity_iint_cache {unsigned long flags;unsigned long measured_pcrs;unsigned long atomic_flags; +unsigned long real_ino; +dev_t real_dev; enum integrity_status ima_file_status:4; enum integrity_status ima_mmap_status:4; enum integrity_status ima_bprm_status:4;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 65/71 cpufreq: imx6q: dont warn for disabling a non-existing frequency
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Niedermaier <[email protected]>
[ Upstream commit 11a3b0ac33d95aa84be426e801f800997262a225 ]
It is confusing if a warning is given for disabling a non-existent frequency of the operating performance points (OPP). In this case the function dev_pm_opp_disable() returns -ENODEV. Check the return value and avoid the output of a warning in this case. Avoid code duplication by using a separate function.
Stable-dep-of: 2e4e0984c7d6 ("cpufreq: imx6q: Don't disable 792 Mhz OPP unnecessarily")
--- drivers/cpufreq/imx6q-cpufreq.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-)
drivers/cpufreq/imx6q-cpufreq.c +16 -14
@@ -240,6 +240,14 @@ static struct cpufreq_driver imx6q_cpufreq_driver = { .suspend = cpufreq_generic_suspend, }; +static void imx6x_disable_freq_in_opp (struct device *dev,unsigned long freq) +{ +int ret =dev_pm_opp_disable (dev, freq); + +if (ret <0 && ret != -ENODEV ) +dev_warn (dev,"failed to disable %ldMHz OPP\n" , freq /1000000 ); +} +#define OCOTP_CFG3 0x440#define OCOTP_CFG3_SPEED_SHIFT 16#define OCOTP_CFG3_SPEED_1P2GHZ 0x3
@@ -275,17 +283,15 @@ static void imx6q_opp_check_speed_grading(struct device *dev) val &=0x3 ;if (val <OCOTP_CFG3_SPEED_996MHZ ) -if (dev_pm_opp_disable (dev,996000000 )) -dev_warn (dev,"failed to disable 996MHz OPP\n" ); +imx6x_disable_freq_in_opp (dev,996000000 );if (of_machine_is_compatible ("fsl,imx6q" ) ||of_machine_is_compatible ("fsl,imx6qp" )) {if (val !=OCOTP_CFG3_SPEED_852MHZ ) -if (dev_pm_opp_disable (dev,852000000 )) -dev_warn (dev,"failed to disable 852MHz OPP\n" ); +imx6x_disable_freq_in_opp (dev,852000000 ); +if (val !=OCOTP_CFG3_SPEED_1P2GHZ ) -if (dev_pm_opp_disable (dev,1200000000 )) -dev_warn (dev,"failed to disable 1.2GHz OPP\n" ); +imx6x_disable_freq_in_opp (dev,1200000000 ); }iounmap (base); put_node:
@@ -338,20 +344,16 @@ static int imx6ul_opp_check_speed_grading(struct device *dev) val >>=OCOTP_CFG3_SPEED_SHIFT ; val &=0x3 ; -if (of_machine_is_compatible ("fsl,imx6ul" )) { +if (of_machine_is_compatible ("fsl,imx6ul" ))if (val !=OCOTP_CFG3_6UL_SPEED_696MHZ ) -if (dev_pm_opp_disable (dev,696000000 )) -dev_warn (dev,"failed to disable 696MHz OPP\n" ); - } +imx6x_disable_freq_in_opp (dev,696000000 );if (of_machine_is_compatible ("fsl,imx6ull" )) {if (val !=OCOTP_CFG3_6ULL_SPEED_792MHZ ) -if (dev_pm_opp_disable (dev,792000000 )) -dev_warn (dev,"failed to disable 792MHz OPP\n" ); +imx6x_disable_freq_in_opp (dev,792000000 );if (val !=OCOTP_CFG3_6ULL_SPEED_900MHZ ) -if (dev_pm_opp_disable (dev,900000000 )) -dev_warn (dev,"failed to disable 900MHz OPP\n" ); +imx6x_disable_freq_in_opp (dev,900000000 ); }return ret;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 66/71 cpufreq: imx6q: Dont disable 792 Mhz OPP unnecessarily
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Niedermaier <[email protected]>
[ Upstream commit 2e4e0984c7d696cc74cf2fd7e7f62997f0e9ebe6 ]
For a 900MHz i.MX6ULL CPU the 792MHz OPP is disabled. There is no convincing reason to disable this OPP. If a CPU can run at 900MHz, it should also be able to cope with 792MHz. Looking at the voltage level of 792MHz in [1] (page 24, table 10. "Operating Ranges") the current defined OPP is above the minimum. So the voltage level shouldn't be a problem. However in [2] (page 24, table 10. "Operating Ranges"), it is not mentioned that 792MHz OPP isn't allowed. Change it to only disable 792MHz OPP for i.MX6ULL types below 792 MHz.
[1] https://www.nxp.com/docs/en/data-sheet/IMX6ULLIEC.pdf
[2] https://www.nxp.com/docs/en/data-sheet/IMX6ULLCEC.pdf
--- drivers/cpufreq/imx6q-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/imx6q-cpufreq.c +1 -1
@@ -349,7 +349,7 @@ static int imx6ul_opp_check_speed_grading(struct device *dev)imx6x_disable_freq_in_opp (dev,696000000 );if (of_machine_is_compatible ("fsl,imx6ull" )) { -if (val !=OCOTP_CFG3_6ULL_SPEED_792MHZ ) +if (val <OCOTP_CFG3_6ULL_SPEED_792MHZ )imx6x_disable_freq_in_opp (dev,792000000 );if (val !=OCOTP_CFG3_6ULL_SPEED_900MHZ )
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 67/71 mmc: cqhci: Increase recovery halt timeout
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <[email protected]>
[ Upstream commit b578d5d18e929aa7c007a98cce32657145dde219 ]
Failing to halt complicates the recovery. Additionally, unless the card or controller are stuck, which is expected to be very rare, then the halt should succeed, so it is better to wait. Set a large timeout.
--- drivers/mmc/host/cqhci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mmc/host/cqhci.c +3 -3
@@ -926,10 +926,10 @@ static bool cqhci_halt(struct mmc_host *mmc, unsigned int timeout)/* * After halting we expect to be able to use the command line. We interpret the * failure to halt to mean the data lines might still be in use (and the upper -* layers will need to send a STOP command), so we set the timeout based on a -* generous command timeout. +* layers will need to send a STOP command), however failing to halt complicates +* the recovery, so set a timeout that would reasonably allow I/O to complete. */ -#define CQHCI_START_HALT_TIMEOUT 5 +#define CQHCI_START_HALT_TIMEOUT 500static void cqhci_recovery_start (struct mmc_host *mmc) {
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 68/71 mmc: cqhci: Warn of halt or task clear failure
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <[email protected]>
[ Upstream commit 35597bdb04ec27ef3b1cea007dc69f8ff5df75a5 ]
A correctly operating controller should successfully halt and clear tasks. Failure may result in errors elsewhere, so promote messages from debug to warnings.
--- drivers/mmc/host/cqhci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mmc/host/cqhci.c +3 -3
@@ -884,8 +884,8 @@ static bool cqhci_clear_all_tasks(struct mmc_host *mmc, unsigned int timeout) ret =cqhci_tasks_cleared (cq_host);if (!ret) -pr_debug ("%s: cqhci: Failed to clear tasks\n" , -mmc_hostname (mmc)); +pr_warn ("%s: cqhci: Failed to clear tasks\n" , +mmc_hostname (mmc));return ret; }
@@ -918,7 +918,7 @@ static bool cqhci_halt(struct mmc_host *mmc, unsigned int timeout) ret =cqhci_halted (cq_host);if (!ret) -pr_debug ("%s: cqhci: Failed to halt\n" ,mmc_hostname (mmc)); +pr_warn ("%s: cqhci: Failed to halt\n" ,mmc_hostname (mmc));return ret; }
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 69/71 mmc: cqhci: Fix task clearing in CQE error recovery
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <[email protected]>
[ Upstream commit 1de1b77982e1a1df9707cb11f9b1789e6b8919d4 ]
If a task completion notification (TCN) is received when there is no outstanding task, the cqhci driver issues a "spurious TCN" warning. This was observed to happen right after CQE error recovery.
When an error interrupt is received the driver runs recovery logic. It halts the controller, clears all pending tasks, and then re-enables it. On some platforms, like Intel Jasper Lake, a stale task completion event was observed, regardless of the CQHCI_CLEAR_ALL_TASKS bit being set.
This results in either:
a) Spurious TC completion event for an empty slot.
b) Corrupted data being passed up the stack, as a result of premature completion for a newly added task.
Rather than add a quirk for affected controllers, ensure tasks are cleared by toggling CQHCI_ENABLE, which would happen anyway if cqhci_clear_all_tasks() timed out. This is simpler and should be safe and effective for all controllers.
--- drivers/mmc/host/cqhci.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
drivers/mmc/host/cqhci.c +16 -16
@@ -1017,28 +1017,28 @@ static void cqhci_recovery_finish(struct mmc_host *mmc) ok =cqhci_halt (mmc,CQHCI_FINISH_HALT_TIMEOUT ); -if (!cqhci_clear_all_tasks (mmc,CQHCI_CLEAR_TIMEOUT )) - ok = false; -/* * The specification contradicts itself, by saying that tasks cannot be * cleared if CQHCI does not halt, but if CQHCI does not halt, it should * be disabled/re-enabled, but not to disable before clearing tasks. * Have a go anyway. */ -if (!ok) { -pr_debug ("%s: cqhci: disable / re-enable\n" ,mmc_hostname (mmc)); - cqcfg =cqhci_readl (cq_host,CQHCI_CFG ); - cqcfg &= ~CQHCI_ENABLE ; -cqhci_writel (cq_host, cqcfg,CQHCI_CFG ); - cqcfg |=CQHCI_ENABLE ; -cqhci_writel (cq_host, cqcfg,CQHCI_CFG ); -/* Be sure that there are no tasks */ - ok =cqhci_halt (mmc,CQHCI_FINISH_HALT_TIMEOUT ); -if (!cqhci_clear_all_tasks (mmc,CQHCI_CLEAR_TIMEOUT )) - ok = false; -WARN_ON (!ok); - } +if (!cqhci_clear_all_tasks (mmc,CQHCI_CLEAR_TIMEOUT )) + ok = false; + +/* Disable to make sure tasks really are cleared */ + cqcfg =cqhci_readl (cq_host,CQHCI_CFG ); + cqcfg &= ~CQHCI_ENABLE ; +cqhci_writel (cq_host, cqcfg,CQHCI_CFG ); + + cqcfg =cqhci_readl (cq_host,CQHCI_CFG ); + cqcfg |=CQHCI_ENABLE ; +cqhci_writel (cq_host, cqcfg,CQHCI_CFG ); + +cqhci_halt (mmc,CQHCI_FINISH_HALT_TIMEOUT ); + +if (!ok) +cqhci_clear_all_tasks (mmc,CQHCI_CLEAR_TIMEOUT );cqhci_recover_mrqs (cq_host);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 70/71 mmc: core: convert comma to semicolon
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zheng Yongjun <[email protected]>
[ Upstream commit 6b1dc6229aecbcb45e8901576684a8c09e25ad7b ]
Replace a comma between expression statements by a semicolon.
Stable-dep-of: 8155d1fa3a74 ("mmc: block: Retry commands in CQE error recovery")
--- drivers/mmc/core/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/mmc/core/core.c +4 -4
@@ -567,10 +567,10 @@ int mmc_cqe_recovery(struct mmc_host *host) host->cqe_ops->cqe_recovery_start (host);memset (&cmd,0 ,sizeof (cmd)); - cmd.opcode =MMC_STOP_TRANSMISSION , - cmd.flags =MMC_RSP_R1B |MMC_CMD_AC , + cmd.opcode =MMC_STOP_TRANSMISSION ; + cmd.flags =MMC_RSP_R1B |MMC_CMD_AC ; cmd.flags &= ~MMC_RSP_CRC ;/* Ignore CRC */ - cmd.busy_timeout =MMC_CQE_RECOVERY_TIMEOUT , + cmd.busy_timeout =MMC_CQE_RECOVERY_TIMEOUT ;mmc_wait_for_cmd (host, &cmd,0 );memset (&cmd,0 ,sizeof (cmd));
@@ -578,7 +578,7 @@ int mmc_cqe_recovery(struct mmc_host *host) cmd.arg =1 ;/* Discard entire queue */ cmd.flags =MMC_RSP_R1B |MMC_CMD_AC ; cmd.flags &= ~MMC_RSP_CRC ;/* Ignore CRC */ - cmd.busy_timeout =MMC_CQE_RECOVERY_TIMEOUT , + cmd.busy_timeout =MMC_CQE_RECOVERY_TIMEOUT ; err =mmc_wait_for_cmd (host, &cmd,0 ); host->cqe_ops->cqe_recovery_finish (host);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 71/71 mmc: block: Retry commands in CQE error recovery
In reply to Greg Kroah-Hartman4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <[email protected]>
[ Upstream commit 8155d1fa3a747baad5caff5f8303321d68ddd48c ]
It is important that MMC_CMDQ_TASK_MGMT command to discard the queue is successful because otherwise a subsequent reset might fail to flush the cache first. Retry it and the previous STOP command.
--- drivers/mmc/core/core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/mmc/core/core.c +5 -2
@@ -571,7 +571,7 @@ int mmc_cqe_recovery(struct mmc_host *host) cmd.flags =MMC_RSP_R1B |MMC_CMD_AC ; cmd.flags &= ~MMC_RSP_CRC ;/* Ignore CRC */ cmd.busy_timeout =MMC_CQE_RECOVERY_TIMEOUT ; -mmc_wait_for_cmd (host, &cmd,0 ); +mmc_wait_for_cmd (host, &cmd,MMC_CMD_RETRIES );memset (&cmd,0 ,sizeof (cmd)); cmd.opcode =MMC_CMDQ_TASK_MGMT ;
@@ -579,10 +579,13 @@ int mmc_cqe_recovery(struct mmc_host *host) cmd.flags =MMC_RSP_R1B |MMC_CMD_AC ; cmd.flags &= ~MMC_RSP_CRC ;/* Ignore CRC */ cmd.busy_timeout =MMC_CQE_RECOVERY_TIMEOUT ; - err =mmc_wait_for_cmd (host, &cmd,0 ); + err =mmc_wait_for_cmd (host, &cmd,MMC_CMD_RETRIES ); host->cqe_ops->cqe_recovery_finish (host); +if (err) + err =mmc_wait_for_cmd (host, &cmd,MMC_CMD_RETRIES ); +mmc_retune_release (host);return err;
Signature · 1 line
2.42.0
Hi Greg,
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.301 release. There are 71 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 Thu, 07 Dec 2023 03:14:57 +0000. Anything received after that time might be too late.
I see build failure in tools/perf/
util/intel-pt.c: In function ‘intel_pt_sample_flags’:util/intel-pt.c:906:38: error: ‘const struct intel_pt_state’ has no member named ‘from_nr’; did you mean ‘from_ip’?
906 | else if (ptq->state->from_nr && !ptq->state->to_nr)
| ^~~~~~~
| from_iputil/intel-pt.c:906:60: error: ‘const struct intel_pt_state’ has no member named ‘to_nr’
906 | else if (ptq->state->from_nr && !ptq->state->to_nr)
| ^~util/intel-pt.c:909:38: error: ‘PERF_IP_FLAG_VMEXIT’ undeclared (first use in this function); did you mean ‘PERF_IP_FLAG_IN_TX’?
909 | PERF_IP_FLAG_VMEXIT;
| ^~~~~~~~~~~~~~~~~~~
| PERF_IP_FLAG_IN_TXQuoted 10 lines
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.301-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
greg k-h
Quoted 9 lines
-----------
Adrian Hunter <[email protected]>
perf intel-pt: Fix async branch flagsAdrian Hunter <[email protected]>
perf intel-pt: Adjust sample flags for VM-Exit
This is caused due to these two commits. Let us drop them.
I reverted those two and did a make, then I see another build error:
CC util/genelf.o
In file included from util/jitdump.c:27:util/genelf.h:5:10: fatal error: linux/math.h: No such file or directory
5 | #include <linux/math.h>
| ^~~~~~~~~~~~~~compilation terminated.
make[4]: *** [~/linux-stable-rc/tools/build/Makefile.build:97: util/jitdump.o] Error 1 make[4]: *** Waiting for unfinished jobs....
In file included from util/genelf.c:27:util/genelf.h:5:10: fatal error: linux/math.h: No such file or directory
5 | #include <linux/math.h>
| ^~~~~~~~~~~~~~compilation terminated.
Quoted 2 lines
Adrian Hunter <[email protected]>
perf inject: FixGEN_ELF_TEXT_OFFSETfor jit
^^^ this commit is causing this.
Earlier we have seen similar errors on 5.15.136, some notes on what is causing this:
https://lore.kernel.org/stable/[email protected]/
I think we should drop these three perf/ commits.
Thanks,
Harshit
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 4.19.301 release. There are 71 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-4.19.y
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.301 release. There are 71 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 Thu, 07 Dec 2023 03:14:57 +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/v4.x/stable-review/patch-4.19.301-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v4.19:
10 builds: 10 pass, 0 fail
20 boots: 20 pass, 0 fail
37 tests: 37 pass, 0 failLinux version: 4.19.301-rc1-g82300ecbea43
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra30-cardhu-a04Jon
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.301 release. There are 71 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 Thu, 07 Dec 2023 03:14:57 +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/v4.x/stable-review/patch-4.19.301-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 4.19.301-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-4.19.y
* git commit: 82300ecbea435bee3c53b97f701e530cac79b81e
* git describe: v4.19.300-72-g82300ecbea43
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.19.y/build/v4.19.300-72-g82300ecbea43
## Test Regressions (compared to v4.19.300)
## Metric Regressions (compared to v4.19.300)
## Test Fixes (compared to v4.19.300)
## Metric Fixes (compared to v4.19.300)
## Test result summary
total: 54948, pass: 46304, fail: 1597, skip: 7016, xfail: 31
## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 111 total, 105 passed, 6 failed
* arm64: 37 total, 32 passed, 5 failed
* i386: 21 total, 18 passed, 3 failed
* mips: 20 total, 20 passed, 0 failed
* parisc: 3 total, 0 passed, 3 failed
* powerpc: 24 total, 24 passed, 0 failed
* s390: 6 total, 6 passed, 0 failed
* sh: 10 total, 10 passed, 0 failed
* sparc: 6 total, 6 passed, 0 failed
* x86_64: 31 total, 26 passed, 5 failed
## Test suites summary
* boot
* kselftest-android
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-filesystems-epoll
* kselftest-firmware
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-net-forwarding
* kselftest-net-mptcp
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* 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-user
* kselftest-vm
* kselftest-zram
* kunit
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-crypto
* ltp-cve
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* rcutorture
--
Linaro LKFT
https://lkft.linaro.org
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.301 release. There are 71 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 Thu, 07 Dec 2023 03:14:57 +0000. Anything received after that time might be too late.
Build results:
total: 147 pass: 147 fail: 0 Qemu test results: total: 439 pass: 439 fail: 0
Guenter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.301 release. There are 71 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 Thu, 07 Dec 2023 03:14:57 +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/v4.x/stable-review/patch-4.19.301-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah