5.4.218-rc1 review
Subsystems (2)
Greg Kroah-Hartman
maintainercover 5.4.218-rc1 review
This is the start of the stable review cycle for the 5.4.218 release. There are 38 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 Sat, 15 Oct 2022 17:51:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.218-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.4.218-rc1
Cameron Gutman <[email protected]>
Input: xpad - fix wireless 360 controller breaking after suspend
Pavel Rojtberg <[email protected]>
Input: xpad - add supported devices as contributed on github
Johannes Berg <[email protected]>
wifi: cfg80211: update hidden BSSes to avoid WARN_ON
Johannes Berg <[email protected]>
wifi: mac80211_hwsim: avoid mac80211 warning on bad rate
Johannes Berg <[email protected]>
wifi: cfg80211: avoid nontransmitted BSS list corruption
Johannes Berg <[email protected]>
wifi: cfg80211: fix BSS refcounting bugs
Johannes Berg <[email protected]>
wifi: cfg80211: ensure length byte is present before access
Johannes Berg <[email protected]>
wifi: cfg80211/mac80211: reject bad MBSSID elements
Johannes Berg <[email protected]>
wifi: cfg80211: fix u8 overflow in cfg80211_update_notlisted_nontrans()
Jason A. Donenfeld <[email protected]>
random: use expired timer rather than wq for mixing fast pool
Jason A. Donenfeld <[email protected]>
random: avoid reading two cache lines on irq randomness
Jason A. Donenfeld <[email protected]>
random: restore O_NONBLOCK support
Frank Wunderlich <[email protected]>
USB: serial: qcserial: add new usb-id for Dell branded EM7455
Linus Torvalds <[email protected]>
scsi: stex: Properly zero out the passthrough command structure
Orlando Chamberlain <[email protected]>
efi: Correct Macmini DMI match in uefi cert quirk
Takashi Iwai <[email protected]>
ALSA: hda: Fix position reporting on Poulsbo
Jason A. Donenfeld <[email protected]>
random: clamp credited irq bits to maximum mixed
Hu Weiwen <[email protected]>
ceph: don't truncate file in atomic_open
Ryusuke Konishi <[email protected]>
nilfs2: replace WARN_ONs by nilfs_error for checkpoint acquisition failure
Ryusuke Konishi <[email protected]>
nilfs2: fix leak of nilfs_root in case of writer thread creation failure
Ryusuke Konishi <[email protected]>
nilfs2: fix NULL pointer dereference at nilfs_bmap_lookup_at_level()
Krzysztof Kozlowski <[email protected]>
rpmsg: qcom: glink: replace strncpy() with strscpy_pad()
Brian Norris <[email protected]>
mmc: core: Terminate infinite loop in SD-UHS voltage switch
ChanWoo Lee <[email protected]>
mmc: core: Replace with already defined values for readability
Johan Hovold <[email protected]>
USB: serial: ftdi_sio: fix 300 bps rate for SIO
Tadeusz Struk <[email protected]>
usb: mon: make mmapped memory read only
David Gow <[email protected]>
arch: um: Mark the stack non-executable to fix a binutils warning
Lukas Straub <[email protected]>
um: Cleanup compiler warning in arch/x86/um/tls_32.c
Lukas Straub <[email protected]>
um: Cleanup syscall_handler_t cast in syscalls_32.h
Haimin Zhang <[email protected]>
net/ieee802154: fix uninit value bug in dgram_sendmsg
Letu Ren <[email protected]>
scsi: qedf: Fix a UAF bug in __qedf_probe()
Sergei Antonov <[email protected]>
ARM: dts: fix Moxa SDIO 'compatible', remove 'sdhci' misnomer
Swati Agarwal <[email protected]>
dmaengine: xilinx_dma: Report error in case of dma_set_mask_and_coherent API failure
Swati Agarwal <[email protected]>
dmaengine: xilinx_dma: cleanup for fetching xlnx,num-fstores property
Cristian Marussi <[email protected]>
firmware: arm_scmi: Add SCMI PM driver remove routine
Dongliang Mu <[email protected]>
fs: fix UAF/GPF bug in nilfs_mdt_destroy
Alexey Dobriyan <[email protected]>
perf tools: Fixup get_current_dir_name() compilation
Steven Price <[email protected]>
mm: pagewalk: Fix race between unmap and page walker
-------------
Diffstat:
.../devicetree/bindings/dma/moxa,moxart-dma.txt | 4 +- Makefile | 4 +- arch/arm/boot/dts/moxart-uc7112lx.dts | 2 +- arch/arm/boot/dts/moxart.dtsi | 4 +- arch/um/Makefile | 8 +++ arch/x86/um/shared/sysdep/syscalls_32.h | 5 +- arch/x86/um/tls_32.c | 6 -- arch/x86/um/vdso/Makefile | 2 +- drivers/char/mem.c | 4 +- drivers/char/random.c | 25 ++++--- drivers/dma/xilinx/xilinx_dma.c | 8 ++- drivers/firmware/arm_scmi/scmi_pm_domain.c | 20 ++++++ drivers/input/joystick/xpad.c | 20 +++++- drivers/mmc/core/sd.c | 3 +- drivers/net/wireless/mac80211_hwsim.c | 2 + drivers/rpmsg/qcom_glink_native.c | 2 +- drivers/rpmsg/qcom_smd.c | 4 +- drivers/scsi/qedf/qedf_main.c | 5 -- drivers/scsi/stex.c | 17 ++--- drivers/usb/mon/mon_bin.c | 5 ++ drivers/usb/serial/ftdi_sio.c | 3 +- drivers/usb/serial/qcserial.c | 1 + fs/ceph/file.c | 10 ++- fs/inode.c | 7 +- fs/nilfs2/inode.c | 2 + fs/nilfs2/segment.c | 21 +++--- include/net/ieee802154_netdev.h | 37 +++++++++++ include/scsi/scsi_cmnd.h | 2 +- mm/pagewalk.c | 13 ++-- net/ieee802154/socket.c | 42 ++++++------ net/mac80211/util.c | 2 + net/wireless/scan.c | 77 ++++++++++++++-------- security/integrity/platform_certs/load_uefi.c | 2 +- sound/pci/hda/hda_intel.c | 3 +- tools/perf/util/get_current_dir_name.c | 3 +- 35 files changed, 256 insertions(+), 119 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/38 mm: pagewalk: Fix race between unmap and page walker
From: Steven Price <[email protected]>
commit 8782fb61cc848364e1e1599d76d3c9dd58a1cc06 upstream.
The mmap lock protects the page walker from changes to the page tables during the walk. However a read lock is insufficient to protect those areas which don't have a VMA as munmap() detaches the VMAs before downgrading to a read lock and actually tearing down PTEs/page tables.
For users of walk_page_range() the solution is to simply call pte_hole() immediately without checking the actual page tables when a VMA is not present. We now never call __walk_page_range() without a valid vma.
For walk_page_range_novma() the locking requirements are tightened to require the mmap write lock to be taken, and then walking the pgd directly with 'no_vma' set.
This in turn means that all page walkers either have a valid vma, or it's that special 'novma' case for page table debugging. As a result, all the odd '(!walk->vma && !walk->no_vma)' tests can be removed.
[manually backported. backport note: walk_page_range_novma() does not exist in 5.4, so I'm omitting it from the backport]
--- mm/pagewalk.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
mm/pagewalk.c +8 -5
@@ -38,7 +38,7 @@ static int walk_pmd_range(pud_t *pud, un do { again: next = pmd_addr_end(addr, end); - if (pmd_none(*pmd) || !walk->vma) { + if (pmd_none(*pmd)) { if (ops->pte_hole) err = ops->pte_hole(addr, next, walk); if (err)
@@ -84,7 +84,7 @@ static int walk_pud_range(p4d_t *p4d, un do { again: next = pud_addr_end(addr, end); - if (pud_none(*pud) || !walk->vma) { + if (pud_none(*pud)) { if (ops->pte_hole) err = ops->pte_hole(addr, next, walk); if (err)
@@ -254,7 +254,7 @@ static int __walk_page_range(unsigned loint err =0 ;struct vm_area_struct *vma = walk->vma; -if (vma &&is_vm_hugetlb_page (vma)) { +if (is_vm_hugetlb_page (vma)) {if (walk->ops->hugetlb_entry) err =walk_hugetlb_range (start, end, walk); }else
@@ -324,9 +324,13 @@ int walk_page_range(struct mm_struct *mmif (!vma) {/* after the last vma */ walk.vma =NULL ; next = end; +if (ops->pte_hole) + err = ops->pte_hole (start, next, &walk); }else if (start < vma->vm_start) {/* outside vma */ walk.vma =NULL ; next =min (end, vma->vm_start); +if (ops->pte_hole) + err = ops->pte_hole (start, next, &walk); }else {/* inside vma */ walk.vma = vma; next =min (end, vma->vm_end);
@@ -344,9 +348,8 @@ int walk_page_range(struct mm_struct *mm }if (err <0 )break ; - } -if (walk.vma || walk.ops->pte_hole) err =__walk_page_range (start, next, &walk); + }if (err)break ; }while (start = next, start < end);
Greg Kroah-Hartman
maintainerPATCH 2/38 perf tools: Fixup get_current_dir_name() compilation
In reply to Greg Kroah-HartmanFrom: Alexey Dobriyan <[email protected]>
commit 128dbd78bd673f9edbc4413072b23efb6657feb0 upstream.
strdup() prototype doesn't live in stdlib.h .
Add limits.h for PATH_MAX definition as well.
This fixes the build on Android.
--- tools/perf/util/get_current_dir_name.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/util/get_current_dir_name.c +2 -1
@@ -3,8 +3,9 @@// #ifndef HAVE_GET_CURRENT_DIR_NAME #include "get_current_dir_name.h" +#include <limits.h> +#include <string.h> #include <unistd.h> -#include <stdlib.h> /* Android's 'bionic' library, for one, doesn't have this */
Greg Kroah-Hartman
maintainerPATCH 3/38 fs: fix UAF/GPF bug in nilfs_mdt_destroy
In reply to Greg Kroah-HartmanFrom: Dongliang Mu <[email protected]>
commit 2e488f13755ffbb60f307e991b27024716a33b29 upstream.
In alloc_inode, inode_init_always() could return -ENOMEM if security_inode_alloc() fails, which causes inode->i_private uninitialized. Then nilfs_is_metadata_file_inode() returns true and nilfs_free_inode() wrongly calls nilfs_mdt_destroy(), which frees the uninitialized inode->i_private
and leads to crashes(e.g., UAF/GPF).
Fix this by moving security_inode_alloc just prior to this_cpu_inc(nr_inodes)
--- fs/inode.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
fs/inode.c +3 -4
@@ -167,8 +167,6 @@ int inode_init_always(struct super_block inode->i_wb_frn_history =0 ;#endif -if (security_inode_alloc (inode)) - goto out;spin_lock_init (&inode->i_lock);lockdep_set_class (&inode->i_lock, &sb->s_type->i_lock_key);
@@ -199,11 +197,12 @@ int inode_init_always(struct super_block inode->i_fsnotify_mask =0 ;#endif inode->i_flctx =NULL ; + +if (unlikely (security_inode_alloc (inode))) +return -ENOMEM ;this_cpu_inc (nr_inodes);return 0 ; -out: -return -ENOMEM ; }EXPORT_SYMBOL (inode_init_always);
Greg Kroah-Hartman
maintainerPATCH 4/38 firmware: arm_scmi: Add SCMI PM driver remove routine
In reply to Greg Kroah-HartmanFrom: Cristian Marussi <[email protected]>
[ Upstream commit dea796fcab0a219830831c070b8dc367d7e0f708 ]
Currently, when removing the SCMI PM driver not all the resources registered with genpd subsystem are properly de-registered.
As a side effect of this after a driver unload/load cycle you get a splat with a few warnings like this:
| debugfs: Directory 'BIG_CPU0' with parent 'pm_genpd' already present! | debugfs: Directory 'BIG_CPU1' with parent 'pm_genpd' already present! | debugfs: Directory 'LITTLE_CPU0' with parent 'pm_genpd' already present! | debugfs: Directory 'LITTLE_CPU1' with parent 'pm_genpd' already present! | debugfs: Directory 'LITTLE_CPU2' with parent 'pm_genpd' already present! | debugfs: Directory 'LITTLE_CPU3' with parent 'pm_genpd' already present! | debugfs: Directory 'BIG_SSTOP' with parent 'pm_genpd' already present! | debugfs: Directory 'LITTLE_SSTOP' with parent 'pm_genpd' already present! | debugfs: Directory 'DBGSYS' with parent 'pm_genpd' already present! | debugfs: Directory 'GPUTOP' with parent 'pm_genpd' already present!
Add a proper scmi_pm_domain_remove callback to the driver in order to take care of all the needed cleanups not handled by devres framework.
--- drivers/firmware/arm_scmi/scmi_pm_domain.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/firmware/arm_scmi/scmi_pm_domain.c +20 -0
@@ -106,9 +106,28 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev) scmi_pd_data->domains = domains; scmi_pd_data->num_domains = num_domains; +dev_set_drvdata (dev, scmi_pd_data); +return of_genpd_add_provider_onecell (np, scmi_pd_data); } +static void scmi_pm_domain_remove (struct scmi_device *sdev) +{ +int i; +struct genpd_onecell_data *scmi_pd_data; +struct device *dev = &sdev->dev; +struct device_node *np = dev->of_node; + +of_genpd_del_provider (np); + + scmi_pd_data =dev_get_drvdata (dev); +for (i =0 ; i < scmi_pd_data->num_domains; i++) { +if (!scmi_pd_data->domains[i]) +continue ; +pm_genpd_remove (scmi_pd_data->domains[i]); + } +} +static const struct scmi_device_id scmi_id_table[] = { {SCMI_PROTOCOL_POWER }, { },
@@ -118,6 +137,7 @@ MODULE_DEVICE_TABLE(scmi, scmi_id_table);static struct scmi_driver scmi_power_domain_driver = { .name ="scmi-power-domain" , .probe = scmi_pm_domain_probe, + .remove = scmi_pm_domain_remove, .id_table = scmi_id_table, };module_scmi_driver (scmi_power_domain_driver);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 5/38 dmaengine: xilinx_dma: cleanup for fetching xlnx,num-fstores property
In reply to Greg Kroah-HartmanFrom: Swati Agarwal <[email protected]>
[ Upstream commit 462bce790e6a7e68620a4ce260cc38f7ed0255d5 ]
Free the allocated resources for missing xlnx,num-fstores property.
--- drivers/dma/xilinx/xilinx_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/xilinx/xilinx_dma.c +1 -1
@@ -2683,7 +2683,7 @@ static int xilinx_dma_probe(struct platform_device *pdev)if (err <0 ) {dev_err (xdev->dev,"missing xlnx,num-fstores property\n" ); -return err; + goto disable_clks; } err = of_property_read_u32(node, "xlnx,flush-fsync",
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 6/38 dmaengine: xilinx_dma: Report error in case of dma_set_mask_and_coherent API failure
In reply to Greg Kroah-HartmanFrom: Swati Agarwal <[email protected]>
[ Upstream commit 8f2b6bc79c32f0fa60df000ae387a790ec80eae9 ]
The driver does not handle the failure case while calling dma_set_mask_and_coherent API.
In case of failure, capture the return value of API and then report an error.
Addresses-coverity: Unchecked return value (CHECKED_RETURN)
--- drivers/dma/xilinx/xilinx_dma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/dma/xilinx/xilinx_dma.c +5 -1
@@ -2703,7 +2703,11 @@ static int xilinx_dma_probe(struct platform_device *pdev) xdev->ext_addr = false;/* Set the dma mask bits */ -dma_set_mask_and_coherent (xdev->dev,DMA_BIT_MASK (addr_width)); + err =dma_set_mask_and_coherent (xdev->dev,DMA_BIT_MASK (addr_width)); +if (err <0 ) { +dev_err (xdev->dev,"DMA mask error %d\n" , err); + goto disable_clks; + }/* Initialize the DMA engine */ xdev->common.dev = &pdev->dev;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 7/38 ARM: dts: fix Moxa SDIO compatible, remove sdhci misnomer
In reply to Greg Kroah-HartmanFrom: Sergei Antonov <[email protected]>
[ Upstream commit 02181e68275d28cab3c3f755852770367f1bc229 ]
Driver moxart-mmc.c has .compatible = "moxa,moxart-mmc".
But moxart .dts/.dtsi and the documentation file moxa,moxart-dma.txt contain compatible = "moxa,moxart-sdhci".
Change moxart .dts/.dtsi files and moxa,moxart-dma.txt to match the driver.
Replace 'sdhci' with 'mmc' in names too, since SDHCI is a different controller from FTSDC010.
--- Documentation/devicetree/bindings/dma/moxa,moxart-dma.txt | 4 ++-- arch/arm/boot/dts/moxart-uc7112lx.dts | 2 +- arch/arm/boot/dts/moxart.dtsi | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/dma/moxa,moxart-dma.txt +2 -2
@@ -34,8 +34,8 @@ Example: Use specific request line passing from dma For example, MMC request line is 5 - sdhci: sdhci@98e00000 { - compatible = "moxa,moxart-sdhci"; + mmc: mmc@98e00000 { + compatible = "moxa,moxart-mmc"; reg = <0x98e00000 0x5C>; interrupts = <5 0>; clocks = <&clk_apb>;
arch/arm/boot/dts/moxart-uc7112lx.dts +1 -1
@@ -79,7 +79,7 @@ &clk_pll { clocks = <&ref12>; }; -&sdhci { +&mmc { status = "okay"; };
arch/arm/boot/dts/moxart.dtsi +2 -2
@@ -93,8 +93,8 @@ watchdog: watchdog@98500000 { clock-names = "PCLK"; }; - sdhci: sdhci@98e00000 { - compatible = "moxa,moxart-sdhci"; + mmc: mmc@98e00000 { + compatible = "moxa,moxart-mmc"; reg = <0x98e00000 0x5C>; interrupts = <5 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk_apb>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 8/38 scsi: qedf: Fix a UAF bug in __qedf_probe()
In reply to Greg Kroah-HartmanFrom: Letu Ren <[email protected]>
[ Upstream commit fbfe96869b782364caebae0445763969ddb6ea67 ]
In __qedf_probe(), if qedf->cdev is NULL which means qed_ops->common->probe() failed, then the program will goto label err1, and scsi_host_put() will free lport->host pointer. Because the memory qedf points to is allocated by libfc_host_alloc(), it will be freed by scsi_host_put(). However, the if statement below label err0 only checks whether qedf is NULL but doesn't check whether the memory has been freed. So a UAF bug can occur.
There are two ways to reach the statements below err0. The first one is described as before, "qedf" should be set to NULL. The second one is goto "err0" directly. In the latter scenario qedf hasn't been changed and it has the initial value NULL. As a result the if statement is not reachable in any situation.
The KASAN logs are as follows:
[ 2.312969] BUG: KASAN: use-after-free in __qedf_probe+0x5dcf/0x6bc0 [ 2.312969] [ 2.312969] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 [ 2.312969] Call Trace: [ 2.312969] dump_stack_lvl+0x59/0x7b [ 2.312969] print_address_description+0x7c/0x3b0 [ 2.312969] ? __qedf_probe+0x5dcf/0x6bc0 [ 2.312969] __kasan_report+0x160/0x1c0 [ 2.312969] ? __qedf_probe+0x5dcf/0x6bc0 [ 2.312969] kasan_report+0x4b/0x70 [ 2.312969] ? kobject_put+0x25d/0x290 [ 2.312969] kasan_check_range+0x2ca/0x310 [ 2.312969] __qedf_probe+0x5dcf/0x6bc0 [ 2.312969] ? selinux_kernfs_init_security+0xdc/0x5f0 [ 2.312969] ? trace_rpm_return_int_rcuidle+0x18/0x120 [ 2.312969] ? rpm_resume+0xa5c/0x16e0 [ 2.312969] ? qedf_get_generic_tlv_data+0x160/0x160 [ 2.312969] local_pci_probe+0x13c/0x1f0 [ 2.312969] pci_device_probe+0x37e/0x6c0
--- drivers/scsi/qedf/qedf_main.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/scsi/qedf/qedf_main.c +0 -5
@@ -3544,11 +3544,6 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) err1:scsi_host_put (lport->host); err0: -if (qedf) { -QEDF_INFO (&qedf->dbg_ctx,QEDF_LOG_DISC ,"Probe done.\n" ); - -clear_bit (QEDF_PROBING , &qedf->flags); - }return rc; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 9/38 net/ieee802154: fix uninit value bug in dgram_sendmsg
In reply to Greg Kroah-HartmanFrom: Haimin Zhang <[email protected]>
[ Upstream commit 94160108a70c8af17fa1484a37e05181c0e094af ]
There is uninit value bug in dgram_sendmsg function in net/ieee802154/socket.c when the length of valid data pointed by the msg->msg_name isn't verified.
We introducing a helper function ieee802154_sockaddr_check_size to check namelen. First we check there is addr_type in ieee802154_addr_sa. Then, we check namelen according to addr_type.
Also fixed in raw_bind, dgram_bind, dgram_connect.
--- include/net/ieee802154_netdev.h | 37 +++++++++++++++++++++++++++++ net/ieee802154/socket.c | 42 ++++++++++++++++++--------------- 2 files changed, 60 insertions(+), 19 deletions(-)
include/net/ieee802154_netdev.h +37 -0
@@ -15,6 +15,22 @@#ifndef IEEE802154_NETDEVICE_H #define IEEE802154_NETDEVICE_H +#define IEEE802154_REQUIRED_SIZE (struct_type, member) \ + (offsetof(typeof(struct_type), member) + \ + sizeof(((typeof(struct_type) *)(NULL))->member)) + +#define IEEE802154_ADDR_OFFSET \ + offsetof(typeof(struct sockaddr_ieee802154), addr) + +#define IEEE802154_MIN_NAMELEN (IEEE802154_ADDR_OFFSET + \ + IEEE802154_REQUIRED_SIZE(struct ieee802154_addr_sa, addr_type)) + +#define IEEE802154_NAMELEN_SHORT (IEEE802154_ADDR_OFFSET + \ + IEEE802154_REQUIRED_SIZE(struct ieee802154_addr_sa, short_addr)) + +#define IEEE802154_NAMELEN_LONG (IEEE802154_ADDR_OFFSET + \ + IEEE802154_REQUIRED_SIZE(struct ieee802154_addr_sa, hwaddr)) +#include <net/af_ieee802154.h> #include <linux/netdevice.h> #include <linux/skbuff.h>
@@ -165,6 +181,27 @@ static inline void ieee802154_devaddr_to_raw(void *raw, __le64 addr)memcpy (raw, &temp,IEEE802154_ADDR_LEN ); } +static inline int +ieee802154_sockaddr_check_size (struct sockaddr_ieee802154 *daddr,int len) +{ +struct ieee802154_addr_sa *sa; + + sa = &daddr->addr; +if (len <IEEE802154_MIN_NAMELEN ) +return -EINVAL ; +switch (sa->addr_type) { +case IEEE802154_ADDR_SHORT : +if (len <IEEE802154_NAMELEN_SHORT ) +return -EINVAL ; +break ; +case IEEE802154_ADDR_LONG : +if (len <IEEE802154_NAMELEN_LONG ) +return -EINVAL ; +break ; + } +return 0 ; +} +static inline void ieee802154_addr_from_sa (struct ieee802154_addr *a,const struct ieee802154_addr_sa *sa) {
net/ieee802154/socket.c +23 -19
78 lines not on this page · raw message
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 10/38 um: Cleanup syscall_handler_t cast in syscalls_32.h
In reply to Greg Kroah-HartmanFrom: Lukas Straub <[email protected]>
[ Upstream commit 61670b4d270c71219def1fbc9441debc2ac2e6e9 ]
Like in f4f03f299a56ce4d73c5431e0327b3b6cb55ebb9 "um: Cleanup syscall_handler_t definition/cast, fix warning", remove the cast to to fix the compiler warning.
--- arch/x86/um/shared/sysdep/syscalls_32.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
arch/x86/um/shared/sysdep/syscalls_32.h +2 -3
@@ -6,10 +6,9 @@#include <asm/unistd.h> #include <sysdep/ptrace.h> -typedef long syscall_handler_t (struct pt_regs ); +typedef long syscall_handler_t (struct syscall_args );extern syscall_handler_t *sys_call_table[];#define EXECUTE_SYSCALL (syscall, regs) \ - ((long (*)(struct syscall_args)) \ - (*sys_call_table[syscall]))(SYSCALL_ARGS(®s->regs)) + ((*sys_call_table[syscall]))(SYSCALL_ARGS(®s->regs))
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 11/38 um: Cleanup compiler warning in arch/x86/um/tls_32.c
In reply to Greg Kroah-HartmanFrom: Lukas Straub <[email protected]>
[ Upstream commit d27fff3499671dc23a08efd01cdb8b3764a391c4 ]
arch.tls_array is statically allocated so checking for NULL doesn't make sense. This causes the compiler warning below.
Remove the checks to silence these warnings.
../arch/x86/um/tls_32.c: In function 'get_free_idx':../arch/x86/um/tls_32.c:68:13: warning: the comparison will always evaluate as 'true' for the address of 'tls_array' will never be NULL [-Waddress]
68 | if (!t->arch.tls_array)
| ^
In file included from ../arch/x86/um/asm/processor.h:10,
from ../include/linux/rcupdate.h:30,
from ../include/linux/rculist.h:11,
from ../include/linux/pid.h:5,
from ../include/linux/sched.h:14,
from ../arch/x86/um/tls_32.c:7:../arch/x86/um/asm/processor_32.h:22:31: note: 'tls_array' declared here
22 | struct uml_tls_struct tls_array[GDT_ENTRY_TLS_ENTRIES];
| ^~~~~~~~~../arch/x86/um/tls_32.c: In function 'get_tls_entry':../arch/x86/um/tls_32.c:243:13: warning: the comparison will always evaluate as 'true' for the address of 'tls_array' will never be NULL [-Waddress]
243 | if (!t->arch.tls_array)
| ^../arch/x86/um/asm/processor_32.h:22:31: note: 'tls_array' declared here
22 | struct uml_tls_struct tls_array[GDT_ENTRY_TLS_ENTRIES];
| ^~~~~~~~~
--- arch/x86/um/tls_32.c | 6 ------ 1 file changed, 6 deletions(-)
arch/x86/um/tls_32.c +0 -6
@@ -65,9 +65,6 @@ static int get_free_idx(struct task_struct* task)struct thread_struct *t = &task->thread;int idx; -if (!t->arch.tls_array) -return GDT_ENTRY_TLS_MIN ; -for (idx =0 ; idx <GDT_ENTRY_TLS_ENTRIES ; idx++)if (!t->arch.tls_array[idx].present)return idx +GDT_ENTRY_TLS_MIN ;
@@ -240,9 +237,6 @@ static int get_tls_entry(struct task_struct *task, struct user_desc *info, {struct thread_struct *t = &task->thread; -if (!t->arch.tls_array) - goto clear; -if (idx <GDT_ENTRY_TLS_MIN || idx >GDT_ENTRY_TLS_MAX )return -EINVAL ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 12/38 arch: um: Mark the stack non-executable to fix a binutils warning
In reply to Greg Kroah-HartmanFrom: David Gow <[email protected]>
[ Upstream commit bd71558d585ac61cfd799db7f25e78dca404dd7a ]
Since binutils 2.39, ld will print a warning if any stack section is executable, which is the default for stack sections on files without a .note.GNU-stack section.
This was fixed for x86 in commit ffcf9c5700e4 ("x86: link vdso and boot with -z noexecstack --no-warn-rwx-segments"), but remained broken for UML, resulting in several warnings:
/usr/bin/ld: warning: arch/x86/um/vdso/vdso.o: missing .note.GNU-stack section implies executable stack /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /usr/bin/ld: warning: .tmp_vmlinux.kallsyms1 has a LOAD segment with RWX permissions /usr/bin/ld: warning: .tmp_vmlinux.kallsyms1.o: missing .note.GNU-stack section implies executable stack /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /usr/bin/ld: warning: .tmp_vmlinux.kallsyms2 has a LOAD segment with RWX permissions /usr/bin/ld: warning: .tmp_vmlinux.kallsyms2.o: missing .note.GNU-stack section implies executable stack /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /usr/bin/ld: warning: vmlinux has a LOAD segment with RWX permissions
Link both the VDSO and vmlinux with -z noexecstack, fixing the warnings about .note.GNU-stack sections. In addition, pass --no-warn-rwx-segments to dodge the remaining warnings about LOAD segments with RWX permissions in the kallsyms objects. (Note that this flag is apparently not available on lld, so hide it behind a test for BFD, which is what the x86 patch does.)
--- arch/um/Makefile | 8 ++++++++ arch/x86/um/vdso/Makefile | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-)
arch/um/Makefile +8 -0
@@ -132,10 +132,18 @@ export LDS_ELF_FORMAT := $(ELF_FORMAT) # The wrappers will select whether using "malloc" or the kernel allocator. LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc +# Avoid binutils 2.39+ warnings by marking the stack non-executable and +# ignorning warnings for the kallsyms sections. +LDFLAGS_EXECSTACK = -z noexecstack +ifeq ($(CONFIG_LD_IS_BFD),y) +LDFLAGS_EXECSTACK += $(call ld-option,--no-warn-rwx-segments) +endif + LD_FLAGS_CMDLINE = $(foreach opt,$(KBUILD_LDFLAGS),-Wl,$(opt)) # Used by link-vmlinux.sh which has special support for um link export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE) +export LDFLAGS_vmlinux := $(LDFLAGS_EXECSTACK) # When cleaning we don't include .config, so we don't include # TT or skas makefiles and don't clean skas_ptregs.h.
arch/x86/um/vdso/Makefile +1 -1
@@ -62,7 +62,7 @@ quiet_cmd_vdso = VDSO $@ -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \ sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@' -VDSO_LDFLAGS = -fPIC -shared -Wl,--hash-style=sysv +VDSO_LDFLAGS = -fPIC -shared -Wl,--hash-style=sysv -z noexecstack GCOV_PROFILE := n #
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 13/38 usb: mon: make mmapped memory read only
In reply to Greg Kroah-HartmanFrom: Tadeusz Struk <[email protected]>
commit a659daf63d16aa883be42f3f34ff84235c302198 upstream.
Syzbot found an issue in usbmon module, where the user space client can corrupt the monitor's internal memory, causing the usbmon module to crash the kernel with segfault, UAF, etc.
The reproducer mmaps the /dev/usbmon memory to user space, and overwrites it with arbitrary data, which causes all kinds of issues.
Return an -EPERM error from mon_bin_mmap() if the flag VM_WRTIE is set. Also clear VM_MAYWRITE to make it impossible to change it to writable later.
--- drivers/usb/mon/mon_bin.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/usb/mon/mon_bin.c +5 -0
@@ -1268,6 +1268,11 @@ static int mon_bin_mmap(struct file *fil {/* don't do anything here: "fault" will set up page table entries */ vma->vm_ops = &mon_bin_vm_ops; + +if (vma->vm_flags &VM_WRITE ) +return -EPERM ; + + vma->vm_flags &= ~VM_MAYWRITE ; vma->vm_flags |=VM_DONTEXPAND |VM_DONTDUMP ; vma->vm_private_data = filp->private_data;mon_bin_vma_open (vma);
Greg Kroah-Hartman
maintainerPATCH 14/38 USB: serial: ftdi_sio: fix 300 bps rate for SIO
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 7bd7ad3c310cd6766f170927381eea0aa6f46c69 upstream.
The 300 bps rate of SIO devices has been mapped to 9600 bps since 2003... Let's fix the regression.
--- drivers/usb/serial/ftdi_sio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/usb/serial/ftdi_sio.c +1 -2
@@ -1320,8 +1320,7 @@ static u32 get_ftdi_divisor(struct tty_scase 38400 : div_value = ftdi_sio_b38400;break ;case 57600 : div_value = ftdi_sio_b57600;break ;case 115200 : div_value = ftdi_sio_b115200;break ; - }/* baud */ -if (div_value ==0 ) { +default :dev_dbg (dev,"%s - Baudrate (%d) requested is not supported\n" , __func__, baud); div_value = ftdi_sio_b9600;
Greg Kroah-Hartman
maintainerPATCH 15/38 mmc: core: Replace with already defined values for readability
In reply to Greg Kroah-HartmanFrom: ChanWoo Lee <[email protected]>
commit e427266460826bea21b70f9b2bb29decfb2c2620 upstream.
SD_ROCR_S18A is already defined and is used to check the rocr value, so let's replace with already defined values for readability.
--- drivers/mmc/core/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/sd.c +1 -1
@@ -799,7 +799,7 @@ try_again:* the CCS bit is set as well. We deliberately deviate from the spec in * regards to this, which allows UHS-I to be supported for SDSC cards. */ -if (!mmc_host_is_spi (host) && rocr && (*rocr &0x01000000 )) { +if (!mmc_host_is_spi (host) && rocr && (*rocr &SD_ROCR_S18A )) { err =mmc_set_uhs_voltage (host, pocr);if (err == -EAGAIN ) { retries--;
Greg Kroah-Hartman
maintainerPATCH 16/38 mmc: core: Terminate infinite loop in SD-UHS voltage switch
In reply to Greg Kroah-HartmanFrom: Brian Norris <[email protected]>
commit e9233917a7e53980664efbc565888163c0a33c3f upstream.
This loop intends to retry a max of 10 times, with some implicit termination based on the SD_{R,}OCR_S18A bit. Unfortunately, the termination condition depends on the value reported by the SD card (*rocr), which may or may not correctly reflect what we asked it to do.
Needless to say, it's not wise to rely on the card doing what we expect; we should at least terminate the loop regardless. So, check both the input and output values, so we ensure we will terminate regardless of the SD card behavior.
Note that SDIO learned a similar retry loop in commit 0797e5f1453b ("mmc: core: Fixup signal voltage switch"), but that used the 'ocr' result, and so the current pre-terminating condition looks like:
rocr & ocr & R4_18V_PRESENT
(i.e., it doesn't have the same bug.)
This addresses a number of crash reports seen on ChromeOS that look like the following:
... // lots of repeated: ...
<4>[13142.846061] mmc1: Skipping voltage switch
<4>[13143.406087] mmc1: Skipping voltage switch
<4>[13143.964724] mmc1: Skipping voltage switch
<4>[13144.526089] mmc1: Skipping voltage switch
<4>[13145.086088] mmc1: Skipping voltage switch
<4>[13145.645941] mmc1: Skipping voltage switch
<3>[13146.153969] INFO: task halt:30352 blocked for more than 122 seconds.
...--- drivers/mmc/core/sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/core/sd.c +2 -1
@@ -799,7 +799,8 @@ try_again:* the CCS bit is set as well. We deliberately deviate from the spec in * regards to this, which allows UHS-I to be supported for SDSC cards. */ -if (!mmc_host_is_spi (host) && rocr && (*rocr &SD_ROCR_S18A )) { +if (!mmc_host_is_spi (host) && (ocr &SD_OCR_S18R ) && + rocr && (*rocr &SD_ROCR_S18A )) { err =mmc_set_uhs_voltage (host, pocr);if (err == -EAGAIN ) { retries--;
Greg Kroah-Hartman
maintainerPATCH 17/38 rpmsg: qcom: glink: replace strncpy() with strscpy_pad()
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
commit 766279a8f85df32345dbda03b102ca1ee3d5ddea upstream.
The use of strncpy() is considered deprecated for NUL-terminated strings[1]. Replace strncpy() with strscpy_pad(), to keep existing pad-behavior of strncpy, similarly to commit 08de420a8014 ("rpmsg:
glink: Replace strncpy() with strscpy_pad()"). This fixes W=1 warning:
In function ‘qcom_glink_rx_close’,
inlined from ‘qcom_glink_work’ at ../drivers/rpmsg/qcom_glink_native.c:1638:4:
drivers/rpmsg/qcom_glink_native.c:1549:17: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
1549 | strncpy(chinfo.name, channel->name, sizeof(chinfo.name));
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings
--- drivers/rpmsg/qcom_glink_native.c | 2 +- drivers/rpmsg/qcom_smd.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/rpmsg/qcom_glink_native.c +1 -1
@@ -1472,7 +1472,7 @@ static void qcom_glink_rx_close(struct qcancel_work_sync (&channel->intent_work);if (channel->rpdev) { -strncpy (chinfo.name, channel->name,sizeof (chinfo.name)); +strscpy_pad (chinfo.name, channel->name,sizeof (chinfo.name)); chinfo.src =RPMSG_ADDR_ANY ; chinfo.dst =RPMSG_ADDR_ANY ;
drivers/rpmsg/qcom_smd.c +2 -2
@@ -1073,7 +1073,7 @@ static int qcom_smd_create_device(struct/* Assign public information to the rpmsg_device */ rpdev = &qsdev->rpdev; -strncpy (rpdev->id.name, channel->name,RPMSG_NAME_SIZE ); +strscpy_pad (rpdev->id.name, channel->name,RPMSG_NAME_SIZE ); rpdev->src =RPMSG_ADDR_ANY ; rpdev->dst =RPMSG_ADDR_ANY ;
@@ -1304,7 +1304,7 @@ static void qcom_channel_state_worker(stspin_unlock_irqrestore (&edge->channels_lock, flags); -strncpy (chinfo.name, channel->name,sizeof (chinfo.name)); +strscpy_pad (chinfo.name, channel->name,sizeof (chinfo.name)); chinfo.src =RPMSG_ADDR_ANY ; chinfo.dst =RPMSG_ADDR_ANY ;rpmsg_unregister_device (&edge->dev, &chinfo);
Greg Kroah-Hartman
maintainerPATCH 18/38 nilfs2: fix NULL pointer dereference at nilfs_bmap_lookup_at_level()
In reply to Greg Kroah-HartmanFrom: Ryusuke Konishi <[email protected]>
commit 21a87d88c2253350e115029f14fe2a10a7e6c856 upstream.
If the i_mode field in inode of metadata files is corrupted on disk, it can cause the initialization of bmap structure, which should have been called from nilfs_read_inode_common(), not to be called. This causes a lockdep warning followed by a NULL pointer dereference at nilfs_bmap_lookup_at_level().
This patch fixes these issues by adding a missing sanitiy check for the i_mode field of metadata file's inode.
--- fs/nilfs2/inode.c | 2 ++ 1 file changed, 2 insertions(+)
fs/nilfs2/inode.c +2 -0
@@ -451,6 +451,8 @@ int nilfs_read_inode_common(struct inode inode->i_atime.tv_nsec =le32_to_cpu (raw_inode->i_mtime_nsec); inode->i_ctime.tv_nsec =le32_to_cpu (raw_inode->i_ctime_nsec); inode->i_mtime.tv_nsec =le32_to_cpu (raw_inode->i_mtime_nsec); +if (nilfs_is_metadata_file_inode (inode) && !S_ISREG (inode->i_mode)) +return -EIO ;/* this inode is for metadata and corrupted */ if (inode->i_nlink ==0 )return -ESTALE ;/* this inode is deleted */
Greg Kroah-Hartman
maintainerPATCH 19/38 nilfs2: fix leak of nilfs_root in case of writer thread creation failure
In reply to Greg Kroah-HartmanFrom: Ryusuke Konishi <[email protected]>
commit d0d51a97063db4704a5ef6bc978dddab1636a306 upstream.
If nilfs_attach_log_writer() failed to create a log writer thread, it frees a data structure of the log writer without any cleanup. After commit e912a5b66837 ("nilfs2: use root object to get ifile"), this causes a leak of struct nilfs_root, which started to leak an ifile metadata inode and a kobject on that struct.
In addition, if the kernel is booted with panic_on_warn, the above ifile metadata inode leak will cause the following panic when the nilfs2 kernel module is removed:
kmem_cache_destroy nilfs2_inode_cache: Slab cache still has objects when called from nilfs_destroy_cachep+0x16/0x3a [nilfs2]
WARNING: CPU: 8 PID: 1464 at mm/slab_common.c:494 kmem_cache_destroy+0x138/0x140
...
RIP: 0010:kmem_cache_destroy+0x138/0x140
Code: 00 20 00 00 e8 a9 55 d8 ff e9 76 ff ff ff 48 8b 53 60 48 c7 c6 20 70 65 86 48 c7 c7 d8 69 9c 86 48 8b 4c 24 28 e8 ef 71 c7 00 <0f> 0b e9 53 ff ff ff c3 48 81 ff ff 0f 00 00 77 03 31 c0 c3 53 48
...
Call Trace:
<TASK>
? nilfs_palloc_freev.cold.24+0x58/0x58 [nilfs2]
nilfs_destroy_cachep+0x16/0x3a [nilfs2]
exit_nilfs_fs+0xa/0x1b [nilfs2]
__x64_sys_delete_module+0x1d9/0x3a0
? __sanitizer_cov_trace_pc+0x1a/0x50
? syscall_trace_enter.isra.19+0x119/0x190
do_syscall_64+0x34/0x80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
...
</TASK>
Kernel panic - not syncing: panic_on_warn set ...This patch fixes these issues by calling nilfs_detach_log_writer() cleanup function if spawning the log writer thread fails.
--- fs/nilfs2/segment.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
fs/nilfs2/segment.c +3 -4
@@ -2786,10 +2786,9 @@ int nilfs_attach_log_writer(struct superinode_attach_wb (nilfs->ns_bdev->bd_inode,NULL ); err =nilfs_segctor_start_thread (nilfs->ns_writer); -if (err) { -kfree (nilfs->ns_writer); - nilfs->ns_writer =NULL ; - } +if (unlikely (err)) +nilfs_detach_log_writer (sb); +return err; }
Greg Kroah-Hartman
maintainerPATCH 20/38 nilfs2: replace WARN_ONs by nilfs_error for checkpoint acquisition failure
In reply to Greg Kroah-HartmanFrom: Ryusuke Konishi <[email protected]>
commit 723ac751208f6d6540191689cfbf6c77135a7a1b upstream.
If creation or finalization of a checkpoint fails due to anomalies in the checkpoint metadata on disk, a kernel warning is generated.
This patch replaces the WARN_ONs by nilfs_error, so that a kernel, booted with panic_on_warn, does not panic. A nilfs_error is appropriate here to handle the abnormal filesystem condition.
This also replaces the detected error codes with an I/O error so that neither of the internal error codes is returned to callers.
--- fs/nilfs2/segment.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
fs/nilfs2/segment.c +10 -4
@@ -880,9 +880,11 @@ static int nilfs_segctor_create_checkpoinilfs_mdt_mark_dirty (nilfs->ns_cpfile);nilfs_cpfile_put_checkpoint ( nilfs->ns_cpfile, nilfs->ns_cno, bh_cp); - }else -WARN_ON (err == -EINVAL || err == -ENOENT ); - + }else if (err == -EINVAL || err == -ENOENT ) { +nilfs_error (sci->sc_super, +"checkpoint creation failed due to metadata corruption." ); + err = -EIO ; + }return err; }
@@ -896,7 +898,11 @@ static int nilfs_segctor_fill_in_checkpo err =nilfs_cpfile_get_checkpoint (nilfs->ns_cpfile, nilfs->ns_cno,0 , &raw_cp, &bh_cp);if (unlikely (err)) { -WARN_ON (err == -EINVAL || err == -ENOENT ); +if (err == -EINVAL || err == -ENOENT ) { +nilfs_error (sci->sc_super, +"checkpoint finalization failed due to metadata corruption." ); + err = -EIO ; + } goto failed_ibh; } raw_cp->cp_snapshot_list.ssl_next =0 ;
Greg Kroah-Hartman
maintainerPATCH 21/38 ceph: dont truncate file in atomic_open
In reply to Greg Kroah-HartmanFrom: Hu Weiwen <[email protected]>
commit 7cb9994754f8a36ae9e5ec4597c5c4c2d6c03832 upstream.
Clear O_TRUNC from the flags sent in the MDS create request.
`atomic_open' is called before permission check. We should not do any modification to the file here. The caller will do the truncation afterward.
--- fs/ceph/file.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
fs/ceph/file.c +7 -3
@@ -452,6 +452,12 @@ int ceph_atomic_open(struct inode *dir,if (dentry->d_name.len >NAME_MAX )return -ENAMETOOLONG ; +/* +* Do not truncate the file, since atomic_open is called before the +* permission check. The caller will do the truncation afterward. +*/ + flags &= ~O_TRUNC ; +if (flags &O_CREAT ) {if (ceph_quota_is_max_files_exceeded (dir))return -EDQUOT ;
@@ -490,9 +496,7 @@ int ceph_atomic_open(struct inode *dir, req->r_parent = dir;set_bit (CEPH_MDS_R_PARENT_LOCKED , &req->r_req_flags); - err =ceph_mdsc_do_request (mdsc, - (flags & (O_CREAT |O_TRUNC )) ? dir :NULL , - req); + err =ceph_mdsc_do_request (mdsc, (flags &O_CREAT ) ? dir :NULL , req); err =ceph_handle_snapdir (req, dentry, err);if (err) goto out_req;
Greg Kroah-Hartman
maintainerPATCH 22/38 random: clamp credited irq bits to maximum mixed
In reply to Greg Kroah-HartmanFrom: Jason A. Donenfeld <[email protected]>
commit e78a802a7b4febf53f2a92842f494b01062d85a8 upstream.
Since the most that's mixed into the pool is sizeof(long)*2, don't credit more than that many bytes of entropy.
--- drivers/char/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/random.c +1 -1
@@ -976,7 +976,7 @@ static void mix_interrupt_randomness(strlocal_irq_enable ();mix_pool_bytes (pool,sizeof (pool)); -credit_init_bits (max (1u , (count &U16_MAX ) /64 )); + credit_init_bits(clamp_t(unsigned int, (count & U16_MAX) / 64, 1, sizeof(pool) * 8));memzero_explicit (pool,sizeof (pool)); }
Greg Kroah-Hartman
maintainerPATCH 23/38 ALSA: hda: Fix position reporting on Poulsbo
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 56e696c0f0c71b77fff921fc94b58a02f0445b2c upstream.
Hans reported that his Sony VAIO VPX11S1E showed the broken sound behavior at the start of the stream for a couple of seconds, and it turned out that the position_fix=1 option fixes the issue. It implies that the position reporting is inaccurate, and very likely hitting on all Poulsbo devices.
The patch applies the workaround for Poulsbo generically to switch to LPIB mode instead of the default position buffer.
--- sound/pci/hda/hda_intel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/pci/hda/hda_intel.c +2 -1
@@ -2532,7 +2532,8 @@ static const struct pci_device_id azx_id .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM },/* Poulsbo */ { PCI_DEVICE(0x8086, 0x811b), - .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE }, + .driver_data =AZX_DRIVER_SCH |AZX_DCAPS_INTEL_PCH_BASE | + AZX_DCAPS_POSFIX_LPIB }, /* Oaktrail */ { PCI_DEVICE(0x8086, 0x080a), .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE },
Greg Kroah-Hartman
maintainerPATCH 24/38 efi: Correct Macmini DMI match in uefi cert quirk
In reply to Greg Kroah-HartmanFrom: Orlando Chamberlain <[email protected]>
commit bab715bdaa9ebf28d99a6d1efb2704a30125e96d upstream.
It turns out Apple doesn't capitalise the "mini" in "Macmini" in DMI, which is inconsistent with other model line names.
Correct the capitalisation of Macmini in the quirk for skipping loading platform certs on T2 Macs.
Currently users get:
------------[ cut here ]------------ [Firmware Bug]: Page fault caused by firmware at PA: 0xffffa30640054000 WARNING: CPU: 1 PID: 8 at arch/x86/platform/efi/quirks.c:735 efi_crash_gracefully_on_page_fault+0x55/0xe0 Modules linked in: CPU: 1 PID: 8 Comm: kworker/u12:0 Not tainted 5.18.14-arch1-2-t2 #1 4535eb3fc40fd08edab32a509fbf4c9bc52d111e Hardware name: Apple Inc. Macmini8,1/Mac-7BA5B2DFE22DDD8C, BIOS 1731.120.10.0.0 (iBridge: 19.16.15071.0.0,0) 04/24/2022 Workqueue: efi_rts_wq efi_call_rts ... ---[ end trace 0000000000000000 ]---
efi: Froze efi_rts_wq and disabled EFI Runtime Services
integrity: Couldn't get size: 0x8000000000000015
integrity: MODSIGN: Couldn't get UEFI db list
efi: EFI Runtime Services are disabled!
integrity: Couldn't get size: 0x8000000000000015
integrity: Couldn't get UEFI dbx list
--- security/integrity/platform_certs/load_uefi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/platform_certs/load_uefi.c +1 -1
@@ -30,7 +30,7 @@ static const struct dmi_system_id uefi_s { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacBookAir8,1") }, { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacBookAir8,2") }, { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacBookAir9,1") }, - { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacMini8,1") }, + { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "Macmini8,1") }, { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacPro7,1") }, { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "iMac20,1") }, { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "iMac20,2") },
Greg Kroah-Hartman
maintainerPATCH 25/38 scsi: stex: Properly zero out the passthrough command structure
In reply to Greg Kroah-HartmanFrom: Linus Torvalds <[email protected]>
commit 6022f210461fef67e6e676fd8544ca02d1bcfa7a upstream.
The passthrough structure is declared off of the stack, so it needs to be set to zero before copied back to userspace to prevent any unintentional data leakage. Switch things to be statically allocated which will fill the unused fields with 0 automatically.
--- drivers/scsi/stex.c | 17 +++++++++-------- include/scsi/scsi_cmnd.h | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-)
drivers/scsi/stex.c +9 -8
@@ -668,16 +668,17 @@ stex_queuecommand_lck(struct scsi_cmnd *return 0 ;case PASSTHRU_CMD :if (cmd->cmnd[1 ] ==PASSTHRU_GET_DRVVER ) { -struct st_drvver ver; +const struct st_drvver ver = { + .major =ST_VER_MAJOR , + .minor =ST_VER_MINOR , + .oem =ST_OEM , + .build =ST_BUILD_VER , + .signature[0 ] =PASSTHRU_SIGNATURE , + .console_id = host->max_id -1 , + .host_no = hba->host->host_no, + };size_t cp_len =sizeof (ver); - ver.major =ST_VER_MAJOR ; - ver.minor =ST_VER_MINOR ; - ver.oem =ST_OEM ; - ver.build =ST_BUILD_VER ; - ver.signature[0 ] =PASSTHRU_SIGNATURE ; - ver.console_id = host->max_id -1 ; - ver.host_no = hba->host->host_no; cp_len =scsi_sg_copy_from_buffer (cmd, &ver, cp_len); cmd->result =sizeof (ver) == cp_len ? DID_OK << 16 | COMMAND_COMPLETE << 8 :
include/scsi/scsi_cmnd.h +1 -1
@@ -204,7 +204,7 @@ static inline int scsi_get_resid(structfor_each_sg (scsi_sglist (cmd), sg, nseg, __i) static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, -void *buf,int buflen) +const void *buf,int buflen) {return sg_copy_from_buffer (scsi_sglist (cmd),scsi_sg_count (cmd), buf, buflen);
Greg Kroah-Hartman
maintainerPATCH 26/38 USB: serial: qcserial: add new usb-id for Dell branded EM7455
In reply to Greg Kroah-HartmanFrom: Frank Wunderlich <[email protected]>
commit eee48781ea199e32c1d0c4732641c494833788ca upstream.
Add support for Dell 5811e (EM7455) with USB-id 0x413c:0x81c2.
--- drivers/usb/serial/qcserial.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/serial/qcserial.c +1 -0
@@ -177,6 +177,7 @@ static const struct usb_device_id id_tab {DEVICE_SWI(0x413c, 0x81b3)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) */ {DEVICE_SWI(0x413c, 0x81b5)}, /* Dell Wireless 5811e QDL */ {DEVICE_SWI(0x413c, 0x81b6)}, /* Dell Wireless 5811e QDL */ + {DEVICE_SWI(0x413c, 0x81c2)}, /* Dell Wireless 5811e */ {DEVICE_SWI(0x413c, 0x81cb)}, /* Dell Wireless 5816e QDL */ {DEVICE_SWI(0x413c, 0x81cc)}, /* Dell Wireless 5816e */ {DEVICE_SWI(0x413c, 0x81cf)}, /* Dell Wireless 5819 */
Greg Kroah-Hartman
maintainerPATCH 27/38 random: restore O_NONBLOCK support
In reply to Greg Kroah-HartmanFrom: Jason A. Donenfeld <[email protected]>
commit cd4f24ae9404fd31fc461066e57889be3b68641b upstream.
Prior to 5.6, when /dev/random was opened with O_NONBLOCK, it would return -EAGAIN if there was no entropy. When the pools were unified in 5.6, this was lost. The post 5.6 behavior of blocking until the pool is initialized, and ignoring O_NONBLOCK in the process, went unnoticed, with no reports about the regression received for two and a half years. However, eventually this indeed did break somebody's userspace.
So we restore the old behavior, by returning -EAGAIN if the pool is not initialized. Unlike the old /dev/random, this can only occur during early boot, after which it never blocks again.
In order to make this O_NONBLOCK behavior consistent with other expectations, also respect users reading with preadv2(RWF_NOWAIT) and similar.
--- drivers/char/mem.c | 4 ++-- drivers/char/random.c | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-)
drivers/char/mem.c +2 -2
@@ -953,8 +953,8 @@ static const struct memdev { #endif [5] = { "zero", 0666, &zero_fops, 0 }, [7] = { "full", 0666, &full_fops, 0 }, - [8] = { "random", 0666, &random_fops, 0 }, - [9 ] = {"urandom" ,0666 , &urandom_fops,0 }, + [8] = { "random", 0666, &random_fops, FMODE_NOWAIT }, + [9 ] = {"urandom" ,0666 , &urandom_fops,FMODE_NOWAIT }, #ifdef CONFIG_PRINTK [11] = { "kmsg", 0644, &kmsg_fops, 0 }, #endif
drivers/char/random.c +5 -0
@@ -1294,6 +1294,11 @@ static ssize_t random_read_iter(struct k {int ret; +if (!crng_ready () && + ((kiocb->ki_flags &IOCB_NOWAIT ) || + (kiocb->ki_filp->f_flags &O_NONBLOCK ))) +return -EAGAIN ; + ret =wait_for_random_bytes ();if (ret !=0 )return ret;
Greg Kroah-Hartman
maintainerPATCH 28/38 random: avoid reading two cache lines on irq randomness
In reply to Greg Kroah-HartmanFrom: Jason A. Donenfeld <[email protected]>
commit 9ee0507e896b45af6d65408c77815800bce30008 upstream.
In order to avoid reading and dirtying two cache lines on every IRQ, move the work_struct to the bottom of the fast_pool struct. add_ interrupt_randomness() always touches .pool and .count, which are currently split, because .mix pushes everything down. Instead, move .mix to the bottom, so that .pool and .count are always in the first cache line, since .mix is only accessed when the pool is full.
--- drivers/char/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/random.c +1 -1
@@ -890,10 +890,10 @@ void __init add_bootloader_randomness(co }struct fast_pool { -struct work_struct mix;unsigned long pool[4 ];unsigned long last;unsigned int count; +struct work_struct mix; }; static DEFINE_PER_CPU(struct fast_pool, irq_randomness) = {
Greg Kroah-Hartman
maintainerPATCH 29/38 random: use expired timer rather than wq for mixing fast pool
In reply to Greg Kroah-HartmanFrom: Jason A. Donenfeld <[email protected]>
commit 748bc4dd9e663f23448d8ad7e58c011a67ea1eca upstream.
Previously, the fast pool was dumped into the main pool periodically in the fast pool's hard IRQ handler. This worked fine and there weren't problems with it, until RT came around. Since RT converts spinlocks into sleeping locks, problems cropped up. Rather than switching to raw spinlocks, the RT developers preferred we make the transformation from originally doing:
do_some_stuff()
spin_lock()
do_some_other_stuff()
spin_unlock()to doing:
do_some_stuff()
queue_work_on(some_other_stuff_worker)This is an ordinary pattern done all over the kernel. However, Sherry noticed a 10% performance regression in qperf TCP over a 40gbps InfiniBand card. Quoting her message:
Quoted 15 lines
MT27500 Family [ConnectX-3] cards:
Infiniband device 'mlx4_0' port 1 status:
default gid: fe80:0000:0000:0000:0010:e000:0178:9eb1 base lid:0x6
sm lid:0x1
state: 4: ACTIVE
phys state: 5: LinkUp
rate: 40 Gb/sec (4X QDR)link_layer: InfiniBandCards are configured with IP addresses on private subnet for IPoIB performance testing.
Regression identified in this bug is in TCP latency in this stack as reported by qperftcp_latmetric:
Quoted 6 lines
We have one system listen as a qperf server:
[root@yourQperfServer ~]# qperfHave the other system connect to qperf server as a client (in this
case, it’s X7 server with Mellanox card):
[root@yourQperfClient ~]# numactl -m0 -N0 qperf 20.20.20.101 -v -uu -ub --time 60 --wait_server 20 -oo msg_size:4K:1024K:*2tcp_lat
Rather than incur the scheduling latency from queue_work_on, we can instead switch to running on the next timer tick, on the same core. This also batches things a bit more -- once per jiffy -- which is okay now that mix_interrupt_randomness() can credit multiple bits at once.
--- drivers/char/random.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
drivers/char/random.c +11 -7
@@ -893,17 +893,20 @@ struct fast_pool {unsigned long pool[4 ];unsigned long last;unsigned int count; -struct work_struct mix; +struct timer_list mix; }; +static void mix_interrupt_randomness (struct timer_list *work); + static DEFINE_PER_CPU(struct fast_pool, irq_randomness) = { #ifdef CONFIG_64BIT #define FASTMIX_PERM SIPHASH_PERMUTATION - .pool = { SIPHASH_CONST_0, SIPHASH_CONST_1, SIPHASH_CONST_2, SIPHASH_CONST_3 } + .pool = { SIPHASH_CONST_0, SIPHASH_CONST_1, SIPHASH_CONST_2, SIPHASH_CONST_3 }, #else #define FASTMIX_PERM HSIPHASH_PERMUTATION - .pool = { HSIPHASH_CONST_0, HSIPHASH_CONST_1, HSIPHASH_CONST_2, HSIPHASH_CONST_3 } + .pool = { HSIPHASH_CONST_0, HSIPHASH_CONST_1, HSIPHASH_CONST_2, HSIPHASH_CONST_3 }, #endif + .mix = __TIMER_INITIALIZER(mix_interrupt_randomness, 0) }; /*
@@ -945,7 +948,7 @@ int __cold random_online_cpu(unsigned in }#endif -static void mix_interrupt_randomness (struct work_struct *work) +static void mix_interrupt_randomness (struct timer_list *work) { struct fast_pool *fast_pool = container_of(work, struct fast_pool, mix);/*
@@ -999,10 +1002,11 @@ void add_interrupt_randomness(int irq)if (new_count <1024 && !time_is_before_jiffies (fast_pool->last +HZ ))return ; -if (unlikely (!fast_pool->mix.func)) -INIT_WORK (&fast_pool->mix, mix_interrupt_randomness); fast_pool->count |=MIX_INFLIGHT ; -queue_work_on (raw_smp_processor_id (), system_highpri_wq, &fast_pool->mix); +if (!timer_pending (&fast_pool->mix)) { + fast_pool->mix.expires = jiffies; +add_timer_on (&fast_pool->mix,raw_smp_processor_id ()); + } }EXPORT_SYMBOL_GPL (add_interrupt_randomness);
Greg Kroah-Hartman
maintainerPATCH 30/38 wifi: cfg80211: fix u8 overflow in cfg80211_update_notlisted_nontrans()
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
commit aebe9f4639b13a1f4e9a6b42cdd2e38c617b442d upstream.
In the copy code of the elements, we do the following calculation to reach the end of the MBSSID element:
/* copy the IEs after MBSSID */ cpy_len = mbssid[1] + 2;
This looks fine, however, cpy_len is a u8, the same as mbssid[1], so the addition of two can overflow. In this case the subsequent memcpy() will overflow the allocated buffer, since it copies 256 bytes too much due to the way the allocation and memcpy() sizes are calculated.
Fix this by using size_t for the cpy_len variable.
This fixes CVE-2022-41674.
--- net/wireless/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/scan.c +1 -1
@@ -1717,7 +1717,7 @@ cfg80211_update_notlisted_nontrans(strucsize_t new_ie_len;struct cfg80211_bss_ies *new_ies;const struct cfg80211_bss_ies *old; -u8 cpy_len; +size_t cpy_len;lockdep_assert_held (&wiphy_to_rdev (wiphy)->bss_lock);
Greg Kroah-Hartman
maintainerPATCH 31/38 wifi: cfg80211/mac80211: reject bad MBSSID elements
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
commit 8f033d2becc24aa6bfd2a5c104407963560caabc upstream.
Per spec, the maximum value for the MaxBSSID ('n') indicator is 8, and the minimum is 1 since a multiple BSSID set with just one BSSID doesn't make sense (the # of BSSIDs is limited by 2^n).
Limit this in the parsing in both cfg80211 and mac80211, rejecting any elements with an invalid value.
This fixes potentially bad shifts in the processing of these inside the cfg80211_gen_new_bssid() function later.
I found this during the investigation of CVE-2022-41674 fixed by the previous patch.
--- net/mac80211/util.c | 2 ++ net/wireless/scan.c | 2 ++ 2 files changed, 4 insertions(+)
net/mac80211/util.c +2 -0
@@ -1289,6 +1289,8 @@ static size_t ieee802_11_find_bssid_proffor_each_element_id (elem,WLAN_EID_MULTIPLE_BSSID , start, len) {if (elem->datalen <2 )continue ; +if (elem->data[0 ] <1 || elem->data[0 ] >8 ) +continue ;for_each_element (sub, elem->data +1 , elem->datalen -1 ) {u8 new_bssid[ETH_ALEN ];
net/wireless/scan.c +2 -0
@@ -1582,6 +1582,8 @@ static void cfg80211_parse_mbssid_data(sfor_each_element_id (elem,WLAN_EID_MULTIPLE_BSSID , ie, ielen) {if (elem->datalen <4 )continue ; +if (elem->data[0 ] <1 || (int )elem->data[0 ] >8 ) +continue ;for_each_element (sub, elem->data +1 , elem->datalen -1 ) {u8 profile_len;
Greg Kroah-Hartman
maintainerPATCH 32/38 wifi: cfg80211: ensure length byte is present before access
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
commit 567e14e39e8f8c6997a1378bc3be615afca86063 upstream.
When iterating the elements here, ensure the length byte is present before checking it to see if the entire element will fit into the buffer.
Longer term, we should rewrite this code using the type-safe element iteration macros that check all of this.
--- net/wireless/scan.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
net/wireless/scan.c +4 -2
@@ -265,7 +265,8 @@ static size_t cfg80211_gen_new_ie(const tmp_old =cfg80211_find_ie (WLAN_EID_SSID , ie, ielen); tmp_old = (tmp_old) ? tmp_old + tmp_old[1 ] +2 : ie; -while (tmp_old + tmp_old[1 ] +2 - ie <= ielen) { +while (tmp_old +2 - ie <= ielen && + tmp_old + tmp_old[1 ] +2 - ie <= ielen) {if (tmp_old[0 ] ==0 ) { tmp_old++;continue ;
@@ -325,7 +326,8 @@ static size_t cfg80211_gen_new_ie(const* copied to new ie, skip ssid, capability, bssid-index ie */ tmp_new = sub_copy; -while (tmp_new + tmp_new[1 ] +2 - sub_copy <= subie_len) { +while (tmp_new +2 - sub_copy <= subie_len && + tmp_new + tmp_new[1 ] +2 - sub_copy <= subie_len) {if (!(tmp_new[0 ] ==WLAN_EID_NON_TX_BSSID_CAP || tmp_new[0 ] ==WLAN_EID_SSID )) {memcpy (pos, tmp_new, tmp_new[1 ] +2 );
Greg Kroah-Hartman
maintainerPATCH 33/38 wifi: cfg80211: fix BSS refcounting bugs
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
commit 0b7808818cb9df6680f98996b8e9a439fa7bcc2f upstream.
There are multiple refcounting bugs related to multi-BSSID:
- In bss_ref_get(), if the BSS has a hidden_beacon_bss, then the bss pointer is overwritten before checking for the transmitted BSS, which is clearly wrong. Fix this by using the bss_from_pub() macro.
- In cfg80211_bss_update() we copy the transmitted_bss pointer from tmp into new, but then if we release new, we'll unref it erroneously. We already set the pointer and ref it, but need to NULL it since it was copied from the tmp data.
- In cfg80211_inform_single_bss_data(), if adding to the non- transmitted list fails, we unlink the BSS and yet still we return it, but this results in returning an entry without a reference. We shouldn't return it anyway if it was broken enough to not get added there.
This fixes CVE-2022-42720.
--- net/wireless/scan.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-)
net/wireless/scan.c +14 -13
@@ -104,18 +104,12 @@ static inline void bss_ref_get(struct cflockdep_assert_held (&rdev->bss_lock); bss->refcount++; -if (bss->pub.hidden_beacon_bss) { - bss =container_of (bss->pub.hidden_beacon_bss, - struct cfg80211_internal_bss, - pub); - bss->refcount++; - } -if (bss->pub.transmitted_bss) { - bss =container_of (bss->pub.transmitted_bss, - struct cfg80211_internal_bss, - pub); - bss->refcount++; - } + +if (bss->pub.hidden_beacon_bss) +bss_from_pub (bss->pub.hidden_beacon_bss)->refcount++; + +if (bss->pub.transmitted_bss) +bss_from_pub (bss->pub.transmitted_bss)->refcount++; } static inline void bss_ref_put(struct cfg80211_registered_device *rdev,
@@ -1233,6 +1227,8 @@ cfg80211_bss_update(struct cfg80211_regi new->refcount =1 ;INIT_LIST_HEAD (&new->hidden_list);INIT_LIST_HEAD (&new->pub.nontrans_list); +/* we'll set this later if it was non-NULL */ + new->pub.transmitted_bss =NULL ;if (rcu_access_pointer (tmp->pub.proberesp_ies)) { hidden =rb_find_bss (rdev, tmp,BSS_CMP_HIDE_ZLEN );
@@ -1462,10 +1458,15 @@ cfg80211_inform_single_bss_data(struct wspin_lock_bh (&rdev->bss_lock);if (cfg80211_add_nontrans_list (non_tx_data->tx_bss, &res->pub)) { -if (__cfg80211_unlink_bss (rdev, res)) +if (__cfg80211_unlink_bss (rdev, res)) { rdev->bss_generation++; + res =NULL ; + } }spin_unlock_bh (&rdev->bss_lock); + +if (!res) +return NULL ; }trace_cfg80211_return_bss (&res->pub);
Greg Kroah-Hartman
maintainerPATCH 34/38 wifi: cfg80211: avoid nontransmitted BSS list corruption
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
commit bcca852027e5878aec911a347407ecc88d6fff7f upstream.
If a non-transmitted BSS shares enough information (both SSID and BSSID!) with another non-transmitted BSS of a different AP, then we can find and update it, and then try to add it to the non-transmitted BSS list. We do a search for it on the transmitted BSS, but if it's not there (but belongs to another transmitted BSS), the list gets corrupted.
Since this is an erroneous situation, simply fail the list insertion in this case and free the non-transmitted BSS.
This fixes CVE-2022-42721.
--- net/wireless/scan.c | 9 +++++++++ 1 file changed, 9 insertions(+)
net/wireless/scan.c +9 -0
@@ -386,6 +386,15 @@ cfg80211_add_nontrans_list(struct cfg802rcu_read_unlock (); +/* +* This is a bit weird - it's not on the list, but already on another +* one! The only way that could happen is if there's some BSSID/SSID +* shared by multiple APs in their multi-BSSID profiles, potentially +* with hidden SSID mixed in ... ignore it. +*/ +if (!list_empty (&nontrans_bss->nontrans_list)) +return -EINVAL ; +/* add to the list */ list_add_tail (&nontrans_bss->nontrans_list, &trans_bss->nontrans_list);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 35/38 wifi: mac80211_hwsim: avoid mac80211 warning on bad rate
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
commit 1833b6f46d7e2830251a063935ab464256defe22 upstream.
If the tool on the other side (e.g. wmediumd) gets confused about the rate, we hit a warning in mac80211. Silence that by effectively duplicating the check here and dropping the frame silently (in mac80211 it's dropped with the warning).
--- drivers/net/wireless/mac80211_hwsim.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/mac80211_hwsim.c +2 -0
@@ -3411,6 +3411,8 @@ static int hwsim_cloned_frame_received_n rx_status.band = data2->channel->band; rx_status.rate_idx =nla_get_u32 (info->attrs[HWSIM_ATTR_RX_RATE ]); +if (rx_status.rate_idx >= data2->hw->wiphy->bands[rx_status.band]->n_bitrates) + goto out; rx_status.signal =nla_get_u32 (info->attrs[HWSIM_ATTR_SIGNAL ]); hdr = (void *)skb->data;
Greg Kroah-Hartman
maintainerPATCH 36/38 wifi: cfg80211: update hidden BSSes to avoid WARN_ON
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
commit c90b93b5b782891ebfda49d4e5da36632fefd5d1 upstream.
When updating beacon elements in a non-transmitted BSS, also update the hidden sub-entries to the same beacon elements, so that a future update through other paths won't trigger a WARN_ON().
The warning is triggered because the beacon elements in the hidden BSSes that are children of the BSS should always be the same as in the parent.
--- net/wireless/scan.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-)
net/wireless/scan.c +20 -11
@@ -1099,6 +1099,23 @@ struct cfg80211_non_tx_bss {u8 bssid_index; }; +static void cfg80211_update_hidden_bsses (struct cfg80211_internal_bss *known, +const struct cfg80211_bss_ies *new_ies, +const struct cfg80211_bss_ies *old_ies) +{ +struct cfg80211_internal_bss *bss; + +/* Assign beacon IEs to all sub entries */ +list_for_each_entry (bss, &known->hidden_list, hidden_list) { +const struct cfg80211_bss_ies *ies; + + ies =rcu_access_pointer (bss->pub.beacon_ies); +WARN_ON (ies != old_ies); + +rcu_assign_pointer (bss->pub.beacon_ies, new_ies); + } +} + static bool cfg80211_update_known_bss(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *known,
@@ -1122,7 +1139,6 @@ cfg80211_update_known_bss(struct cfg8021kfree_rcu ((struct cfg80211_bss_ies *)old, rcu_head); }else if (rcu_access_pointer (new->pub.beacon_ies)) {const struct cfg80211_bss_ies *old; -struct cfg80211_internal_bss *bss;if (known->pub.hidden_beacon_bss && !list_empty (&known->hidden_list)) {
@@ -1150,16 +1166,7 @@ cfg80211_update_known_bss(struct cfg8021if (old ==rcu_access_pointer (known->pub.ies))rcu_assign_pointer (known->pub.ies, new->pub.beacon_ies); -/* Assign beacon IEs to all sub entries */ -list_for_each_entry (bss, &known->hidden_list, hidden_list) { -const struct cfg80211_bss_ies *ies; - - ies =rcu_access_pointer (bss->pub.beacon_ies); -WARN_ON (ies != old); - -rcu_assign_pointer (bss->pub.beacon_ies, - new->pub.beacon_ies); - } +cfg80211_update_hidden_bsses (known, new->pub.beacon_ies, old);if (old)kfree_rcu ((struct cfg80211_bss_ies *)old, rcu_head);
@@ -1798,6 +1805,8 @@ cfg80211_update_notlisted_nontrans(struc }else { old =rcu_access_pointer (nontrans_bss->beacon_ies);rcu_assign_pointer (nontrans_bss->beacon_ies, new_ies); +cfg80211_update_hidden_bsses (bss_from_pub (nontrans_bss), + new_ies, old);rcu_assign_pointer (nontrans_bss->ies, new_ies);if (old)kfree_rcu ((struct cfg80211_bss_ies *)old, rcu_head);
Greg Kroah-Hartman
maintainerPATCH 37/38 Input: xpad - add supported devices as contributed on github
In reply to Greg Kroah-HartmanFrom: Pavel Rojtberg <[email protected]>
commit b382c5e37344883dc97525d05f1f6b788f549985 upstream.
This is based on multiple commits at https://github.com/paroj/xpad
--- drivers/input/joystick/xpad.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/input/joystick/xpad.c +19 -0
@@ -112,6 +112,8 @@ static const struct xpad_device {u8 xtype; } xpad_device[] = { { 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 }, + { 0x03eb, 0xff01, "Wooting One (Legacy)", 0, XTYPE_XBOX360 }, + { 0x03eb, 0xff02, "Wooting Two (Legacy)", 0, XTYPE_XBOX360 }, { 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX }, { 0x044f, 0x0f03, "Thrustmaster Wheel", 0, XTYPE_XBOX }, { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
@@ -242,6 +244,7 @@ static const struct xpad_device { { 0x0f0d, 0x0063, "Hori Real Arcade Pro Hayabusa (USA) Xbox One", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, { 0x0f0d, 0x0067, "HORIPAD ONE", 0, XTYPE_XBOXONE }, { 0x0f0d, 0x0078, "Hori Real Arcade Pro V Kai Xbox One", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, + { 0x0f0d, 0x00c5, "Hori Fighting Commander ONE", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, { 0x0f30, 0x010b, "Philips Recoil", 0, XTYPE_XBOX }, { 0x0f30, 0x0202, "Joytech Advanced Controller", 0, XTYPE_XBOX }, { 0x0f30, 0x8888, "BigBen XBMiniPad Controller", 0, XTYPE_XBOX },
@@ -258,6 +261,7 @@ static const struct xpad_device { { 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, { 0x1430, 0xf801, "RedOctane Controller", 0, XTYPE_XBOX360 }, { 0x146b, 0x0601, "BigBen Interactive XBOX 360 Controller", 0, XTYPE_XBOX360 }, + { 0x146b, 0x0604, "Bigben Interactive DAIJA Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, { 0x1532, 0x0037, "Razer Sabertooth", 0, XTYPE_XBOX360 }, { 0x1532, 0x0a00, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, { 0x1532, 0x0a03, "Razer Wildcat", 0, XTYPE_XBOXONE },
@@ -322,6 +326,7 @@ static const struct xpad_device { { 0x24c6, 0x5502, "Hori Fighting Stick VX Alt", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, { 0x24c6, 0x5503, "Hori Fighting Edge", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, { 0x24c6, 0x5506, "Hori SOULCALIBUR V Stick", 0, XTYPE_XBOX360 }, + { 0x24c6, 0x5510, "Hori Fighting Commander ONE (Xbox 360/PC Mode)", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, { 0x24c6, 0x550d, "Hori GEM Xbox controller", 0, XTYPE_XBOX360 }, { 0x24c6, 0x550e, "Hori Real Arcade Pro V Kai 360", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, { 0x24c6, 0x551a, "PowerA FUSION Pro Controller", 0, XTYPE_XBOXONE },
@@ -331,6 +336,14 @@ static const struct xpad_device { { 0x24c6, 0x5b03, "Thrustmaster Ferrari 458 Racing Wheel", 0, XTYPE_XBOX360 }, { 0x24c6, 0x5d04, "Razer Sabertooth", 0, XTYPE_XBOX360 }, { 0x24c6, 0xfafe, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, + { 0x2563, 0x058d, "OneXPlayer Gamepad", 0, XTYPE_XBOX360 }, + { 0x2dc8, 0x2000, "8BitDo Pro 2 Wired Controller fox Xbox", 0, XTYPE_XBOXONE }, + { 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1200, "Wooting Two", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1210, "Wooting Lekker", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1220, "Wooting Two HE", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1300, "Wooting 60HE (AVR)", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1310, "Wooting 60HE (ARM)", 0, XTYPE_XBOX360 }, { 0x3285, 0x0607, "Nacon GC-100", 0, XTYPE_XBOX360 }, { 0x3767, 0x0101, "Fanatec Speedster 3 Forceshock Wheel", 0, XTYPE_XBOX }, { 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX },
@@ -416,6 +429,7 @@ static const signed short xpad_abs_triggstatic const struct usb_device_id xpad_table[] = { {USB_INTERFACE_INFO ('X' ,'B' ,0 ) },/* X-Box USB-IF not approved class */ XPAD_XBOX360_VENDOR (0x0079 ),/* GPD Win 2 Controller */ +XPAD_XBOX360_VENDOR (0x03eb ),/* Wooting Keyboards (Legacy) */ XPAD_XBOX360_VENDOR (0x044f ),/* Thrustmaster X-Box 360 controllers */ XPAD_XBOX360_VENDOR (0x045e ),/* Microsoft X-Box 360 controllers */ XPAD_XBOXONE_VENDOR (0x045e ),/* Microsoft X-Box One controllers */
@@ -426,6 +440,7 @@ static const struct usb_device_id xpad_t { USB_DEVICE(0x0738, 0x4540) }, /* Mad Catz Beat Pad */XPAD_XBOXONE_VENDOR (0x0738 ),/* Mad Catz FightStick TE 2 */ XPAD_XBOX360_VENDOR (0x07ff ),/* Mad Catz GamePad */ +XPAD_XBOX360_VENDOR (0x0c12 ),/* Zeroplus X-Box 360 controllers */ XPAD_XBOX360_VENDOR (0x0e6f ),/* 0x0e6f X-Box 360 controllers */ XPAD_XBOXONE_VENDOR (0x0e6f ),/* 0x0e6f X-Box One controllers */ XPAD_XBOX360_VENDOR(0x0f0d), /* Hori Controllers */
@@ -446,8 +461,12 @@ static const struct usb_device_id xpad_tXPAD_XBOXONE_VENDOR (0x20d6 ),/* PowerA Controllers */ XPAD_XBOX360_VENDOR (0x24c6 ),/* PowerA Controllers */ XPAD_XBOXONE_VENDOR (0x24c6 ),/* PowerA Controllers */ +XPAD_XBOX360_VENDOR (0x2563 ),/* OneXPlayer Gamepad */ +XPAD_XBOX360_VENDOR (0x260d ),/* Dareu H101 */ +XPAD_XBOXONE_VENDOR (0x2dc8 ),/* 8BitDo Pro 2 Wired Controller for Xbox */ XPAD_XBOXONE_VENDOR (0x2e24 ),/* Hyperkin Duke X-Box One pad */ XPAD_XBOX360_VENDOR (0x2f24 ),/* GameSir Controllers */ +XPAD_XBOX360_VENDOR (0x31e3 ),/* Wooting Keyboards */ XPAD_XBOX360_VENDOR(0x3285), /* Nacon GC-100 */ { } };
Greg Kroah-Hartman
maintainerPATCH 38/38 Input: xpad - fix wireless 360 controller breaking after suspend
In reply to Greg Kroah-HartmanFrom: Cameron Gutman <[email protected]>
commit a17b9841152e7f4621619902b347e2cc39c32996 upstream.
Suspending and resuming the system can sometimes cause the out URB to get hung after a reset_resume. This causes LED setting and force feedback to break on resume. To avoid this, just drop the reset_resume callback so the USB core rebinds xpad to the wireless pads on resume if a reset happened.
A nice side effect of this change is the LED ring on wireless controllers is now set correctly on system resume.
--- drivers/input/joystick/xpad.c | 1 - 1 file changed, 1 deletion(-)
drivers/input/joystick/xpad.c +0 -1
@@ -1983,7 +1983,6 @@ static struct usb_driver xpad_driver = { .disconnect = xpad_disconnect, .suspend = xpad_suspend, .resume = xpad_resume, - .reset_resume = xpad_resume, .id_table = xpad_table, };
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.4.218 release. There are 38 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 Sat, 15 Oct 2022 17:51:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.218-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.4.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.4.218 release. There are 38 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 Sat, 15 Oct 2022 17:51:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.218-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.4.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: 5.4.218-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-5.4.y
* git commit: 34b618a713e70b364e2d7e784cfb1a79c36bddc7
* git describe: v5.4.217-39-g34b618a713e7
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.4.y/build/v5.4.217-39-g34b618a713e7
## No Test Regressions (compared to v5.4.217)
## No Metric Regressions (compared to v5.4.217)
## No Test Fixes (compared to v5.4.217)
## No Metric Fixes (compared to v5.4.217)
## Test result summary
total: 72725, pass: 63087, fail: 850, skip: 8400, xfail: 388
## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 334 total, 334 passed, 0 failed
* arm64: 64 total, 59 passed, 5 failed
* i386: 31 total, 29 passed, 2 failed
* mips: 56 total, 56 passed, 0 failed
* parisc: 12 total, 12 passed, 0 failed
* powerpc: 63 total, 63 passed, 0 failed
* riscv: 27 total, 26 passed, 1 failed
* s390: 15 total, 15 passed, 0 failed
* sh: 24 total, 24 passed, 0 failed
* sparc: 12 total, 12 passed, 0 failed
* x86_64: 57 total, 55 passed, 2 failed
## Test suites summary
* fwts
* kselftest-android
* kselftest-arm64
* kselftest-arm64/arm64.btitest.bti_c_func
* kselftest-arm64/arm64.btitest.bti_j_func
* kselftest-arm64/arm64.btitest.bti_jc_func
* kselftest-arm64/arm64.btitest.bti_none_func
* kselftest-arm64/arm64.btitest.nohint_func
* kselftest-arm64/arm64.btitest.paciasp_func
* kselftest-arm64/arm64.nobtitest.bti_c_func
* kselftest-arm64/arm64.nobtitest.bti_j_func
* kselftest-arm64/arm64.nobtitest.bti_jc_func
* kselftest-arm64/arm64.nobtitest.bti_none_func
* kselftest-arm64/arm64.nobtitest.nohint_func
* kselftest-arm64/arm64.nobtitest.paciasp_func
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-firmware
* kselftest-fpu
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-net-forwarding
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-vm
* kselftest-x86
* kselftest-zram
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* 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-open-posix-tests
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-syscalls
* ltp-tracing
* network-basic-tests
* packetdrill
* perf
* perf/Zstd-perf.data-compression
* rcutorture
* v4l2-compliance
* vdso
--
Linaro LKFT
https://lkft.linaro.org
Hi Greg,
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.4.218 release. There are 38 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 Sat, 15 Oct 2022 17:51:33 +0000. Anything received after that time might be too late.
Build test (gcc version 11.3.1 20220925):
mips: 65 configs -> no failure
arm: 106 configs -> no failure
arm64: 2 configs -> no failurex86_64: 4 configs -> no failure
alpha allmodconfig -> no failure
powerpc allmodconfig -> no failure
riscv allmodconfig -> no failure
s390 allmodconfig -> no failure
xtensa allmodconfig -> no failure
Boot test:x86_64: Booted on my test laptop. No regression.x86_64: Booted on qemu. No regression. [1]
[1]. https://openqa.qa.codethink.co.uk/tests/1987
Signature · 2 lines
Regards Sudip
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.4.218 release. There are 38 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 Sat, 15 Oct 2022 17:51:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.218-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.4.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.4.218 release. There are 38 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 Sat, 15 Oct 2022 17:51:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.218-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.4.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.4:
10 builds: 10 pass, 0 fail
26 boots: 26 pass, 0 fail
59 tests: 59 pass, 0 failLinux version: 5.4.218-rc1-g34b618a713e7
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04Jon
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.4.218 release. There are 38 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 Sat, 15 Oct 2022 17:51:33 +0000. Anything received after that time might be too late.
Build results:
total: 161 pass: 161 fail: 0 Qemu test results: total: 447 pass: 447 fail: 0
Guenter
Quoted 14 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.4.218 release. There are 38 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 Sat, 15 Oct 2022 17:51:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.218-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.4.y
and the diffstat can be found below.
Quoted 5 lines
thanks,
greg k-h
-------------
Tested on arm64 and x86 for 5.4.218-rc1,
Kernel repo:https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Branch: linux-5.4.y
Version: 5.4.218-rc1
Commit: 72c6935a2da6775f61b0345fddc80d0a37c66a4f
Compiler: gcc version 7.3.0 (GCC)
arm64:
--------------------------------------------------------------------
Testcase Result Summary:
total: 9017
passed: 9017
failed: 0
timeout: 0
--------------------------------------------------------------------
x86:
--------------------------------------------------------------------
Testcase Result Summary:
total: 9017
passed: 9017
failed: 0
timeout: 0
--------------------------------------------------------------------