6.15.3-rc1 review
Subsystems (10)
Greg Kroah-Hartman
maintainerPATCH 230/780 scsi: smartpqi: Fix smp_processor_id() call trace for preemptible kernels
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yi Zhang <[email protected]>
[ Upstream commit 42d033cf4b517e91c187ad2fbd7b30fdc6d2d62c ]
Correct kernel call trace when calling smp_processor_id() when called in preemptible kernels by using raw_smp_processor_id().
smp_processor_id() checks to see if preemption is disabled and if not, issue an error message followed by a call to dump_stack().
Brief example of call trace:
kernel: check_preemption_disabled: 436 callbacks suppressed
kernel: BUG: using smp_processor_id() in preemptible [00000000]
code: kworker/u1025:0/2354
kernel: caller is pqi_scsi_queue_command+0x183/0x310 [smartpqi]
kernel: CPU: 129 PID: 2354 Comm: kworker/u1025:0
kernel: ...
kernel: Workqueue: writeback wb_workfn (flush-253:0)
kernel: Call Trace:
kernel: <TASK>
kernel: dump_stack_lvl+0x34/0x48
kernel: check_preemption_disabled+0xdd/0xe0
kernel: pqi_scsi_queue_command+0x183/0x310 [smartpqi]
kernel: ...--- drivers/scsi/smartpqi/smartpqi_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/smartpqi/smartpqi_init.c +2 -2
@@ -5990,7 +5990,7 @@ static bool pqi_is_parity_write_stream(struct pqi_ctrl_info *ctrl_info, pqi_stream_data->next_lba = rmd.first_block + rmd.block_cnt; pqi_stream_data->last_accessed = jiffies; -per_cpu_ptr (device->raid_io_stats,smp_processor_id ())->write_stream_cnt++; +per_cpu_ptr (device->raid_io_stats,raw_smp_processor_id ())->write_stream_cnt++;return true; }
@@ -6069,7 +6069,7 @@ static int pqi_scsi_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scm rc =pqi_raid_bypass_submit_scsi_cmd (ctrl_info, device, scmd, queue_group);if (rc ==0 || rc ==SCSI_MLQUEUE_HOST_BUSY ) { raid_bypassed = true; -per_cpu_ptr (device->raid_io_stats,smp_processor_id ())->raid_bypass_cnt++; +per_cpu_ptr (device->raid_io_stats,raw_smp_processor_id ())->raid_bypass_cnt++; } }if (!raid_bypassed)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 231/780 crypto/krb5: Fix change to use SG miter to use offset
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <[email protected]>
[ Upstream commit eed848871c96d4b5a7b06307755b75abd0cc7a06 ]
The recent patch to make the rfc3961 simplified code use sg_miter rather than manually walking the scatterlist to hash the contents of a buffer described by that scatterlist failed to take the starting offset into account.
This is indicated by the selftests reporting:
krb5: Running aes128-cts-hmac-sha256-128 mic
krb5: !!! TESTFAIL crypto/krb5/selftest.c:446
krb5: MIC mismatchFix this by calling sg_miter_skip() before doing the loop to advance by the offset.
This only affects packet signing modes and not full encryption in RxGK because, for full encryption, the message digest is handled inside the authenc and krb5enc drivers.
Note: Nothing in linus/master uses the krb5lib, though the bug is there. It is used by AF_RXRPC's RxGK implementation in -next, no need to backport.
--- crypto/krb5/rfc3961_simplified.c | 1 + 1 file changed, 1 insertion(+)
crypto/krb5/rfc3961_simplified.c +1 -0
@@ -89,6 +89,7 @@ int crypto_shash_update_sg(struct shash_desc *desc, struct scatterlist *sg,sg_miter_start (&miter, sg,sg_nents (sg),SG_MITER_FROM_SG |SG_MITER_LOCAL ); +sg_miter_skip (&miter, offset);for (i =0 ; i < len; i += n) {sg_miter_next (&miter); n =min (miter.length, len - i);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 232/780 selftests/bpf: Fix kmem_cache iterator draining
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: T.J. Mercier <[email protected]>
[ Upstream commit 38d976c32d85ef12dcd2b8a231196f7049548477 ]
The closing parentheses around the read syscall is misplaced, causing single byte reads from the iterator instead of buf sized reads. While the end result is the same, many more read calls than necessary are performed.
$ tools/testing/selftests/bpf/vmtest.sh "./test_progs -t kmem_cache_iter" 145/1 kmem_cache_iter/check_task_struct:OK 145/2 kmem_cache_iter/check_slabinfo:OK 145/3 kmem_cache_iter/open_coded_iter:OK 145 kmem_cache_iter:OK Summary: 1/3 PASSED, 0 SKIPPED, 0 FAILED
--- tools/testing/selftests/bpf/prog_tests/kmem_cache_iter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/kmem_cache_iter.c +1 -1
@@ -104,7 +104,7 @@ void test_kmem_cache_iter(void) goto destroy;memset (buf,0 ,sizeof (buf)); -while (read (iter_fd, buf,sizeof (buf) >0 )) { +while (read (iter_fd, buf,sizeof (buf)) >0 ) {/* Read out all contents */ printf ("%s" , buf); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 233/780 libbpf: Use proper errno value in linker
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anton Protopopov <[email protected]>
[ Upstream commit 358b1c0f56ebb6996fcec7dcdcf6bae5dcbc8b6c ]
Return values of the linker_append_sec_data() and the linker_append_elf_relos() functions are propagated all the way up to users of libbpf API. In some error cases these functions return -1 which will be seen as -EPERM from user's point of view. Instead, return a more reasonable -EINVAL.
--- tools/lib/bpf/linker.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/bpf/linker.c +2 -2
@@ -1376,7 +1376,7 @@ static int linker_append_sec_data(struct bpf_linker *linker, struct src_obj *obj }else {if (!secs_match (dst_sec, src_sec)) {pr_warn ("ELF sections %s are incompatible\n" , src_sec->sec_name); -return -1 ; +return -EINVAL ; }/* "license" and "version" sections are deduped */
@@ -2223,7 +2223,7 @@ static int linker_append_elf_relos(struct bpf_linker *linker, struct src_obj *ob } }else if (!secs_match (dst_sec, src_sec)) {pr_warn ("sections %s are not compatible\n" , src_sec->sec_name); -return -1 ; +return -EINVAL ; }/* shdr->sh_link points to SYMTAB */
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 234/780 bpf: Allow XDP dev-bound programs to perform XDP_REDIRECT into maps
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Bianconi <[email protected]>
[ Upstream commit 714070c4cb7a10ff57450a618a936775f3036245 ]
In the current implementation if the program is dev-bound to a specific device, it will not be possible to perform XDP_REDIRECT into a DEVMAP or CPUMAP even if the program is running in the driver NAPI context and it is not attached to any map entry. This seems in contrast with the explanation available in bpf_prog_map_compatible routine.
Fix the issue introducing __bpf_prog_map_compatible utility routine in order to avoid bpf_prog_is_dev_bound() check running bpf_check_tail_call() at program load time (bpf_prog_select_runtime()).
Continue forbidding to attach a dev-bound program to XDP maps (BPF_MAP_TYPE_PROG_ARRAY, BPF_MAP_TYPE_DEVMAP and BPF_MAP_TYPE_CPUMAP).
--- kernel/bpf/core.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-)
kernel/bpf/core.c +16 -11
@@ -2358,8 +2358,8 @@ static unsigned int __bpf_prog_ret0_warn(const void *ctx,return 0 ; } -bool bpf_prog_map_compatible (struct bpf_map *map, -const struct bpf_prog *fp) +static bool __bpf_prog_map_compatible (struct bpf_map *map, +const struct bpf_prog *fp) {enum bpf_prog_type prog_type =resolve_prog_type (fp);bool ret;
@@ -2368,14 +2368,6 @@ bool bpf_prog_map_compatible(struct bpf_map *map,if (fp->kprobe_override)return false; -/* XDP programs inserted into maps are not guaranteed to run on -* a particular netdev (and can run outside driver context entirely -* in the case of devmap and cpumap). Until device checks -* are implemented, prohibit adding dev-bound programs to program maps. -*/ -if (bpf_prog_is_dev_bound (aux)) -return false; -spin_lock (&map->owner.lock);if (!map->owner.type) {/* There's no owner yet where we could check for
@@ -2409,6 +2401,19 @@ bool bpf_prog_map_compatible(struct bpf_map *map,return ret; } +bool bpf_prog_map_compatible (struct bpf_map *map,const struct bpf_prog *fp) +{ +/* XDP programs inserted into maps are not guaranteed to run on +* a particular netdev (and can run outside driver context entirely +* in the case of devmap and cpumap). Until device checks +* are implemented, prohibit adding dev-bound programs to program maps. +*/ +if (bpf_prog_is_dev_bound (fp->aux)) +return false; + +return __bpf_prog_map_compatible (map, fp); +} +static int bpf_check_tail_call (const struct bpf_prog *fp) {struct bpf_prog_aux *aux = fp->aux;
@@ -2421,7 +2426,7 @@ static int bpf_check_tail_call(const struct bpf_prog *fp)if (!map_type_contains_progs (map))continue ; -if (!bpf_prog_map_compatible (map, fp)) { +if (!__bpf_prog_map_compatible (map, fp)) { ret = -EINVAL ; goto out; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 235/780 netfilter: bridge: Move specific fragmented packet to slow_path instead of dropping it
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Huajian Yang <[email protected]>
[ Upstream commit aa04c6f45b9224b949aa35d4fa5f8d0ba07b23d4 ]
The config NF_CONNTRACK_BRIDGE will change the bridge forwarding for fragmented packets.
The original bridge does not know that it is a fragmented packet and forwards it directly, after NF_CONNTRACK_BRIDGE is enabled, function nf_br_ip_fragment and br_ip6_fragment will check the headroom.
In original br_forward, insufficient headroom of skb may indeed exist, but there's still a way to save the skb in the device driver after dev_queue_xmit.So droping the skb will change the original bridge forwarding in some cases.
--- net/bridge/netfilter/nf_conntrack_bridge.c | 12 ++++++------ net/ipv6/netfilter.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-)
net/bridge/netfilter/nf_conntrack_bridge.c +6 -6
@@ -60,19 +60,19 @@ static int nf_br_ip_fragment(struct net *net, struct sock *sk,struct ip_fraglist_iter iter;struct sk_buff *frag; -if (first_len - hlen > mtu || -skb_headroom (skb) < ll_rs) +if (first_len - hlen > mtu) goto blackhole; -if (skb_cloned (skb)) +if (skb_cloned (skb) || +skb_headroom (skb) < ll_rs) goto slow_path; skb_walk_frags(skb, frag) { -if (frag->len > mtu || -skb_headroom (frag) < hlen + ll_rs) +if (frag->len > mtu) goto blackhole; -if (skb_shared (frag)) +if (skb_shared (frag) || +skb_headroom (frag) < hlen + ll_rs) goto slow_path; }
net/ipv6/netfilter.c +6 -6
@@ -164,20 +164,20 @@ int br_ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,struct ip6_fraglist_iter iter;struct sk_buff *frag2; -if (first_len - hlen > mtu || -skb_headroom (skb) < (hroom +sizeof (struct frag_hdr ))) +if (first_len - hlen > mtu) goto blackhole; -if (skb_cloned (skb)) +if (skb_cloned (skb) || +skb_headroom (skb) < (hroom +sizeof (struct frag_hdr ))) goto slow_path; skb_walk_frags(skb, frag2) { -if (frag2->len > mtu || -skb_headroom (frag2) < (hlen + hroom +sizeof (struct frag_hdr ))) +if (frag2->len > mtu) goto blackhole;/* Partially cloned skb? */ -if (skb_shared (frag2)) +if (skb_shared (frag2) || +skb_headroom (frag2) < (hlen + hroom +sizeof (struct frag_hdr ))) goto slow_path; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 236/780 netfilter: nft_quota: match correctly when the quota just depleted
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhongqiu Duan <[email protected]>
[ Upstream commit bfe7cfb65c753952735c3eed703eba9a8b96a18d ]
The xt_quota compares skb length with remaining quota, but the nft_quota compares it with consumed bytes.
The xt_quota can match consumed bytes up to quota at maximum. But the nft_quota break match when consumed bytes equal to quota.
i.e., nft_quota match consumed bytes in [0, quota - 1], not [0, quota].
--- net/netfilter/nft_quota.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
net/netfilter/nft_quota.c +13 -7
@@ -19,10 +19,16 @@ struct nft_quota { };static inline bool nft_overquota (struct nft_quota *priv, -const struct sk_buff *skb) +const struct sk_buff *skb, +bool *report) { -return atomic64_add_return (skb->len, priv->consumed) >= -atomic64_read (&priv->quota); +u64 consumed =atomic64_add_return (skb->len, priv->consumed); +u64 quota =atomic64_read (&priv->quota); + +if (report) + *report = consumed >= quota; + +return consumed > quota; }static inline bool nft_quota_invert (struct nft_quota *priv)
@@ -34,7 +40,7 @@ static inline void nft_quota_do_eval(struct nft_quota *priv,struct nft_regs *regs, const struct nft_pktinfo *pkt) { - if (nft_overquota(priv, pkt->skb) ^ nft_quota_invert(priv)) + if (nft_overquota(priv, pkt->skb, NULL) ^ nft_quota_invert(priv)) regs->verdict.code = NFT_BREAK; }
@@ -51,13 +57,13 @@ static void nft_quota_obj_eval(struct nft_object *obj, const struct nft_pktinfo *pkt) {struct nft_quota *priv =nft_obj_data (obj); -bool overquota; +bool overquota, report; - overquota =nft_overquota (priv, pkt->skb); + overquota =nft_overquota (priv, pkt->skb, &report);if (overquota ^nft_quota_invert (priv)) regs->verdict.code =NFT_BREAK ; -if (overquota && +if (report && !test_and_set_bit (NFT_QUOTA_DEPLETED_BIT , &priv->flags))nft_obj_notify (nft_net (pkt), obj->key.table, obj,0 ,0 ,NFT_MSG_NEWOBJ ,0 ,nft_pf (pkt),0 ,GFP_ATOMIC );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 237/780 netfilter: nft_set_pipapo: prevent overflow in lookup table allocation
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pablo Neira Ayuso <[email protected]>
[ Upstream commit 4c5c6aa9967dbe55bd017bb509885928d0f31206 ]
When calculating the lookup table size, ensure the following multiplication does not overflow:
- desc->field_len[] maximum value is U8_MAX multiplied by NFT_PIPAPO_GROUPS_PER_BYTE(f) that can be 2, worst case.
- NFT_PIPAPO_BUCKETS(f->bb) is 2^8, worst case.
- sizeof(unsigned long), from sizeof(*f->lt), lt in struct nft_pipapo_field.
Then, use check_mul_overflow() to multiply by bucket size and then use check_add_overflow() to the alignment for avx2 (if needed). Finally, add lt_size_check_overflow() helper and use it to consolidate this.
While at it, replace leftover allocation using the GFP_KERNEL to GFP_KERNEL_ACCOUNT for consistency, in pipapo_resize().
--- net/netfilter/nft_set_pipapo.c | 58 ++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 14 deletions(-)
net/netfilter/nft_set_pipapo.c +44 -14
@@ -683,6 +683,30 @@ static int pipapo_realloc_mt(struct nft_pipapo_field *f,return 0 ; } + +/** +* lt_calculate_size() - Get storage size for lookup table with overflow check +* @groups: Amount of bit groups +* @bb: Number of bits grouped together in lookup table buckets +* @bsize: Size of each bucket in lookup table, in longs +* +* Return: allocation size including alignment overhead, negative on overflow +*/ +static ssize_t lt_calculate_size (unsigned int groups,unsigned int bb, +unsigned int bsize) +{ +ssize_t ret = groups *NFT_PIPAPO_BUCKETS (bb) *sizeof (long ); + +if (check_mul_overflow (ret, bsize, &ret)) +return -1 ; +if (check_add_overflow (ret,NFT_PIPAPO_ALIGN_HEADROOM , &ret)) +return -1 ; +if (ret >INT_MAX ) +return -1 ; + +return ret; +} +/** * pipapo_resize() - Resize lookup or mapping table, or both * @f: Field containing lookup and mapping tables
@@ -701,6 +725,7 @@ static int pipapo_resize(struct nft_pipapo_field *f,long *new_lt =NULL , *new_p, *old_lt = f->lt, *old_p;unsigned int new_bucket_size, copy;int group, bucket, err; +ssize_t lt_size;if (rules >=NFT_PIPAPO_RULE0_MAX )return -ENOSPC ;
@@ -719,10 +744,11 @@ static int pipapo_resize(struct nft_pipapo_field *f,else copy = new_bucket_size; - new_lt =kvzalloc (f->groups *NFT_PIPAPO_BUCKETS (f->bb) * - new_bucket_size *sizeof (*new_lt) + -NFT_PIPAPO_ALIGN_HEADROOM , -GFP_KERNEL ); + lt_size =lt_calculate_size (f->groups, f->bb, new_bucket_size); +if (lt_size <0 ) +return -ENOMEM ; + + new_lt =kvzalloc (lt_size,GFP_KERNEL_ACCOUNT );if (!new_lt)return -ENOMEM ;
@@ -907,7 +933,7 @@ static void pipapo_lt_bits_adjust(struct nft_pipapo_field *f) {unsigned int groups, bb;unsigned long *new_lt; -size_t lt_size; +ssize_t lt_size; lt_size = f->groups *NFT_PIPAPO_BUCKETS (f->bb) * f->bsize *sizeof (*f->lt);
@@ -917,15 +943,17 @@ static void pipapo_lt_bits_adjust(struct nft_pipapo_field *f) groups = f->groups *2 ; bb =NFT_PIPAPO_GROUP_BITS_LARGE_SET ; - lt_size = groups *NFT_PIPAPO_BUCKETS (bb) * f->bsize * -sizeof (*f->lt); + lt_size =lt_calculate_size (groups, bb, f->bsize); +if (lt_size <0 ) +return ; }else if (f->bb ==NFT_PIPAPO_GROUP_BITS_LARGE_SET && lt_size <NFT_PIPAPO_LT_SIZE_LOW ) { groups = f->groups /2 ; bb =NFT_PIPAPO_GROUP_BITS_SMALL_SET ; - lt_size = groups *NFT_PIPAPO_BUCKETS (bb) * f->bsize * -sizeof (*f->lt); + lt_size =lt_calculate_size (groups, bb, f->bsize); +if (lt_size <0 ) +return ;/* Don't increase group width if the resulting lookup table size * would exceed the upper size threshold for a "small" set.
@@ -936,7 +964,7 @@ static void pipapo_lt_bits_adjust(struct nft_pipapo_field *f)return ; } - new_lt =kvzalloc (lt_size +NFT_PIPAPO_ALIGN_HEADROOM ,GFP_KERNEL_ACCOUNT ); + new_lt =kvzalloc (lt_size,GFP_KERNEL_ACCOUNT );if (!new_lt)return ;
@@ -1451,13 +1479,15 @@ static struct nft_pipapo_match *pipapo_clone(struct nft_pipapo_match *old)for (i =0 ; i < old->field_count; i++) {unsigned long *new_lt; +ssize_t lt_size;memcpy (dst, src, offsetof(struct nft_pipapo_field , lt)); - new_lt =kvzalloc (src->groups *NFT_PIPAPO_BUCKETS (src->bb) * - src->bsize *sizeof (*dst->lt) + -NFT_PIPAPO_ALIGN_HEADROOM , -GFP_KERNEL_ACCOUNT ); + lt_size =lt_calculate_size (src->groups, src->bb, src->bsize); +if (lt_size <0 ) + goto out_lt; + + new_lt =kvzalloc (lt_size,GFP_KERNEL_ACCOUNT );if (!new_lt) goto out_lt;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 238/780 IB/cm: Drop lockdep assert and WARN when freeing old msg
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vlad Dumitrescu <[email protected]>
[ Upstream commit 7590649ee7af381a9d1153143026dec124c5798e ]
The send completion handler can run after cm_id has advanced to another message. The cm_id lock is not needed in this case, but a recent change re-used cm_free_priv_msg(), which asserts that the lock is held and WARNs if the cm_id's currently outstanding msg is different than the one being freed.
--- drivers/infiniband/core/cm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/core/cm.c +2 -1
@@ -3786,7 +3786,8 @@ static void cm_process_send_error(struct cm_id_private *cm_id_priv,spin_lock_irq (&cm_id_priv->lock);if (msg != cm_id_priv->msg) {spin_unlock_irq (&cm_id_priv->lock); -cm_free_priv_msg (msg); +cm_free_msg (msg); +cm_deref_id (cm_id_priv);return ; }cm_free_priv_msg (msg);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 239/780 RDMA/mlx5: Fix error flow upon firmware failure for RQ destruction
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Patrisious Haddad <[email protected]>
[ Upstream commit 5d2ea5aebbb2f3ebde4403f9c55b2b057e5dd2d6 ]
Upon RQ destruction if the firmware command fails which is the last resource to be destroyed some SW resources were already cleaned regardless of the failure.
Now properly rollback the object to its original state upon such failure.
In order to avoid a use-after free in case someone tries to destroy the object again, which results in the following kernel trace:refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 37589 at lib/refcount.c:28 refcount_warn_saturate+0xf4/0x148 Modules linked in: rdma_ucm(OE) rdma_cm(OE) iw_cm(OE) ib_ipoib(OE) ib_cm(OE) ib_umad(OE) mlx5_ib(OE) rfkill mlx5_core(OE) mlxdevm(OE) ib_uverbs(OE) ib_core(OE) psample mlxfw(OE) mlx_compat(OE) macsec tls pci_hyperv_intf sunrpc vfat fat virtio_net net_failover failover fuse loop nfnetlink vsock_loopback vmw_vsock_virtio_transport_common vmw_vsock_vmci_transport vmw_vmci vsock xfs crct10dif_ce ghash_ce sha2_ce sha256_arm64 sha1_ce virtio_console virtio_gpu virtio_blk virtio_dma_buf virtio_mmio dm_mirror dm_region_hash dm_log dm_mod xpmem(OE) CPU: 0 UID: 0 PID: 37589 Comm: python3 Kdump: loaded Tainted: G OE ------- --- 6.12.0-54.el10.aarch64 #1 Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : refcount_warn_saturate+0xf4/0x148 lr : refcount_warn_saturate+0xf4/0x148
sp : ffff80008b81b7e0
x29: ffff80008b81b7e0 x28: ffff000133d51600 x27: 0000000000000001
x26: 0000000000000000 x25: 00000000ffffffea x24: ffff00010ae80f00
x23: ffff00010ae80f80 x22: ffff0000c66e5d08 x21: 0000000000000000
x20: ffff0000c66e0000 x19: ffff00010ae80340 x18: 0000000000000006
x17: 0000000000000000 x16: 0000000000000020 x15: ffff80008b81b37f
x14: 0000000000000000 x13: 2e656572662d7265 x12: ffff80008283ef78
x11: ffff80008257efd0 x10: ffff80008283efd0 x9 : ffff80008021ed90 x8 : 0000000000000001 x7 : 00000000000bffe8 x6 : c0000000ffff7fff x5 : ffff0001fb8e3408 x4 : 0000000000000000 x3 : ffff800179993000 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000133d51600
Call trace: refcount_warn_saturate+0xf4/0x148 mlx5_core_put_rsc+0x88/0xa0 [mlx5_ib] mlx5_core_destroy_rq_tracked+0x64/0x98 [mlx5_ib] mlx5_ib_destroy_wq+0x34/0x80 [mlx5_ib] ib_destroy_wq_user+0x30/0xc0 [ib_core] uverbs_free_wq+0x28/0x58 [ib_uverbs] destroy_hw_idr_uobject+0x34/0x78 [ib_uverbs] uverbs_destroy_uobject+0x48/0x240 [ib_uverbs] __uverbs_cleanup_ufile+0xd4/0x1a8 [ib_uverbs] uverbs_destroy_ufile_hw+0x48/0x120 [ib_uverbs] ib_uverbs_close+0x2c/0x100 [ib_uverbs] __fput+0xd8/0x2f0 __fput_sync+0x50/0x70 __arm64_sys_close+0x40/0x90 invoke_syscall.constprop.0+0x74/0xd0 do_el0_svc+0x48/0xe8 el0_svc+0x44/0x1d0 el0t_64_sync_handler+0x120/0x130 el0t_64_sync+0x1a4/0x1a8
--- drivers/infiniband/hw/mlx5/qpc.c | 30 ++++++++++++++++++++++++++++-- include/linux/mlx5/driver.h | 1 + 2 files changed, 29 insertions(+), 2 deletions(-)
drivers/infiniband/hw/mlx5/qpc.c +28 -2
@@ -21,8 +21,10 @@ mlx5_get_rsc(struct mlx5_qp_table *table, u32 rsn)spin_lock_irqsave (&table->lock, flags); common =radix_tree_lookup (&table->tree, rsn); -if (common) +if (common && !common->invalid)refcount_inc (&common->refcount); +else + common =NULL ;spin_unlock_irqrestore (&table->lock, flags);
@@ -178,6 +180,18 @@ static int create_resource_common(struct mlx5_ib_dev *dev,return 0 ; } +static void modify_resource_common_state (struct mlx5_ib_dev *dev, +struct mlx5_core_qp *qp, +bool invalid) +{ +struct mlx5_qp_table *table = &dev->qp_table; +unsigned long flags; + +spin_lock_irqsave (&table->lock, flags); + qp->common.invalid = invalid; +spin_unlock_irqrestore (&table->lock, flags); +} +static void destroy_resource_common (struct mlx5_ib_dev *dev,struct mlx5_core_qp *qp) {
@@ -609,8 +623,20 @@ int mlx5_core_create_rq_tracked(struct mlx5_ib_dev *dev, u32 *in, int inlen,int mlx5_core_destroy_rq_tracked (struct mlx5_ib_dev *dev,struct mlx5_core_qp *rq) { +int ret; + +/* The rq destruction can be called again in case it fails, hence we +* mark the common resource as invalid and only once FW destruction +* is completed successfully we actually destroy the resources. +*/ +modify_resource_common_state (dev, rq, true); + ret =destroy_rq_tracked (dev, rq->qpn, rq->uid); +if (ret) { +modify_resource_common_state (dev, rq, false); +return ret; + }destroy_resource_common (dev, rq); -return destroy_rq_tracked (dev, rq->qpn, rq->uid); +return 0 ; }static void destroy_sq_tracked (struct mlx5_ib_dev *dev,u32 sqn,u16 uid)
include/linux/mlx5/driver.h +1 -0
@@ -398,6 +398,7 @@ struct mlx5_core_rsc_common {enum mlx5_res_type res;refcount_t refcount;struct completion free; +bool invalid; };struct mlx5_uars_page {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 240/780 bpf: Fix uninitialized values in BPF_{CORE,PROBE}_READ
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anton Protopopov <[email protected]>
[ Upstream commit 41d4ce6df3f4945341ec509a840cc002a413b6cc ]
With the latest LLVM bpf selftests build will fail with the following error message:
progs/profiler.inc.h:710:31: error: default initialization of an object of type 'typeof ((parent_task)->real_cred->uid.val)' (aka 'const unsigned int') leaves the object uninitialized and is incompatible with C++ [-Werror,-Wdefault-const-init-unsafe]
710 | proc_exec_data->parent_uid = BPF_CORE_READ(parent_task, real_cred, uid.val);
| ^
tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:520:35: note: expanded from macro 'BPF_CORE_READ'
520 | ___type((src), a, ##__VA_ARGS__) __r; \
| ^This happens because BPF_CORE_READ (and other macro) declare the variable __r using the ___type macro which can inherit const modifier from intermediate types.
Fix this by using __typeof_unqual__, when supported. (And when it is not supported, the problem shouldn't appear, as older compilers haven't complained.)
--- tools/lib/bpf/bpf_core_read.h | 6 ++++++ 1 file changed, 6 insertions(+)
tools/lib/bpf/bpf_core_read.h +6 -0
@@ -388,7 +388,13 @@ extern void *bpf_rdonly_cast(const void *obj, __u32 btf_id) __ksym __weak;#define ___arrow10 (a, b, c, d, e, f, g, h, i, j) a->b->c->d->e->f->g->h->i->j#define ___arrow (...) ___apply(___arrow, ___narg(__VA_ARGS__))(__VA_ARGS__) +#if defined(__clang__) && (__clang_major__ >=19 ) +#define ___type (...) __typeof_unqual__(___arrow(__VA_ARGS__)) +#elif defined(__GNUC__) && (__GNUC__ >=14 ) +#define ___type (...) __typeof_unqual__(___arrow(__VA_ARGS__)) +#else #define ___type (...) typeof(___arrow(__VA_ARGS__)) +#endif #define ___read (read_fn, dst, src_type, src, accessor) \ read_fn((void *)(dst), sizeof(*(dst)), &((src_type)(src))->accessor)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 241/780 iommu/arm-smmu-v3: Fix incorrect return in arm_smmu_attach_dev
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qinxin Xia <[email protected]>
[ Upstream commit be5a2d3f8f9738ea1426e7d2243707164ed5bac2 ]
After commit 48e7b8e284e5 ("iommu/arm-smmu-v3: Remove arm_smmu_domain_finalise() during attach"), an error code is not returned on the attach path when the smmu does not match with the domain. This causes problems with VFIO because vfio_iommu_type1_attach_group() relies on this check to determine domain compatability.
Re-instate the -EINVAL return value when the SMMU doesn't match on the device attach path.
--- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +1 -1
@@ -2953,7 +2953,7 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev) smmu = master->smmu;if (smmu_domain->smmu != smmu) -return ret; +return -EINVAL ;if (smmu_domain->stage ==ARM_SMMU_DOMAIN_S1 ) { cdptr =arm_smmu_alloc_cd_ptr (master,IOMMU_NO_PASID );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 242/780 tracing: Move histogram trigger variables from stack to per CPU structure
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steven Rostedt <[email protected]>
[ Upstream commit 7ab0fc61ce73040f89b12d76a8279995ec283541 ]
The histogram trigger has three somewhat large arrays on the kernel stack:
unsigned long entries[HIST_STACKTRACE_DEPTH]; u64 var_ref_vals[TRACING_MAP_VARS_MAX]; char compound_key[HIST_KEY_SIZE_MAX];
Checking the function event_hist_trigger() stack frame size, it currently uses 816 bytes for its stack frame due to these variables!
Instead, allocate a per CPU structure that holds these arrays for each context level (normal, softirq, irq and NMI). That is, each CPU will have 4 of these structures. This will be allocated when the first histogram trigger is enabled and freed when the last is disabled. When the histogram callback triggers, it will request this structure. The request will disable preemption, get the per CPU structure at the index of the per CPU variable, and increment that variable.
The callback will use the arrays in this structure to perform its work and then release the structure. That in turn will simply decrement the per CPU index and enable preemption.
Moving the variables from the kernel stack to the per CPU structure brings the stack frame of event_hist_trigger() down to just 112 bytes.
--- kernel/trace/trace_events_hist.c | 120 +++++++++++++++++++++++++++---- 1 file changed, 105 insertions(+), 15 deletions(-)
kernel/trace/trace_events_hist.c +105 -15
@@ -5246,17 +5246,94 @@ hist_trigger_actions(struct hist_trigger_data *hist_data, } } +/* +* The hist_pad structure is used to save information to create +* a histogram from the histogram trigger. It's too big to store +* on the stack, so when the histogram trigger is initialized +* a percpu array of 4 hist_pad structures is allocated. +* This will cover every context from normal, softirq, irq and NMI +* in the very unlikely event that a tigger happens at each of +* these contexts and interrupts a currently active trigger. +*/ +struct hist_pad { +unsigned long entries[HIST_STACKTRACE_DEPTH ]; +u64 var_ref_vals[TRACING_MAP_VARS_MAX ]; +char compound_key[HIST_KEY_SIZE_MAX ]; +}; + +static struct hist_pad __percpu *hist_pads; +static DEFINE_PER_CPU(int, hist_pad_cnt); +static refcount_t hist_pad_ref; + +/* One hist_pad for every context (normal, softirq, irq, NMI) */ +#define MAX_HIST_CNT 4 + +static int alloc_hist_pad (void ) +{ +lockdep_assert_held (&event_mutex); + +if (refcount_read (&hist_pad_ref)) { +refcount_inc (&hist_pad_ref); +return 0 ; + } + + hist_pads =__alloc_percpu (sizeof (struct hist_pad ) *MAX_HIST_CNT , + __alignof__(struct hist_pad )); +if (!hist_pads) +return -ENOMEM ; + +refcount_set (&hist_pad_ref,1 ); +return 0 ; +} + +static void free_hist_pad (void ) +{ +lockdep_assert_held (&event_mutex); + +if (!refcount_dec_and_test (&hist_pad_ref)) +return ; + +free_percpu (hist_pads); + hist_pads =NULL ; +} + +static struct hist_pad *get_hist_pad (void ) +{ +struct hist_pad *hist_pad; +int cnt; + +if (WARN_ON_ONCE (!hist_pads)) +return NULL ; + +preempt_disable (); + + hist_pad =per_cpu_ptr (hist_pads,smp_processor_id ()); + +if (this_cpu_read (hist_pad_cnt) ==MAX_HIST_CNT ) { +preempt_enable (); +return NULL ; + } + + cnt =this_cpu_inc_return (hist_pad_cnt) -1 ; + +return &hist_pad[cnt]; +} + +static void put_hist_pad (void ) +{ +this_cpu_dec (hist_pad_cnt); +preempt_enable (); +} +static void event_hist_trigger (struct event_trigger_data *data,struct trace_buffer *buffer,void *rec,struct ring_buffer_event *rbe) {struct hist_trigger_data *hist_data = data->private_data;bool use_compound_key = (hist_data->n_keys >1 ); -unsigned long entries[HIST_STACKTRACE_DEPTH ]; -u64 var_ref_vals[TRACING_MAP_VARS_MAX ]; -char compound_key[HIST_KEY_SIZE_MAX ];struct tracing_map_elt *elt =NULL ;struct hist_field *key_field; +struct hist_pad *hist_pad;u64 field_contents;void *key =NULL ;unsigned int i;
@@ -5264,12 +5341,18 @@ static void event_hist_trigger(struct event_trigger_data *data,if (unlikely (!rbe))return ; -memset (compound_key,0 , hist_data->key_size); + hist_pad =get_hist_pad (); +if (!hist_pad) +return ; + +memset (hist_pad->compound_key,0 , hist_data->key_size);for_each_hist_key_field (i, hist_data) { key_field = hist_data->fields[i];if (key_field->flags &HIST_FIELD_FL_STACKTRACE ) { +unsigned long *entries = hist_pad->entries; +memset (entries,0 ,HIST_STACKTRACE_SIZE );if (key_field->field) {unsigned long *stack, n_entries;
@@ -5293,26 +5376,31 @@ static void event_hist_trigger(struct event_trigger_data *data, }if (use_compound_key) -add_to_key (compound_key, key, key_field, rec); +add_to_key (hist_pad->compound_key, key, key_field, rec); }if (use_compound_key) - key = compound_key; + key = hist_pad->compound_key;if (hist_data->n_var_refs && - !resolve_var_refs (hist_data, key, var_ref_vals, false)) -return ; + !resolve_var_refs (hist_data, key, hist_pad->var_ref_vals, false)) + goto out; elt =tracing_map_insert (hist_data->map, key);if (!elt) -return ; + goto out; -hist_trigger_elt_update (hist_data, elt, buffer, rec, rbe, var_ref_vals); +hist_trigger_elt_update (hist_data, elt, buffer, rec, rbe, hist_pad->var_ref_vals); -if (resolve_var_refs (hist_data, key, var_ref_vals, true)) -hist_trigger_actions (hist_data, elt, buffer, rec, rbe, key, var_ref_vals); +if (resolve_var_refs (hist_data, key, hist_pad->var_ref_vals, true)) { +hist_trigger_actions (hist_data, elt, buffer, rec, rbe, + key, hist_pad->var_ref_vals); + }hist_poll_wakeup (); + + out: +put_hist_pad (); } static void hist_trigger_stacktrace_print(struct seq_file *m,
@@ -6157,6 +6245,9 @@ static int event_hist_trigger_init(struct event_trigger_data *data) {struct hist_trigger_data *hist_data = data->private_data; +if (alloc_hist_pad () <0 ) +return -ENOMEM ; +if (!data->ref && hist_data->attrs->name)save_named_trigger (hist_data->attrs->name, data);
@@ -6201,6 +6292,7 @@ static void event_hist_trigger_free(struct event_trigger_data *data)destroy_hist_data (hist_data); } +free_hist_pad (); }static const struct event_trigger_ops event_hist_trigger_ops = {
@@ -6216,9 +6308,7 @@ static int event_hist_trigger_named_init(struct event_trigger_data *data)save_named_trigger (data->named_data->name, data); -event_hist_trigger_init (data->named_data); - -return 0 ; +return event_hist_trigger_init (data->named_data); }static void event_hist_trigger_named_free (struct event_trigger_data *data)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 243/780 clk: qcom: camcc-sm6350: Add *_wait_val values for GDSCs
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit e7b1c13280ad866f3b935f6c658713c41db61635 ]
Compared to the msm-4.19 driver the mainline GDSC driver always sets the bits for en_rest, en_few & clk_dis, and if those values are not set per-GDSC in the respective driver then the default value from the GDSC driver is used. The downstream driver only conditionally sets clk_dis_wait_val if qcom,clk-dis-wait-val is given in devicetree.
Correct this situation by explicitly setting those values. For all GDSCs the reset value of those bits are used.
--- drivers/clk/qcom/camcc-sm6350.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
drivers/clk/qcom/camcc-sm6350.c +18 -0
@@ -1695,6 +1695,9 @@ static struct clk_branch camcc_sys_tmr_clk = {static struct gdsc bps_gdsc = { .gdscr =0x6004 , + .en_rest_wait_val =0x2 , + .en_few_wait_val =0x2 , + .clk_dis_wait_val =0xf , .pd = { .name ="bps_gdsc" , },
@@ -1704,6 +1707,9 @@ static struct gdsc bps_gdsc = {static struct gdsc ipe_0_gdsc = { .gdscr =0x7004 , + .en_rest_wait_val =0x2 , + .en_few_wait_val =0x2 , + .clk_dis_wait_val =0xf , .pd = { .name ="ipe_0_gdsc" , },
@@ -1713,6 +1719,9 @@ static struct gdsc ipe_0_gdsc = {static struct gdsc ife_0_gdsc = { .gdscr =0x9004 , + .en_rest_wait_val =0x2 , + .en_few_wait_val =0x2 , + .clk_dis_wait_val =0xf , .pd = { .name ="ife_0_gdsc" , },
@@ -1721,6 +1730,9 @@ static struct gdsc ife_0_gdsc = {static struct gdsc ife_1_gdsc = { .gdscr =0xa004 , + .en_rest_wait_val =0x2 , + .en_few_wait_val =0x2 , + .clk_dis_wait_val =0xf , .pd = { .name ="ife_1_gdsc" , },
@@ -1729,6 +1741,9 @@ static struct gdsc ife_1_gdsc = {static struct gdsc ife_2_gdsc = { .gdscr =0xb004 , + .en_rest_wait_val =0x2 , + .en_few_wait_val =0x2 , + .clk_dis_wait_val =0xf , .pd = { .name ="ife_2_gdsc" , },
@@ -1737,6 +1752,9 @@ static struct gdsc ife_2_gdsc = {static struct gdsc titan_top_gdsc = { .gdscr =0x14004 , + .en_rest_wait_val =0x2 , + .en_few_wait_val =0x2 , + .clk_dis_wait_val =0xf , .pd = { .name ="titan_top_gdsc" , },
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 244/780 clk: qcom: dispcc-sm6350: Add *_wait_val values for GDSCs
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit 673989d27123618afab56df1143a75454178b4ae ]
Compared to the msm-4.19 driver the mainline GDSC driver always sets the bits for en_rest, en_few & clk_dis, and if those values are not set per-GDSC in the respective driver then the default value from the GDSC driver is used. The downstream driver only conditionally sets clk_dis_wait_val if qcom,clk-dis-wait-val is given in devicetree.
Correct this situation by explicitly setting those values. For all GDSCs the reset value of those bits are used.
--- drivers/clk/qcom/dispcc-sm6350.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/clk/qcom/dispcc-sm6350.c +3 -0
@@ -681,6 +681,9 @@ static struct clk_branch disp_cc_xo_clk = {static struct gdsc mdss_gdsc = { .gdscr =0x1004 , + .en_rest_wait_val =0x2 , + .en_few_wait_val =0x2 , + .clk_dis_wait_val =0xf , .pd = { .name ="mdss_gdsc" , },
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 245/780 clk: qcom: gcc-sm6350: Add *_wait_val values for GDSCs
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit afdfd829a99e467869e3ca1955fb6c6e337c340a ]
Compared to the msm-4.19 driver the mainline GDSC driver always sets the bits for en_rest, en_few & clk_dis, and if those values are not set per-GDSC in the respective driver then the default value from the GDSC driver is used. The downstream driver only conditionally sets clk_dis_wait_val if qcom,clk-dis-wait-val is given in devicetree.
Correct this situation by explicitly setting those values. For all GDSCs the reset value of those bits are used.
--- drivers/clk/qcom/gcc-sm6350.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/clk/qcom/gcc-sm6350.c +6 -0
@@ -2320,6 +2320,9 @@ static struct clk_branch gcc_video_xo_clk = {static struct gdsc usb30_prim_gdsc = { .gdscr =0x1a004 , + .en_rest_wait_val =0x2 , + .en_few_wait_val =0x2 , + .clk_dis_wait_val =0xf , .pd = { .name ="usb30_prim_gdsc" , },
@@ -2328,6 +2331,9 @@ static struct gdsc usb30_prim_gdsc = {static struct gdsc ufs_phy_gdsc = { .gdscr =0x3a004 , + .en_rest_wait_val =0x2 , + .en_few_wait_val =0x2 , + .clk_dis_wait_val =0xf , .pd = { .name ="ufs_phy_gdsc" , },
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 246/780 clk: qcom: gpucc-sm6350: Add *_wait_val values for GDSCs
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit d988b0b866c2aeb23aa74022b5bbd463165a7a33 ]
Compared to the msm-4.19 driver the mainline GDSC driver always sets the bits for en_rest, en_few & clk_dis, and if those values are not set per-GDSC in the respective driver then the default value from the GDSC driver is used. The downstream driver only conditionally sets clk_dis_wait_val if qcom,clk-dis-wait-val is given in devicetree.
Correct this situation by explicitly setting those values. For all GDSCs the reset value of those bits are used, with the exception of gpu_cx_gdsc which has an explicit value (qcom,clk-dis-wait-val = <8>).
--- drivers/clk/qcom/gpucc-sm6350.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/clk/qcom/gpucc-sm6350.c +6 -0
@@ -413,6 +413,9 @@ static struct clk_branch gpu_cc_gx_vsense_clk = {static struct gdsc gpu_cx_gdsc = { .gdscr =0x106c , .gds_hw_ctrl =0x1540 , + .en_rest_wait_val =0x2 , + .en_few_wait_val =0x2 , + .clk_dis_wait_val =0x8 , .pd = { .name ="gpu_cx_gdsc" , },
@@ -423,6 +426,9 @@ static struct gdsc gpu_cx_gdsc = {static struct gdsc gpu_gx_gdsc = { .gdscr =0x100c , .clamp_io_ctrl =0x1508 , + .en_rest_wait_val =0x2 , + .en_few_wait_val =0x2 , + .clk_dis_wait_val =0x2 , .pd = { .name ="gpu_gx_gdsc" , .power_on = gdsc_gx_do_nothing_enable,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 247/780 bpftool: Fix regression of "bpftool cgroup tree" EINVAL on older kernels
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: YiFei Zhu <[email protected]>
[ Upstream commit 43745d11bfd9683abdf08ad7a5cc403d6a9ffd15 ]
If cgroup_has_attached_progs queries an attach type not supported by the running kernel, due to the kernel being older than the bpftool build, it would encounter an -EINVAL from BPF_PROG_QUERY syscall.
Prior to commit 98b303c9bf05 ("bpftool: Query only cgroup-related attach types"), this EINVAL would be ignored by the function, allowing the function to only consider supported attach types. The commit changed so that, instead of querying all attach types, only attach types from the array cgroup_attach_types is queried. The assumption is that because these are only cgroup attach types, they should all be supported. Unfortunately this assumption may be false when the kernel is older than the bpftool build, where the attach types queried by bpftool is not yet implemented in the kernel. This would result in errors such as:
$ bpftool cgroup tree CgroupPath ID AttachType AttachFlags Name Error: can't query bpf programs attached to /sys/fs/cgroup: Invalid argument
This patch restores the logic of ignoring EINVAL from prior to that patch.
--- tools/bpf/bpftool/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/bpf/bpftool/cgroup.c +1 -1
@@ -221,7 +221,7 @@ static int cgroup_has_attached_progs(int cgroup_fd)for (i =0 ; i <ARRAY_SIZE (cgroup_attach_types); i++) {int count =count_attached_bpf_progs (cgroup_fd, cgroup_attach_types[i]); -if (count <0 ) +if (count <0 && errno !=EINVAL )return -1 ;if (count >0 ) {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 248/780 clk: bcm: rpi: Add NULL check in raspberrypi_clk_register()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Henry Martin <[email protected]>
[ Upstream commit 73c46d9a93d071ca69858dea3f569111b03e549e ]
devm_kasprintf() returns NULL when memory allocation fails. Currently, raspberrypi_clk_register() does not check for this case, which results in a NULL pointer dereference.
Add NULL check after devm_kasprintf() to prevent this issue.
--- drivers/clk/bcm/clk-raspberrypi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clk/bcm/clk-raspberrypi.c +2 -0
@@ -286,6 +286,8 @@ static struct clk_hw *raspberrypi_clk_register(struct raspberrypi_clk *rpi, init.name =devm_kasprintf (rpi->dev,GFP_KERNEL ,"fw-clk-%s" , rpi_firmware_clk_names[id]); +if (!init.name) +return ERR_PTR (-ENOMEM ); init.ops = &raspberrypi_firmware_clk_ops; init.flags =CLK_GET_RATE_NOCACHE ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 249/780 clk: test: Forward-declare struct of_phandle_args in kunit/clk.h
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Richard Fitzgerald <[email protected]>
[ Upstream commit 7a0c1872ee7db25d711ac29a55f36844a7108308 ]
Add a forward-declare of struct of_phandle_args to prevent the compiler warning:
../include/kunit/clk.h:29:63: warning: ‘struct of_phandle_args’ declared inside parameter list will not be visible outside of this definition or declaration
struct clk_hw *(*get)(struct of_phandle_args *clkspec, void *data),
--- include/kunit/clk.h | 1 + 1 file changed, 1 insertion(+)
include/kunit/clk.h +1 -0
@@ -6,6 +6,7 @@ struct clk;struct clk_hw ;struct device ;struct device_node ; +struct of_phandle_args ;struct kunit ; struct clk *
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 250/780 wifi: iwlfiwi: mvm: Fix the rate reporting
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilan Peer <[email protected]>
[ Upstream commit 8f7561209eda7d6998708f06376e8dd2dc52f3b8 ]
The rate validation in mac80211 considers a rate to be valid iff both the rate index and the count are positive. When the rate scaling is managed in the driver and not enough traffic passed to set the actual rate, the driver set the rate to be the optimal rate. However, the rate count is not set and thus the rate is considered not valid. Fix it by setting the count to 1.
--- drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/intel/iwlwifi/mvm/rs.c +2 -0
@@ -2,6 +2,7 @@/****************************************************************************** * * Copyright(c) 2005 - 2014, 2018 - 2023 Intel Corporation. All rights reserved. +* Copyright(c) 2025 Intel Corporation * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH *****************************************************************************/
@@ -2709,6 +2710,7 @@ static void rs_drv_get_rate(void *mvm_r, struct ieee80211_sta *sta, optimal_rate);iwl_mvm_hwrate_to_tx_rate_v1 (last_ucode_rate, info->band, &txrc->reported_rate); + txrc->reported_rate.count =1 ; }spin_unlock_bh (&lq_sta->pers.lock); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 251/780 rtla: Define _GNU_SOURCE in timerlat_bpf.c
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomas Glozar <[email protected]>
[ Upstream commit 8020361d51eea5145402e450d91b083bccdcd874 ]
Newer versions of glibc include a definition of struct sched_attr in bits/sched.h (included through sched.h which is included by rtla). Commit 0eecee340672 ("tools/rtla: fix collision with glibc sched_attr/sched_set_attr") has modified the definition of struct sched_attr in utils.h, so that it is only applied with older versions of glibc that do not define it, in order to prevent build failure.
The definition in bits/sched.h depends on _GNU_SOURCE. timerlat_bpf.c does not define _GNU_SOURCE, making it fall back to the definition in utils.h. The latter has two fields less, leading to shifted offsets of struct timerlat_params in timerlat_bpf_init.
Because of the shift, timerlat_bpf_init incorrectly reads params->entries as 0 for timerlat-hist and disables the creation of histogram maps, causing breakage in BPF sample collection mode:
$ rtla timerlat hist -d 1s Error pulling BPF data
Fix the issue by also defining _GNU_SOURCE in timerlat_bpf.c.
--- tools/tracing/rtla/src/timerlat_bpf.c | 1 + 1 file changed, 1 insertion(+)
tools/tracing/rtla/src/timerlat_bpf.c +1 -0
@@ -1,5 +1,6 @@// SPDX-License-Identifier: GPL-2.0 #ifdef HAVE_BPF_SKEL +#define _GNU_SOURCE#include "timerlat.h" #include "timerlat_bpf.h" #include "timerlat.skel.h"
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 252/780 efi/libstub: Describe missing out parameter in efi_load_initrd
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans Zhang <[email protected]>
[ Upstream commit c8e1927e7f7d63721e32ec41d27ccb0eb1a1b0fc ]
The function efi_load_initrd() had a documentation warning due to the missing description for the 'out' parameter. Add the parameter description to the kernel-doc comment to resolve the warning and improve API documentation.
Fixes the following compiler warning:drivers/firmware/efi/libstub/efi-stub-helper.c:611: warning: Function parameter or struct member 'out' not described in 'efi_load_initrd'
--- drivers/firmware/efi/libstub/efi-stub-helper.c | 1 + 1 file changed, 1 insertion(+)
drivers/firmware/efi/libstub/efi-stub-helper.c +1 -0
@@ -601,6 +601,7 @@ efi_status_t efi_load_initrd_cmdline(efi_loaded_image_t *image,* @image: EFI loaded image protocol * @soft_limit: preferred address for loading the initrd * @hard_limit: upper limit address for loading the initrd +* @out: pointer to store the address of the initrd table * * Return: status code */
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 253/780 selftests/bpf: Avoid passing out-of-range values to __retval()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peilin Ye <[email protected]>
[ Upstream commit 6e492ffcab6064cd7b317dc1f49fb9f92407aaa7 ]
Currently, we pass 0x1234567890abcdef to __retval() for the following two tests:
verifier_load_acquire/load_acquire_64
verifier_store_release/store_release_64
However, the upper 32 bits of that value are being ignored, since __retval() expects an int. Actually, the tests would still pass even if I change '__retval(0x1234567890abcdef)' to e.g. '__retval(0x90abcdef)'.
Restructure the tests a bit to test the entire 64-bit values properly. Do the same to their 8-, 16- and 32-bit variants as well to keep the style consistent.
--- .../bpf/progs/verifier_load_acquire.c | 40 +++++++++++++------ .../bpf/progs/verifier_store_release.c | 32 +++++++++++---- 2 files changed, 52 insertions(+), 20 deletions(-)
tools/testing/selftests/bpf/progs/verifier_load_acquire.c +28 -12
@@ -10,65 +10,81 @@ SEC("socket") __description("load-acquire, 8-bit") -__success __success_unpriv __retval(0x12) +__success __success_unpriv __retval(0) __naked void load_acquire_8(void) { asmvolatile ( +"r0 = 0;" "w1 = 0x12;" "*(u8 *)(r10 - 1) = w1;" -".8byte %[load_acquire_insn];" // w0 = load_acquire((u8 *)(r10 - 1)); +".8byte %[load_acquire_insn];" // w2 = load_acquire((u8 *)(r10 - 1)); +"if r2 == r1 goto 1f;" +"r0 = 1;" +"1:" "exit;" : : __imm_insn(load_acquire_insn, - BPF_ATOMIC_OP(BPF_B, BPF_LOAD_ACQ, BPF_REG_0, BPF_REG_10, -1)) + BPF_ATOMIC_OP(BPF_B, BPF_LOAD_ACQ, BPF_REG_2, BPF_REG_10, -1)) : __clobber_all); } SEC("socket") __description("load-acquire, 16-bit") -__success __success_unpriv __retval(0x1234) +__success __success_unpriv __retval(0) __naked void load_acquire_16(void) { asmvolatile ( +"r0 = 0;" "w1 = 0x1234;" "*(u16 *)(r10 - 2) = w1;" -".8byte %[load_acquire_insn];" // w0 = load_acquire((u16 *)(r10 - 2)); +".8byte %[load_acquire_insn];" // w2 = load_acquire((u16 *)(r10 - 2)); +"if r2 == r1 goto 1f;" +"r0 = 1;" +"1:" "exit;" : : __imm_insn(load_acquire_insn, - BPF_ATOMIC_OP(BPF_H, BPF_LOAD_ACQ, BPF_REG_0, BPF_REG_10, -2)) + BPF_ATOMIC_OP(BPF_H, BPF_LOAD_ACQ, BPF_REG_2, BPF_REG_10, -2)) : __clobber_all); } SEC("socket") __description("load-acquire, 32-bit") -__success __success_unpriv __retval(0x12345678) +__success __success_unpriv __retval(0) __naked void load_acquire_32(void) { asmvolatile ( +"r0 = 0;" "w1 = 0x12345678;" "*(u32 *)(r10 - 4) = w1;" -".8byte %[load_acquire_insn];" // w0 = load_acquire((u32 *)(r10 - 4)); +".8byte %[load_acquire_insn];" // w2 = load_acquire((u32 *)(r10 - 4)); +"if r2 == r1 goto 1f;" +"r0 = 1;" +"1:" "exit;" : : __imm_insn(load_acquire_insn, - BPF_ATOMIC_OP(BPF_W, BPF_LOAD_ACQ, BPF_REG_0, BPF_REG_10, -4)) + BPF_ATOMIC_OP(BPF_W, BPF_LOAD_ACQ, BPF_REG_2, BPF_REG_10, -4)) : __clobber_all); } SEC("socket") __description("load-acquire, 64-bit") -__success __success_unpriv __retval(0x1234567890abcdef) +__success __success_unpriv __retval(0) __naked void load_acquire_64(void) { asmvolatile ( +"r0 = 0;" "r1 = 0x1234567890abcdef ll;" "*(u64 *)(r10 - 8) = r1;" -".8byte %[load_acquire_insn];" // r0 = load_acquire((u64 *)(r10 - 8)); +".8byte %[load_acquire_insn];" // r2 = load_acquire((u64 *)(r10 - 8)); +"if r2 == r1 goto 1f;" +"r0 = 1;" +"1:" "exit;" : : __imm_insn(load_acquire_insn, - BPF_ATOMIC_OP(BPF_DW, BPF_LOAD_ACQ, BPF_REG_0, BPF_REG_10, -8)) + BPF_ATOMIC_OP(BPF_DW, BPF_LOAD_ACQ, BPF_REG_2, BPF_REG_10, -8)) : __clobber_all); }
tools/testing/selftests/bpf/progs/verifier_store_release.c +24 -8
@@ -11,13 +11,17 @@ SEC("socket") __description("store-release, 8-bit") -__success __success_unpriv __retval(0x12) +__success __success_unpriv __retval(0) __naked void store_release_8(void) { asm volatile ( + "r0 = 0;" "w1 = 0x12;" ".8byte %[store_release_insn];" // store_release((u8 *)(r10 - 1), w1); - "w0 = *(u8 *)(r10 - 1);" + "w2 = *(u8 *)(r10 - 1);" + "if r2 == r1 goto 1f;" + "r0 = 1;" +"1:" "exit;" : : __imm_insn(store_release_insn,
@@ -27,13 +31,17 @@ __naked void store_release_8(void) SEC("socket") __description("store-release, 16-bit") -__success __success_unpriv __retval(0x1234) +__success __success_unpriv __retval(0) __naked void store_release_16(void) { asm volatile ( + "r0 = 0;" "w1 = 0x1234;" ".8byte %[store_release_insn];" // store_release((u16 *)(r10 - 2), w1); - "w0 = *(u16 *)(r10 - 2);" + "w2 = *(u16 *)(r10 - 2);" + "if r2 == r1 goto 1f;" + "r0 = 1;" +"1:" "exit;" : : __imm_insn(store_release_insn,
@@ -43,13 +51,17 @@ __naked void store_release_16(void) SEC("socket") __description("store-release, 32-bit") -__success __success_unpriv __retval(0x12345678) +__success __success_unpriv __retval(0) __naked void store_release_32(void) { asm volatile ( + "r0 = 0;" "w1 = 0x12345678;" ".8byte %[store_release_insn];" // store_release((u32 *)(r10 - 4), w1); - "w0 = *(u32 *)(r10 - 4);" + "w2 = *(u32 *)(r10 - 4);" + "if r2 == r1 goto 1f;" + "r0 = 1;" +"1:" "exit;" : : __imm_insn(store_release_insn,
@@ -59,13 +71,17 @@ __naked void store_release_32(void) SEC("socket") __description("store-release, 64-bit") -__success __success_unpriv __retval(0x1234567890abcdef) +__success __success_unpriv __retval(0) __naked void store_release_64(void) { asm volatile ( + "r0 = 0;" "r1 = 0x1234567890abcdef ll;" ".8byte %[store_release_insn];" // store_release((u64 *)(r10 - 8), r1); - "r0 = *(u64 *)(r10 - 8);" + "r2 = *(u64 *)(r10 - 8);" + "if r2 == r1 goto 1f;" + "r0 = 1;" +"1:" "exit;" : : __imm_insn(store_release_insn,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 254/780 selftests/bpf: Fix caps for __xlated/jited_unpriv
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luis Gerhorst <[email protected]>
[ Upstream commit cf15cdc0f0f39a5c6315200808ec3e3995b0c2d2 ]
Currently, __xlated_unpriv and __jited_unpriv do not work because the BPF syscall will overwrite info.jited_prog_len and info.xlated_prog_len with 0 if the process is not bpf_capable(). This bug was not noticed before, because there is no test that actually uses __xlated_unpriv/__jited_unpriv.
To resolve this, simply restore the capabilities earlier (but still after loading the program). Adding this here unconditionally is fine because the function first checks that the capabilities were initialized before attempting to restore them.
This will be important later when we add tests that check whether a speculation barrier was inserted in the correct location.
--- tools/testing/selftests/bpf/test_loader.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
tools/testing/selftests/bpf/test_loader.c +8 -6
@@ -1042,6 +1042,14 @@ void run_subtest(struct test_loader *tester,emit_verifier_log (tester->log_buf, false/*force*/ );validate_msgs (tester->log_buf, &subspec->expect_msgs, emit_verifier_log); +/* Restore capabilities because the kernel will silently ignore requests +* for program info (such as xlated program text) if we are not +* bpf-capable. Also, for some reason test_verifier executes programs +* with all capabilities restored. Do the same here. +*/ +if (restore_capabilities (&caps)) + goto tobj_cleanup; +if (subspec->expect_xlated.cnt) { err =get_xlated_program_text (bpf_program__fd (tprog), tester->log_buf, tester->log_buf_sz);
@@ -1067,12 +1075,6 @@ void run_subtest(struct test_loader *tester, }if (should_do_test_run (spec, subspec)) { -/* For some reason test_verifier executes programs -* with all capabilities restored. Do the same here. -*/ -if (restore_capabilities (&caps)) - goto tobj_cleanup; -/* Do bpf_map__attach_struct_ops() for each struct_ops map. * This should trigger bpf_struct_ops->reg callback on kernel side. */
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 255/780 tracing: Rename event_trigger_alloc() to trigger_data_alloc()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steven Rostedt <[email protected]>
[ Upstream commit f2947c4b7d0f235621c5daf78aecfbd6e22c05e5 ]
The function event_trigger_alloc() creates an event_trigger_data descriptor and states that it needs to be freed via event_trigger_free(). This is incorrect, it needs to be freed by trigger_data_free() as event_trigger_free() adds ref counting.
Rename event_trigger_alloc() to trigger_data_alloc() and state that it needs to be freed via trigger_data_free(). This naming convention was introducing bugs.
--- kernel/trace/trace.h | 8 +++----- kernel/trace/trace_events_hist.c | 2 +- kernel/trace/trace_events_trigger.c | 16 ++++++++-------- 3 files changed, 12 insertions(+), 14 deletions(-)
kernel/trace/trace.h +3 -5
@@ -1772,6 +1772,9 @@ extern int event_enable_register_trigger(char *glob,extern void event_enable_unregister_trigger (char *glob,struct event_trigger_data *test,struct trace_event_file *file); +extern struct event_trigger_data * +trigger_data_alloc (struct event_command *cmd_ops,char *cmd,char *param, +void *private_data);extern void trigger_data_free (struct event_trigger_data *data);extern int event_trigger_init (struct event_trigger_data *data); extern int trace_event_trigger_enable_disable(struct trace_event_file *file,
@@ -1798,11 +1801,6 @@ extern bool event_trigger_check_remove(const char *glob);extern bool event_trigger_empty_param (const char *param);extern int event_trigger_separate_filter (char *param_and_filter,char **param,char **filter,bool param_required); -extern struct event_trigger_data * -event_trigger_alloc (struct event_command *cmd_ops, -char *cmd, -char *param, -void *private_data);extern int event_trigger_parse_num (char *trigger,struct event_trigger_data *trigger_data); extern int event_trigger_set_filter(struct event_command *cmd_ops,
kernel/trace/trace_events_hist.c +1 -1
@@ -6795,7 +6795,7 @@ static int event_hist_trigger_parse(struct event_command *cmd_ops,return PTR_ERR (hist_data); } - trigger_data =event_trigger_alloc (cmd_ops, cmd, param, hist_data); + trigger_data =trigger_data_alloc (cmd_ops, cmd, param, hist_data);if (!trigger_data) { ret = -ENOMEM ; goto out_free;
kernel/trace/trace_events_trigger.c +8 -8
@@ -804,7 +804,7 @@ int event_trigger_separate_filter(char *param_and_filter, char **param, }/** -* event_trigger_alloc - allocate and init event_trigger_data for a trigger +* trigger_data_alloc - allocate and init event_trigger_data for a trigger * @cmd_ops: The event_command operations for the trigger * @cmd: The cmd string * @param: The param string
@@ -815,14 +815,14 @@ int event_trigger_separate_filter(char *param_and_filter, char **param,* trigger_ops to assign to the event_trigger_data. @private_data can * also be passed in and associated with the event_trigger_data. * -* Use event_trigger_free() to free an event_trigger_data object. +* Use trigger_data_free() to free an event_trigger_data object. * * Return: The trigger_data object success, NULL otherwise */ -struct event_trigger_data *event_trigger_alloc (struct event_command *cmd_ops, -char *cmd, -char *param, -void *private_data) +struct event_trigger_data *trigger_data_alloc (struct event_command *cmd_ops, +char *cmd, +char *param, +void *private_data) {struct event_trigger_data *trigger_data;const struct event_trigger_ops *trigger_ops;
@@ -989,7 +989,7 @@ event_trigger_parse(struct event_command *cmd_ops,return ret; ret = -ENOMEM ; - trigger_data =event_trigger_alloc (cmd_ops, cmd, param, file); + trigger_data =trigger_data_alloc (cmd_ops, cmd, param, file);if (!trigger_data) goto out;
@@ -1793,7 +1793,7 @@ int event_enable_trigger_parse(struct event_command *cmd_ops, enable_data->enable = enable; enable_data->file = event_enable_file; - trigger_data =event_trigger_alloc (cmd_ops, cmd, param, enable_data); + trigger_data =trigger_data_alloc (cmd_ops, cmd, param, enable_data);if (!trigger_data) {kfree (enable_data); goto out;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 256/780 tracing: Fix error handling in event_trigger_parse()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miaoqian Lin <[email protected]>
[ Upstream commit c5dd28e7fb4f63475b50df4f58311df92939d011 ]
According to trigger_data_alloc() doc, trigger_data_free() should be used to free an event_trigger_data object. This fixes a mismatch introduced when kzalloc was replaced with trigger_data_alloc without updating the corresponding deallocation calls.
--- kernel/trace/trace_events_trigger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/trace_events_trigger.c +2 -2
@@ -995,7 +995,7 @@ event_trigger_parse(struct event_command *cmd_ops,if (remove) {event_trigger_unregister (cmd_ops, file, glob+1 , trigger_data); -kfree (trigger_data); +trigger_data_free (trigger_data); ret =0 ; goto out; }
@@ -1022,7 +1022,7 @@ event_trigger_parse(struct event_command *cmd_ops, out_free:event_trigger_reset_filter (cmd_ops, trigger_data); -kfree (trigger_data); +trigger_data_free (trigger_data); goto out; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 257/780 of: unittest: Unlock on error in unittest_data_add()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
[ Upstream commit 493e6cb63a21e9f009dc4c209fd311f2bb777656 ]
The of_overlay_mutex_unlock() was accidentally deleted if "of_root" is NULL. Change this to a goto unlock.
--- drivers/of/unittest.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/of/unittest.c +6 -4
@@ -2029,15 +2029,16 @@ static int __init unittest_data_add(void) rc =of_resolve_phandles (unittest_data_node);if (rc) {pr_err ("%s: Failed to resolve phandles (rc=%i)\n" , __func__, rc); -of_overlay_mutex_unlock (); -return -EINVAL ; + rc = -EINVAL ; + goto unlock; }/* attach the sub-tree to live tree */ if (!of_root) {pr_warn ("%s: no live tree to attach sub-tree\n" , __func__);kfree (unittest_data); -return -ENODEV ; + rc = -ENODEV ; + goto unlock; } EXPECT_BEGIN(KERN_INFO,
@@ -2056,9 +2057,10 @@ static int __init unittest_data_add(void)EXPECT_END (KERN_INFO ,"Duplicate name in testcase-data, renamed to \"duplicate-name#1\"" ); +unlock:of_overlay_mutex_unlock (); -return 0 ; +return rc; }#ifdef CONFIG_OF_OVERLAY
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 258/780 ktls, sockmap: Fix missing uncharge operation
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiayuan Chen <[email protected]>
[ Upstream commit 79f0c39ae7d3dc628c01b02f23ca5d01f9875040 ]
When we specify apply_bytes, we divide the msg into multiple segments, each with a length of 'send', and every time we send this part of the data using tcp_bpf_sendmsg_redir(), we use sk_msg_return_zero() to uncharge the memory of the specified 'send' size.
However, if the first segment of data fails to send, for example, the peer's buffer is full, we need to release all of the msg. When releasing the msg, we haven't uncharged the memory of the subsequent segments.
This modification does not make significant logical changes, but only fills in the missing uncharge places.
This issue has existed all along, until it was exposed after we added the
apply test in test_sockmap:
commit 3448ad23b34e ("selftests/bpf: Add apply_bytes test to test_txmsg_redir_wait_sndmem in test_sockmap")
--- net/tls/tls_sw.c | 7 +++++++ 1 file changed, 7 insertions(+)
net/tls/tls_sw.c +7 -0
@@ -908,6 +908,13 @@ static int bpf_exec_tx_verdict(struct sk_msg *msg, struct sock *sk, &msg_redir, send, flags);lock_sock (sk);if (err <0 ) { +/* Regardless of whether the data represented by +* msg_redir is sent successfully, we have already +* uncharged it via sk_msg_return_zero(). The +* msg->sg.size represents the remaining unprocessed +* data, which needs to be uncharged here. +*/ +sk_mem_uncharge (sk, msg->sg.size); *copied -=sk_msg_free_nocharge (sk, &msg_redir); msg->sg.size =0 ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 259/780 libbpf: Use proper errno value in nlattr
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anton Protopopov <[email protected]>
[ Upstream commit fd5fd538a1f4b34cee6823ba0ddda2f7a55aca96 ]
Return value of the validate_nla() function can be propagated all the way up to users of libbpf API. In case of error this libbpf version of validate_nla returns -1 which will be seen as -EPERM from user's point of view. Instead, return a more reasonable -EINVAL.
--- tools/lib/bpf/nlattr.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
tools/lib/bpf/nlattr.c +7 -8
@@ -63,16 +63,16 @@ static int validate_nla(struct nlattr *nla, int maxtype, minlen = nla_attr_minlen[pt->type];if (libbpf_nla_len (nla) < minlen) -return -1 ; +return -EINVAL ;if (pt->maxlen &&libbpf_nla_len (nla) > pt->maxlen) -return -1 ; +return -EINVAL ;if (pt->type ==LIBBPF_NLA_STRING ) {char *data =libbpf_nla_data (nla);if (data[libbpf_nla_len (nla) -1 ] !='\0' ) -return -1 ; +return -EINVAL ; }return 0 ;
@@ -118,19 +118,18 @@ int libbpf_nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head,if (policy) { err =validate_nla (nla, maxtype, policy);if (err <0 ) - goto errout; +return err; } -if (tb[type]) +if (tb[type]) {pr_warn ("Attribute of type %#x found multiple times in message, " "previous attribute is being ignored.\n" , type); + } tb[type] = nla; } - err =0 ; -errout: -return err; +return 0 ; }/**
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 260/780 pinctrl: qcom: correct the ngpios entry for QCS615
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lijuan Gao <[email protected]>
[ Upstream commit d18cdb975ba8aad7046ff82df1a963fa21082a45 ]
Correct the ngpios entry to account for the UFS_RESET pin being exported as a GPIO in addition to the real GPIOs, allowing the UFS driver to toggle it.
--- drivers/pinctrl/qcom/pinctrl-qcs615.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/qcom/pinctrl-qcs615.c +1 -1
@@ -1062,7 +1062,7 @@ static const struct msm_pinctrl_soc_data qcs615_tlmm = { .nfunctions = ARRAY_SIZE(qcs615_functions), .groups = qcs615_groups, .ngroups = ARRAY_SIZE(qcs615_groups), - .ngpios = 123, + .ngpios = 124, .tiles = qcs615_tiles, .ntiles = ARRAY_SIZE(qcs615_tiles), .wakeirq_map = qcs615_pdc_map,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 261/780 pinctrl: qcom: correct the ngpios entry for QCS8300
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lijuan Gao <[email protected]>
[ Upstream commit 32b5361a0d10627343b2ded76f05e5d591627fd6 ]
Correct the ngpios entry to account for the UFS_RESET pin, which is expected to be wired to the reset pin of the primary UFS memory and is exported as GPIOs in addition to the real GPIOs, allowing the UFS driver to toggle it.
--- drivers/pinctrl/qcom/pinctrl-qcs8300.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/qcom/pinctrl-qcs8300.c +1 -1
@@ -1204,7 +1204,7 @@ static const struct msm_pinctrl_soc_data qcs8300_pinctrl = { .nfunctions = ARRAY_SIZE(qcs8300_functions), .groups = qcs8300_groups, .ngroups = ARRAY_SIZE(qcs8300_groups), - .ngpios = 133, + .ngpios = 134, .wakeirq_map = qcs8300_pdc_map, .nwakeirq_map = ARRAY_SIZE(qcs8300_pdc_map), .egpio_func = 11,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 262/780 pinctrl: at91: Fix possible out-of-boundary access
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
[ Upstream commit 762ef7d1e6eefad9896560bfcb9bcf7f1b6df9c1 ]
at91_gpio_probe() doesn't check that given OF alias is not available or something went wrong when trying to get it. This might have consequences when accessing gpio_chips array with that value as an index. Note, that BUG() can be compiled out and hence won't actually perform the required checks.
--- drivers/pinctrl/pinctrl-at91.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/pinctrl/pinctrl-at91.c +5 -1
@@ -1819,12 +1819,16 @@ static int at91_gpio_probe(struct platform_device *pdev)struct at91_gpio_chip *at91_chip =NULL ;struct gpio_chip *chip;struct pinctrl_gpio_range *range; +int alias_idx;int ret =0 ;int irq, i; -int alias_idx =of_alias_get_id (np,"gpio" );uint32_t ngpio;char **names; + alias_idx =of_alias_get_id (np,"gpio" ); +if (alias_idx <0 ) +return alias_idx; +BUG_ON (alias_idx >=ARRAY_SIZE (gpio_chips));if (gpio_chips[alias_idx])return dev_err_probe (dev, -EBUSY ,"%d slot is occupied.\n" , alias_idx);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 263/780 bpf: Fix WARN() in get_bpf_raw_tp_regs
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tao Chen <[email protected]>
[ Upstream commit 3880cdbed1c4607e378f58fa924c5d6df900d1d3 ]
syzkaller reported an issue:
WARNING: CPU: 3 PID: 5971 at kernel/trace/bpf_trace.c:1861 get_bpf_raw_tp_regs+0xa4/0x100 kernel/trace/bpf_trace.c:1861 Modules linked in: CPU: 3 UID: 0 PID: 5971 Comm: syz-executor205 Not tainted 6.15.0-rc5-syzkaller-00038-g707df3375124 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:get_bpf_raw_tp_regs+0xa4/0x100 kernel/trace/bpf_trace.c:1861 RSP: 0018:ffffc90003636fa8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000003 RCX: ffffffff81c6bc4c RDX: ffff888032efc880 RSI: ffffffff81c6bc83 RDI: 0000000000000005 RBP: ffff88806a730860 R08: 0000000000000005 R09: 0000000000000003 R10: 0000000000000004 R11: 0000000000000000 R12: 0000000000000004 R13: 0000000000000001 R14: ffffc90003637008 R15: 0000000000000900 FS: 0000000000000000(0000) GS:ffff8880d6cdf000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7baee09130 CR3: 0000000029f5a000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1934 [inline] bpf_get_stack_raw_tp+0x24/0x160 kernel/trace/bpf_trace.c:1931 bpf_prog_ec3b2eefa702d8d3+0x43/0x47 bpf_dispatcher_nop_func include/linux/bpf.h:1316 [inline] __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run include/linux/filter.h:725 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2363 [inline] bpf_trace_run3+0x23f/0x5a0 kernel/trace/bpf_trace.c:2405 __bpf_trace_mmap_lock_acquire_returned+0xfc/0x140 include/trace/events/mmap_lock.h:47 __traceiter_mmap_lock_acquire_returned+0x79/0xc0 include/trace/events/mmap_lock.h:47 __do_trace_mmap_lock_acquire_returned include/trace/events/mmap_lock.h:47 [inline] trace_mmap_lock_acquire_returned include/trace/events/mmap_lock.h:47 [inline] __mmap_lock_do_trace_acquire_returned+0x138/0x1f0 mm/mmap_lock.c:35 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:204 [inline] stack_map_get_build_id_offset+0x535/0x6f0 kernel/bpf/stackmap.c:157 __bpf_get_stack+0x307/0xa10 kernel/bpf/stackmap.c:483 ____bpf_get_stack kernel/bpf/stackmap.c:499 [inline] bpf_get_stack+0x32/0x40 kernel/bpf/stackmap.c:496 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1941 [inline] bpf_get_stack_raw_tp+0x124/0x160 kernel/trace/bpf_trace.c:1931 bpf_prog_ec3b2eefa702d8d3+0x43/0x47
Tracepoint like trace_mmap_lock_acquire_returned may cause nested call as the corner case show above, which will be resolved with more general method in the future. As a result, WARN_ON_ONCE will be triggered. As Alexei suggested, remove the WARN_ON_ONCE first.
--- kernel/trace/bpf_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/bpf_trace.c +1 -1
@@ -1858,7 +1858,7 @@ static struct pt_regs *get_bpf_raw_tp_regs(void)struct bpf_raw_tp_regs *tp_regs =this_cpu_ptr (&bpf_raw_tp_regs);int nest_level =this_cpu_inc_return (bpf_raw_tp_nest_level); -if (WARN_ON_ONCE (nest_level >ARRAY_SIZE (tp_regs->regs))) { +if (nest_level >ARRAY_SIZE (tp_regs->regs)) {this_cpu_dec (bpf_raw_tp_nest_level);return ERR_PTR (-EBUSY ); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 264/780 dt-bindings: soc: fsl,qman-fqd: Fix reserved-memory.yaml reference
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rob Herring (Arm) <[email protected]>
[ Upstream commit 1090c38bbfd9ab7f22830c0e8a5c605e7d4ef084 ]
The reserved-memory.yaml reference needs the full path. No warnings were generated because the example has the wrong compatible string, so fix that too.
--- Documentation/devicetree/bindings/soc/fsl/fsl,qman-fqd.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/soc/fsl/fsl,qman-fqd.yaml +2 -2
@@ -50,7 +50,7 @@ required: - compatible allOf: - - $ref: reserved-memory.yaml + - $ref: /schemas/reserved-memory/reserved-memory.yaml unevaluatedProperties: false
@@ -61,7 +61,7 @@ examples: #size-cells = <2>; qman-fqd { - compatible = "shared-dma-pool"; + compatible = "fsl,qman-fqd"; size = <0 0x400000>; alignment = <0 0x400000>; no-map;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 265/780 clk: qcom: gcc-msm8939: Fix mclk0 & mclk1 for 24 MHz
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vincent Knecht <[email protected]>
[ Upstream commit 9e7acf70cf6aa7b22f67d911f50a8cd510e8fb00 ]
Fix mclk0 & mclk1 parent map to use correct GPLL6 configuration and freq_tbl to use GPLL6 instead of GPLL0 so that they tick at 24 MHz.
--- drivers/clk/qcom/gcc-msm8939.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/qcom/gcc-msm8939.c +2 -2
@@ -432,7 +432,7 @@ static const struct parent_map gcc_xo_gpll0_gpll1a_gpll6_sleep_map[] = { { P_XO, 0 }, { P_GPLL0, 1 }, { P_GPLL1_AUX, 2 }, - { P_GPLL6, 2 }, + { P_GPLL6, 3 }, { P_SLEEP_CLK, 6 }, };
@@ -1113,7 +1113,7 @@ static struct clk_rcg2 jpeg0_clk_src = { };static const struct freq_tbl ftbl_gcc_camss_mclk0_1_clk[] = { -F (24000000 ,P_GPLL0 ,1 ,1 ,45 ), +F (24000000 ,P_GPLL6 ,1 ,1 ,45 ),F (66670000 ,P_GPLL0 ,12 ,0 ,0 ), { } };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 266/780 s390/bpf: Store backchain even for leaf progs
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilya Leoshkevich <[email protected]>
[ Upstream commit 5f55f2168432298f5a55294831ab6a76a10cb3c3 ]
Currently a crash in a leaf prog (caused by a bug) produces the following call trace:
[<000003ff600ebf00>] bpf_prog_6df0139e1fbf2789_fentry+0x20/0x78
[<0000000000000000>] 0x0This is because leaf progs do not store backchain. Fix by making all progs do it. This is what GCC and Clang-generated code does as well. Now the call trace looks like this:
[<000003ff600eb0f2>] bpf_prog_6df0139e1fbf2789_fentry+0x2a/0x80
[<000003ff600ed096>] bpf_trampoline_201863462940+0x96/0xf4
[<000003ff600e3a40>] bpf_prog_05f379658fdd72f2_classifier_0+0x58/0xc0
[<000003ffe0aef070>] bpf_test_run+0x210/0x390
[<000003ffe0af0dc2>] bpf_prog_test_run_skb+0x25a/0x668
[<000003ffe038a90e>] __sys_bpf+0xa46/0xdb0
[<000003ffe038ad0c>] __s390x_sys_bpf+0x44/0x50
[<000003ffe0defea8>] __do_syscall+0x150/0x280
[<000003ffe0e01d5c>] system_call+0x74/0x98--- arch/s390/net/bpf_jit_comp.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
arch/s390/net/bpf_jit_comp.c +5 -7
@@ -605,17 +605,15 @@ static void bpf_jit_prologue(struct bpf_jit *jit, struct bpf_prog *fp, }/* Setup stack and backchain */ if (is_first_pass (jit) || (jit->seen &SEEN_STACK )) { -if (is_first_pass (jit) || (jit->seen &SEEN_FUNC )) -/* lgr %w1,%r15 (backchain) */ -EMIT4 (0xb9040000 ,REG_W1 ,REG_15 ); +/* lgr %w1,%r15 (backchain) */ +EMIT4 (0xb9040000 ,REG_W1 ,REG_15 );/* la %bfp,STK_160_UNUSED(%r15) (BPF frame pointer) */ EMIT4_DISP (0x41000000 ,BPF_REG_FP ,REG_15 ,STK_160_UNUSED );/* aghi %r15,-STK_OFF */ EMIT4_IMM (0xa70b0000 ,REG_15 , -(STK_OFF + stack_depth)); -if (is_first_pass (jit) || (jit->seen &SEEN_FUNC )) -/* stg %w1,152(%r15) (backchain) */ -EMIT6_DISP_LH (0xe3000000 ,0x0024 ,REG_W1 ,REG_0 , -REG_15 ,152 ); +/* stg %w1,152(%r15) (backchain) */ +EMIT6_DISP_LH (0xe3000000 ,0x0024 ,REG_W1 ,REG_0 , +REG_15 ,152 ); } }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 267/780 wifi: rtw89: pci: configure manual DAC mode via PCI config API only
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ping-Ke Shih <[email protected]>
[ Upstream commit a70cf04b08f44f41bce14659aa7012674b15d9de ]
To support 36-bit DMA, configure chip proprietary bit via PCI config API or chip DBI interface. However, the PCI device mmap isn't set yet and the DBI is also inaccessible via mmap, so only if the bit can be accessible via PCI config API, chip can support 36-bit DMA. Otherwise, fallback to 32-bit DMA.
With NULL mmap address, kernel throws trace:
BUG: unable to handle page fault for address: 0000000000001090 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: Oops: 0002 [#1] PREEMPT SMP PTI CPU: 1 UID: 0 PID: 71 Comm: irq/26-pciehp Tainted: G OE 6.14.2-061402-generic #202504101348 Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE RIP: 0010:rtw89_pci_ops_write16+0x12/0x30 [rtw89_pci] RSP: 0018:ffffb0ffc0acf9d8 EFLAGS: 00010206 RAX: ffffffffc158f9c0 RBX: ffff94865e702020 RCX: 0000000000000000 RDX: 0000000000000718 RSI: 0000000000001090 RDI: ffff94865e702020 RBP: ffffb0ffc0acf9d8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000015 R13: 0000000000000719 R14: ffffb0ffc0acfa1f R15: ffffffffc1813060 FS: 0000000000000000(0000) GS:ffff9486f3480000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000001090 CR3: 0000000090440001 CR4: 00000000000626f0 Call Trace: <TASK> rtw89_pci_read_config_byte+0x6d/0x120 [rtw89_pci] rtw89_pci_cfg_dac+0x5b/0xb0 [rtw89_pci] rtw89_pci_probe+0xa96/0xbd0 [rtw89_pci] ? __pfx___device_attach_driver+0x10/0x10 ? __pfx___device_attach_driver+0x10/0x10 local_pci_probe+0x47/0xa0 pci_call_probe+0x5d/0x190 pci_device_probe+0xa7/0x160 really_probe+0xf9/0x370 ? pm_runtime_barrier+0x55/0xa0 __driver_probe_device+0x8c/0x140 driver_probe_device+0x24/0xd0 __device_attach_driver+0xcd/0x170 bus_for_each_drv+0x99/0x100 __device_attach+0xb4/0x1d0 device_attach+0x10/0x20 pci_bus_add_device+0x59/0x90 pci_bus_add_devices+0x31/0x80 pciehp_configure_device+0xaa/0x170 pciehp_enable_slot+0xd6/0x240 pciehp_handle_presence_or_link_change+0xf1/0x180 pciehp_ist+0x162/0x1c0 irq_thread_fn+0x24/0x70 irq_thread+0xef/0x1c0 ? __pfx_irq_thread_fn+0x10/0x10 ? __pfx_irq_thread_dtor+0x10/0x10 ? __pfx_irq_thread+0x10/0x10 kthread+0xfc/0x230 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x47/0x70 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 </TASK>
--- drivers/net/wireless/realtek/rtw89/pci.c | 34 ++++++++++++++++-------- 1 file changed, 23 insertions(+), 11 deletions(-)
drivers/net/wireless/realtek/rtw89/pci.c +23 -11
@@ -3105,17 +3105,26 @@ static bool rtw89_pci_is_dac_compatible_bridge(struct rtw89_dev *rtwdev)return false; } -static void rtw89_pci_cfg_dac (struct rtw89_dev *rtwdev) +static int rtw89_pci_cfg_dac (struct rtw89_dev *rtwdev,bool force) {struct rtw89_pci *rtwpci = (struct rtw89_pci *)rtwdev->priv; +struct pci_dev *pdev = rtwpci->pdev; +int ret; +u8 val; -if (!rtwpci->enable_dac) -return ; +if (!rtwpci->enable_dac && !force) +return 0 ;if (!rtw89_pci_chip_is_manual_dac (rtwdev)) -return ; +return 0 ; -rtw89_pci_config_byte_set (rtwdev,RTW89_PCIE_L1_CTRL ,RTW89_PCIE_BIT_EN_64BITS ); +/* Configure DAC only via PCI config API, not DBI interfaces */ + ret =pci_read_config_byte (pdev,RTW89_PCIE_L1_CTRL , &val); +if (ret) +return ret; + + val |=RTW89_PCIE_BIT_EN_64BITS ; +return pci_write_config_byte (pdev,RTW89_PCIE_L1_CTRL , val); } static int rtw89_pci_setup_mapping(struct rtw89_dev *rtwdev,
@@ -3133,13 +3142,16 @@ static int rtw89_pci_setup_mapping(struct rtw89_dev *rtwdev, }if (!rtw89_pci_is_dac_compatible_bridge (rtwdev)) - goto no_dac; + goto try_dac_done; ret =dma_set_mask_and_coherent (&pdev->dev,DMA_BIT_MASK (36 ));if (!ret) { - rtwpci->enable_dac = true; -rtw89_pci_cfg_dac (rtwdev); - }else { + ret =rtw89_pci_cfg_dac (rtwdev, true); +if (!ret) { + rtwpci->enable_dac = true; + goto try_dac_done; + } + ret =dma_set_mask_and_coherent (&pdev->dev,DMA_BIT_MASK (32 ));if (ret) { rtw89_err(rtwdev,
@@ -3147,7 +3159,7 @@ static int rtw89_pci_setup_mapping(struct rtw89_dev *rtwdev, goto err_release_regions; } } -no_dac: +try_dac_done: resource_len =pci_resource_len (pdev, bar_id); rtwpci->mmap =pci_iomap (pdev, bar_id, resource_len);
@@ -4302,7 +4314,7 @@ static void rtw89_pci_l2_hci_ldo(struct rtw89_dev *rtwdev)void rtw89_pci_basic_cfg (struct rtw89_dev *rtwdev,bool resume) {if (resume) -rtw89_pci_cfg_dac (rtwdev); +rtw89_pci_cfg_dac (rtwdev, false);rtw89_pci_disable_eq (rtwdev);rtw89_pci_filter_out (rtwdev);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 268/780 wifi: rtw89: pci: enlarge retry times of RX tag to 1000
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ping-Ke Shih <[email protected]>
[ Upstream commit dda27a47c036d981ec664ac57e044a21035ffe12 ]
RX tag is sequence number to ensure RX DMA is complete. On platform Gigabyte X870 AORUS ELITE WIFI7, sometimes it needs longer retry times to complete RX DMA, or driver throws warnings and connection drops:
rtw89_8922ae 0000:07:00.0: failed to update 162 RXBD info: -11 rtw89_8922ae 0000:07:00.0: failed to update 163 RXBD info: -11 rtw89_8922ae 0000:07:00.0: failed to update 32 RXBD info: -11 rtw89_8922ae 0000:07:00.0: failed to release TX skbs
--- drivers/net/wireless/realtek/rtw89/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw89/pci.c +1 -1
@@ -228,7 +228,7 @@ int rtw89_pci_sync_skb_for_device_and_validate_rx_info(struct rtw89_dev *rtwdev, struct sk_buff *skb) {struct rtw89_pci_rx_info *rx_info =RTW89_PCI_RX_SKB_CB (skb); -int rx_tag_retry =100 ; +int rx_tag_retry =1000 ;int ret; do {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 269/780 wifi: rtw88: fix the para buffer size to avoid reading out of bounds
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexey Kodanev <[email protected]>
[ Upstream commit 4c2c372de2e108319236203cce6de44d70ae15cd ]
Set the size to 6 instead of 2, since 'para' array is passed to 'rtw_fw_bt_wifi_control(rtwdev, para[0], ¶[1])', which reads 5 bytes:
void rtw_fw_bt_wifi_control(struct rtw_dev *rtwdev, u8 op_code, u8 *data)
{
...
SET_BT_WIFI_CONTROL_DATA1(h2c_pkt, *data);
SET_BT_WIFI_CONTROL_DATA2(h2c_pkt, *(data + 1));
...
SET_BT_WIFI_CONTROL_DATA5(h2c_pkt, *(data + 4));Detected using the static analysis tool - Svace.
--- drivers/net/wireless/realtek/rtw88/coex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw88/coex.c +1 -1
@@ -309,7 +309,7 @@ static void rtw_coex_tdma_timer_base(struct rtw_dev *rtwdev, u8 type) {struct rtw_coex *coex = &rtwdev->coex;struct rtw_coex_stat *coex_stat = &coex->stat; -u8 para[2 ] = {0 }; +u8 para[6 ] = {};u8 times;u16 tbtt_interval = coex_stat->wl_beacon_interval;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 270/780 wifi: rtw89: fix firmware scan delay unit for WiFi 6 chips
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chin-Yen Lee <[email protected]>
[ Upstream commit 3cc35394fac15d533639c9c9e42f28d28936a4a0 ]
The scan delay unit of firmware command for WiFi 6 chips is microsecond, but is wrong set now and lead to abnormal work for net-detect. Correct the unit to avoid the error.
--- drivers/net/wireless/realtek/rtw89/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw89/fw.c +1 -1
@@ -5477,7 +5477,7 @@ int rtw89_fw_h2c_scan_list_offload_be(struct rtw89_dev *rtwdev, int ch_num,return 0 ; } -#define RTW89_SCAN_DELAY_TSF_UNIT 104800 +#define RTW89_SCAN_DELAY_TSF_UNIT 1000000 int rtw89_fw_h2c_scan_offload_ax(struct rtw89_dev *rtwdev, struct rtw89_scan_option *option, struct rtw89_vif_link *rtwvif_link,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 271/780 iommu: remove duplicate selection of DMAR_TABLE
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rolf Eike Beer <[email protected]>
[ Upstream commit 9548feff840a05d61783e6316d08ed37e115f3b1 ]
This is already done in intel/Kconfig.
--- drivers/iommu/Kconfig | 1 - 1 file changed, 1 deletion(-)
drivers/iommu/Kconfig +0 -1
@@ -199,7 +199,6 @@ source "drivers/iommu/riscv/Kconfig" config IRQ_REMAP bool "Support for Interrupt Remapping" depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI - select DMAR_TABLE if INTEL_IOMMU help Supports Interrupt remapping for IO-APIC and MSI devices. To use x2apic mode in the CPU's which support x2APIC enhancements or
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 272/780 wifi: ath12k: Fix invalid RSSI values in station dump
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: P Praneesh <[email protected]>
[ Upstream commit 3126f1c52af5bc8d40d2c984907daeb501f6b739 ]
When processing a "station dump" command, the driver retrieves RSSI values from the HAL_PHYRX_RSSI_LEGACY TLV received from the monitor destination ring, and reports them to userspace. Currently, the RSSI values reported are improper because the hardware has not been configured to update them properly.
To fix this, enable the HTT_RX_FILTER_TLV_FLAGS_PPDU_START_USER_INFO in the filter setup to ensure the correct RSSI values are returned in the HAL_PHYRX_RSSI_LEGACY TLV, resulting in correct RSSI values being reported to userspace.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00218-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
--- drivers/net/wireless/ath/ath12k/mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath12k/mac.c +2 -1
@@ -229,7 +229,8 @@ ath12k_phymodes[NUM_NL80211_BANDS][ATH12K_CHAN_WIDTH_NUM] = {const struct htt_rx_ring_tlv_filter ath12k_mac_mon_status_filter_default = { .rx_filter =HTT_RX_FILTER_TLV_FLAGS_MPDU_START |HTT_RX_FILTER_TLV_FLAGS_PPDU_END | -HTT_RX_FILTER_TLV_FLAGS_PPDU_END_STATUS_DONE , +HTT_RX_FILTER_TLV_FLAGS_PPDU_END_STATUS_DONE | +HTT_RX_FILTER_TLV_FLAGS_PPDU_START_USER_INFO , .pkt_filter_flags0 =HTT_RX_FP_MGMT_FILTER_FLAGS0 , .pkt_filter_flags1 =HTT_RX_FP_MGMT_FILTER_FLAGS1 , .pkt_filter_flags2 =HTT_RX_FP_CTRL_FILTER_FLASG2 ,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 273/780 wifi: ath12k: Reorder and relocate the release of resources in ath12k_core_deinit()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yingying Tang <[email protected]>
[ Upstream commit aabd3be90579ed088aa34f0584ab6836c735c76f ]
Ath12k panic notifier is registered in driver loading process. But it is not unregistered if ATH12K_FLAG_QMI_FAIL is set(e.g. load BDF failed) and unload driver. It causes a dirty node in panic notifier list since ath12k panic notifier is not unregistered from list but the buffer of this node is freed in driver unloading process. If load driver again there will be a page fault error due to this dirty node in panic notifier list.
This issue is caused by asymmetry between ath12k_core_init() and ath12k_core_deinit(). Reorder and relocate the release of resources in ath12k_core_deinit() to avoid this asymmetry issue.
Call Trace: <TASK> ? show_regs+0x67/0x70 ? __die_body+0x20/0x70 ? __die+0x2b/0x40 ? page_fault_oops+0x15d/0x500 ? search_bpf_extables+0x63/0x90 ? notifier_chain_register+0x21/0xe0 ? search_exception_tables+0x5f/0x70 ? kernelmode_fixup_or_oops.isra.0+0x61/0x80 ? __bad_area_nosemaphore+0x179/0x240 ? bad_area_nosemaphore+0x16/0x20 ? do_user_addr_fault+0x312/0x7f0 ? prb_read_valid+0x1c/0x30 ? exc_page_fault+0x78/0x180 ? asm_exc_page_fault+0x27/0x30 ? notifier_chain_register+0x21/0xe0 ? notifier_chain_register+0x55/0xe0 atomic_notifier_chain_register+0x2c/0x50 ath12k_core_init+0x7e/0x110 [ath12k] ath12k_pci_probe+0xaba/0xba0 [ath12k]
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0-02903-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
--- drivers/net/wireless/ath/ath12k/core.c | 5 ++--- drivers/net/wireless/ath/ath12k/core.h | 1 + drivers/net/wireless/ath/ath12k/pci.c | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath12k/core.c +2 -3
@@ -1785,7 +1785,7 @@ static void ath12k_core_hw_group_destroy(struct ath12k_hw_group *ag) } } -static void ath12k_core_hw_group_cleanup (struct ath12k_hw_group *ag) +void ath12k_core_hw_group_cleanup (struct ath12k_hw_group *ag) {struct ath12k_base *ab;int i;
@@ -1933,10 +1933,9 @@ int ath12k_core_init(struct ath12k_base *ab)void ath12k_core_deinit (struct ath12k_base *ab) { -ath12k_core_panic_notifier_unregister (ab); -ath12k_core_hw_group_cleanup (ab->ag);ath12k_core_hw_group_destroy (ab->ag);ath12k_core_hw_group_unassign (ab); +ath12k_core_panic_notifier_unregister (ab); }void ath12k_core_free (struct ath12k_base *ab)
drivers/net/wireless/ath/ath12k/core.h +1 -0
@@ -1195,6 +1195,7 @@ struct ath12k_fw_stats_pdev { };int ath12k_core_qmi_firmware_ready (struct ath12k_base *ab); +void ath12k_core_hw_group_cleanup (struct ath12k_hw_group *ag);int ath12k_core_pre_init (struct ath12k_base *ab);int ath12k_core_init (struct ath12k_base *ath12k);void ath12k_core_deinit (struct ath12k_base *ath12k);
drivers/net/wireless/ath/ath12k/pci.c +2 -3
@@ -1734,8 +1734,6 @@ static void ath12k_pci_remove(struct pci_dev *pdev)if (test_bit (ATH12K_FLAG_QMI_FAIL , &ab->dev_flags)) {ath12k_pci_power_down (ab, false); -ath12k_qmi_deinit_service (ab); -ath12k_core_hw_group_unassign (ab); goto qmi_fail; }
@@ -1743,9 +1741,10 @@ static void ath12k_pci_remove(struct pci_dev *pdev)cancel_work_sync (&ab->reset_work);cancel_work_sync (&ab->dump_work); -ath12k_core_deinit (ab); +ath12k_core_hw_group_cleanup (ab->ag); qmi_fail: +ath12k_core_deinit (ab);ath12k_fw_unmap (ab);ath12k_mhi_unregister (ab_pci);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 274/780 wifi: ath12k: fix memory leak in ath12k_service_ready_ext_event
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rajat Soni <[email protected]>
[ Upstream commit 89142d34d5602c7447827beb181fa06eb08b9d5c ]
Currently, in ath12k_service_ready_ext_event(), svc_rdy_ext.mac_phy_caps is not freed in the failure case, causing a memory leak. The following trace is observed in kmemleak:
unreferenced object 0xffff8b3eb5789c00 (size 1024):
comm "softirq", pid 0, jiffies 4294942577
hex dump (first 32 bytes):
00 00 00 00 01 00 00 00 00 00 00 00 7b 00 00 10 ............{... 01 00 00 00 00 00 00 00 01 00 00 00 1f 38 00 00 .............8..
backtrace (crc 44e1c357):
__kmalloc_noprof+0x30b/0x410 ath12k_wmi_mac_phy_caps_parse+0x84/0x100 [ath12k] ath12k_wmi_tlv_iter+0x5e/0x140 [ath12k] ath12k_wmi_svc_rdy_ext_parse+0x308/0x4c0 [ath12k] ath12k_wmi_tlv_iter+0x5e/0x140 [ath12k] ath12k_service_ready_ext_event.isra.0+0x44/0xd0 [ath12k] ath12k_wmi_op_rx+0x2eb/0xd70 [ath12k] ath12k_htc_rx_completion_handler+0x1f4/0x330 [ath12k] ath12k_ce_recv_process_cb+0x218/0x300 [ath12k] ath12k_pci_ce_workqueue+0x1b/0x30 [ath12k] process_one_work+0x219/0x680 bh_worker+0x198/0x1f0 tasklet_action+0x13/0x30 handle_softirqs+0xca/0x460 __irq_exit_rcu+0xbe/0x110 irq_exit_rcu+0x9/0x30
Free svc_rdy_ext.mac_phy_caps in the error case to fix this memory leak.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath12k/wmi.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath12k/wmi.c +1 -0
@@ -4601,6 +4601,7 @@ static int ath12k_service_ready_ext_event(struct ath12k_base *ab,return 0 ; err: +kfree (svc_rdy_ext.mac_phy_caps);ath12k_wmi_free_dbring_caps (ab);return ret; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 275/780 hisi_acc_vfio_pci: fix XQE dma address error
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Longfang Liu <[email protected]>
[ Upstream commit 8bb7170c5a055ea17c6857c256ee73c10ff872eb ]
The dma addresses of EQE and AEQE are wrong after migration and results in guest kernel-mode encryption services failure. Comparing the definition of hardware registers, we found that there was an error when the data read from the register was combined into an address. Therefore, the address combination sequence needs to be corrected.
Even after fixing the above problem, we still have an issue where the Guest from an old kernel can get migrated to new kernel and may result in wrong data.
In order to ensure that the address is correct after migration, if an old magic number is detected, the dma address needs to be updated.
--- .../vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 41 ++++++++++++++++--- .../vfio/pci/hisilicon/hisi_acc_vfio_pci.h | 14 ++++++- 2 files changed, 47 insertions(+), 8 deletions(-)
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c +35 -6
@@ -350,6 +350,32 @@ static int vf_qm_func_stop(struct hisi_qm *qm)return hisi_qm_mb (qm,QM_MB_CMD_PAUSE_QM ,0 ,0 ,0 ); } +static int vf_qm_version_check (struct acc_vf_data *vf_data,struct device *dev) +{ +switch (vf_data->acc_magic) { +case ACC_DEV_MAGIC_V2 : +if (vf_data->major_ver !=ACC_DRV_MAJOR_VER ) { +dev_info (dev,"migration driver version<%u.%u> not match!\n" , + vf_data->major_ver, vf_data->minor_ver); +return -EINVAL ; + } +break ; +case ACC_DEV_MAGIC_V1 : +/* Correct dma address */ + vf_data->eqe_dma = vf_data->qm_eqc_dw[QM_XQC_ADDR_HIGH ]; + vf_data->eqe_dma <<=QM_XQC_ADDR_OFFSET ; + vf_data->eqe_dma |= vf_data->qm_eqc_dw[QM_XQC_ADDR_LOW ]; + vf_data->aeqe_dma = vf_data->qm_aeqc_dw[QM_XQC_ADDR_HIGH ]; + vf_data->aeqe_dma <<=QM_XQC_ADDR_OFFSET ; + vf_data->aeqe_dma |= vf_data->qm_aeqc_dw[QM_XQC_ADDR_LOW ]; +break ; +default : +return -EINVAL ; + } + +return 0 ; +} +static int vf_qm_check_match (struct hisi_acc_vf_core_device *hisi_acc_vdev,struct hisi_acc_vf_migration_file *migf) {
@@ -363,7 +389,8 @@ static int vf_qm_check_match(struct hisi_acc_vf_core_device *hisi_acc_vdev,if (migf->total_length <QM_MATCH_SIZE || hisi_acc_vdev->match_done)return 0 ; -if (vf_data->acc_magic !=ACC_DEV_MAGIC ) { + ret =vf_qm_version_check (vf_data, dev); +if (ret) {dev_err (dev,"failed to match ACC_DEV_MAGIC\n" );return -EINVAL ; }
@@ -418,7 +445,9 @@ static int vf_qm_get_match_data(struct hisi_acc_vf_core_device *hisi_acc_vdev,int vf_id = hisi_acc_vdev->vf_id;int ret; - vf_data->acc_magic =ACC_DEV_MAGIC ; + vf_data->acc_magic =ACC_DEV_MAGIC_V2 ; + vf_data->major_ver =ACC_DRV_MAJOR_VER ; + vf_data->minor_ver =ACC_DRV_MINOR_VER ;/* Save device id */ vf_data->dev_id = hisi_acc_vdev->vf_dev->device;
@@ -496,12 +525,12 @@ static int vf_qm_read_data(struct hisi_qm *vf_qm, struct acc_vf_data *vf_data)return -EINVAL ;/* Every reg is 32 bit, the dma address is 64 bit. */ - vf_data->eqe_dma = vf_data->qm_eqc_dw[1 ]; + vf_data->eqe_dma = vf_data->qm_eqc_dw[QM_XQC_ADDR_HIGH ]; vf_data->eqe_dma <<=QM_XQC_ADDR_OFFSET ; - vf_data->eqe_dma |= vf_data->qm_eqc_dw[0 ]; - vf_data->aeqe_dma = vf_data->qm_aeqc_dw[1 ]; + vf_data->eqe_dma |= vf_data->qm_eqc_dw[QM_XQC_ADDR_LOW ]; + vf_data->aeqe_dma = vf_data->qm_aeqc_dw[QM_XQC_ADDR_HIGH ]; vf_data->aeqe_dma <<=QM_XQC_ADDR_OFFSET ; - vf_data->aeqe_dma |= vf_data->qm_aeqc_dw[0 ]; + vf_data->aeqe_dma |= vf_data->qm_aeqc_dw[QM_XQC_ADDR_LOW ];/* Through SQC_BT/CQC_BT to get sqc and cqc address */ ret =qm_get_sqc (vf_qm, &vf_data->sqc_dma);
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.h +12 -2
@@ -39,6 +39,9 @@#define QM_REG_ADDR_OFFSET 0x0004#define QM_XQC_ADDR_OFFSET 32U +#define QM_XQC_ADDR_LOW 0x1 +#define QM_XQC_ADDR_HIGH 0x2 +#define QM_VF_AEQ_INT_MASK 0x0004#define QM_VF_EQ_INT_MASK 0x000c#define QM_IFC_INT_SOURCE_V 0x0020
@@ -50,10 +53,15 @@#define QM_EQC_DW0 0X8000#define QM_AEQC_DW0 0X8020 +#define ACC_DRV_MAJOR_VER 1 +#define ACC_DRV_MINOR_VER 0 + +#define ACC_DEV_MAGIC_V1 0XCDCDCDCDFEEDAACC +#define ACC_DEV_MAGIC_V2 0xAACCFEEDDECADEDE +struct acc_vf_data {#define QM_MATCH_SIZE offsetofend(struct acc_vf_data, qm_rsv_state)/* QM match information */ -#define ACC_DEV_MAGIC 0XCDCDCDCDFEEDAACCu64 acc_magic;u32 qp_num;u32 dev_id;
@@ -61,7 +69,9 @@ struct acc_vf_data {u32 qp_base;u32 vf_qm_state;/* QM reserved match information */ -u32 qm_rsv_state[3 ]; +u16 major_ver; +u16 minor_ver; +u32 qm_rsv_state[2 ];/* QM RW regs */ u32 aeq_int_mask;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 276/780 hisi_acc_vfio_pci: add eq and aeq interruption restore
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Longfang Liu <[email protected]>
[ Upstream commit 3495cec0787721ba7a9d5c19d0bbb66d182de584 ]
In order to ensure that the task packets of the accelerator device are not lost during the migration process, it is necessary to send an EQ and AEQ command to the device after the live migration is completed and to update the completion position of the task queue.
Let the device recheck the completed tasks data and if there are uncollected packets, device resend a task completion interrupt to the software.
--- drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c +16 -0
@@ -470,6 +470,19 @@ static int vf_qm_get_match_data(struct hisi_acc_vf_core_device *hisi_acc_vdev,return 0 ; } +static void vf_qm_xeqc_save (struct hisi_qm *qm, +struct hisi_acc_vf_migration_file *migf) +{ +struct acc_vf_data *vf_data = &migf->vf_data; +u16 eq_head, aeq_head; + + eq_head = vf_data->qm_eqc_dw[0 ] &0xFFFF ; +qm_db (qm,0 ,QM_DOORBELL_CMD_EQ , eq_head,0 ); + + aeq_head = vf_data->qm_aeqc_dw[0 ] &0xFFFF ; +qm_db (qm,0 ,QM_DOORBELL_CMD_AEQ , aeq_head,0 ); +} +static int vf_qm_load_data (struct hisi_acc_vf_core_device *hisi_acc_vdev,struct hisi_acc_vf_migration_file *migf) {
@@ -578,6 +591,9 @@ static int vf_qm_state_save(struct hisi_acc_vf_core_device *hisi_acc_vdev,return -EINVAL ; migf->total_length =sizeof (struct acc_vf_data ); +/* Save eqc and aeqc interrupt information */ +vf_qm_xeqc_save (vf_qm, migf); +return 0 ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 277/780 hisi_acc_vfio_pci: bugfix cache write-back issue
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Longfang Liu <[email protected]>
[ Upstream commit e63c466398731bb7867f42f44b76fa984de59db2 ]
At present, cache write-back is placed in the device data copy stage after stopping the device operation. Writing back to the cache at this stage will cause the data obtained by the cache to be written back to be empty.
In order to ensure that the cache data is written back successfully, the data needs to be written back into the stop device stage.
--- drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c +7 -7
@@ -566,7 +566,6 @@ static int vf_qm_state_save(struct hisi_acc_vf_core_device *hisi_acc_vdev, {struct acc_vf_data *vf_data = &migf->vf_data;struct hisi_qm *vf_qm = &hisi_acc_vdev->vf_qm; -struct device *dev = &vf_qm->pdev->dev;int ret;if (unlikely (qm_wait_dev_not_ready (vf_qm))) {
@@ -580,12 +579,6 @@ static int vf_qm_state_save(struct hisi_acc_vf_core_device *hisi_acc_vdev, vf_data->vf_qm_state =QM_READY ; hisi_acc_vdev->vf_qm_state = vf_data->vf_qm_state; - ret =vf_qm_cache_wb (vf_qm); -if (ret) { -dev_err (dev,"failed to writeback QM Cache!\n" ); -return ret; - } - ret =vf_qm_read_data (vf_qm, vf_data);if (ret)return -EINVAL ;
@@ -1012,6 +1005,13 @@ static int hisi_acc_vf_stop_device(struct hisi_acc_vf_core_device *hisi_acc_vdevdev_err (dev,"failed to check QM INT state!\n" );return ret; } + + ret =vf_qm_cache_wb (vf_qm); +if (ret) { +dev_err (dev,"failed to writeback QM cache!\n" ); +return ret; + } +return 0 ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 278/780 hisi_acc_vfio_pci: bugfix the problem of uninstalling driver
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Longfang Liu <[email protected]>
[ Upstream commit db6525a8573957faea28850392f4744e5f8f7a53 ]
In a live migration scenario. If the number of VFs at the destination is greater than the source, the recovery operation will fail and qemu will not be able to complete the process and exit after shutting down the device FD.
This will cause the driver to be unable to be unloaded normally due to abnormal reference counting of the live migration driver caused by the abnormal closing operation of fd.
Therefore, make sure the migration file descriptor references are always released when the device is closed.
--- drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 1 + 1 file changed, 1 insertion(+)
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c +1 -0
@@ -1508,6 +1508,7 @@ static void hisi_acc_vfio_pci_close_device(struct vfio_device *core_vdev)struct hisi_acc_vf_core_device *hisi_acc_vdev =hisi_acc_get_vf_dev (core_vdev);struct hisi_qm *vf_qm = &hisi_acc_vdev->vf_qm; +hisi_acc_vf_disable_fds (hisi_acc_vdev);mutex_lock (&hisi_acc_vdev->open_mutex); hisi_acc_vdev->dev_opened = false;iounmap (vf_qm->io_base);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 279/780 hisi_acc_vfio_pci: bugfix live migration function without VF device driver
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Longfang Liu <[email protected]>
[ Upstream commit 2777a40998deb36f96b6afc48bd397cf58a4edf0 ]
If the VF device driver is not loaded in the Guest OS and we attempt to perform device data migration, the address of the migrated data will be NULL.
The live migration recovery operation on the destination side will access a null address value, which will cause access errors.
Therefore, live migration of VMs without added VF device drivers does not require device data migration.
In addition, when the queue address data obtained by the destination is empty, device queue recovery processing will not be performed.
--- .../vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-)
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c +15 -7
@@ -426,13 +426,6 @@ static int vf_qm_check_match(struct hisi_acc_vf_core_device *hisi_acc_vdev,return -EINVAL ; } - ret =qm_write_regs (vf_qm,QM_VF_STATE , &vf_data->vf_qm_state,1 ); -if (ret) { -dev_err (dev,"failed to write QM_VF_STATE\n" ); -return ret; - } - - hisi_acc_vdev->vf_qm_state = vf_data->vf_qm_state; hisi_acc_vdev->match_done = true;return 0 ; }
@@ -498,6 +491,20 @@ static int vf_qm_load_data(struct hisi_acc_vf_core_device *hisi_acc_vdev,if (migf->total_length <sizeof (struct acc_vf_data ))return -EINVAL ; +if (!vf_data->eqe_dma || !vf_data->aeqe_dma || + !vf_data->sqc_dma || !vf_data->cqc_dma) { +dev_info (dev,"resume dma addr is NULL!\n" ); + hisi_acc_vdev->vf_qm_state =QM_NOT_READY ; +return 0 ; + } + + ret =qm_write_regs (qm,QM_VF_STATE , &vf_data->vf_qm_state,1 ); +if (ret) { +dev_err (dev,"failed to write QM_VF_STATE\n" ); +return -EINVAL ; + } + hisi_acc_vdev->vf_qm_state = vf_data->vf_qm_state; + qm->eqe_dma = vf_data->eqe_dma; qm->aeqe_dma = vf_data->aeqe_dma; qm->sqc_dma = vf_data->sqc_dma;
@@ -1531,6 +1538,7 @@ static int hisi_acc_vfio_pci_migrn_init_dev(struct vfio_device *core_vdev) hisi_acc_vdev->vf_id =pci_iov_vf_id (pdev) +1 ; hisi_acc_vdev->pf_qm = pf_qm; hisi_acc_vdev->vf_dev = pdev; + hisi_acc_vdev->vf_qm_state =QM_NOT_READY ;mutex_init (&hisi_acc_vdev->state_mutex);mutex_init (&hisi_acc_vdev->open_mutex);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 280/780 wifi: ath9k_htc: Abort software beacon handling if disabled
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Toke Høiland-Jørgensen <[email protected]>
[ Upstream commit ac4e317a95a1092b5da5b9918b7118759342641c ]
A malicious USB device can send a WMI_SWBA_EVENTID event from an ath9k_htc-managed device before beaconing has been enabled. This causes a device-by-zero error in the driver, leading to either a crash or an out of bounds read.
Prevent this by aborting the handling in ath9k_htc_swba() if beacons are not enabled.
--- drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/wireless/ath/ath9k/htc_drv_beacon.c +3 -0
@@ -290,6 +290,9 @@ void ath9k_htc_swba(struct ath9k_htc_priv *priv,struct ath_common *common =ath9k_hw_common (priv->ah);int slot; +if (!priv->cur_beacon_conf.enable_beacon) +return ; +if (swba->beacon_pending !=0 ) { priv->beacon.bmisscnt++;if (priv->beacon.bmisscnt >BSTUCK_THRESHOLD ) {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 281/780 pinctrl: mediatek: Fix the invalid conditions
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hao Chang <[email protected]>
[ Upstream commit 86dee87f4b2e6ac119b03810e58723d0b27787a4 ]
The variable count_reg_names is defined as an int type and cannot be directly compared to an unsigned int. To resolve this issue, first verify the correctness of count_reg_names.
Stable-dep-of: 1c9977b26347 ("pinctrl: mediatek: eint: Fix invalid pointer dereference for v1 platforms")
--- drivers/pinctrl/mediatek/mtk-eint.c | 4 ++-- drivers/pinctrl/mediatek/mtk-eint.h | 2 +- drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-)
drivers/pinctrl/mediatek/mtk-eint.c +2 -2
@@ -506,7 +506,7 @@ EXPORT_SYMBOL_GPL(mtk_eint_find_irq);int mtk_eint_do_init (struct mtk_eint *eint,struct mtk_eint_pin *eint_pin) { -unsigned int size, i, port, inst =0 ; +unsigned int size, i, port, virq, inst =0 ;/* If clients don't assign a specific regs, let's use generic one */ if (!eint->regs)
@@ -580,7 +580,7 @@ int mtk_eint_do_init(struct mtk_eint *eint, struct mtk_eint_pin *eint_pin)if (inst >= eint->nbase)continue ; eint->pin_list[inst][eint->pins[i].index] = i; -int virq =irq_create_mapping (eint->domain, i); + virq =irq_create_mapping (eint->domain, i);irq_set_chip_and_handler (virq, &mtk_eint_irq_chip, handle_level_irq);irq_set_chip_data (virq, eint);
drivers/pinctrl/mediatek/mtk-eint.h +1 -1
@@ -66,7 +66,7 @@ struct mtk_eint_xt {struct mtk_eint {struct device *dev;void __iomem **base; -u8 nbase; +int nbase;u16 *base_pin_num;struct irq_domain *domain;int irq;
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c +5 -2
@@ -381,10 +381,13 @@ int mtk_build_eint(struct mtk_pinctrl *hw, struct platform_device *pdev)return -ENOMEM ; count_reg_names =of_property_count_strings (np,"reg-names" ); -if (count_reg_names < hw->soc->nbase_names) +if (count_reg_names <0 ) +return -EINVAL ; + + hw->eint->nbase = count_reg_names - (int )hw->soc->nbase_names; +if (hw->eint->nbase <=0 )return -EINVAL ; - hw->eint->nbase = count_reg_names - hw->soc->nbase_names; hw->eint->base =devm_kmalloc_array (&pdev->dev, hw->eint->nbase,sizeof (*hw->eint->base),GFP_KERNEL | __GFP_ZERO);if (!hw->eint->base) {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 282/780 scsi: ufs: mcq: Delete ufshcd_release_scsi_cmd() in ufshcd_mcq_abort()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: ping.gao <[email protected]>
[ Upstream commit 53755903b9357e69b2dd6a02fafbb1e30c741895 ]
After UFS_ABORT_TASK has been processed successfully, the host will generate MCQ IRQ for ABORT TAG with response OCS_ABORTED. This results in ufshcd_compl_one_cqe() calling ufshcd_release_scsi_cmd().
But ufshcd_mcq_abort() already calls ufshcd_release_scsi_cmd(), resulting in __ufshcd_release() being called twice. This means hba->clk_gating.active_reqs will be decreased twice, making it go negative.
Delete ufshcd_release_scsi_cmd() in ufshcd_mcq_abort().
--- drivers/ufs/core/ufs-mcq.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/ufs/core/ufs-mcq.c +0 -6
@@ -674,7 +674,6 @@ int ufshcd_mcq_abort(struct scsi_cmnd *cmd)int tag =scsi_cmd_to_rq (cmd)->tag;struct ufshcd_lrb *lrbp = &hba->lrb[tag];struct ufs_hw_queue *hwq; -unsigned long flags;int err;/* Skip task abort in case previous aborts failed and report failure */
@@ -713,10 +712,5 @@ int ufshcd_mcq_abort(struct scsi_cmnd *cmd)return FAILED ; } -spin_lock_irqsave (&hwq->cq_lock, flags); -if (ufshcd_cmd_inflight (lrbp->cmd)) -ufshcd_release_scsi_cmd (hba, lrbp); -spin_unlock_irqrestore (&hwq->cq_lock, flags); -return SUCCESS ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 283/780 scsi: mpt3sas: Fix _ctl_get_mpt_mctp_passthru_adapter() to return IOC pointer
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shivasharan S <[email protected]>
[ Upstream commit 9ad5249b37b59baaf2da1014f397c2e23b605075 ]
Fix _ctl_get_mpt_mctp_passthru_adapter() to return the correct IOC pointer to caller based on dev_index.
--- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/mpt3sas/mpt3sas_ctl.c +2 -1
@@ -2869,8 +2869,9 @@ _ctl_get_mpt_mctp_passthru_adapter(int dev_index)if (ioc->facts.IOCCapabilities &MPI26_IOCFACTS_CAPABILITY_MCTP_PASSTHRU ) {if (count == dev_index) {spin_unlock (&gioc_lock); -return 0 ; +return ioc; } + count++; } }spin_unlock (&gioc_lock);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 284/780 RDMA/bnxt_re: Fix incorrect display of inactivity_cp in debugfs output
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gautam R A <[email protected]>
[ Upstream commit 58d7a965bb2b014d467445d38cdb07099b1f0f77 ]
The inactivity_cp parameter in debugfs was not being read or written correctly, resulting in "Invalid argument" errors.
Fixed this by ensuring proper mapping of inactivity_cp in both the map_cc_config_offset_gen0_ext0 and bnxt_re_fill_gen0_ext0() functions.
--- drivers/infiniband/hw/bnxt_re/debugfs.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/infiniband/hw/bnxt_re/debugfs.c +5 -0
@@ -170,6 +170,9 @@ static int map_cc_config_offset_gen0_ext0(u32 offset, struct bnxt_qplib_cc_paramcase CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TCP_CP : *val = ccparam->tcp_cp;break ; +case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INACTIVITY_CP : + *val = ccparam->inact_th; +break ;default :return -EINVAL ; }
@@ -247,7 +250,9 @@ static void bnxt_re_fill_gen0_ext0(struct bnxt_qplib_cc_param *ccparam, u32 offs ccparam->tcp_cp = val;break ;case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TX_QUEUE : +break ;case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INACTIVITY_CP : + ccparam->inact_th = val;break ;case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TIME_PER_PHASE : ccparam->time_pph = val;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 285/780 RDMA/bnxt_re: Fix missing error handling for tx_queue
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gautam R A <[email protected]>
[ Upstream commit e3d57a00d4d1f36689e9eab80b60d5024361efec ]
bnxt_re_fill_gen0_ext0() did not return an error when attempting to modify CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TX_QUEUE, leading to silent failures.
Fixed this by returning -EOPNOTSUPP for tx_queue modifications and ensuring proper error propagation in bnxt_re_configure_cc().
--- drivers/infiniband/hw/bnxt_re/debugfs.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/infiniband/hw/bnxt_re/debugfs.c +9 -6
@@ -206,7 +206,7 @@ static ssize_t bnxt_re_cc_config_get(struct file *filp, char __user *buffer,return simple_read_from_buffer (buffer, usr_buf_len, ppos, (u8 *)(buf), rc); } -static void bnxt_re_fill_gen0_ext0 (struct bnxt_qplib_cc_param *ccparam,u32 offset,u32 val) +static int bnxt_re_fill_gen0_ext0 (struct bnxt_qplib_cc_param *ccparam,u32 offset,u32 val) {u32 modify_mask;
@@ -250,7 +250,7 @@ static void bnxt_re_fill_gen0_ext0(struct bnxt_qplib_cc_param *ccparam, u32 offs ccparam->tcp_cp = val;break ;case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TX_QUEUE : -break ; +return -EOPNOTSUPP ;case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INACTIVITY_CP : ccparam->inact_th = val;break ;
@@ -263,18 +263,21 @@ static void bnxt_re_fill_gen0_ext0(struct bnxt_qplib_cc_param *ccparam, u32 offs } ccparam->mask = modify_mask; +return 0 ; }static int bnxt_re_configure_cc (struct bnxt_re_dev *rdev,u32 gen_ext,u32 offset,u32 val) {struct bnxt_qplib_cc_param ccparam = { }; +int rc; -/* Supporting only Gen 0 now */ -if (gen_ext ==CC_CONFIG_GEN0_EXT0 ) -bnxt_re_fill_gen0_ext0 (&ccparam, offset, val); -else +if (gen_ext !=CC_CONFIG_GEN0_EXT0 )return -EINVAL ; + rc =bnxt_re_fill_gen0_ext0 (&ccparam, offset, val); +if (rc) +return rc; +bnxt_qplib_modify_cc (&rdev->qplib_res, &ccparam);return 0 ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 286/780 RDMA/bnxt_re: Fix return code of bnxt_re_configure_cc
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kalesh AP <[email protected]>
[ Upstream commit 990b5c07f677a0b633b41130a70771337c18343e ]
Driver currently supports modifying GEN0_EXT0 CC parameters through debugfs hook.
Fixed to return -EOPNOTSUPP instead of -EINVAL in bnxt_re_configure_cc() when the user tries to modify any other CC parameters.
--- drivers/infiniband/hw/bnxt_re/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/bnxt_re/debugfs.c +1 -1
@@ -272,7 +272,7 @@ static int bnxt_re_configure_cc(struct bnxt_re_dev *rdev, u32 gen_ext, u32 offseint rc;if (gen_ext !=CC_CONFIG_GEN0_EXT0 ) -return -EINVAL ; +return -EOPNOTSUPP ; rc =bnxt_re_fill_gen0_ext0 (&ccparam, offset, val);if (rc)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 287/780 kernfs: Relax constraint in draining guard
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michal Koutný <[email protected]>
[ Upstream commit 071d8e4c2a3b0999a9b822e2eb8854784a350f8a ]
The active reference lifecycle provides the break/unbreak mechanism but the active reference is not truly active after unbreak -- callers don't use it afterwards but it's important for proper pairing of kn->active counting. Assuming this mechanism is in place, the WARN check in kernfs_should_drain_open_files() is too sensitive -- it may transiently catch those (rightful) callers between kernfs_unbreak_active_protection() and kernfs_put_active() as found out by Chen Ridong:
kernfs_remove_by_name_ns kernfs_get_active // active=1 __kernfs_remove // active=0x80000002 kernfs_drain ... wait_event //waiting (active == 0x80000001) kernfs_break_active_protection // active = 0x80000001 // continue kernfs_unbreak_active_protection // active = 0x80000002 ... kernfs_should_drain_open_files // warning occurs kernfs_put_active
To avoid the false positives (mind panic_on_warn) remove the check altogether. (This is meant as quick fix, I think active reference break/unbreak may be simplified with larger rework.)
--- fs/kernfs/dir.c | 5 +++-- fs/kernfs/file.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-)
fs/kernfs/dir.c +3 -2
@@ -1580,8 +1580,9 @@ void kernfs_break_active_protection(struct kernfs_node *kn)* invoked before finishing the kernfs operation. Note that while this * function restores the active reference, it doesn't and can't actually * restore the active protection - @kn may already or be in the process of -* being removed. Once kernfs_break_active_protection() is invoked, that -* protection is irreversibly gone for the kernfs operation instance. +* being drained and removed. Once kernfs_break_active_protection() is +* invoked, that protection is irreversibly gone for the kernfs operation +* instance. * * While this function may be called at any point after * kernfs_break_active_protection() is invoked, its most useful location
fs/kernfs/file.c +2 -1
@@ -778,8 +778,9 @@ bool kernfs_should_drain_open_files(struct kernfs_node *kn)/* * @kn being deactivated guarantees that @kn->attr.open can't change * beneath us making the lockless test below safe. +* Callers post kernfs_unbreak_active_protection may be counted in +* kn->active by now, do not WARN_ON because of them. */ -WARN_ON_ONCE (atomic_read (&kn->active) !=KN_DEACTIVATED_BIAS );rcu_read_lock (); on =rcu_dereference (kn->attr.open);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 288/780 wifi: mt76: mt7925: Fix logical vs bitwise typo
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
[ Upstream commit 88224119863c39fa67581874e1ba218fa56113b4 ]
This was supposed to be & instead of &&.
--- drivers/net/wireless/mediatek/mt76/mt7925/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7925/init.c +1 -1
@@ -89,7 +89,7 @@ void mt7925_regd_be_ctrl(struct mt792x_dev *dev, u8 *alpha2) }/* Check the last one */ -if (rule->flag &&BIT (0 )) +if (rule->flag &BIT (0 ))break ; pos +=sizeof (*rule);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 289/780 wifi: mt76: mt7996: Add NULL check in mt7996_thermal_init
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Charles Han <[email protected]>
[ Upstream commit caf4b347c5dc40fdd125793b5e82ba9fc4de5275 ]
devm_kasprintf() can return a NULL pointer on failure,but this returned value in mt7996_thermal_init() is not checked. Add NULL check in mt7996_thermal_init(), to handle kernel NULL pointer dereference error.
--- drivers/net/wireless/mediatek/mt76/mt7996/init.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/wireless/mediatek/mt76/mt7996/init.c +3 -0
@@ -217,6 +217,9 @@ static int mt7996_thermal_init(struct mt7996_phy *phy) name =devm_kasprintf (&wiphy->dev,GFP_KERNEL ,"mt7996_%s.%d" ,wiphy_name (wiphy), phy->mt76->band_idx); +if (!name) +return -ENOMEM ; +snprintf (cname,sizeof (cname),"cooling_device%d" , phy->mt76->band_idx); cdev =thermal_cooling_device_register (name, phy, &mt7996_thermal_ops);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 290/780 wifi: mt76: mt7996: prevent uninit return in mt7996_mac_sta_add_links
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qasim Ijaz <[email protected]>
[ Upstream commit d9bc625861d490cb76ae8af86fac6f8ab0655a18 ]
If link_conf_dereference_protected() or mt7996_vif_link() or link_sta_dereference_protected() fail the code jumps to the error_unlink label and returns ret which is uninitialised.
Fix this by setting err before jumping to error_unlink.
--- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/main.c +9 -3
@@ -998,16 +998,22 @@ mt7996_mac_sta_add_links(struct mt7996_dev *dev, struct ieee80211_vif *vif,continue ; link_conf =link_conf_dereference_protected (vif, link_id); -if (!link_conf) +if (!link_conf) { + err = -EINVAL ; goto error_unlink; + } link =mt7996_vif_link (dev, vif, link_id); -if (!link) +if (!link) { + err = -EINVAL ; goto error_unlink; + } link_sta =link_sta_dereference_protected (sta, link_id); -if (!link_sta) +if (!link_sta) { + err = -EINVAL ; goto error_unlink; + } err =mt7996_mac_sta_init_link (dev, link_conf, link_sta, link, link_id);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 291/780 wifi: mt76: mt7996: avoid NULL pointer dereference in mt7996_set_monitor()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qasim Ijaz <[email protected]>
[ Upstream commit cb423ddad0f6e6f55b1700422ab777b25597cc83 ]
The function mt7996_set_monitor() dereferences phy before the NULL sanity check.
Fix this to avoid NULL pointer dereference by moving the dereference after the check.
--- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/main.c +3 -1
@@ -414,11 +414,13 @@ static void mt7996_phy_set_rxfilter(struct mt7996_phy *phy)static void mt7996_set_monitor (struct mt7996_phy *phy,bool enabled) { -struct mt7996_dev *dev = phy->dev; +struct mt7996_dev *dev;if (!phy)return ; + dev = phy->dev; +if (enabled == !(phy->rxfilter &MT_WF_RFCR_DROP_OTHER_UC ))return ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 292/780 wifi: mt76: mt7996: avoid null deref in mt7996_stop_phy()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qasim Ijaz <[email protected]>
[ Upstream commit a0bdd3d1b94d22dd9d255fd148eb9183ea0a822f ]
In mt7996_stop_phy() the mt7996_phy structure is dereferenced before the null sanity check which could lead to a null deref.
Fix by moving the dereference operation after the
sanity check.
--- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/main.c +3 -1
@@ -68,11 +68,13 @@ static int mt7996_start(struct ieee80211_hw *hw)static void mt7996_stop_phy (struct mt7996_phy *phy) { -struct mt7996_dev *dev = phy->dev; +struct mt7996_dev *dev;if (!phy || !test_bit (MT76_STATE_RUNNING , &phy->mt76->state))return ; + dev = phy->dev; +cancel_delayed_work_sync (&phy->mt76->mac_work);mutex_lock (&dev->mt76.mutex);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 293/780 Bluetooth: ISO: Fix not using SID from adv report
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luiz Augusto von Dentz <[email protected]>
[ Upstream commit e2d471b7806b09744d65a64bcf41337468f2443b ]
Up until now it has been assumed that the application would be able to enter the advertising SID in sockaddr_iso_bc.bc_sid, but userspace has no access to SID since the likes of MGMT_EV_DEVICE_FOUND cannot carry it, so it was left unset (0x00) which means it would be unable to synchronize if the broadcast source is using a different SID e.g. 0x04:
Quoted 1 line
HCI Event: LE Meta Event (
0x3e) plen 57
LE Extended Advertising Report (0x0d)
Num reports: 1
Entry 0
Event type: 0x0000
Props: 0x0000
Data status: Complete
Address type: Random (0x01)
Address: 0B:82:E8:50:6D:C8 (Non-Resolvable)
Primary PHY: LE 1M
Secondary PHY: LE 2M
SID: 0x04
TX power: 127 dBm
RSSI: -55 dBm (0xc9)
Periodic advertising interval: 180.00 msec (0x0090)
Direct address type: Public (0x00)
Direct address: 00:00:00:00:00:00 (OUI 00-00-00)
Data length: 0x1f
06 16 52 18 5b 0b e1 05 16 56 18 04 00 11 30 4c ..R.[....V....0L
75 69 7a 27 73 20 53 32 33 20 55 6c 74 72 61 uiz's S23 Ultra
Service Data: Broadcast Audio Announcement (0x1852)
Broadcast ID: 14748507 (0xe10b5b)
Service Data: Public Broadcast Announcement (0x1856)
Data[2]: 0400
Unknown EIR field 0x30[16]: 4c75697a27732053323320556c747261
< HCI Command: LE Periodic Advertising Create Sync (0x08|0x0044) plen 14
Options: 0x0000
Use advertising SID, Advertiser Address Type and address
Reporting initially enabled
SID: 0x00 (<- Invalid)
Adv address type: Random (0x01)
Adv address: 0B:82:E8:50:6D:C8 (Non-Resolvable)
Skip: 0x0000
Sync timeout: 20000 msec (0x07d0)
Sync CTE type: 0x0000So instead this changes now allow application to set HCI_SID_INVALID which will make hci_le_pa_create_sync to wait for a report, update the conn->sid using the report SID and only then issue PA create sync command:
< HCI Command: LE Periodic Advertising Create Sync
Options: 0x0000
Use advertising SID, Advertiser Address Type and address
Reporting initially enabled
SID: 0x04
Adv address type: Random (0x01)
Adv address: 0B:82:E8:50:6D:C8 (Non-Resolvable)
Skip: 0x0000
Sync timeout: 20000 msec (0x07d0)
Sync CTE type: 0x0000Quoted 1 line
HCI Event: LE Meta Event (
0x3e) plen 16
LE Periodic Advertising Sync Established (0x0e)
Status: Success (0x00)
Sync handle: 64
Advertising SID: 0x04
Advertiser address type: Random (0x01)
Advertiser address: 0B:82:E8:50:6D:C8 (Non-Resolvable)
Advertiser PHY: LE 2M (0x02)
Periodic advertising interval: 180.00 msec (0x0090)
Advertiser clock accuracy: 0x05Stable-dep-of: 23205562ffc8 ("Bluetooth: separate CIS_LINK and BIS_LINK link types")
--- net/bluetooth/hci_conn.c | 2 ++ net/bluetooth/hci_core.c | 13 ++++++----- net/bluetooth/hci_event.c | 16 ++++++++++++- net/bluetooth/hci_sync.c | 49 +++++++++++++++++++++++++++++++++++---- net/bluetooth/iso.c | 9 +++++-- 5 files changed, 75 insertions(+), 14 deletions(-)
net/bluetooth/hci_conn.c +2 -0
@@ -2070,6 +2070,8 @@ struct hci_conn *hci_pa_create_sync(struct hci_dev *hdev, bdaddr_t *dst, {struct hci_conn *conn; +bt_dev_dbg (hdev,"dst %pMR type %d sid %d" , dst, dst_type, sid); + conn =hci_conn_add_unset (hdev,ISO_LINK , dst,HCI_ROLE_SLAVE );if (IS_ERR (conn))return conn;
net/bluetooth/hci_core.c +7 -6
@@ -4057,10 +4057,13 @@ static void hci_send_cmd_sync(struct hci_dev *hdev, struct sk_buff *skb)return ; } - err =hci_send_frame (hdev, skb); -if (err <0 ) { -hci_cmd_sync_cancel_sync (hdev, -err); -return ; +if (hci_skb_opcode (skb) !=HCI_OP_NOP ) { + err =hci_send_frame (hdev, skb); +if (err <0 ) { +hci_cmd_sync_cancel_sync (hdev, -err); +return ; + } +atomic_dec (&hdev->cmd_cnt); } if (hdev->req_status == HCI_REQ_PEND &&
@@ -4068,8 +4071,6 @@ static void hci_send_cmd_sync(struct hci_dev *hdev, struct sk_buff *skb)kfree_skb (hdev->req_skb); hdev->req_skb =skb_clone (hdev->sent_cmd,GFP_KERNEL ); } - -atomic_dec (&hdev->cmd_cnt); }static void hci_cmd_work (struct work_struct *work)
net/bluetooth/hci_event.c +15 -1
@@ -6351,6 +6351,17 @@ static void hci_le_ext_adv_report_evt(struct hci_dev *hdev, void *data, info->secondary_phy &=0x1f ; } +/* Check if PA Sync is pending and if the hci_conn SID has not +* been set update it. +*/ +if (hci_dev_test_flag (hdev,HCI_PA_SYNC )) { +struct hci_conn *conn; + + conn =hci_conn_hash_lookup_create_pa_sync (hdev); +if (conn && conn->sid ==HCI_SID_INVALID ) + conn->sid = info->sid; + } +if (legacy_evt_type !=LE_ADV_INVALID ) { process_adv_report(hdev, legacy_evt_type, &info->bdaddr, info->bdaddr_type, NULL, 0,
@@ -7155,7 +7166,8 @@ static void hci_le_meta_evt(struct hci_dev *hdev, void *data,/* Only match event if command OGF is for LE */ if (hdev->req_skb && -hci_opcode_ogf (hci_skb_opcode (hdev->req_skb)) ==0x08 && + (hci_opcode_ogf (hci_skb_opcode (hdev->req_skb)) ==0x08 || +hci_skb_opcode (hdev->req_skb) ==HCI_OP_NOP ) &&hci_skb_event (hdev->req_skb) == ev->subevent) { *opcode =hci_skb_opcode (hdev->req_skb); hci_req_cmd_complete(hdev, *opcode, 0x00, req_complete,
@@ -7511,8 +7523,10 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb) goto done; } +hci_dev_lock (hdev);kfree_skb (hdev->recv_event); hdev->recv_event =skb_clone (skb,GFP_KERNEL ); +hci_dev_unlock (hdev); event = hdr->evt;if (!event) {
net/bluetooth/hci_sync.c +44 -5
79 lines not on this page · raw message
net/bluetooth/iso.c +7 -2
@@ -941,7 +941,7 @@ static int iso_sock_bind_bc(struct socket *sock, struct sockaddr *addr,iso_pi (sk)->dst_type = sa->iso_bc->bc_bdaddr_type; -if (sa->iso_bc->bc_sid >0x0f ) +if (sa->iso_bc->bc_sid >0x0f && sa->iso_bc->bc_sid !=HCI_SID_INVALID )return -EINVAL ;iso_pi (sk)->bc_sid = sa->iso_bc->bc_sid;
@@ -2029,6 +2029,9 @@ static bool iso_match_sid(struct sock *sk, void *data) {struct hci_ev_le_pa_sync_established *ev = data; +if (iso_pi (sk)->bc_sid ==HCI_SID_INVALID ) +return true; +return ev->sid ==iso_pi (sk)->bc_sid; }
@@ -2075,8 +2078,10 @@ int iso_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags)if (ev1) { sk =iso_get_sock (&hdev->bdaddr, bdaddr,BT_LISTEN , iso_match_sid, ev1); -if (sk && !ev1->status) +if (sk && !ev1->status) {iso_pi (sk)->sync_handle =le16_to_cpu (ev1->handle); +iso_pi (sk)->bc_sid = ev1->sid; + } goto done; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 294/780 Bluetooth: separate CIS_LINK and BIS_LINK link types
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pauli Virtanen <[email protected]>
[ Upstream commit 23205562ffc8de20f57afdd984858cab29e77968 ]
Use separate link type id for unicast and broadcast ISO connections. These connection types are handled with separate HCI commands, socket API is different, and hci_conn has union fields that are different in the two cases, so they shall not be mixed up.
Currently in most places it is attempted to distinguish ucast by bacmp(&c->dst, BDADDR_ANY) but it is wrong as dst is set for bcast sink hci_conn in iso_conn_ready(). Additionally checking sync_handle might be OK, but depends on details of bcast conn configuration flow.
To avoid complicating it, use separate link types.
--- include/net/bluetooth/hci.h | 3 +- include/net/bluetooth/hci_core.h | 48 ++++++++++++++------------------ net/bluetooth/hci_conn.c | 44 +++++++++++++++++------------ net/bluetooth/hci_core.c | 21 ++++++++------ net/bluetooth/hci_event.c | 24 ++++++++-------- net/bluetooth/hci_sync.c | 16 +++++++---- net/bluetooth/iso.c | 4 +-- net/bluetooth/mgmt.c | 3 +- 8 files changed, 89 insertions(+), 74 deletions(-)
include/net/bluetooth/hci.h +2 -1
@@ -557,7 +557,8 @@ enum {#define ESCO_LINK 0x02/* Low Energy links do not have defined link type. Use invented one */ #define LE_LINK 0x80 -#define ISO_LINK 0x82 +#define CIS_LINK 0x82 +#define BIS_LINK 0x83#define INVALID_LINK 0xff/* LMP features */
include/net/bluetooth/hci_core.h +21 -27
132 lines not on this page · raw message
net/bluetooth/hci_conn.c +26 -18
138 lines not on this page · raw message
net/bluetooth/hci_core.c +13 -8
@@ -2898,12 +2898,13 @@ int hci_recv_frame(struct hci_dev *hdev, struct sk_buff *skb)break ;case HCI_ACLDATA_PKT :/* Detect if ISO packet has been sent as ACL */ -if (hci_conn_num (hdev,ISO_LINK )) { +if (hci_conn_num (hdev,CIS_LINK ) || +hci_conn_num (hdev,BIS_LINK )) {__u16 handle =__le16_to_cpu (hci_acl_hdr (skb)->handle);__u8 type; type =hci_conn_lookup_type (hdev,hci_handle (handle)); -if (type ==ISO_LINK ) +if (type ==CIS_LINK || type ==BIS_LINK )hci_skb_pkt_type (skb) =HCI_ISODATA_PKT ; }break ;
@@ -3345,7 +3346,8 @@ static inline void hci_quote_sent(struct hci_conn *conn, int num, int *quote)case LE_LINK : cnt = hdev->le_mtu ? hdev->le_cnt : hdev->acl_cnt;break ; -case ISO_LINK : +case CIS_LINK : +case BIS_LINK : cnt = hdev->iso_mtu ? hdev->iso_cnt : hdev->le_mtu ? hdev->le_cnt : hdev->acl_cnt;break ;
@@ -3359,7 +3361,7 @@ static inline void hci_quote_sent(struct hci_conn *conn, int num, int *quote) }static struct hci_conn *hci_low_sent (struct hci_dev *hdev,__u8 type, -int *quote) +__u8 type2,int *quote) {struct hci_conn_hash *h = &hdev->conn_hash;struct hci_conn *conn =NULL , *c;
@@ -3371,7 +3373,8 @@ static struct hci_conn *hci_low_sent(struct hci_dev *hdev, __u8 type,rcu_read_lock ();list_for_each_entry_rcu (c, &h->list, list) { -if (c->type != type ||skb_queue_empty (&c->data_q)) +if ((c->type != type && c->type != type2) || +skb_queue_empty (&c->data_q))continue ;if (c->state !=BT_CONNECTED && c->state !=BT_CONFIG )
@@ -3579,7 +3582,7 @@ static void hci_sched_sco(struct hci_dev *hdev, __u8 type)else cnt = &hdev->sco_cnt; -while (*cnt && (conn =hci_low_sent (hdev, type, "e))) { +while (*cnt && (conn =hci_low_sent (hdev, type, type, "e))) {while (quote-- && (skb =skb_dequeue (&conn->data_q))) {BT_DBG ("skb %p len %d" , skb, skb->len);hci_send_conn_frame (hdev, conn, skb);
@@ -3707,12 +3710,14 @@ static void hci_sched_iso(struct hci_dev *hdev)BT_DBG ("%s" , hdev->name); -if (!hci_conn_num (hdev,ISO_LINK )) +if (!hci_conn_num (hdev,CIS_LINK ) && + !hci_conn_num (hdev,BIS_LINK ))return ; cnt = hdev->iso_pkts ? &hdev->iso_cnt : hdev->le_pkts ? &hdev->le_cnt : &hdev->acl_cnt; -while (*cnt && (conn =hci_low_sent (hdev,ISO_LINK , "e))) { +while (*cnt && (conn =hci_low_sent (hdev,CIS_LINK ,BIS_LINK , + "e))) {while (quote-- && (skb =skb_dequeue (&conn->data_q))) {BT_DBG ("skb %p len %d" , skb, skb->len);hci_send_conn_frame (hdev, conn, skb);
net/bluetooth/hci_event.c +13 -11
@@ -3804,7 +3804,7 @@ static void hci_unbound_cis_failed(struct hci_dev *hdev, u8 cig, u8 status)lockdep_assert_held (&hdev->lock);list_for_each_entry_safe (conn, tmp, &hdev->conn_hash.list, list) { -if (conn->type !=ISO_LINK || !bacmp (&conn->dst,BDADDR_ANY ) || +if (conn->type !=CIS_LINK || conn->state ==BT_OPEN || conn->iso_qos.ucast.cig != cig)continue ;
@@ -4467,7 +4467,8 @@ static void hci_num_comp_pkts_evt(struct hci_dev *hdev, void *data,break ; -case ISO_LINK : +case CIS_LINK : +case BIS_LINK :if (hdev->iso_pkts) { hdev->iso_cnt += count;if (hdev->iso_cnt > hdev->iso_pkts)
@@ -6413,7 +6414,8 @@ static void hci_le_pa_sync_estabilished_evt(struct hci_dev *hdev, void *data, conn->sync_handle =le16_to_cpu (ev->handle); conn->sid =HCI_SID_INVALID ; - mask |=hci_proto_connect_ind (hdev, &ev->bdaddr,ISO_LINK , &flags); + mask |=hci_proto_connect_ind (hdev, &ev->bdaddr,BIS_LINK , + &flags);if (!(mask &HCI_LM_ACCEPT )) {hci_le_pa_term_sync (hdev, ev->handle); goto unlock;
@@ -6423,7 +6425,7 @@ static void hci_le_pa_sync_estabilished_evt(struct hci_dev *hdev, void *data, goto unlock;/* Add connection to indicate PA sync event */ - pa_sync =hci_conn_add_unset (hdev,ISO_LINK ,BDADDR_ANY , + pa_sync =hci_conn_add_unset (hdev,BIS_LINK ,BDADDR_ANY ,HCI_ROLE_SLAVE );if (IS_ERR (pa_sync))
@@ -6454,7 +6456,7 @@ static void hci_le_per_adv_report_evt(struct hci_dev *hdev, void *data,hci_dev_lock (hdev); - mask |=hci_proto_connect_ind (hdev,BDADDR_ANY ,ISO_LINK , &flags); + mask |=hci_proto_connect_ind (hdev,BDADDR_ANY ,BIS_LINK , &flags);if (!(mask &HCI_LM_ACCEPT )) goto unlock;
@@ -6738,7 +6740,7 @@ static void hci_le_cis_estabilished_evt(struct hci_dev *hdev, void *data, goto unlock; } -if (conn->type !=ISO_LINK ) { +if (conn->type !=CIS_LINK ) {bt_dev_err (hdev,"Invalid connection link type handle 0x%4.4x" , handle);
@@ -6856,7 +6858,7 @@ static void hci_le_cis_req_evt(struct hci_dev *hdev, void *data,if (!acl) goto unlock; - mask =hci_proto_connect_ind (hdev, &acl->dst,ISO_LINK , &flags); + mask =hci_proto_connect_ind (hdev, &acl->dst,CIS_LINK , &flags);if (!(mask &HCI_LM_ACCEPT )) {hci_le_reject_cis (hdev, ev->cis_handle); goto unlock;
@@ -6864,8 +6866,8 @@ static void hci_le_cis_req_evt(struct hci_dev *hdev, void *data, cis =hci_conn_hash_lookup_handle (hdev, cis_handle);if (!cis) { - cis =hci_conn_add (hdev,ISO_LINK , &acl->dst,HCI_ROLE_SLAVE , - cis_handle); + cis =hci_conn_add (hdev,CIS_LINK , &acl->dst, +HCI_ROLE_SLAVE , cis_handle);if (IS_ERR (cis)) {hci_le_reject_cis (hdev, ev->cis_handle); goto unlock;
@@ -6980,7 +6982,7 @@ static void hci_le_big_sync_established_evt(struct hci_dev *hdev, void *data,bt_dev_dbg (hdev,"ignore too large handle %u" , handle);continue ; } - bis =hci_conn_add (hdev,ISO_LINK ,BDADDR_ANY , + bis =hci_conn_add (hdev,BIS_LINK ,BDADDR_ANY ,HCI_ROLE_SLAVE , handle);if (IS_ERR (bis))continue ;
@@ -7036,7 +7038,7 @@ static void hci_le_big_info_adv_report_evt(struct hci_dev *hdev, void *data,hci_dev_lock (hdev); - mask |=hci_proto_connect_ind (hdev,BDADDR_ANY ,ISO_LINK , &flags); + mask |=hci_proto_connect_ind (hdev,BDADDR_ANY ,BIS_LINK , &flags);if (!(mask &HCI_LM_ACCEPT )) goto unlock;
net/bluetooth/hci_sync.c +10 -6
@@ -2860,7 +2860,7 @@ static int hci_le_set_ext_scan_param_sync(struct hci_dev *hdev, u8 type,if (sent) {struct hci_conn *conn; - conn =hci_conn_hash_lookup_ba (hdev,ISO_LINK , + conn =hci_conn_hash_lookup_ba (hdev,BIS_LINK , &sent->bdaddr);if (conn) {struct bt_iso_qos *qos = &conn->iso_qos;
@@ -5477,7 +5477,7 @@ static int hci_connect_cancel_sync(struct hci_dev *hdev, struct hci_conn *conn,if (conn->type ==LE_LINK )return hci_le_connect_cancel_sync (hdev, conn, reason); -if (conn->type ==ISO_LINK ) { +if (conn->type ==CIS_LINK ) {/* BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E * page 1857: *
@@ -5490,9 +5490,10 @@ static int hci_connect_cancel_sync(struct hci_dev *hdev, struct hci_conn *conn,return hci_disconnect_sync (hdev, conn, reason);/* CIS with no Create CIS sent have nothing to cancel */ -if (bacmp (&conn->dst,BDADDR_ANY )) -return HCI_ERROR_LOCAL_HOST_TERM ; +return HCI_ERROR_LOCAL_HOST_TERM ; + } +if (conn->type ==BIS_LINK ) {/* There is no way to cancel a BIS without terminating the BIG * which is done later on connection cleanup. */
@@ -5554,9 +5555,12 @@ static int hci_reject_conn_sync(struct hci_dev *hdev, struct hci_conn *conn, {struct hci_cp_reject_conn_req cp; -if (conn->type ==ISO_LINK ) +if (conn->type ==CIS_LINK )return hci_le_reject_cis_sync (hdev, conn, reason); +if (conn->type ==BIS_LINK ) +return -EINVAL ; +if (conn->type ==SCO_LINK || conn->type ==ESCO_LINK )return hci_reject_sco_sync (hdev, conn, reason);
@@ -6917,7 +6921,7 @@ static void create_pa_complete(struct hci_dev *hdev, void *data, int err) goto unlock;/* Add connection to indicate PA sync error */ - pa_sync =hci_conn_add_unset (hdev,ISO_LINK ,BDADDR_ANY , + pa_sync =hci_conn_add_unset (hdev,BIS_LINK ,BDADDR_ANY ,HCI_ROLE_SLAVE );if (IS_ERR (pa_sync))
net/bluetooth/iso.c +2 -2
@@ -2208,7 +2208,7 @@ int iso_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags)static void iso_connect_cfm (struct hci_conn *hcon,__u8 status) { -if (hcon->type !=ISO_LINK ) { +if (hcon->type !=CIS_LINK && hcon->type !=BIS_LINK ) {if (hcon->type !=LE_LINK )return ;
@@ -2249,7 +2249,7 @@ static void iso_connect_cfm(struct hci_conn *hcon, __u8 status)static void iso_disconn_cfm (struct hci_conn *hcon,__u8 reason) { -if (hcon->type !=ISO_LINK ) +if (hcon->type !=CIS_LINK && hcon->type !=BIS_LINK )return ;BT_DBG ("hcon %p reason %d" , hcon, reason);
net/bluetooth/mgmt.c +2 -1
@@ -3221,7 +3221,8 @@ static int disconnect(struct sock *sk, struct hci_dev *hdev, void *data,static u8 link_to_bdaddr (u8 link_type,u8 addr_type) {switch (link_type) { -case ISO_LINK : +case CIS_LINK : +case BIS_LINK :case LE_LINK :switch (addr_type) {case ADDR_LE_DEV_PUBLIC :
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 295/780 wifi: mt76: scan: Fix mlink dereferenced before IS_ERR_OR_NULL check
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Feng Jiang <[email protected]>
[ Upstream commit 7e1fcf687c2fb22ad25cf3fae322a37452f5f560 ]
--- drivers/net/wireless/mediatek/mt76/channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/channel.c +3 -1
@@ -302,11 +302,13 @@ void mt76_put_vif_phy_link(struct mt76_phy *phy, struct ieee80211_vif *vif, struct mt76_vif_link *mlink) {struct mt76_dev *dev = phy->dev; -struct mt76_vif_data *mvif = mlink->mvif; +struct mt76_vif_data *mvif;if (IS_ERR_OR_NULL (mlink) || !mlink->offchannel)return ; + mvif = mlink->mvif; +rcu_assign_pointer (mvif->offchannel_link,NULL ); dev->drv->vif_link_remove (phy, vif, &vif->bss_conf, mlink);kfree (mlink);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 296/780 wifi: mt76: mt7996: Fix null-ptr-deref in mt7996_mmio_wed_init()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Henry Martin <[email protected]>
[ Upstream commit 8f30e2b059757d8711a823e4c9c023db62a1d171 ]
devm_ioremap() returns NULL on error. Currently, mt7996_mmio_wed_init() does not check for this case, which results in a NULL pointer dereference.
Prevent null pointer dereference in mt7996_mmio_wed_init()
--- drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/wireless/mediatek/mt76/mt7996/mmio.c +3 -0
@@ -323,6 +323,9 @@ int mt7996_mmio_wed_init(struct mt7996_dev *dev, void *pdev_ptr, wed->wlan.base =devm_ioremap (dev->mt76.dev,pci_resource_start (pci_dev,0 ),pci_resource_len (pci_dev,0 )); +if (!wed->wlan.base) +return -ENOMEM ; + wed->wlan.phy_base =pci_resource_start (pci_dev,0 );if (hif2) {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 297/780 wifi: mt76: mt7915: Fix null-ptr-deref in mt7915_mmio_wed_init()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Henry Martin <[email protected]>
[ Upstream commit efb95439c1477bbc955cacd0179c35e7861b437c ]
devm_ioremap() returns NULL on error. Currently, mt7915_mmio_wed_init() does not check for this case, which results in a NULL pointer dereference.
Prevent null pointer dereference in mt7915_mmio_wed_init().
--- drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/wireless/mediatek/mt76/mt7915/mmio.c +6 -0
@@ -651,6 +651,9 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr, wed->wlan.base =devm_ioremap (dev->mt76.dev,pci_resource_start (pci_dev,0 ),pci_resource_len (pci_dev,0 )); +if (!wed->wlan.base) +return -ENOMEM ; + wed->wlan.phy_base =pci_resource_start (pci_dev,0 ); wed->wlan.wpdma_int =pci_resource_start (pci_dev,0 ) +MT_INT_WED_SOURCE_CSR ;
@@ -678,6 +681,9 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr, wed->wlan.bus_type =MTK_WED_BUS_AXI ; wed->wlan.base =devm_ioremap (dev->mt76.dev, res->start,resource_size (res)); +if (!wed->wlan.base) +return -ENOMEM ; + wed->wlan.phy_base = res->start; wed->wlan.wpdma_int = res->start +MT_INT_SOURCE_CSR ; wed->wlan.wpdma_mask = res->start +MT_INT_MASK_CSR ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 298/780 wifi: mt76: mt7925: prevent multiple scan commands
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming Yen Hsieh <[email protected]>
[ Upstream commit 122f270aca2c86d7de264ab67161c845e0691d73 ]
Add a check to ensure only one scan command is active at a time by testing the MT76_HW_SCANNING state.
--- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +3 -0
@@ -2790,6 +2790,9 @@ int mt7925_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,struct tlv *tlv;int max_len; +if (test_bit (MT76_HW_SCANNING , &phy->state)) +return -EBUSY ; + max_len =sizeof (*hdr) +sizeof (*req) +sizeof (*ssid) +sizeof (*bssid) +sizeof (*chan_info) +sizeof (*misc) +sizeof (*ie);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 299/780 wifi: mt76: mt7925: refine the sniffer commnad
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming Yen Hsieh <[email protected]>
[ Upstream commit bd02eebfc0b3502fe8322cf229b4c801416d1007 ]
Remove a duplicate call to mt76_mcu_send_msg to fix redundant operations in the sniffer command handling.
--- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +0 -2
@@ -2046,8 +2046,6 @@ int mt7925_mcu_set_sniffer(struct mt792x_dev *dev, struct ieee80211_vif *vif, }, }; -mt76_mcu_send_msg (&dev->mt76,MCU_UNI_CMD (SNIFFER ), &req,sizeof (req), true); -return mt76_mcu_send_msg (&dev->mt76,MCU_UNI_CMD (SNIFFER ), &req,sizeof (req), true); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 300/780 wifi: mt76: mt7925: ensure all MCU commands wait for response
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Lo <[email protected]>
[ Upstream commit aa97ff5782cf01cf2163593e1f57bbde63a06047 ]
Modify MCU command sending functions to wait for a response, ensuring consistent behavior across all commands and improves reliability by confirming that each command is processed successfully.
--- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +8 -8
@@ -783,7 +783,7 @@ int mt7925_mcu_fw_log_2_host(struct mt792x_dev *dev, u8 ctrl)int ret; ret =mt76_mcu_send_and_get_msg (&dev->mt76,MCU_UNI_CMD (WSYS_CONFIG ), - &req,sizeof (req), false,NULL ); + &req,sizeof (req), true,NULL );return ret; }
@@ -1424,7 +1424,7 @@ int mt7925_mcu_set_eeprom(struct mt792x_dev *dev) };return mt76_mcu_send_and_get_msg (&dev->mt76,MCU_UNI_CMD (EFUSE_CTRL ), - &req,sizeof (req), false,NULL ); + &req,sizeof (req), true,NULL ); }EXPORT_SYMBOL_GPL (mt7925_mcu_set_eeprom);
@@ -2762,7 +2762,7 @@ int mt7925_mcu_set_dbdc(struct mt76_phy *phy, bool enable) conf->band =0 ;/* unused */ err =mt76_mcu_skb_send_msg (mdev, skb,MCU_UNI_CMD (SET_DBDC_PARMS ), - false); + true);return err; }
@@ -2870,7 +2870,7 @@ int mt7925_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif, } err =mt76_mcu_skb_send_msg (mdev, skb,MCU_UNI_CMD (SCAN_REQ ), - false); + true);if (err <0 )clear_bit (MT76_HW_SCANNING , &phy->state);
@@ -2976,7 +2976,7 @@ int mt7925_mcu_sched_scan_req(struct mt76_phy *phy, }return mt76_mcu_skb_send_msg (mdev, skb,MCU_UNI_CMD (SCAN_REQ ), - false); + true); }EXPORT_SYMBOL_GPL (mt7925_mcu_sched_scan_req);
@@ -3012,7 +3012,7 @@ mt7925_mcu_sched_scan_enable(struct mt76_phy *phy,clear_bit (MT76_HW_SCHED_SCANNING , &phy->state);return mt76_mcu_skb_send_msg (mdev, skb,MCU_UNI_CMD (SCAN_REQ ), - false); + true); } int mt7925_mcu_cancel_hw_scan(struct mt76_phy *phy,
@@ -3051,7 +3051,7 @@ int mt7925_mcu_cancel_hw_scan(struct mt76_phy *phy, }return mt76_mcu_send_msg (phy->dev,MCU_UNI_CMD (SCAN_REQ ), - &req,sizeof (req), false); + &req,sizeof (req), true); }EXPORT_SYMBOL_GPL (mt7925_mcu_cancel_hw_scan);
@@ -3156,7 +3156,7 @@ int mt7925_mcu_set_channel_domain(struct mt76_phy *phy)memcpy (__skb_push (skb,sizeof (req)), &req,sizeof (req));return mt76_mcu_skb_send_msg (dev, skb,MCU_UNI_CMD (SET_DOMAIN_INFO ), - false); + true); }EXPORT_SYMBOL_GPL (mt7925_mcu_set_channel_domain);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 301/780 wifi: mt76: mt7996: fix beamformee SS field
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Howard Hsu <[email protected]>
[ Upstream commit 5c78949fc7cd772d483a8abe126fe90937c0f002 ]
Fix the beamformee SS field for the mt7996, mt7992 and mt7990 chipsets. For the mt7992, this value shall be set to 0x4, while the others shall be set to 0x3.
--- drivers/net/wireless/mediatek/mt76/mt7996/init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/init.c +4 -4
@@ -1116,12 +1116,12 @@ mt7996_set_stream_he_txbf_caps(struct mt7996_phy *phy, c =IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE ; -if (is_mt7996 (phy->mt76->dev)) - c |=IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_4 | - (IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_4 * non_2g); -else +if (is_mt7992 (phy->mt76->dev)) c |=IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_5 | (IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_5 * non_2g); +else + c |=IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_4 | + (IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_4 * non_2g); elem->phy_cap_info[4 ] |= c;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 302/780 wifi: mt76: mt7996: set EHT max ampdu length capability
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Chiu <[email protected]>
[ Upstream commit 8b2f574845e33d02e7fbad2d3192a8b717567afa ]
Set the max AMPDU length in the EHT MAC CAP. Without this patch, the peer station cannot obtain the correct capability, which prevents achieving peak throughput on the 2 GHz band.
--- drivers/net/wireless/mediatek/mt76/mt7996/init.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/wireless/mediatek/mt76/mt7996/init.c +3 -0
@@ -1321,6 +1321,9 @@ mt7996_init_eht_caps(struct mt7996_phy *phy, enum nl80211_band band,u8_encode_bits (IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_11454 ,IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_MASK ); + eht_cap_elem->mac_cap_info[1 ] |= +IEEE80211_EHT_MAC_CAP1_MAX_AMPDU_LEN_MASK ; + eht_cap_elem->phy_cap_info[0 ] =IEEE80211_EHT_PHY_CAP0_NDP_4_EHT_LFT_32_GI | IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMER |
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 303/780 wifi: mt76: mt7996: fix invalid NSS setting when TX path differs from NSS
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Chiu <[email protected]>
[ Upstream commit d5012734fc4bd5371e2e8dea8c2f3d28287573b8 ]
The maximum TX path and NSS may differ on a band. For example, one variant of the MT7992 has 5 TX paths and 4 NSS on the 5 GHz band. To address this, add orig_antenna_mask to record the maximum NSS and prevent setting an invalid NSS in mt7996_set_antenna().
--- drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c | 1 + drivers/net/wireless/mediatek/mt76/mt7996/main.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c +1 -0
@@ -304,6 +304,7 @@ int mt7996_eeprom_parse_hw_cap(struct mt7996_dev *dev, struct mt7996_phy *phy) phy->has_aux_rx = true; mphy->antenna_mask =BIT (nss) -1 ; + phy->orig_antenna_mask = mphy->antenna_mask; mphy->chainmask = (BIT (path) -1 ) << dev->chainshift[band_idx]; phy->orig_chainmask = mphy->chainmask; dev->chainmask |= mphy->chainmask;
drivers/net/wireless/mediatek/mt76/mt7996/main.c +2 -1
@@ -1528,7 +1528,8 @@ mt7996_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)u8 shift = dev->chainshift[band_idx]; phy->mt76->chainmask = tx_ant & phy->orig_chainmask; - phy->mt76->antenna_mask = phy->mt76->chainmask >> shift; + phy->mt76->antenna_mask = (phy->mt76->chainmask >> shift) & + phy->orig_antenna_mask;mt76_set_stream_caps (phy->mt76, true);mt7996_set_stream_vht_txbf_caps (phy);
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h +1 -0
@@ -293,6 +293,7 @@ struct mt7996_phy {struct mt76_channel_state state_ts;u16 orig_chainmask; +u16 orig_antenna_mask;bool has_aux_rx;bool counter_reset;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 304/780 wifi: mt76: mt7996: fix RX buffer size of MCU event
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shayne Chen <[email protected]>
[ Upstream commit 42cb27af34de4acf680606fad2c1f2932110591f ]
Some management frames are first processed by the firmware and then passed to the driver through the MCU event rings. In CONNAC3, event rings do not support scatter-gather and have a size limitation of 2048 bytes. If a packet sized between 1728 and 2048 bytes arrives from an event ring, the ring will hang because the driver attempts to use scatter-gather to process it.
To fix this, include the size of struct skb_shared_info in the MCU RX buffer size to prevent scatter-gather from being used for event skb in mt76_dma_rx_fill_buf().
--- drivers/net/wireless/mediatek/mt76/mt7996/dma.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/dma.c +2 -2
@@ -493,7 +493,7 @@ int mt7996_dma_init(struct mt7996_dev *dev) ret =mt76_queue_alloc (dev, &dev->mt76.q_rx[MT_RXQ_MCU ],MT_RXQ_ID (MT_RXQ_MCU ),MT7996_RX_MCU_RING_SIZE , -MT_RX_BUF_SIZE , +MT7996_RX_MCU_BUF_SIZE ,MT_RXQ_RING_BASE (MT_RXQ_MCU ));if (ret)return ret;
@@ -502,7 +502,7 @@ int mt7996_dma_init(struct mt7996_dev *dev) ret =mt76_queue_alloc (dev, &dev->mt76.q_rx[MT_RXQ_MCU_WA ],MT_RXQ_ID (MT_RXQ_MCU_WA ),MT7996_RX_MCU_RING_SIZE_WA , -MT_RX_BUF_SIZE , +MT7996_RX_MCU_BUF_SIZE ,MT_RXQ_RING_BASE (MT_RXQ_MCU_WA ));if (ret)return ret;
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h +3 -0
@@ -29,6 +29,9 @@#define MT7996_RX_RING_SIZE 1536#define MT7996_RX_MCU_RING_SIZE 512#define MT7996_RX_MCU_RING_SIZE_WA 1024 +/* scatter-gather of mcu event is not supported in connac3 */ +#define MT7996_RX_MCU_BUF_SIZE (2048 + \ + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))#define MT7996_FIRMWARE_WA "mediatek/mt7996/mt7996_wa.bin"#define MT7996_FIRMWARE_WM "mediatek/mt7996/mt7996_wm.bin"
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 305/780 wifi: mt76: fix available_antennas setting
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shayne Chen <[email protected]>
[ Upstream commit 249173e94dd5edef9e704f89513de7d9715ddf22 ]
Check if available_antennas_tx and available_antennas_rx are already set during the per-chip initialization phase; otherwise, they could be overwritten with incorrect values.
--- drivers/net/wireless/mediatek/mt76/mac80211.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mac80211.c +4 -2
@@ -449,8 +449,10 @@ mt76_phy_init(struct mt76_phy *phy, struct ieee80211_hw *hw)wiphy_ext_feature_set (wiphy,NL80211_EXT_FEATURE_AIRTIME_FAIRNESS );wiphy_ext_feature_set (wiphy,NL80211_EXT_FEATURE_AQL ); - wiphy->available_antennas_tx = phy->antenna_mask; - wiphy->available_antennas_rx = phy->antenna_mask; +if (!wiphy->available_antennas_tx) + wiphy->available_antennas_tx = phy->antenna_mask; +if (!wiphy->available_antennas_rx) + wiphy->available_antennas_rx = phy->antenna_mask; wiphy->sar_capa = &mt76_sar_capa; phy->frp = devm_kcalloc(dev->dev, wiphy->sar_capa->num_freq_ranges,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 306/780 bpf: Revert "bpf: remove unnecessary rcu_read_{lock,unlock}() in multi-uprobe attach logic"
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Di Shen <[email protected]>
[ Upstream commit 4e2e6841ff761cc15a54e8bebcf35d7325ec78a2 ]
This reverts commit 4a8f635a6054.
Althought get_pid_task() internally already calls rcu_read_lock() and rcu_read_unlock(), the find_vpid() was not.
The documentation for find_vpid() clearly states:
"Must be called with the tasklist_lock or rcu_read_lock() held."
Add proper rcu_read_lock/unlock() to protect the find_vpid().
--- kernel/trace/bpf_trace.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/trace/bpf_trace.c +2 -0
@@ -3423,7 +3423,9 @@ int bpf_uprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *pr }if (pid) { +rcu_read_lock (); task =get_pid_task (find_vpid (pid),PIDTYPE_TGID ); +rcu_read_unlock ();if (!task) { err = -ESRCH ; goto error_path_put;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 307/780 netfilter: xtables: support arpt_mark and ipv6 optstrip for iptables-nft only builds
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <[email protected]>
[ Upstream commit c38eb2973c18d34a8081d173a6ad298461f4a37c ]
Its now possible to build a kernel that has no support for the classic xtables get/setsockopt interfaces and builtin tables.
In this case, we have CONFIG_IP6_NF_MANGLE=n andCONFIG_IP_NF_ARPTABLES=n.
For optstript, the ipv6 code is so small that we can enable it if netfilter ipv6 support exists. For mark, check if either classic arptables or NFT_ARP_COMPAT is set.
--- net/netfilter/xt_TCPOPTSTRIP.c | 4 ++-- net/netfilter/xt_mark.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
net/netfilter/xt_TCPOPTSTRIP.c +2 -2
@@ -91,7 +91,7 @@ tcpoptstrip_tg4(struct sk_buff *skb, const struct xt_action_param *par)return tcpoptstrip_mangle_packet (skb, par,ip_hdrlen (skb)); } -#if IS_ENABLED (CONFIG_IP6_NF_MANGLE ) +#if IS_ENABLED (CONFIG_IP6_NF_IPTABLES )static unsigned int tcpoptstrip_tg6 (struct sk_buff *skb,const struct xt_action_param *par) {
@@ -119,7 +119,7 @@ static struct xt_target tcpoptstrip_tg_reg[] __read_mostly = { .targetsize = sizeof(struct xt_tcpoptstrip_target_info), .me = THIS_MODULE, }, -#if IS_ENABLED (CONFIG_IP6_NF_MANGLE ) +#if IS_ENABLED (CONFIG_IP6_NF_IPTABLES ) { .name = "TCPOPTSTRIP", .family = NFPROTO_IPV6,
net/netfilter/xt_mark.c +1 -1
@@ -48,7 +48,7 @@ static struct xt_target mark_tg_reg[] __read_mostly = { .targetsize = sizeof(struct xt_mark_tginfo2), .me = THIS_MODULE, }, -#if IS_ENABLED (CONFIG_IP_NF_ARPTABLES ) +#if IS_ENABLED (CONFIG_IP_NF_ARPTABLES ) ||IS_ENABLED (CONFIG_NFT_COMPAT_ARP ) { .name = "MARK", .revision = 2,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 308/780 netfilter: nf_tables: nft_fib_ipv6: fix VRF ipv4/ipv6 result discrepancy
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <[email protected]>
[ Upstream commit 8b53f46eb430fe5b42d485873b85331d2de2c469 ]
With a VRF, ipv4 and ipv6 FIB expression behave differently.
fib daddr . iif oif
Will return the input interface name for ipv4, but the real device for ipv6. Example:
If VRF device name is tvrf and real (incoming) device is veth0. First round is ok, both ipv4 and ipv6 will yield 'veth0'.
But in the second round (incoming device will be set to "tvrf"), ipv4 will yield "tvrf" whereas ipv6 returns "veth0" for the second round too.
This makes ipv6 behave like ipv4.
A followup patch will add a test case for this, without this change it will fail with:
get element inet t fibif6iif { tvrf . dead:1::99 . tvrf } ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FAIL: did not find tvrf . dead:1::99 . tvrf in fibif6iif
Alternatively we could either not do anything at all or change ipv4 to also return the lower/real device, however, nft (userspace) doc says "iif: if fib lookup provides a route then check its output interface is identical to the packets input interface." which is what the nft fib ipv4 behaviour is.
--- net/ipv6/netfilter/nft_fib_ipv6.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
net/ipv6/netfilter/nft_fib_ipv6.c +9 -4
@@ -158,6 +158,7 @@ void nft_fib6_eval(const struct nft_expr *expr, struct nft_regs *regs, {const struct nft_fib *priv =nft_expr_priv (expr);int noff =skb_network_offset (pkt->skb); +const struct net_device *found =NULL ;const struct net_device *oif =NULL ;u32 *dest = ®s->data[priv->dreg];struct ipv6hdr *iph, _iph;
@@ -203,11 +204,15 @@ void nft_fib6_eval(const struct nft_expr *expr, struct nft_regs *regs,if (rt->rt6i_flags & (RTF_REJECT |RTF_ANYCAST |RTF_LOCAL )) goto put_rt_err; -if (oif && oif != rt->rt6i_idev->dev && -l3mdev_master_ifindex_rcu (rt->rt6i_idev->dev) != oif->ifindex) - goto put_rt_err; +if (!oif) { + found = rt->rt6i_idev->dev; + }else { +if (oif == rt->rt6i_idev->dev || +l3mdev_master_ifindex_rcu (rt->rt6i_idev->dev) == oif->ifindex) + found = oif; + } -nft_fib_store_result (dest, priv, rt->rt6i_idev->dev); +nft_fib_store_result (dest, priv, found); put_rt_err:ip6_rt_put (rt); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 309/780 vfio/type1: Fix error unwind in migration dirty bitmap allocation
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li RongQing <[email protected]>
[ Upstream commit 4518e5a60c7fbf0cdff393c2681db39d77b4f87e ]
When setting up dirty page tracking at the vfio IOMMU backend for device migration, if an error is encountered allocating a tracking bitmap, the unwind loop fails to free previously allocated tracking bitmaps. This occurs because the wrong loop index is used to generate the tracking object. This results in unintended memory usage for the life of the current DMA mappings where bitmaps were successfully allocated.
Use the correct loop index to derive the tracking object for freeing during unwind.
--- drivers/vfio/vfio_iommu_type1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vfio/vfio_iommu_type1.c +1 -1
@@ -293,7 +293,7 @@ static int vfio_dma_bitmap_alloc_all(struct vfio_iommu *iommu, size_t pgsize)struct rb_node *p;for (p =rb_prev (n); p; p =rb_prev (p)) { -struct vfio_dma *dma =rb_entry (n, +struct vfio_dma *dma =rb_entry (p, struct vfio_dma, node);vfio_dma_bitmap_free (dma);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 310/780 Bluetooth: MGMT: iterate over mesh commands in mgmt_mesh_foreach()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Antipov <[email protected]>
[ Upstream commit 3bb88524b7d030160bb3c9b35f928b2778092111 ]
In 'mgmt_mesh_foreach()', iterate over mesh commands rather than generic mgmt ones. Compile tested only.
--- net/bluetooth/mgmt_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/mgmt_util.c +1 -1
@@ -304,7 +304,7 @@ void mgmt_mesh_foreach(struct hci_dev *hdev, {struct mgmt_mesh_tx *mesh_tx, *tmp; -list_for_each_entry_safe (mesh_tx, tmp, &hdev->mgmt_pending, list) { +list_for_each_entry_safe (mesh_tx, tmp, &hdev->mesh_pending, list) {if (!sk || mesh_tx->sk == sk)cb (mesh_tx, data); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 311/780 Bluetooth: btintel: Check dsbr size from EFI variable
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <[email protected]>
[ Upstream commit 3aa1dc3c9060e335e82e9c182bf3d1db29220b1b ]
Since the size of struct btintel_dsbr is already known, we can just start there instead of querying the EFI variable size. If the final result doesn't match what we expect also fail. This fixes a stack buffer overflow when the EFI variable is larger than struct btintel_dsbr.
--- drivers/bluetooth/btintel.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/bluetooth/btintel.c +2 -8
@@ -2719,7 +2719,7 @@ static int btintel_uefi_get_dsbr(u32 *dsbr_var) }__packed data;efi_status_t status; -unsigned long data_size =0 ; +unsigned long data_size =sizeof (data);efi_guid_t guid =EFI_GUID (0xe65d8884 ,0xd4af ,0x4b20 ,0x8d ,0x03 ,0x77 ,0x2e ,0xcc ,0x3d ,0xa5 ,0x31 );
@@ -2729,16 +2729,10 @@ static int btintel_uefi_get_dsbr(u32 *dsbr_var)if (!efi_rt_services_supported (EFI_RT_SUPPORTED_GET_VARIABLE ))return -EOPNOTSUPP ; - status = efi.get_variable (BTINTEL_EFI_DSBR , &guid,NULL , &data_size, -NULL ); - -if (status !=EFI_BUFFER_TOO_SMALL || !data_size) -return -EIO ; - status = efi.get_variable (BTINTEL_EFI_DSBR , &guid,NULL , &data_size, &data); -if (status !=EFI_SUCCESS ) +if (status !=EFI_SUCCESS || data_size !=sizeof (data))return -ENXIO ; *dsbr_var = data.dsbr;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 312/780 bpf, sockmap: Avoid using sk_socket after free when sending
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiayuan Chen <[email protected]>
[ Upstream commit 8259eb0e06d8f64c700f5fbdb28a5c18e10de291 ]
The sk->sk_socket is not locked or referenced in backlog thread, and during the call to skb_send_sock(), there is a race condition with the release of sk_socket. All types of sockets(tcp/udp/unix/vsock) will be affected.
Race conditions:
'''
CPU0 CPU1
backlog::skb_send_sock
sendmsg_unlocked
sock_sendmsg
sock_sendmsg_nosec
close(fd):
...
ops->release() -> sock_map_close()
sk_socket->ops = NULL
free(socket)
sock->ops->sendmsg
^
panic here'''
The ref of psock become 0 after sock_map_close() executed. '''
void sock_map_close()
{
...
if (likely(psock)) {
...
// !! here we remove psock and the ref of psock become 0
sock_map_remove_links(sk, psock)
psock = sk_psock_get(sk);
if (unlikely(!psock))
goto no_psock; <=== Control jumps here via goto
...
cancel_delayed_work_sync(&psock->work); <=== not executed
sk_psock_put(sk, psock);
...
}'''
Based on the fact that we already wait for the workqueue to finish in sock_map_close() if psock is held, we simply increase the psock reference count to avoid race conditions.
With this patch, if the backlog thread is running, sock_map_close() will wait for the backlog thread to complete and cancel all pending work.
If no backlog running, any pending work that hasn't started by then will fail when invoked by sk_psock_get(), as the psock reference count have been zeroed, and sk_psock_drop() will cancel all jobs via cancel_delayed_work_sync().
In summary, we require synchronization to coordinate the backlog thread and close() thread.
The panic I catched:
'''
Workqueue: events sk_psock_backlog RIP: 0010:sock_sendmsg+0x21d/0x440 RAX: 0000000000000000 RBX: ffffc9000521fad8 RCX: 0000000000000001 ... Call Trace: <TASK> ? die_addr+0x40/0xa0 ? exc_general_protection+0x14c/0x230 ? asm_exc_general_protection+0x26/0x30 ? sock_sendmsg+0x21d/0x440 ? sock_sendmsg+0x3e0/0x440 ? __pfx_sock_sendmsg+0x10/0x10 __skb_send_sock+0x543/0xb70 sk_psock_backlog+0x247/0xb80
...
'''
--- net/core/skmsg.c | 8 ++++++++ 1 file changed, 8 insertions(+)
net/core/skmsg.c +8 -0
@@ -656,6 +656,13 @@ static void sk_psock_backlog(struct work_struct *work)bool ingress;int ret; +/* Increment the psock refcnt to synchronize with close(fd) path in +* sock_map_close(), ensuring we wait for backlog thread completion +* before sk_socket freed. If refcnt increment fails, it indicates +* sock_map_close() completed with sk_socket potentially already freed. +*/ +if (!sk_psock_get (psock->sk)) +return ;mutex_lock (&psock->work_mutex);while ((skb =skb_peek (&psock->ingress_skb))) { len = skb->len;
@@ -707,6 +714,7 @@ static void sk_psock_backlog(struct work_struct *work) } end:mutex_unlock (&psock->work_mutex); +sk_psock_put (psock->sk, psock); }struct sk_psock *sk_psock_init (struct sock *sk,int node)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 313/780 netfilter: nf_tables: nft_fib: consistent l3mdev handling
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <[email protected]>
[ Upstream commit 9a119669fb1924cd9658c16da39a5a585e129e50 ]
fib has two modes:
1. Obtain output device according to source or destination address
2. Obtain the type of the address, e.g. local, unicast, multicast.
'fib daddr type' should return 'local' if the address is configured in this netns or unicast otherwise.
'fib daddr . iif type' should return 'local' if the address is configured on the input interface or unicast otherwise, i.e. more restrictive.
However, if the interface is part of a VRF, then 'fib daddr type' returns unicast even if the address is configured on the incoming interface.
This is broken for both ipv4 and ipv6.
In the ipv4 case, inet_dev_addr_type must only be used if the 'iif' or 'oif' (strict mode) was requested.
Else inet_addr_type_dev_table() needs to be used and the correct dev argument must be passed as well so the correct fib (vrf) table is used.
In the ipv6 case, the bug is similar, without strict mode, dev is NULL so .flowi6_l3mdev will be set to 0.
Add a new 'nft_fib_l3mdev_master_ifindex_rcu()' helper and use that to init the .l3mdev structure member.
For ipv6, use it from nft_fib6_flowi_init() which gets called from both the 'type' and the 'route' mode eval functions.
This provides consistent behaviour for all modes for both ipv4 and ipv6:
If strict matching is requested, the input respectively output device of the netfilter hooks is used.
Otherwise, use skb->dev to obtain the l3mdev ifindex.
Without this, most type checks in updated nft_fib.sh selftest fail:
FAIL: did not find veth0 . 10.9.9.1 . local in fibtype4
FAIL: did not find veth0 . dead:1::1 . local in fibtype6
FAIL: did not find veth0 . dead:9::1 . local in fibtype6
FAIL: did not find tvrf . 10.0.1.1 . local in fibtype4
FAIL: did not find tvrf . 10.9.9.1 . local in fibtype4
FAIL: did not find tvrf . dead:1::1 . local in fibtype6
FAIL: did not find tvrf . dead:9::1 . local in fibtype6
FAIL: fib expression address types match (iif in vrf)
(fib errounously returns 'unicast' for all of them, even
though all of these addresses are local to the vrf).
--- include/net/netfilter/nft_fib.h | 9 +++++++++ net/ipv4/netfilter/nft_fib_ipv4.c | 11 +++++++++-- net/ipv6/netfilter/nft_fib_ipv6.c | 4 +--- 3 files changed, 19 insertions(+), 5 deletions(-)
include/net/netfilter/nft_fib.h +9 -0
@@ -2,6 +2,7 @@#ifndef _NFT_FIB_H_#define _NFT_FIB_H_ +#include <net/l3mdev.h> #include <net/netfilter/nf_tables.h> struct nft_fib {
@@ -39,6 +40,14 @@ static inline bool nft_fib_can_skip(const struct nft_pktinfo *pkt)return nft_fib_is_loopback (pkt->skb, indev); } +static inline int nft_fib_l3mdev_master_ifindex_rcu (const struct nft_pktinfo *pkt, +const struct net_device *iif) +{ +const struct net_device *dev = iif ? iif : pkt->skb->dev; + +return l3mdev_master_ifindex_rcu (dev); +} +int nft_fib_dump (struct sk_buff *skb,const struct nft_expr *expr,bool reset);int nft_fib_init (const struct nft_ctx *ctx,const struct nft_expr *expr,const struct nlattr *const tb[]);
net/ipv4/netfilter/nft_fib_ipv4.c +9 -2
@@ -50,7 +50,12 @@ void nft_fib4_eval_type(const struct nft_expr *expr, struct nft_regs *regs,else addr = iph->saddr; - *dst =inet_dev_addr_type (nft_net (pkt), dev, addr); +if (priv->flags & (NFTA_FIB_F_IIF |NFTA_FIB_F_OIF )) { + *dst =inet_dev_addr_type (nft_net (pkt), dev, addr); +return ; + } + + *dst =inet_addr_type_dev_table (nft_net (pkt), pkt->skb->dev, addr); }EXPORT_SYMBOL_GPL (nft_fib4_eval_type);
@@ -65,8 +70,8 @@ void nft_fib4_eval(const struct nft_expr *expr, struct nft_regs *regs,struct flowi4 fl4 = { .flowi4_scope =RT_SCOPE_UNIVERSE , .flowi4_iif =LOOPBACK_IFINDEX , + .flowi4_proto = pkt->tprot, .flowi4_uid =sock_net_uid (nft_net (pkt),NULL ), - .flowi4_l3mdev =l3mdev_master_ifindex_rcu (nft_in (pkt)), };const struct net_device *oif;const struct net_device *found;
@@ -90,6 +95,8 @@ void nft_fib4_eval(const struct nft_expr *expr, struct nft_regs *regs,else oif =NULL ; + fl4.flowi4_l3mdev =nft_fib_l3mdev_master_ifindex_rcu (pkt, oif); + iph =skb_header_pointer (pkt->skb, noff,sizeof (_iph), &_iph);if (!iph) { regs->verdict.code =NFT_BREAK ;
net/ipv6/netfilter/nft_fib_ipv6.c +1 -3
@@ -50,6 +50,7 @@ static int nft_fib6_flowi_init(struct flowi6 *fl6, const struct nft_fib *priv, fl6->flowi6_mark = pkt->skb->mark; fl6->flowlabel = (*(__be32 *)iph) &IPV6_FLOWINFO_MASK ; + fl6->flowi6_l3mdev =nft_fib_l3mdev_master_ifindex_rcu (pkt, dev);return lookup_flags; }
@@ -73,8 +74,6 @@ static u32 __nft_fib6_eval_type(const struct nft_fib *priv,else if (priv->flags &NFTA_FIB_F_OIF ) dev =nft_out (pkt); - fl6.flowi6_l3mdev =l3mdev_master_ifindex_rcu (dev); -nft_fib6_flowi_init (&fl6, priv, pkt, dev, iph);if (dev &&nf_ipv6_chk_addr (nft_net (pkt), &fl6.daddr, dev, true))
@@ -166,7 +165,6 @@ void nft_fib6_eval(const struct nft_expr *expr, struct nft_regs *regs, .flowi6_iif = LOOPBACK_IFINDEX, .flowi6_proto = pkt->tprot, .flowi6_uid = sock_net_uid(nft_net(pkt), NULL), - .flowi6_l3mdev = l3mdev_master_ifindex_rcu(nft_in(pkt)), };struct rt6_info *rt;int lookup_flags;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 314/780 netfilter: nft_tunnel: fix geneve_opt dump
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fernando Fernandez Mancera <[email protected]>
[ Upstream commit 22a9613de4c29d7d0770bfb8a5a9d73eb8df7dad ]
When dumping a nft_tunnel with more than one geneve_opt configured the netlink attribute hierarchy should be as follow:
NFTA_TUNNEL_KEY_OPTS
| |--NFTA_TUNNEL_KEY_OPTS_GENEVE | | | |--NFTA_TUNNEL_KEY_GENEVE_CLASS | |--NFTA_TUNNEL_KEY_GENEVE_TYPE | |--NFTA_TUNNEL_KEY_GENEVE_DATA | |--NFTA_TUNNEL_KEY_OPTS_GENEVE | | | |--NFTA_TUNNEL_KEY_GENEVE_CLASS | |--NFTA_TUNNEL_KEY_GENEVE_TYPE | |--NFTA_TUNNEL_KEY_GENEVE_DATA | |--NFTA_TUNNEL_KEY_OPTS_GENEVE
...
Otherwise, userspace tools won't be able to fetch the geneve options configured correctly.
--- net/netfilter/nft_tunnel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
net/netfilter/nft_tunnel.c +4 -4
@@ -621,10 +621,10 @@ static int nft_tunnel_opts_dump(struct sk_buff *skb,struct geneve_opt *opt;int offset =0 ; - inner =nla_nest_start_noflag (skb,NFTA_TUNNEL_KEY_OPTS_GENEVE ); -if (!inner) - goto failure;while (opts->len > offset) { + inner =nla_nest_start_noflag (skb,NFTA_TUNNEL_KEY_OPTS_GENEVE ); +if (!inner) + goto failure; opt = (struct geneve_opt *)(opts->u.data + offset); if (nla_put_be16(skb, NFTA_TUNNEL_KEY_GENEVE_CLASS, opt->opt_class) ||
@@ -634,8 +634,8 @@ static int nft_tunnel_opts_dump(struct sk_buff *skb, opt->length * 4, opt->opt_data)) goto inner_failure; offset +=sizeof (*opt) + opt->length *4 ; +nla_nest_end (skb, inner); } -nla_nest_end (skb, inner); }nla_nest_end (skb, nest);return 0 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 315/780 RISC-V: KVM: lock the correct mp_state during reset
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Radim Krčmář <[email protected]>
[ Upstream commit 7917be170928189fefad490d1a1237fdfa6b856f ]
Currently, the kvm_riscv_vcpu_sbi_system_reset() function locks vcpu->arch.mp_state_lock when updating tmp->arch.mp_state.mp_state which is incorrect hence fix it.
--- arch/riscv/kvm/vcpu_sbi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/kvm/vcpu_sbi.c +2 -2
@@ -143,9 +143,9 @@ void kvm_riscv_vcpu_sbi_system_reset(struct kvm_vcpu *vcpu,struct kvm_vcpu *tmp;kvm_for_each_vcpu (i, tmp, vcpu->kvm) { -spin_lock (&vcpu->arch.mp_state_lock); +spin_lock (&tmp->arch.mp_state_lock);WRITE_ONCE (tmp->arch.mp_state.mp_state,KVM_MP_STATE_STOPPED ); -spin_unlock (&vcpu->arch.mp_state_lock); +spin_unlock (&tmp->arch.mp_state_lock); }kvm_make_all_cpus_request (vcpu->kvm,KVM_REQ_SLEEP );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 316/780 net: usb: aqc111: fix error handling of usbnet read calls
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nikita Zhandarovich <[email protected]>
[ Upstream commit 405b0d610745fb5e84fc2961d9b960abb9f3d107 ]
Syzkaller, courtesy of syzbot, identified an error (see report [1]) in aqc111 driver, caused by incomplete sanitation of usb read calls' results. This problem is quite similar to the one fixed in commit 920a9fa27e78 ("net: asix: add proper error handling of usb read errors").
For instance, usbnet_read_cmd() may read fewer than 'size' bytes, even if the caller expected the full amount, and aqc111_read_cmd() will not check its result properly. As [1] shows, this may lead to MAC address in aqc111_bind() being only partly initialized, triggering KMSAN warnings.
Fix the issue by verifying that the number of bytes read is as expected and not less.
[1] Partial syzbot report:
BUG: KMSAN: uninit-value in is_valid_ether_addr include/linux/etherdevice.h:208 [inline] BUG: KMSAN: uninit-value in usbnet_probe+0x2e57/0x4390 drivers/net/usb/usbnet.c:1830 is_valid_ether_addr include/linux/etherdevice.h:208 [inline] usbnet_probe+0x2e57/0x4390 drivers/net/usb/usbnet.c:1830 usb_probe_interface+0xd01/0x1310 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x4d1/0xd90 drivers/base/dd.c:658 __driver_probe_device+0x268/0x380 drivers/base/dd.c:800
...
Uninit was stored to memory at:
dev_addr_mod+0xb0/0x550 net/core/dev_addr_lists.c:582 __dev_addr_set include/linux/netdevice.h:4874 [inline] eth_hw_addr_set include/linux/etherdevice.h:325 [inline] aqc111_bind+0x35f/0x1150 drivers/net/usb/aqc111.c:717 usbnet_probe+0xbe6/0x4390 drivers/net/usb/usbnet.c:1772 usb_probe_interface+0xd01/0x1310 drivers/usb/core/driver.c:396
...
Uninit was stored to memory at:
ether_addr_copy include/linux/etherdevice.h:305 [inline] aqc111_read_perm_mac drivers/net/usb/aqc111.c:663 [inline] aqc111_bind+0x794/0x1150 drivers/net/usb/aqc111.c:713 usbnet_probe+0xbe6/0x4390 drivers/net/usb/usbnet.c:1772 usb_probe_interface+0xd01/0x1310 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline]
...
Local variable buf.i created at:
aqc111_read_perm_mac drivers/net/usb/aqc111.c:656 [inline] aqc111_bind+0x221/0x1150 drivers/net/usb/aqc111.c:713 usbnet_probe+0xbe6/0x4390 drivers/net/usb/usbnet.c:1772
--- drivers/net/usb/aqc111.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/net/usb/aqc111.c +8 -2
@@ -30,10 +30,13 @@ static int aqc111_read_cmd_nopm(struct usbnet *dev, u8 cmd, u16 value, ret =usbnet_read_cmd_nopm (dev, cmd,USB_DIR_IN |USB_TYPE_VENDOR |USB_RECIP_DEVICE , value, index, data, size); -if (unlikely (ret <0 )) +if (unlikely (ret < size)) { + ret = ret <0 ? ret : -ENODATA ; +netdev_warn (dev->net,"Failed to read(0x%x) reg index 0x%04x: %d\n" , cmd, index, ret); + }return ret; }
@@ -46,10 +49,13 @@ static int aqc111_read_cmd(struct usbnet *dev, u8 cmd, u16 value, ret =usbnet_read_cmd (dev, cmd,USB_DIR_IN |USB_TYPE_VENDOR |USB_RECIP_DEVICE , value, index, data, size); -if (unlikely (ret <0 )) +if (unlikely (ret < size)) { + ret = ret <0 ? ret : -ENODATA ; +netdev_warn (dev->net,"Failed to read(0x%x) reg index 0x%04x: %d\n" , cmd, index, ret); + }return ret; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 317/780 octeontx2-af: Send Link events one by one
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Subbaraya Sundeep <[email protected]>
[ Upstream commit ba5cb47b56e5d89f0a5eb5163ffbfda1e3e7cef0 ]
Send link events one after another otherwise new message is overwriting the message which is being processed by PF.
--- drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c | 2 ++ drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 2 ++ drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c | 2 ++ 3 files changed, 6 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c +2 -0
@@ -143,6 +143,8 @@ static int mcs_notify_pfvf(struct mcs_intr_event *event, struct rvu *rvu)otx2_mbox_msg_send_up (&rvu->afpf_wq_info.mbox_up, pf); +otx2_mbox_wait_for_rsp (&rvu->afpf_wq_info.mbox_up, pf); +mutex_unlock (&rvu->mbox_lock);return 0 ;
drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c +2 -0
@@ -272,6 +272,8 @@ static void cgx_notify_pfs(struct cgx_link_event *event, struct rvu *rvu)otx2_mbox_msg_send_up (&rvu->afpf_wq_info.mbox_up, pfid); +otx2_mbox_wait_for_rsp (&rvu->afpf_wq_info.mbox_up, pfid); +mutex_unlock (&rvu->mbox_lock); }while (pfmap); }
drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c +2 -0
@@ -60,6 +60,8 @@ static int rvu_rep_up_notify(struct rvu *rvu, struct rep_event *event)otx2_mbox_msg_send_up (&rvu->afpf_wq_info.mbox_up, pf); +otx2_mbox_wait_for_rsp (&rvu->afpf_wq_info.mbox_up, pf); +mutex_unlock (&rvu->mbox_lock);return 0 ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 318/780 vsock/virtio: fix `rx_bytes` accounting for stream sockets
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefano Garzarella <[email protected]>
[ Upstream commit 45ca7e9f0730ae36fc610e675b990e9cc9ca0714 ]
In struct virtio_vsock_sock, we maintain two counters:
- rx_bytes: used internally to track how many bytes have been read. This supports mechanisms like .stream_has_data() and sock_rcvlowat().
- fwd_cnt: used for the credit mechanism to inform available receive buffer space to the remote peer.
These counters are updated via virtio_transport_inc_rx_pkt() and virtio_transport_dec_rx_pkt().
Since the beginning with commit 06a8fc78367d ("VSOCK: Introduce virtio_vsock_common.ko"), we call virtio_transport_dec_rx_pkt() in virtio_transport_stream_do_dequeue() only when we consume the entire packet, so partial reads, do not update rx_bytes and fwd_cnt.
This is fine for fwd_cnt, because we still have space used for the entire packet, and we don't want to update the credit for the other peer until we free the space of the entire packet. However, this causes rx_bytes to be stale on partial reads.
Previously, this didn’t cause issues because rx_bytes was used only by .stream_has_data(), and any unread portion of a packet implied data was still available. However, since commit 93b808876682 ("virtio/vsock: fix logic which reduces credit update messages"), we now rely on rx_bytes to determine if a credit update should be sent when the data in the RX queue drops below SO_RCVLOWAT value.
This patch fixes the accounting by updating rx_bytes with the number of bytes actually read, even on partial reads, while leaving fwd_cnt untouched until the packet is fully consumed. Also introduce a new buf_used counter to check that the remote peer is honoring the given credit; this was previously done via rx_bytes.
--- include/linux/virtio_vsock.h | 1 + net/vmw_vsock/virtio_transport_common.c | 26 +++++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-)
include/linux/virtio_vsock.h +1 -0
@@ -140,6 +140,7 @@ struct virtio_vsock_sock {u32 last_fwd_cnt;u32 rx_bytes;u32 buf_alloc; +u32 buf_used;struct sk_buff_head rx_queue;u32 msg_count; };
net/vmw_vsock/virtio_transport_common.c +16 -10
@@ -441,18 +441,20 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk,static bool virtio_transport_inc_rx_pkt (struct virtio_vsock_sock *vvs,u32 len) { -if (vvs->rx_bytes + len > vvs->buf_alloc) +if (vvs->buf_used + len > vvs->buf_alloc)return false; vvs->rx_bytes += len; + vvs->buf_used += len;return true; }static void virtio_transport_dec_rx_pkt (struct virtio_vsock_sock *vvs, -u32 len) +u32 bytes_read,u32 bytes_dequeued) { - vvs->rx_bytes -= len; - vvs->fwd_cnt += len; + vvs->rx_bytes -= bytes_read; + vvs->buf_used -= bytes_dequeued; + vvs->fwd_cnt += bytes_dequeued; }void virtio_transport_inc_tx_pkt (struct virtio_vsock_sock *vvs,struct sk_buff *skb)
@@ -581,11 +583,11 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, size_t len) {struct virtio_vsock_sock *vvs = vsk->trans; -size_t bytes, total =0 ;struct sk_buff *skb;u32 fwd_cnt_delta;bool low_rx_bytes;int err = -EFAULT ; +size_t total =0 ;u32 free_space;spin_lock_bh (&vvs->rx_lock);
@@ -597,6 +599,8 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, }while (total < len && !skb_queue_empty (&vvs->rx_queue)) { +size_t bytes, dequeued =0 ; + skb =skb_peek (&vvs->rx_queue); bytes = min_t(size_t, len - total,
@@ -620,12 +624,12 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk,VIRTIO_VSOCK_SKB_CB (skb)->offset += bytes;if (skb->len ==VIRTIO_VSOCK_SKB_CB (skb)->offset) { -u32 pkt_len =le32_to_cpu (virtio_vsock_hdr (skb)->len); - -virtio_transport_dec_rx_pkt (vvs, pkt_len); + dequeued =le32_to_cpu (virtio_vsock_hdr (skb)->len);__skb_unlink (skb, &vvs->rx_queue);consume_skb (skb); } + +virtio_transport_dec_rx_pkt (vvs, bytes, dequeued); } fwd_cnt_delta = vvs->fwd_cnt - vvs->last_fwd_cnt;
@@ -781,7 +785,7 @@ static int virtio_transport_seqpacket_do_dequeue(struct vsock_sock *vsk, msg->msg_flags |=MSG_EOR ; } -virtio_transport_dec_rx_pkt (vvs, pkt_len); +virtio_transport_dec_rx_pkt (vvs, pkt_len, pkt_len);kfree_skb (skb); }
@@ -1735,6 +1739,7 @@ int virtio_transport_read_skb(struct vsock_sock *vsk, skb_read_actor_t recv_actostruct sock *sk =sk_vsock (vsk);struct virtio_vsock_hdr *hdr;struct sk_buff *skb; +u32 pkt_len;int off =0 ;int err;
@@ -1752,7 +1757,8 @@ int virtio_transport_read_skb(struct vsock_sock *vsk, skb_read_actor_t recv_actoif (le32_to_cpu (hdr->flags) &VIRTIO_VSOCK_SEQ_EOM ) vvs->msg_count--; -virtio_transport_dec_rx_pkt (vvs,le32_to_cpu (hdr->len)); + pkt_len =le32_to_cpu (hdr->len); +virtio_transport_dec_rx_pkt (vvs, pkt_len, pkt_len);spin_unlock_bh (&vvs->rx_lock);virtio_transport_send_credit_update (vsk);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 319/780 RDMA/cma: Fix hang when cma_netevent_callback fails to queue_work
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jack Morgenstein <[email protected]>
[ Upstream commit 92a251c3df8ea1991cd9fe00f1ab0cfce18d7711 ]
The cited commit fixed a crash when cma_netevent_callback was called for a cma_id while work on that id from a previous call had not yet started. The work item was re-initialized in the second call, which corrupted the work item currently in the work queue.
However, it left a problem when queue_work fails (because the item is still pending in the work queue from a previous call). In this case, cma_id_put (which is called in the work handler) is therefore not called. This results in a userspace process hang (zombie process).
Fix this by calling cma_id_put() if queue_work fails.
--- drivers/infiniband/core/cma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/core/cma.c +2 -1
@@ -5245,7 +5245,8 @@ static int cma_netevent_callback(struct notifier_block *self, neigh->ha, ETH_ALEN))continue ;cma_id_get (current_id); -queue_work (cma_wq, ¤t_id->id.net_work); +if (!queue_work (cma_wq, ¤t_id->id.net_work)) +cma_id_put (current_id); } out:spin_unlock_irqrestore (&id_table_lock, flags);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 320/780 net: lan966x: Fix 1-step timestamping over ipv4 or ipv6
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Horatiu Vultur <[email protected]>
[ Upstream commit 57ee9584fd8606deef66d7b65fa4dcf94f6843aa ]
When enabling 1-step timestamping for ptp frames that are over udpv4 or udpv6 then the inserted timestamp is added at the wrong offset in the frame, meaning that will modify the frame at the wrong place, so the frame will be malformed.
To fix this, the HW needs to know which kind of frame it is to know where to insert the timestamp. For that there is a field in the IFH that says the PDU_TYPE, which can be NONE which is the default value, IPV4 or IPV6. Therefore make sure to set the PDU_TYPE so the HW knows where to insert the timestamp.
Like I mention before the issue is not seen with L2 frames because by default the PDU_TYPE has a value of 0, which represents the L2 frames.
--- .../ethernet/microchip/lan966x/lan966x_main.c | 6 +++ .../ethernet/microchip/lan966x/lan966x_main.h | 5 ++ .../ethernet/microchip/lan966x/lan966x_ptp.c | 49 ++++++++++++++----- 3 files changed, 47 insertions(+), 13 deletions(-)
drivers/net/ethernet/microchip/lan966x/lan966x_main.c +6 -0
@@ -353,6 +353,11 @@ static void lan966x_ifh_set_rew_op(void *ifh, u64 rew_op)lan966x_ifh_set (ifh, rew_op,IFH_POS_REW_CMD ,IFH_WID_REW_CMD ); } +static void lan966x_ifh_set_oam_type (void *ifh,u64 oam_type) +{ +lan966x_ifh_set (ifh, oam_type,IFH_POS_PDU_TYPE ,IFH_WID_PDU_TYPE ); +} +static void lan966x_ifh_set_timestamp (void *ifh,u64 timestamp) {lan966x_ifh_set (ifh, timestamp,IFH_POS_TIMESTAMP ,IFH_WID_TIMESTAMP );
@@ -380,6 +385,7 @@ static netdev_tx_t lan966x_port_xmit(struct sk_buff *skb,return err;lan966x_ifh_set_rew_op (ifh,LAN966X_SKB_CB (skb)->rew_op); +lan966x_ifh_set_oam_type (ifh,LAN966X_SKB_CB (skb)->pdu_type);lan966x_ifh_set_timestamp (ifh,LAN966X_SKB_CB (skb)->ts_id); }
drivers/net/ethernet/microchip/lan966x/lan966x_main.h +5 -0
@@ -75,6 +75,10 @@#define IFH_REW_OP_ONE_STEP_PTP 0x3#define IFH_REW_OP_TWO_STEP_PTP 0x4 +#define IFH_PDU_TYPE_NONE 0 +#define IFH_PDU_TYPE_IPV4 7 +#define IFH_PDU_TYPE_IPV6 8 +#define FDMA_RX_DCB_MAX_DBS 1#define FDMA_TX_DCB_MAX_DBS 1
@@ -254,6 +258,7 @@ struct lan966x_phc {struct lan966x_skb_cb {u8 rew_op; +u8 pdu_type;u16 ts_id;unsigned long jiffies; };
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c +36 -13
80 lines not on this page · raw message
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 321/780 net: xilinx: axienet: Fix Tx skb circular buffer occupancy check in dmaengine xmit
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Suraj Gupta <[email protected]>
[ Upstream commit 32374234ab0101881e7d0c6a8ef7ebce566c46c9 ]
In Dmaengine flow, driver maintains struct skbuf_dma_descriptor rings each element of which corresponds to a skb. In Tx datapath, compare available space in skb ring with number of skbs instead of skb fragments. Replace x * (MAX_SKB_FRAGS) in netif_txq_completed_wake() and netif_txq_maybe_stop() with x * (1 skb) to fix the comparison.
--- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +3 -3
@@ -880,7 +880,7 @@ static void axienet_dma_tx_cb(void *data, const struct dmaengine_result *result)dev_consume_skb_any (skbuf_dma->skb);netif_txq_completed_wake (txq,1 , len,CIRC_SPACE (lp->tx_ring_head, lp->tx_ring_tail,TX_BD_NUM_MAX ), -2 *MAX_SKB_FRAGS ); +2 ); }/**
@@ -914,7 +914,7 @@ axienet_start_xmit_dmaengine(struct sk_buff *skb, struct net_device *ndev) dma_dev = lp->tx_chan->device; sg_len =skb_shinfo (skb)->nr_frags +1 ; -if (CIRC_SPACE (lp->tx_ring_head, lp->tx_ring_tail,TX_BD_NUM_MAX ) <= sg_len) { +if (CIRC_SPACE (lp->tx_ring_head, lp->tx_ring_tail,TX_BD_NUM_MAX ) <=1 ) {netif_stop_queue (ndev);if (net_ratelimit ())netdev_warn (ndev,"TX ring unexpectedly full\n" );
@@ -964,7 +964,7 @@ axienet_start_xmit_dmaengine(struct sk_buff *skb, struct net_device *ndev) txq =skb_get_tx_queue (lp->ndev, skb);netdev_tx_sent_queue (txq, skb->len);netif_txq_maybe_stop (txq,CIRC_SPACE (lp->tx_ring_head, lp->tx_ring_tail,TX_BD_NUM_MAX ), -MAX_SKB_FRAGS +1 ,2 *MAX_SKB_FRAGS ); +1 ,2 );dmaengine_submit (dma_tx_desc);dma_async_issue_pending (lp->tx_chan);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 322/780 af_packet: move notifiers packet_dev_mc out of rcu critical section
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stanislav Fomichev <[email protected]>
[ Upstream commit d8d85ef0a631df9127f202e6371bb33a0b589952 ]
Syzkaller reports the following issue:
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:578 __mutex_lock+0x106/0xe80 kernel/locking/mutex.c:746 team_change_rx_flags+0x38/0x220 drivers/net/team/team_core.c:1781 dev_change_rx_flags net/core/dev.c:9145 [inline] __dev_set_promiscuity+0x3f8/0x590 net/core/dev.c:9189 netif_set_promiscuity+0x50/0xe0 net/core/dev.c:9201 dev_set_promiscuity+0x126/0x260 net/core/dev_api.c:286 packet_dev_mc net/packet/af_packet.c:3698 [inline] packet_dev_mclist_delete net/packet/af_packet.c:3722 [inline] packet_notifier+0x292/0xa60 net/packet/af_packet.c:4247 notifier_call_chain+0x1b3/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2214 [inline] call_netdevice_notifiers net/core/dev.c:2228 [inline] unregister_netdevice_many_notify+0x15d8/0x2330 net/core/dev.c:11972 rtnl_delete_link net/core/rtnetlink.c:3522 [inline] rtnl_dellink+0x488/0x710 net/core/rtnetlink.c:3564 rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6955 netlink_rcv_skb+0x219/0x490 net/netlink/af_netlink.c:2534
Calling PACKET_ADD_MEMBERSHIP on an ops-locked device can trigger the NETDEV_UNREGISTER notifier, which may require disabling promiscuous and/or allmulti mode. Both of these operations require acquiring the netdev instance lock.
Move the call to packet_dev_mc outside of the RCU critical section. The mclist modifications (add, del, flush, unregister) are protected by the RTNL, not the RCU. The RCU only protects the sklist and its associated sks. The delayed operation on the mclist entry remains within the RTNL.
--- net/packet/af_packet.c | 21 ++++++++++++++++----- net/packet/internal.h | 1 + 2 files changed, 17 insertions(+), 5 deletions(-)
net/packet/af_packet.c +16 -5
@@ -3713,15 +3713,15 @@ static int packet_dev_mc(struct net_device *dev, struct packet_mclist *i, }static void packet_dev_mclist_delete (struct net_device *dev, -struct packet_mclist **mlp) +struct packet_mclist **mlp, +struct list_head *list) {struct packet_mclist *ml;while ((ml = *mlp) !=NULL ) {if (ml->ifindex == dev->ifindex) { -packet_dev_mc (dev, ml,-1 ); +list_add (&ml->remove_list, list); *mlp = ml->next; -kfree (ml); }else mlp = &ml->next; }
@@ -3769,6 +3769,7 @@ static int packet_mc_add(struct sock *sk, struct packet_mreq_max *mreq)memcpy (i->addr, mreq->mr_address, i->alen);memset (i->addr + i->alen,0 ,sizeof (i->addr) - i->alen); i->count =1 ; +INIT_LIST_HEAD (&i->remove_list); i->next = po->mclist; po->mclist = i; err =packet_dev_mc (dev, i,1 );
@@ -4233,9 +4234,11 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,static int packet_notifier (struct notifier_block *this,unsigned long msg,void *ptr) { -struct sock *sk;struct net_device *dev =netdev_notifier_info_to_dev (ptr);struct net *net =dev_net (dev); +struct packet_mclist *ml, *tmp; +LIST_HEAD (mclist); +struct sock *sk;rcu_read_lock ();sk_for_each_rcu (sk, &net->packet.sklist) {
@@ -4244,7 +4247,8 @@ static int packet_notifier(struct notifier_block *this,switch (msg) {case NETDEV_UNREGISTER :if (po->mclist) -packet_dev_mclist_delete (dev, &po->mclist); +packet_dev_mclist_delete (dev, &po->mclist, + &mclist); fallthrough;case NETDEV_DOWN :
@@ -4277,6 +4281,13 @@ static int packet_notifier(struct notifier_block *this, } }rcu_read_unlock (); + +/* packet_dev_mc might grab instance locks so can't run under rcu */ +list_for_each_entry_safe (ml, tmp, &mclist, remove_list) { +packet_dev_mc (dev, ml,-1 ); +kfree (ml); + } +return NOTIFY_DONE ; }
net/packet/internal.h +1 -0
@@ -11,6 +11,7 @@ struct packet_mclist {unsigned short type;unsigned short alen;unsigned char addr[MAX_ADDR_LEN ]; +struct list_head remove_list; };/* kbdq - kernel block descriptor queue */
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 323/780 virtio-pci: Fix result size returned for the admin command completion
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Israel Rukshin <[email protected]>
[ Upstream commit 9ef41ebf787fcbde99ac404ae473f8467641f983 ]
The result size returned by virtio_pci_admin_dev_parts_get() is 8 bytes larger than the actual result data size. This occurs because the result_sg_size field of the command is filled with the result length from virtqueue_get_buf(), which includes both the data size and an additional 8 bytes of status.
This oversized result size causes two issues:
1. The state transferred to the destination includes 8 bytes of extra data at the end.
2. The allocated buffer in the kernel may be smaller than the returned size, leading to failures when reading beyond the allocated size.
The commit fixes this by subtracting the status size from the result of virtqueue_get_buf().
This fix has been tested through live migrations with virtio-net, virtio-net-transitional, and virtio-blk devices.
Message-Id: <[email protected]>
--- drivers/virtio/virtio_pci_modern.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/virtio/virtio_pci_modern.c +12 -1
@@ -48,6 +48,7 @@ void vp_modern_avq_done(struct virtqueue *vq) {struct virtio_pci_device *vp_dev =to_vp_device (vq->vdev);struct virtio_pci_admin_vq *admin_vq = &vp_dev->admin_vq; +unsigned int status_size =sizeof (struct virtio_admin_cmd_status );struct virtio_admin_cmd *cmd;unsigned long flags;unsigned int len;
@@ -56,7 +57,17 @@ void vp_modern_avq_done(struct virtqueue *vq)do {virtqueue_disable_cb (vq);while ((cmd =virtqueue_get_buf (vq, &len))) { - cmd->result_sg_size = len; +/* If the number of bytes written by the device is less +* than the size of struct virtio_admin_cmd_status, the +* remaining status bytes will remain zero-initialized, +* since the buffer was zeroed during allocation. +* In this case, set the size of command_specific_result +* to 0. +*/ +if (len < status_size) + cmd->result_sg_size =0 ; +else + cmd->result_sg_size = len - status_size;complete (&cmd->completion); } }while (!virtqueue_enable_cb (vq));
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 324/780 bpf: Avoid __bpf_prog_ret0_warn when jit fails
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: KaFai Wan <[email protected]>
[ Upstream commit 86bc9c742426a16b52a10ef61f5b721aecca2344 ]
syzkaller reported an issue:
WARNING: CPU: 3 PID: 217 at kernel/bpf/core.c:2357 __bpf_prog_ret0_warn+0xa/0x20 kernel/bpf/core.c:2357 Modules linked in: CPU: 3 UID: 0 PID: 217 Comm: kworker/u32:6 Not tainted 6.15.0-rc4-syzkaller-00040-g8bac8898fe39 RIP: 0010:__bpf_prog_ret0_warn+0xa/0x20 kernel/bpf/core.c:2357 Call Trace: <TASK> bpf_dispatcher_nop_func include/linux/bpf.h:1316 [inline] __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run include/linux/filter.h:725 [inline] cls_bpf_classify+0x74a/0x1110 net/sched/cls_bpf.c:105 ...
When creating bpf program, 'fp->jit_requested' depends on bpf_jit_enable. This issue is triggered because of CONFIG_BPF_JIT_ALWAYS_ON is not set and bpf_jit_enable is set to 1, causing the arch to attempt JIT the prog, but jit failed due to FAULT_INJECTION. As a result, incorrectly treats the program as valid, when the program runs it calls __bpf_prog_ret0_warn and triggers the WARN_ON_ONCE(1).
--- kernel/bpf/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/core.c +1 -1
@@ -2474,7 +2474,7 @@ struct bpf_prog *bpf_prog_select_runtime(struct bpf_prog *fp, int *err)/* In case of BPF to BPF calls, verifier did all the prep * work with regards to JITing, etc. */ -bool jit_needed = false; +bool jit_needed = fp->jit_requested;if (fp->bpf_func) goto finalize;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 325/780 bpf: Do not include stack ptr register in precision backtracking bookkeeping
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yonghong Song <[email protected]>
[ Upstream commit e2d2115e56c4a02377189bfc3a9a7933552a7b0f ]
Yi Lai reported an issue ([1]) where the following warning appears in kernel dmesg:
[ 60.643604] verifier backtracking bug
[ 60.643635] WARNING: CPU: 10 PID: 2315 at kernel/bpf/verifier.c:4302 __mark_chain_precision+0x3a6c/0x3e10
[ 60.648428] Modules linked in: bpf_testmod(OE)
[ 60.650471] CPU: 10 UID: 0 PID: 2315 Comm: test_progs Tainted: G OE 6.15.0-rc4-gef11287f8289-dirty #327 PREEMPT(full)
[ 60.654385] Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
[ 60.656682] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
[ 60.660475] RIP: 0010:__mark_chain_precision+0x3a6c/0x3e10
[ 60.662814] Code: 5a 30 84 89 ea e8 c4 d9 01 00 80 3d 3e 7d d8 04 00 0f 85 60 fa ff ff c6 05 31 7d d8 04
01 48 c7 c7 00 58 30 84 e8 c4 06 a5 ff <0f> 0b e9 46 fa ff ff 48 ...
[ 60.668720] RSP: 0018:ffff888116cc7298 EFLAGS: 00010246
[ 60.671075] RAX: 54d70e82dfd31900 RBX: ffff888115b65e20 RCX: 0000000000000000
[ 60.673659] RDX: 0000000000000001 RSI: 0000000000000004 RDI: 00000000ffffffff
[ 60.676241] RBP: 0000000000000400 R08: ffff8881f6f23bd3 R09: 1ffff1103ede477a
[ 60.678787] R10: dffffc0000000000 R11: ffffed103ede477b R12: ffff888115b60ae8
[ 60.681420] R13: 1ffff11022b6cbc4 R14: 00000000fffffff2 R15: 0000000000000001
[ 60.684030] FS: 00007fc2aedd80c0(0000) GS:ffff88826fa8a000(0000) knlGS:0000000000000000
[ 60.686837] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 60.689027] CR2: 000056325369e000 CR3: 000000011088b002 CR4: 0000000000370ef0
[ 60.691623] Call Trace:
[ 60.692821] <TASK>
[ 60.693960] ? __pfx_verbose+0x10/0x10
[ 60.695656] ? __pfx_disasm_kfunc_name+0x10/0x10
[ 60.697495] check_cond_jmp_op+0x16f7/0x39b0
[ 60.699237] do_check+0x58fa/0xab10
...Further analysis shows the warning is at line 4302 as below:
4294 /* static subprog call instruction, which
4295 * means that we are exiting current subprog,
4296 * so only r1-r5 could be still requested as
4297 * precise, r0 and r6-r10 or any stack slot in
4298 * the current frame should be zero by now
4299 */
4300 if (bt_reg_mask(bt) & ~BPF_REGMASK_ARGS) {
4301 verbose(env, "BUG regs %x\n", bt_reg_mask(bt));
4302 WARN_ONCE(1, "verifier backtracking bug");
4303 return -EFAULT;4304 }
With the below test (also in the next patch):
__used __naked static void __bpf_jmp_r10(void)
{
asm volatile (
"r2 = 2314885393468386424 ll;"
"goto +0;"
"if r2 <= r10 goto +3;"
"if r1 >= -1835016 goto +0;"
"if r2 <= 8 goto +0;"
"if r3 <= 0 goto +0;"
"exit;"
::: __clobber_all);}
SEC("?raw_tp")
__naked void bpf_jmp_r10(void)
{
asm volatile (
"r3 = 0 ll;"
"call __bpf_jmp_r10;"
"r0 = 0;"
"exit;"
::: __clobber_all);}
The following is the verifier failure log:
0: (18) r3 = 0x0 ; R3_w=0
2: (85) call pc+2
caller:
R10=fp0
callee:
frame1: R1=ctx() R3_w=0 R10=fp0
5: frame1: R1=ctx() R3_w=0 R10=fp0
; asm volatile (" \ @ verifier_precision.c:184
5: (18) r2 = 0x20202000256c6c78 ; frame1: R2_w=0x20202000256c6c78
7: (05) goto pc+0
8: (bd) if r2 <= r10 goto pc+3 ; frame1: R2_w=0x20202000256c6c78 R10=fp0
9: (35) if r1 >= 0xffe3fff8 goto pc+0 ; frame1: R1=ctx()
10: (b5) if r2 <= 0x8 goto pc+0
mark_precise: frame1: last_idx 10 first_idx 0 subseq_idx -1
mark_precise: frame1: regs=r2 stack= before 9: (35) if r1 >= 0xffe3fff8 goto pc+0
mark_precise: frame1: regs=r2 stack= before 8: (bd) if r2 <= r10 goto pc+3
mark_precise: frame1: regs=r2,r10 stack= before 7: (05) goto pc+0
mark_precise: frame1: regs=r2,r10 stack= before 5: (18) r2 = 0x20202000256c6c78
mark_precise: frame1: regs=r10 stack= before 2: (85) call pc+2
BUG regs 400
The main failure reason is due to r10 in precision backtracking bookkeeping. Actually r10 is always precise and there is no need to add it for the precision backtracking bookkeeping.
One way to fix the issue is to prevent bt_set_reg() if any src/dst reg is r10. Andrii suggested to go with push_insn_history() approach to avoid explicitly checking r10 in backtrack_insn().
This patch added push_insn_history() support for cond_jmp like 'rX <op> rY' operations. In check_cond_jmp_op(), if any of rX or rY is a stack pointer, push_insn_history() will record such information, and later backtrack_insn() will do bt_set_reg() properly for those register(s).
[1] https://lore.kernel.org/bpf/Z%2F8q3xzpU59CIYQE@ly-workstation/
Reported by: Yi Lai <[email protected]>
--- include/linux/bpf_verifier.h | 12 ++++++++---- kernel/bpf/verifier.c | 18 ++++++++++++++++-- 2 files changed, 24 insertions(+), 6 deletions(-)
include/linux/bpf_verifier.h +8 -4
@@ -356,7 +356,11 @@ enum {INSN_F_SPI_MASK =0x3f ,/* 6 bits */ INSN_F_SPI_SHIFT =3 ,/* shifted 3 bits to the left */ -INSN_F_STACK_ACCESS =BIT (9 ),/* we need 10 bits total */ +INSN_F_STACK_ACCESS =BIT (9 ), + +INSN_F_DST_REG_STACK =BIT (10 ),/* dst_reg is PTR_TO_STACK */ +INSN_F_SRC_REG_STACK =BIT (11 ),/* src_reg is PTR_TO_STACK */ +/* total 12 bits are used now. */ };static_assert (INSN_F_FRAMENO_MASK +1 >=MAX_CALL_FRAMES );
@@ -365,9 +369,9 @@ static_assert(INSN_F_SPI_MASK + 1 >= MAX_BPF_STACK / 8);struct bpf_insn_hist_entry {u32 idx;/* insn idx can't be bigger than 1 million */ -u32 prev_idx :22 ; -/* special flags, e.g., whether insn is doing register stack spill/load */ -u32 flags :10 ; +u32 prev_idx :20 ; +/* special INSN_F_xxx flags */ +u32 flags :12 ;/* additional registers that need precision tracking when this * jump is backtracked, vector of six 10-bit records */
kernel/bpf/verifier.c +16 -2
@@ -4413,8 +4413,10 @@ static int backtrack_insn(struct bpf_verifier_env *env, int idx, int subseq_idx,* before it would be equally necessary to * propagate it to dreg. */ -bt_set_reg (bt, dreg); -bt_set_reg (bt, sreg); +if (!hist || !(hist->flags &INSN_F_SRC_REG_STACK )) +bt_set_reg (bt, sreg); +if (!hist || !(hist->flags &INSN_F_DST_REG_STACK )) +bt_set_reg (bt, dreg); }else if (BPF_SRC (insn->code) ==BPF_K ) {/* dreg <cond> K * Only dreg still needs precision before
@@ -16377,6 +16379,7 @@ static int check_cond_jmp_op(struct bpf_verifier_env *env,struct bpf_reg_state *eq_branch_regs;struct linked_regs linked_regs = {};u8 opcode =BPF_OP (insn->code); +int insn_flags =0 ;bool is_jmp32;int pred =-1 ;int err;
@@ -16435,6 +16438,9 @@ static int check_cond_jmp_op(struct bpf_verifier_env *env, insn->src_reg);return -EACCES ; } + +if (src_reg->type ==PTR_TO_STACK ) + insn_flags |=INSN_F_SRC_REG_STACK ; }else {if (insn->src_reg !=BPF_REG_0 ) {verbose (env,"BPF_JMP/JMP32 uses reserved fields\n" );
@@ -16446,6 +16452,14 @@ static int check_cond_jmp_op(struct bpf_verifier_env *env,__mark_reg_known (src_reg, insn->imm); } +if (dst_reg->type ==PTR_TO_STACK ) + insn_flags |=INSN_F_DST_REG_STACK ; +if (insn_flags) { + err =push_insn_history (env, this_branch, insn_flags,0 ); +if (err) +return err; + } + is_jmp32 =BPF_CLASS (insn->code) ==BPF_JMP32 ; pred =is_branch_taken (dst_reg, src_reg, opcode, is_jmp32);if (pred >=0 ) {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 326/780 net: phy: clear phydev->devlink when the link is deleted
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wei Fang <[email protected]>
[ Upstream commit 0795b05a59b1371b18ffbf09d385296b12e9f5d5 ]
There is a potential crash issue when disabling and re-enabling the network port. When disabling the network port, phy_detach() calls device_link_del() to remove the device link, but it does not clear phydev->devlink, so phydev->devlink is not a NULL pointer. Then the network port is re-enabled, but if phy_attach_direct() fails before calling device_link_add(), the code jumps to the "error" label and calls phy_detach(). Since phydev->devlink retains the old value from the previous attach/detach cycle, device_link_del() uses the old value, which accesses a NULL pointer and causes a crash. The simplified crash log is as follows.
[ 24.702421] Call trace: [ 24.704856] device_link_put_kref+0x20/0x120 [ 24.709124] device_link_del+0x30/0x48 [ 24.712864] phy_detach+0x24/0x168 [ 24.716261] phy_attach_direct+0x168/0x3a4 [ 24.720352] phylink_fwnode_phy_connect+0xc8/0x14c [ 24.725140] phylink_of_phy_connect+0x1c/0x34
Therefore, phydev->devlink needs to be cleared when the device link is deleted.
--- drivers/net/phy/phy_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/phy/phy_device.c +3 -1
@@ -1727,8 +1727,10 @@ void phy_detach(struct phy_device *phydev)struct module *ndev_owner =NULL ;struct mii_bus *bus; -if (phydev->devlink) +if (phydev->devlink) {device_link_del (phydev->devlink); + phydev->devlink =NULL ; + }if (phydev->sysfs_links) {if (dev)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 327/780 net: airoha: Fix an error handling path in airoha_alloc_gdm_port()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christophe JAILLET <[email protected]>
[ Upstream commit c59783780c8ad66f6076a9a7c74df3e006e29519 ]
If register_netdev() fails, the error handling path of the probe will not free the memory allocated by the previous airoha_metadata_dst_alloc() call because port->dev->reg_state will not be NETREG_REGISTERED.
So, an explicit airoha_metadata_dst_free() call is needed in this case to avoid a memory leak.
--- drivers/net/ethernet/airoha/airoha_eth.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/net/ethernet/airoha/airoha_eth.c +9 -1
@@ -2541,7 +2541,15 @@ static int airoha_alloc_gdm_port(struct airoha_eth *eth,if (err)return err; -return register_netdev (dev); + err =register_netdev (dev); +if (err) + goto free_metadata_dst; + +return 0 ; + +free_metadata_dst: +airoha_metadata_dst_free (port); +return err; }static int airoha_probe (struct platform_device *pdev)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 328/780 net: mctp: start tx queue on netdev open
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeremy Kerr <[email protected]>
[ Upstream commit 126cd7852a62c6fab11a4a4cb6fa96421929ab69 ]
We stop queues in ndo_stop, so they need to be restarted in ndo_open. This allows us to resume tx after a link down/up cycle.
--- drivers/net/mctp/mctp-usb.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/mctp/mctp-usb.c +2 -0
@@ -257,6 +257,8 @@ static int mctp_usb_open(struct net_device *dev)WRITE_ONCE (mctp_usb->stopped, false); +netif_start_queue (dev); +return mctp_usb_rx_queue (mctp_usb,GFP_KERNEL ); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 329/780 net: phy: fix up const issues in to_mdio_device() and to_phy_device()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Greg Kroah-Hartman <[email protected]>
[ Upstream commit e9cb929670a1e98b592b30f03f06e9e20110f318 ]
Both to_mdio_device() and to_phy_device() "throw away" the const pointer attribute passed to them and return a non-const pointer, which generally is not a good thing overall. Fix this up by using container_of_const() which was designed for this very problem.
--- include/linux/mdio.h | 5 +---- include/linux/phy.h | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-)
include/linux/mdio.h +1 -4
@@ -45,10 +45,7 @@ struct mdio_device {unsigned int reset_deassert_delay; }; -static inline struct mdio_device *to_mdio_device (const struct device *dev) -{ - return container_of(dev, struct mdio_device, dev); -} +#define to_mdio_device (__dev) container_of_const(__dev, struct mdio_device, dev)/* struct mdio_driver_common: Common to all MDIO drivers */ struct mdio_driver_common {
include/linux/phy.h +1 -4
@@ -744,10 +744,7 @@ struct phy_device {#define PHY_F_NO_IRQ 0x80000000#define PHY_F_RXC_ALWAYS_ON 0x40000000 -static inline struct phy_device *to_phy_device (const struct device *dev) -{ - return container_of(to_mdio_device(dev), struct phy_device, mdio); -} +#define to_phy_device (__dev) container_of_const(to_mdio_device(__dev), struct phy_device, mdio)/** * struct phy_tdr_config - Configuration of a TDR raw test
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 330/780 net: lan743x: rename lan743x_reset_phy to lan743x_hw_reset_phy
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thangaraj Samynathan <[email protected]>
[ Upstream commit 68927eb52d0af04863584930db06075d2610e194 ]
rename the function to lan743x_hw_reset_phy to better describe it operation.
--- drivers/net/ethernet/microchip/lan743x_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/microchip/lan743x_main.c +2 -2
@@ -1330,7 +1330,7 @@ static int lan743x_mac_set_mtu(struct lan743x_adapter *adapter, int new_mtu) }/* PHY */ -static int lan743x_phy_reset (struct lan743x_adapter *adapter) +static int lan743x_hw_reset_phy (struct lan743x_adapter *adapter) {u32 data;
@@ -1348,7 +1348,7 @@ static int lan743x_phy_reset(struct lan743x_adapter *adapter)static int lan743x_phy_init (struct lan743x_adapter *adapter) { -return lan743x_phy_reset (adapter); +return lan743x_hw_reset_phy (adapter); }static void lan743x_phy_interface_select (struct lan743x_adapter *adapter)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 331/780 net: lan743x: Fix PHY reset handling during initialization and WOL
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thangaraj Samynathan <[email protected]>
[ Upstream commit 82d1096ca8b5dbb3158d707e6fb3ad21c3403a49 ]
Remove lan743x_phy_init from lan743x_hardware_init as it resets the PHY registers, causing WOL to fail on subsequent attempts. Add a call to lan743x_hw_reset_phy in the probe function to ensure the PHY is reset during device initialization.
--- drivers/net/ethernet/microchip/lan743x_main.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
drivers/net/ethernet/microchip/lan743x_main.c +4 -9
@@ -1346,11 +1346,6 @@ static int lan743x_hw_reset_phy(struct lan743x_adapter *adapter) 50000, 1000000); } -static int lan743x_phy_init (struct lan743x_adapter *adapter) -{ -return lan743x_hw_reset_phy (adapter); -} -static void lan743x_phy_interface_select (struct lan743x_adapter *adapter) {u32 id_rev;
@@ -3534,10 +3529,6 @@ static int lan743x_hardware_init(struct lan743x_adapter *adapter,if (ret)return ret; - ret =lan743x_phy_init (adapter); -if (ret) -return ret; - ret =lan743x_ptp_init (adapter);if (ret)return ret;
@@ -3674,6 +3665,10 @@ static int lan743x_pcidev_probe(struct pci_dev *pdev,if (ret) goto cleanup_pci; + ret =lan743x_hw_reset_phy (adapter); +if (ret) + goto cleanup_pci; + ret =lan743x_hardware_init (adapter, pdev);if (ret) goto cleanup_pci;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 332/780 net: phy: mscc: Fix memory leak when using one step timestamping
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Horatiu Vultur <[email protected]>
[ Upstream commit 846992645b25ec4253167e3f931e4597eb84af56 ]
Fix memory leak when running one-step timestamping. When running one-step sync timestamping, the HW is configured to insert the TX time into the frame, so there is no reason to keep the skb anymore. As in this case the HW will never generate an interrupt to say that the frame was timestamped, then the frame will never released.
Fix this by freeing the frame in case of one-step timestamping.
--- drivers/net/phy/mscc/mscc_ptp.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/net/phy/mscc/mscc_ptp.c +11 -5
@@ -1166,18 +1166,24 @@ static void vsc85xx_txtstamp(struct mii_timestamper *mii_ts, container_of(mii_ts, struct vsc8531_private, mii_ts);if (!vsc8531->ptp->configured) -return ; + goto out; -if (vsc8531->ptp->tx_type ==HWTSTAMP_TX_OFF ) { -kfree_skb (skb); -return ; - } +if (vsc8531->ptp->tx_type ==HWTSTAMP_TX_OFF ) + goto out; + +if (vsc8531->ptp->tx_type ==HWTSTAMP_TX_ONESTEP_SYNC ) +if (ptp_msg_is_sync (skb, type)) + goto out;skb_shinfo (skb)->tx_flags |=SKBTX_IN_PROGRESS ;mutex_lock (&vsc8531->ts_lock);__skb_queue_tail (&vsc8531->ptp->tx_queue, skb);mutex_unlock (&vsc8531->ts_lock); +return ; + +out: +kfree_skb (skb); } static bool vsc85xx_rxtstamp(struct mii_timestamper *mii_ts,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 333/780 octeontx2-pf: QOS: Perform cache sync on send queue teardown
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hariprasad Kelam <[email protected]>
[ Upstream commit 479c58016099d19686e36f6c50f912360839a7fa ]
QOS is designed to create a new send queue whenever a class is created, ensuring proper shaping and scheduling. However, when multiple send queues are created and deleted in a loop, SMMU errors are observed.
This patch addresses the issue by performing an data cache sync during the teardown of QOS send queues.
--- .../ethernet/marvell/octeontx2/nic/qos_sq.c | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+)
drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c +22 -0
@@ -256,6 +256,26 @@ int otx2_qos_enable_sq(struct otx2_nic *pfvf, int qidx)return err; } +static int otx2_qos_nix_npa_ndc_sync (struct otx2_nic *pfvf) +{ +struct ndc_sync_op *req; +int rc; + +mutex_lock (&pfvf->mbox.lock); + + req =otx2_mbox_alloc_msg_ndc_sync_op (&pfvf->mbox); +if (!req) { +mutex_unlock (&pfvf->mbox.lock); +return -ENOMEM ; + } + + req->nix_lf_tx_sync = true; + req->npa_lf_sync = true; + rc =otx2_sync_mbox_msg (&pfvf->mbox); +mutex_unlock (&pfvf->mbox.lock); +return rc; +} +void otx2_qos_disable_sq (struct otx2_nic *pfvf,int qidx) {struct otx2_qset *qset = &pfvf->qset;
@@ -285,6 +305,8 @@ void otx2_qos_disable_sq(struct otx2_nic *pfvf, int qidx)otx2_qos_sqb_flush (pfvf, sq_idx);otx2_smq_flush (pfvf,otx2_get_smq_idx (pfvf, sq_idx)); +/* NIX/NPA NDC sync */ +otx2_qos_nix_npa_ndc_sync (pfvf);otx2_cleanup_tx_cqes (pfvf, cq);mutex_lock (&pfvf->mbox.lock);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 334/780 octeontx2-pf: QOS: Refactor TC_HTB_LEAF_DEL_LAST callback
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hariprasad Kelam <[email protected]>
[ Upstream commit 67af4ec948e8ce3ea53a9cf614d01fddf172e56d ]
This patch addresses below issues,
1. Active traffic on the leaf node must be stopped before its send queue is reassigned to the parent. This patch resolves the issue by marking the node as 'Inner'.
2. During a system reboot, the interface receives TC_HTB_LEAF_DEL and TC_HTB_LEAF_DEL_LAST callbacks to delete its HTB queues. In the case of TC_HTB_LEAF_DEL_LAST, although the same send queue is reassigned to the parent, the current logic still attempts to update the real number of queues, leadning to below warnings
New queues can't be registered after device unregistration.
WARNING: CPU: 0 PID: 6475 at net/core/net-sysfs.c:1714
netdev_queue_update_kobjects+0x1e4/0x200--- drivers/net/ethernet/marvell/octeontx2/nic/qos.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/marvell/octeontx2/nic/qos.c +1 -3
@@ -1638,6 +1638,7 @@ static int otx2_qos_leaf_del_last(struct otx2_nic *pfvf, u16 classid, bool forceif (!node->is_static) dwrr_del_node = true; +WRITE_ONCE (node->qid,OTX2_QOS_QID_INNER );/* destroy the leaf node */ otx2_qos_disable_sq (pfvf, qid);otx2_qos_destroy_node (pfvf, node);
@@ -1682,9 +1683,6 @@ static int otx2_qos_leaf_del_last(struct otx2_nic *pfvf, u16 classid, bool force }kfree (new_cfg); -/* update tx_real_queues */ -otx2_qos_update_tx_netdev_queues (pfvf); -return 0 ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 335/780 calipso: Dont call calipso functions for AF_INET sk.
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuniyuki Iwashima <[email protected]>
[ Upstream commit 6e9f2df1c550ead7cecb3e450af1105735020c92 ]
syzkaller reported a null-ptr-deref in txopt_get(). [0]
The offset 0x70 was of struct ipv6_txoptions in struct ipv6_pinfo, so struct ipv6_pinfo was NULL there.
However, this never happens for IPv6 sockets as inet_sk(sk)->pinet6 is always set in inet6_create(), meaning the socket was not IPv6 one.
The root cause is missing validation in netlbl_conn_setattr().
netlbl_conn_setattr() switches branches based on struct sockaddr.sa_family, which is passed from userspace. However, netlbl_conn_setattr() does not check if the address family matches the socket.
The syzkaller must have called connect() for an IPv6 address on an IPv4 socket.
We have a proper validation in tcp_v[46]_connect(), but security_socket_connect() is called in the earlier stage.
Let's copy the validation to netlbl_conn_setattr().
[0]:
Oops: general protection fault, probably for non-canonical address 0xdffffc000000000e: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000070-0x0000000000000077] CPU: 2 UID: 0 PID: 12928 Comm: syz.9.1677 Not tainted 6.12.0 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 RIP: 0010:txopt_get include/net/ipv6.h:390 [inline] RIP: 0010: Code: 02 00 00 49 8b ac 24 f8 02 00 00 e8 84 69 2a fd e8 ff 00 16 fd 48 8d 7d 70 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 53 02 00 00 48 8b 6d 70 48 85 ed 0f 84 ab 01 00 RSP: 0018:ffff88811b8afc48 EFLAGS: 00010212 RAX: dffffc0000000000 RBX: 1ffff11023715f8a RCX: ffffffff841ab00c RDX: 000000000000000e RSI: ffffc90007d9e000 RDI: 0000000000000070 RBP: 0000000000000000 R08: ffffed1023715f9d R09: ffffed1023715f9e R10: ffffed1023715f9d R11: 0000000000000003 R12: ffff888123075f00 R13: ffff88810245bd80 R14: ffff888113646780 R15: ffff888100578a80 FS: 00007f9019bd7640(0000) GS:ffff8882d2d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f901b927bac CR3: 0000000104788003 CR4: 0000000000770ef0 PKRU: 80000000 Call Trace: <TASK> calipso_sock_setattr+0x56/0x80 net/netlabel/netlabel_calipso.c:557 netlbl_conn_setattr+0x10c/0x280 net/netlabel/netlabel_kapi.c:1177 selinux_netlbl_socket_connect_helper+0xd3/0x1b0 security/selinux/netlabel.c:569 selinux_netlbl_socket_connect_locked security/selinux/netlabel.c:597 [inline] selinux_netlbl_socket_connect+0xb6/0x100 security/selinux/netlabel.c:615 selinux_socket_connect+0x5f/0x80 security/selinux/hooks.c:4931 security_socket_connect+0x50/0xa0 security/security.c:4598 __sys_connect_file+0xa4/0x190 net/socket.c:2067 __sys_connect+0x12c/0x170 net/socket.c:2088 __do_sys_connect net/socket.c:2098 [inline] __se_sys_connect net/socket.c:2095 [inline] __x64_sys_connect+0x73/0xb0 net/socket.c:2095 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xaa/0x1b0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f901b61a12d Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f9019bd6fa8 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007f901b925fa0 RCX: 00007f901b61a12d RDX: 000000000000001c RSI: 0000200000000140 RDI: 0000000000000003 RBP: 00007f901b701505 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f901b5b62a0 R15: 00007f9019bb7000 </TASK> Modules linked in:
--- net/netlabel/netlabel_kapi.c | 3 +++ 1 file changed, 3 insertions(+)
net/netlabel/netlabel_kapi.c +3 -0
@@ -1165,6 +1165,9 @@ int netlbl_conn_setattr(struct sock *sk,break ;#if IS_ENABLED (CONFIG_IPV6 )case AF_INET6 : +if (sk->sk_family !=AF_INET6 ) +return -EAFNOSUPPORT ; + addr6 = (struct sockaddr_in6 *)addr; entry =netlbl_domhsh_getentry_af6 (secattr->domain, &addr6->sin6_addr);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 336/780 net: openvswitch: Fix the dead loop of MPLS parse
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Faicker Mo <[email protected]>
[ Upstream commit 0bdc924bfb319fb10d1113cbf091fc26fb7b1f99 ]
The unexpected MPLS packet may not end with the bottom label stack. When there are many stacks, The label count value has wrapped around. A dead loop occurs, soft lockup/CPU stuck finally.
stack backtrace: UBSAN: array-index-out-of-bounds in /build/linux-0Pa0xK/linux-5.15.0/net/openvswitch/flow.c:662:26 index -1 is out of range for type '__be32 [3]' CPU: 34 PID: 0 Comm: swapper/34 Kdump: loaded Tainted: G OE 5.15.0-121-generic #131-Ubuntu Hardware name: Dell Inc. PowerEdge C6420/0JP9TF, BIOS 2.12.2 07/14/2021 Call Trace: <IRQ> show_stack+0x52/0x5c dump_stack_lvl+0x4a/0x63 dump_stack+0x10/0x16 ubsan_epilogue+0x9/0x36 __ubsan_handle_out_of_bounds.cold+0x44/0x49 key_extract_l3l4+0x82a/0x840 [openvswitch] ? kfree_skbmem+0x52/0xa0 key_extract+0x9c/0x2b0 [openvswitch] ovs_flow_key_extract+0x124/0x350 [openvswitch] ovs_vport_receive+0x61/0xd0 [openvswitch] ? kernel_init_free_pages.part.0+0x4a/0x70 ? get_page_from_freelist+0x353/0x540 netdev_port_receive+0xc4/0x180 [openvswitch] ? netdev_port_receive+0x180/0x180 [openvswitch] netdev_frame_hook+0x1f/0x40 [openvswitch] __netif_receive_skb_core.constprop.0+0x23a/0xf00 __netif_receive_skb_list_core+0xfa/0x240 netif_receive_skb_list_internal+0x18e/0x2a0 napi_complete_done+0x7a/0x1c0 bnxt_poll+0x155/0x1c0 [bnxt_en] __napi_poll+0x30/0x180 net_rx_action+0x126/0x280 ? bnxt_msix+0x67/0x80 [bnxt_en] handle_softirqs+0xda/0x2d0 irq_exit_rcu+0x96/0xc0 common_interrupt+0x8e/0xa0 </IRQ>
--- net/openvswitch/flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/openvswitch/flow.c +1 -1
@@ -788,7 +788,7 @@ static int key_extract_l3l4(struct sk_buff *skb, struct sw_flow_key *key)memset (&key->ipv4,0 ,sizeof (key->ipv4)); } }else if (eth_p_mpls (key->eth.type)) { -u8 label_count =1 ; +size_t label_count =1 ;memset (&key->mpls,0 ,sizeof (key->mpls));skb_set_inner_network_header (skb, skb->mac_len);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 337/780 net: phy: mscc: Stop clearing the the UDPv4 checksum for L2 frames
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Horatiu Vultur <[email protected]>
[ Upstream commit 57a92d14659df3e7e7e0052358c8cc68bbbc3b5e ]
We have noticed that when PHY timestamping is enabled, L2 frames seems to be modified by changing two 2 bytes with a value of 0. The place were these 2 bytes seems to be random(or I couldn't find a pattern). In most of the cases the userspace can ignore these frames but if for example those 2 bytes are in the correction field there is nothing to do. This seems to happen when configuring the HW for IPv4 even that the flow is not enabled.
These 2 bytes correspond to the UDPv4 checksum and once we don't enable clearing the checksum when using L2 frames then the frame doesn't seem to be changed anymore.
--- drivers/net/phy/mscc/mscc_ptp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/phy/mscc/mscc_ptp.c +3 -1
@@ -946,7 +946,9 @@ static int vsc85xx_ip1_conf(struct phy_device *phydev, enum ts_blk blk,/* UDP checksum offset in IPv4 packet * according to: https://tools.ietf.org/html/rfc768 */ - val |=IP1_NXT_PROT_UDP_CHKSUM_OFF (26 ) |IP1_NXT_PROT_UDP_CHKSUM_CLEAR ; + val |=IP1_NXT_PROT_UDP_CHKSUM_OFF (26 ); +if (enable) + val |=IP1_NXT_PROT_UDP_CHKSUM_CLEAR ;vsc85xx_ts_write_csr (phydev, blk,MSCC_ANA_IP1_NXT_PROT_UDP_CHKSUM , val);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 338/780 f2fs: fix to skip f2fs_balance_fs() if checkpoint is disabled
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chao Yu <[email protected]>
[ Upstream commit c836d3b8d94e3dd381e7d4bb918875084f85715e ]
Syzbot reports a f2fs bug as below:
INFO: task syz-executor328:5856 blocked for more than 144 seconds.
Not tainted 6.15.0-rc6-syzkaller-00208-g3c21441eeffc #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor328 state:D stack:24392 pid:5856 tgid:5832 ppid:5826 task_flags:0x400040 flags:0x00004006
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5382 [inline]
__schedule+0x168f/0x4c70 kernel/sched/core.c:6767
__schedule_loop kernel/sched/core.c:6845 [inline]
schedule+0x165/0x360 kernel/sched/core.c:6860
io_schedule+0x81/0xe0 kernel/sched/core.c:7742
f2fs_balance_fs+0x4b4/0x780 fs/f2fs/segment.c:444
f2fs_map_blocks+0x3af1/0x43b0 fs/f2fs/data.c:1791
f2fs_expand_inode_data+0x653/0xaf0 fs/f2fs/file.c:1872
f2fs_fallocate+0x4f5/0x990 fs/f2fs/file.c:1975
vfs_fallocate+0x6a0/0x830 fs/open.c:338
ioctl_preallocate fs/ioctl.c:290 [inline]
file_ioctl fs/ioctl.c:-1 [inline]
do_vfs_ioctl+0x1b8f/0x1eb0 fs/ioctl.c:885
__do_sys_ioctl fs/ioctl.c:904 [inline]
__se_sys_ioctl+0x82/0x170 fs/ioctl.c:892
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7fThe root cause is after commit 84b5bb8bf0f6 ("f2fs: modify f2fs_is_checkpoint_ready logic to allow more data to be written with the CP disable"), we will get chance to allow f2fs_is_checkpoint_ready() to return true once below conditions are all true:
1. checkpoint is disabled
2. there are not enough free segments
3. there are enough free blocks
Then it will cause f2fs_balance_fs() to trigger foreground GC.
void f2fs_balance_fs(struct f2fs_sb_info *sbi, bool need)
...
if (!f2fs_is_checkpoint_ready(sbi)) return;
And the testcase mounts f2fs image w/ gc_merge,checkpoint=disable, so deadloop will happen through below race condition:
- f2fs_do_shutdown - vfs_fallocate - gc_thread_func
- file_start_write
- __sb_start_write(SB_FREEZE_WRITE)
- f2fs_fallocate
- f2fs_expand_inode_data
- f2fs_map_blocks
- f2fs_balance_fs
- prepare_to_wait
- wake_up(gc_wait_queue_head)
- io_schedule
- bdev_freeze
- freeze_super
- sb->s_writers.frozen = SB_FREEZE_WRITE;
- sb_wait_write(sb, SB_FREEZE_WRITE);
- if (sbi->sb->s_writers.frozen >= SB_FREEZE_WRITE) continue; : cause deadloop
This patch fix to add check condition in f2fs_balance_fs(), so that if checkpoint is disabled, we will just skip trigger foreground GC to avoid such deadloop issue.
Meanwhile let's remove f2fs_is_checkpoint_ready() check condition in f2fs_balance_fs(), since it's redundant, due to the main logic in the function is to check:
a) whether checkpoint is disabled
b) there is enough free segments
f2fs_balance_fs() still has all logics after f2fs_is_checkpoint_ready()'s removal.
--- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/segment.c +1 -1
@@ -424,7 +424,7 @@ void f2fs_balance_fs(struct f2fs_sb_info *sbi, bool need)if (need &&excess_cached_nats (sbi))f2fs_balance_fs_bg (sbi, false); -if (!f2fs_is_checkpoint_ready (sbi)) +if (unlikely (is_sbi_flag_set (sbi,SBI_CP_DISABLED )))return ;/*
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 339/780 f2fs: use d_inode(dentry) cleanup dentry->d_inode
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhiguo Niu <[email protected]>
[ Upstream commit a6c397a31f58a1d577c2c8d04b624e9baa31951c ]
no logic changes.
Stable-dep-of: 9883494c45a1 ("f2fs: fix to correct check conditions in f2fs_cross_rename")
--- fs/f2fs/namei.c | 8 ++++---- fs/f2fs/super.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
fs/f2fs/namei.c +4 -4
@@ -414,7 +414,7 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir,if (is_inode_flag_set (dir,FI_PROJ_INHERIT ) && (!projid_eq (F2FS_I (dir)->i_projid, -F2FS_I (old_dentry->d_inode)->i_projid))) +F2FS_I (inode)->i_projid)))return -EXDEV ; err =f2fs_dquot_initialize (dir);
@@ -914,7 +914,7 @@ static int f2fs_rename(struct mnt_idmap *idmap, struct inode *old_dir,if (is_inode_flag_set (new_dir,FI_PROJ_INHERIT ) && (!projid_eq (F2FS_I (new_dir)->i_projid, -F2FS_I (old_dentry->d_inode)->i_projid))) +F2FS_I (old_inode)->i_projid)))return -EXDEV ;/*
@@ -1107,10 +1107,10 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry,if ((is_inode_flag_set (new_dir,FI_PROJ_INHERIT ) && !projid_eq (F2FS_I (new_dir)->i_projid, -F2FS_I (old_dentry->d_inode)->i_projid)) || +F2FS_I (old_inode)->i_projid)) || (is_inode_flag_set (new_dir,FI_PROJ_INHERIT ) && !projid_eq (F2FS_I (old_dir)->i_projid, -F2FS_I (new_dentry->d_inode)->i_projid))) +F2FS_I (new_inode)->i_projid)))return -EXDEV ; err =f2fs_dquot_initialize (old_dir);
fs/f2fs/super.c +2 -2
@@ -1882,9 +1882,9 @@ static int f2fs_statfs(struct dentry *dentry, struct kstatfs *buf) buf->f_fsid =u64_to_fsid (id);#ifdef CONFIG_QUOTA -if (is_inode_flag_set (dentry->d_inode,FI_PROJ_INHERIT ) && +if (is_inode_flag_set (d_inode (dentry),FI_PROJ_INHERIT ) &&sb_has_quota_limits_enabled (sb,PRJQUOTA )) { -f2fs_statfs_project (sb,F2FS_I (dentry->d_inode)->i_projid, buf); +f2fs_statfs_project (sb,F2FS_I (d_inode (dentry))->i_projid, buf); }#endif return 0 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 340/780 f2fs: fix to correct check conditions in f2fs_cross_rename
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhiguo Niu <[email protected]>
[ Upstream commit 9883494c45a13dc88d27dde4f988c04823b42a2f ]
Should be "old_dir" here.
--- fs/f2fs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/namei.c +1 -1
@@ -1108,7 +1108,7 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry,if ((is_inode_flag_set (new_dir,FI_PROJ_INHERIT ) && !projid_eq (F2FS_I (new_dir)->i_projid,F2FS_I (old_inode)->i_projid)) || - (is_inode_flag_set (new_dir,FI_PROJ_INHERIT ) && + (is_inode_flag_set (old_dir,FI_PROJ_INHERIT ) && !projid_eq (F2FS_I (old_dir)->i_projid,F2FS_I (new_inode)->i_projid)))return -EXDEV ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 341/780 arm64: dts: qcom: x1e80100: Mark usb_2 as dma-coherent
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Kettenis <[email protected]>
[ Upstream commit 45bd6ff900cfe5038e2718a900f153ded3fa5392 ]
Make this USB controller consistent with the others on this platform.
--- arch/arm64/boot/dts/qcom/x1e80100.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/x1e80100.dtsi +2 -0
@@ -4815,6 +4815,8 @@ snps,dis-u1-entry-quirk; snps,dis-u2-entry-quirk; + dma-coherent; + ports { #address-cells = <1>; #size-cells = <0>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 342/780 arm64: dts: qcom: sm8650: setup gpu thermal with higher temperatures
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neil Armstrong <[email protected]>
[ Upstream commit 2250f65b32565eb8b757e89248c75977f370f498 ]
On the SM8650, the dynamic clock and voltage scaling (DCVS) for the GPU is done from the HLOS, but the GPU can achieve a much higher temperature before failing according the reference downstream implementation.
Set higher temperatures in the GPU trip points corresponding to the temperatures provided by Qualcomm in the dowstream source, much closer to the junction temperature and with a higher critical temperature trip in the case the HLOS DCVS cannot handle the temperature surge.
The tsens MAX_THRESHOLD is set to 120C on those platforms, so set the hot to 110C to leave a chance to HLOS to react and critical to 115C to avoid the monitor thermal shutdown.
--- arch/arm64/boot/dts/qcom/sm8650.dtsi | 64 ++++++++++++++-------------- 1 file changed, 32 insertions(+), 32 deletions(-)
arch/arm64/boot/dts/qcom/sm8650.dtsi +32 -32
@@ -6537,20 +6537,20 @@ trips { gpu0_alert0: trip-point0 { - temperature = <85000>; + temperature = <95000>; hysteresis = <1000>; type = "passive"; }; trip-point1 { - temperature = <90000>; + temperature = <110000>; hysteresis = <1000>; type = "hot"; }; trip-point2 { - temperature = <110000>; - hysteresis = <1000>; + temperature = <115000>; + hysteresis = <0>; type = "critical"; }; };
@@ -6570,20 +6570,20 @@ trips { gpu1_alert0: trip-point0 { - temperature = <85000>; + temperature = <95000>; hysteresis = <1000>; type = "passive"; }; trip-point1 { - temperature = <90000>; + temperature = <110000>; hysteresis = <1000>; type = "hot"; }; trip-point2 { - temperature = <110000>; - hysteresis = <1000>; + temperature = <115000>; + hysteresis = <0>; type = "critical"; }; };
@@ -6603,20 +6603,20 @@ trips { gpu2_alert0: trip-point0 { - temperature = <85000>; + temperature = <95000>; hysteresis = <1000>; type = "passive"; }; trip-point1 { - temperature = <90000>; + temperature = <110000>; hysteresis = <1000>; type = "hot"; }; trip-point2 { - temperature = <110000>; - hysteresis = <1000>; + temperature = <115000>; + hysteresis = <0>; type = "critical"; }; };
@@ -6636,20 +6636,20 @@ trips { gpu3_alert0: trip-point0 { - temperature = <85000>; + temperature = <95000>; hysteresis = <1000>; type = "passive"; }; trip-point1 { - temperature = <90000>; + temperature = <110000>; hysteresis = <1000>; type = "hot"; }; trip-point2 { - temperature = <110000>; - hysteresis = <1000>; + temperature = <115000>; + hysteresis = <0>; type = "critical"; }; };
@@ -6669,20 +6669,20 @@ trips { gpu4_alert0: trip-point0 { - temperature = <85000>; + temperature = <95000>; hysteresis = <1000>; type = "passive"; }; trip-point1 { - temperature = <90000>; + temperature = <110000>; hysteresis = <1000>; type = "hot"; }; trip-point2 { - temperature = <110000>; - hysteresis = <1000>; + temperature = <115000>; + hysteresis = <0>; type = "critical"; }; };
@@ -6702,20 +6702,20 @@ trips { gpu5_alert0: trip-point0 { - temperature = <85000>; + temperature = <95000>; hysteresis = <1000>; type = "passive"; }; trip-point1 { - temperature = <90000>; + temperature = <110000>; hysteresis = <1000>; type = "hot"; }; trip-point2 { - temperature = <110000>; - hysteresis = <1000>; + temperature = <115000>; + hysteresis = <0>; type = "critical"; }; };
@@ -6735,20 +6735,20 @@ trips { gpu6_alert0: trip-point0 { - temperature = <85000>; + temperature = <95000>; hysteresis = <1000>; type = "passive"; }; trip-point1 { - temperature = <90000>; + temperature = <110000>; hysteresis = <1000>; type = "hot"; }; trip-point2 { - temperature = <110000>; - hysteresis = <1000>; + temperature = <115000>; + hysteresis = <0>; type = "critical"; }; };
@@ -6768,20 +6768,20 @@ trips { gpu7_alert0: trip-point0 { - temperature = <85000>; + temperature = <95000>; hysteresis = <1000>; type = "passive"; }; trip-point1 { - temperature = <90000>; + temperature = <110000>; hysteresis = <1000>; type = "hot"; }; trip-point2 { - temperature = <110000>; - hysteresis = <1000>; + temperature = <115000>; + hysteresis = <0>; type = "critical"; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 343/780 arm64: dts: qcom: sa8775p: Partially revert "arm64: dts: qcom: sa8775p: add QCrypto nodes"
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 92979f12a201c54ea94b8b3c9f0737c33bb45e23 ]
Partially revert commit 7ff3da43ef44 ("arm64: dts: qcom: sa8775p: add QCrypto nodes") by dropping the untested QCE device node. Devicetree bindings test failures were reported on mailing list on 16th of January and after two weeks still no fixes:
sa8775p-ride.dtb: crypto@1dfa000: compatible: 'oneOf' conditional failed, one must be fixed:
...
'qcom,sa8775p-qce' is not one of ['qcom,ipq4019-qce', 'qcom,sm8150-qce']--- arch/arm64/boot/dts/qcom/sa8775p.dtsi | 11 ----------- 1 file changed, 11 deletions(-)
arch/arm64/boot/dts/qcom/sa8775p.dtsi +0 -11
@@ -2420,17 +2420,6 @@ <&apps_smmu 0x481 0x00>; }; - crypto: crypto@1dfa000 { - compatible = "qcom,sa8775p-qce", "qcom,qce"; - reg = <0x0 0x01dfa000 0x0 0x6000>; - dmas = <&cryptobam 4>, <&cryptobam 5>; - dma-names = "rx", "tx"; - iommus = <&apps_smmu 0x480 0x00>, - <&apps_smmu 0x481 0x00>; - interconnects = <&aggre2_noc MASTER_CRYPTO_CORE0 0 &mc_virt SLAVE_EBI1 0>; - interconnect-names = "memory"; - }; - stm: stm@4002000 { compatible = "arm,coresight-stm", "arm,primecell"; reg = <0x0 0x4002000 0x0 0x1000>,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 344/780 arm64: dts: qcom: qcs8300: Partially revert "arm64: dts: qcom: qcs8300: add QCrypto nodes"
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
[ Upstream commit cdc117c40537c5babfa7f261360d5a98e434d59e ]
Partially revert commit a86d84409947 ("arm64: dts: qcom: qcs8300: add QCrypto nodes") by dropping the untested QCE device node. Devicetree bindings test failures were reported on mailing list on 16th of January and after two weeks still no fixes:
qcs8300-ride.dtb: crypto@1dfa000: compatible: 'oneOf' conditional failed, one must be fixed:
...
'qcom,qcs8300-qce' is not one of ['qcom,ipq4019-qce', 'qcom,sm8150-qce']--- arch/arm64/boot/dts/qcom/qcs8300.dtsi | 12 ------------ 1 file changed, 12 deletions(-)
arch/arm64/boot/dts/qcom/qcs8300.dtsi +0 -12
@@ -798,18 +798,6 @@ <&apps_smmu 0x481 0x00>; }; - crypto: crypto@1dfa000 { - compatible = "qcom,qcs8300-qce", "qcom,qce"; - reg = <0x0 0x01dfa000 0x0 0x6000>; - dmas = <&cryptobam 4>, <&cryptobam 5>; - dma-names = "rx", "tx"; - iommus = <&apps_smmu 0x480 0x00>, - <&apps_smmu 0x481 0x00>; - interconnects = <&aggre2_noc MASTER_CRYPTO_CORE0 QCOM_ICC_TAG_ALWAYS - &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; - interconnect-names = "memory"; - }; - ice: crypto@1d88000 { compatible = "qcom,qcs8300-inline-crypto-engine", "qcom,inline-crypto-engine";
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 345/780 arm64: dts: qcom: sm8550: use ICC tag for all interconnect phandles
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neil Armstrong <[email protected]>
[ Upstream commit 54df5e52777e1126862778a2796c3809df85acd7 ]
Use the proper QCOM_ICC_TAG_ define instead of passing 0 in all interconnect paths phandle third argument.
Use QCOM_ICC_TAG_ALWAYS which is the fallback mask if 0 is used as third phandle argument.
Stable-dep-of: 327d489d1eca ("arm64: dts: qcom: sm8550: add missing cpu-cfg interconnect path in the mdss node")
--- arch/arm64/boot/dts/qcom/sm8550.dtsi | 387 ++++++++++++++++++--------- 1 file changed, 258 insertions(+), 129 deletions(-)
arch/arm64/boot/dts/qcom/sm8550.dtsi +258 -129
@@ -331,7 +331,8 @@ scm: scm { compatible = "qcom,scm-sm8550", "qcom,scm"; qcom,dload-mode = <&tcsr 0x19000>; - interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&aggre2_noc MASTER_CRYPTO QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; }; };
@@ -850,9 +851,12 @@ interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>, - <&aggre2_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>, + <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma2 0 0 QCOM_GPI_I2C>, <&gpi_dma2 1 0 QCOM_GPI_I2C>;
@@ -868,9 +872,12 @@ interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&qup_spi8_data_clk>, <&qup_spi8_cs>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>, - <&aggre2_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>, + <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma2 0 0 QCOM_GPI_SPI>, <&gpi_dma2 1 0 QCOM_GPI_SPI>;
@@ -890,9 +897,12 @@ interrupts = <GIC_SPI 583 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>, - <&aggre2_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>, + <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma2 0 1 QCOM_GPI_I2C>, <&gpi_dma2 1 1 QCOM_GPI_I2C>;
@@ -908,9 +918,12 @@ interrupts = <GIC_SPI 583 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&qup_spi9_data_clk>, <&qup_spi9_cs>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>, - <&aggre2_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>, + <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma2 0 1 QCOM_GPI_SPI>, <&gpi_dma2 1 1 QCOM_GPI_SPI>;
@@ -930,9 +943,12 @@ interrupts = <GIC_SPI 584 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>, - <&aggre2_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>, + <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma2 0 2 QCOM_GPI_I2C>, <&gpi_dma2 1 2 QCOM_GPI_I2C>;
@@ -948,9 +964,12 @@ interrupts = <GIC_SPI 584 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&qup_spi10_data_clk>, <&qup_spi10_cs>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>, - <&aggre2_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>, + <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma2 0 2 QCOM_GPI_SPI>, <&gpi_dma2 1 2 QCOM_GPI_SPI>;
@@ -970,9 +989,12 @@ interrupts = <GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>, - <&aggre2_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>, + <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma2 0 3 QCOM_GPI_I2C>, <&gpi_dma2 1 3 QCOM_GPI_I2C>;
@@ -988,9 +1010,12 @@ interrupts = <GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&qup_spi11_data_clk>, <&qup_spi11_cs>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>, - <&aggre2_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>, + <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma2 0 3 QCOM_GPI_I2C>, <&gpi_dma2 1 3 QCOM_GPI_I2C>;
@@ -1010,9 +1035,12 @@ interrupts = <GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>, - <&aggre2_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>, + <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma2 0 4 QCOM_GPI_I2C>, <&gpi_dma2 1 4 QCOM_GPI_I2C>;
@@ -1028,9 +1056,12 @@ interrupts = <GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&qup_spi12_data_clk>, <&qup_spi12_cs>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>, - <&aggre2_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>, + <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma2 0 4 QCOM_GPI_I2C>, <&gpi_dma2 1 4 QCOM_GPI_I2C>;
@@ -1050,9 +1081,12 @@ interrupts = <GIC_SPI 587 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>, - <&aggre2_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>, + <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma2 0 5 QCOM_GPI_I2C>, <&gpi_dma2 1 5 QCOM_GPI_I2C>;
@@ -1068,9 +1102,12 @@ interrupts = <GIC_SPI 587 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&qup_spi13_data_clk>, <&qup_spi13_cs>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>, - <&aggre2_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>, + <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma2 0 5 QCOM_GPI_SPI>, <&gpi_dma2 1 5 QCOM_GPI_SPI>;
@@ -1088,8 +1125,10 @@ pinctrl-names = "default"; pinctrl-0 = <&qup_uart14_default>, <&qup_uart14_cts_rts>; interrupts = <GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config"; status = "disabled"; };
@@ -1104,9 +1143,12 @@ interrupts = <GIC_SPI 462 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>, - <&aggre2_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>, + <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma2 0 7 QCOM_GPI_I2C>, <&gpi_dma2 1 7 QCOM_GPI_I2C>;
@@ -1122,9 +1164,12 @@ interrupts = <GIC_SPI 462 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&qup_spi15_data_clk>, <&qup_spi15_cs>; - interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>, - <&aggre2_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>, + <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma2 0 7 QCOM_GPI_SPI>, <&gpi_dma2 1 7 QCOM_GPI_SPI>;
@@ -1156,8 +1201,10 @@ interrupts = <GIC_SPI 464 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_I2C 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config"; status = "disabled"; };
@@ -1173,8 +1220,10 @@ interrupts = <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_I2C 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config"; status = "disabled"; };
@@ -1190,8 +1239,10 @@ interrupts = <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_I2C 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config"; status = "disabled"; };
@@ -1207,8 +1258,10 @@ interrupts = <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_I2C 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config"; status = "disabled"; };
@@ -1224,8 +1277,10 @@ interrupts = <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_I2C 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config"; status = "disabled"; };
@@ -1241,8 +1296,10 @@ interrupts = <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_I2C 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config"; status = "disabled"; };
@@ -1258,8 +1315,10 @@ interrupts = <GIC_SPI 470 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_I2C 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config"; status = "disabled"; };
@@ -1275,8 +1334,10 @@ interrupts = <GIC_SPI 471 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_I2C 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config"; status = "disabled"; };
@@ -1292,8 +1353,10 @@ interrupts = <GIC_SPI 472 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_I2C 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config"; status = "disabled"; };
@@ -1309,8 +1372,10 @@ interrupts = <GIC_SPI 473 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_I2C 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config"; status = "disabled"; };
@@ -1347,7 +1412,8 @@ clocks = <&gcc GCC_QUPV3_WRAP_1_M_AHB_CLK>, <&gcc GCC_QUPV3_WRAP_1_S_AHB_CLK>; iommus = <&apps_smmu 0xa3 0>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core"; dma-coherent; #address-cells = <2>;
@@ -1364,9 +1430,12 @@ interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, - <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>, + <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma1 0 0 QCOM_GPI_I2C>, <&gpi_dma1 1 0 QCOM_GPI_I2C>;
@@ -1382,9 +1451,12 @@ interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&qup_spi0_data_clk>, <&qup_spi0_cs>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, - <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>, + <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma1 0 0 QCOM_GPI_SPI>, <&gpi_dma1 1 0 QCOM_GPI_SPI>;
@@ -1404,9 +1476,12 @@ interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, - <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>, + <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma1 0 1 QCOM_GPI_I2C>, <&gpi_dma1 1 1 QCOM_GPI_I2C>;
@@ -1422,9 +1497,12 @@ interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&qup_spi1_data_clk>, <&qup_spi1_cs>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, - <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>, + <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma1 0 1 QCOM_GPI_SPI>, <&gpi_dma1 1 1 QCOM_GPI_SPI>;
@@ -1444,9 +1522,12 @@ interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, - <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>, + <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma1 0 2 QCOM_GPI_I2C>, <&gpi_dma1 1 2 QCOM_GPI_I2C>;
@@ -1462,9 +1543,12 @@ interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&qup_spi2_data_clk>, <&qup_spi2_cs>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, - <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>, + <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma1 0 2 QCOM_GPI_SPI>, <&gpi_dma1 1 2 QCOM_GPI_SPI>;
@@ -1484,9 +1568,12 @@ interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, - <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>, + <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma1 0 3 QCOM_GPI_I2C>, <&gpi_dma1 1 3 QCOM_GPI_I2C>;
@@ -1502,9 +1589,12 @@ interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&qup_spi3_data_clk>, <&qup_spi3_cs>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, - <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>, + <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma1 0 3 QCOM_GPI_SPI>, <&gpi_dma1 1 3 QCOM_GPI_SPI>;
@@ -1524,9 +1614,12 @@ interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, - <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>, + <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma1 0 4 QCOM_GPI_I2C>, <&gpi_dma1 1 4 QCOM_GPI_I2C>;
@@ -1542,9 +1635,12 @@ interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&qup_spi4_data_clk>, <&qup_spi4_cs>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, - <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>, + <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma1 0 4 QCOM_GPI_SPI>, <&gpi_dma1 1 4 QCOM_GPI_SPI>;
@@ -1562,9 +1658,12 @@ pinctrl-names = "default"; pinctrl-0 = <&qup_i2c5_data_clk>; interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, - <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>, + <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma1 0 5 QCOM_GPI_I2C>, <&gpi_dma1 1 5 QCOM_GPI_I2C>;
@@ -1582,9 +1681,12 @@ interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&qup_spi5_data_clk>, <&qup_spi5_cs>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, - <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>, + <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma1 0 5 QCOM_GPI_SPI>, <&gpi_dma1 1 5 QCOM_GPI_SPI>;
@@ -1602,9 +1704,12 @@ pinctrl-names = "default"; pinctrl-0 = <&qup_i2c6_data_clk>; interrupts = <GIC_SPI 363 IRQ_TYPE_LEVEL_HIGH>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, - <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>, + <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma1 0 6 QCOM_GPI_I2C>, <&gpi_dma1 1 6 QCOM_GPI_I2C>;
@@ -1622,9 +1727,12 @@ interrupts = <GIC_SPI 363 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&qup_spi6_data_clk>, <&qup_spi6_cs>; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, - <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>, + <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "qup-core", "qup-config", "qup-memory"; dmas = <&gpi_dma1 0 6 QCOM_GPI_SPI>, <&gpi_dma1 1 6 QCOM_GPI_SPI>;
@@ -1643,8 +1751,10 @@ pinctrl-0 = <&qup_uart7_default>; interrupts = <GIC_SPI 579 IRQ_TYPE_LEVEL_HIGH>; interconnect-names = "qup-core", "qup-config"; - interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>; status = "disabled"; }; };
@@ -1768,8 +1878,10 @@ "ddrss_sf_tbu", "noc_aggr"; - interconnects = <&pcie_noc MASTER_PCIE_0 0 &mc_virt SLAVE_EBI1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &cnoc_main SLAVE_PCIE_0 0>; + interconnects = <&pcie_noc MASTER_PCIE_0 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &cnoc_main SLAVE_PCIE_0 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "pcie-mem", "cpu-pcie"; msi-map = <0x0 &gic_its 0x1400 0x1>,
@@ -1891,8 +2003,10 @@ assigned-clocks = <&gcc GCC_PCIE_1_AUX_CLK>; assigned-clock-rates = <19200000>; - interconnects = <&pcie_noc MASTER_PCIE_1 0 &mc_virt SLAVE_EBI1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &cnoc_main SLAVE_PCIE_1 0>; + interconnects = <&pcie_noc MASTER_PCIE_1 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &cnoc_main SLAVE_PCIE_1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "pcie-mem", "cpu-pcie"; msi-map = <0x0 &gic_its 0x1480 0x1>,
@@ -1971,7 +2085,8 @@ dma-names = "rx", "tx"; iommus = <&apps_smmu 0x480 0x0>, <&apps_smmu 0x481 0x0>; - interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&aggre2_noc MASTER_CRYPTO QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "memory"; };
@@ -2015,8 +2130,10 @@ dma-coherent; operating-points-v2 = <&ufs_opp_table>; - interconnects = <&aggre1_noc MASTER_UFS_MEM 0 &mc_virt SLAVE_EBI1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_UFS_MEM_CFG 0>; + interconnects = <&aggre1_noc MASTER_UFS_MEM QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_UFS_MEM_CFG QCOM_ICC_TAG_ALWAYS>; interconnect-names = "ufs-ddr", "cpu-ufs"; clock-names = "core_clk",
@@ -2316,8 +2433,10 @@ clocks = <&rpmhcc RPMH_IPA_CLK>; clock-names = "core"; - interconnects = <&aggre2_noc MASTER_IPA 0 &mc_virt SLAVE_EBI1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_IPA_CFG 0>; + interconnects = <&aggre2_noc MASTER_IPA QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_IPA_CFG QCOM_ICC_TAG_ALWAYS>; interconnect-names = "memory", "config";
@@ -2351,7 +2470,8 @@ <&rpmhpd RPMHPD_MSS>; power-domain-names = "cx", "mss"; - interconnects = <&mc_virt MASTER_LLCC 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&mc_virt MASTER_LLCC QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; memory-region = <&mpss_mem>, <&q6_mpss_dtb_mem>, <&mpss_dsm_mem>;
@@ -2392,7 +2512,8 @@ <&rpmhpd RPMHPD_LMX>; power-domain-names = "lcx", "lmx"; - interconnects = <&lpass_lpicx_noc MASTER_LPASS_PROC 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&lpass_lpicx_noc MASTER_LPASS_PROC QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; memory-region = <&adspslpi_mem>, <&q6_adsp_dtb_mem>;
@@ -2850,8 +2971,10 @@ power-domains = <&rpmhpd RPMHPD_CX>; operating-points-v2 = <&sdhc2_opp_table>; - interconnects = <&aggre2_noc MASTER_SDCC_2 0 &mc_virt SLAVE_EBI1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_SDCC_2 0>; + interconnects = <&aggre2_noc MASTER_SDCC_2 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_SDCC_2 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "sdhc-ddr", "cpu-sdhc"; bus-width = <4>; dma-coherent;
@@ -3022,7 +3145,8 @@ power-domains = <&dispcc MDSS_GDSC>; - interconnects = <&mmss_noc MASTER_MDP 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&mmss_noc MASTER_MDP QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "mdp0-mem"; iommus = <&apps_smmu 0x1c00 0x2>;
@@ -3495,8 +3619,10 @@ resets = <&gcc GCC_USB30_PRIM_BCR>; - interconnects = <&aggre1_noc MASTER_USB3_0 0 &mc_virt SLAVE_EBI1 0>, - <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_USB3_0 0>; + interconnects = <&aggre1_noc MASTER_USB3_0 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_USB3_0 QCOM_ICC_TAG_ALWAYS>; interconnect-names = "usb-ddr", "apps-usb"; status = "disabled";
@@ -4619,7 +4745,8 @@ compatible = "qcom,sm8550-llcc-bwmon", "qcom,sc7280-llcc-bwmon"; reg = <0 0x24091000 0 0x1000>; interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>; - interconnects = <&mc_virt MASTER_LLCC 3 &mc_virt SLAVE_EBI1 3>; + interconnects = <&mc_virt MASTER_LLCC QCOM_ICC_TAG_ACTIVE_ONLY + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ACTIVE_ONLY>; operating-points-v2 = <&llcc_bwmon_opp_table>;
@@ -4668,7 +4795,8 @@ compatible = "qcom,sm8550-cpu-bwmon", "qcom,sdm845-bwmon"; reg = <0 0x240b6400 0 0x600>; interrupts = <GIC_SPI 581 IRQ_TYPE_LEVEL_HIGH>; - interconnects = <&gem_noc MASTER_APPSS_PROC 3 &gem_noc SLAVE_LLCC 3>; + interconnects = <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY + &gem_noc SLAVE_LLCC QCOM_ICC_TAG_ACTIVE_ONLY>; operating-points-v2 = <&cpu_bwmon_opp_table>;
@@ -4752,7 +4880,8 @@ <&rpmhpd RPMHPD_NSP>; power-domain-names = "cx", "mxc", "nsp"; - interconnects = <&nsp_noc MASTER_CDSP_PROC 0 &mc_virt SLAVE_EBI1 0>; + interconnects = <&nsp_noc MASTER_CDSP_PROC QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; memory-region = <&cdsp_mem>, <&q6_cdsp_dtb_mem>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 346/780 arm64: dts: qcom: sm8550: add missing cpu-cfg interconnect path in the mdss node
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neil Armstrong <[email protected]>
[ Upstream commit 327d489d1ecaf16182952f079cc21f04cf83f967 ]
The bindings requires the mdp0-mem and the cpu-cfg interconnect path, add the missing cpu-cfg path to fix the dtbs check error and also to ensure that MDSS has enough bandwidth to let HLOS write config registers.
--- arch/arm64/boot/dts/qcom/sm8550.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sm8550.dtsi +4 -2
@@ -3146,8 +3146,10 @@ power-domains = <&dispcc MDSS_GDSC>; interconnects = <&mmss_noc MASTER_MDP QCOM_ICC_TAG_ALWAYS - &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; - interconnect-names = "mdp0-mem"; + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_DISPLAY_CFG QCOM_ICC_TAG_ACTIVE_ONLY>; + interconnect-names = "mdp0-mem", "cpu-cfg"; iommus = <&apps_smmu 0x1c00 0x2>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 347/780 arm64: dts: qcom: sm8650: add missing cpu-cfg interconnect path in the mdss node
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neil Armstrong <[email protected]>
[ Upstream commit f22be5c1dd3e12519e3f3b80c14d10b90be2c2fc ]
The bindings requires the mdp0-mem and the cpu-cfg interconnect path, add the missing cpu-cfg path to fix the dtbs check error and also to ensure that MDSS has enough bandwidth to let HLOS write config registers.
--- arch/arm64/boot/dts/qcom/sm8650.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sm8650.dtsi +5 -2
@@ -3658,8 +3658,11 @@ resets = <&dispcc DISP_CC_MDSS_CORE_BCR>; interconnects = <&mmss_noc MASTER_MDP QCOM_ICC_TAG_ALWAYS - &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; - interconnect-names = "mdp0-mem"; + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_DISPLAY_CFG QCOM_ICC_TAG_ACTIVE_ONLY>; + interconnect-names = "mdp0-mem", + "cpu-cfg"; power-domains = <&dispcc MDSS_GDSC>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 348/780 arm64: dts: qcom: x1e80100-romulus: Keep L12B and L15B always on
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
[ Upstream commit 0783c8b3c06b9cf16b5108d558e2faffb8c533b7 ]
These regulators power some electronic components onboard. They're most likely kept online by other pieces of firmware, but you can never be sure enough.
--- arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi +2 -0
@@ -510,6 +510,7 @@ regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + regulator-always-on; }; vreg_l13b: ldo13 {
@@ -531,6 +532,7 @@ regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + regulator-always-on; }; vreg_l16b: ldo16 {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 349/780 arm64: dts: qcom: sdm845-starqltechn: remove wifi
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dzmitry Sankouski <[email protected]>
[ Upstream commit 2d3dd4b237638853b8a99353401ab8d88a6afb6c ]
Starqltechn has broadcom chip for wifi, so sdm845 wifi part can be disabled.
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 8 -------- 1 file changed, 8 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +0 -8
@@ -418,14 +418,6 @@ status = "okay"; }; -&wifi { - vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>; - vdd-1.8-xo-supply = <&vreg_l7a_1p8>; - vdd-1.3-rfa-supply = <&vreg_l17a_1p3>; - vdd-3.3-ch0-supply = <&vreg_l25a_3p3>; - status = "okay"; -}; - &tlmm { gpio-reserved-ranges = <0 4>, <27 4>, <81 4>, <85 4>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 350/780 arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dzmitry Sankouski <[email protected]>
[ Upstream commit 242e4126ee007b95765c21a9d74651fdcf221f2b ]
Usb regulator was wrongly pointed to vreg_l1a_0p875. However, on starqltechn it's powered from vreg_l5a_0p8.
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +1 -2
@@ -135,8 +135,6 @@ vdda_sp_sensor: vdda_ufs1_core: vdda_ufs2_core: - vdda_usb1_ss_core: - vdda_usb2_ss_core: vreg_l1a_0p875: ldo1 { regulator-min-microvolt = <880000>; regulator-max-microvolt = <880000>;
@@ -157,6 +155,7 @@ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; }; + vdda_usb1_ss_core: vdd_wcss_cx: vdd_wcss_mx: vdda_wcss_pll:
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 351/780 arm64: dts: qcom: sdm845-starqltechn: refactor node order
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dzmitry Sankouski <[email protected]>
[ Upstream commit cba1dd3d851ebc1b6c5ae4000208a9753320694b ]
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +1 -1
@@ -382,8 +382,8 @@ }; &sdhc_2 { - pinctrl-names = "default"; pinctrl-0 = <&sdc2_clk_state &sdc2_cmd_state &sdc2_data_state &sd_card_det_n_state>; + pinctrl-names = "default"; cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>; vmmc-supply = <&vreg_l21a_2p95>; vqmmc-supply = <&vddpx_2>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 352/780 arm64: dts: qcom: sdm845-starqltechn: remove excess reserved gpios
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dzmitry Sankouski <[email protected]>
[ Upstream commit fb5fce873b952f8b1c5f7edcabcc8611ef45ea7a ]
Starqltechn has 2 reserved gpio ranges <27 4>, <85 4>. <27 4> is spi for eSE(embedded Secure Element). <85 4> is spi for fingerprint.
Remove excess reserved gpio regions.
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +2 -1
@@ -418,7 +418,8 @@ }; &tlmm { - gpio-reserved-ranges = <0 4>, <27 4>, <81 4>, <85 4>; + gpio-reserved-ranges = <27 4>, /* SPI (eSE - embedded Secure Element) */ + <85 4>; /* SPI (fingerprint reader) */ sdc2_clk_state: sdc2-clk-state { pins = "sdc2_clk";
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 353/780 arm64: dts: qcom: sm8350: Reenable crypto & cryptobam
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit 75eefd474469abf95aa9ef6da8161d69f86b98b4 ]
When num-channels and qcom,num-ees is not provided in devicetree, the driver will try to read these values from the registers during probe but this fails if the interconnect is not on and then crashes the system.
So we can provide these properties in devicetree (queried after patching BAM driver to enable the necessary interconnect) so we can probe cryptobam without reading registers and then also use the QCE as expected.
--- arch/arm64/boot/dts/qcom/sm8350.dtsi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/qcom/sm8350.dtsi +2 -4
@@ -1806,11 +1806,11 @@ interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>; #dma-cells = <1>; qcom,ee = <0>; + qcom,num-ees = <4>; + num-channels = <16>; qcom,controlled-remotely; iommus = <&apps_smmu 0x594 0x0011>, <&apps_smmu 0x596 0x0011>; - /* FIXME: Probing BAM DMA causes some abort and system hang */ - status = "fail"; }; crypto: crypto@1dfa000 {
@@ -1822,8 +1822,6 @@ <&apps_smmu 0x596 0x0011>; interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>; interconnect-names = "memory"; - /* FIXME: dependency BAM DMA is disabled */ - status = "disabled"; }; ipa: ipa@1e40000 {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 354/780 arm64: dts: qcom: ipq9574: fix the msi interrupt numbers of pcie3
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manikanta Mylavarapu <[email protected]>
[ Upstream commit c87d58bc7f831bf3d887e6ec846246cb673c2e50 ]
The MSI interrupt numbers of the PCIe3 controller are incorrect. Due to this, the functional bring up of the QDSP6 processor on the PCIe endpoint has failed. Correct the MSI interrupt numbers to properly bring up the QDSP6 processor on the PCIe endpoint.
--- arch/arm64/boot/dts/qcom/ipq9574.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/qcom/ipq9574.dtsi +8 -8
@@ -974,14 +974,14 @@ ranges = <0x01000000 0x0 0x00000000 0x18200000 0x0 0x100000>, <0x02000000 0x0 0x18300000 0x18300000 0x0 0x7d00000>; - interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 415 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 494 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 495 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "msi0", "msi1", "msi2",
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 355/780 arm64: dts: qcom: sm8750: Fix cluster hierarchy for idle states
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maulik Shah <[email protected]>
[ Upstream commit 778dc0f876c70b3d781a49981560ec88e1b7083a ]
SM8750 have two different clusters. cluster0 have CPU 0-5 as child and cluster1 have CPU 6-7 as child. Each cluster requires its own idle state and power domain in order to achieve complete domain sleep state.
However only single cluster idle state is added mapping CPU 0-7 to the same power domain. Fix this by correctly mapping each CPU to respective cluster power domain and make cluster1 power domain use same domain idle state as cluster0 since both use same idle state parameters.
--- arch/arm64/boot/dts/qcom/sm8750.dtsi | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-)
arch/arm64/boot/dts/qcom/sm8750.dtsi +15 -9
@@ -233,53 +233,59 @@ cpu_pd0: power-domain-cpu0 { #power-domain-cells = <0>; - power-domains = <&cluster_pd>; + power-domains = <&cluster0_pd>; domain-idle-states = <&cluster0_c4>; }; cpu_pd1: power-domain-cpu1 { #power-domain-cells = <0>; - power-domains = <&cluster_pd>; + power-domains = <&cluster0_pd>; domain-idle-states = <&cluster0_c4>; }; cpu_pd2: power-domain-cpu2 { #power-domain-cells = <0>; - power-domains = <&cluster_pd>; + power-domains = <&cluster0_pd>; domain-idle-states = <&cluster0_c4>; }; cpu_pd3: power-domain-cpu3 { #power-domain-cells = <0>; - power-domains = <&cluster_pd>; + power-domains = <&cluster0_pd>; domain-idle-states = <&cluster0_c4>; }; cpu_pd4: power-domain-cpu4 { #power-domain-cells = <0>; - power-domains = <&cluster_pd>; + power-domains = <&cluster0_pd>; domain-idle-states = <&cluster0_c4>; }; cpu_pd5: power-domain-cpu5 { #power-domain-cells = <0>; - power-domains = <&cluster_pd>; + power-domains = <&cluster0_pd>; domain-idle-states = <&cluster0_c4>; }; cpu_pd6: power-domain-cpu6 { #power-domain-cells = <0>; - power-domains = <&cluster_pd>; + power-domains = <&cluster1_pd>; domain-idle-states = <&cluster1_c4>; }; cpu_pd7: power-domain-cpu7 { #power-domain-cells = <0>; - power-domains = <&cluster_pd>; + power-domains = <&cluster1_pd>; domain-idle-states = <&cluster1_c4>; }; - cluster_pd: power-domain-cluster { + cluster0_pd: power-domain-cluster0 { + #power-domain-cells = <0>; + domain-idle-states = <&cluster_cl5>; + power-domains = <&system_pd>; + }; + + cluster1_pd: power-domain-cluster1 { #power-domain-cells = <0>; domain-idle-states = <&cluster_cl5>; power-domains = <&system_pd>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 356/780 arm64: dts: qcom: sm8250: Fix CPU7 opp table
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xilin Wu <[email protected]>
[ Upstream commit 28f997b89967afdc0855d8aa7538b251fb44f654 ]
There is a typo in cpu7_opp9. Fix it to get rid of the following errors.
[ 0.198043] cpu cpu7: Voltage update failed freq=1747200 [ 0.198052] cpu cpu7: failed to update OPP for freq=1747200
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8250.dtsi +1 -1
@@ -606,7 +606,7 @@ }; cpu7_opp9: opp-1747200000 { - opp-hz = /bits/ 64 <1708800000>; + opp-hz = /bits/ 64 <1747200000>; opp-peak-kBps = <5412000 42393600>; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 357/780 arm64: dts: qcom: sm8750: Correct clocks property for uart14 node
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jyothi Kumar Seerapu <[email protected]>
[ Upstream commit 515551e65635b988f2afa9e8683a6b57d6cfba36 ]
Correct the clocks property for the uart14 node to fix UART functionality on QUP2_SE6. The current failure is due to an incorrect clocks assignment.
Change the clocks property to GCC_QUPV3_WRAP2_S6_CLK to resolve the issue.
--- arch/arm64/boot/dts/qcom/sm8750.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8750.dtsi +1 -1
@@ -993,7 +993,7 @@ interrupts = <GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&gcc GCC_QUPV3_WRAP2_S5_CLK>; + clocks = <&gcc GCC_QUPV3_WRAP2_S6_CLK>; clock-names = "se"; interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 358/780 arm64: dts: qcom: sc8280xp-x13s: Drop duplicate DMIC supplies
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephan Gerhold <[email protected]>
[ Upstream commit a2e617f4e6981aa514a569e927f90b0d39bb31b2 ]
The WCD938x codec provides two controls for each of the MIC_BIASn outputs:
- "MIC BIASn" enables an internal regulator to generate the output with a configurable voltage (qcom,micbiasN-microvolt).
- "VA MIC BIASn" enables "pull-up mode" that bypasses the internal regulator and directly outputs fixed 1.8V from the VDD_PX pin. This is intended for low-power VA (voice activation) use cases.
The audio-routing setup for the ThinkPad X13s currently specifies both as power supplies for the DMICs, but only one of them can be active at the same time. In practice, only the internal regulator is used with the current setup because the driver prefers it over pull-up mode.
Make this more clear by dropping the redundant routes to the pull-up "VA MIC BIASn" supply. There is no functional difference except that we skip briefly switching to pull-up mode when shutting down the microphone.
--- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 3 --- 1 file changed, 3 deletions(-)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +0 -3
@@ -1202,9 +1202,6 @@ "VA DMIC0", "MIC BIAS1", "VA DMIC1", "MIC BIAS1", "VA DMIC2", "MIC BIAS3", - "VA DMIC0", "VA MIC BIAS1", - "VA DMIC1", "VA MIC BIAS1", - "VA DMIC2", "VA MIC BIAS3", "TX SWR_ADC1", "ADC2_OUTPUT"; wcd-playback-dai-link {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 359/780 arm64: dts: qcom: ipq9574: Fix USB vdd info
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Varadarajan Narayanan <[email protected]>
[ Upstream commit 4f4c905e6a2a4e884f4e9b7326c94fac3500e0f9 ]
USB phys in ipq9574 use the 'L5' regulator. The commit ec4f047679d5 ("arm64: dts: qcom: ipq9574: Enable USB") incorrectly specified it as 'L2'. Because of this when the phy module turns off/on its regulators, the wrong regulator is turned off/on resulting in 2 issues, namely the correct regulator related to the USB phy is not turned off/on and the module powered by the incorrect regulator is affected.
--- arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi +9 -2
@@ -111,6 +111,13 @@ regulator-always-on; regulator-boot-on; }; + + mp5496_l5: l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; }; };
@@ -146,7 +153,7 @@ }; &usb_0_qmpphy { - vdda-pll-supply = <&mp5496_l2>; + vdda-pll-supply = <&mp5496_l5>; vdda-phy-supply = <®ulator_fixed_0p925>; status = "okay";
@@ -154,7 +161,7 @@ &usb_0_qusbphy { vdd-supply = <®ulator_fixed_0p925>; - vdda-pll-supply = <&mp5496_l2>; + vdda-pll-supply = <&mp5496_l5>; vdda-phy-dpdm-supply = <®ulator_fixed_3p3>; status = "okay";
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 360/780 arm64: dts: qcom: qcs615: remove disallowed property in spmi bus node
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tingguo Cheng <[email protected]>
[ Upstream commit 54040a3e3da67ef0e014e5f04f9f3fe680fc4b55 ]
Remove the unevaluated 'cell-index' property from qcs615-ride.dtb spmi@c440000 to fix the Devicetree validation error reported by the kernel test robot.
--- arch/arm64/boot/dts/qcom/qcs615.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/qcom/qcs615.dtsi +0 -1
@@ -3304,7 +3304,6 @@ #interrupt-cells = <4>; #address-cells = <2>; #size-cells = <0>; - cell-index = <0>; qcom,channel = <0>; qcom,ee = <0>; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 361/780 arm64: dts: qcom: sm8650: Fix domain-idle-state for CPU2
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit 9bb5ca464100e7c8f2d740148088f60e04fed8ed ]
On SM8650 the CPUs 0-1 are "silver" (Cortex-A520), CPU 2-6 are "gold" (Cortex-A720) and CPU 7 is "gold-plus" (Cortex-X4).
So reference the correct "gold" idle-state for CPU core 2.
--- arch/arm64/boot/dts/qcom/sm8650.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8650.dtsi +1 -1
@@ -460,7 +460,7 @@ cpu_pd2: power-domain-cpu2 { #power-domain-cells = <0>; power-domains = <&cluster_pd>; - domain-idle-states = <&silver_cpu_sleep_0>; + domain-idle-states = <&gold_cpu_sleep_0>; }; cpu_pd3: power-domain-cpu3 {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 362/780 arm64: dts: rockchip: Add missing uart3 interrupt for RK3528
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chukun Pan <[email protected]>
[ Upstream commit a37d21a9b45e47ed6bc1f94e738096c07db78a07 ]
The interrupt of uart3 node on rk3528 is missing, fix it.
--- arch/arm64/boot/dts/rockchip/rk3528.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3528.dtsi +2 -1
@@ -404,9 +404,10 @@ uart3: serial@ffa08000 { compatible = "rockchip,rk3528-uart", "snps,dw-apb-uart"; + reg = <0x0 0xffa08000 0x0 0x100>; clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>; clock-names = "baudclk", "apb_pclk"; - reg = <0x0 0xffa08000 0x0 0x100>; + interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>; reg-io-width = <4>; reg-shift = <2>; status = "disabled";
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 363/780 arm64: dts: rockchip: Move SHMEM memory to reserved memory on rk3588
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chukun Pan <[email protected]>
[ Upstream commit 8ecd096d018be8a6bd3bd930f3a41a85db66a67d ]
0x0 to 0xf0000000 are SDRAM memory areas where 0x10f000 is located. So move the SHMEM memory of arm_scmi to the reserved memory node.
--- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi +7 -8
@@ -439,16 +439,15 @@ #clock-cells = <0>; }; - pmu_sram: sram@10f000 { - compatible = "mmio-sram"; - reg = <0x0 0x0010f000 0x0 0x100>; - ranges = <0 0x0 0x0010f000 0x100>; - #address-cells = <1>; - #size-cells = <1>; + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; - scmi_shmem: sram@0 { + scmi_shmem: shmem@10f000 { compatible = "arm,scmi-shmem"; - reg = <0x0 0x100>; + reg = <0x0 0x0010f000 0x0 0x100>; + no-map; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 364/780 ARM: dts: at91: usb_a9263: fix GPIO for Dataflash chip select
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wolfram Sang <[email protected]>
[ Upstream commit 67ba341e57ab158423818ed33bfa1c40eb0e5e7e ]
Dataflash did not work on my board. After checking schematics and using the proper GPIO, it works now. Also, make it active low to avoid:
flash@0 enforce active low on GPIO handle
--- arch/arm/boot/dts/microchip/usb_a9263.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/microchip/usb_a9263.dts +1 -1
@@ -58,7 +58,7 @@ }; spi0: spi@fffa4000 { - cs-gpios = <&pioB 15 GPIO_ACTIVE_HIGH>; + cs-gpios = <&pioA 5 GPIO_ACTIVE_LOW>; status = "okay"; flash@0 { compatible = "atmel,at45", "atmel,dataflash";
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 365/780 ARM: dts: at91: at91sam9263: fix NAND chip selects
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wolfram Sang <[email protected]>
[ Upstream commit c72ede1c24be689733bcd2233a3a56f2478429c8 ]
NAND did not work on my USB-A9263. I discovered that the offending commit converted the PIO bank for chip selects wrongly, so all A9263 boards need to be fixed.
--- arch/arm/boot/dts/microchip/at91sam9263ek.dts | 2 +- arch/arm/boot/dts/microchip/tny_a9263.dts | 2 +- arch/arm/boot/dts/microchip/usb_a9263.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/microchip/at91sam9263ek.dts +1 -1
@@ -152,7 +152,7 @@ nand@3 { reg = <0x3 0x0 0x800000>; rb-gpios = <&pioA 22 GPIO_ACTIVE_HIGH>; - cs-gpios = <&pioA 15 GPIO_ACTIVE_HIGH>; + cs-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>; nand-bus-width = <8>; nand-ecc-mode = "soft"; nand-on-flash-bbt;
arch/arm/boot/dts/microchip/tny_a9263.dts +1 -1
@@ -64,7 +64,7 @@ nand@3 { reg = <0x3 0x0 0x800000>; rb-gpios = <&pioA 22 GPIO_ACTIVE_HIGH>; - cs-gpios = <&pioA 15 GPIO_ACTIVE_HIGH>; + cs-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>; nand-bus-width = <8>; nand-ecc-mode = "soft"; nand-on-flash-bbt;
arch/arm/boot/dts/microchip/usb_a9263.dts +1 -1
@@ -84,7 +84,7 @@ nand@3 { reg = <0x3 0x0 0x800000>; rb-gpios = <&pioA 22 GPIO_ACTIVE_HIGH>; - cs-gpios = <&pioA 15 GPIO_ACTIVE_HIGH>; + cs-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>; nand-bus-width = <8>; nand-ecc-mode = "soft"; nand-on-flash-bbt;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 366/780 arm64: dts: mediatek: mt8188: Fix IOMMU device for rdma0
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <[email protected]>
[ Upstream commit 267623000d11f6d483214be2484555f600393a12 ]
Based on the comments in the MT8188 IOMMU binding header, the rdma0 device specifies the wrong IOMMU device for the IOMMU port it is tied to:
This SoC have two MM IOMMU HWs, this is the connected information:
iommu-vdo: larb0/2/5/9/10/11A/11C/13/16B/17B/19/21
iommu-vpp: larb1/3/4/6/7/11B/12/14/15/16A/17A/23/27rdma0's endpoint is M4U_PORT_L1_DISP_RDMA0 (on larb1), which should use iommu-vpp, but it is currently tied to iommu-vdo.
Somehow this went undetected until recently in Linux v6.15-rc1 with some IOMMU subsystem framework changes that caused the IOMMU to no longer work. The IOMMU would fail to probe if any devices associated with it could not be successfully attached. Prior to these changes, only the end device would be left without an IOMMU attached.
--- arch/arm64/boot/dts/mediatek/mt8188.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8188.dtsi +1 -1
@@ -2579,7 +2579,7 @@ reg = <0 0x1c002000 0 0x1000>; clocks = <&vdosys0 CLK_VDO0_DISP_RDMA0>; interrupts = <GIC_SPI 638 IRQ_TYPE_LEVEL_HIGH 0>; - iommus = <&vdo_iommu M4U_PORT_L1_DISP_RDMA0>; + iommus = <&vpp_iommu M4U_PORT_L1_DISP_RDMA0>; power-domains = <&spm MT8188_POWER_DOMAIN_VDOSYS0>; mediatek,gce-client-reg = <&gce0 SUBSYS_1c00XXXX 0x2000 0x1000>;
Signature · 1 line
2.39.5