6.18.32-rc1 review
Subsystems (7)
Greg Kroah-Hartman
maintainerPATCH 1/957 blk-cgroup: wait for blkcg cleanup before initializing new disk
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming Lei <[email protected]>
[ Upstream commit 3dbaacf6ab68f81e3375fe769a2ecdbd3ce386fd ]
When a queue is shared across disk rebind (e.g., SCSI unbind/bind), the previous disk's blkcg state is cleaned up asynchronously via disk_release() -> blkcg_exit_disk(). If the new disk's blkcg_init_disk() runs before that cleanup finishes, we may overwrite q->root_blkg while the old one is still alive, and radix_tree_insert() in blkg_create() fails with -EEXIST because the old blkg entries still occupy the same queue id slot in blkcg->blkg_tree. This causes the sd probe to fail with -ENOMEM.
Fix it by waiting in blkcg_init_disk() for root_blkg to become NULL, which indicates the previous disk's blkcg cleanup has completed.
--- block/blk-cgroup.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
block/blk-cgroup.c +15 -0
@@ -24,6 +24,7 @@#include <linux/backing-dev.h> #include <linux/slab.h> #include <linux/delay.h> +#include <linux/wait_bit.h> #include <linux/atomic.h> #include <linux/ctype.h> #include <linux/resume_user_mode.h>
@@ -611,6 +612,8 @@ static void blkg_destroy_all(struct gendisk *disk) q->root_blkg =NULL ;spin_unlock_irq (&q->queue_lock); + +wake_up_var (&q->root_blkg); }static void blkg_iostat_set (struct blkg_iostat *dst,struct blkg_iostat *src)
@@ -1498,6 +1501,18 @@ int blkcg_init_disk(struct gendisk *disk)struct blkcg_gq *new_blkg, *blkg;bool preloaded; +/* +* If the queue is shared across disk rebind (e.g., SCSI), the +* previous disk's blkcg state is cleaned up asynchronously via +* disk_release() -> blkcg_exit_disk(). Wait for that cleanup to +* finish (indicated by root_blkg becoming NULL) before setting up +* new blkcg state. Otherwise, we may overwrite q->root_blkg while +* the old one is still alive, and radix_tree_insert() in +* blkg_create() will fail with -EEXIST because the old entries +* still occupy the same queue id slot in blkcg->blkg_tree. +*/ +wait_var_event (&q->root_blkg, !READ_ONCE (q->root_blkg)); + new_blkg =blkg_alloc (&blkcg_root, disk,GFP_KERNEL );if (!new_blkg)return -ENOMEM ;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 10/957 erofs: verify metadata accesses for file-backed mounts
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gao Xiang <[email protected]>
[ Upstream commit 307210c262a29f41d7177851295ea1703bd04175 ]
For file-backed mounts, metadata is fetched via the page cache of backing inodes to avoid double caching and redundant copy ops out of RO uptodate folios, which is used by Android APEXes, ComposeFS, containerd. However, rw_verify_area() was missing prior to metadata accesses.
Similar to vfs_iocb_iter_read(), fix this by:
- Enabling fanotify pre-content hooks on metadata accesses;
- security_file_permission() for security modules.
Verified that fanotify pre-content hooks now works correctly.
--- fs/erofs/data.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
fs/erofs/data.c +14 -0
@@ -29,6 +29,20 @@ void *erofs_bread(struct erofs_buf *buf, erofs_off_t offset, bool need_kmap) {pgoff_t index = (buf->off + offset) >>PAGE_SHIFT ;struct folio *folio =NULL ; +loff_t fpos; +int err; + +/* +* Metadata access for file-backed mounts reuses page cache of backing +* fs inodes (only folio data will be needed) to prevent double caching. +* However, the data access range must be verified here in advance. +*/ +if (buf->file) { + fpos = index <<PAGE_SHIFT ; + err =rw_verify_area (READ , buf->file, &fpos,PAGE_SIZE ); +if (err <0 ) +return ERR_PTR (err); + }if (buf->page) { folio =page_folio (buf->page);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 11/957 erofs: include the trailing NUL in FS_IOC_GETFSLABEL
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhan Xusheng <[email protected]>
[ Upstream commit d6250d49da4d8f11afc0d8991c84e0307949f92e ]
erofs_ioctl_get_volume_label() passes strlen(sbi->volume_name) as the length to copy_to_user(), which copies the label string without the trailing NUL byte. Since FS_IOC_GETFSLABEL callers expect a NUL-terminated string in the FSLABEL_MAX-sized buffer and may not pre-zero the buffer, this can cause userspace to read past the label into uninitialised stack memory.
Fix this by using strlen() + 1 to include the NUL terminator, consistent with how ext4 and xfs implement FS_IOC_GETFSLABEL.
--- fs/erofs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/erofs/inode.c +1 -1
@@ -348,7 +348,7 @@ static int erofs_ioctl_get_volume_label(struct inode *inode, void __user *arg) ret =clear_user (arg,1 ); else ret =copy_to_user (arg, sbi->volume_name, -strlen (sbi->volume_name)); +strlen (sbi->volume_name) +1 );return ret ? -EFAULT :0 ; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 12/957 md: fix array_state=clear sysfs deadlock
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yu Kuai <[email protected]>
[ Upstream commit 2aa72276fab9851dbd59c2daeb4b590c5a113908 ]
When "clear" is written to array_state, md_attr_store() breaks sysfs active protection so the array can delete itself from its own sysfs store method.
However, md_attr_store() currently drops the mddev reference before calling sysfs_unbreak_active_protection(). Once do_md_stop(..., 0) has made the mddev eligible for delayed deletion, the temporary kobject reference taken by sysfs_break_active_protection() can become the last kobject reference protecting the md kobject.
That allows sysfs_unbreak_active_protection() to drop the last kobject reference from the current sysfs writer context. kobject teardown then recurses into kernfs removal while the current sysfs node is still being unwound, and lockdep reports recursive locking on kn->active with kernfs_drain() in the call chain.
Reproducer on an existing level:
1. Create an md0 linear array and activate it:
mknod /dev/md0 b 9 0
echo none > /sys/block/md0/md/metadata_version
echo linear > /sys/block/md0/md/level
echo 1 > /sys/block/md0/md/raid_disks
echo "$(cat /sys/class/block/sdb/dev)" > /sys/block/md0/md/new_dev
echo "$(($(cat /sys/class/block/sdb/size) / 2))" > \ /sys/block/md0/md/dev-sdb/size
echo 0 > /sys/block/md0/md/dev-sdb/slot echo active > /sys/block/md0/md/array_state
2. Wait briefly for the array to settle, then clear it:
sleep 2
echo clear > /sys/block/md0/md/array_state
The warning looks like:
WARNING: possible recursive locking detected bash/588 is trying to acquire lock:
(kn->active#65) at __kernfs_remove+0x157/0x1d0
but task is already holding lock:
(kn->active#65) at sysfs_unbreak_active_protection+0x1f/0x40
...
Call Trace: kernfs_drain __kernfs_remove kernfs_remove_by_name_ns sysfs_remove_group sysfs_remove_groups __kobject_del kobject_put md_attr_store kernfs_fop_write_iter vfs_write ksys_write
Restore active protection before mddev_put() so the extra sysfs kobject reference is dropped while the mddev is still held alive. The actual md kobject deletion is then deferred until after the sysfs write path has fully returned.
--- drivers/md/md.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/md/md.c +7 -1
@@ -6032,10 +6032,16 @@ md_attr_store(struct kobject *kobj, struct attribute *attr, }spin_unlock (&all_mddevs_lock); rv = entry->store (mddev, page, length); -mddev_put (mddev); +/* +* For "array_state=clear", dropping the extra kobject reference from +* sysfs_break_active_protection() can trigger md kobject deletion. +* Restore active protection before mddev_put() so deletion happens +* after the sysfs write path fully unwinds. +*/ if (kn)sysfs_unbreak_active_protection (kn); +mddev_put (mddev);return rv; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 13/957 erofs: handle 48-bit blocks/uniaddr for extra devices
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhan Xusheng <[email protected]>
[ Upstream commit 63c2f06198ca7513433f1c92f2c654869d72417e ]
erofs_init_device() only reads blocks_lo and uniaddr_lo from the on-disk device slot, ignoring blocks_hi and uniaddr_hi that were introduced alongside the 48-bit block addressing feature.
For the primary device (dif0), erofs_read_superblock() already handles this correctly by combining blocks_lo with blocks_hi when 48-bit layout is enabled. But the same logic was not applied to extra devices.
With a 48-bit EROFS image using extra devices whose uniaddr or blocks exceed 32-bit range, the truncated values cause erofs_map_dev() to compute wrong physical addresses, leading to silent data corruption.
Fix this by reading blocks_hi and uniaddr_hi in erofs_init_device() when 48-bit layout is enabled, consistent with the primary device handling. Also fix the erofs_deviceslot on-disk definition where blocks_hi was incorrectly declared as __le32 instead of __le16.
--- fs/erofs/erofs_fs.h | 4 ++-- fs/erofs/super.c | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-)
fs/erofs/erofs_fs.h +2 -2
@@ -44,9 +44,9 @@ struct erofs_deviceslot {u8 tag[64 ];/* digest(sha256), etc. */ __le32 blocks_lo;/* total blocks count of this device */ __le32 uniaddr_lo;/* unified starting block of this device */ -__le32 blocks_hi;/* total blocks count MSB */ +__le16 blocks_hi;/* total blocks count MSB */ __le16 uniaddr_hi;/* unified starting block MSB */ -u8 reserved[50 ]; +u8 reserved[52 ]; };#define EROFS_DEVT_SLOT_SIZE sizeof(struct erofs_deviceslot)
fs/erofs/super.c +6 -2
@@ -140,6 +140,7 @@ static int erofs_init_device(struct erofs_buf *buf, struct super_block *sb,struct erofs_fscache *fscache;struct erofs_deviceslot *dis;struct file *file; +bool _48bit; dis =erofs_read_metabuf (buf, sb, *pos, false);if (IS_ERR (dis))
@@ -186,8 +187,11 @@ static int erofs_init_device(struct erofs_buf *buf, struct super_block *sb, dif->file = file; } - dif->blocks =le32_to_cpu (dis->blocks_lo); - dif->uniaddr =le32_to_cpu (dis->uniaddr_lo); + _48bit =erofs_sb_has_48bit (sbi); + dif->blocks =le32_to_cpu (dis->blocks_lo) | + (_48bit ? (u64 )le16_to_cpu (dis->blocks_hi) <<32 :0 ); + dif->uniaddr =le32_to_cpu (dis->uniaddr_lo) | + (_48bit ? (u64 )le16_to_cpu (dis->uniaddr_hi) <<32 :0 ); sbi->total_blocks += dif->blocks; *pos +=EROFS_DEVT_SLOT_SIZE ;return 0 ;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 14/957 dm: add WQ_PERCPU to alloc_workqueue users
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marco Crivellari <[email protected]>
[ Upstream commit d4880868670198df321627a949e7b7f2d76cf54e ]
This continues the effort to refactor workqueue APIs, which began with the introduction of new workqueues and a new alloc_workqueue flag in:
commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq") commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag")
The refactoring is going to alter the default behavior of alloc_workqueue() to be unbound by default.
With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND), any alloc_workqueue() caller that doesn’t explicitly specify WQ_UNBOUND must now use WQ_PERCPU. For more details see the Link tag below.
In order to keep alloc_workqueue() behavior identical, explicitly request WQ_PERCPU.
Stable-dep-of: e4979f4fac4d ("md: remove unused static md_wq workqueue")
--- drivers/md/dm-bufio.c | 3 ++- drivers/md/dm-cache-target.c | 3 ++- drivers/md/dm-clone-target.c | 3 ++- drivers/md/dm-crypt.c | 6 ++++-- drivers/md/dm-delay.c | 4 +++- drivers/md/dm-integrity.c | 15 ++++++++++----- drivers/md/dm-kcopyd.c | 3 ++- drivers/md/dm-log-userspace-base.c | 3 ++- drivers/md/dm-mpath.c | 5 +++-- drivers/md/dm-raid1.c | 5 +++-- drivers/md/dm-snap-persistent.c | 3 ++- drivers/md/dm-stripe.c | 2 +- drivers/md/dm-verity-target.c | 4 +++- drivers/md/dm-writecache.c | 3 ++- drivers/md/dm.c | 3 ++- drivers/md/md.c | 4 ++-- 16 files changed, 45 insertions(+), 24 deletions(-)
drivers/md/dm-bufio.c +2 -1
@@ -2833,7 +2833,8 @@ static int __init dm_bufio_init(void)__cache_size_refresh ();mutex_unlock (&dm_bufio_clients_lock); - dm_bufio_wq =alloc_workqueue ("dm_bufio_cache" ,WQ_MEM_RECLAIM ,0 ); + dm_bufio_wq =alloc_workqueue ("dm_bufio_cache" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!dm_bufio_wq)return -ENOMEM ;
drivers/md/dm-cache-target.c +2 -1
@@ -2533,7 +2533,8 @@ static int cache_create(struct cache_args *ca, struct cache **result) goto bad; } - cache->wq =alloc_workqueue ("dm-" DM_MSG_PREFIX ,WQ_MEM_RECLAIM ,0 ); + cache->wq =alloc_workqueue ("dm-" DM_MSG_PREFIX , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!cache->wq) { *error ="could not create workqueue for metadata object" ; goto bad;
drivers/md/dm-clone-target.c +2 -1
@@ -1877,7 +1877,8 @@ static int clone_ctr(struct dm_target *ti, unsigned int argc, char **argv) clone->hydration_offset =0 ;atomic_set (&clone->hydrations_in_flight,0 ); - clone->wq =alloc_workqueue ("dm-" DM_MSG_PREFIX ,WQ_MEM_RECLAIM ,0 ); + clone->wq =alloc_workqueue ("dm-" DM_MSG_PREFIX , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!clone->wq) { ti->error ="Failed to allocate workqueue" ; r = -ENOMEM ;
drivers/md/dm-crypt.c +4 -2
@@ -3441,7 +3441,9 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)if (test_bit (DM_CRYPT_HIGH_PRIORITY , &cc->flags)) common_wq_flags |=WQ_HIGHPRI ; - cc->io_queue =alloc_workqueue ("kcryptd_io-%s-%d" , common_wq_flags,1 , devname, wq_id); + cc->io_queue =alloc_workqueue ("kcryptd_io-%s-%d" , + common_wq_flags |WQ_PERCPU ,1 , + devname, wq_id);if (!cc->io_queue) { ti->error ="Couldn't create kcryptd io queue" ; goto bad;
@@ -3449,7 +3451,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)if (test_bit (DM_CRYPT_SAME_CPU , &cc->flags)) { cc->crypt_queue =alloc_workqueue ("kcryptd-%s-%d" , - common_wq_flags |WQ_CPU_INTENSIVE , + common_wq_flags |WQ_CPU_INTENSIVE |WQ_PERCPU ,1 , devname, wq_id); }else {/*
drivers/md/dm-delay.c +3 -1
@@ -290,7 +290,9 @@ static int delay_ctr(struct dm_target *ti, unsigned int argc, char **argv) }else {timer_setup (&dc->delay_timer, handle_delayed_timer,0 );INIT_WORK (&dc->flush_expired_bios, flush_expired_bios); - dc->kdelayd_wq =alloc_workqueue ("kdelayd" ,WQ_MEM_RECLAIM ,0 ); + dc->kdelayd_wq =alloc_workqueue ("kdelayd" , +WQ_MEM_RECLAIM |WQ_PERCPU , +0 );if (!dc->kdelayd_wq) { ret = -EINVAL ;DMERR ("Couldn't start kdelayd" );
drivers/md/dm-integrity.c +10 -5
@@ -5003,7 +5003,8 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned int argc, char **argv } ic->metadata_wq =alloc_workqueue ("dm-integrity-metadata" , -WQ_MEM_RECLAIM ,METADATA_WORKQUEUE_MAX_ACTIVE ); +WQ_MEM_RECLAIM |WQ_PERCPU , +METADATA_WORKQUEUE_MAX_ACTIVE );if (!ic->metadata_wq) { ti->error ="Cannot allocate workqueue" ; r = -ENOMEM ;
@@ -5021,7 +5022,8 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned int argc, char **argv goto bad; } - ic->offload_wq =alloc_workqueue ("dm-integrity-offload" ,WQ_MEM_RECLAIM , + ic->offload_wq =alloc_workqueue ("dm-integrity-offload" , +WQ_MEM_RECLAIM |WQ_PERCPU ,METADATA_WORKQUEUE_MAX_ACTIVE );if (!ic->offload_wq) { ti->error ="Cannot allocate workqueue" ;
@@ -5029,7 +5031,8 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned int argc, char **argv goto bad; } - ic->commit_wq =alloc_workqueue ("dm-integrity-commit" ,WQ_MEM_RECLAIM ,1 ); + ic->commit_wq =alloc_workqueue ("dm-integrity-commit" , +WQ_MEM_RECLAIM |WQ_PERCPU ,1 );if (!ic->commit_wq) { ti->error ="Cannot allocate workqueue" ; r = -ENOMEM ;
@@ -5038,7 +5041,8 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned int argc, char **argvINIT_WORK (&ic->commit_work, integrity_commit);if (ic->mode =='J' || ic->mode =='B' ) { - ic->writer_wq =alloc_workqueue ("dm-integrity-writer" ,WQ_MEM_RECLAIM ,1 ); + ic->writer_wq =alloc_workqueue ("dm-integrity-writer" , +WQ_MEM_RECLAIM |WQ_PERCPU ,1 );if (!ic->writer_wq) { ti->error ="Cannot allocate workqueue" ; r = -ENOMEM ;
@@ -5210,7 +5214,8 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned int argc, char **argv }if (ic->internal_hash) { - ic->recalc_wq =alloc_workqueue ("dm-integrity-recalc" ,WQ_MEM_RECLAIM ,1 ); + ic->recalc_wq =alloc_workqueue ("dm-integrity-recalc" , +WQ_MEM_RECLAIM |WQ_PERCPU ,1 );if (!ic->recalc_wq) { ti->error ="Cannot allocate workqueue" ; r = -ENOMEM ;
drivers/md/dm-kcopyd.c +2 -1
@@ -934,7 +934,8 @@ struct dm_kcopyd_client *dm_kcopyd_client_create(struct dm_kcopyd_throttle *thro goto bad_slab;INIT_WORK (&kc->kcopyd_work, do_work); - kc->kcopyd_wq =alloc_workqueue ("kcopyd" ,WQ_MEM_RECLAIM ,0 ); + kc->kcopyd_wq =alloc_workqueue ("kcopyd" ,WQ_MEM_RECLAIM |WQ_PERCPU , +0 );if (!kc->kcopyd_wq) { r = -ENOMEM ; goto bad_workqueue;
drivers/md/dm-log-userspace-base.c +2 -1
@@ -299,7 +299,8 @@ static int userspace_ctr(struct dm_dirty_log *log, struct dm_target *ti, }if (lc->integrated_flush) { - lc->dmlog_wq =alloc_workqueue ("dmlogd" ,WQ_MEM_RECLAIM ,0 ); + lc->dmlog_wq =alloc_workqueue ("dmlogd" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!lc->dmlog_wq) {DMERR ("couldn't start dmlogd" ); r = -ENOMEM ;
drivers/md/dm-mpath.c +3 -2
@@ -2330,7 +2330,8 @@ static int __init dm_multipath_init(void) {int r = -ENOMEM ; - kmultipathd =alloc_workqueue ("kmpathd" ,WQ_MEM_RECLAIM ,0 ); + kmultipathd =alloc_workqueue ("kmpathd" ,WQ_MEM_RECLAIM |WQ_PERCPU , +0 );if (!kmultipathd) {DMERR ("failed to create workqueue kmpathd" ); goto bad_alloc_kmultipathd;
@@ -2349,7 +2350,7 @@ static int __init dm_multipath_init(void) goto bad_alloc_kmpath_handlerd; } - dm_mpath_wq =alloc_workqueue ("dm_mpath_wq" ,0 ,0 ); + dm_mpath_wq =alloc_workqueue ("dm_mpath_wq" ,WQ_PERCPU ,0 );if (!dm_mpath_wq) {DMERR ("failed to create workqueue dm_mpath_wq" ); goto bad_alloc_dm_mpath_wq;
drivers/md/dm-raid1.c +3 -2
@@ -1128,7 +1128,8 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv) ti->num_discard_bios =1 ; ti->per_io_data_size =sizeof (struct dm_raid1_bio_record ); - ms->kmirrord_wq =alloc_workqueue ("kmirrord" ,WQ_MEM_RECLAIM ,0 ); + ms->kmirrord_wq =alloc_workqueue ("kmirrord" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!ms->kmirrord_wq) {DMERR ("couldn't start kmirrord" ); r = -ENOMEM ;
@@ -1500,7 +1501,7 @@ static int __init dm_mirror_init(void) {int r; - dm_raid1_wq =alloc_workqueue ("dm_raid1_wq" ,0 ,0 ); + dm_raid1_wq =alloc_workqueue ("dm_raid1_wq" ,WQ_PERCPU ,0 );if (!dm_raid1_wq) {DMERR ("Failed to alloc workqueue" );return -ENOMEM ;
drivers/md/dm-snap-persistent.c +2 -1
@@ -871,7 +871,8 @@ static int persistent_ctr(struct dm_exception_store *store, char *options)atomic_set (&ps->pending_count,0 ); ps->callbacks =NULL ; - ps->metadata_wq =alloc_workqueue ("ksnaphd" ,WQ_MEM_RECLAIM ,0 ); + ps->metadata_wq =alloc_workqueue ("ksnaphd" , +WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!ps->metadata_wq) {DMERR ("couldn't start header metadata update thread" ); r = -ENOMEM ;
drivers/md/dm-stripe.c +1 -1
@@ -489,7 +489,7 @@ int __init dm_stripe_init(void) {int r; - dm_stripe_wq =alloc_workqueue ("dm_stripe_wq" ,0 ,0 ); + dm_stripe_wq =alloc_workqueue ("dm_stripe_wq" ,WQ_PERCPU ,0 );if (!dm_stripe_wq)return -ENOMEM ; r =dm_register_target (&stripe_target);
drivers/md/dm-verity-target.c +3 -1
@@ -1549,7 +1549,9 @@ static int verity_ctr(struct dm_target *ti, unsigned int argc, char **argv)* will fall-back to using it for error handling (or if the bufio cache * doesn't have required hashes). */ - v->verify_wq =alloc_workqueue ("kverityd" ,WQ_MEM_RECLAIM |WQ_HIGHPRI ,0 ); + v->verify_wq =alloc_workqueue ("kverityd" , +WQ_MEM_RECLAIM |WQ_HIGHPRI |WQ_PERCPU , +0 );if (!v->verify_wq) { ti->error ="Cannot allocate workqueue" ; r = -ENOMEM ;
drivers/md/dm-writecache.c +2 -1
@@ -2275,7 +2275,8 @@ static int writecache_ctr(struct dm_target *ti, unsigned int argc, char **argv) goto bad; } - wc->writeback_wq =alloc_workqueue ("writecache-writeback" ,WQ_MEM_RECLAIM ,1 ); + wc->writeback_wq =alloc_workqueue ("writecache-writeback" , +WQ_MEM_RECLAIM |WQ_PERCPU ,1 );if (!wc->writeback_wq) { r = -ENOMEM ; ti->error ="Could not allocate writeback workqueue" ;
drivers/md/dm.c +2 -1
@@ -2363,7 +2363,8 @@ static struct mapped_device *alloc_dev(int minor)format_dev_t (md->name,MKDEV (_major, minor)); - md->wq =alloc_workqueue ("kdmflush/%s" ,WQ_MEM_RECLAIM ,0 , md->name); + md->wq =alloc_workqueue ("kdmflush/%s" ,WQ_MEM_RECLAIM |WQ_PERCPU ,0 , + md->name);if (!md->wq) goto bad;
drivers/md/md.c +2 -2
@@ -10345,11 +10345,11 @@ static int __init md_init(void) goto err_bitmap; ret = -ENOMEM ; - md_wq =alloc_workqueue ("md" ,WQ_MEM_RECLAIM ,0 ); + md_wq =alloc_workqueue ("md" ,WQ_MEM_RECLAIM |WQ_PERCPU ,0 );if (!md_wq) goto err_wq; - md_misc_wq =alloc_workqueue ("md_misc" ,0 ,0 ); + md_misc_wq =alloc_workqueue ("md_misc" ,WQ_PERCPU ,0 );if (!md_misc_wq) goto err_misc_wq;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 15/957 md: remove unused static md_wq workqueue
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abd-Alrhman Masalkhi <[email protected]>
[ Upstream commit e4979f4fac4d6bbe757be50441b45e28e6bf7360 ]
The md_wq workqueue is defined as static and initialized in md_init(), but it is not used anywhere within md.c.
All asynchronous and deferred work in this file is handled via md_misc_wq or dedicated md threads.
--- drivers/md/md.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/md/md.c +0 -8
@@ -84,7 +84,6 @@ static DEFINE_XARRAY(md_submodule);static const struct kobj_type md_ktype;static DECLARE_WAIT_QUEUE_HEAD (resync_wait); -static struct workqueue_struct *md_wq;/* * This workqueue is used for sync_work to register new sync_thread, and for
@@ -10345,10 +10344,6 @@ static int __init md_init(void) goto err_bitmap; ret = -ENOMEM ; - md_wq =alloc_workqueue ("md" ,WQ_MEM_RECLAIM |WQ_PERCPU ,0 ); -if (!md_wq) - goto err_wq; - md_misc_wq =alloc_workqueue ("md_misc" ,WQ_PERCPU ,0 );if (!md_misc_wq) goto err_misc_wq;
@@ -10373,8 +10368,6 @@ static int __init md_init(void) err_md:destroy_workqueue (md_misc_wq); err_misc_wq: -destroy_workqueue (md_wq); -err_wq:md_llbitmap_exit (); err_bitmap:md_bitmap_exit ();
@@ -10683,7 +10676,6 @@ static __exit void md_exit(void)spin_unlock (&all_mddevs_lock);destroy_workqueue (md_misc_wq); -destroy_workqueue (md_wq);md_bitmap_exit (); }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 16/957 md: wake raid456 reshape waiters before suspend
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yu Kuai <[email protected]>
[ Upstream commit cf86bb53b9c92354904a328e947a05ffbfdd1840 ]
During raid456 reshape, direct IO across the reshape position can sleep in raid5_make_request() waiting for reshape progress while still holding an active_io reference. If userspace then freezes reshape and writes md/suspend_lo or md/suspend_hi, mddev_suspend() kills active_io and waits for all in-flight IO to drain.
This can deadlock: the IO needs reshape progress to continue, but the reshape thread is already frozen, so the active_io reference is never dropped and suspend never completes.
raid5_prepare_suspend() already wakes wait_for_reshape for dm-raid. Do the same for normal md suspend when reshape is already interrupted, so waiting raid456 IO can abort, drop its reference, and let suspend finish.
The mdadm test tests/25raid456-reshape-deadlock reproduces the hang.
--- drivers/md/md.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/md/md.c +11 -0
@@ -486,6 +486,17 @@ int mddev_suspend(struct mddev *mddev, bool interruptible) }percpu_ref_kill (&mddev->active_io); + +/* +* RAID456 IO can sleep in wait_for_reshape while still holding an +* active_io reference. If reshape is already interrupted or frozen, +* wake those waiters so they can abort and drop the reference instead +* of deadlocking suspend. +*/ +if (mddev->pers && mddev->pers->prepare_suspend && +reshape_interrupted (mddev)) + mddev->pers->prepare_suspend (mddev); +if (interruptible) err =wait_event_interruptible (mddev->sb_wait,percpu_ref_is_zero (&mddev->active_io));
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 17/957 btrfs: fix deadlock between reflink and transaction commit when using flushoncommit
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Filipe Manana <[email protected]>
[ Upstream commit b48c980b6a7e409050bb3067165db31cc6205e3e ]
When using the flushoncommit mount option, we can have a deadlock between a transaction commit and a reflink operation that copied an inline extent to an offset beyond the current i_size of the destination node.
The deadlock happens like this:
1) Task A clones an inline extent from inode X to an offset of inode Y that is beyond Y's current i_size. This means we copied the inline extent's data to a folio of inode Y that is beyond its EOF, using a call to copy_inline_to_page();
2) Task B starts a transaction commit and calls btrfs_start_delalloc_flush() to flush delalloc;
3) The delalloc flushing sees the new dirty folio of inode Y and when it attempts to flush it, it ends up at extent_writepage() and sees that the offset of the folio is beyond the i_size of inode Y, so it attempts to invalidate the folio by calling folio_invalidate(), which ends up at btrfs' folio invalidate callback - btrfs_invalidate_folio(). There it tries to lock the folio's range in inode Y's extent io tree, but it blocks since it's currently locked by task A - during a reflink we lock the inodes and the source and destination ranges after flushing all delalloc and waiting for ordered extent completion - after that we don't expect to have dirty folios in the ranges, the exception is if we have to copy an inline extent's data (because the destination offset is not zero);
4) Task A then attempts to start a transaction to update the inode item, and then it's blocked since the current transaction is in the TRANS_STATE_COMMIT_START state. Therefore task A has to wait for the current transaction to become unblocked (its state >= TRANS_STATE_UNBLOCKED).
So task A is waiting for the transaction commit done by task B, and the later waiting on the extent lock of inode Y that is currently held by task A.
Syzbot recently reported this with the following stack traces:
INFO: task kworker/u8:7:1053 blocked for more than 143 seconds.
Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u8:7 state:D stack:23520 pid:1053 tgid:1053 ppid:2 task_flags:0x4208060 flags:0x00080000
Workqueue: writeback wb_workfn (flush-btrfs-46)
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5298 [inline]
__schedule+0x1553/0x5240 kernel/sched/core.c:6911
__schedule_loop kernel/sched/core.c:6993 [inline]
schedule+0x164/0x360 kernel/sched/core.c:7008
wait_extent_bit fs/btrfs/extent-io-tree.c:811 [inline]
btrfs_lock_extent_bits+0x59c/0x700 fs/btrfs/extent-io-tree.c:1914
btrfs_lock_extent fs/btrfs/extent-io-tree.h:152 [inline]
btrfs_invalidate_folio+0x43d/0xc40 fs/btrfs/inode.c:7704
extent_writepage fs/btrfs/extent_io.c:1852 [inline]
extent_write_cache_pages fs/btrfs/extent_io.c:2580 [inline]
btrfs_writepages+0x12ff/0x2440 fs/btrfs/extent_io.c:2713
do_writepages+0x32e/0x550 mm/page-writeback.c:2554
__writeback_single_inode+0x133/0x11a0 fs/fs-writeback.c:1750
writeback_sb_inodes+0x995/0x19d0 fs/fs-writeback.c:2042
wb_writeback+0x456/0xb70 fs/fs-writeback.c:2227
wb_do_writeback fs/fs-writeback.c:2374 [inline]
wb_workfn+0x41a/0xf60 fs/fs-writeback.c:2414
process_one_work kernel/workqueue.c:3276 [inline]
process_scheduled_works+0xb6e/0x18c0 kernel/workqueue.c:3359
worker_thread+0xa53/0xfc0 kernel/workqueue.c:3440
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
INFO: task syz.4.64:6910 blocked for more than 143 seconds.
Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.4.64 state:D stack:22752 pid:6910 tgid:6905 ppid:5944 task_flags:0x400140 flags:0x00080002
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5298 [inline]
__schedule+0x1553/0x5240 kernel/sched/core.c:6911
__schedule_loop kernel/sched/core.c:6993 [inline]
schedule+0x164/0x360 kernel/sched/core.c:7008
wait_current_trans+0x39f/0x590 fs/btrfs/transaction.c:535
start_transaction+0x6a7/0x1650 fs/btrfs/transaction.c:705
clone_copy_inline_extent fs/btrfs/reflink.c:299 [inline]
btrfs_clone+0x128a/0x24d0 fs/btrfs/reflink.c:529
btrfs_clone_files+0x271/0x3f0 fs/btrfs/reflink.c:750
btrfs_remap_file_range+0x76b/0x1320 fs/btrfs/reflink.c:903
vfs_copy_file_range+0xda7/0x1390 fs/read_write.c:1600
__do_sys_copy_file_range fs/read_write.c:1683 [inline]
__se_sys_copy_file_range+0x2fb/0x480 fs/read_write.c:1650
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5f73afc799
RSP: 002b:00007f5f7315e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000146
RAX: ffffffffffffffda RBX: 00007f5f73d75fa0 RCX: 00007f5f73afc799
RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 00007f5f73b92c99 R08: 0000000000000863 R09: 0000000000000000
R10: 00002000000000c0 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5f73d76038 R14: 00007f5f73d75fa0 R15: 00007fff138a5068
</TASK>
INFO: task syz.4.64:6975 blocked for more than 143 seconds.
Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.4.64 state:D stack:24736 pid:6975 tgid:6905 ppid:5944 task_flags:0x400040 flags:0x00080002
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5298 [inline]
__schedule+0x1553/0x5240 kernel/sched/core.c:6911
__schedule_loop kernel/sched/core.c:6993 [inline]
schedule+0x164/0x360 kernel/sched/core.c:7008
wb_wait_for_completion+0x3e8/0x790 fs/fs-writeback.c:227
__writeback_inodes_sb_nr+0x24c/0x2d0 fs/fs-writeback.c:2838
try_to_writeback_inodes_sb+0x9a/0xc0 fs/fs-writeback.c:2886
btrfs_start_delalloc_flush fs/btrfs/transaction.c:2175 [inline]
btrfs_commit_transaction+0x82e/0x31a0 fs/btrfs/transaction.c:2364
btrfs_ioctl+0xca7/0xd00 fs/btrfs/ioctl.c:5206
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl+0xff/0x170 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5f73afc799
RSP: 002b:00007f5f7313d028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f5f73d76090 RCX: 00007f5f73afc799
RDX: 0000000000000000 RSI: 0000000000009408 RDI: 0000000000000004
RBP: 00007f5f73b92c99 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5f73d76128 R14: 00007f5f73d76090 R15: 00007fff138a5068
</TASK>Fix this by updating the i_size of the destination inode of a reflink operation after we copy an inline extent's data to an offset beyond the i_size and before attempting to start a transaction to update the inode's item.
--- fs/btrfs/reflink.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+)
fs/btrfs/reflink.c +45 -0
@@ -321,6 +321,51 @@ static int clone_copy_inline_extent(struct btrfs_inode *inode, ret =copy_inline_to_page (inode, new_key->offset, inline_data, size, datal, comp_type); + +/* +* If we copied the inline extent data to a page/folio beyond the i_size +* of the destination inode, then we need to increase the i_size before +* we start a transaction to update the inode item. This is to prevent a +* deadlock when the flushoncommit mount option is used, which happens +* like this: +* +* 1) Task A clones an inline extent from inode X to an offset of inode +* Y that is beyond Y's current i_size. This means we copied the +* inline extent's data to a folio of inode Y that is beyond its EOF, +* using the call above to copy_inline_to_page(); +* +* 2) Task B starts a transaction commit and calls +* btrfs_start_delalloc_flush() to flush delalloc; +* +* 3) The delalloc flushing sees the new dirty folio of inode Y and when +* it attempts to flush it, it ends up at extent_writepage() and sees +* that the offset of the folio is beyond the i_size of inode Y, so +* it attempts to invalidate the folio by calling folio_invalidate(), +* which ends up at btrfs' folio invalidate callback - +* btrfs_invalidate_folio(). There it tries to lock the folio's range +* in inode Y's extent io tree, but it blocks since it's currently +* locked by task A - during reflink we lock the inodes and the +* source and destination ranges after flushing all delalloc and +* waiting for ordered extent completion - after that we don't expect +* to have dirty folios in the ranges, the exception is if we have to +* copy an inline extent's data (because the destination offset is +* not zero); +* +* 4) Task A then does the 'goto out' below and attempts to start a +* transaction to update the inode item, and then it's blocked since +* the current transaction is in the TRANS_STATE_COMMIT_START state. +* Therefore task A has to wait for the current transaction to become +* unblocked (its state >= TRANS_STATE_UNBLOCKED). +* +* This leads to a deadlock - the task committing the transaction +* waiting for the delalloc flushing which is blocked during folio +* invalidation on the inode's extent lock and the reflink task waiting +* for the current transaction to be unblocked so that it can start a +* a new one to update the inode item (while holding the extent lock). +*/ +if (ret ==0 && new_key->offset + datal >i_size_read (&inode->vfs_inode)) +i_size_write (&inode->vfs_inode, new_key->offset + datal); + goto out; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 18/957 OPP: debugfs: Use performance level if available to distinguish between rates
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manivannan Sadhasivam <[email protected]>
[ Upstream commit e560083c0467f86b72aecac377b27bd1e7d16c49 ]
Some OPP tables have entries with same rate and different performance level. For these entries, using only the rate as the debugfs directory name causes below error:
debugfs: 'opp:5000000' already exists in '[email protected]'
Fix it by appending the performance level to the dir name if available.
--- drivers/opp/debugfs.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)
drivers/opp/debugfs.c +11 -9
@@ -130,22 +130,24 @@ void opp_debug_create_one(struct dev_pm_opp *opp, struct opp_table *opp_table) {struct dentry *pdentry = opp_table->dentry;struct dentry *d; -unsigned long id; -char name[25 ];/* 20 chars for 64 bit value + 5 (opp:\0) */ +char name[36 ];/* "opp:"(4) + u64(20) + "-" (1) + u32(10) + NULL(1) */ /* * Get directory name for OPP. * -* - Normally rate is unique to each OPP, use it to get unique opp-name. +* - Normally rate is unique to each OPP, use it to get unique opp-name, +* together with performance level if available. * - For some devices rate isn't available or there are multiple, use * index instead for them. */ -if (likely (opp_table->clk_count ==1 && opp->rates[0 ])) - id = opp->rates[0 ]; -else - id =_get_opp_count (opp_table); - -snprintf (name,sizeof (name),"opp:%lu" , id); +if (likely (opp_table->clk_count ==1 && opp->rates[0 ])) { +if (opp->level ==OPP_LEVEL_UNSET ) +snprintf (name,sizeof (name),"opp:%lu" , opp->rates[0 ]); +else +snprintf (name,sizeof (name),"opp:%lu-%u" , opp->rates[0 ], opp->level); + }else { +snprintf (name,sizeof (name),"opp:%u" ,_get_opp_count (opp_table)); + }/* Create per-opp directory */ d =debugfs_create_dir (name, pdentry);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 19/957 OPP: Move break out of scoped_guard in dev_pm_opp_xlate_required_opp()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Viresh Kumar <[email protected]>
[ Upstream commit 3d2398f44a2d48fb1c575a6e0bc6b38f3e689e22 ]
The commit ff9c512041f2 ("OPP: Use mutex locking guards") unintentionally made the for loop run longer than required.
scoped_guard() is implemented as a for loop. The break statement now breaks out out the scoped_guard() and not out of the outer for loop. The outer loop always iterates to completion.
Fix it.
--- drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/opp/core.c +1 -1
@@ -2741,8 +2741,8 @@ struct dev_pm_opp *dev_pm_opp_xlate_required_opp(struct opp_table *src_table,break ; } } -break ; } +break ; }if (IS_ERR (dest_opp)) {
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 2/957 fs/omfs: reject s_sys_blocksize smaller than OMFS_DIR_START
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: HyungJung Joo <[email protected]>
[ Upstream commit 0621c385fda1376e967f37ccd534c26c3e511d14 ]
omfs_fill_super() rejects oversized s_sys_blocksize values (> PAGE_SIZE), but it does not reject values smaller than OMFS_DIR_START (0x1b8 = 440).
Later, omfs_make_empty() uses
sbi->s_sys_blocksize - OMFS_DIR_START
as the length argument to memset(). Since s_sys_blocksize is u32, a crafted filesystem image with s_sys_blocksize < OMFS_DIR_START causes an unsigned underflow there, wrapping to a value near 2^32. That drives a ~4 GiB memset() from bh->b_data + OMFS_DIR_START and overwrites kernel memory far beyond the backing block buffer.
Add the corresponding lower-bound check alongside the existing upper-bound check in omfs_fill_super(), so that malformed images are rejected during superblock validation before any filesystem data is processed.
--- fs/omfs/inode.c | 6 ++++++ 1 file changed, 6 insertions(+)
fs/omfs/inode.c +6 -0
@@ -512,6 +512,12 @@ static int omfs_fill_super(struct super_block *sb, struct fs_context *fc) goto out_brelse_bh; } +if (sbi->s_sys_blocksize <OMFS_DIR_START ) { +printk (KERN_ERR "omfs: sysblock size (%d) is too small\n" , + sbi->s_sys_blocksize); + goto out_brelse_bh; + } +if (sbi->s_blocksize < sbi->s_sys_blocksize || sbi->s_blocksize >OMFS_MAX_BLOCK_SIZE ) { printk(KERN_ERR "omfs: block size (%d) is out of range\n",
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 20/957 ACPI: x86: cmos_rtc: Clean up address space handler driver
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <[email protected]>
[ Upstream commit ba0b236736dde4059bdcb8e99beaa50d6e5b6e7e ]
Make multiple changes that do not alter functionality to the CMOS RTC ACPI address space handler driver, including the following:
- Drop the unused .detach() callback from cmos_rtc_handler.
- Rename acpi_cmos_rtc_attach_handler() to acpi_cmos_rtc_attach().
- Rearrange acpi_cmos_rtc_space_handler() to reduce the number of redundant checks and make white space follow the coding style.
- Adjust an error message in acpi_install_cmos_rtc_space_handler() and make the white space follow the coding style.
- Rearrange acpi_remove_cmos_rtc_space_handler() and adjust an error message in it.
No intentional functional impact.
Stable-dep-of: 6cee29ad9d7e ("ACPI: x86: cmos_rtc: Improve coordination with ACPI TAD driver")
--- drivers/acpi/x86/cmos_rtc.c | 61 +++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 29 deletions(-)
drivers/acpi/x86/cmos_rtc.c +32 -29
@@ -24,31 +24,35 @@ static const struct acpi_device_id acpi_cmos_rtc_ids[] = { {} }; -static acpi_status -acpi_cmos_rtc_space_handler (u32 function,acpi_physical_address address, -u32 bits,u64 *value64, -void *handler_context,void *region_context) +static acpi_status acpi_cmos_rtc_space_handler (u32 function, +acpi_physical_address address, +u32 bits,u64 *value64, +void *handler_context, +void *region_context) { -int i; +unsigned int i, bytes =DIV_ROUND_UP (bits,8 );u8 *value = (u8 *)value64;if (address >0xff || !value64)return AE_BAD_PARAMETER ; -if (function !=ACPI_WRITE && function !=ACPI_READ ) -return AE_BAD_PARAMETER ; +guard (spinlock_irq)(&rtc_lock); + +if (function ==ACPI_WRITE ) { +for (i =0 ; i < bytes; i++, address++, value++) +CMOS_WRITE (*value, address); -spin_lock_irq (&rtc_lock); +return AE_OK ; + } -for (i =0 ; i <DIV_ROUND_UP (bits,8 ); ++i, ++address, ++value) -if (function ==ACPI_READ ) +if (function ==ACPI_READ ) { +for (i =0 ; i < bytes; i++, address++, value++) *value =CMOS_READ (address); -else -CMOS_WRITE (*value, address); -spin_unlock_irq (&rtc_lock); +return AE_OK ; + } -return AE_OK ; +return AE_BAD_PARAMETER ; }int acpi_install_cmos_rtc_space_handler (acpi_handle handle)
@@ -56,11 +60,11 @@ int acpi_install_cmos_rtc_space_handler(acpi_handle handle)acpi_status status; status =acpi_install_address_space_handler (handle, -ACPI_ADR_SPACE_CMOS , - &acpi_cmos_rtc_space_handler, -NULL ,NULL ); +ACPI_ADR_SPACE_CMOS , + acpi_cmos_rtc_space_handler, +NULL ,NULL );if (ACPI_FAILURE (status)) { -pr_err ("Error installing CMOS-RTC region handler\n" ); +pr_err ("Failed to install CMOS-RTC address space handler\n" );return -ENODEV ; }
@@ -70,26 +74,25 @@ EXPORT_SYMBOL_GPL(acpi_install_cmos_rtc_space_handler);void acpi_remove_cmos_rtc_space_handler (acpi_handle handle) { -if (ACPI_FAILURE (acpi_remove_address_space_handler (handle, -ACPI_ADR_SPACE_CMOS , &acpi_cmos_rtc_space_handler))) -pr_err ("Error removing CMOS-RTC region handler\n" ); +acpi_status status; + + status =acpi_remove_address_space_handler (handle, +ACPI_ADR_SPACE_CMOS , + acpi_cmos_rtc_space_handler); +if (ACPI_FAILURE (status)) +pr_err ("Failed to remove CMOS-RTC address space handler\n" ); }EXPORT_SYMBOL_GPL (acpi_remove_cmos_rtc_space_handler); -static int acpi_cmos_rtc_attach_handler (struct acpi_device *adev,const struct acpi_device_id *id) +static int acpi_cmos_rtc_attach (struct acpi_device *adev, +const struct acpi_device_id *id) {return acpi_install_cmos_rtc_space_handler (adev->handle); } -static void acpi_cmos_rtc_detach_handler (struct acpi_device *adev) -{ -acpi_remove_cmos_rtc_space_handler (adev->handle); -} -static struct acpi_scan_handler cmos_rtc_handler = { .ids = acpi_cmos_rtc_ids, - .attach = acpi_cmos_rtc_attach_handler, - .detach = acpi_cmos_rtc_detach_handler, + .attach = acpi_cmos_rtc_attach, };void __init acpi_cmos_rtc_init (void )
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 21/957 ACPI: x86: cmos_rtc: Improve coordination with ACPI TAD driver
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <[email protected]>
[ Upstream commit 6cee29ad9d7e400d39ae0b1a54447fedcb62eecd ]
If a CMOS RTC (PNP0B00/PNP0B01/PNP0B02) device coexists with an ACPI TAD (timer and event alarm device, ACPI000E), the ACPI TAD driver will attempt to install the CMOS RTC address space hanlder that has been installed already and the TAD probing will fail.
Avoid that by changing acpi_install_cmos_rtc_space_handler() to return zero and acpi_remove_cmos_rtc_space_handler() to do nothing if the CMOS RTC address space handler has been installed already.
--- drivers/acpi/x86/cmos_rtc.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
drivers/acpi/x86/cmos_rtc.c +17 -1
@@ -24,6 +24,8 @@ static const struct acpi_device_id acpi_cmos_rtc_ids[] = { {} }; +static bool cmos_rtc_space_handler_present__read_mostly ; + static acpi_status acpi_cmos_rtc_space_handler(u32 function, acpi_physical_address address, u32 bits, u64 *value64,
@@ -59,6 +61,9 @@ int acpi_install_cmos_rtc_space_handler(acpi_handle handle) {acpi_status status; +if (cmos_rtc_space_handler_present) +return 0 ; + status = acpi_install_address_space_handler(handle, ACPI_ADR_SPACE_CMOS, acpi_cmos_rtc_space_handler,
@@ -68,6 +73,8 @@ int acpi_install_cmos_rtc_space_handler(acpi_handle handle)return -ENODEV ; } + cmos_rtc_space_handler_present = true; +return 1 ; }EXPORT_SYMBOL_GPL (acpi_install_cmos_rtc_space_handler);
@@ -76,6 +83,9 @@ void acpi_remove_cmos_rtc_space_handler(acpi_handle handle) {acpi_status status; +if (cmos_rtc_space_handler_present) +return ; + status =acpi_remove_address_space_handler (handle,ACPI_ADR_SPACE_CMOS , acpi_cmos_rtc_space_handler);
@@ -87,7 +97,13 @@ EXPORT_SYMBOL_GPL(acpi_remove_cmos_rtc_space_handler);static int acpi_cmos_rtc_attach (struct acpi_device *adev,const struct acpi_device_id *id) { -return acpi_install_cmos_rtc_space_handler (adev->handle); +int ret; + + ret =acpi_install_cmos_rtc_space_handler (adev->handle); +if (ret <0 ) +return ret; + +return 1 ; }static struct acpi_scan_handler cmos_rtc_handler = {
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 22/957 devres: fix missing node debug info in devm_krealloc()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Danilo Krummrich <[email protected]>
[ Upstream commit f813ec9e84b4d0ca81ec1da94ab07bfb4a29266c ]
Fix missing call to set_node_dbginfo() for new devres nodes created by devm_krealloc().
--- drivers/base/devres.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/base/devres.c +2 -0
@@ -940,6 +940,8 @@ void *devm_krealloc(struct device *dev, void *ptr, size_t new_size, gfp_t gfp)if (!new_dr)return NULL ; +set_node_dbginfo (&new_dr->node,"devm_krealloc_release" , new_size); +/* * The spinlock protects the linked list against concurrent * modifications but not the resource itself.
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 23/957 thermal/drivers/spear: Fix error condition for reading st,thermal-flags
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gopi Krishna Menon <[email protected]>
[ Upstream commit da2c4f332a0504d9c284e7626a561d343c8d6f57 ]
of_property_read_u32 returns 0 on success. The current check returns -EINVAL if the property is read successfully.
Fix the check by removing ! from of_property_read_u32
--- drivers/thermal/spear_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/spear_thermal.c +1 -1
@@ -93,7 +93,7 @@ static int spear_thermal_probe(struct platform_device *pdev)struct device_node *np = pdev->dev.of_node;int ret =0 , val; -if (!np || !of_property_read_u32 (np,"st,thermal-flags" , &val)) { +if (!np ||of_property_read_u32 (np,"st,thermal-flags" , &val)) {dev_err (&pdev->dev,"Failed: DT Pdata not passed\n" );return -EINVAL ; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 24/957 debugfs: check for NULL pointer in debugfs_create_str()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gui-Dong Han <[email protected]>
[ Upstream commit 31de83980d3764d784f79ff1bc93c42b324f4013 ]
Passing a NULL pointer to debugfs_create_str() leads to a NULL pointer dereference when the debugfs file is read. Following upstream discussions, forbid the creation of debugfs string files with NULL pointers. Add a WARN_ON() to expose offending callers and return early.
--- fs/debugfs/file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
fs/debugfs/file.c +4 -1
@@ -1127,7 +1127,7 @@ static const struct file_operations fops_str_wo = {* directory dentry if set. If this parameter is %NULL, then the * file will be created in the root of the debugfs filesystem. * @value: a pointer to the variable that the file should read to and write -* from. +* from. This pointer and the string it points to must not be %NULL. * * This function creates a file in debugfs with the given name that * contains the value of the variable @value. If the @mode variable is so
@@ -1136,6 +1136,9 @@ static const struct file_operations fops_str_wo = {void debugfs_create_str (const char *name,umode_t mode,struct dentry *parent,char **value) { +if (WARN_ON (!value || !*value)) +return ; +debugfs_create_mode_unsafe (name, mode, parent, value, &fops_str, &fops_str_ro, &fops_str_wo); }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 25/957 debugfs: fix placement of EXPORT_SYMBOL_GPL for debugfs_create_str()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gui-Dong Han <[email protected]>
[ Upstream commit 4afc929c0f74c4f22b055a82b371d50586da58ca ]
The EXPORT_SYMBOL_GPL() for debugfs_create_str was placed incorrectly away from the function definition. Move it immediately below the debugfs_create_str() function where it belongs.
--- fs/debugfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/debugfs/file.c +1 -1
@@ -1047,7 +1047,6 @@ ssize_t debugfs_read_file_str(struct file *file, char __user *user_buf,return ret; } -EXPORT_SYMBOL_GPL (debugfs_create_str);static ssize_t debugfs_write_file_str (struct file *file,const char __user *user_buf,size_t count,loff_t *ppos)
@@ -1142,6 +1141,7 @@ void debugfs_create_str(const char *name, umode_t mode,debugfs_create_mode_unsafe (name, mode, parent, value, &fops_str, &fops_str_ro, &fops_str_wo); } +EXPORT_SYMBOL_GPL (debugfs_create_str);static ssize_t read_file_blob (struct file *file,char __user *user_buf,size_t count,loff_t *ppos)
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 26/957 soundwire: debugfs: initialize firmware_file to empty string
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gui-Dong Han <[email protected]>
[ Upstream commit 7215e4552f31e53595eae56a834f7e286beecccc ]
Passing NULL to debugfs_create_str() causes a NULL pointer dereference, and creating debugfs nodes with NULL string pointers is no longer permitted.
Additionally, firmware_file is a global pointer. Previously, adding every new slave blindly overwrote it with NULL.
Fix these issues by initializing firmware_file to an allocated empty string once in the subsystem init path (sdw_debugfs_init), and freeing it in the exit path. Existing driver code handles empty strings correctly.
--- drivers/soundwire/debugfs.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/soundwire/debugfs.c +7 -2
@@ -350,8 +350,8 @@ void sdw_slave_debugfs_init(struct sdw_slave *slave)debugfs_create_file ("go" ,0200 , d, slave, &cmd_go_fops);debugfs_create_file ("read_buffer" ,0400 , d, slave, &read_buffer_fops); - firmware_file =NULL ; -debugfs_create_str ("firmware_file" ,0200 , d, &firmware_file); +if (firmware_file) +debugfs_create_str ("firmware_file" ,0200 , d, &firmware_file); slave->debugfs = d; }
@@ -363,10 +363,15 @@ void sdw_slave_debugfs_exit(struct sdw_slave *slave)void sdw_debugfs_init (void ) { +if (!firmware_file) + firmware_file =kstrdup ("" ,GFP_KERNEL ); + sdw_debugfs_root =debugfs_create_dir ("soundwire" ,NULL ); }void sdw_debugfs_exit (void ) {debugfs_remove_recursive (sdw_debugfs_root); +kfree (firmware_file); + firmware_file =NULL ; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 27/957 amd-pstate: Fix memory leak in amd_pstate_epp_cpu_init()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gautham R. Shenoy <[email protected]>
[ Upstream commit beda3b363546a423e4e29a7395e04c0ac4ff677e ]
On failure to set the epp, the function amd_pstate_epp_cpu_init() returns with an error code without freeing the cpudata object that was allocated at the beginning of the function.
Ensure that the cpudata object is freed before returning from the function.
This memory leak was discovered by Claude Opus 4.6 with the aid of Chris Mason's AI review-prompts
(https://github.com/masoncl/review-prompts/tree/main/kernel).
--- drivers/cpufreq/amd-pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/amd-pstate.c +1 -1
@@ -1525,7 +1525,7 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy) ret =amd_pstate_set_epp (policy, cpudata->epp_default);if (ret) -return ret; + goto free_cpudata1; current_pstate_driver->adjust_perf =NULL ;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 28/957 amd-pstate: Update cppc_req_cached in fast_switch case
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gautham R. Shenoy <[email protected]>
[ Upstream commit fcc25a291fbdca2c06c2c6602532050873f0c9de ]
The function msr_update_perf() does not cache the new value that is written to MSR_AMD_CPPC_REQ into the variable cpudata->cppc_req_cached when the update is happening from the fast path.
Fix that by caching the value everytime the MSR_AMD_CPPC_REQ gets updated.
This issue was discovered by Claude Opus 4.6 with the aid of Chris Mason's AI review-prompts
(https://github.com/masoncl/review-prompts/tree/main/kernel).
--- drivers/cpufreq/amd-pstate.c | 1 - 1 file changed, 1 deletion(-)
drivers/cpufreq/amd-pstate.c +0 -1
@@ -259,7 +259,6 @@ static int msr_update_perf(struct cpufreq_policy *policy, u8 min_perf,if (fast_switch) {wrmsrq (MSR_AMD_CPPC_REQ , value); -return 0 ; }else {int ret =wrmsrq_on_cpu (cpudata->cpu,MSR_AMD_CPPC_REQ , value);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 29/957 cpufreq: Pass the policy to cpufreq_driver->adjust_perf()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: K Prateek Nayak <[email protected]>
[ Upstream commit c03791085adcd61fa9b766ab303c7d0941d7378d ]
cpufreq_cpu_get() can sleep on PREEMPT_RT in presence of concurrent writer(s), however amd-pstate depends on fetching the cpudata via the policy's driver data which necessitates grabbing the reference.
Since schedutil governor can call "cpufreq_driver->update_perf()" during sched_tick/enqueue/dequeue with rq_lock held and IRQs disabled, fetching the policy object using the cpufreq_cpu_get() helper in the scheduler fast-path leads to "BUG: scheduling while atomic" on PREEMPT_RT [1].
Pass the cached cpufreq policy object in sg_policy to the update_perf() instead of just the CPU. The CPU can be inferred using "policy->cpu".
The lifetime of cpufreq_policy object outlasts that of the governor and the cpufreq driver (allocated when the CPU is onlined and only reclaimed when the CPU is offlined / the CPU device is removed) which makes it safe to be referenced throughout the governor's lifetime.
--- drivers/cpufreq/amd-pstate.c | 3 +-- drivers/cpufreq/cpufreq.c | 6 +++--- drivers/cpufreq/intel_pstate.c | 4 ++-- include/linux/cpufreq.h | 4 ++-- kernel/sched/cpufreq_schedutil.c | 5 +++-- rust/kernel/cpufreq.rs | 13 ++++++------- 6 files changed, 17 insertions(+), 18 deletions(-)
drivers/cpufreq/amd-pstate.c +1 -2
@@ -697,13 +697,12 @@ static unsigned int amd_pstate_fast_switch(struct cpufreq_policy *policy,return policy->cur; } -static void amd_pstate_adjust_perf (unsigned int cpu, +static void amd_pstate_adjust_perf (struct cpufreq_policy *policy,unsigned long _min_perf,unsigned long target_perf,unsigned long capacity) {u8 max_perf, min_perf, des_perf, cap_perf; - struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpu);struct amd_cpudata *cpudata;union perf_cached perf;
drivers/cpufreq/cpufreq.c +3 -3
@@ -2222,7 +2222,7 @@ EXPORT_SYMBOL_GPL(cpufreq_driver_fast_switch);/** * cpufreq_driver_adjust_perf - Adjust CPU performance level in one go. -* @cpu: Target CPU. +* @policy: cpufreq policy object of the target CPU. * @min_perf: Minimum (required) performance level (units of @capacity). * @target_perf: Target (desired) performance level (units of @capacity). * @capacity: Capacity of the target CPU.
@@ -2241,12 +2241,12 @@ EXPORT_SYMBOL_GPL(cpufreq_driver_fast_switch);* parallel with either ->target() or ->target_index() or ->fast_switch() for * the same CPU. */ -void cpufreq_driver_adjust_perf (unsigned int cpu, +void cpufreq_driver_adjust_perf (struct cpufreq_policy *policy,unsigned long min_perf,unsigned long target_perf,unsigned long capacity) { - cpufreq_driver->adjust_perf (cpu, min_perf, target_perf, capacity); + cpufreq_driver->adjust_perf (policy, min_perf, target_perf, capacity); }/**
drivers/cpufreq/intel_pstate.c +2 -2
@@ -3270,12 +3270,12 @@ static unsigned int intel_cpufreq_fast_switch(struct cpufreq_policy *policy,return target_pstate * cpu->pstate.scaling; } -static void intel_cpufreq_adjust_perf (unsigned int cpunum, +static void intel_cpufreq_adjust_perf (struct cpufreq_policy *policy,unsigned long min_perf,unsigned long target_perf,unsigned long capacity) { -struct cpudata *cpu = all_cpu_data[cpunum]; +struct cpudata *cpu = all_cpu_data[policy->cpu];u64 hwp_cap =READ_ONCE (cpu->hwp_cap_cached);int old_pstate = cpu->pstate.current_pstate;int cap_pstate, min_pstate, max_pstate, target_pstate;
include/linux/cpufreq.h +2 -2
@@ -367,7 +367,7 @@ struct cpufreq_driver {* conditions) scale invariance can be disabled, which causes the * schedutil governor to fall back to the latter. */ -void (*adjust_perf)(unsigned int cpu, +void (*adjust_perf)(struct cpufreq_policy *policy,unsigned long min_perf,unsigned long target_perf,unsigned long capacity);
@@ -612,7 +612,7 @@ struct cpufreq_governor {/* Pass a target to the cpufreq driver */ unsigned int cpufreq_driver_fast_switch (struct cpufreq_policy *policy,unsigned int target_freq); -void cpufreq_driver_adjust_perf (unsigned int cpu, +void cpufreq_driver_adjust_perf (struct cpufreq_policy *policy,unsigned long min_perf,unsigned long target_perf,unsigned long capacity);
kernel/sched/cpufreq_schedutil.c +3 -2
@@ -461,6 +461,7 @@ static void sugov_update_single_perf(struct update_util_data *hook, u64 time, unsigned int flags) { struct sugov_cpu *sg_cpu = container_of(hook, struct sugov_cpu, update_util); +struct sugov_policy *sg_policy = sg_cpu->sg_policy;unsigned long prev_util = sg_cpu->util;unsigned long max_cap;
@@ -482,10 +483,10 @@ static void sugov_update_single_perf(struct update_util_data *hook, u64 time,if (sugov_hold_freq (sg_cpu) && sg_cpu->util < prev_util) sg_cpu->util = prev_util; -cpufreq_driver_adjust_perf (sg_cpu->cpu, sg_cpu->bw_min, +cpufreq_driver_adjust_perf (sg_policy->policy, sg_cpu->bw_min, sg_cpu->util, max_cap); - sg_cpu->sg_policy->last_freq_update_time = time; + sg_policy->last_freq_update_time = time; }static unsigned int sugov_next_freq_shared (struct sugov_cpu *sg_cpu,u64 time)
rust/kernel/cpufreq.rs +6 -7
@@ -1257,18 +1257,17 @@ impl<T: Driver> Registration<T> {/// # Safety /// /// - This function may only be called from the cpufreq C infrastructure. +/// - The pointer arguments must be valid pointers. unsafe extern "C" fn adjust_perf_callback ( - cpu:c_uint , + ptr: *mut bindings::cpufreq_policy , min_perf:c_ulong , target_perf:c_ulong , capacity:c_ulong , ) { -// SAFETY: The C API guarantees that `cpu` refers to a valid CPU number. -let cpu_id =unsafe {CpuId ::from_u32_unchecked (cpu) }; - -if let Ok (mut policy) =PolicyCpu ::from_cpu (cpu_id) { -T ::adjust_perf (&mut policy, min_perf, target_perf, capacity); - } +// SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the +// lifetime of `policy`. +let policy =unsafe {Policy ::from_raw_mut (ptr) }; +T ::adjust_perf (policy, min_perf, target_perf, capacity); }/// Driver's `get_intermediate` callback.
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 3/957 fs/mbcache: cancel shrink work before destroying the cache
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: HyungJung Joo <[email protected]>
[ Upstream commit d227786ab1119669df4dc333a61510c52047cce4 ]
mb_cache_destroy() calls shrinker_free() and then frees all cache entries and the cache itself, but it does not cancel the pending c_shrink_work work item first.
If mb_cache_entry_create() schedules c_shrink_work via schedule_work() and the work item is still pending or running when mb_cache_destroy() runs, mb_cache_shrink_worker() will access the cache after its memory has been freed, causing a use-after-free.
This is only reachable by a privileged user (root or CAP_SYS_ADMIN) who can trigger the last put of a mounted ext2/ext4/ocfs2 filesystem.
Cancel the work item with cancel_work_sync() before calling shrinker_free(), ensuring the worker has finished and will not be rescheduled before the cache is torn down.
--- fs/mbcache.c | 1 + 1 file changed, 1 insertion(+)
fs/mbcache.c +1 -0
@@ -408,6 +408,7 @@ void mb_cache_destroy(struct mb_cache *cache) {struct mb_cache_entry *entry, *next; +cancel_work_sync (&cache->c_shrink_work);shrinker_free (cache->c_shrink);/*
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 30/957 PCI: use generic driver_override infrastructure
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Danilo Krummrich <[email protected]>
[ Upstream commit 10a4206a24013be4d558d476010cbf2eb4c9fa64 ]
When a driver is probed through __driver_attach(), the bus' match() callback is called without the device lock held, thus accessing the driver_override field without a lock, which can cause a UAF.
Fix this by using the driver-core driver_override infrastructure taking care of proper locking internally.
Note that calling match() from __driver_attach() without the device lock held is intentional. [1]
--- drivers/pci/pci-driver.c | 11 +++++++---- drivers/pci/pci-sysfs.c | 28 ---------------------------- drivers/pci/probe.c | 1 - drivers/vfio/pci/vfio_pci_core.c | 5 ++--- drivers/xen/xen-pciback/pci_stub.c | 6 ++++-- include/linux/pci.h | 6 ------ 6 files changed, 13 insertions(+), 44 deletions(-)
drivers/pci/pci-driver.c +7 -4
@@ -138,9 +138,11 @@ static const struct pci_device_id *pci_match_device(struct pci_driver *drv, {struct pci_dynid *dynid;const struct pci_device_id *found_id =NULL , *ids; +int ret;/* When driver_override is set, only bind to the matching driver */ -if (dev->driver_override &&strcmp (dev->driver_override, drv->name)) + ret =device_match_driver_override (&dev->dev, &drv->driver); +if (ret ==0 )return NULL ;/* Look at the dynamic ids first, before the static ones */
@@ -164,7 +166,7 @@ static const struct pci_device_id *pci_match_device(struct pci_driver *drv,* matching. */ if (found_id->override_only) { -if (dev->driver_override) +if (ret >0 )return found_id; }else {return found_id;
@@ -172,7 +174,7 @@ static const struct pci_device_id *pci_match_device(struct pci_driver *drv, }/* driver_override will always match, send a dummy id */ -if (dev->driver_override) +if (ret >0 )return &pci_device_id_any;return NULL ; }
@@ -423,7 +425,7 @@ static int __pci_device_probe(struct pci_driver *drv, struct pci_dev *pci_dev)static inline bool pci_device_can_probe (struct pci_dev *pdev) {return (!pdev->is_virtfn || pdev->physfn->sriov->drivers_autoprobe || - pdev->driver_override); +device_has_driver_override (&pdev->dev)); }#else static inline bool pci_device_can_probe (struct pci_dev *pdev)
@@ -1695,6 +1697,7 @@ static const struct cpumask *pci_device_irq_get_affinity(struct device *dev,const struct bus_type pci_bus_type = { .name ="pci" , + .driver_override = true, .match = pci_bus_match, .uevent = pci_uevent, .probe = pci_device_probe,
drivers/pci/pci-sysfs.c +0 -28
@@ -615,33 +615,6 @@ static ssize_t devspec_show(struct device *dev,static DEVICE_ATTR_RO (devspec);#endif -static ssize_t driver_override_store (struct device *dev, -struct device_attribute *attr, -const char *buf,size_t count) -{ -struct pci_dev *pdev =to_pci_dev (dev); -int ret; - - ret =driver_set_override (dev, &pdev->driver_override, buf, count); -if (ret) -return ret; - -return count; -} - -static ssize_t driver_override_show (struct device *dev, -struct device_attribute *attr,char *buf) -{ -struct pci_dev *pdev =to_pci_dev (dev); -ssize_t len; - -device_lock (dev); - len =sysfs_emit (buf,"%s\n" , pdev->driver_override); -device_unlock (dev); -return len; -} -static DEVICE_ATTR_RW (driver_override); -static struct attribute *pci_dev_attrs[] = { &dev_attr_power_state.attr, &dev_attr_resource.attr,
@@ -669,7 +642,6 @@ static struct attribute *pci_dev_attrs[] = {#ifdef CONFIG_OF &dev_attr_devspec.attr, #endif - &dev_attr_driver_override.attr, &dev_attr_ari_enabled.attr, NULL, };
drivers/pci/probe.c +0 -1
@@ -2449,7 +2449,6 @@ static void pci_release_dev(struct device *dev)pci_release_of_node (pci_dev);pcibios_release_device (pci_dev);pci_bus_put (pci_dev->bus); -kfree (pci_dev->driver_override);bitmap_free (pci_dev->dma_alias_mask);dev_dbg (dev,"device released\n" );kfree (pci_dev);
drivers/vfio/pci/vfio_pci_core.c +2 -3
@@ -2013,9 +2013,8 @@ static int vfio_pci_bus_notifier(struct notifier_block *nb, pdev->is_virtfn && physfn == vdev->pdev) {pci_info (vdev->pdev,"Captured SR-IOV VF %s driver_override\n" ,pci_name (pdev)); - pdev->driver_override =kasprintf (GFP_KERNEL ,"%s" , - vdev->vdev.ops->name); -WARN_ON (!pdev->driver_override); +WARN_ON (device_set_driver_override (&pdev->dev, + vdev->vdev.ops->name)); } else if (action == BUS_NOTIFY_BOUND_DRIVER && pdev->is_virtfn && physfn == vdev->pdev) {struct pci_driver *drv =pci_dev_driver (pdev);
drivers/xen/xen-pciback/pci_stub.c +4 -2
@@ -598,6 +598,8 @@ static int pcistub_seize(struct pci_dev *dev,return err; } +static struct pci_driver xen_pcibk_pci_driver; +/* Called when 'bind'. This means we must _NOT_ call pci_reset_function or * other functions that take the sysfs lock. */ static int pcistub_probe (struct pci_dev *dev,const struct pci_device_id *id)
@@ -609,8 +611,8 @@ static int pcistub_probe(struct pci_dev *dev, const struct pci_device_id *id) match =pcistub_match (dev); -if ((dev->driver_override && - !strcmp (dev->driver_override,PCISTUB_DRIVER_NAME )) || +if (device_match_driver_override (&dev->dev, + &xen_pcibk_pci_driver.driver) >0 || match) { if (dev->hdr_type != PCI_HEADER_TYPE_NORMAL
include/linux/pci.h +0 -6
@@ -547,12 +547,6 @@ struct pci_dev {u8 supported_speeds;/* Supported Link Speeds Vector */ phys_addr_t rom;/* Physical address if not from BAR */ size_t romlen;/* Length if not from BAR */ -/* -* Driver name to force a match. Do not set directly, because core -* frees it. Use driver_set_override() to set or clear it. -*/ -const char *driver_override; -unsigned long priv_flags;/* Private flags for the PCI driver */ /* These methods index pci_reset_fn_methods[] */
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 31/957 platform/wmi: use generic driver_override infrastructure
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Danilo Krummrich <[email protected]>
[ Upstream commit 8a700b1fc94df4d847a04f14ebc7f8532592b367 ]
When a driver is probed through __driver_attach(), the bus' match() callback is called without the device lock held, thus accessing the driver_override field without a lock, which can cause a UAF.
Fix this by using the driver-core driver_override infrastructure taking care of proper locking internally.
Note that calling match() from __driver_attach() without the device lock held is intentional. [1]
--- drivers/platform/x86/wmi.c | 36 +++++------------------------------- include/linux/wmi.h | 4 ---- 2 files changed, 5 insertions(+), 35 deletions(-)
drivers/platform/x86/wmi.c +5 -31
@@ -702,39 +702,11 @@ static ssize_t expensive_show(struct device *dev, }static DEVICE_ATTR_RO (expensive); -static ssize_t driver_override_show (struct device *dev,struct device_attribute *attr, -char *buf) -{ -struct wmi_device *wdev =to_wmi_device (dev); -ssize_t ret; - -device_lock (dev); - ret =sysfs_emit (buf,"%s\n" , wdev->driver_override); -device_unlock (dev); - -return ret; -} - -static ssize_t driver_override_store (struct device *dev,struct device_attribute *attr, -const char *buf,size_t count) -{ -struct wmi_device *wdev =to_wmi_device (dev); -int ret; - - ret =driver_set_override (dev, &wdev->driver_override, buf, count); -if (ret <0 ) -return ret; - -return count; -} -static DEVICE_ATTR_RW (driver_override); -static struct attribute *wmi_attrs[] = { &dev_attr_modalias.attr, &dev_attr_guid.attr, &dev_attr_instance_count.attr, &dev_attr_expensive.attr, - &dev_attr_driver_override.attr,NULL };ATTRIBUTE_GROUPS (wmi);
@@ -803,7 +775,6 @@ static void wmi_dev_release(struct device *dev) {struct wmi_block *wblock =dev_to_wblock (dev); -kfree (wblock->dev.driver_override);kfree (wblock); }
@@ -812,10 +783,12 @@ static int wmi_dev_match(struct device *dev, const struct device_driver *driver)const struct wmi_driver *wmi_driver =to_wmi_driver (driver);struct wmi_block *wblock =dev_to_wblock (dev);const struct wmi_device_id *id = wmi_driver->id_table; +int ret;/* When driver_override is set, only bind to the matching driver */ -if (wblock->dev.driver_override) -return !strcmp (wblock->dev.driver_override, driver->name); + ret =device_match_driver_override (dev, driver); +if (ret >=0 ) +return ret;if (id ==NULL )return 0 ;
@@ -936,6 +909,7 @@ static struct class wmi_bus_class = {static const struct bus_type wmi_bus_type = { .name ="wmi" , .dev_groups = wmi_groups, + .driver_override = true, .match = wmi_dev_match, .uevent = wmi_dev_uevent, .probe = wmi_dev_probe,
include/linux/wmi.h +0 -4
@@ -16,16 +16,12 @@* struct wmi_device - WMI device structure * @dev: Device associated with this WMI device * @setable: True for devices implementing the Set Control Method -* @driver_override: Driver name to force a match; do not set directly, -* because core frees it; use driver_set_override() to -* set or clear it. * * This represents WMI devices discovered by the WMI driver core. */ struct wmi_device {struct device dev;bool setable; -const char *driver_override; };/**
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 32/957 vdpa: use generic driver_override infrastructure
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Danilo Krummrich <[email protected]>
[ Upstream commit 85bb534ff12aab6916058897b39c748940a7a4c6 ]
When a driver is probed through __driver_attach(), the bus' match() callback is called without the device lock held, thus accessing the driver_override field without a lock, which can cause a UAF.
Fix this by using the driver-core driver_override infrastructure taking care of proper locking internally.
Note that calling match() from __driver_attach() without the device lock held is intentional. [1]
--- drivers/vdpa/vdpa.c | 48 +++++--------------------------------------- include/linux/vdpa.h | 4 ---- 2 files changed, 5 insertions(+), 47 deletions(-)
drivers/vdpa/vdpa.c +5 -43
@@ -67,57 +67,20 @@ static void vdpa_dev_remove(struct device *d)static int vdpa_dev_match (struct device *dev,const struct device_driver *drv) { -struct vdpa_device *vdev =dev_to_vdpa (dev); +int ret;/* Check override first, and if set, only use the named driver */ -if (vdev->driver_override) -return strcmp (vdev->driver_override, drv->name) ==0 ; + ret =device_match_driver_override (dev, drv); +if (ret >=0 ) +return ret;/* Currently devices must be supported by all vDPA bus drivers */ return 1 ; } -static ssize_t driver_override_store (struct device *dev, -struct device_attribute *attr, -const char *buf,size_t count) -{ -struct vdpa_device *vdev =dev_to_vdpa (dev); -int ret; - - ret =driver_set_override (dev, &vdev->driver_override, buf, count); -if (ret) -return ret; - -return count; -} - -static ssize_t driver_override_show (struct device *dev, -struct device_attribute *attr,char *buf) -{ -struct vdpa_device *vdev =dev_to_vdpa (dev); -ssize_t len; - -device_lock (dev); - len =sysfs_emit (buf,"%s\n" , vdev->driver_override); -device_unlock (dev); - -return len; -} -static DEVICE_ATTR_RW (driver_override); - -static struct attribute *vdpa_dev_attrs[] = { - &dev_attr_driver_override.attr, -NULL , -}; - -static const struct attribute_group vdpa_dev_group = { - .attrs = vdpa_dev_attrs, -}; -__ATTRIBUTE_GROUPS (vdpa_dev); -static const struct bus_type vdpa_bus = { .name ="vdpa" , - .dev_groups = vdpa_dev_groups, + .driver_override = true, .match = vdpa_dev_match, .probe = vdpa_dev_probe, .remove = vdpa_dev_remove,
@@ -132,7 +95,6 @@ static void vdpa_release_dev(struct device *d) ops->free (vdev);ida_free (&vdpa_index_ida, vdev->index); -kfree (vdev->driver_override);kfree (vdev); }
include/linux/vdpa.h +0 -4
@@ -72,9 +72,6 @@ struct vdpa_mgmt_dev;* struct vdpa_device - representation of a vDPA device * @dev: underlying device * @vmap: the metadata passed to upper layer to be used for mapping -* @driver_override: driver name to force a match; do not set directly, -* because core frees it; use driver_set_override() to -* set or clear it. * @config: the configuration ops for this device. * @map: the map ops for this device * @cf_lock: Protects get and set access to configuration layout.
@@ -90,7 +87,6 @@ struct vdpa_mgmt_dev;struct vdpa_device {struct device dev;union virtio_map vmap; -const char *driver_override;const struct vdpa_config_ops *config;const struct virtio_map_ops *map;struct rw_semaphore cf_lock;/* Protects get/set config */
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 33/957 s390/cio: use generic driver_override infrastructure
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Danilo Krummrich <[email protected]>
[ Upstream commit ac4d8bb6e2e13e8684a76ea48d13ebaaaf5c24c4 ]
When a driver is probed through __driver_attach(), the bus' match() callback is called without the device lock held, thus accessing the driver_override field without a lock, which can cause a UAF.
Fix this by using the driver-core driver_override infrastructure taking care of proper locking internally.
Note that calling match() from __driver_attach() without the device lock held is intentional. [1]
--- drivers/s390/cio/cio.h | 5 ----- drivers/s390/cio/css.c | 34 ++++------------------------------ 2 files changed, 4 insertions(+), 35 deletions(-)
drivers/s390/cio/cio.h +0 -5
@@ -103,11 +103,6 @@ struct subchannel {struct work_struct todo_work;struct schib_config config;u64 dma_mask; -/* -* Driver name to force a match. Do not set directly, because core -* frees it. Use driver_set_override() to set or clear it. -*/ -const char *driver_override; } __attribute__ ((aligned(8))); DECLARE_PER_CPU_ALIGNED(struct irb, cio_irb);
drivers/s390/cio/css.c +4 -30
@@ -160,7 +160,6 @@ static void css_subchannel_release(struct device *dev) sch->config.intparm =0 ;cio_commit_config (sch); -kfree (sch->driver_override);kfree (sch); }
@@ -324,37 +323,9 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,static DEVICE_ATTR_RO (modalias); -static ssize_t driver_override_store (struct device *dev, -struct device_attribute *attr, -const char *buf,size_t count) -{ -struct subchannel *sch =to_subchannel (dev); -int ret; - - ret =driver_set_override (dev, &sch->driver_override, buf, count); -if (ret) -return ret; - -return count; -} - -static ssize_t driver_override_show (struct device *dev, -struct device_attribute *attr,char *buf) -{ -struct subchannel *sch =to_subchannel (dev); -ssize_t len; - -device_lock (dev); - len =sysfs_emit (buf,"%s\n" , sch->driver_override); -device_unlock (dev); -return len; -} -static DEVICE_ATTR_RW (driver_override); -static struct attribute *subch_attrs[] = { &dev_attr_type.attr, &dev_attr_modalias.attr, - &dev_attr_driver_override.attr,NULL , };
@@ -1358,9 +1329,11 @@ static int css_bus_match(struct device *dev, const struct device_driver *drv)struct subchannel *sch =to_subchannel (dev);const struct css_driver *driver =to_cssdriver (drv);struct css_device_id *id; +int ret;/* When driver_override is set, only bind to the matching driver */ -if (sch->driver_override &&strcmp (sch->driver_override, drv->name)) + ret =device_match_driver_override (dev, drv); +if (ret ==0 )return 0 ;for (id = driver->subchannel_type; id->match_flags; id++) {
@@ -1417,6 +1390,7 @@ static int css_uevent(const struct device *dev, struct kobj_uevent_env *env)static const struct bus_type css_bus_type = { .name ="css" , + .driver_override = true, .match = css_bus_match, .probe = css_probe, .remove = css_remove,
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 34/957 bus: fsl-mc: use generic driver_override infrastructure
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Danilo Krummrich <[email protected]>
[ Upstream commit 6c8dfb0362732bf1e4829867a2a5239fedc592d0 ]
When a driver is probed through __driver_attach(), the bus' match() callback is called without the device lock held, thus accessing the driver_override field without a lock, which can cause a UAF.
Fix this by using the driver-core driver_override infrastructure taking care of proper locking internally.
Note that calling match() from __driver_attach() without the device lock held is intentional. [1]
--- drivers/bus/fsl-mc/fsl-mc-bus.c | 43 +++++-------------------------- drivers/vfio/fsl-mc/vfio_fsl_mc.c | 4 +-- include/linux/fsl/mc.h | 4 --- 3 files changed, 8 insertions(+), 43 deletions(-)
drivers/bus/fsl-mc/fsl-mc-bus.c +7 -36
@@ -86,12 +86,16 @@ static int fsl_mc_bus_match(struct device *dev, const struct device_driver *drv)struct fsl_mc_device *mc_dev =to_fsl_mc_device (dev);const struct fsl_mc_driver *mc_drv =to_fsl_mc_driver (drv);bool found = false; +int ret;/* When driver_override is set, only bind to the matching driver */ -if (mc_dev->driver_override) { - found = !strcmp (mc_dev->driver_override, mc_drv->driver.name); + ret =device_match_driver_override (dev, drv); +if (ret >0 ) { + found = true; goto out; } +if (ret ==0 ) + goto out;if (!mc_drv->match_id_table) goto out;
@@ -181,39 +185,8 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, }static DEVICE_ATTR_RO (modalias); -static ssize_t driver_override_store (struct device *dev, -struct device_attribute *attr, -const char *buf,size_t count) -{ -struct fsl_mc_device *mc_dev =to_fsl_mc_device (dev); -int ret; - -if (WARN_ON (dev->bus != &fsl_mc_bus_type)) -return -EINVAL ; - - ret =driver_set_override (dev, &mc_dev->driver_override, buf, count); -if (ret) -return ret; - -return count; -} - -static ssize_t driver_override_show (struct device *dev, -struct device_attribute *attr,char *buf) -{ -struct fsl_mc_device *mc_dev =to_fsl_mc_device (dev); -ssize_t len; - -device_lock (dev); - len =sysfs_emit (buf,"%s\n" , mc_dev->driver_override); -device_unlock (dev); -return len; -} -static DEVICE_ATTR_RW (driver_override); -static struct attribute *fsl_mc_dev_attrs[] = { &dev_attr_modalias.attr, - &dev_attr_driver_override.attr,NULL , };
@@ -316,6 +289,7 @@ ATTRIBUTE_GROUPS(fsl_mc_bus);const struct bus_type fsl_mc_bus_type = { .name ="fsl-mc" , + .driver_override = true, .match = fsl_mc_bus_match, .uevent = fsl_mc_bus_uevent, .dma_configure = fsl_mc_dma_configure,
@@ -925,9 +899,6 @@ static struct notifier_block fsl_mc_nb;*/ void fsl_mc_device_remove (struct fsl_mc_device *mc_dev) { -kfree (mc_dev->driver_override); - mc_dev->driver_override =NULL ; -/* * The device-specific remove callback will get invoked by device_del() */
drivers/vfio/fsl-mc/vfio_fsl_mc.c +1 -3
@@ -430,9 +430,7 @@ static int vfio_fsl_mc_bus_notifier(struct notifier_block *nb,if (action ==BUS_NOTIFY_ADD_DEVICE && vdev->mc_dev == mc_cont) { - mc_dev->driver_override =kasprintf (GFP_KERNEL ,"%s" , - vfio_fsl_mc_ops.name); -if (!mc_dev->driver_override) +if (device_set_driver_override (dev, vfio_fsl_mc_ops.name))dev_warn (dev,"VFIO_FSL_MC: Setting driver override for device in dprc %s failed\n" ,dev_name (&mc_cont->dev));else
include/linux/fsl/mc.h +0 -4
@@ -178,9 +178,6 @@ struct fsl_mc_obj_desc {* @regions: pointer to array of MMIO region entries * @irqs: pointer to array of pointers to interrupts allocated to this device * @resource: generic resource associated with this MC object device, if any. -* @driver_override: driver name to force a match; do not set directly, -* because core frees it; use driver_set_override() to -* set or clear it. * * Generic device object for MC object devices that are "attached" to a * MC bus.
@@ -214,7 +211,6 @@ struct fsl_mc_device {struct fsl_mc_device_irq **irqs;struct fsl_mc_resource *resource;struct device_link *consumer_link; -const char *driver_override; };#define to_fsl_mc_device (_dev) \
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 35/957 irqchip/irq-pic32-evic: Address warning related to wrong printf() formatter
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brian Masney <[email protected]>
[ Upstream commit 86be659415b0ddefebc3120e309091aa215a9064 ]
This driver is currently only build on 32 bit MIPS systems. When building it on x86_64, the following warning occurs:
drivers/irqchip/irq-pic32-evic.c: In function ‘pic32_ext_irq_of_init’:
./include/linux/kern_levels.h:5:25: error: format ‘%d’ expects argument of type
‘int’, but argument 2 has type ‘long unsigned int’ [-Werror=format=]
Update the printf() formatter in preparation for allowing this driver to be compiled on all architectures.
--- drivers/irqchip/irq-pic32-evic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-pic32-evic.c +1 -1
@@ -196,7 +196,7 @@ static void __init pic32_ext_irq_of_init(struct irq_domain *domain)of_property_for_each_u32 (node, pname, hwirq) {if (i >=ARRAY_SIZE (priv->ext_irqs)) { -pr_warn ("More than %d external irq, skip rest\n" , +pr_warn ("More than %zu external irq, skip rest\n" ,ARRAY_SIZE (priv->ext_irqs));break ; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 36/957 hrtimer: Avoid pointless reprogramming in __hrtimer_start_range_ns()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <[email protected]>
[ Upstream commit d19ff16c11db38f3ee179d72751fb9b340174330 ]
Much like hrtimer_reprogram(), skip programming if the cpu_base is running the hrtimer interrupt.
Stable-dep-of: f2e388a019e4 ("hrtimer: Reduce trace noise in hrtimer_start()")
--- kernel/time/hrtimer.c | 8 ++++++++ 1 file changed, 8 insertions(+)
kernel/time/hrtimer.c +8 -0
@@ -1261,6 +1261,14 @@ static int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, } first =enqueue_hrtimer (timer, new_base, mode); + +/* +* If the hrtimer interrupt is running, then it will reevaluate the +* clock bases and reprogram the clock event device. +*/ +if (new_base->cpu_base->in_hrtirq) +return false; +if (!force_local) {/* * If the current CPU base is online, then the timer is
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 4/957 md/raid1: fix the comparing region of interval tree
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiao Ni <[email protected]>
[ Upstream commit de3544d2e5ea99064498de3c21ba490155864657 ]
Interval tree uses [start, end] as a region which stores in the tree. In raid1, it uses the wrong end value. For example:bio(A,B) is too big and needs to be split to bio1(A,C-1), bio2(C,B). The region of bio1 is [A,C] and the region of bio2 is [C,B]. So bio1 and bio2 overlap which is not right.
Fix this problem by using right end value of the region.
--- drivers/md/raid1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/md/raid1.c +2 -2
@@ -62,7 +62,7 @@ static int check_and_add_serial(struct md_rdev *rdev, struct r1bio *r1_bio,unsigned long flags;int ret =0 ;sector_t lo = r1_bio->sector; -sector_t hi = lo + r1_bio->sectors; +sector_t hi = lo + r1_bio->sectors -1 ;struct serial_in_rdev *serial = &rdev->serial[idx];spin_lock_irqsave (&serial->serial_lock, flags);
@@ -453,7 +453,7 @@ static void raid1_end_write_request(struct bio *bio)int mirror =find_bio_disk (r1_bio, bio);struct md_rdev *rdev = conf->mirrors[mirror].rdev;sector_t lo = r1_bio->sector; -sector_t hi = r1_bio->sector + r1_bio->sectors; +sector_t hi = r1_bio->sector + r1_bio->sectors -1 ;bool ignore_error = !raid1_should_handle_error (bio) || (bio->bi_status &&bio_op (bio) ==REQ_OP_DISCARD );
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 5/957 drbd: Balance RCU calls in drbd_adm_dump_devices()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
[ Upstream commit 2b31e86387e60b3689339f0f0fbb4d3623d9d494 ]
Make drbd_adm_dump_devices() call rcu_read_lock() before rcu_read_unlock() is called. This has been detected by the Clang thread-safety analyzer.
--- drivers/block/drbd/drbd_nl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/block/drbd/drbd_nl.c +6 -2
@@ -3378,8 +3378,10 @@ int drbd_adm_dump_devices(struct sk_buff *skb, struct netlink_callback *cb)if (resource_filter) { retcode =ERR_RES_NOT_KNOWN ; resource =drbd_find_resource (nla_data (resource_filter)); -if (!resource) +if (!resource) { +rcu_read_lock (); goto put_result; + } cb->args[0 ] = (long )resource; } }
@@ -3628,8 +3630,10 @@ int drbd_adm_dump_peer_devices(struct sk_buff *skb, struct netlink_callback *cb)if (resource_filter) { retcode =ERR_RES_NOT_KNOWN ; resource =drbd_find_resource (nla_data (resource_filter)); -if (!resource) +if (!resource) { +rcu_read_lock (); goto put_result; + } } cb->args[0 ] = (long )resource; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 6/957 loop: fix partition scan race between udev and loop_reread_partitions()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daan De Meyer <[email protected]>
[ Upstream commit 267ec4d7223a783f029a980f41b93c39b17996da ]
When LOOP_CONFIGURE is called with LO_FLAGS_PARTSCAN, the following sequence occurs:
1. disk_force_media_change() sets GD_NEED_PART_SCAN
2. Uevent suppression is lifted and a KOBJ_CHANGE uevent is sent
3. loop_global_unlock() releases the lock
4. loop_reread_partitions() calls bdev_disk_changed() to scan
There is a race between steps 2 and 4: when udev receives the uevent and opens the device before loop_reread_partitions() runs, blkdev_get_whole() in bdev.c sees GD_NEED_PART_SCAN set and calls bdev_disk_changed() for a first scan. Then loop_reread_partitions() does a second scan. The open_mutex serializes these two scans, but does not prevent both from running.
The second scan in bdev_disk_changed() drops all partition devices from the first scan (via blk_drop_partitions()) before re-adding them, causing partition block devices to briefly disappear. This breaks any systemd unit with BindsTo= on the partition device: systemd observes the device going dead, fails the dependent units, and does not retry them when the device reappears.
Fix this by removing the GD_NEED_PART_SCAN set from disk_force_media_change() entirely. None of the current callers need the lazy on-open partition scan triggered by this flag:
- floppy: sets GENHD_FL_NO_PART, so disk_has_partscan() is always false and GD_NEED_PART_SCAN has no effect.
- loop (loop_configure, loop_change_fd): when LO_FLAGS_PARTSCAN is set, loop_reread_partitions() performs an explicit scan. When not set, GD_SUPPRESS_PART_SCAN prevents the lazy scan path.
- loop (__loop_clr_fd): calls bdev_disk_changed() explicitly if LO_FLAGS_PARTSCAN is set.
- nbd (nbd_clear_sock_ioctl): capacity is set to zero immediately after; nbd manages GD_NEED_PART_SCAN explicitly elsewhere.
With GD_NEED_PART_SCAN no longer set by disk_force_media_change(), udev opening the loop device after the uevent no longer triggers a redundant scan in blkdev_get_whole(), and only the single explicit scan from loop_reread_partitions() runs.
A regression test for this bug has been submitted to blktests:
https://github.com/linux-blktests/blktests/pull/240.
--- block/disk-events.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
block/disk-events.c +2 -1
@@ -290,13 +290,14 @@ EXPORT_SYMBOL(disk_check_media_change);* Should be called when the media changes for @disk. Generates a uevent * and attempts to free all dentries and inodes and invalidates all block * device page cache entries in that case. +* +* Callers that need a partition re-scan should arrange for one explicitly. */ void disk_force_media_change (struct gendisk *disk) {disk_event_uevent (disk,DISK_EVENT_MEDIA_CHANGE );inc_diskseq (disk);bdev_mark_dead (disk->part0, true); -set_bit (GD_NEED_PART_SCAN , &disk->state); }EXPORT_SYMBOL_GPL (disk_force_media_change);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 7/957 nilfs2: reject zero bd_oblocknr in nilfs_ioctl_mark_blocks_dirty()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Deepanshu Kartikey <[email protected]>
[ Upstream commit be3e5d10643d3be1cbac9d9939f220a99253f980 ]
nilfs_ioctl_mark_blocks_dirty() uses bd_oblocknr to detect dead blocks by comparing it with the current block number bd_blocknr. If they differ, the block is considered dead and skipped.
However, bd_oblocknr should never be 0 since block 0 typically stores the primary superblock and is never a valid GC target block. A corrupted ioctl request with bd_oblocknr set to 0 causes the comparison to incorrectly match when the lookup returns -ENOENT and sets bd_blocknr to 0, bypassing the dead block check and calling nilfs_bmap_mark() on a non-existent block. This causes nilfs_btree_do_lookup() to return -ENOENT, triggering the WARN_ON(ret == -ENOENT).
Fix this by rejecting ioctl requests with bd_oblocknr set to 0 at the beginning of each iteration.
[ryusuke: slightly modified the commit message and comments for accuracy]
--- fs/nilfs2/ioctl.c | 6 ++++++ 1 file changed, 6 insertions(+)
fs/nilfs2/ioctl.c +6 -0
@@ -736,6 +736,12 @@ static int nilfs_ioctl_mark_blocks_dirty(struct the_nilfs *nilfs,int ret, i;for (i =0 ; i < nmembs; i++) { +/* +* bd_oblocknr must never be 0 as block 0 +* is never a valid GC target block +*/ +if (unlikely (!bdescs[i].bd_oblocknr)) +return -EINVAL ;/* XXX: use macro or inline func to check liveness */ ret = nilfs_bmap_lookup_at_level(bmap, bdescs[i].bd_offset,
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 8/957 blk-cgroup: fix disk reference leak in blkcg_maybe_throttle_current()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jackie Liu <[email protected]>
[ Upstream commit 23308af722fefed00af5f238024c11710938fba3 ]
Add the missing put_disk() on the error path in blkcg_maybe_throttle_current(). When blkcg lookup, blkg lookup, or blkg_tryget() fails, the function jumps to the out label which only calls rcu_read_unlock() but does not release the disk reference acquired by blkcg_schedule_throttle() via get_device(). Since current->throttle_disk is already set to NULL before the lookup, blkcg_exit() cannot release this reference either, causing the disk to never be freed.
Restore the reference release that was present as blk_put_queue() in the original code but was inadvertently dropped during the conversion from request_queue to gendisk.
--- block/blk-cgroup.c | 1 + 1 file changed, 1 insertion(+)
block/blk-cgroup.c +1 -0
@@ -2037,6 +2037,7 @@ void blkcg_maybe_throttle_current(void)return ; out:rcu_read_unlock (); +put_disk (disk); }/**
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 9/957 pstore/ram: fix resource leak when ioremap() fails
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cole Leavitt <[email protected]>
[ Upstream commit 2ddb69f686ef7a621645e97fc7329c50edf5d0e5 ]
In persistent_ram_iomap(), ioremap() or ioremap_wc() may return NULL on failure. Currently, if this happens, the function returns NULL without releasing the memory region acquired by request_mem_region().
This leads to a resource leak where the memory region remains reserved but unusable.
Additionally, the caller persistent_ram_buffer_map() handles NULL correctly by returning -ENOMEM, but without this check, a NULL return combined with request_mem_region() succeeding leaves resources in an inconsistent state.
This is the ioremap() counterpart to commit 05363abc7625 ("pstore:ram_core: fix incorrect success return when vmap() fails") which fixed a similar issue in the vmap() path.
--- fs/pstore/ram_core.c | 4 ++++ 1 file changed, 4 insertions(+)
fs/pstore/ram_core.c +4 -0
@@ -489,6 +489,10 @@ static void *persistent_ram_iomap(phys_addr_t start, size_t size,else va =ioremap_wc (start, size); +/* We must release the mem region if ioremap fails. */ +if (!va) +release_mem_region (start, size); +/* * Since request_mem_region() and ioremap() are byte-granularity * there is no need handle anything special like we do when the
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainercover 6.18.32-rc1 review
This is the start of the stable review cycle for the 6.18.32 release. There are 957 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 22 May 2026 16:20:16 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.18.32-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.18.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.18.32-rc1
Johan Hovold <[email protected]>
spi: sifive: fix controller deregistration
Pei Xiao <[email protected]>
spi: sifive: Simplify clock handling with devm_clk_get_enabled()
Chao Yu <[email protected]>
f2fs: fix false alarm of lockdep on cp_global_sem lock
Tejun Heo <[email protected]>
sched_ext: Pass held rq to SCX_CALL_OP() for core_sched_before
Tejun Heo <[email protected]>
sched_ext: Guard scx_dsq_move() against NULL kit->dsq after failed iter_new
Dapeng Mi <[email protected]>
perf/x86/intel: Disable PMI for self-reloaded ACR events
Qu Wenruo <[email protected]>
btrfs: do not mark inode incompressible after inline attempt fails
Piyush Sachdeva <[email protected]>
smb: client: Use FullSessionKey for AES-256 encryption key derivation
David Carlier <[email protected]>
eventfs: Use list_add_tail_rcu() for SRCU-protected children list
Ashutosh Desai <[email protected]>
drm/v3d: Reject empty multisync extension to prevent infinite loop
Johan Hovold <[email protected]>
drm/gma500/oaktrail_lvds: fix i2c adapter leaks on init
Johan Hovold <[email protected]>
drm/gma500/oaktrail_lvds: fix hang on init failure
Johan Hovold <[email protected]>
drm/gma500/oaktrail_hdmi: fix i2c adapter leak on setup
Thomas Hellström <[email protected]>
drm/ttm: Convert -EAGAIN from dmem_cgroup_try_charge to -ENOSPC
Matthew Auld <[email protected]>
drm/xe/dma-buf: fix UAF with retry loop
Matthew Auld <[email protected]>
drm/xe/dma-buf: handle empty bo and UAF races
Gyeyoung Baek <[email protected]>
drm/panfrost: Fix wait_bo ioctl leaking positive return from dma_resv_wait_timeout()
Sebastian Brzezinka <[email protected]>
drm/i915: skip __i915_request_skip() for already signaled requests
Zhenzhong Duan <[email protected]>
iommu/vt-d: Avoid NULL pointer dereference or refcount corruption
Zhenzhong Duan <[email protected]>
iommu/vt-d: Fix oops due to out of scope access
Naval Alcalá <[email protected]>
iommu/vt-d: Disable DMAR for Intel Q35 IGFX
Raphael Zimmer <[email protected]>
libceph: handle rbtree insertion error in decode_choose_args()
Raphael Zimmer <[email protected]>
libceph: Fix potential out-of-bounds access in crush_decode()
Raphael Zimmer <[email protected]>
libceph: Fix potential null-ptr-deref in decode_choose_args()
Raphael Zimmer <[email protected]>
libceph: Fix potential out-of-bounds access in osdmap_decode()
Sascha Bischoff <[email protected]>
irqchip/gic-v5: Allocate ITS parent LPIs as a range
Sascha Bischoff <[email protected]>
irqchip/gic-v5: Support range allocation for LPIs
Sascha Bischoff <[email protected]>
irqchip/gic-v5: Move LPI allocation into the LPI domain
Xianwei Zhao <[email protected]>
irqchip/meson-gpio: Use the correct register in meson_s4_gpio_irq_set_type()
Yong-Xuan Wang <[email protected]>
irqchip/riscv-imsic: Clear interrupt move state during CPU offlining
Scott Mayhew <[email protected]>
nfsd: fix file change detection in CB_GETATTR
Paulo Alcantara <[email protected]>
netfs: fix error handling in netfs_extract_user_iter()
Ma Ke <[email protected]>
powerpc/warp: Fix error handling in pika_dtm_thread
Vivian Wang <[email protected]>
riscv: misaligned: Make enabling delegation depend on NONPORTABLE
Carlos López <[email protected]>
virt: sev-guest: Do not use host-controlled page order in cleanup path
Wilfred Mallawa <[email protected]>
xfs: fix memory leak on error in xfs_alloc_zone_info()
David Woodhouse <[email protected]>
x86/kexec: Push kjump return address even for non-kjump kexec
Jose Fernandez (Anthropic) <[email protected]>
iommu/amd: Bounds-check devid in __rlookup_amd_iommu()
Nicholas Carlini <[email protected]>
io-wq: check that the predecessor is hashed in io_wq_remove_pending()
Viacheslav Dubeyko <[email protected]>
ceph: fix BUG_ON in __ceph_build_xattrs_blob() due to stale blob size
Viacheslav Dubeyko <[email protected]>
ceph: fix a buffer leak in __ceph_setxattr()
Qu Wenruo <[email protected]>
btrfs: only release the dirty pages io tree after successful writes
Cássio Gabriel <[email protected]>
ALSA: usb-audio: qcom: Check offload mapping failures
Cássio Gabriel <[email protected]>
ALSA: usb-audio: Bound MIDI endpoint descriptor scans
Cássio Gabriel <[email protected]>
ALSA: usb-audio: Bound MIDI 2.0 endpoint descriptor scans
Markus Kramer <[email protected]>
ALSA: hda/realtek: Add quirk for Samsung Galaxy Book5 360 headphone
Adrien Burnett <[email protected]>
ALSA: hda/realtek: Add mute LED quirk for HP Pavilion Laptop 16-ag0xxx
Gyeyoung Baek <[email protected]>
accel/rocket: Fix prep_bo ioctl leaking positive return from dma_resv_wait_timeout()
Derek J. Clark <[email protected]>
platform/x86: lenovo-wmi-other: Fix tunable_attr_01 struct members
Derek J. Clark <[email protected]>
platform/x86: lenovo-wmi-helpers: Move gamezone enums to wmi-helpers
Srinivas Pandruvada <[email protected]>
platform/x86: intel: Move debugfs register before creating devices
Chaitanya Kumar Borah <[email protected]>
drm/i915/dp: Fix VSC dynamic range signaling for RGB formats
Edward Adam Davis <[email protected]>
drm: Replace old pointer to new idr
Myeonghun Pak <[email protected]>
drm/loongson: Use managed KMS polling
Ye Bin <[email protected]>
smb/client: fix possible infinite loop and oob read in symlink_data()
Nick Chan <[email protected]>
nvme-apple: Reset q->sq_tail during queue init
Pauli Virtanen <[email protected]>
Bluetooth: btmtk: accept too short WMT FUNC_CTRL events
Michael Tretter <[email protected]>
media: staging: imx: configure src_mux in csi_start
Igor Pylypiv <[email protected]>
ata: libata-scsi: fix requeue of deferred ATA PASS-THROUGH commands
Vlad Poenaru <[email protected]>
fuse: avoid 0x10 fault in fuse_readahead when max_pages == 0
Nathan Chancellor <[email protected]>
HID: core: Fix size_t specifier in hid_report_raw_event()
Benjamin Tissoires <[email protected]>
HID: core: introduce hid_safe_input_report()
Benjamin Tissoires <[email protected]>
HID: pass the buffer size to hid_report_raw_event
Qiang Ma <[email protected]>
KVM: x86: Fix Xen hypercall tracepoint argument assignment
Junrui Luo <[email protected]>
KVM: s390: pci: fix GAIT table indexing due to double-scaling pointer arithmetic
Aaron Sacks <[email protected]>
KVM: Reject wrapped offset in kvm_reset_dirty_gfn()
Sergio Correia <[email protected]>
audit: enforce AUDIT_LOCKED for AUDIT_TRIM and AUDIT_MAKE_EQUIV
Zoran Ilievski <[email protected]>
net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled
Li Xiasong <[email protected]>
netfilter: nft_ct: fix missing expect put in obj eval
Mario Limonciello <[email protected]>
Revert "ACPI: CPPC: Adjust debug messages in amd_set_max_freq_ratio() to warn"
Greg Kroah-Hartman <[email protected]>
idpf: fix double free and use-after-free in aux device error paths
Guopeng Zhang <[email protected]>
cgroup/dmem: Return -ENOMEM on failed pool preallocation
Arthur Kiyanovski <[email protected]>
net: ena: PHC: Check return code before setting timestamp output
Sergio Correia <[email protected]>
audit: fix incorrect inheritable capability in CAPSET records
Li Xiasong <[email protected]>
netfilter: nf_conntrack_sip: get helper before allocating expectation
Arthur Kiyanovski <[email protected]>
net: ena: PHC: Fix potential use-after-free in get_timestamp
Breno Leitao <[email protected]>
workqueue: Fix wq->cpu_pwq leak in alloc_and_link_pwqs() WQ_UNBOUND path
Matt Vollrath <[email protected]>
i40e: Cleanup PTP pins on probe failure
Herbert Xu <[email protected]>
crypto: af_alg - Cap AEAD AD length to 0x80000000
Vincent Guittot <[email protected]>
sched/fair: Revert force wakeup preemption
Vincent Guittot <[email protected]>
sched/fair: Fix wakeup_preempt_fair() for not waking up task
Erni Sri Satya Vennela <[email protected]>
net: mana: Init gf_stats_work before potential error paths in probe
Dipayaan Roy <[email protected]>
net: mana: Fix use-after-free in reset service rescan path
Lorenzo Bianconi <[email protected]>
net: airoha: Fix VIP configuration for AN7583 SoC
Lorenzo Bianconi <[email protected]>
net: airoha: Use gdm port enum value whenever possible
Lorenzo Bianconi <[email protected]>
net: airoha: Remove code duplication in airoha_regs.h
Eric Dumazet <[email protected]>
net/sched: sch_pie: annotate more data-races in pie_dump_stats()
Lorenzo Bianconi <[email protected]>
net: airoha: Move ndesc initialization at end of airoha_qdma_init_tx()
Lorenzo Bianconi <[email protected]>
net: airoha: Move entries to queue head in case of DMA mapping failure in airoha_dev_xmit()
Costa Shulyupin <[email protected]>
rtla: Fix parse_cpu_set() bug introduced by strtoi()
Miklos Szeredi <[email protected]>
fuse: make sure dentry is evicted if stale
Miklos Szeredi <[email protected]>
fuse: fix race when disposing stale dentries
Dan Carpenter <[email protected]>
net: airoha: Fix a copy and paste bug in probe()
Daniel Borkmann <[email protected]>
bpf: Fix sync_linked_regs regarding BPF_ADD_CONST32 zext propagation
Gao Xiang <[email protected]>
erofs: fix offset truncation when shifting pgoff on 32-bit platforms
Samiullah Khawaja <[email protected]>
PCI: Initialize temporary device in new_id_store()
Sasha Levin <[email protected]>
Revert "papr-hvpipe: convert papr_hvpipe_dev_create_handle() to FD_PREPARE()"
Sasha Levin <[email protected]>
Revert "pseries/papr-hvpipe: Fix race with interrupt handler"
Davidlohr Bueso <[email protected]>
futex: Drop CLONE_THREAD requirement for private default hash alloc
Zhaoyang Huang <[email protected]>
arm64: Reserve an extra page for early kernel mapping
Leo Yan <[email protected]>
kselftest/arm64: Include <asm/ptrace.h> for user_gcs definition
Paolo Abeni <[email protected]>
net/sched: cls_flower: revert unintended changes
Dan Carpenter <[email protected]>
sfc: fix error code in efx_devlink_info_running_versions()
Jakub Kicinski <[email protected]>
net: tls: fix strparser anchor skb leak on offload RX setup failure
Petr Oros <[email protected]>
ice: add dpll peer notification for paired SMA and U.FL pins
Ivan Vecera <[email protected]>
dpll: export __dpll_pin_change_ntf() for use under dpll_lock
Petr Oros <[email protected]>
dpll: Add notifier chain for dpll events
Ivan Vecera <[email protected]>
dpll: Allow associating dpll pin with a firmware node
Petr Oros <[email protected]>
ice: fix missing dpll notifications for SW pins
Petr Oros <[email protected]>
ice: fix SMA and U.FL pin state changes affecting paired pin
Petr Oros <[email protected]>
ice: fix missing SMA pin initialization in DPLL subsystem
Petr Oros <[email protected]>
ice: fix infinite recursion in ice_cfg_tx_topo via ice_init_dev_hw
Petr Oros <[email protected]>
ice: fix NULL pointer dereference in ice_reset_all_vfs()
Petr Oros <[email protected]>
iavf: add VIRTCHNL_OP_ADD_VLAN to success completion handler
Petr Oros <[email protected]>
iavf: wait for PF confirmation before removing VLAN filters
Petr Oros <[email protected]>
iavf: stop removing VLAN filters from PF on interface down
Petr Oros <[email protected]>
iavf: rename IAVF_VLAN_IS_NEW to IAVF_VLAN_ADDING
Hasan Basbunar <[email protected]>
page_pool: fix memory-provider leak in page_pool_create_percpu() error path
Eric Dumazet <[email protected]>
bonding: 3ad: implement proper RCU rules for port->aggregator
Hangbin Liu <[email protected]>
bonding: print churn state via netlink
Lorenzo Bianconi <[email protected]>
net: airoha: Do not return err in ndo_stop() callback
Lorenzo Bianconi <[email protected]>
net: airoha: fix BQL imbalance in TX path
Shuicheng Lin <[email protected]>
drm/xe/gsc: Fix BO leak on error in query_compatibility_version()
Shuicheng Lin <[email protected]>
drm/xe/eustall: Fix drm_dev_put called before stream disable in close
Shuicheng Lin <[email protected]>
drm/xe: Fix error cleanup in xe_exec_queue_create_ioctl()
Matt Roper <[email protected]>
drm/xe/debugfs: Correct printing of register whitelist ranges
Timur Kristóf <[email protected]>
drm/amd/display: Read EDID from VBIOS embedded panel info
Timur Kristóf <[email protected]>
drm/amd/display: Allow constructing DCE8 link encoder without DDC
Timur Kristóf <[email protected]>
drm/amd/display: Allow constructing DCE6 link encoder without DDC
Timur Kristóf <[email protected]>
drm/amd/display: Allow DCE link encoder without AUX registers
Sebastian Andrzej Siewior <[email protected]>
futex: Prevent lockup in requeue-PI during signal/ timeout wakeup
Shenghao Ding <[email protected]>
ALSA: hda/tas2781: Fix incorrect bit update for non-book-zero or book 0 pages >1
Richard Fitzgerald <[email protected]>
ALSA: hda: cs35l56: Fix uninitialized value in cs35l56_hda_read_acpi()
wangdicheng <[email protected]>
ALSA: hda/conexant: Fix missing error check for jack detection
Breno Leitao <[email protected]>
netconsole: propagate device name truncation in dev_name_store()
Eric Dumazet <[email protected]>
net/sched: sch_cake: annotate data-races in cake_dump_stats() (V)
Eric Dumazet <[email protected]>
net/sched: sch_cake: annotate data-races in cake_dump_stats() (III)
Weiming Shi <[email protected]>
bareudp: fix NULL pointer dereference in bareudp_fill_metadata_dst()
Xin Long <[email protected]>
sctp: discard stale INIT after handshake completion
Xin Long <[email protected]>
netfilter: skip recording stale or retransmitted INIT
Christian A. Ehrhardt <[email protected]>
ASoC: codecs: ab8500: Fix casting of private data
Jakub Kicinski <[email protected]>
net: psp: require admin permission for dev-set and key-rotate
Jakub Kicinski <[email protected]>
net: psp: check for device unregister when creating assoc
Jens Axboe <[email protected]>
io_uring/napi: cap busy_poll_to 10 msec
Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v5.0.1 ring
Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v5.0.0 ring
Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v4.0.5 ring
Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v4.0.3 ring
Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v4.0 ring
Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v3.0 ring
Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v2.5 ring
Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v2.0 ring
Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v5.0.1 enc ring
Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v5.0.0 enc ring
Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v4.0.5 enc ring
Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v4.0.3 enc ring
Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v4.0 enc ring
Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v3.0 enc/dec rings
Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v2.5 enc/dec rings
Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v2.0 enc/dec rings
Heiko Schocher <[email protected]>
net: phy: dp83869: fix setting CLK_O_SEL field.
Heiko Carstens <[email protected]>
s390/mm: Fix phys_to_folio() usage in do_secure_storage_access()
Yu Kuai <[email protected]>
md/md-bitmap: add a none backend for bitmap grow
Yu Kuai <[email protected]>
md/md-bitmap: split bitmap sysfs groups
Yu Kuai <[email protected]>
md: factor bitmap creation away from sysfs handling
Yu Kuai <[email protected]>
md: add fallback to correct bitmap_ops on version mismatch
Keith Busch <[email protected]>
md/raid1,raid10: don't fail devices for invalid IO errors
William A. Kennington III <[email protected]>
net: mctp i2c: check length before marking flow active
Zicheng Qu <[email protected]>
sched/fair: Clear rel_deadline when initializing forked entities
Vincent Guittot <[email protected]>
sched/fair: Fix wakeup_preempt_fair() vs delayed dequeue
Mel Gorman <[email protected]>
sched/fair: Reimplement NEXT_BUDDY to align with EEVDF goals
Takashi Iwai <[email protected]>
ALSA: usb-audio: Fix potential leak of pd at parsing UAC3 streams
Breno Leitao <[email protected]>
netpoll: fix IPv6 local-address corruption
Altan Hacigumus <[email protected]>
tcp: make probe0 timer handle expired user timeout
Florian Westphal <[email protected]>
neigh: let neigh_xmit take skb ownership
Weiming Shi <[email protected]>
net/sched: taprio: fix NULL pointer dereference in class dump
Paul Geurts <[email protected]>
NFC: trf7970a: Ignore antenna noise when checking for RF field
Felix Gu <[email protected]>
spi: amlogic-spisg: initialize completion before requesting IRQ
Morduan Zang <[email protected]>
net: usb: rtl8150: free skb on usb_submit_urb() failure in xmit
Zhan Jun <[email protected]>
net: usb: rtl8150: fix use-after-free in rtl8150_start_xmit()
Ido Schimmel <[email protected]>
vrf: Fix a potential NPD when removing a port from a VRF
Eric Dumazet <[email protected]>
net/sched: sch_fq_pie: annotate data-races in fq_pie_dump_stats()
Eric Dumazet <[email protected]>
net/sched: sch_choke: annotate data-races in choke_dump_stats()
Lorenzo Bianconi <[email protected]>
net: airoha: Do not read uninitialized fragment address in airoha_dev_xmit()
Lorenzo Bianconi <[email protected]>
net: airoha: Do not wake all netdev TX queues in airoha_qdma_wake_netdev_txqs()
Zhengping Zhang <[email protected]>
net: airoha: fix typo in function name
Lorenzo Bianconi <[email protected]>
net: airoha: stop net_device TX queue before updating CPU index
Stephen Hemminger <[email protected]>
net/sched: netem: check for negative latency and jitter
Stephen Hemminger <[email protected]>
net/sched: netem: fix slot delay calculation overflow
Stephen Hemminger <[email protected]>
net/sched: netem: validate slot configuration
Stephen Hemminger <[email protected]>
net/sched: netem: only reseed PRNG when seed is explicitly provided
Stephen Hemminger <[email protected]>
net/sched: netem: fix queue limit check to include reordered packets
Stephen Hemminger <[email protected]>
net/sched: netem: fix probability gaps in 4-state loss model
Nikola Z. Ivanov <[email protected]>
netdevsim: zero initialize struct iphdr in dummy sk_buff
Daan De Meyer <[email protected]>
cdrom, scsi: sr: propagate read-only status to block layer via set_disk_ro()
Tony Luck <[email protected]>
ACPI: APEI: EINJ: Fix EINJV2 memory error injection
Tony Luck <[email protected]>
ACPICA: Provide #defines for EINJV2 error types
Wentao Guan <[email protected]>
arm64/scs: Fix potential sign extension issue of advance_loc4
Geert Uytterhoeven <[email protected]>
drm/color-mgmt: Typo s/R332/RGB332/
Yuho Choi <[email protected]>
drm/sysfb: ofdrm: fix PCI device reference leaks
James Calligeros <[email protected]>
ASoC: tas2770: Fix order of operations for temperature calculation
James Calligeros <[email protected]>
ASoC: tas2764: Mark die temp register as volatile
John Madieu <[email protected]>
spi: rockchip: Read ISR, not IMR, to detect cs-inactive IRQ
Guilherme G. Piccoli <[email protected]>
ASoC: amd: acp: Add DMI quirk for Valve Steam Deck OLED
Florian Westphal <[email protected]>
netfilter: nf_conntrack_sip: don't use simple_strtoul
Jiexun Wang <[email protected]>
netfilter: xt_policy: fix strict mode inbound policy matching
Timur Kristóf <[email protected]>
drm/amdgpu/gfx6: Support harvested SI chips with disabled TCCs (v2)
Timur Kristóf <[email protected]>
drm/amdgpu/uvd3.1: Don't validate the firmware when already validated
Christian König <[email protected]>
drm/amdgpu: fix AMDGPU_INFO_READ_MMR_REG
Timur Kristóf <[email protected]>
drm/amdgpu/gmc: Fix AMDGPU_GART_PLACEMENT_LOW to not overlap with VRAM
Keith Busch <[email protected]>
nvme-pci: fix missed admin queue sq doorbell write
Florian Westphal <[email protected]>
netfilter: nf_tables: use list_del_rcu for netlink hooks
Pablo Neira Ayuso <[email protected]>
netfilter: arp_tables: fix IEEE1394 ARP payload parsing
Maurizio Lombardi <[email protected]>
nvmet-tcp: propagate nvmet_tcp_build_pdu_iovec() errors to its callers
Breno Leitao <[email protected]>
tracing: branch: Fix inverted check on stat tracer registration
Petr Malat <[email protected]>
cgroup: Increment nr_dying_subsys_* from rmdir context
Mark Harmstone <[email protected]>
btrfs: fix double-decrement of bytes_may_use in submit_one_async_extent()
Amir Goldstein <[email protected]>
fsnotify: fix inode reference leak in fsnotify_recalc_mask()
Wolfram Sang <[email protected]>
mailbox: mailbox-test: make data_ready a per-instance variable
Wolfram Sang <[email protected]>
mailbox: mailbox-test: initialize struct earlier
Wolfram Sang <[email protected]>
mailbox: mailbox-test: don't free the reused channel
Wolfram Sang <[email protected]>
mailbox: add sanity check for channel array
cuitao <[email protected]>
cgroup/rdma: fix integer overflow in rdmacg_try_charge()
Edward Adam Davis <[email protected]>
sched/psi: fix race between file release and pressure write
Wolfram Sang <[email protected]>
mailbox: mailbox-test: free channels on probe error
Jason-JH Lin <[email protected]>
mailbox: mtk-cmdq: Fix CURR and END addr for task insert case
Thomas Weißschuh <[email protected]>
kbuild: Never respect CONFIG_WERROR / W=e to fixdep
David Arcari <[email protected]>
tools/power turbostat: Fix unrecognized option '-P'
Len Brown <[email protected]>
tools/power turbostat: Fix and document --header_iterations
Kaushlendra Kumar <[email protected]>
tools/power turbostat: Use strtoul() for iteration parsing
Len Brown <[email protected]>
tools/power turbostat.8: Document the "--force" option
Yuho Choi <[email protected]>
fbdev: offb: fix PCI device reference leak on probe failure
Mathias Krause <[email protected]>
kbuild: builddeb - avoid recompiles for non-cross-compiles
Anthony Pighin (Nokia) <[email protected]>
rtc: abx80x: Disable alarm feature if no interrupt attached
Bae Yeonju <[email protected]>
fs/adfs: validate nzones in adfs_validate_bblk()
Christian Brauner <[email protected]>
eventpoll: fix ep_remove struct eventpoll / struct file UAF
Christian Brauner <[email protected]>
eventpoll: move epi_fget() up
Christian Brauner <[email protected]>
eventpoll: drop vestigial __ prefix from ep_remove_{file,epi}()
Christian Brauner <[email protected]>
eventpoll: kill __ep_remove()
Christian Brauner <[email protected]>
eventpoll: split __ep_remove()
Christian Brauner <[email protected]>
eventpoll: use hlist_is_singular_node() in __ep_remove()
Randy Dunlap <[email protected]>
nstree: fix func. parameter kernel-doc warnings
Kohei Enju <[email protected]>
vhost_net: fix sleeping with preempt-disabled in vhost_net_busy_poll()
Lee Jones <[email protected]>
tipc: fix double-free in tipc_buf_append()
Jiayuan Chen <[email protected]>
tcp: send a challenge ACK on SEG.ACK > SND.NXT
Alexey Kodanev <[email protected]>
nfp: fix swapped arguments in nfp_encode_basic_qdr() calls
Brett Creeley <[email protected]>
virtio_net: sync rss_trailer.max_tx_vq on queue_pairs change via VQ_PAIRS_SET
Stefano Garzarella <[email protected]>
vsock/virtio: fix MSG_ZEROCOPY pinned-pages accounting
Erni Sri Satya Vennela <[email protected]>
net: mana: Fix EQ leak in mana_remove on NULL port
Dipayaan Roy <[email protected]>
net: mana: Implement ndo_tx_timeout and serialize queue resets per port.
Long Li <[email protected]>
net: mana: Handle hardware recovery events when probing the device
Aditya Garg <[email protected]>
net: mana: Handle SKB if TX SGEs exceed hardware limit
Erni Sri Satya Vennela <[email protected]>
net: mana: Don't overwrite port probe error with add_adev result
Erni Sri Satya Vennela <[email protected]>
net: mana: Add standard counter rx_missed_errors
Erni Sri Satya Vennela <[email protected]>
net: mana: Move hardware counter stats from per-port to per-VF context
Erni Sri Satya Vennela <[email protected]>
net: mana: Guard mana_remove against double invocation
Erni Sri Satya Vennela <[email protected]>
net: mana: Init link_change_work before potential error paths in probe
Lorenzo Bianconi <[email protected]>
net: airoha: Add size check for TX NAPIs in airoha_qdma_cleanup()
Lorenzo Bianconi <[email protected]>
net: airoha: Rework the code flow in airoha_remove() and in airoha_probe() error path
Lorenzo Bianconi <[email protected]>
net: airoha: Move ndesc initialization at end of airoha_qdma_init_rx_queue()
Mieczyslaw Nalewaj <[email protected]>
net: dsa: realtek: rtl8365mb: fix mode mask calculation
Lorenzo Bianconi <[email protected]>
net: airoha: Add missing bits in airoha_qdma_cleanup_tx_queue()
Lorenzo Bianconi <[email protected]>
net: airoha: Add the capability to consume out-of-order DMA tx descriptors
Lorenzo Bianconi <[email protected]>
net: airoha: Add AN7583 SoC support
Lorenzo Bianconi <[email protected]>
net: airoha: Refactor src port configuration in airhoha_set_gdm2_loopback
Lorenzo Bianconi <[email protected]>
net: airoha: ppe: Move PPE memory info in airoha_eth_soc_data struct
Lorenzo Bianconi <[email protected]>
net: airoha: ppe: Dynamically allocate foe_check_time array in airoha_ppe struct
Eric Dumazet <[email protected]>
net/sched: sch_sfb: annotate data-races in sfb_dump_stats()
Eric Dumazet <[email protected]>
net/sched: sch_red: annotate data-races in red_dump_stats()
Eric Dumazet <[email protected]>
net/sched: sch_fq_codel: remove data-races from fq_codel_dump_stats()
Eric Dumazet <[email protected]>
net/sched: sch_pie: annotate data-races in pie_dump_stats()
Eric Dumazet <[email protected]>
net_sched: sch_hhf: annotate data-races in hhf_dump_stats()
Jacob Keller <[email protected]>
ice: fix ice_ptp_read_tx_hwtstamp_status_eth56g
Jacob Keller <[email protected]>
ice: fix ready bitmap check for non-E822 devices
Grzegorz Nitka <[email protected]>
ice: perform PHY soft reset for E825C ports at initialization
Grzegorz Nitka <[email protected]>
ice: fix timestamp interrupt configuration for E825C
Michael Bommarito <[email protected]>
net/rds: zero per-item info buffer before handing it to visitors
Vikas Gupta <[email protected]>
bnge: remove unsupported backing store type
Vikas Gupta <[email protected]>
bnge: fix initial HWRM sequence
Kohei Enju <[email protected]>
net: validate skb->napi_id in RX tracepoints
Hyunwoo Kim <[email protected]>
ksmbd: scope conn->binding slowpath to bound sessions only
DaeMyung Kang <[email protected]>
ksmbd: fix durable fd leak on ClientGUID mismatch in durable v2 open
DaeMyung Kang <[email protected]>
ksmbd: destroy async_ida in ksmbd_conn_free()
DaeMyung Kang <[email protected]>
ksmbd: destroy tree_conn_ida in ksmbd_session_destroy()
Sangyun Kim <[email protected]>
pwm: atmel-tcb: Cache clock rates and mark chip as atomic
Jun Yan <[email protected]>
arm64: dts: meson-gxl-p230: fix ethernet PHY interrupt number
Anand Moon <[email protected]>
arm64: dts: amlogic: meson-axg: Add missing cache information to cpu0
Chia-Yu Chang <[email protected]>
net/sched: sch_dualpi2: drain both C-queue and L-queue in dualpi2_change()
Weiming Shi <[email protected]>
slip: bound decode() reads against the compressed packet length
Weiming Shi <[email protected]>
slip: reject VJ receive packets on instances with no rstate array
Fernando Fernandez Mancera <[email protected]>
netfilter: nfnetlink_osf: fix potential NULL dereference in ttl check
Fernando Fernandez Mancera <[email protected]>
netfilter: nfnetlink_osf: fix out-of-bounds read on option matching
Yingnan Zhang <[email protected]>
ipvs: fix MTU check for GSO packets in tunnel mode
Pablo Neira Ayuso <[email protected]>
netfilter: nat: use kfree_rcu to release ops
Pablo Neira Ayuso <[email protected]>
netfilter: xtables: restrict several matches to inet family
Florian Westphal <[email protected]>
netfilter: conntrack: remove sprintf usage
Xiang Mei <[email protected]>
netfilter: nfnetlink_osf: fix divide-by-zero in OSF_WSS_MODULO
Pablo Neira Ayuso <[email protected]>
netfilter: nft_osf: restrict it to ipv4
Lorenzo Bianconi <[email protected]>
net: airoha: Fix possible TX queue stall in airoha_qdma_tx_napi_poll()
Weiming Shi <[email protected]>
openvswitch: cap upcall PID array size and pre-size vport replies
Prathamesh Deshpande <[email protected]>
net/mlx5: Fix HCA caps leak on notifier init failure
Qingfang Deng <[email protected]>
pppoe: drop PFC frames
Michael Bommarito <[email protected]>
sctp: fix OOB write to userspace in sctp_getsockopt_peer_auth_chunks
Eric Dumazet <[email protected]>
ipv6: fix possible UAF in icmpv6_rcv()
Matt Vollrath <[email protected]>
e1000e: Unroll PTP in probe error handling
Petr Oros <[email protected]>
iavf: fix wrong VLAN mask for legacy Rx descriptors L2TAG2
Kohei Enju <[email protected]>
i40e: don't advertise IFF_SUPP_NOFCS
Paul Greenwalt <[email protected]>
ice: fix ICE_AQ_LINK_SPEED_M for 200G
Michal Schmidt <[email protected]>
ice: fix double-free of tx_buf skb
Alice Mikityanska <[email protected]>
ice: Remove jumbo_remove step from TX path
Grzegorz Nitka <[email protected]>
ice: update PCS latency settings for E825 10G/25Gb modes
Grzegorz Nitka <[email protected]>
ice: fix 'adjust' timer programming for E830 devices
Eric Dumazet <[email protected]>
tcp: annotate data-races around tp->plb_rehash
Eric Dumazet <[email protected]>
tcp: annotate data-races around (tp->write_seq - tp->snd_nxt)
Eric Dumazet <[email protected]>
tcp: annotate data-races around tp->timeout_rehash
Eric Dumazet <[email protected]>
tcp: annotate data-races around tp->srtt_us
Eric Dumazet <[email protected]>
tcp: better handle TCP_TX_DELAY on established flows
Eric Dumazet <[email protected]>
tcp: annotate data-races around tp->reord_seen
Eric Dumazet <[email protected]>
tcp: annotate data-races around tp->dsack_dups
Eric Dumazet <[email protected]>
tcp: annotate data-races around tp->bytes_retrans
Eric Dumazet <[email protected]>
tcp: annotate data-races around tp->bytes_sent
Eric Dumazet <[email protected]>
tcp: add data-race annotations for TCP_NLA_SNDQ_SIZE
Eric Dumazet <[email protected]>
tcp: annotate data-races around tp->delivered and tp->delivered_ce
Eric Dumazet <[email protected]>
tcp: annotate data-races around tp->snd_ssthresh
Eric Dumazet <[email protected]>
tcp: add data-races annotations around tp->reordering, tp->snd_cwnd
Eric Dumazet <[email protected]>
tcp: add data-race annotations around tp->data_segs_out and tp->total_retrans
Eric Dumazet <[email protected]>
tcp: annotate data-races in tcp_get_info_chrono_stats()
Eric Dumazet <[email protected]>
tcp: inline tcp_chrono_start()
Eric Dumazet <[email protected]>
tcp: move tp->chrono_type next tp->chrono_stat[]
Akif <[email protected]>
ksmbd: fix use-after-free in smb2_open during durable reconnect
ZhangGuoDong <[email protected]>
smb: move smb_version_values to common/smbglob.h
Wei Fang <[email protected]>
net: enetc: fix NTMP DMA use-after-free issue
Wei Fang <[email protected]>
net: enetc: correct the command BD ring consumer index
Stanislav Fomichev <[email protected]>
net: dsa: remove redundant netdev_lock_ops() from conduit ethtool ops
Vladimir Oltean <[email protected]>
net: dsa: append ethtool counters of all hidden ports to conduit
Vladimir Oltean <[email protected]>
net: dsa: use kernel data types for ethtool ops on conduit
Vladimir Oltean <[email protected]>
net: dsa: cpu_dp->orig_ethtool_ops might be NULL
Vinicius Costa Gomes <[email protected]>
net/sched: taprio: fix use-after-free in advance_sched() on schedule switch
Lorenzo Bianconi <[email protected]>
net: airoha: Wait for NPU PPE configuration to complete in airoha_ppe_offload_setup()
Jiayuan Chen <[email protected]>
nexthop: fix IPv6 route referencing IPv4 nexthop
Dudu Lu <[email protected]>
net/sched: sch_cake: fix NAT destination port not being updated in cake_update_flowkeys
Dudu Lu <[email protected]>
macvlan: fix macvlan_get_size() not reserving space for IFLA_MACVLAN_BC_CUTOFF
Dudu Lu <[email protected]>
net/sched: act_mirred: fix wrong device for mac_header_xmit check in tcf_blockcast_redir
Uwe Kleine-König <[email protected]>
pwm: stm32: Fix rounding issue for requests with inverted polarity
Gabor Juhos <[email protected]>
arm64: dts: marvell: armada-37xx: use 'usb2-phy' in USB3 controller's phy-names
Peng Fan <[email protected]>
arm64: dts: imx8mm-tqma8mqml: Correct PAD settings for PMIC_nINT
Peng Fan <[email protected]>
arm64: dts: imx8mn-tqma8mqnl: Correct PAD settings for PMIC_nINT
Peng Fan <[email protected]>
arm64: dts: imx8mm-emtop-som: Correct PAD settings for PMIC_nINT
Ronald Claveau <[email protected]>
reset: amlogic: t7: Fix null reset ops
René Rebe <[email protected]>
PCMCIA: Fix garbled log messages for KERN_CONT
Peng Fan <[email protected]>
arm64: dts: imx8mp-data-modul-edm-sbc: Correct PAD settings for PMIC_nINT
Peng Fan <[email protected]>
arm64: dts: imx8mp-dhcom-som: Correct PAD settings for PMIC_nINT
Peng Fan <[email protected]>
arm64: dts: imx8mp-ultra-mach-sbc: Correct PAD settings for PMIC_nINT
Peng Fan <[email protected]>
arm64: dts: imx8mp-sr-som: Correct PAD settings for PMIC_nINT
Peng Fan <[email protected]>
arm64: dts: imx8mp-nitrogen-som: Correct PAD settings for PMIC_nINT
Peng Fan <[email protected]>
arm64: dts: imx8mp-aristainetos3a-som-v1: Correct PAD settings for PMIC_nINT
Peng Fan <[email protected]>
arm64: dts: imx8mp-edm-g: Correct PAD settings for PMIC_nINT
Peng Fan <[email protected]>
arm64: dts: imx8mp-icore-mx8mp: Correct PAD settings for PMIC_nINT
Peng Fan <[email protected]>
arm64: dts: imx8mp-navqp: Correct PAD settings for PMIC_nINT
Peng Fan <[email protected]>
arm64: dts: imx8mp-debix-som-a: Correct PAD settings for PMIC_nINT
Peng Fan <[email protected]>
arm64: dts: imx8mp-debix-model-a: Correct PAD settings for PMIC_nINT
Gao Xiang <[email protected]>
erofs: unify lcn as u64 for 32-bit platforms
Paul Moses <[email protected]>
crypto: ccp - copy IV using skcipher ivsize
T Pratham <[email protected]>
crypto: sa2ul - Fix AEAD fallback algorithm names
Aleksander Jan Bajkowski <[email protected]>
crypto: eip93 - fix hmac setkey algo selection
Sami Mujawar <[email protected]>
virt: arm-cca-guest: fix error check for RSI_INCOMPLETE
Ville Syrjälä <[email protected]>
drm/i915/wm: Verify the correct plane DDB entry
Yongpeng Yang <[email protected]>
f2fs: protect extension_list reading with sb_lock in f2fs_sbi_show()
Jaegeuk Kim <[email protected]>
f2fs: allow empty mount string for Opt_usr|grp|projjquota
Brian Masney <[email protected]>
clk: visconti: pll: initialize clk_init_data to zero
Jagadeesh Kona <[email protected]>
clk: qcom: gcc-x1e80100: Keep GCC USB QTB clock always ON
Zhiguo Niu <[email protected]>
f2fs: fix to preserve previous reserve_{blocks,node} value when remount
Chao Yu <[email protected]>
f2fs: expand scalability of f2fs mount option
Geert Uytterhoeven <[email protected]>
lib/hexdump: print_hex_dump_bytes() calls print_hex_dump_debug()
Vladimir Zapolskiy <[email protected]>
clk: qcom: gdsc: Fix error path on registration of multiple pm subdomains
Jianan Huang <[email protected]>
f2fs: avoid reading already updated pages during GC
Chao Yu <[email protected]>
f2fs: use f2fs_filemap_get_folio() instead of f2fs_pagecache_get_page()
Shuwei Wu <[email protected]>
clk: spacemit: ccu_mix: fix inverted condition in ccu_mix_trigger_fc()
Konrad Dybcio <[email protected]>
clk: qcom: dispcc-sc7180: Add missing MDSS resets
Konrad Dybcio <[email protected]>
dt-bindings: clock: qcom,dispcc-sc7180: Define MDSS resets
Geert Uytterhoeven <[email protected]>
clk: xgene: Fix mapping leak in xgene_pllclk_init()
Arnd Bergmann <[email protected]>
clk: qoriq: avoid format string warning
Thomas Weißschuh <[email protected]>
x86/um: fix vDSO installation
Thomas Weißschuh <[email protected]>
x86/um/vdso: Drop VDSO64-y from Makefile
Sebastian Krzyszkowiak <[email protected]>
clk: imx8mq: Correct the CSI PHY sels
Felix Gu <[email protected]>
clk: imx: imx6q: Fix device node reference leak in of_assigned_ldb_sels()
Felix Gu <[email protected]>
clk: imx: imx6q: Fix device node reference leak in pll6_bypassed()
Val Packett <[email protected]>
clk: qcom: dispcc-sm8250: Enable parents for pixel clocks
Val Packett <[email protected]>
clk: qcom: dispcc-sm8250: Use shared ops on the mdss vsync clk
Val Packett <[email protected]>
clk: qcom: gcc-sc8180x: Use retention for PCIe power domains
Val Packett <[email protected]>
clk: qcom: gcc-sc8180x: Use retention for USB power domains
Val Packett <[email protected]>
clk: qcom: gcc-sc8180x: Add missing GDSCs
Val Packett <[email protected]>
dt-bindings: clock: qcom,gcc-sc8180x: Add missing GDSCs
Shawn Lin <[email protected]>
scsi: ufs: rockchip,rk3576-ufshc: dt-bindings: Add new mphy reset item
Junrui Luo <[email protected]>
scsi: target: core: Fix integer overflow in UNMAP bounds check
Fabrizio Castro <[email protected]>
clk: renesas: r9a09g057: Remove entries for WDT{0,2,3}Ovidiu Panait <[email protected]>
clk: renesas: r9a09g057: Fix ordering of module clocks array
Lad Prabhakar <[email protected]>
clk: renesas: r9a09g057: Add entries for RSCIs
Ovidiu Panait <[email protected]>
clk: renesas: r9a09g057: Add clock and reset entries for RTC
Konrad Dybcio <[email protected]>
clk: qcom: dispcc[01]-sa8775p: Fix DSI byte clock rate setting
Konrad Dybcio <[email protected]>
clk: qcom: dispcc-sm4450: Fix DSI byte clock rate setting
Konrad Dybcio <[email protected]>
clk: qcom: dispcc-milos: Fix DSI byte clock rate setting
Konrad Dybcio <[email protected]>
clk: qcom: dispcc-glymur: Fix DSI byte clock rate setting
White Lewis <[email protected]>
clk: qcom: dispcc-sc8280xp: remove CLK_SET_RATE_PARENT from byte_div_clk_src dividers
Yang Erkun <[email protected]>
scsi: sg: Resolve soft lockup issue when opening /dev/sgX
Yang Erkun <[email protected]>
scsi: sg: Fix sysctl sg-big-buff register during sg_init()
Chen-Yu Tsai <[email protected]>
clk: sunxi-ng: sun55i-a523-r: Add missing r-spi module clock
Dmitry Baryshkov <[email protected]>
clk: qcom: dispcc-sm8450: use RCG2 ops for DPTX1 AUX clock source
Dmitry Baryshkov <[email protected]>
clk: qcom: dispcc-glymur: use RCG2 ops for DPTX1 AUX clock source
Taniya Das <[email protected]>
clk: qcom: gcc-glymur: Add video axi clock resets for glymur
Taniya Das <[email protected]>
dt-bindings: clock: qcom: Add GCC video axi reset clock for Glymur
Florian Westphal <[email protected]>
RDMA/core: Prefer NLA_NUL_STRING
Pengpeng Hou <[email protected]>
platform/x86: dell-wmi-sysman: bound enumeration string aggregation
Fedor Pchelkin <[email protected]>
platform/x86: dell_rbu: avoid uninit value usage in packet_size_write()
Pengpeng Hou <[email protected]>
fs/ntfs3: terminate the cached volume label after UTF-8 conversion
Thomas Bogendoerfer <[email protected]>
tty: serial: ip22zilog: Fix section mispatch warning
Denis Benato <[email protected]>
platform/x86: asus-wmi: fix screenpad brightness range
Denis Benato <[email protected]>
platform/x86: asus-wmi: adjust screenpad power/brightness handling
Dai Ngo <[email protected]>
NFSD: fix nfs4_file access extra count in nfsd4_add_rdaccess_to_wrdeleg
Andy Shevchenko <[email protected]>
nfs/blocklayout: Fix compilation error (make W=1) in bl_write_pagelist()
Abdun Nihaal <[email protected]>
mfd: mc13xxx-core: Fix memory leak in mc13xxx_add_subdevice_pdata()
Dmitry Torokhov <[email protected]>
platform/x86: barco-p50-gpio: normalize return value of gpio_get
Rafael J. Wysocki <[email protected]>
platform/x86: panasonic-laptop: Fix OPTD notifier registration and cleanup
Mostafa Saleh <[email protected]>
usb: typec: ps883x: Fix Oops at unbind
Randy Dunlap <[email protected]>
tty: hvc_iucv: fix off-by-one in number of supported devices
Ethan Tidmore <[email protected]>
usb: typec: Fix error pointer dereference
Chen Ni <[email protected]>
leds: lgm-sso: Remove duplicate assignments for priv->mmap
Rafael J. Wysocki <[email protected]>
platform/surface: surfacepro3_button: Drop wakeup source on remove
Chen Ni <[email protected]>
backlight: sky81452-backlight: Check return value of devm_gpiod_get_optional() in sky81452_bl_parse_dt()
Billy Tsai <[email protected]>
i3c: mipi-i3c-hci: fix IBI payload length calculation for final status
Jorge Marques <[email protected]>
i3c: master: adi: Fix error propagation for CCCs
Jorge Marques <[email protected]>
i3c: master: Fix error codes at send_ccc_cmd
Felix Gu <[email protected]>
i3c: dw: Fix memory leak in dw_i3c_master_i3c_xfers()
Felix Gu <[email protected]>
i3c: master: renesas: Fix memory leak in renesas_i3c_i3c_xfers()
Felix Gu <[email protected]>
i3c: master: dw-i3c: Fix missing reset assertion in remove() callback
Arnaldo Carvalho de Melo <[email protected]>
perf util: Kill die() prototype, dead for a long time
Ian Rogers <[email protected]>
perf maps: Fix copy_from that can break sorted by name order
Ian Rogers <[email protected]>
perf maps: Fix fixup_overlap_and_insert that can break sorted by name order
Inochi Amaoto <[email protected]>
pinctrl: sophgo: pinctrl-sg2044: Fix wrong module description
Inochi Amaoto <[email protected]>
pinctrl: sophgo: pinctrl-sg2042: Fix wrong module description
Ian Rogers <[email protected]>
perf cgroup: Update metric leader in evlist__expand_cgroup
Jian Zhang <[email protected]>
ipmi: ssif_bmc: change log level to dbg in irq callback
Jian Zhang <[email protected]>
ipmi: ssif_bmc: fix message desynchronization after truncated response
Jian Zhang <[email protected]>
ipmi: ssif_bmc: fix missing check for copy_to_user() partial failure
Leo Yan <[email protected]>
perf expr: Return -EINVAL for syntax error in expr__find_ids()
Chuck Lever <[email protected]>
perf tools: Fix module symbol resolution for non-zero .text sh_addr
Mike Rapoport (Microsoft) <[email protected]>
memblock: reserve_mem: fix end caclulation in reserve_mem_release_by_name()
Ian Rogers <[email protected]>
perf stat: Fix opt->value type for parse_cache_level
Ian Rogers <[email protected]>
perf lock: Fix option value type in parse_max_stack
Biju Das <[email protected]>
pinctrl: renesas: rzg2l: Fix save/restore of {IOLH,IEN,PUPD,SMT} registers
Yu-Chun Lin <[email protected]>
pinctrl: abx500: Fix type of 'argument' variable
Yu-Chun Lin <[email protected]>
pinctrl: realtek: Fix function signature for config argument
Andy Shevchenko <[email protected]>
pinctrl: pinconf-generic: Fully validate 'pinmux' property
Mike Leach <[email protected]>
perf: tools: cs-etm: Fix print issue for Coresight debug in ETE/TRBE trace
Ian Rogers <[email protected]>
perf branch: Avoid incrementing NULL
Andy Shevchenko <[email protected]>
pinctrl: cy8c95x0: Avoid returning positive values to user space
Andy Shevchenko <[email protected]>
pinctrl: cy8c95x0: Unify messages with help of dev_err_probe()
Andy Shevchenko <[email protected]>
pinctrl: cy8c95x0: remove duplicate error message
Ian Rogers <[email protected]>
perf trace: Avoid an ERR_PTR in syscall_stats
Ethan Tidmore <[email protected]>
pinctrl: pinctrl-pic32: Fix resource leak
wangguangju <[email protected]>
perf trace: Fix IS_ERR() vs NULL check bug
Puranjay Mohan <[email protected]>
bpf, arm32: Reject BPF-to-BPF calls and callbacks in the JIT
Puranjay Mohan <[email protected]>
bpf: Validate node_id in arena_alloc_pages()
Jiri Olsa <[email protected]>
libbpf: Prevent double close and leak of btf objects
Yihan Ding <[email protected]>
bpf: allow UTF-8 literals in bpf_bprintf_prepare()
Mykyta Yatsenko <[email protected]>
bpf: Fix NULL deref in map_kptr_match_type for scalar regs
Daniel Borkmann <[email protected]>
bpf: Fix precedence bug in convert_bpf_ld_abs alignment check
Michal Luczaj <[email protected]>
bpf, sockmap: Take state lock for af_unix iter
Michal Luczaj <[email protected]>
bpf, sockmap: Fix af_unix null-ptr-deref in proto update
Michal Luczaj <[email protected]>
bpf, sockmap: Fix af_unix iter deadlock
Puranjay Mohan <[email protected]>
bpf, riscv: Remove redundant bpf_flush_icache() after pack allocator finalize
Puranjay Mohan <[email protected]>
bpf, arm64: Remove redundant bpf_flush_icache() after pack allocator finalize
Daniel Borkmann <[email protected]>
bpf, arm64: Fix off-by-one in check_imm signed range check
Ye Bin <[email protected]>
ext4: fix possible null-ptr-deref in mbt_kunit_exit()
Oliver Neukum <[email protected]>
HID: usbhid: fix deadlock in hid_post_reset()
Miquel Raynal <[email protected]>
mtd: spinand: winbond: Clarify when to enable the HS bit
Miquel Raynal <[email protected]>
mtd: spinand: Give the bus interface to the configuration helper
Miquel Raynal <[email protected]>
mtd: spinand: Add support for setting a bus interface
Miquel Raynal <[email protected]>
mtd: spinand: Gather all the bus interface steps in one single function
Miquel Raynal <[email protected]>
mtd: spinand: winbond: Configure the IO mode after the dummy cycles
Miquel Raynal <[email protected]>
mtd: spinand: winbond: Rename IO_MODE register macro
Miquel Raynal <[email protected]>
mtd: spinand: Create an array of operation templates
Miquel Raynal <[email protected]>
mtd: spinand: Decouple write enable and write disable operations
Miquel Raynal <[email protected]>
mtd: spinand: Add missing check
Richard Genoud <[email protected]>
mtd: rawnand: sunxi: fix sunxi_nfc_hw_ecc_read_extra_oob
Li Ming <[email protected]>
cxl/pci: Check memdev driver binding status in cxl_reset_done()
Cosmin Tanislav <[email protected]>
mtd: parsers: ofpart: call of_node_get() for dedicated subpartitions
Cosmin Tanislav <[email protected]>
mtd: parsers: ofpart: call of_node_put() only in ofpart_fail path
Shiji Yang <[email protected]>
mtd: spi-nor: swp: check SR_TB flag when getting tb_mask
Jonas Gorski <[email protected]>
mtd: spi-nor: update spi_nor_fixups::post_sfdp() documentation
Takahiro Kuwano <[email protected]>
mtd: spi-nor: sfdp: introduce smpt_map_id fixup hook
Takahiro Kuwano <[email protected]>
mtd: spi-nor: sfdp: introduce smpt_read_dummy fixup hook
Haibo Chen <[email protected]>
mtd: spi-nor: core: correct the op.dummy.nbytes when check read operations
Geert Uytterhoeven <[email protected]>
dt-bindings: interrupt-controller: arm,gic-v3: Fix EPPI range
Dmitry Safonov <[email protected]>
ima_fs: Correctly create securityfs files for unsupported hash algos
Chen Ni <[email protected]>
mtd: physmap_of_gemini: Fix disabled pinctrl state check
Denis Benato <[email protected]>
HID: asus: do not abort probe when not necessary
Denis Benato <[email protected]>
HID: asus: make asus_resume adhere to linux kernel coding standards
Daniel Hodges <[email protected]>
ima: check return value of crypto_shash_final() in boot aggregate
Chen Ni <[email protected]>
remoteproc: imx_rproc: Check return value of regmap_attach_dev() in imx_rproc_mmio_detect_mode()
Thomas Weißschuh <[email protected]>
stop_machine: Fix the documentation for a NULL cpus argument
Tim Michals <[email protected]>
remoteproc: xlnx: Fix sram property parsing
Francesco Lavra <[email protected]>
hte: tegra194: remove Kconfig dependency on Tegra194 SoC
Pengpeng Hou <[email protected]>
tracing: Rebuild full_name on each hist_field_name() call
Arnd Bergmann <[email protected]>
tracing: move __printf() attribute on __ftrace_vbprintk()
Yury Norov <[email protected]>
tracing: move tracing declarations from kernel.h to a dedicated header
Steven Rostedt <[email protected]>
tracing: remove size parameter in __trace_puts()
Richard Fitzgerald <[email protected]>
soundwire: cadence: Clear message complete before signaling waiting thread
Frank Li <[email protected]>
dmaengine: mxs-dma: Fix missing return value from of_dma_controller_register()
Bard Liao <[email protected]>
soundwire: Intel: test bus.bpt_stream before assigning it
Cole Leavitt <[email protected]>
soundwire: bus: demote UNATTACHED state warnings to dev_dbg()
Khairul Anuar Romli <[email protected]>
dmaengine: dw-axi-dmac: Remove unnecessary return statement from void function
ZhengYuan Huang <[email protected]>
ocfs2: validate group add input before caching
ZhengYuan Huang <[email protected]>
ocfs2: validate bg_bits during freefrag scan
ZhengYuan Huang <[email protected]>
ocfs2: fix listxattr handling when the buffer is full
Richard Cheng <[email protected]>
fwctl: Fix class init ordering to avoid NULL pointer dereference on device removal
Sebastian Ene <[email protected]>
firmware: arm_ffa: Use the correct buffer size during RXTX_MAP
Frank Li <[email protected]>
ARM: dts: imx27-eukrea: replace interrupts with interrupts-extended
Christian A. Ehrhardt <[email protected]>
lib: kunit_iov_iter: fix memory leaks
Kees Cook <[email protected]>
slab: Introduce kmalloc_obj() and family
Christoph Hellwig <[email protected]>
arm64/xor: fix conflicting attributes for xor_block_template
Aaro Koskinen <[email protected]>
ARM: OMAP1: Fix DEBUG_LL and earlyprintk on OMAP16XX
Alexander Koskovich <[email protected]>
arm64: dts: qcom: sm8250: Add missing CPU7 3.09GHz OPP
Alok Tiwari <[email protected]>
soc: qcom: aoss: compare against normalized cooling state
Alok Tiwari <[email protected]>
soc: qcom: llcc: fix v1 SB syndrome register offset
Junrui Luo <[email protected]>
ocfs2/dlm: fix off-by-one in dlm_match_regions() region comparison
Junrui Luo <[email protected]>
ocfs2/dlm: validate qr_numregions in dlm_match_regions()
Michal Grzedzicki <[email protected]>
unshare: fix nsproxy leak in ksys_unshare() on set_cred_ucounts() failure
Sumit Gupta <[email protected]>
soc/tegra: cbb: Fix cross-fabric target timeout lookup
Sumit Gupta <[email protected]>
soc/tegra: cbb: Fix incorrect ARRAY_SIZE in fabric lookup tables
Sumit Gupta <[email protected]>
soc/tegra: cbb: Set ERD on resume for err interrupt
Xu Yang <[email protected]>
arm64: dts: imx8qxp-mek: switch Type-C connector power-role to dual
Xu Yang <[email protected]>
arm64: dts: imx8qm-mek: switch Type-C connector power-role to dual
Josua Mayer <[email protected]>
arm64: dts: lx2160a: complete pinmux for rcwsr12 configuration word
Josua Mayer <[email protected]>
arm64: dts: lx2160a: change zeros to hexadecimal in pinmux nodes
Josua Mayer <[email protected]>
arm64: dts: lx2160a: add sda gpio references for i2c bus recovery
Josua Mayer <[email protected]>
arm64: dts: lx2160a: rename pinmux nodes for readability
Josua Mayer <[email protected]>
arm64: dts: lx2160a: remove duplicate pinmux nodes
Josua Mayer <[email protected]>
arm64: dts: lx2160a: change i2c0 (iic1) pinmux mask to one bit
Shengjiu Wang <[email protected]>
arm64: dts: imx8dxl-evk: Use audio-graph-card2 for wm8960-2 and wm8960-3
Annette Kobou <[email protected]>
arm64: dts: imx8mp-kontron: Fix boot order for PMIC and RTC
Nora Schiffer <[email protected]>
arm64: dts: freescale: imx8mp-tqma8mpql-mba8mp-ras314: fix UART1 RTS/CTS muxing
Francesco Dolcini <[email protected]>
arm64: dts: ti: k3-am62-verdin: Fix SPI_1 GPIO CS pinctrl label
Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62-lp-sk: Enable internal pulls for MMC0 data pins
Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62p5-sk: Disable MMC1 internal pulls on data pins
Barnabás Czémán <[email protected]>
arm64: dts: qcom: msm8917-xiaomi-riva: Fix board-id for all bootloader
David Heidelberg <[email protected]>
arm64: dts: qcom: sdm845-xiaomi-beryllium: Mark l1a regulator as powered during boot
Luca Weiss <[email protected]>
arm64: dts: qcom: sm7225-fairphone-fp4: Fix conflicting bias pinctrl
Vladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sm8650: Enable UHS-I SDR50 and SDR104 SD card modes
Vladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sm8550: Enable UHS-I SDR50 and SDR104 SD card modes
Vladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sm8450: Enable UHS-I SDR50 and SDR104 SD card modes
Vladimir Zapolskiy <[email protected]>
arm64: dts: qcom: hamoa: Fix xo clock supply of platform SD host controller
Vladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sm8650: Fix xo clock supply of SD host controller
Vladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sm8550: Fix xo clock supply of platform SD host controller
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8750: Fix GIC_ITS range length
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8650: Fix GIC_ITS range length
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8550: Fix GIC_ITS range length
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8450: Fix GIC_ITS range length
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8650: correct Iris corners for the MXC rail
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8550: correct Iris corners for the MXC rail
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: monaco: correct Iris corners for the MXC rail
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: lemans: correct Iris corners for the MXC rail
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: hamoa: correct Iris corners for the MXC rail
Gatien Chevallier <[email protected]>
bus: rifsc: fix RIF configuration check for peripherals
Shawn Lin <[email protected]>
arm64: dts: rockchip: Add mphy reset to ufshc node
谢致邦 (XIE Zhibang) <[email protected]>
arm64: dts: rockchip: Fix RK3562 EVB2 model name
Dmitry Baryshkov <[email protected]>
soc: qcom: ocmem: return -EPROBE_DEFER is ocmem is not available
Dmitry Baryshkov <[email protected]>
soc: qcom: ocmem: register reasons for probe deferrals
Dmitry Baryshkov <[email protected]>
soc: qcom: ocmem: make the core clock optional
Chris Morgan <[email protected]>
arm64: dts: rockchip: Correct Joystick Axes on Gameforce Ace
Chris Morgan <[email protected]>
arm64: dts: rockchip: Correct Fan Supply for Gameforce Ace
Robin Murphy <[email protected]>
Revert "arm64: dts: rockchip: add SPDIF audio to Beelink A1"
Ming Wang <[email protected]>
arm64: dts: rockchip: Fix Bluetooth stability on LCKFB TaiShan Pi
Barnabás Czémán <[email protected]>
arm64: dts: qcom: msm8953-xiaomi-daisy: fix backlight
Barnabás Czémán <[email protected]>
arm64: dts: qcom: msm8953-xiaomi-vince: correct wled ovp value
Josua Mayer <[email protected]>
arm64: dts: imx8mp-hummingboard-pulse: fix mini-hdmi dsi port reference
Frieder Schrempf <[email protected]>
arm64: dts: imx8mp-kontron: Drop vmmc-supply to fix SD card on SMARC eval carrier
Frieder Schrempf <[email protected]>
arm64: dts: imx8mp-kontron: Fix touch reset configuration on DL devices
Thorsten Blum <[email protected]>
iommufd/selftest: Fix page leaks in mock_viommu_{init,destroy}Akari Tsuyukusa <[email protected]>
arm64: dts: mediatek: mt7986a: Fix gpio-ranges pin count
Akari Tsuyukusa <[email protected]>
arm64: dts: mediatek: mt7981b: Fix gpio-ranges pin count
Akari Tsuyukusa <[email protected]>
arm64: dts: mediatek: mt6795: Fix gpio-ranges pin count
Konrad Dybcio <[email protected]>
arm64: dts: qcom: talos: Add missing clock-names to GCC
Barnabás Czémán <[email protected]>
arm64: dts: qcom: sm6125-xiaomi-ginkgo: Fix reserved gpio ranges
Barnabás Czémán <[email protected]>
arm64: dts: qcom: sm6125-xiaomi-ginkgo: Remove extcon
Barnabás Czémán <[email protected]>
arm64: dts: qcom: sm6125-xiaomi-ginkgo: Correct reserved memory ranges
Barnabás Czémán <[email protected]>
arm64: dts: qcom: sm6125-xiaomi-ginkgo: Remove board-id
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm6125-ginkgo: Fix missing msm-id subtype
Jacob Pan <[email protected]>
iommufd: vfio compatibility extension check for noiommu mode
Sherry Sun <[email protected]>
arm64: dts: imx8mp-evk: Enable pull select bit for PCIe regulator GPIO (M.2 W_DISABLE1)
Heiko Stuebner <[email protected]>
arm64: dts: rockchip: Make Jaguar PCIe-refclk pin use pull-up config
Luke Wang <[email protected]>
arm64: dts: imx91-11x11-evk: change usdhc tuning step for eMMC and SD
Francesco Dolcini <[email protected]>
arm64: dts: imx8-apalis: Fix LEDs name collision
Mikko Perttunen <[email protected]>
memory: tegra30-emc: Fix dll_change check
Mikko Perttunen <[email protected]>
memory: tegra124-emc: Fix dll_change check
Rafał Miłecki <[email protected]>
ARM: dts: mediatek: mt7623: fix efuse fallback compatible
Nícolas F. R. A. Prado <[email protected]>
arm64: dts: mediatek: mt8365: Describe infracfg-nao as a pure syscon
Joshua Klinesmith <[email protected]>
ksmbd: fix use-after-free from async crypto on Qualcomm crypto engine
Thomas Huth <[email protected]>
efi/capsule-loader: fix incorrect sizeof in phys array reallocation
Andreas Gruenbacher <[email protected]>
gfs2: prevent NULL pointer dereference during unmount
Andreas Gruenbacher <[email protected]>
gfs2: add some missing log locking
Arnd Bergmann <[email protected]>
vfio: unhide vdev->debug_root
Jan Kara <[email protected]>
quota: Fix race of dquot_scan_active() with quota deactivation
Andreas Gruenbacher <[email protected]>
gfs2: less aggressive low-memory log flushing
Wander Lairson Costa <[email protected]>
rtla/utils: Fix resource leak in set_comm_sched_attr()
Wander Lairson Costa <[email protected]>
rtla: Replace atoi() with a robust strtoi()
Ivan Pravdin <[email protected]>
rtla: Fix -C/--cgroup interface
Ricardo B. Marlière <[email protected]>
ktest: Run POST_KTEST hooks on failure and cancellation
Ricardo B. Marlière <[email protected]>
ktest: Honor empty per-test option overrides
Ricardo B. Marlière <[email protected]>
ktest: Avoid undef warning when WARNINGS_FILE is unset
Luis Henriques <[email protected]>
fuse: fix uninit-value in fuse_dentry_revalidate()
Luis Henriques <[email protected]>
fuse: new work queue to periodically invalidate expired dentries
Luis Henriques <[email protected]>
dcache: export shrink_dentry_list() and add new helper d_dispose_if_unused()
Jingbo Xu <[email protected]>
fuse: fix premature writetrhough request for large folio
Ondrej Mosnacek <[email protected]>
fanotify: call fanotify_events_supported() before path_permission() and security_path_notify()
Ondrej Mosnacek <[email protected]>
fanotify: avoid/silence premature LSM capability checks
Andreas Gruenbacher <[email protected]>
gfs2: Call unlock_new_inode before d_instantiate
Kailang Yang <[email protected]>
ALSA: hda/realtek - fixed speaker no sound update
Geoffrey D. Bennett <[email protected]>
ALSA: usb-audio: Exclude Scarlett 18i20 1st Gen from SKIP_IFACE_SETUP
Haixin Xu <[email protected]>
crypto: jitterentropy - replace long-held spinlock with mutex
Tejun Heo <[email protected]>
sched_ext: Fix ops.cgroup_move() invocation kf_mask and rq tracking
Tejun Heo <[email protected]>
sched_ext: Track @p's rq lock across set_cpus_allowed_scx -> ops.set_cpumask
Ming-Hung Tsai <[email protected]>
dm cache: fix missing return in invalidate_committed's error path
Cássio Gabriel <[email protected]>
ALSA: sc6000: Keep the programmed board state in card-private data
Pei Xiao <[email protected]>
spi: mtk-snfi: unregister ECC engine on probe failure and remove() callback
Manikanta Maddireddy <[email protected]>
PCI: tegra194: Fix CBB timeout caused by DBI access before core power-on
Vidya Sagar <[email protected]>
PCI: tegra194: Disable L1.2 capability of Tegra234 EP
Bjorn Helgaas <[email protected]>
PCI: tegra194: Remove unnecessary L1SS disable code
Manikanta Maddireddy <[email protected]>
PCI: dwc: Apply ECRC workaround to DesignWare 5.00a as well
Manikanta Maddireddy <[email protected]>
PCI: tegra194: Use DWC IP core version
Vidya Sagar <[email protected]>
PCI: tegra194: Free up Endpoint resources during remove()
Vidya Sagar <[email protected]>
PCI: tegra194: Allow system suspend when the Endpoint link is not up
Vidya Sagar <[email protected]>
PCI: tegra194: Set LTR message request before PCIe link up in Endpoint mode
Vidya Sagar <[email protected]>
PCI: tegra194: Disable direct speed change for Endpoint mode
Vidya Sagar <[email protected]>
PCI: tegra194: Use devm_gpiod_get_optional() to parse "nvidia,refclk-select"
Manikanta Maddireddy <[email protected]>
PCI: tegra194: Disable PERST# IRQ only in Endpoint mode
Vidya Sagar <[email protected]>
PCI: tegra194: Don't force the device into the D0 state before L2
Manikanta Maddireddy <[email protected]>
PCI: tegra194: Disable LTSSM after transition to Detect on surprise link down
Manikanta Maddireddy <[email protected]>
PCI: tegra194: Increase LTSSM poll time on surprise link down
Vidya Sagar <[email protected]>
PCI: tegra194: Fix polling delay for L2 state
songxiebing <[email protected]>
ALSA: usb-audio: qcom: Fix incorrect type in enable_audio_stream
Richard Cheng <[email protected]>
PCI/NPEM: Set LED_HW_PLUGGABLE for hotplug-capable ports
Cássio Gabriel <[email protected]>
ASoC: SOF: compress: return the configured codec from get_params
Panagiotis Petrakopoulos <[email protected]>
ALSA: scarlett2: Add missing sentinel initializer field
Waiman Long <[email protected]>
selftest: memcg: skip memcg_sock test if address family not supported
Jane Chu <[email protected]>
Documentation: fix a hugetlbfs reservation statement
Pasha Tatashin <[email protected]>
kho: make debugfs interface optional
AnishMulay <[email protected]>
selftests/mm: skip migration tests if NUMA is unavailable
Eliot Courtney <[email protected]>
gpu: nova-core: bitfield: fix broken Default implementation
Joel Fernandes <[email protected]>
gpu: nova-core: bitfield: Move bitfield-specific code from register! into new macro
Alexandre Courbot <[email protected]>
gpu: nova-core: register: use field type for Into implementation
Chen-Yu Tsai <[email protected]>
PCI: mediatek-gen3: Prevent leaking IRQ domains when IRQ not found
Gerd Bayer <[email protected]>
PCI: Enable AtomicOps only if Root Port supports them
Denis Rastyogin <[email protected]>
ASoC: rsnd: Fix potential out-of-bounds access of component_dais[]
Giovanni Cabiddu <[email protected]>
crypto: qat - use swab32 macro
Giovanni Cabiddu <[email protected]>
crypto: iaa - fix per-node CPU counter reset in rebalance_wq_table()
Giovanni Cabiddu <[email protected]>
crypto: qat - fix type mismatch in RAS sysfs show functions
Giovanni Cabiddu <[email protected]>
crypto: qat - fix compression instance leak
Ahsan Atta <[email protected]>
crypto: qat - disable 420xx AE cluster when lead engine is fused off
Ahsan Atta <[email protected]>
crypto: qat - disable 4xxx AE cluster when lead engine is fused off
Hans Zhang <[email protected]>
PCI: dwc: Fix type mismatch for kstrtou32_from_user() return value
Srinivas Kandagatla <[email protected]>
ASoC: qcom: qdsp6: topology: check widget type before accessing data
Jason Gunthorpe <[email protected]>
iommu/riscv: Remove overflows on the invalidation path
Vasant Hegde <[email protected]>
iommu/amd: Fix clone_alias() to use the original device's devid
Shengjiu Wang <[email protected]>
ASoC: fsl_easrc: Change the type for iec958 channel status controls
Shengjiu Wang <[email protected]>
ASoC: fsl_easrc: Fix value type in fsl_easrc_iec958_get_bits()
Shengjiu Wang <[email protected]>
ASoC: fsl_easrc: Check the variable range in fsl_easrc_iec958_put_bits()
Shengjiu Wang <[email protected]>
ASoC: fsl_xcvr: Fix event generation in fsl_xcvr_mode_put()
Shengjiu Wang <[email protected]>
ASoC: fsl_xcvr: Fix event generation in fsl_xcvr_arc_mode_put()
Shengjiu Wang <[email protected]>
ASoC: fsl_micfil: Fix event generation in micfil_quality_set()
Shengjiu Wang <[email protected]>
ASoC: fsl_micfil: Fix event generation in micfil_put_dc_remover_state()
Shengjiu Wang <[email protected]>
ASoC: fsl_micfil: Fix event generation in hwvad_put_init_mode()
Shengjiu Wang <[email protected]>
ASoC: fsl_micfil: Fix event generation in hwvad_put_enable()
Shengjiu Wang <[email protected]>
ASoC: fsl_micfil: Add access property for "VAD Detected"
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: drop INTF_0 on MSM8953
Dmitry Baryshkov <[email protected]>
PM: domains: De-constify fields in struct dev_pm_domain_attach_data
Felix Gu <[email protected]>
pmdomain: imx: scu-pd: Fix device_node reference leak during ->probe()
Felix Gu <[email protected]>
pmdomain: ti: omap_prm: Fix a reference leak on device node
wangdicheng <[email protected]>
ALSA: hda/cmedia: Remove duplicate pin configuration parsing
Akhil P Oommen <[email protected]>
drm/msm/a6xx: Use barriers while updating HFI Q headers
Connor Abbott <[email protected]>
drm/msm/a6xx: Fix dumping A650+ debugbus blocks
Rob Clark <[email protected]>
drm/msm/shrinker: Fix can_block() logic
Rob Clark <[email protected]>
drm/msm/a6xx: Fix HLSQ register dumping
Rob Clark <[email protected]>
drm/msm: Fix VM_BIND UNMAP locking
Rob Clark <[email protected]>
drm/msm: Reject fb creation from _NO_SHARE objs
Rob Clark <[email protected]>
drm/msm/vma: Avoid lock in VM_BIND fence signaling path
Ethan Tidmore <[email protected]>
ASoC: SOF: Intel: hda: Place check before dereference
Lei Huang <[email protected]>
ALSA: hda/realtek: fix code style (ERROR: else should follow close brace '}')
Billy Tsai <[email protected]>
hwmon: (aspeed-g6-pwm-tach): remove redundant driver remove callback
Kuppuswamy Sathyanarayanan <[email protected]>
PCI/DPC: Log AER error info for DPC/EDR uncorrectable errors
Timur Kristóf <[email protected]>
drm/amdgpu/uvd4.2: Don't initialize UVD 4.2 when DPM is disabled
Timur Kristóf <[email protected]>
drm/amd/pm/smu7: Add SCLK cap for quirky Hawaii board
Timur Kristóf <[email protected]>
drm/amd/pm/ci: Fill DW8 fields from SMC
Timur Kristóf <[email protected]>
drm/amd/pm/ci: Clear EnabledForActivity field for memory levels
Timur Kristóf <[email protected]>
drm/amd/pm/ci: Fix powertune defaults for Hawaii 0x67B0
Timur Kristóf <[email protected]>
drm/amd/pm/smu7: Fix SMU7 voltage dependency on display clock
Timur Kristóf <[email protected]>
drm/amd/pm/ci: Disable MCLK DPM on problematic CI ASICs
Timur Kristóf <[email protected]>
drm/amd/pm/ci: Use highest MCLK on CI when MCLK DPM is disabled
Vijendar Mukunda <[email protected]>
ASoC: amd: acp: update dmic_num logic for acp pdm dmic
Cássio Gabriel <[email protected]>
ALSA: core: Validate compress device numbers without dynamic minors
Ethan Tidmore <[email protected]>
iommu/riscv: Fix signedness bug
Yaxing Guo <[email protected]>
iommu/riscv: Skip IRQ count check when using MSI interrupts
Ilpo Järvinen <[email protected]>
PCI: Fix alignment calculation for resource size larger than align
Wenkai Lin <[email protected]>
crypto: hisilicon/sec2 - prevent req used-after-free for sec
Ilpo Järvinen <[email protected]>
PCI: Fix premature removal from realloc_head list during resource assignment
Ilpo Järvinen <[email protected]>
PCI: Use res_to_dev_res() in reassign_resources_sorted()
Krishna Chaitanya Chundru <[email protected]>
PCI: qcom: Advertise Hotplug Slot Capability with no Command Completion support
Sebastian Reichel <[email protected]>
drm/panel: simple: Correct G190EAN01 prepare timing
Dmitry Baryshkov <[email protected]>
drm/panel: sharp-ls043t1le01: make use of prepare_prev_first
Alexey Charkov <[email protected]>
ASoC: rockchip: rockchip_sai: Set slot width for non-TDM mode
Alexander Koskovich <[email protected]>
drm/msm/dsi: rename MSM8998 DSI version from V2_2_0 to V2_0_0
Pengyu Luo <[email protected]>
drm/msm/dsi: fix hdisplay calculation for CMD mode panel
Pengyu Luo <[email protected]>
drm/msm/dsi: fix bits_per_pclk
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: don't try using 2 LMs if only one DSC is available
Pengyu Luo <[email protected]>
drm/msm/dsi: add the missing parameter description
Yuanjie Yang <[email protected]>
drm/msm/dpu: fix mismatch between power and frequency
Dmitry Baryshkov <[email protected]>
drm/msm: add missing MODULE_DEVICE_ID definitions
Nicolin Chen <[email protected]>
iommu/tegra241-cmdqv: Update uAPI to clarify HYP_OWN requirement
Nicolin Chen <[email protected]>
iommu/tegra241-cmdqv: Set supports_cmd op in tegra241_vcmdq_hw_init()
Alexandru Dadu <[email protected]>
drm/imagination: Switch reset_reason fields from enum to u32
Pei Xiao <[email protected]>
spi: hisi-kunpeng: prevent infinite while() loop in hisi_spi_flush_fifo
Alex Deucher <[email protected]>
drm/amdgpu/gfx11: look at the right prop for gfx queue priority
Alex Deucher <[email protected]>
drm/amdgpu/gfx10: look at the right prop for gfx queue priority
Koichiro Den <[email protected]>
PCI: dwc: rcar-gen4: Change EPC BAR alignment to 4K as per the documentation
Daniel Jordan <[email protected]>
padata: Put CPU offline callback in ONLINE section to allow failure
Chuyi Zhou <[email protected]>
padata: Remove cpu online check from cpu add and removal
Thorsten Blum <[email protected]>
crypto: atmel-aes - guard unregister on error in atmel_aes_register_algs
Thorsten Blum <[email protected]>
crypto: atmel - Use unregister_{aeads,ahashes,skciphers}Herbert Xu <[email protected]>
crypto: tegra - Disable softirqs before finalizing request
Andy Shevchenko <[email protected]>
fbdev: matroxfb: Mark variable with __maybe_unused to avoid W=1 build break
Guillaume Gonnet <[email protected]>
dm init: ensure device probing has finished in dm-mod.waitfor=
Srinivasan Shanmugam <[email protected]>
drm/amdgpu: Add default case in DVI mode validation
Fangyu Yu <[email protected]>
iommu/riscv: Stop polling when CQCSR reports an error
Jason Gunthorpe <[email protected]>
iommu/riscv: Add missing GENERIC_MSI_IRQ
Fangyu Yu <[email protected]>
iommu/riscv: Add IOTINVAL after updating DDT/PDT entries
Aleksander Jan Bajkowski <[email protected]>
crypto: inside-secure/eip93 - register hash before authenc algorithms
Ethan Tidmore <[email protected]>
drm/sun4i: Fix resource leaks
Maíra Canal <[email protected]>
drm/v3d: Handle error from drm_sched_entity_init()
David Carlier <[email protected]>
selftests/sched_ext: Add missing error check for exit__load()
Lijo Lazar <[email protected]>
drm/amd/pm: Fix xgmi max speed reporting
Vladimir Zapolskiy <[email protected]>
media: i2c: og01a1b: Fix V4L2 subdevice data initialization on probe
Felix Gu <[email protected]>
spi: fsl-qspi: Use reinit_completion() for repeated operations
Felix Gu <[email protected]>
spi: nxp-fspi: Use reinit_completion() for repeated operations
Harikrishna Shenoy <[email protected]>
drm/bridge: cadence: cdns-mhdp8546-core: Handle HDCP state in bridge atomic check
Jayesh Choudhary <[email protected]>
drm/bridge: cadence: cdns-mhdp8546-core: Add mode_valid hook to drm_bridge_funcs
Jayesh Choudhary <[email protected]>
drm/bridge: cadence: cdns-mhdp8546-core: Set the mhdp connector earlier in atomic_enable()
Randy Dunlap <[email protected]>
iopoll: fix function parameter names in read_poll_timeout_atomic()
Junrui Luo <[email protected]>
dm log: fix out-of-bounds write due to region_count overflow
Ming-Hung Tsai <[email protected]>
dm cache metadata: fix memory leak on metadata abort retry
Manivannan Sadhasivam <[email protected]>
PCI: dwc: Perform cleanup in the error path of dw_pcie_resume_noirq()
Richard Zhu <[email protected]>
PCI: dwc: Invoke post_init in dw_pcie_resume_noirq()
Aksh Garg <[email protected]>
PCI: dwc: ep: Fix MSI-X Table Size configuration in dw_pcie_ep_set_msix()
Rafael J. Wysocki <[email protected]>
platform/chrome: chromeos_tbmc: Drop wakeup source on remove
Benjamin Marzinski <[email protected]>
dm-mpath: don't stop probing paths at presuspend
Ming-Hung Tsai <[email protected]>
dm cache: fix dirty mapping checking in passthrough mode switching
Ming-Hung Tsai <[email protected]>
dm cache: fix concurrent write failure in passthrough mode
Ming-Hung Tsai <[email protected]>
dm cache policy smq: fix missing locks in invalidating cache blocks
Ming-Hung Tsai <[email protected]>
dm cache: fix write hang in passthrough mode
Ming-Hung Tsai <[email protected]>
dm cache: fix write path cache coherency in passthrough mode
Ming-Hung Tsai <[email protected]>
dm cache: fix null-deref with concurrent writes in passthrough mode
Sander Vanheule <[email protected]>
ASoC: sti: use managed regmap_field allocations
Sander Vanheule <[email protected]>
ASoC: sti: Return errors from regmap_field_alloc()
Aleksander Jan Bajkowski <[email protected]>
crypto: inside-secure/eip93 - fix register definition
Charles Keepax <[email protected]>
ASoC: SDCA: Update counting of SU/GE DAPM routes
Felix Gu <[email protected]>
PCI: imx6: Fix device node reference leak in imx_pcie_probe()
Ethan Tidmore <[email protected]>
drm/sun4i: backend: fix error pointer dereference
Koichiro Den <[email protected]>
PCI: endpoint: pci-ep-msi: Fix error unwind and prevent double alloc
Koichiro Den <[email protected]>
PCI: endpoint: pci-epf-test: Don't free doorbell IRQ unless requested
George Abraham P <[email protected]>
PCI/TPH: Allow TPH enable for RCiEPs
Kuninori Morimoto <[email protected]>
ASoC: soc-compress: use function to clear symmetric params
Val Packett <[email protected]>
drm/virtio: Allow importing prime buffers when 3D is enabled
Alexander Konyukhov <[email protected]>
drm/komeda: fix integer overflow in AFBC framebuffer size check
Yuwen Chen <[email protected]>
selftests/futex: Fix incorrect result reporting of futex_requeue test item
Lorenzo Bianconi <[email protected]>
net: airoha: Add missing PPE configurations in airoha_ppe_hw_init()
Jiayuan Chen <[email protected]>
net, bpf: fix null-ptr-deref in xdp_master_redirect() for down master
Xin Long <[email protected]>
sctp: fix missing encap_port propagation for GSO fragments
Kuniyuki Iwashima <[email protected]>
tcp: Don't set treq->req_usec_ts in cookie_tcp_reqsk_init().
Gabriel Krisman Bertazi <[email protected]>
udp: Force compute_score to always inline
Maxime Chevallier <[email protected]>
net: phy: qcom: at803x: Use the correct bit to disable extended next page
Stefan Metzmacher <[email protected]>
Bluetooth: SCO: check for codecs->num_codecs == 1 before assigning to sco_pi(sk)->codec
Dudu Lu <[email protected]>
Bluetooth: l2cap: Add missing chan lock in l2cap_ecred_reconf_rsp
Pauli Virtanen <[email protected]>
Bluetooth: fix locking in hci_conn_request_evt() with HCI_PROTO_DEFER
Jonathan Rissanen <[email protected]>
Bluetooth: hci_ldisc: Clear HCI_UART_PROTO_INIT on error
Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Fix printing wrong information if SDU length exceeds MTU
Sun Jian <[email protected]>
bpf: reject short IPv4/IPv6 inputs in bpf_prog_test_run_skb
Gal Pressman <[email protected]>
net/mlx5e: IPsec, fix ASO poll timeout with read_poll_timeout_atomic()
Gal Pressman <[email protected]>
net/mlx5e: Fix features not applied during netdev registration
Charles Perry <[email protected]>
net: phy: fix a return path in get_phy_c45_ids()
Josua Mayer <[email protected]>
dt-bindings: net: dsa: nxp,sja1105: make spi-cpol optional for sja1110
Luca Weiss <[email protected]>
net: ipa: Fix decoding EV_PER_EE for IPA v5.0+
Luca Weiss <[email protected]>
net: ipa: Fix programming of QTIME_TIMESTAMP_CFG
Taegu Ha <[email protected]>
ppp: require CAP_NET_ADMIN in target netns for unattached ioctls
Lang Xu <[email protected]>
bpf: Fix OOB in pcpu_init_value
Greg Jumper <[email protected]>
net/rds: Restrict use of RDS/IB to the initial network namespace
Håkon Bugge <[email protected]>
net/rds: Optimize rds_ib_laddr_check
Paul Chaignon <[email protected]>
selftests/bpf: Fix reg_bounds to match new tnum-based refinement
Emil Tsalapatis <[email protected]>
bpf: Allow instructions with arena source and non-arena dest registers
Lorenzo Bianconi <[email protected]>
net: airoha: Add missing RX_CPU_IDX() configuration in airoha_qdma_cleanup_rx_queue()
Erni Sri Satya Vennela <[email protected]>
net: mana: Move current_speed debugfs file to mana_init_port()
Haiyang Zhang <[email protected]>
net: mana: Support HW link state events
Erni Sri Satya Vennela <[email protected]>
net: mana: Use pci_name() for debugfs directory naming
Florian Westphal <[email protected]>
selftests: netfilter: nft_tproxy.sh: adjust to socat changes
Jamal Hadi Salim <[email protected]>
net/sched: act_ct: Only release RCU read lock after ct_ft
Eduard Zingerman <[email protected]>
selftests/bpf: fix __jited_unpriv tag name
Daniel Borkmann <[email protected]>
bpf: Enforce regsafe base id consistency for BPF_ADD_CONST scalars
Puranjay Mohan <[email protected]>
bpf: Relax scalar id equivalence for state pruning
Lorenzo Bianconi <[email protected]>
net: airoha: Fix FE_PSE_BUF_SET configuration if PPE2 is available
Lorenzo Bianconi <[email protected]>
net: airoha: Generalize airoha_ppe2_is_enabled routine
Lorenzo Bianconi <[email protected]>
net: airoha: Add airoha_eth_soc_data struct
Lorenzo Bianconi <[email protected]>
net: airoha: Add airoha_ppe_get_num_stats_entries() and airoha_ppe_get_num_total_stats_entries()
Mashiro Chen <[email protected]>
net: hamradio: 6pack: fix uninit-value in sixpack_receive_buf
Sechang Lim <[email protected]>
bpf: Fix RCU stall in bpf_fd_array_map_clear()
Puranjay Mohan <[email protected]>
bpf: return VMA snapshot from task_vma iterator
Puranjay Mohan <[email protected]>
bpf: switch task_vma iterator from mmap_lock to per-VMA locks
Puranjay Mohan <[email protected]>
bpf: fix mm lifecycle in open-coded task_vma iterator
Florian Westphal <[email protected]>
netfilter: nft_fwd_netdev: check ttl/hl before forwarding
Florian Westphal <[email protected]>
netfilter: xt_socket: enable defrag after all other checks
Mohsin Bashir <[email protected]>
eth: fbnic: Use wake instead of start
Lorenzo Bianconi <[email protected]>
net: airoha: Add dma_rmb() and READ_ONCE() in airoha_qdma_rx_process()
Justin Chen <[email protected]>
net: bcmgenet: fix racing timeout handler
Justin Chen <[email protected]>
net: bcmgenet: fix leaking free_bds
Justin Chen <[email protected]>
net: bcmgenet: fix off-by-one in bcmgenet_put_txcb
Cosmin Ratiu <[email protected]>
macsec: Support VLAN-filtering lower devices
Wang Wensheng <[email protected]>
arm64: kexec: Remove duplicate allocation for trans_pgd
Haoyu Lu <[email protected]>
ACPI: AGDI: fix missing newline in error message
Mark Rutland <[email protected]>
arm64: entry: Don't preempt with SError or Debug masked
Daniel Borkmann <[email protected]>
bpf: Fix linked reg delta tracking when src_reg == dst_reg
Puranjay Mohan <[email protected]>
bpf: Support negative offsets, BPF_SUB, and alu32 for linked register tracking
Baochen Qiang <[email protected]>
wifi: ath10k: fix station lookup failure during disconnect
Weiming Shi <[email protected]>
bpf: reject negative CO-RE accessor indices in bpf_core_parse_spec()
Jiayuan Chen <[email protected]>
bpf: Drop task_to_inode and inet_conn_established from lsm sleepable hooks
Nicolas Escande <[email protected]>
wifi: mac80211: handle VHT EXT NSS in ieee80211_determine_our_sta_mode()
Ethan Tidmore <[email protected]>
wifi: brcmfmac: Fix error pointer dereference
Arnd Bergmann <[email protected]>
net: ethernet: ti-cpsw: fix linking built-in code to modules
Arnd Bergmann <[email protected]>
net: ethernet: ti-cpsw:: rename soft_reset() function
MingTao Huang <[email protected]>
bpf: Fix stale offload->prog pointer after constant blinding
Weiming Shi <[email protected]>
bpf: fix end-of-list detection in cgroup_storage_get_next_key()
Eric Dumazet <[email protected]>
macvlan: annotate data-races around port->bc_queue_len_used
Leon Hwang <[email protected]>
bpf: Fix abuse of kprobe_write_ctx via freplace
Amit Machhiwal <[email protected]>
selftests/powerpc: Suppress -Wmaybe-uninitialized with GCC 15
Sourabh Jain <[email protected]>
powerpc/crash: Update backup region offset in elfcorehdr on memory hotplug
Sourabh Jain <[email protected]>
powerpc/crash: fix backup region offset update to elfcorehdr
Chih Kai Hsu <[email protected]>
r8152: fix incorrect register write to USB_UPHY_XTAL
Ritesh Harjani (IBM) <[email protected]>
drivers/vfio_pci_core: Change PXD_ORDER check from switch case to if/else block
Ankit Agrawal <[email protected]>
vfio: refactor vfio_pci_mmap_huge_fault function
Alexey Velichayshiy <[email protected]>
wifi: rtw89: phy: fix uninitialized variable access in rtw89_phy_cfo_set_crystal_cap()
haoyu.lu <[email protected]>
bpf,arc_jit: Fix missing newline in pr_err messages
Alexei Starovoitov <[email protected]>
bpf: Fix variable length stack write over spilled pointers
David Carlier <[email protected]>
bpf: Use RCU-safe iteration in dev_map_redirect_multi() SKB path
Keisuke Nishimura <[email protected]>
bpf: Fix refcount check in check_struct_ops_btf_id()
Peter Chiu <[email protected]>
wifi: mt76: mt7996: fix RRO EMU configuration
Chad Monroe <[email protected]>
wifi: mt76: support upgrading passive scans to active
Chad Monroe <[email protected]>
wifi: mt76: fix multi-radio on-channel scanning
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Decrement sta counter removing the link in mt7996_mac_reset_sta_iter()
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Switch to the secondary link if the default one is removed
Shayne Chen <[email protected]>
wifi: mt76: mt7996: use correct link_id when filling TXD and TXP
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Remove link pointer dependency in mt7996_mac_sta_remove_links()
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Add missing CHANCTX_STA_CSA property
Michael Lo <[email protected]>
wifi: mt76: mt7921: fix 6GHz regulatory update on connection
Duoming Zhou <[email protected]>
wifi: mt76: mt7996: fix use-after-free bugs in mt7996_mac_dump_work()
Duoming Zhou <[email protected]>
wifi: mt76: mt7915: fix use-after-free bugs in mt7915_mac_dump_work()
StanleyYP Wang <[email protected]>
wifi: mt76: mt7996: fix struct mt7996_mcu_uni_event
Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix wrong DMAD length when using MAC TXP
James Clark <[email protected]>
arm64: cpufeature: Make PMUVer and PerfMon unsigned
Chad Monroe <[email protected]>
wifi: mt76: fix deadlock in remain-on-channel
Sean Wang <[email protected]>
wifi: mt76: mt7921: fix potential deadlock in mt7921_roc_abort_sync
Sean Wang <[email protected]>
wifi: mt76: mt7925: fix potential deadlock in mt7925_roc_abort_sync
Sean Wang <[email protected]>
wifi: mt76: mt7925: drop puncturing handling from BSS change path
Jack Kao <[email protected]>
wifi: mt76: mt7925: cqm rssi low/high event notify
Lorenzo Bianconi <[email protected]>
wifi: mt76: Fix memory leak destroying device
Rory Little <[email protected]>
wifi: mt76: mt7921: Place upper limit on station AID
Alok Tiwari <[email protected]>
wifi: mt76: mt7996: fix FCS error flag check in RX descriptor
Ming Yen Hsieh <[email protected]>
wifi: mt76: mt7925: prevent NULL vif dereference in mt7925_mac_write_txwi
Ming Yen Hsieh <[email protected]>
wifi: mt76: mt7925: prevent NULL pointer dereference in mt7925_tx_check_aggr()
Ryder Lee <[email protected]>
wifi: mt76: mt7915: fix use_cts_prot support
Ryder Lee <[email protected]>
wifi: mt76: mt7615: fix use_cts_prot support
Leon Yen <[email protected]>
wifi: mt76: mt7925: Fix incorrect MLO mode in firmware control
Sean Wang <[email protected]>
wifi: mt76: mt7921: Reset ampdu_state state in case of failure in mt76_connac2_tx_check_aggr()
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Reset ampdu_state state in case of failure in mt7996_tx_check_aggr()
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Clear wcid pointer in mt7996_mac_sta_deinit_link()
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Reset mtxq->idx if primary link is removed in mt7996_vif_link_remove()
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Set mtxq->wcid just for primary link
Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix iface combination for different chipsets
StanleyYP Wang <[email protected]>
wifi: mt76: mt7996: fix the behavior of radar detection
David Laight <[email protected]>
tools/nolibc/printf: Move snprintf length check to callback
David Laight <[email protected]>
tools/nolibc/printf: Change variables 'c' to 'ch' and 'tmpbuf[]' to 'outbuf[]'
Benjamin Berg <[email protected]>
tools/nolibc: implement %m if errno is not defined
Heitor Alves de Siqueira <[email protected]>
wifi: libertas: don't kill URBs in interrupt context
Heitor Alves de Siqueira <[email protected]>
wifi: libertas: use USB anchors for tracking in-flight URBs
Petr Pavlu <[email protected]>
module: Fix freeing of charp module parameters when CONFIG_SYSFS=n
Petr Pavlu <[email protected]>
params: Replace __modinit with __init_or_module
Ritesh Harjani (IBM) <[email protected]>
powerpc/pgtable-frag: Fix bad page state in pte_frag_destroy
Ilya Leoshkevich <[email protected]>
s390/bpf: Zero-extend bpf prog return values and kfunc arguments
Cai Xinchen <[email protected]>
dpaa2: compile dpaa2 even CONFIG_FSL_DPAA2_ETH=n
Cai Xinchen <[email protected]>
dpaa2: add independent dependencies for FSL_DPAA2_SWITCH
Shayne Chen <[email protected]>
wifi: ieee80211: fix definition of EHT-MCS 15 in MRU
Johannes Berg <[email protected]>
wifi: ieee80211: split EHT definitions out
Johannes Berg <[email protected]>
wifi: ieee80211: split HE definitions out
Johannes Berg <[email protected]>
wifi: ieee80211: split VHT definitions out
Johannes Berg <[email protected]>
wifi: ieee80211: split HT definitions out
Johannes Berg <[email protected]>
wifi: ieee80211: split mesh definitions out
Feng Yang <[email protected]>
bpf: test_run: Fix the null pointer dereference issue in bpf_lwt_xmit_push_encap
Duoming Zhou <[email protected]>
wifi: rtlwifi: pci: fix possible use-after-free caused by unfinished irq_prepare_bcn_tasklet
Zilin Guan <[email protected]>
wifi: mwifiex: Fix memory leak in mwifiex_11n_aggregate_pkt()
Michal Koutný <[email protected]>
sched/rt: Skip group schedulable check with rt_group_sched=0
John Stultz <[email protected]>
sched: Make class_schedulers avoid pushing current, and get rid of proxy_tag_curr()
Mario Limonciello (AMD) <[email protected]>
firmware: dmi: Correct an indexing error in dmi.h
Thomas Weißschuh <[email protected]>
x86/vdso: Clean up remnants of VDSO32_NOTE_MASK
Ahmed S. Darwish <[email protected]>
ASoC: Intel: avs: Include CPUID header at file scope
Ahmed S. Darwish <[email protected]>
ASoC: Intel: avs: Check maximum valid CPUID leaf
Biju Das <[email protected]>
irqchip/renesas-rzg2l: Fix error path in rzg2l_irqc_common_probe()
Peter Zijlstra <[email protected]>
sched/topology: Fix sched_domain_span()
K Prateek Nayak <[email protected]>
sched/topology: Compute sd_weight considering cpuset partitions
Bart Van Assche <[email protected]>
locking: Fix rwlock support in <linux/spinlock_up.h>
Thomas Weißschuh (Schneider Electric) <[email protected]>
scripts/gdb: timerlist: Adapt to move of tk_core
Thomas Weißschuh <[email protected]>
sparc64: vdso: Link with -z noexecstack
Boqun Feng <[email protected]>
rust: sync: atomic: Remove bound T: Sync for Atomic::from_ptr()
Xiaoyao Li <[email protected]>
x86/tdx: Fix the typo in TDX_ATTR_MIGRTABLE
Ravi Bangoria <[email protected]>
perf/amd/ibs: Avoid calling perf_allow_kernel() from the IBS NMI handler
Ravi Bangoria <[email protected]>
perf/amd/ibs: Preserve PhyAddrVal bit when clearing PhyAddr MSR
Thomas Gleixner <[email protected]>
hrtimer: Reduce trace noise in hrtimer_start()
Peter Zijlstra <[email protected]>
hrtimer: Avoid pointless reprogramming in __hrtimer_start_range_ns()
Brian Masney <[email protected]>
irqchip/irq-pic32-evic: Address warning related to wrong printf() formatter
Danilo Krummrich <[email protected]>
bus: fsl-mc: use generic driver_override infrastructure
Danilo Krummrich <[email protected]>
s390/cio: use generic driver_override infrastructure
Danilo Krummrich <[email protected]>
vdpa: use generic driver_override infrastructure
Danilo Krummrich <[email protected]>
platform/wmi: use generic driver_override infrastructure
Danilo Krummrich <[email protected]>
PCI: use generic driver_override infrastructure
K Prateek Nayak <[email protected]>
cpufreq: Pass the policy to cpufreq_driver->adjust_perf()
Gautham R. Shenoy <[email protected]>
amd-pstate: Update cppc_req_cached in fast_switch case
Gautham R. Shenoy <[email protected]>
amd-pstate: Fix memory leak in amd_pstate_epp_cpu_init()
Gui-Dong Han <[email protected]>
soundwire: debugfs: initialize firmware_file to empty string
Gui-Dong Han <[email protected]>
debugfs: fix placement of EXPORT_SYMBOL_GPL for debugfs_create_str()
Gui-Dong Han <[email protected]>
debugfs: check for NULL pointer in debugfs_create_str()
Gopi Krishna Menon <[email protected]>
thermal/drivers/spear: Fix error condition for reading st,thermal-flags
Danilo Krummrich <[email protected]>
devres: fix missing node debug info in devm_krealloc()
Rafael J. Wysocki <[email protected]>
ACPI: x86: cmos_rtc: Improve coordination with ACPI TAD driver
Rafael J. Wysocki <[email protected]>
ACPI: x86: cmos_rtc: Clean up address space handler driver
Viresh Kumar <[email protected]>
OPP: Move break out of scoped_guard in dev_pm_opp_xlate_required_opp()
Manivannan Sadhasivam <[email protected]>
OPP: debugfs: Use performance level if available to distinguish between rates
Filipe Manana <[email protected]>
btrfs: fix deadlock between reflink and transaction commit when using flushoncommit
Yu Kuai <[email protected]>
md: wake raid456 reshape waiters before suspend
Abd-Alrhman Masalkhi <[email protected]>
md: remove unused static md_wq workqueue
Marco Crivellari <[email protected]>
dm: add WQ_PERCPU to alloc_workqueue users
Zhan Xusheng <[email protected]>
erofs: handle 48-bit blocks/uniaddr for extra devices
Yu Kuai <[email protected]>
md: fix array_state=clear sysfs deadlock
Zhan Xusheng <[email protected]>
erofs: include the trailing NUL in FS_IOC_GETFSLABEL
Gao Xiang <[email protected]>
erofs: verify metadata accesses for file-backed mounts
Cole Leavitt <[email protected]>
pstore/ram: fix resource leak when ioremap() fails
Jackie Liu <[email protected]>
blk-cgroup: fix disk reference leak in blkcg_maybe_throttle_current()
Deepanshu Kartikey <[email protected]>
nilfs2: reject zero bd_oblocknr in nilfs_ioctl_mark_blocks_dirty()
Daan De Meyer <[email protected]>
loop: fix partition scan race between udev and loop_reread_partitions()
Bart Van Assche <[email protected]>
drbd: Balance RCU calls in drbd_adm_dump_devices()
Xiao Ni <[email protected]>
md/raid1: fix the comparing region of interval tree
HyungJung Joo <[email protected]>
fs/mbcache: cancel shrink work before destroying the cache
HyungJung Joo <[email protected]>
fs/omfs: reject s_sys_blocksize smaller than OMFS_DIR_START
Ming Lei <[email protected]>
blk-cgroup: wait for blkcg cleanup before initializing new disk
-------------
Diffstat:
.../bindings/interrupt-controller/arm,gic-v3.yaml | 2 +- .../devicetree/bindings/net/dsa/nxp,sja1105.yaml | 2 - .../bindings/ufs/rockchip,rk3576-ufshc.yaml | 7 +- Documentation/mm/hugetlbfs_reserv.rst | 2 +- Documentation/netlink/specs/psp.yaml | 2 + Documentation/process/deprecated.rst | 24 + Documentation/tools/rtla/common_options.txt | 2 +- MAINTAINERS | 2 +- Makefile | 4 +- arch/arc/net/bpf_jit_arcv2.c | 8 +- arch/arm/boot/dts/mediatek/mt7623.dtsi | 2 +- .../boot/dts/nxp/imx/imx27-eukrea-cpuimx27.dtsi | 8 +- .../nxp/imx/imx27-eukrea-mbimxsd27-baseboard.dts | 2 +- arch/arm/mach-omap1/clock_data.c | 4 +- arch/arm/net/bpf_jit_32.c | 6 + arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 6 + .../boot/dts/amlogic/meson-gxl-s905d-p230.dts | 3 +- arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 161 +- .../boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi | 4 + .../boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi | 4 + arch/arm64/boot/dts/freescale/imx8dxl-evk.dts | 114 +- .../arm64/boot/dts/freescale/imx8mm-emtop-som.dtsi | 4 +- .../arm64/boot/dts/freescale/imx8mm-tqma8mqml.dtsi | 2 +- .../arm64/boot/dts/freescale/imx8mn-tqma8mqnl.dtsi | 2 +- .../freescale/imx8mp-aristainetos3a-som-v1.dtsi | 2 +- .../dts/freescale/imx8mp-data-modul-edm-sbc.dts | 2 +- .../boot/dts/freescale/imx8mp-debix-model-a.dts | 2 +- .../dts/freescale/imx8mp-debix-som-a-bmb-08.dts | 2 +- .../boot/dts/freescale/imx8mp-debix-som-a.dtsi | 2 +- .../arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mp-edm-g.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 2 +- .../imx8mp-hummingboard-pulse-mini-hdmi.dtsi | 11 +- .../boot/dts/freescale/imx8mp-icore-mx8mp.dtsi | 2 +- .../boot/dts/freescale/imx8mp-kontron-dl.dtso | 19 + .../boot/dts/freescale/imx8mp-kontron-osm-s.dtsi | 6 + .../imx8mp-kontron-smarc-eval-carrier.dts | 1 - arch/arm64/boot/dts/freescale/imx8mp-navqp.dts | 2 +- .../boot/dts/freescale/imx8mp-nitrogen-som.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mp-sr-som.dtsi | 4 +- .../freescale/imx8mp-tqma8mpql-mba8mp-ras314.dts | 4 +- .../boot/dts/freescale/imx8mp-ultra-mach-sbc.dts | 4 +- arch/arm64/boot/dts/freescale/imx8qm-mek.dts | 10 +- arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 10 +- arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts | 2 + arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi | 2 +- arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 2 +- arch/arm64/boot/dts/mediatek/mt6795.dtsi | 2 +- arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 2 +- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 2 +- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 5 +- arch/arm64/boot/dts/qcom/lemans.dtsi | 6 +- arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts | 2 +- arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts | 2 +- arch/arm64/boot/dts/qcom/msm8953-xiaomi-vince.dts | 2 +- arch/arm64/boot/dts/qcom/qcs8300.dtsi | 6 +- .../dts/qcom/sdm845-xiaomi-beryllium-common.dtsi | 1 + arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts | 60 +- arch/arm64/boot/dts/qcom/sm6150.dtsi | 3 + arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 4 + arch/arm64/boot/dts/qcom/sm8250.dtsi | 5 + arch/arm64/boot/dts/qcom/sm8450.dtsi | 5 +- arch/arm64/boot/dts/qcom/sm8550.dtsi | 13 +- arch/arm64/boot/dts/qcom/sm8650.dtsi | 15 +- arch/arm64/boot/dts/qcom/sm8750.dtsi | 2 +- arch/arm64/boot/dts/qcom/x1e80100.dtsi | 10 +- arch/arm64/boot/dts/rockchip/rk3328-a1.dts | 23 - arch/arm64/boot/dts/rockchip/rk3562-evb2-v10.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3566-lckfb-tspi.dts | 4 +- arch/arm64/boot/dts/rockchip/rk3576.dtsi | 5 +- arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts | 2 +- .../boot/dts/rockchip/rk3588s-gameforce-ace.dts | 12 +- arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts | 14 +- arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 6 +- arch/arm64/include/asm/entry-common.h | 21 +- arch/arm64/include/asm/kernel-pgtable.h | 7 +- arch/arm64/include/asm/xor.h | 2 +- arch/arm64/kernel/cpufeature.c | 4 +- arch/arm64/kernel/machine_kexec.c | 3 - arch/arm64/kernel/pi/patch-scs.c | 4 +- arch/arm64/net/bpf_jit_comp.c | 16 +- arch/powerpc/include/asm/kexec.h | 14 +- arch/powerpc/kexec/crash.c | 64 + arch/powerpc/kexec/file_load_64.c | 29 +- arch/powerpc/mm/pgtable-frag.c | 1 + arch/powerpc/platforms/44x/warp.c | 2 + arch/powerpc/platforms/pseries/papr-hvpipe.c | 59 +- arch/riscv/Kconfig | 22 + arch/riscv/kernel/traps_misaligned.c | 2 +- arch/riscv/net/bpf_jit.h | 6 - arch/riscv/net/bpf_jit_core.c | 7 - arch/s390/kvm/interrupt.c | 3 +- arch/s390/kvm/pci.c | 6 +- arch/s390/mm/fault.c | 2 +- arch/s390/net/bpf_jit_comp.c | 39 +- arch/sparc/vdso/Makefile | 2 +- arch/x86/Makefile.um | 2 + arch/x86/coco/tdx/debug.c | 2 +- arch/x86/entry/vdso/vdso2c.c | 1 - arch/x86/events/amd/ibs.c | 7 +- arch/x86/events/intel/core.c | 17 +- arch/x86/events/perf_event.h | 10 + arch/x86/events/perf_event_flags.h | 1 + arch/x86/include/asm/shared/tdx.h | 4 +- arch/x86/include/asm/vdso.h | 1 - arch/x86/kernel/acpi/cppc.c | 6 +- arch/x86/kernel/relocate_kernel_64.S | 8 + arch/x86/kvm/trace.h | 2 +- arch/x86/um/vdso/Makefile | 7 +- block/blk-cgroup.c | 16 + block/disk-events.c | 3 +- crypto/af_alg.c | 2 + crypto/jitterentropy-kcapi.c | 14 +- drivers/accel/rocket/rocket_gem.c | 2 + drivers/acpi/apei/einj-core.c | 55 +- drivers/acpi/arm64/agdi.c | 2 +- drivers/acpi/x86/cmos_rtc.c | 79 +- drivers/ata/libata-scsi.c | 4 +- drivers/base/devres.c | 2 + drivers/block/drbd/drbd_nl.c | 8 +- drivers/bluetooth/btmtk.c | 4 +- drivers/bluetooth/hci_ldisc.c | 3 + drivers/bus/fsl-mc/fsl-mc-bus.c | 43 +- drivers/bus/stm32_rifsc.c | 52 +- drivers/cdrom/cdrom.c | 73 +- drivers/char/ipmi/ssif_bmc.c | 34 +- drivers/clk/clk-qoriq.c | 17 +- drivers/clk/clk-xgene.c | 2 + drivers/clk/imx/clk-imx6q.c | 12 +- drivers/clk/imx/clk-imx8mq.c | 4 +- drivers/clk/qcom/dispcc-glymur.c | 4 +- drivers/clk/qcom/dispcc-milos.c | 1 - drivers/clk/qcom/dispcc-sc7180.c | 8 + drivers/clk/qcom/dispcc-sc8280xp.c | 4 - drivers/clk/qcom/dispcc-sm4450.c | 1 - drivers/clk/qcom/dispcc-sm8250.c | 6 +- drivers/clk/qcom/dispcc-sm8450.c | 2 +- drivers/clk/qcom/dispcc0-sa8775p.c | 2 - drivers/clk/qcom/dispcc1-sa8775p.c | 2 - drivers/clk/qcom/gcc-glymur.c | 1 + drivers/clk/qcom/gcc-sc8180x.c | 64 +- drivers/clk/qcom/gcc-x1e80100.c | 1 + drivers/clk/qcom/gdsc.c | 12 +- drivers/clk/renesas/r9a09g057-cpg.c | 145 +- drivers/clk/spacemit/ccu_mix.c | 2 +- drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 17 +- drivers/clk/visconti/pll.c | 2 +- drivers/cpufreq/amd-pstate.c | 6 +- drivers/cpufreq/cpufreq.c | 6 +- drivers/cpufreq/intel_pstate.c | 4 +- drivers/crypto/atmel-aes.c | 23 +- drivers/crypto/atmel-sha.c | 27 +- drivers/crypto/atmel-tdes.c | 25 +- drivers/crypto/ccp/ccp-crypto-aes.c | 7 +- drivers/crypto/hisilicon/sec2/sec_crypto.c | 2 +- drivers/crypto/inside-secure/eip93/eip93-common.c | 2 +- drivers/crypto/inside-secure/eip93/eip93-main.c | 16 +- drivers/crypto/inside-secure/eip93/eip93-regs.h | 2 +- drivers/crypto/intel/iaa/iaa_crypto_main.c | 2 +- .../crypto/intel/qat/qat_420xx/adf_420xx_hw_data.c | 20 +- .../crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c | 14 +- .../intel/qat/qat_common/adf_sysfs_ras_counters.c | 12 +- .../intel/qat/qat_common/icp_qat_hw_20_comp.h | 10 +- .../crypto/intel/qat/qat_common/qat_comp_algs.c | 10 +- drivers/crypto/sa2ul.c | 4 +- drivers/crypto/tegra/tegra-se-aes.c | 9 + drivers/crypto/tegra/tegra-se-hash.c | 3 + drivers/cxl/pci.c | 3 + drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 2 - drivers/dma/mxs-dma.c | 1 + drivers/dpll/dpll_core.c | 106 + drivers/dpll/dpll_core.h | 6 + drivers/dpll/dpll_netlink.c | 16 + drivers/dpll/dpll_netlink.h | 2 - drivers/firmware/arm_ffa/driver.c | 2 +- drivers/firmware/efi/capsule-loader.c | 2 +- drivers/fwctl/main.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 57 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 66 + drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 2 + drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 10 + drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 5 + drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 + drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 + drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 3 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 1 + drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 62 + .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 4 +- .../amd/display/dc/resource/dce60/dce60_resource.c | 3 +- .../amd/display/dc/resource/dce80/dce80_resource.c | 3 +- .../amd/display/include/grph_object_ctrl_defs.h | 4 + drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 15 + .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 118 +- .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.h | 1 + drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h | 1 + .../gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 15 +- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c | 5 +- .../drm/arm/display/komeda/komeda_framebuffer.c | 6 +- .../gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 72 +- .../gpu/drm/bridge/cadence/cdns-mhdp8546-core.h | 1 + .../gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c | 18 +- drivers/gpu/drm/drm_color_mgmt.c | 2 +- drivers/gpu/drm/drm_gem.c | 7 +- drivers/gpu/drm/gma500/oaktrail_hdmi.c | 1 + drivers/gpu/drm/gma500/oaktrail_lvds.c | 9 +- drivers/gpu/drm/i915/display/intel_dp.c | 9 +- drivers/gpu/drm/i915/display/skl_watermark.c | 4 +- drivers/gpu/drm/i915/gt/intel_reset.c | 3 +- drivers/gpu/drm/imagination/pvr_rogue_fwif.h | 8 +- .../gpu/drm/imagination/pvr_rogue_fwif_shared.h | 6 +- drivers/gpu/drm/loongson/lsdc_drv.c | 2 +- drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 14 +- drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 14 +- .../drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h | 7 - drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 3 +- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 - drivers/gpu/drm/msm/dp/dp_display.c | 1 + drivers/gpu/drm/msm/dsi/dsi.c | 1 + drivers/gpu/drm/msm/dsi/dsi_cfg.c | 4 +- drivers/gpu/drm/msm/dsi/dsi_cfg.h | 2 +- drivers/gpu/drm/msm/dsi/dsi_host.c | 16 +- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 1 + drivers/gpu/drm/msm/hdmi/hdmi.c | 1 + drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 1 + drivers/gpu/drm/msm/msm_fb.c | 7 +- drivers/gpu/drm/msm/msm_gem.c | 3 + drivers/gpu/drm/msm/msm_gem_shrinker.c | 5 +- drivers/gpu/drm/msm/msm_gem_vma.c | 11 +- drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 1 + drivers/gpu/drm/panel/panel-simple.c | 2 +- drivers/gpu/drm/panfrost/panfrost_drv.c | 2 + drivers/gpu/drm/sun4i/sun4i_backend.c | 6 +- drivers/gpu/drm/sysfb/ofdrm.c | 2 + drivers/gpu/drm/ttm/ttm_bo.c | 2 +- drivers/gpu/drm/ttm/ttm_resource.c | 5 +- drivers/gpu/drm/v3d/v3d_drv.c | 16 +- drivers/gpu/drm/v3d/v3d_submit.c | 5 + drivers/gpu/drm/virtio/virtgpu_prime.c | 2 +- drivers/gpu/drm/xe/xe_dma_buf.c | 52 +- drivers/gpu/drm/xe/xe_eu_stall.c | 4 +- drivers/gpu/drm/xe/xe_exec_queue.c | 7 +- drivers/gpu/drm/xe/xe_gsc.c | 2 +- drivers/gpu/drm/xe/xe_reg_whitelist.c | 2 +- drivers/gpu/nova-core/bitfield.rs | 318 +++ drivers/gpu/nova-core/falcon.rs | 38 +- drivers/gpu/nova-core/nova_core.rs | 3 + drivers/gpu/nova-core/regs/macros.rs | 259 +- drivers/hid/bpf/hid_bpf_dispatch.c | 6 +- drivers/hid/hid-asus.c | 28 +- drivers/hid/hid-core.c | 67 +- drivers/hid/hid-gfrm.c | 4 +- drivers/hid/hid-logitech-hidpp.c | 2 +- drivers/hid/hid-multitouch.c | 2 +- drivers/hid/hid-primax.c | 2 +- drivers/hid/hid-vivaldi-common.c | 2 +- drivers/hid/i2c-hid/i2c-hid-core.c | 7 +- drivers/hid/usbhid/hid-core.c | 13 +- drivers/hid/wacom_sys.c | 6 +- drivers/hte/Kconfig | 6 +- drivers/hwmon/aspeed-g6-pwm-tach.c | 8 - drivers/i3c/master.c | 32 +- drivers/i3c/master/adi-i3c-master.c | 2 +- drivers/i3c/master/dw-i3c-master.c | 16 +- drivers/i3c/master/mipi-i3c-hci/dma.c | 5 +- drivers/i3c/master/renesas-i3c.c | 4 +- drivers/infiniband/core/iwpm_msg.c | 6 +- drivers/iommu/amd/iommu.c | 15 +- drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 7 +- drivers/iommu/intel/iommu.c | 16 +- drivers/iommu/iommufd/selftest.c | 4 +- drivers/iommu/iommufd/vfio_compat.c | 2 +- drivers/iommu/riscv/Kconfig | 1 + drivers/iommu/riscv/iommu-platform.c | 17 +- drivers/iommu/riscv/iommu.c | 84 +- drivers/irqchip/irq-gic-v5-its.c | 34 +- drivers/irqchip/irq-gic-v5.c | 98 +- drivers/irqchip/irq-meson-gpio.c | 3 +- drivers/irqchip/irq-pic32-evic.c | 2 +- drivers/irqchip/irq-renesas-rzg2l.c | 2 +- drivers/irqchip/irq-riscv-imsic-early.c | 2 + drivers/leds/blink/leds-lgm-sso.c | 2 - drivers/mailbox/mailbox-test.c | 39 +- drivers/mailbox/mailbox.c | 3 +- drivers/mailbox/mtk-cmdq-mailbox.c | 8 +- drivers/md/dm-bufio.c | 3 +- drivers/md/dm-cache-metadata.c | 24 +- drivers/md/dm-cache-metadata.h | 5 - drivers/md/dm-cache-policy-smq.c | 4 + drivers/md/dm-cache-target.c | 76 +- drivers/md/dm-clone-target.c | 3 +- drivers/md/dm-crypt.c | 6 +- drivers/md/dm-delay.c | 4 +- drivers/md/dm-init.c | 4 +- drivers/md/dm-integrity.c | 15 +- drivers/md/dm-kcopyd.c | 3 +- drivers/md/dm-log-userspace-base.c | 3 +- drivers/md/dm-log.c | 6 +- drivers/md/dm-mpath.c | 14 +- drivers/md/dm-raid1.c | 5 +- drivers/md/dm-snap-persistent.c | 3 +- drivers/md/dm-stripe.c | 2 +- drivers/md/dm-verity-target.c | 4 +- drivers/md/dm-writecache.c | 3 +- drivers/md/dm.c | 3 +- drivers/md/md-bitmap.c | 133 +- drivers/md/md-bitmap.h | 2 +- drivers/md/md-llbitmap.c | 7 +- drivers/md/md.c | 257 +- drivers/md/md.h | 3 + drivers/md/raid1-10.c | 7 +- drivers/md/raid1.c | 4 +- drivers/media/i2c/og01a1b.c | 13 +- drivers/memory/tegra/tegra124-emc.c | 2 +- drivers/memory/tegra/tegra30-emc.c | 6 +- drivers/mfd/mc13xxx-core.c | 2 +- drivers/mtd/maps/physmap-gemini.c | 2 +- drivers/mtd/nand/raw/sunxi_nand.c | 6 +- drivers/mtd/nand/spi/core.c | 100 +- drivers/mtd/nand/spi/esmt.c | 2 +- drivers/mtd/nand/spi/micron.c | 2 +- drivers/mtd/nand/spi/winbond.c | 71 +- drivers/mtd/parsers/ofpart_core.c | 4 +- drivers/mtd/spi-nor/core.c | 2 +- drivers/mtd/spi-nor/core.h | 8 +- drivers/mtd/spi-nor/sfdp.c | 30 +- drivers/mtd/spi-nor/swp.c | 4 +- drivers/net/bareudp.c | 3 + drivers/net/bonding/bond_3ad.c | 109 +- drivers/net/bonding/bond_main.c | 8 +- drivers/net/bonding/bond_netlink.c | 21 +- drivers/net/bonding/bond_procfs.c | 3 +- drivers/net/bonding/bond_sysfs_slave.c | 17 +- drivers/net/dsa/realtek/rtl8365mb.c | 2 +- drivers/net/ethernet/airoha/airoha_eth.c | 711 ++++-- drivers/net/ethernet/airoha/airoha_eth.h | 82 +- drivers/net/ethernet/airoha/airoha_ppe.c | 261 +- drivers/net/ethernet/airoha/airoha_ppe_debugfs.c | 3 +- drivers/net/ethernet/airoha/airoha_regs.h | 115 +- drivers/net/ethernet/amazon/ena/ena_com.c | 7 +- drivers/net/ethernet/amazon/ena/ena_phc.c | 5 +- .../net/ethernet/aquantia/atlantic/aq_pci_func.c | 2 +- drivers/net/ethernet/broadcom/bnge/bnge_core.c | 30 +- drivers/net/ethernet/broadcom/bnge/bnge_rmem.c | 16 - drivers/net/ethernet/broadcom/genet/bcmgenet.c | 30 +- drivers/net/ethernet/freescale/Makefile | 3 +- drivers/net/ethernet/freescale/dpaa2/Kconfig | 4 + drivers/net/ethernet/freescale/enetc/ntmp.c | 231 +- .../net/ethernet/freescale/enetc/ntmp_private.h | 10 +- drivers/net/ethernet/intel/e1000e/netdev.c | 1 + drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +- drivers/net/ethernet/intel/iavf/iavf.h | 9 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 52 +- drivers/net/ethernet/intel/iavf/iavf_type.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 76 +- drivers/net/ethernet/intel/ice/devlink/devlink.c | 2 + drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 2 +- drivers/net/ethernet/intel/ice/ice_common.c | 2 - drivers/net/ethernet/intel/ice/ice_dpll.c | 146 +- drivers/net/ethernet/intel/ice/ice_main.c | 2 + drivers/net/ethernet/intel/ice/ice_ptp.c | 44 +- drivers/net/ethernet/intel/ice/ice_ptp_consts.h | 12 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 259 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 5 + drivers/net/ethernet/intel/ice/ice_txrx.c | 7 +- drivers/net/ethernet/intel/ice/ice_vf_lib.c | 7 +- drivers/net/ethernet/intel/idpf/idpf_idc.c | 6 + .../mellanox/mlx5/core/en_accel/ipsec_offload.c | 12 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 + drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 +- drivers/net/ethernet/meta/fbnic/fbnic_pci.c | 2 +- drivers/net/ethernet/microsoft/mana/gdma_main.c | 184 +- drivers/net/ethernet/microsoft/mana/hw_channel.c | 12 + drivers/net/ethernet/microsoft/mana/mana_en.c | 303 ++- drivers/net/ethernet/microsoft/mana/mana_ethtool.c | 123 +- .../ethernet/netronome/nfp/nfpcore/nfp_target.c | 17 +- drivers/net/ethernet/sfc/efx_devlink.c | 2 +- drivers/net/ethernet/ti/Makefile | 30 +- drivers/net/ethernet/ti/cpsw.c | 2 +- drivers/net/ethernet/ti/cpsw_ale.c | 25 + drivers/net/ethernet/ti/cpsw_ethtool.c | 24 + drivers/net/ethernet/ti/cpsw_new.c | 2 +- drivers/net/ethernet/ti/cpsw_priv.c | 39 +- drivers/net/ethernet/ti/cpsw_priv.h | 2 +- drivers/net/ethernet/ti/cpsw_sl.c | 11 + drivers/net/ethernet/ti/davinci_cpdma.c | 27 + drivers/net/hamradio/6pack.c | 9 +- drivers/net/ipa/gsi.c | 1 + drivers/net/ipa/ipa_main.c | 6 +- drivers/net/macsec.c | 71 +- drivers/net/macvlan.c | 9 +- drivers/net/mctp/mctp-i2c.c | 4 +- drivers/net/netconsole.c | 7 + drivers/net/netdevsim/dev.c | 2 +- drivers/net/phy/dp83869.c | 13 +- drivers/net/phy/phy_device.c | 4 +- drivers/net/phy/qcom/at803x.c | 2 +- drivers/net/ppp/ppp_generic.c | 5 +- drivers/net/ppp/pppoe.c | 8 +- drivers/net/slip/slhc.c | 49 +- drivers/net/usb/r8152.c | 2 +- drivers/net/usb/rtl8150.c | 12 +- drivers/net/virtio_net.c | 6 + drivers/net/vrf.c | 15 +- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 26 +- .../wireless/broadcom/brcm80211/brcmfmac/chip.c | 15 + drivers/net/wireless/marvell/libertas/if_usb.c | 32 +- drivers/net/wireless/marvell/libertas/if_usb.h | 3 + drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 1 + drivers/net/wireless/mediatek/mt76/channel.c | 13 +- drivers/net/wireless/mediatek/mt76/dma.c | 11 +- drivers/net/wireless/mediatek/mt76/mac80211.c | 1 + drivers/net/wireless/mediatek/mt76/mt76.h | 4 + drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 15 - drivers/net/wireless/mediatek/mt76/mt7615/main.c | 7 +- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 47 + drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 5 +- drivers/net/wireless/mediatek/mt76/mt7615/regs.h | 2 - .../net/wireless/mediatek/mt76/mt76_connac_mac.c | 6 +- .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 2 + drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 + drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 13 - drivers/net/wireless/mediatek/mt76/mt7915/main.c | 7 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 62 + drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 11 + drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 4 + drivers/net/wireless/mediatek/mt76/mt7921/main.c | 22 +- drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 2 + drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 9 +- drivers/net/wireless/mediatek/mt76/mt7925/main.c | 26 +- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 91 +- drivers/net/wireless/mediatek/mt76/mt7925/mcu.h | 8 + drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h | 11 +- drivers/net/wireless/mediatek/mt76/mt7996/init.c | 22 +- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 75 +- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 128 +- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 55 +- drivers/net/wireless/mediatek/mt76/mt7996/mcu.h | 5 +- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 3 + drivers/net/wireless/mediatek/mt76/scan.c | 66 +- drivers/net/wireless/realtek/rtlwifi/pci.c | 1 + drivers/net/wireless/realtek/rtw89/phy.c | 2 +- drivers/nfc/trf7970a.c | 3 +- drivers/nvme/host/apple.c | 1 + drivers/nvme/host/pci.c | 1 + drivers/nvme/target/tcp.c | 51 +- drivers/opp/core.c | 2 +- drivers/opp/debugfs.c | 20 +- drivers/pci/controller/dwc/pci-imx6.c | 4 +- .../pci/controller/dwc/pcie-designware-debugfs.c | 21 +- drivers/pci/controller/dwc/pcie-designware-ep.c | 2 +- drivers/pci/controller/dwc/pcie-designware-host.c | 18 +- drivers/pci/controller/dwc/pcie-designware.c | 16 +- drivers/pci/controller/dwc/pcie-designware.h | 2 + drivers/pci/controller/dwc/pcie-qcom.c | 17 +- drivers/pci/controller/dwc/pcie-rcar-gen4.c | 2 +- drivers/pci/controller/dwc/pcie-tegra194.c | 247 +- drivers/pci/controller/pcie-mediatek-gen3.c | 8 +- drivers/pci/endpoint/functions/pci-epf-test.c | 8 +- drivers/pci/endpoint/pci-ep-msi.c | 5 + drivers/pci/npem.c | 2 +- drivers/pci/pci-driver.c | 20 +- drivers/pci/pci-sysfs.c | 28 - drivers/pci/pci.c | 41 +- drivers/pci/pcie/dpc.c | 1 + drivers/pci/probe.c | 1 - drivers/pci/setup-bus.c | 26 +- drivers/pci/tph.c | 9 +- drivers/pcmcia/rsrc_nonstatic.c | 6 +- drivers/pinctrl/nomadik/pinctrl-abx500.c | 2 +- drivers/pinctrl/pinconf-generic.c | 7 +- drivers/pinctrl/pinctrl-cy8c95x0.c | 27 +- drivers/pinctrl/pinctrl-pic32.c | 20 +- drivers/pinctrl/realtek/pinctrl-rtd.c | 2 +- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 7 + drivers/pinctrl/sophgo/pinctrl-sg2042.c | 2 +- drivers/pinctrl/sophgo/pinctrl-sg2044.c | 2 +- drivers/platform/chrome/chromeos_tbmc.c | 6 + drivers/platform/surface/surfacepro3_button.c | 1 + drivers/platform/x86/asus-wmi.c | 50 +- drivers/platform/x86/barco-p50-gpio.c | 5 +- .../x86/dell/dell-wmi-sysman/enum-attributes.c | 34 +- drivers/platform/x86/dell/dell_rbu.c | 6 +- drivers/platform/x86/intel/vsec_tpmi.c | 10 +- drivers/platform/x86/lenovo/wmi-events.c | 2 +- drivers/platform/x86/lenovo/wmi-gamezone.c | 1 - drivers/platform/x86/lenovo/wmi-gamezone.h | 20 - drivers/platform/x86/lenovo/wmi-helpers.h | 13 + drivers/platform/x86/lenovo/wmi-other.c | 8 +- drivers/platform/x86/panasonic-laptop.c | 5 +- drivers/platform/x86/wmi.c | 36 +- drivers/pmdomain/imx/scu-pd.c | 1 + drivers/pmdomain/ti/omap_prm.c | 1 + drivers/pwm/pwm-atmel-tcb.c | 38 +- drivers/pwm/pwm-stm32.c | 22 +- drivers/remoteproc/imx_rproc.c | 6 +- drivers/remoteproc/xlnx_r5_remoteproc.c | 2 +- drivers/reset/amlogic/reset-meson.c | 1 + drivers/rtc/rtc-abx80x.c | 2 + drivers/s390/cio/cio.h | 5 - drivers/s390/cio/css.c | 34 +- drivers/scsi/sg.c | 31 +- drivers/scsi/sr.c | 11 +- drivers/scsi/sr.h | 1 - drivers/soc/qcom/llcc-qcom.c | 2 +- drivers/soc/qcom/ocmem.c | 17 +- drivers/soc/qcom/qcom_aoss.c | 2 +- drivers/soc/tegra/cbb/tegra234-cbb.c | 35 +- drivers/soundwire/bus.c | 8 +- drivers/soundwire/cadence_master.c | 8 + drivers/soundwire/debugfs.c | 9 +- drivers/soundwire/intel_ace2x.c | 5 + drivers/spi/spi-amlogic-spisg.c | 3 +- drivers/spi/spi-fsl-qspi.c | 3 +- drivers/spi/spi-hisi-kunpeng.c | 12 +- drivers/spi/spi-mtk-snfi.c | 14 + drivers/spi/spi-nxp-fspi.c | 3 +- drivers/spi/spi-rockchip.c | 3 +- drivers/spi/spi-sifive.c | 29 +- drivers/staging/greybus/hid.c | 2 +- drivers/staging/media/imx/imx-media-csi.c | 44 +- drivers/target/target_core_sbc.c | 3 +- drivers/thermal/spear_thermal.c | 2 +- drivers/tty/hvc/hvc_iucv.c | 2 +- drivers/tty/serial/ip22zilog.c | 2 +- drivers/usb/typec/mux/ps883x.c | 1 + drivers/usb/typec/tipd/core.c | 6 +- drivers/vdpa/vdpa.c | 48 +- drivers/vfio/fsl-mc/vfio_fsl_mc.c | 4 +- drivers/vfio/pci/vfio_pci_core.c | 64 +- drivers/vhost/net.c | 4 +- drivers/video/backlight/sky81452-backlight.c | 3 + drivers/video/fbdev/matrox/g450_pll.c | 2 +- drivers/video/fbdev/offb.c | 7 +- drivers/virt/coco/arm-cca-guest/arm-cca-guest.c | 3 +- drivers/virt/coco/sev-guest/sev-guest.c | 12 +- drivers/xen/xen-pciback/pci_stub.c | 6 +- fs/adfs/super.c | 3 + fs/btrfs/disk-io.c | 1 + fs/btrfs/inode.c | 8 +- fs/btrfs/reflink.c | 45 + fs/btrfs/transaction.c | 9 +- fs/ceph/xattr.c | 17 + fs/dcache.c | 18 +- fs/debugfs/file.c | 7 +- fs/erofs/data.c | 14 + fs/erofs/erofs_fs.h | 4 +- fs/erofs/inode.c | 2 +- fs/erofs/super.c | 8 +- fs/erofs/zdata.c | 2 +- fs/erofs/zmap.c | 19 +- fs/eventpoll.c | 126 +- fs/ext4/mballoc-test.c | 6 +- fs/f2fs/f2fs.h | 98 +- fs/f2fs/gc.c | 28 +- fs/f2fs/super.c | 76 +- fs/f2fs/sysfs.c | 7 +- fs/fuse/dir.c | 226 +- fs/fuse/file.c | 20 +- fs/fuse/fuse_i.h | 10 + fs/fuse/inode.c | 3 + fs/gfs2/aops.c | 5 +- fs/gfs2/inode.c | 3 +- fs/gfs2/log.c | 33 +- fs/mbcache.c | 1 + fs/netfs/iterator.c | 13 +- fs/nfs/blocklayout/blocklayout.c | 4 +- fs/nfsd/nfs4state.c | 17 +- fs/nilfs2/ioctl.c | 6 + fs/notify/fanotify/fanotify_user.c | 50 +- fs/notify/mark.c | 39 +- fs/ntfs3/super.c | 7 +- fs/ocfs2/dlm/dlmdomain.c | 10 +- fs/ocfs2/ioctl.c | 18 +- fs/ocfs2/resize.c | 12 +- fs/ocfs2/xattr.c | 4 +- fs/omfs/inode.c | 6 + fs/pstore/ram_core.c | 4 + fs/quota/dquot.c | 38 +- fs/smb/client/cifsglob.h | 22 - fs/smb/client/ioctl.c | 2 +- fs/smb/client/smb2file.c | 3 + fs/smb/client/smb2transport.c | 32 +- fs/smb/common/cifsglob.h | 31 + fs/smb/server/auth.c | 11 +- fs/smb/server/connection.c | 9 + fs/smb/server/mgmt/user_session.c | 12 +- fs/smb/server/smb2misc.c | 2 +- fs/smb/server/smb2ops.c | 32 +- fs/smb/server/smb2pdu.c | 25 +- fs/smb/server/smb_common.h | 29 - fs/tracefs/event_inode.c | 2 +- fs/xfs/xfs_zone_alloc.c | 2 +- include/acpi/actbl1.h | 6 + include/dt-bindings/clock/qcom,dispcc-sc7180.h | 7 +- include/dt-bindings/clock/qcom,gcc-sc8180x.h | 5 + include/dt-bindings/clock/qcom,glymur-gcc.h | 1 + include/linux/bpf_verifier.h | 6 +- include/linux/cdrom.h | 1 + include/linux/cpufreq.h | 4 +- include/linux/cpuhotplug.h | 1 - include/linux/dcache.h | 2 + include/linux/dmi.h | 5 + include/linux/dpll.h | 41 + include/linux/fsl/mc.h | 4 - include/linux/fsl/ntmp.h | 9 +- include/linux/hid.h | 6 +- include/linux/hid_bpf.h | 14 +- include/linux/ieee80211-eht.h | 1182 +++++++++ include/linux/ieee80211-he.h | 824 ++++++ include/linux/ieee80211-ht.h | 292 +++ include/linux/ieee80211-mesh.h | 230 ++ include/linux/ieee80211-vht.h | 236 ++ include/linux/ieee80211.h | 2663 +------------------- include/linux/iopoll.h | 8 +- include/linux/irqchip/arm-gic-v5.h | 3 - include/linux/kernel.h | 196 +- include/linux/moduleparam.h | 11 +- include/linux/mtd/spinand.h | 69 +- include/linux/nstree.h | 6 +- include/linux/padata.h | 8 +- include/linux/pci.h | 6 - include/linux/pm_domain.h | 4 +- include/linux/ppp_defs.h | 16 + include/linux/printk.h | 5 +- include/linux/quotaops.h | 9 +- include/linux/sched/topology.h | 24 +- include/linux/slab.h | 58 + include/linux/spinlock_up.h | 20 +- include/linux/stop_machine.h | 4 +- include/linux/tcp.h | 4 +- include/linux/trace_printk.h | 203 ++ include/linux/vdpa.h | 4 - include/linux/vfio.h | 2 - include/linux/vfio_pci_core.h | 13 + include/linux/wmi.h | 4 - include/net/bond_3ad.h | 2 +- include/net/mana/gdma.h | 29 +- include/net/mana/hw_channel.h | 2 + include/net/mana/mana.h | 24 +- include/net/pie.h | 2 +- include/net/tcp.h | 33 +- include/net/tcp_ecn.h | 2 +- include/sound/soc.h | 3 + include/trace/events/net.h | 4 +- include/trace/events/timer.h | 11 +- include/uapi/linux/if_link.h | 2 + include/uapi/linux/iommufd.h | 5 + include/uapi/linux/mii.h | 3 +- io_uring/io-wq.c | 3 +- io_uring/napi.c | 2 + kernel/Kconfig.kexec | 12 +- kernel/Makefile | 1 + kernel/audit.c | 4 + kernel/auditsc.c | 2 +- kernel/bpf/arena.c | 4 + kernel/bpf/arraymap.c | 4 +- kernel/bpf/bpf_lsm.c | 3 - kernel/bpf/core.c | 2 + kernel/bpf/devmap.c | 5 +- kernel/bpf/hashtab.c | 2 +- kernel/bpf/helpers.c | 17 +- kernel/bpf/local_storage.c | 2 +- kernel/bpf/syscall.c | 17 + kernel/bpf/task_iter.c | 151 +- kernel/bpf/verifier.c | 189 +- kernel/cgroup/cgroup.c | 46 +- kernel/cgroup/dmem.c | 1 + kernel/cgroup/rdma.c | 2 +- kernel/fork.c | 23 +- kernel/futex/requeue.c | 13 +- kernel/kexec_handover.c | 269 +- kernel/kexec_handover_debugfs.c | 216 ++ kernel/kexec_handover_internal.h | 35 + kernel/module/main.c | 4 +- kernel/padata.c | 130 +- kernel/params.c | 42 +- kernel/sched/core.c | 25 +- kernel/sched/cpufreq_schedutil.c | 5 +- kernel/sched/deadline.c | 18 +- kernel/sched/ext.c | 14 +- kernel/sched/fair.c | 166 +- kernel/sched/rt.c | 20 +- kernel/sched/topology.c | 14 +- kernel/time/hrtimer.c | 51 +- kernel/trace/trace.c | 7 +- kernel/trace/trace.h | 2 +- kernel/trace/trace_branch.c | 8 +- kernel/trace/trace_events_hist.c | 12 +- kernel/trace/trace_printk.c | 1 + kernel/workqueue.c | 4 +- lib/tests/kunit_iov_iter.c | 14 +- mm/memblock.c | 2 +- net/bluetooth/hci_event.c | 3 - net/bluetooth/l2cap_core.c | 8 +- net/bluetooth/sco.c | 3 +- net/bpf/test_run.c | 35 +- net/ceph/crush/crush.c | 6 +- net/ceph/osdmap.c | 14 +- net/core/filter.c | 6 +- net/core/neighbour.c | 10 +- net/core/netpoll.c | 19 +- net/core/page_pool.c | 10 +- net/dsa/conduit.c | 169 +- net/ipv4/netfilter/arp_tables.c | 18 +- net/ipv4/netfilter/arpt_mangle.c | 8 + net/ipv4/netfilter/iptable_nat.c | 4 +- net/ipv4/nexthop.c | 4 +- net/ipv4/syncookies.c | 2 +- net/ipv4/tcp.c | 91 +- net/ipv4/tcp_bbr.c | 6 +- net/ipv4/tcp_bic.c | 2 +- net/ipv4/tcp_cdg.c | 4 +- net/ipv4/tcp_cubic.c | 6 +- net/ipv4/tcp_dctcp.c | 2 +- net/ipv4/tcp_input.c | 56 +- net/ipv4/tcp_metrics.c | 6 +- net/ipv4/tcp_nv.c | 4 +- net/ipv4/tcp_output.c | 43 +- net/ipv4/tcp_plb.c | 2 +- net/ipv4/tcp_timer.c | 7 +- net/ipv4/tcp_vegas.c | 9 +- net/ipv4/tcp_westwood.c | 4 +- net/ipv4/tcp_yeah.c | 3 +- net/ipv4/udp.c | 12 +- net/ipv6/icmp.c | 10 +- net/ipv6/netfilter/ip6table_nat.c | 4 +- net/ipv6/udp.c | 13 +- net/mac80211/mlme.c | 3 +- net/netfilter/ipvs/ip_vs_xmit.c | 19 +- net/netfilter/nf_conntrack_proto_sctp.c | 10 +- net/netfilter/nf_conntrack_sip.c | 160 +- net/netfilter/nf_nat_amanda.c | 2 +- net/netfilter/nf_nat_core.c | 10 +- net/netfilter/nf_nat_sip.c | 34 +- net/netfilter/nf_tables_api.c | 44 +- net/netfilter/nfnetlink_osf.c | 45 +- net/netfilter/nft_ct.c | 2 + net/netfilter/nft_fwd_netdev.c | 10 + net/netfilter/nft_osf.c | 6 +- net/netfilter/xt_mac.c | 34 +- net/netfilter/xt_owner.c | 37 +- net/netfilter/xt_physdev.c | 29 +- net/netfilter/xt_policy.c | 2 +- net/netfilter/xt_realm.c | 2 +- net/netfilter/xt_socket.c | 23 +- net/openvswitch/datapath.c | 35 +- net/openvswitch/vport.c | 3 + net/psp/psp-nl-gen.c | 4 +- net/psp/psp_nl.c | 10 +- net/rds/af_rds.c | 10 +- net/rds/connection.c | 14 + net/rds/ib.c | 24 +- net/rds/ib.h | 1 + net/rds/ib_rdma.c | 2 +- net/sched/act_ct.c | 8 +- net/sched/act_mirred.c | 2 +- net/sched/sch_cake.c | 53 +- net/sched/sch_choke.c | 26 +- net/sched/sch_dualpi2.c | 32 +- net/sched/sch_fq_codel.c | 3 +- net/sched/sch_fq_pie.c | 19 +- net/sched/sch_hhf.c | 19 +- net/sched/sch_netem.c | 76 +- net/sched/sch_pie.c | 52 +- net/sched/sch_red.c | 31 +- net/sched/sch_sfb.c | 54 +- net/sched/sch_taprio.c | 22 +- net/sctp/inqueue.c | 1 + net/sctp/sm_statefuns.c | 6 + net/sctp/socket.c | 2 +- net/tipc/msg.c | 14 +- net/tls/tls.h | 1 + net/tls/tls_strp.c | 6 + net/tls/tls_sw.c | 4 + net/unix/af_unix.c | 9 +- net/unix/unix_bpf.c | 3 + net/vmw_vsock/virtio_transport_common.c | 11 +- rust/kernel/cpufreq.rs | 13 +- rust/kernel/sync/atomic.rs | 5 +- scripts/gdb/linux/timerlist.py | 2 +- scripts/package/builddeb | 8 +- security/integrity/ima/ima_crypto.c | 2 +- security/integrity/ima/ima_fs.c | 16 +- sound/core/compress_offload.c | 7 - sound/core/sound.c | 7 + sound/hda/codecs/cmedia.c | 7 - sound/hda/codecs/conexant.c | 8 +- sound/hda/codecs/realtek/alc269.c | 22 +- sound/hda/codecs/side-codecs/cs35l56_hda.c | 12 +- sound/hda/codecs/side-codecs/cs35l56_hda.h | 1 + sound/hda/codecs/side-codecs/tas2781_hda_spi.c | 14 +- sound/isa/sc6000.c | 152 +- sound/soc/amd/acp/acp-legacy-mach.c | 2 +- sound/soc/amd/acp/acp-mach-common.c | 22 +- sound/soc/amd/acp/acp-mach.h | 4 + sound/soc/amd/acp/acp-sdw-legacy-mach.c | 4 +- sound/soc/amd/acp/acp-sof-mach.c | 2 +- sound/soc/codecs/ab8500-codec.c | 6 +- sound/soc/codecs/tas2764.c | 1 + sound/soc/codecs/tas2770.c | 4 +- sound/soc/fsl/fsl_easrc.c | 123 +- sound/soc/fsl/fsl_micfil.c | 60 +- sound/soc/fsl/fsl_xcvr.c | 22 +- sound/soc/intel/Kconfig | 2 +- sound/soc/intel/avs/tgl.c | 38 +- sound/soc/qcom/qdsp6/topology.c | 8 +- sound/soc/renesas/rcar/core.c | 2 +- sound/soc/rockchip/rockchip_sai.c | 4 + sound/soc/sdca/sdca_asoc.c | 41 +- sound/soc/soc-compress.c | 4 +- sound/soc/soc-pcm.c | 4 +- sound/soc/sof/compress.c | 8 +- sound/soc/sof/intel/hda-stream.c | 10 +- sound/soc/sof/sof-priv.h | 2 + sound/soc/sti/uniperif_player.c | 9 +- sound/usb/midi.c | 12 +- sound/usb/midi2.c | 12 +- sound/usb/mixer_scarlett2.c | 2 +- sound/usb/qcom/qc_audio_offload.c | 33 +- sound/usb/quirks.c | 3 +- sound/usb/stream.c | 58 +- sound/usb/stream.h | 3 +- tools/include/nolibc/stdio.h | 138 +- tools/lib/bpf/libbpf.c | 23 +- tools/lib/bpf/relo_core.c | 2 + tools/perf/builtin-lock.c | 2 +- tools/perf/builtin-stat.c | 43 +- tools/perf/builtin-trace.c | 12 +- tools/perf/util/branch.h | 3 + tools/perf/util/cgroup.c | 30 +- tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 51 +- tools/perf/util/expr.c | 3 +- tools/perf/util/maps.c | 15 +- tools/perf/util/symbol-elf.c | 8 +- tools/perf/util/util.h | 1 - tools/power/x86/turbostat/turbostat.8 | 12 +- tools/power/x86/turbostat/turbostat.c | 26 +- tools/testing/ktest/ktest.pl | 35 +- tools/testing/selftests/arm64/gcs/gcs-util.h | 6 - tools/testing/selftests/arm64/gcs/libc-gcs.c | 1 + .../testing/selftests/bpf/prog_tests/reg_bounds.c | 35 + tools/testing/selftests/bpf/prog_tests/snprintf.c | 3 +- tools/testing/selftests/bpf/progs/bpf_misc.h | 2 +- .../testing/selftests/bpf/progs/verifier_bounds.c | 2 +- .../selftests/bpf/progs/verifier_scalar_ids.c | 8 +- tools/testing/selftests/cgroup/test_memcontrol.c | 11 +- .../selftests/futex/functional/futex_requeue.c | 49 +- tools/testing/selftests/kho/vmtest.sh | 1 + tools/testing/selftests/mm/migration.c | 3 +- .../selftests/net/netfilter/nft_tproxy_udp.sh | 14 +- .../net/packetdrill/tcp_ts_recent_invalid_ack.pkt | 4 +- tools/testing/selftests/powerpc/vphn/Makefile | 2 +- tools/testing/selftests/sched_ext/exit.c | 2 +- tools/tracing/rtla/src/actions.c | 7 +- tools/tracing/rtla/src/osnoise_hist.c | 26 +- tools/tracing/rtla/src/osnoise_top.c | 26 +- tools/tracing/rtla/src/timerlat_hist.c | 26 +- tools/tracing/rtla/src/timerlat_top.c | 26 +- tools/tracing/rtla/src/utils.c | 65 +- tools/tracing/rtla/src/utils.h | 3 + virt/kvm/dirty_ring.c | 3 +- 879 files changed, 14292 insertions(+), 8434 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 38/957 perf/amd/ibs: Preserve PhyAddrVal bit when clearing PhyAddr MSR
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ravi Bangoria <[email protected]>
[ Upstream commit 723a290326e015b07931eabc603d3735999377be ]
Commit 50a53b60e141 ("perf/amd/ibs: Prevent leaking sensitive data to userspace") zeroed the physical address and also cleared the PhyAddrVal flag before copying the value into a perf sample to avoid exposing physical addresses to unprivileged users.
Clearing PhyAddrVal, however, has an unintended side-effect: several other IBS fields are considered valid only when this bit is set. As a result, those otherwise correct fields are discarded, reducing IBS functionality.
Continue to zero the physical address, but keep the PhyAddrVal bit intact so the related fields remain usable while still preventing any address leak.
--- arch/x86/events/amd/ibs.c | 2 -- 1 file changed, 2 deletions(-)
arch/x86/events/amd/ibs.c +0 -2
@@ -1214,12 +1214,10 @@ static void perf_ibs_phyaddr_clear(struct perf_ibs *perf_ibs, struct perf_ibs_data *ibs_data) {if (perf_ibs == &perf_ibs_op) { - ibs_data->regs[ibs_op_msr_idx (MSR_AMD64_IBSOPDATA3 )] &= ~(1ULL <<18 ); ibs_data->regs[ibs_op_msr_idx (MSR_AMD64_IBSDCPHYSAD )] =0 ;return ; } - ibs_data->regs[ibs_fetch_msr_idx (MSR_AMD64_IBSFETCHCTL )] &= ~(1ULL <<52 ); ibs_data->regs[ibs_fetch_msr_idx (MSR_AMD64_IBSFETCHPHYSAD )] =0 ; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 47/957 irqchip/renesas-rzg2l: Fix error path in rzg2l_irqc_common_probe()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Biju Das <[email protected]>
[ Upstream commit fb74e35f78105efd8635c89b39f4389f567edbdc ]
Replace pm_runtime_put() with pm_runtime_put_sync() when irq_domain_create_hierarchy() fails to ensure the device suspends synchronously before devres cleanup disables runtime PM via pm_runtime_disable().
[ tglx: Fix up subject and change log to be precise ]
--- drivers/irqchip/irq-renesas-rzg2l.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-renesas-rzg2l.c +1 -1
@@ -573,7 +573,7 @@ static int rzg2l_irqc_common_probe(struct platform_device *pdev, struct device_n irq_domain =irq_domain_create_hierarchy (parent_domain,0 ,IRQC_NUM_IRQ ,dev_fwnode (dev), &rzg2l_irqc_domain_ops, rzg2l_irqc_data);if (!irq_domain) { -pm_runtime_put (dev); +pm_runtime_put_sync (dev);return -ENOMEM ; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 48/957 ASoC: Intel: avs: Check maximum valid CPUID leaf
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ahmed S. Darwish <[email protected]>
[ Upstream commit 93a1f0e61329f538cfc7122d7fa0e7a1803e326d ]
The Intel AVS driver queries CPUID(0x15) before checking if the CPUID leaf is available. Check the maximum-valid CPU standard leaf beforehand.
Use the CPUID_LEAF_TSC macro instead of the custom local one for the CPUID(0x15) leaf number.
--- sound/soc/intel/avs/tgl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
sound/soc/intel/avs/tgl.c +6 -3
@@ -11,8 +11,6 @@#include "debug.h" #include "messages.h" -#define CPUID_TSC_LEAF 0x15 -static int avs_tgl_dsp_core_power (struct avs_dev *adev,u32 core_mask,bool power) { core_mask &=AVS_MAIN_CORE_MASK ;
@@ -49,7 +47,11 @@ static int avs_tgl_config_basefw(struct avs_dev *adev)unsigned int ecx;#include <asm/cpuid/api.h> - ecx =cpuid_ecx (CPUID_TSC_LEAF ); + +if (boot_cpu_data.cpuid_level <CPUID_LEAF_TSC ) + goto no_cpuid; + + ecx =cpuid_ecx (CPUID_LEAF_TSC );if (ecx) { ret =avs_ipc_set_fw_config (adev,1 ,AVS_FW_CFG_XTAL_FREQ_HZ ,sizeof (ecx), &ecx);if (ret)
@@ -57,6 +59,7 @@ static int avs_tgl_config_basefw(struct avs_dev *adev) }#endif +no_cpuid: hwid.device = pci->device; hwid.subsystem = pci->subsystem_vendor | (pci->subsystem_device <<16 ); hwid.revision = pci->revision;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 49/957 ASoC: Intel: avs: Include CPUID header at file scope
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ahmed S. Darwish <[email protected]>
[ Upstream commit 7f78e0b46e9984e955cb73ffada8dace8b4dd059 ]
Commit
cbe37a4d2b3c ("ASoC: Intel: avs: Configure basefw on TGL-based platforms")
includes the main CPUID header from within a C function. This works by luck and forbids valid refactoring inside that header.
Include the CPUID header at file scope instead.
Remove the COMPILE_TEST build flag so that the CONFIG_X86 conditionals can be removed. The driver gets enough compilation testing already on x86.
For clarity, refactor the CPUID(0x15) code into its own function without changing any of the driver's logic.
--- sound/soc/intel/Kconfig | 2 +- sound/soc/intel/avs/tgl.c | 37 ++++++++++++++++++++++++------------- 2 files changed, 25 insertions(+), 14 deletions(-)
sound/soc/intel/Kconfig +1 -1
@@ -95,7 +95,7 @@ config SND_SOC_INTEL_KEEMBAY config SND_SOC_INTEL_AVS tristate "Intel AVS driver" - depends on X86 || COMPILE_TEST + depends on X86 depends on PCI depends on COMMON_CLK select ACPI_NHLT if ACPI
sound/soc/intel/avs/tgl.c +24 -13
@@ -7,6 +7,7 @@// #include <linux/pci.h> +#include <asm/cpuid/api.h> #include "avs.h" #include "debug.h" #include "messages.h"
@@ -38,28 +39,38 @@ static int avs_tgl_dsp_core_stall(struct avs_dev *adev, u32 core_mask, bool stalreturn avs_dsp_core_stall (adev, core_mask, stall); } -static int avs_tgl_config_basefw (struct avs_dev *adev) +/* +* Succeed if CPUID(0x15) is not available, or if the nominal core crystal clock +* frequency cannot be enumerated from it. There is nothing to do in both cases. +*/ +static int avs_tgl_set_xtal_freq (struct avs_dev *adev) { -struct pci_dev *pci = adev->base.pci; -struct avs_bus_hwid hwid; +unsigned int freq;int ret; -#ifdef CONFIG_X86 -unsigned int ecx; - -#include <asm/cpuid/api.h> if (boot_cpu_data.cpuid_level <CPUID_LEAF_TSC ) - goto no_cpuid; +return 0 ; - ecx =cpuid_ecx (CPUID_LEAF_TSC ); -if (ecx) { - ret =avs_ipc_set_fw_config (adev,1 ,AVS_FW_CFG_XTAL_FREQ_HZ ,sizeof (ecx), &ecx); + freq =cpuid_ecx (CPUID_LEAF_TSC ); +if (freq) { + ret =avs_ipc_set_fw_config (adev,1 ,AVS_FW_CFG_XTAL_FREQ_HZ ,sizeof (freq), &freq);if (ret)return AVS_IPC_RET (ret); } -#endif -no_cpuid: +return 0 ; +} + +static int avs_tgl_config_basefw (struct avs_dev *adev) +{ +struct pci_dev *pci = adev->base.pci; +struct avs_bus_hwid hwid; +int ret; + + ret =avs_tgl_set_xtal_freq (adev); +if (ret) +return ret; + hwid.device = pci->device; hwid.subsystem = pci->subsystem_vendor | (pci->subsystem_device <<16 ); hwid.revision = pci->revision;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 50/957 x86/vdso: Clean up remnants of VDSO32_NOTE_MASK
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Weißschuh <[email protected]>
[ Upstream commit 6517f293b2c6774d21b6e7e26a55fae60c6ec4cf ]
VDSO32_NOTE_MASK is not used or provided anymore, remove it.
--- arch/x86/entry/vdso/vdso2c.c | 1 - arch/x86/include/asm/vdso.h | 1 - 2 files changed, 2 deletions(-)
arch/x86/entry/vdso/vdso2c.c +0 -1
@@ -75,7 +75,6 @@ struct vdso_sym { };struct vdso_sym required_syms[] = { - {"VDSO32_NOTE_MASK" , true}, {"__kernel_vsyscall" , true}, {"__kernel_sigreturn" , true}, {"__kernel_rt_sigreturn" , true},
arch/x86/include/asm/vdso.h +0 -1
@@ -18,7 +18,6 @@ struct vdso_image {unsigned long extable_base, extable_len;const void *extable; -long sym_VDSO32_NOTE_MASK;long sym___kernel_sigreturn;long sym___kernel_rt_sigreturn;long sym___kernel_vsyscall;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 51/957 firmware: dmi: Correct an indexing error in dmi.h
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Limonciello (AMD) <[email protected]>
[ Upstream commit c064abc68e009d2cc18416e7132d9c25e03125b6 ]
The entries later in enum dmi_entry_type don't match the SMBIOS specification¹.
The entry for type 33: 64-Bit Memory Error Information is not present and thus the index for all later entries is incorrect.
Add it.
Also, add missing entry types 43-46, while at it.
¹ Search for "System Management BIOS (SMBIOS) Reference Specification"
[ bp: Drop the flaky SMBIOS spec URL. ]
--- include/linux/dmi.h | 5 +++++ 1 file changed, 5 insertions(+)
include/linux/dmi.h +5 -0
@@ -60,6 +60,7 @@ enum dmi_entry_type {DMI_ENTRY_OOB_REMOTE_ACCESS ,DMI_ENTRY_BIS_ENTRY ,DMI_ENTRY_SYSTEM_BOOT , +DMI_ENTRY_64_MEM_ERROR ,DMI_ENTRY_MGMT_DEV ,DMI_ENTRY_MGMT_DEV_COMPONENT , DMI_ENTRY_MGMT_DEV_THRES,
@@ -69,6 +70,10 @@ enum dmi_entry_type {DMI_ENTRY_ADDITIONAL ,DMI_ENTRY_ONBOARD_DEV_EXT ,DMI_ENTRY_MGMT_CONTROLLER_HOST , +DMI_ENTRY_TPM_DEVICE , +DMI_ENTRY_PROCESSOR_ADDITIONAL , +DMI_ENTRY_FIRMWARE_INVENTORY , +DMI_ENTRY_STRING_PROPERTY ,DMI_ENTRY_INACTIVE =126 , DMI_ENTRY_END_OF_TABLE = 127, };
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 52/957 sched: Make class_schedulers avoid pushing current, and get rid of proxy_tag_curr()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Stultz <[email protected]>
[ Upstream commit e0ca8991b2de6c9dfe6fcd8a0364951b2bd56797 ]
With proxy-execution, the scheduler selects the donor, but for blocked donors, we end up running the lock owner.
This caused some complexity, because the class schedulers make sure to remove the task they pick from their pushable task lists, which prevents the donor from being migrated, but there wasn't then anything to prevent rq->curr from being migrated if rq->curr != rq->donor.
This was sort of hacked around by calling proxy_tag_curr() on the rq->curr task if we were running something other then the donor. proxy_tag_curr() did a dequeue/enqueue pair on the rq->curr task, allowing the class schedulers to remove it from their pushable list.
The dequeue/enqueue pair was wasteful, and additonally K Prateek highlighted that we didn't properly undo things when we stopped proxying, leaving the lock owner off the pushable list.
After some alternative approaches were considered, Peter suggested just having the RT/DL classes just avoid migrating when task_on_cpu().
So rework pick_next_pushable_dl_task() and the rt pick_next_pushable_task() functions so that they skip over the first pushable task if it is on_cpu.
Then just drop all of the proxy_tag_curr() logic.
--- kernel/sched/core.c | 24 ------------------------ kernel/sched/deadline.c | 18 ++++++++++++++++-- kernel/sched/rt.c | 15 ++++++++++++--- 3 files changed, 28 insertions(+), 29 deletions(-)
kernel/sched/core.c +0 -24
@@ -6730,23 +6730,6 @@ find_proxy_task(struct rq *rq, struct task_struct *donor, struct rq_flags *rf) }#endif /* SCHED_PROXY_EXEC */ -static inline void proxy_tag_curr (struct rq *rq,struct task_struct *owner) -{ -if (!sched_proxy_exec ()) -return ; -/* -* pick_next_task() calls set_next_task() on the chosen task -* at some point, which ensures it is not push/pullable. -* However, the chosen/donor task *and* the mutex owner form an -* atomic pair wrt push/pull. -* -* Make sure owner we run is not pushable. Unfortunately we can -* only deal with that by means of a dequeue/enqueue cycle. :-/ -*/ -dequeue_task (rq, owner,DEQUEUE_NOCLOCK |DEQUEUE_SAVE ); -enqueue_task (rq, owner,ENQUEUE_NOCLOCK |ENQUEUE_RESTORE ); -} -/* * __schedule() is the main scheduler function. *
@@ -6896,9 +6879,6 @@ static void __sched notrace __schedule(int sched_mode)*/ RCU_INIT_POINTER (rq->curr, next); -if (!task_current_donor (rq, next)) -proxy_tag_curr (rq, next); -/* * The membarrier system call requires each architecture * to have a full memory barrier after updating
@@ -6933,10 +6913,6 @@ static void __sched notrace __schedule(int sched_mode)/* Also unlocks the rq: */ rq =context_switch (rq, prev, next, &rf); }else { -/* In case next was already curr but just got blocked_donor */ -if (!task_current_donor (rq, next)) -proxy_tag_curr (rq, next); -rq_unpin_lock (rq, &rf);__balance_callbacks (rq);raw_spin_rq_unlock_irq (rq);
kernel/sched/deadline.c +16 -2
@@ -2761,12 +2761,26 @@ static int find_later_rq(struct task_struct *task)static struct task_struct *pick_next_pushable_dl_task (struct rq *rq) { -struct task_struct *p; +struct task_struct *i, *p =NULL ; +struct rb_node *next_node;if (!has_pushable_dl_tasks (rq))return NULL ; - p =__node_2_pdl (rb_first_cached (&rq->dl.pushable_dl_tasks_root)); + next_node =rb_first_cached (&rq->dl.pushable_dl_tasks_root); +while (next_node) { + i =__node_2_pdl (next_node); +/* make sure task isn't on_cpu (possible with proxy-exec) */ +if (!task_on_cpu (rq, i)) { + p = i; +break ; + } + + next_node =rb_next (next_node); + } + +if (!p) +return NULL ;WARN_ON_ONCE (rq->cpu !=task_cpu (p));WARN_ON_ONCE (task_current (rq, p));
kernel/sched/rt.c +12 -3
@@ -1847,13 +1847,22 @@ static int find_lowest_rq(struct task_struct *task)static struct task_struct *pick_next_pushable_task (struct rq *rq) { -struct task_struct *p; +struct plist_head *head = &rq->rt.pushable_tasks; +struct task_struct *i, *p =NULL ;if (!has_pushable_tasks (rq))return NULL ; - p =plist_first_entry (&rq->rt.pushable_tasks, - struct task_struct, pushable_tasks); +plist_for_each_entry (i, head, pushable_tasks) { +/* make sure task isn't on_cpu (possible with proxy-exec) */ +if (!task_on_cpu (rq, i)) { + p = i; +break ; + } + } + +if (!p) +return NULL ;BUG_ON (rq->cpu !=task_cpu (p));BUG_ON (task_current (rq, p));
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 53/957 sched/rt: Skip group schedulable check with rt_group_sched=0
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michal Koutný <[email protected]>
[ Upstream commit 8b016dcec9365675be81d26be88f2c09cf983bd4 ]
The warning from the commit 87f1fb77d87a6 ("sched: Add RT_GROUP WARN checks for non-root task_groups") is wrong -- it assumes that only task_groups with rt_rq are traversed, however, the schedulability check would iterate all task_groups even when rt_group_sched=0 is disabled at boot time but some non-root task_groups exist.
The schedulability check is supposed to validate:
a) that children don't overcommit its parent,
b) no RT task group overcommits global RT limit.
but with rt_group_sched=0 there is no (non-trivial) hierarchy of RT groups, therefore skip the validation altogether. Otherwise, writes to the global sched_rt_runtime_us knob will be rejected with incorrect validation error.
This fix is immaterial with CONFIG_RT_GROUP_SCHED=n.
--- kernel/sched/rt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
kernel/sched/rt.c +2 -3
@@ -2677,9 +2677,6 @@ static int tg_rt_schedulable(struct task_group *tg, void *data) tg->rt_bandwidth.rt_runtime && tg_has_rt_tasks(tg))return -EBUSY ; -if (WARN_ON (!rt_group_sched_enabled () && tg != &root_task_group)) -return -EBUSY ; - total =to_ratio (period, runtime);/*
@@ -2823,6 +2820,8 @@ long sched_group_rt_period(struct task_group *tg)static int sched_rt_global_constraints (void ) {int ret =0 ; +if (!rt_group_sched_enabled ()) +return ret;mutex_lock (&rt_constraints_mutex); ret =__rt_schedulable (NULL ,0 ,0 );
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 54/957 wifi: mwifiex: Fix memory leak in mwifiex_11n_aggregate_pkt()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zilin Guan <[email protected]>
[ Upstream commit 990a73dec3fdc145fef6c827c29205437d533ece ]
In mwifiex_11n_aggregate_pkt(), skb_aggr is allocated via mwifiex_alloc_dma_align_buf(). If mwifiex_is_ralist_valid() returns false, the function currently returns -1 immediately without freeing the previously allocated skb_aggr, causing a memory leak.
Since skb_aggr has not yet been queued via skb_queue_tail(), no other references to this memory exist. Therefore, it has to be freed locally before returning the error.
Fix this by calling mwifiex_write_data_complete() to free skb_aggr before returning the error status.
Compile tested only. Issue found using a prototype static analysis tool and code review.
--- drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/marvell/mwifiex/11n_aggr.c +1 -0
@@ -203,6 +203,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,if (!mwifiex_is_ralist_valid (priv, pra_list, ptrindex)) {spin_unlock_bh (&priv->wmm.ra_list_spinlock); +mwifiex_write_data_complete (adapter, skb_aggr,1 ,-1 );return -1 ; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 55/957 wifi: rtlwifi: pci: fix possible use-after-free caused by unfinished irq_prepare_bcn_tasklet
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Duoming Zhou <[email protected]>
[ Upstream commit 039cd522dc70151da13329a5e3ae19b1736f468a ]
The irq_prepare_bcn_tasklet is initialized in rtl_pci_init() and scheduled when RTL_IMR_BCNINT interrupt is triggered by hardware. But it is never killed in rtl_pci_deinit(). When the rtlwifi card probe fails or is being detached, the ieee80211_hw is deallocated. However, irq_prepare_bcn_tasklet may still be running or pending, leading to use-after-free when the freed ieee80211_hw is accessed in _rtl_pci_prepare_bcn_tasklet().
Similar to irq_tasklet, add tasklet_kill() in rtl_pci_deinit() to ensure that irq_prepare_bcn_tasklet is properly terminated before the ieee80211_hw is released.
The issue was identified through static analysis.
--- drivers/net/wireless/realtek/rtlwifi/pci.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/realtek/rtlwifi/pci.c +1 -0
@@ -1674,6 +1674,7 @@ static void rtl_pci_deinit(struct ieee80211_hw *hw)synchronize_irq (rtlpci->pdev->irq);tasklet_kill (&rtlpriv->works.irq_tasklet); +tasklet_kill (&rtlpriv->works.irq_prepare_bcn_tasklet);cancel_work_sync (&rtlpriv->works.lps_change_work); }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 56/957 bpf: test_run: Fix the null pointer dereference issue in bpf_lwt_xmit_push_encap
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Feng Yang <[email protected]>
[ Upstream commit 972787479ee73006fddb5e59ab5c8e733810ff42 ]
The bpf_lwt_xmit_push_encap helper needs to access skb_dst(skb)->dev to calculate the needed headroom:
err = skb_cow_head(skb, len + LL_RESERVED_SPACE(skb_dst(skb)->dev));
But skb->_skb_refdst may not be initialized when the skb is set up by bpf_prog_test_run_skb function. Executing bpf_lwt_push_ip_encap function in this scenario will trigger null pointer dereference, causing a kernel crash as Yinhao reported:
[ 105.186365] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 105.186382] #PF: supervisor read access in kernel mode [ 105.186388] #PF: error_code(0x0000) - not-present page [ 105.186393] PGD 121d3d067 P4D 121d3d067 PUD 106c83067 PMD 0 [ 105.186404] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 105.186412] CPU: 3 PID: 3250 Comm: poc Kdump: loaded Not tainted 6.19.0-rc5 #1 [ 105.186423] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 105.186427] RIP: 0010:bpf_lwt_push_ip_encap+0x1eb/0x520 [ 105.186443] Code: 0f 84 de 01 00 00 0f b7 4a 04 66 85 c9 0f 85 47 01 00 00 31 c0 5b 5d 41 5c 41 5d 41 5e c3 cc cc cc cc 48 8b 73 58 48 83 e6 fe <48> 8b 36 0f b7 be ec 00 00 00 0f b7 b6 e6 00 00 00 01 fe 83 e6 f0 [ 105.186449] RSP: 0018:ffffbb0e0387bc50 EFLAGS: 00010246 [ 105.186455] RAX: 000000000000004e RBX: ffff94c74e036500 RCX: ffff94c74874da00 [ 105.186460] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff94c74e036500 [ 105.186463] RBP: 0000000000000001 R08: 0000000000000002 R09: 0000000000000000 [ 105.186467] R10: ffffbb0e0387bd50 R11: 0000000000000000 R12: ffffbb0e0387bc98 [ 105.186471] R13: 0000000000000014 R14: 0000000000000000 R15: 0000000000000002 [ 105.186484] FS: 00007f166aa4d680(0000) GS:ffff94c8b7780000(0000) knlGS:0000000000000000 [ 105.186490] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 105.186494] CR2: 0000000000000000 CR3: 000000015eade001 CR4: 0000000000770ee0 [ 105.186499] PKRU: 55555554 [ 105.186502] Call Trace: [ 105.186507] <TASK> [ 105.186513] bpf_lwt_xmit_push_encap+0x2b/0x40 [ 105.186522] bpf_prog_a75eaad51e517912+0x41/0x49 [ 105.186536] ? kvm_clock_get_cycles+0x18/0x30 [ 105.186547] ? ktime_get+0x3c/0xa0 [ 105.186554] bpf_test_run+0x195/0x320 [ 105.186563] ? bpf_test_run+0x10f/0x320 [ 105.186579] bpf_prog_test_run_skb+0x2f5/0x4f0 [ 105.186590] __sys_bpf+0x69c/0xa40 [ 105.186603] __x64_sys_bpf+0x1e/0x30 [ 105.186611] do_syscall_64+0x59/0x110 [ 105.186620] entry_SYSCALL_64_after_hwframe+0x76/0xe0 [ 105.186649] RIP: 0033:0x7f166a97455d
Temporarily add the setting of skb->_skb_refdst before bpf_test_run to resolve the issue.
--- net/bpf/test_run.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
net/bpf/test_run.c +15 -0
@@ -1093,6 +1093,21 @@ int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr, skb->ip_summed =CHECKSUM_COMPLETE ; } +if (prog->type ==BPF_PROG_TYPE_LWT_XMIT ) { +if (!ipv6_bpf_stub) { +pr_warn_once ("Please test this program with the IPv6 module loaded\n" ); + ret = -EOPNOTSUPP ; + goto out; + } +#if IS_ENABLED (CONFIG_IPV6 ) +/* For CONFIG_IPV6=n, ipv6_bpf_stub is NULL which is +* handled by the above if statement. +*/ +dst_hold (&net->ipv6.ip6_null_entry->dst); +skb_dst_set (skb, &net->ipv6.ip6_null_entry->dst); +#endif + } + ret =bpf_test_run (prog, skb, repeat, &retval, &duration, false);if (ret) goto out;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 39/957 perf/amd/ibs: Avoid calling perf_allow_kernel() from the IBS NMI handler
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ravi Bangoria <[email protected]>
[ Upstream commit b0a09142622a994c4f4088c3f61db5da87cfc711 ]
Calling perf_allow_kernel() from the NMI context is unsafe and could be fatal. Capture the permission at event-initialization time by storing it in event->hw.flags, and have the NMI handler rely on that cached flag instead of making the call directly.
--- arch/x86/events/amd/ibs.c | 5 ++++- arch/x86/events/perf_event_flags.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-)
arch/x86/events/amd/ibs.c +4 -1
@@ -313,6 +313,9 @@ static int perf_ibs_init(struct perf_event *event)if (ret)return ret; +if (perf_allow_kernel ()) + hwc->flags |=PERF_X86_EVENT_UNPRIVILEGED ; +if (hwc->sample_period) {if (config & perf_ibs->cnt_mask)/* raw max_cnt may not be set */
@@ -1342,7 +1345,7 @@ static int perf_ibs_handle_irq(struct perf_ibs *perf_ibs, struct pt_regs *iregs)* unprivileged users. */ if ((event->attr.sample_type &PERF_SAMPLE_RAW ) && -perf_allow_kernel ()) { + (hwc->flags &PERF_X86_EVENT_UNPRIVILEGED )) {perf_ibs_phyaddr_clear (perf_ibs, &ibs_data); }
arch/x86/events/perf_event_flags.h +1 -0
@@ -23,3 +23,4 @@ PERF_ARCH(PEBS_LAT_HYBRID, 0x0020000) /* ld and st lat for hybrid */ PERF_ARCH(NEEDS_BRANCH_STACK, 0x0040000) /* require branch stack setup */ PERF_ARCH(BRANCH_COUNTERS, 0x0080000) /* logs the counters in the extra space of each branch */ PERF_ARCH(ACR, 0x0100000) /* Auto counter reload */ +PERF_ARCH (UNPRIVILEGED ,0x0200000 )/* Unprivileged event (wrt perf_allow_kernel()) */
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 57/957 wifi: ieee80211: split mesh definitions out
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <[email protected]>
[ Upstream commit 69674282fc97fffd98a85ab5b4837edbc5898145 ]
The ieee80211.h file has gotten very long, start splitting it by putting mesh definitions into a separate file.
Stable-dep-of: cb0caadb64ca ("wifi: ieee80211: fix definition of EHT-MCS 15 in MRU")
--- include/linux/ieee80211-mesh.h | 230 +++++++++++++++++++++++++++++++++ include/linux/ieee80211.h | 211 +----------------------------- 2 files changed, 232 insertions(+), 209 deletions(-) create mode 100644 include/linux/ieee80211-mesh.h
include/linux/ieee80211-mesh.h new file +230 -0
@@ -0,0 +1,230 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* IEEE 802.11 mesh definitions +* +* Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen +* <[email protected]> +* Copyright (c) 2002-2003, Jouni Malinen <[email protected]> +* Copyright (c) 2005, Devicescape Software, Inc. +* Copyright (c) 2006, Michael Wu <[email protected]> +* Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH +* Copyright (c) 2016 - 2017 Intel Deutschland GmbH +* Copyright (c) 2018 - 2025 Intel Corporation +*/ + +#ifndef LINUX_IEEE80211_MESH_H +#define LINUX_IEEE80211_MESH_H + +#include <linux/types.h> +#include <linux/if_ether.h> + +#define IEEE80211_MAX_MESH_ID_LEN 32 + +struct ieee80211s_hdr { +u8 flags; +u8 ttl; +__le32 seqnum; +u8 eaddr1[ETH_ALEN ]; +u8 eaddr2[ETH_ALEN ]; +} __packed__aligned(2) ; + +/* Mesh flags */ +#define MESH_FLAGS_AE_A4 0x1 +#define MESH_FLAGS_AE_A5_A6 0x2 +#define MESH_FLAGS_AE 0x3 +#define MESH_FLAGS_PS_DEEP 0x4 + +/** +* enum ieee80211_preq_flags - mesh PREQ element flags +* +* @IEEE80211_PREQ_PROACTIVE_PREP_FLAG: proactive PREP subfield +*/ +enum ieee80211_preq_flags { +IEEE80211_PREQ_PROACTIVE_PREP_FLAG =1 <<2 , +}; + +/** +* enum ieee80211_preq_target_flags - mesh PREQ element per target flags +* +* @IEEE80211_PREQ_TO_FLAG: target only subfield +* @IEEE80211_PREQ_USN_FLAG: unknown target HWMP sequence number subfield +*/ +enum ieee80211_preq_target_flags { +IEEE80211_PREQ_TO_FLAG =1 <<0 , +IEEE80211_PREQ_USN_FLAG =1 <<2 , +}; + +/** +* struct ieee80211_mesh_chansw_params_ie - mesh channel switch parameters IE +* @mesh_ttl: Time To Live +* @mesh_flags: Flags +* @mesh_reason: Reason Code +* @mesh_pre_value: Precedence Value +* +* This structure represents the payload of the "Mesh Channel Switch +* Parameters element" as described in IEEE Std 802.11-2020 section +* 9.4.2.102. +*/ +struct ieee80211_mesh_chansw_params_ie { +u8 mesh_ttl; +u8 mesh_flags; +__le16 mesh_reason; +__le16 mesh_pre_value; +} __packed; + +/** +* struct ieee80211_meshconf_ie - Mesh Configuration element +* @meshconf_psel: Active Path Selection Protocol Identifier +* @meshconf_pmetric: Active Path Selection Metric Identifier +* @meshconf_congest: Congestion Control Mode Identifier +* @meshconf_synch: Synchronization Method Identifier +* @meshconf_auth: Authentication Protocol Identifier +* @meshconf_form: Mesh Formation Info +* @meshconf_cap: Mesh Capability (see &enum mesh_config_capab_flags) +* +* This structure represents the payload of the "Mesh Configuration +* element" as described in IEEE Std 802.11-2020 section 9.4.2.97. +*/ +struct ieee80211_meshconf_ie { +u8 meshconf_psel; +u8 meshconf_pmetric; +u8 meshconf_congest; +u8 meshconf_synch; +u8 meshconf_auth; +u8 meshconf_form; +u8 meshconf_cap; +} __packed; + +/** +* enum mesh_config_capab_flags - Mesh Configuration IE capability field flags +* +* @IEEE80211_MESHCONF_CAPAB_ACCEPT_PLINKS: STA is willing to establish +* additional mesh peerings with other mesh STAs +* @IEEE80211_MESHCONF_CAPAB_FORWARDING: the STA forwards MSDUs +* @IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING: TBTT adjustment procedure +* is ongoing +* @IEEE80211_MESHCONF_CAPAB_POWER_SAVE_LEVEL: STA is in deep sleep mode or has +* neighbors in deep sleep mode +* +* Enumerates the "Mesh Capability" as described in IEEE Std +* 802.11-2020 section 9.4.2.97.7. +*/ +enum mesh_config_capab_flags { +IEEE80211_MESHCONF_CAPAB_ACCEPT_PLINKS =0x01 , +IEEE80211_MESHCONF_CAPAB_FORWARDING =0x08 , +IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING =0x20 , +IEEE80211_MESHCONF_CAPAB_POWER_SAVE_LEVEL =0x40 , +}; + +#define IEEE80211_MESHCONF_FORM_CONNECTED_TO_GATE 0x1 + +/* +* mesh channel switch parameters element's flag indicator +* +*/ +#define WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT BIT(0) +#define WLAN_EID_CHAN_SWITCH_PARAM_INITIATOR BIT(1) +#define WLAN_EID_CHAN_SWITCH_PARAM_REASON BIT(2) + +/** +* struct ieee80211_rann_ie - RANN (root announcement) element +* @rann_flags: Flags +* @rann_hopcount: Hop Count +* @rann_ttl: Element TTL +* @rann_addr: Root Mesh STA Address +* @rann_seq: HWMP Sequence Number +* @rann_interval: Interval +* @rann_metric: Metric +* +* This structure represents the payload of the "RANN element" as +* described in IEEE Std 802.11-2020 section 9.4.2.111. +*/ +struct ieee80211_rann_ie { +u8 rann_flags; +u8 rann_hopcount; +u8 rann_ttl; +u8 rann_addr[ETH_ALEN ]; +__le32 rann_seq; +__le32 rann_interval; +__le32 rann_metric; +} __packed; + +enum ieee80211_rann_flags { +RANN_FLAG_IS_GATE =1 <<0 , +}; + +/* Mesh action codes */ +enum ieee80211_mesh_actioncode { +WLAN_MESH_ACTION_LINK_METRIC_REPORT , +WLAN_MESH_ACTION_HWMP_PATH_SELECTION , +WLAN_MESH_ACTION_GATE_ANNOUNCEMENT , +WLAN_MESH_ACTION_CONGESTION_CONTROL_NOTIFICATION , +WLAN_MESH_ACTION_MCCA_SETUP_REQUEST , +WLAN_MESH_ACTION_MCCA_SETUP_REPLY , +WLAN_MESH_ACTION_MCCA_ADVERTISEMENT_REQUEST , +WLAN_MESH_ACTION_MCCA_ADVERTISEMENT , +WLAN_MESH_ACTION_MCCA_TEARDOWN , +WLAN_MESH_ACTION_TBTT_ADJUSTMENT_REQUEST , +WLAN_MESH_ACTION_TBTT_ADJUSTMENT_RESPONSE , +}; + +/** +* enum ieee80211_mesh_sync_method - mesh synchronization method identifier +* +* @IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET: the default synchronization method +* @IEEE80211_SYNC_METHOD_VENDOR: a vendor specific synchronization method +* that will be specified in a vendor specific information element +*/ +enum ieee80211_mesh_sync_method { +IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET =1 , +IEEE80211_SYNC_METHOD_VENDOR =255 , +}; + +/** +* enum ieee80211_mesh_path_protocol - mesh path selection protocol identifier +* +* @IEEE80211_PATH_PROTOCOL_HWMP: the default path selection protocol +* @IEEE80211_PATH_PROTOCOL_VENDOR: a vendor specific protocol that will +* be specified in a vendor specific information element +*/ +enum ieee80211_mesh_path_protocol { +IEEE80211_PATH_PROTOCOL_HWMP =1 , +IEEE80211_PATH_PROTOCOL_VENDOR =255 , +}; + +/** +* enum ieee80211_mesh_path_metric - mesh path selection metric identifier +* +* @IEEE80211_PATH_METRIC_AIRTIME: the default path selection metric +* @IEEE80211_PATH_METRIC_VENDOR: a vendor specific metric that will be +* specified in a vendor specific information element +*/ +enum ieee80211_mesh_path_metric { +IEEE80211_PATH_METRIC_AIRTIME =1 , +IEEE80211_PATH_METRIC_VENDOR =255 , +}; + +/** +* enum ieee80211_root_mode_identifier - root mesh STA mode identifier +* +* These attribute are used by dot11MeshHWMPRootMode to set root mesh STA mode +* +* @IEEE80211_ROOTMODE_NO_ROOT: the mesh STA is not a root mesh STA (default) +* @IEEE80211_ROOTMODE_ROOT: the mesh STA is a root mesh STA if greater than +* this value +* @IEEE80211_PROACTIVE_PREQ_NO_PREP: the mesh STA is a root mesh STA supports +* the proactive PREQ with proactive PREP subfield set to 0 +* @IEEE80211_PROACTIVE_PREQ_WITH_PREP: the mesh STA is a root mesh STA +* supports the proactive PREQ with proactive PREP subfield set to 1 +* @IEEE80211_PROACTIVE_RANN: the mesh STA is a root mesh STA supports +* the proactive RANN +*/ +enum ieee80211_root_mode_identifier { +IEEE80211_ROOTMODE_NO_ROOT =0 , +IEEE80211_ROOTMODE_ROOT =1 , +IEEE80211_PROACTIVE_PREQ_NO_PREP =2 , +IEEE80211_PROACTIVE_PREQ_WITH_PREP =3 , +IEEE80211_PROACTIVE_RANN =4 , +}; + +#endif /* LINUX_IEEE80211_MESH_H */
include/linux/ieee80211.h +2 -209
251 lines not on this page · raw message
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 58/957 wifi: ieee80211: split HT definitions out
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <[email protected]>
[ Upstream commit fdc1c141f3ef4dc94e3880e973061681843f62c0 ]
The ieee80211.h file has gotten very long, continue splitting it by putting HT definitions into a separate file.
Stable-dep-of: cb0caadb64ca ("wifi: ieee80211: fix definition of EHT-MCS 15 in MRU")
--- include/linux/ieee80211-ht.h | 292 +++++++++++++++++++++++++++++++++++ include/linux/ieee80211.h | 272 +------------------------------- 2 files changed, 293 insertions(+), 271 deletions(-) create mode 100644 include/linux/ieee80211-ht.h
include/linux/ieee80211-ht.h new file +292 -0
@@ -0,0 +1,292 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* IEEE 802.11 HT definitions +* +* Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen +* <[email protected]> +* Copyright (c) 2002-2003, Jouni Malinen <[email protected]> +* Copyright (c) 2005, Devicescape Software, Inc. +* Copyright (c) 2006, Michael Wu <[email protected]> +* Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH +* Copyright (c) 2016 - 2017 Intel Deutschland GmbH +* Copyright (c) 2018 - 2025 Intel Corporation +*/ + +#ifndef LINUX_IEEE80211_HT_H +#define LINUX_IEEE80211_HT_H + +#include <linux/types.h> +#include <linux/if_ether.h> + +/* Maximal size of an A-MSDU that can be transported in a HT BA session */ +#define IEEE80211_MAX_MPDU_LEN_HT_BA 4095 + +/* Maximal size of an A-MSDU */ +#define IEEE80211_MAX_MPDU_LEN_HT_3839 3839 +#define IEEE80211_MAX_MPDU_LEN_HT_7935 7935 + +#define IEEE80211_HT_CTL_LEN 4 + +enum ieee80211_ht_chanwidth_values { +IEEE80211_HT_CHANWIDTH_20MHZ =0 , +IEEE80211_HT_CHANWIDTH_ANY =1 , +}; + +/** +* struct ieee80211_bar - Block Ack Request frame format +* @frame_control: Frame Control +* @duration: Duration +* @ra: RA +* @ta: TA +* @control: BAR Control +* @start_seq_num: Starting Sequence Number (see Figure 9-37) +* +* This structure represents the "BlockAckReq frame format" +* as described in IEEE Std 802.11-2020 section 9.3.1.7. +*/ +struct ieee80211_bar { +__le16 frame_control; +__le16 duration; +__u8 ra[ETH_ALEN ]; +__u8 ta[ETH_ALEN ]; +__le16 control; +__le16 start_seq_num; +} __packed; + +/* 802.11 BAR control masks */ +#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000 +#define IEEE80211_BAR_CTRL_MULTI_TID 0x0002 +#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004 +#define IEEE80211_BAR_CTRL_TID_INFO_MASK 0xf000 +#define IEEE80211_BAR_CTRL_TID_INFO_SHIFT 12 + +#define IEEE80211_HT_MCS_MASK_LEN 10 + +/** +* struct ieee80211_mcs_info - Supported MCS Set field +* @rx_mask: RX mask +* @rx_highest: highest supported RX rate. If set represents +* the highest supported RX data rate in units of 1 Mbps. +* If this field is 0 this value should not be used to +* consider the highest RX data rate supported. +* @tx_params: TX parameters +* @reserved: Reserved bits +* +* This structure represents the "Supported MCS Set field" as +* described in IEEE Std 802.11-2020 section 9.4.2.55.4. +*/ +struct ieee80211_mcs_info { +u8 rx_mask[IEEE80211_HT_MCS_MASK_LEN ]; +__le16 rx_highest; +u8 tx_params; +u8 reserved[3 ]; +} __packed; + +/* 802.11n HT capability MSC set */ +#define IEEE80211_HT_MCS_RX_HIGHEST_MASK 0x3ff +#define IEEE80211_HT_MCS_TX_DEFINED 0x01 +#define IEEE80211_HT_MCS_TX_RX_DIFF 0x02 +/* value 0 == 1 stream etc */ +#define IEEE80211_HT_MCS_TX_MAX_STREAMS_MASK 0x0C +#define IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT 2 +#define IEEE80211_HT_MCS_TX_MAX_STREAMS 4 +#define IEEE80211_HT_MCS_TX_UNEQUAL_MODULATION 0x10 + +#define IEEE80211_HT_MCS_CHAINS (mcs) ((mcs) == 32 ? 1 : (1 + ((mcs) >> 3))) + +/* +* 802.11n D5.0 20.3.5 / 20.6 says: +* - indices 0 to 7 and 32 are single spatial stream +* - 8 to 31 are multiple spatial streams using equal modulation +* [8..15 for two streams, 16..23 for three and 24..31 for four] +* - remainder are multiple spatial streams using unequal modulation +*/ +#define IEEE80211_HT_MCS_UNEQUAL_MODULATION_START 33 +#define IEEE80211_HT_MCS_UNEQUAL_MODULATION_START_BYTE \ + (IEEE80211_HT_MCS_UNEQUAL_MODULATION_START / 8) + +/** +* struct ieee80211_ht_cap - HT capabilities element +* @cap_info: HT Capability Information +* @ampdu_params_info: A-MPDU Parameters +* @mcs: Supported MCS Set +* @extended_ht_cap_info: HT Extended Capabilities +* @tx_BF_cap_info: Transmit Beamforming Capabilities +* @antenna_selection_info: ASEL Capability +* +* This structure represents the payload of the "HT Capabilities +* element" as described in IEEE Std 802.11-2020 section 9.4.2.55. +*/ +struct ieee80211_ht_cap { +__le16 cap_info; +u8 ampdu_params_info; + +/* 16 bytes MCS information */ +struct ieee80211_mcs_info mcs; + +__le16 extended_ht_cap_info; +__le32 tx_BF_cap_info; +u8 antenna_selection_info; +} __packed; + +/* 802.11n HT capabilities masks (for cap_info) */ +#define IEEE80211_HT_CAP_LDPC_CODING 0x0001 +#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 +#define IEEE80211_HT_CAP_SM_PS 0x000C +#define IEEE80211_HT_CAP_SM_PS_SHIFT 2 +#define IEEE80211_HT_CAP_GRN_FLD 0x0010 +#define IEEE80211_HT_CAP_SGI_20 0x0020 +#define IEEE80211_HT_CAP_SGI_40 0x0040 +#define IEEE80211_HT_CAP_TX_STBC 0x0080 +#define IEEE80211_HT_CAP_RX_STBC 0x0300 +#define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 +#define IEEE80211_HT_CAP_DELAY_BA 0x0400 +#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 +#define IEEE80211_HT_CAP_DSSSCCK40 0x1000 +#define IEEE80211_HT_CAP_RESERVED 0x2000 +#define IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000 +#define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 + +/* 802.11n HT extended capabilities masks (for extended_ht_cap_info) */ +#define IEEE80211_HT_EXT_CAP_PCO 0x0001 +#define IEEE80211_HT_EXT_CAP_PCO_TIME 0x0006 +#define IEEE80211_HT_EXT_CAP_PCO_TIME_SHIFT 1 +#define IEEE80211_HT_EXT_CAP_MCS_FB 0x0300 +#define IEEE80211_HT_EXT_CAP_MCS_FB_SHIFT 8 +#define IEEE80211_HT_EXT_CAP_HTC_SUP 0x0400 +#define IEEE80211_HT_EXT_CAP_RD_RESPONDER 0x0800 + +/* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ +#define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 +#define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C +#define IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT 2 + +/* +* Maximum length of AMPDU that the STA can receive in high-throughput (HT). +* Length = 2 ^ (13 + max_ampdu_length_exp) - 1 (octets) +*/ +enum ieee80211_max_ampdu_length_exp { +IEEE80211_HT_MAX_AMPDU_8K =0 , +IEEE80211_HT_MAX_AMPDU_16K =1 , +IEEE80211_HT_MAX_AMPDU_32K =2 , +IEEE80211_HT_MAX_AMPDU_64K =3 +}; + +#define IEEE80211_HT_MAX_AMPDU_FACTOR 13 + +/* Minimum MPDU start spacing */ +enum ieee80211_min_mpdu_spacing { +IEEE80211_HT_MPDU_DENSITY_NONE =0 ,/* No restriction */ +IEEE80211_HT_MPDU_DENSITY_0_25 =1 ,/* 1/4 usec */ +IEEE80211_HT_MPDU_DENSITY_0_5 =2 ,/* 1/2 usec */ +IEEE80211_HT_MPDU_DENSITY_1 =3 ,/* 1 usec */ +IEEE80211_HT_MPDU_DENSITY_2 =4 ,/* 2 usec */ +IEEE80211_HT_MPDU_DENSITY_4 =5 ,/* 4 usec */ +IEEE80211_HT_MPDU_DENSITY_8 =6 ,/* 8 usec */ +IEEE80211_HT_MPDU_DENSITY_16 =7 /* 16 usec */ +}; + +/** +* struct ieee80211_ht_operation - HT operation IE +* @primary_chan: Primary Channel +* @ht_param: HT Operation Information parameters +* @operation_mode: HT Operation Information operation mode +* @stbc_param: HT Operation Information STBC params +* @basic_set: Basic HT-MCS Set +* +* This structure represents the payload of the "HT Operation +* element" as described in IEEE Std 802.11-2020 section 9.4.2.56. +*/ +struct ieee80211_ht_operation { +u8 primary_chan; +u8 ht_param; +__le16 operation_mode; +__le16 stbc_param; +u8 basic_set[16 ]; +} __packed; + +/* for ht_param */ +#define IEEE80211_HT_PARAM_CHA_SEC_OFFSET 0x03 +#define IEEE80211_HT_PARAM_CHA_SEC_NONE 0x00 +#define IEEE80211_HT_PARAM_CHA_SEC_ABOVE 0x01 +#define IEEE80211_HT_PARAM_CHA_SEC_BELOW 0x03 +#define IEEE80211_HT_PARAM_CHAN_WIDTH_ANY 0x04 +#define IEEE80211_HT_PARAM_RIFS_MODE 0x08 + +/* for operation_mode */ +#define IEEE80211_HT_OP_MODE_PROTECTION 0x0003 +#define IEEE80211_HT_OP_MODE_PROTECTION_NONE 0 +#define IEEE80211_HT_OP_MODE_PROTECTION_NONMEMBER 1 +#define IEEE80211_HT_OP_MODE_PROTECTION_20MHZ 2 +#define IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED 3 +#define IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT 0x0004 +#define IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT 0x0010 +#define IEEE80211_HT_OP_MODE_CCFS2_SHIFT 5 +#define IEEE80211_HT_OP_MODE_CCFS2_MASK 0x1fe0 + +/* for stbc_param */ +#define IEEE80211_HT_STBC_PARAM_DUAL_BEACON 0x0040 +#define IEEE80211_HT_STBC_PARAM_DUAL_CTS_PROT 0x0080 +#define IEEE80211_HT_STBC_PARAM_STBC_BEACON 0x0100 +#define IEEE80211_HT_STBC_PARAM_LSIG_TXOP_FULLPROT 0x0200 +#define IEEE80211_HT_STBC_PARAM_PCO_ACTIVE 0x0400 +#define IEEE80211_HT_STBC_PARAM_PCO_PHASE 0x0800 + + +/* block-ack parameters */ +#define IEEE80211_ADDBA_PARAM_AMSDU_MASK 0x0001 +#define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002 +#define IEEE80211_ADDBA_PARAM_TID_MASK 0x003C +#define IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFC0 +#define IEEE80211_DELBA_PARAM_TID_MASK 0xF000 +#define IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800 + +/* +* A-MPDU buffer sizes +* According to HT size varies from 8 to 64 frames +* HE adds the ability to have up to 256 frames. +* EHT adds the ability to have up to 1K frames. +*/ +#define IEEE80211_MIN_AMPDU_BUF 0x8 +#define IEEE80211_MAX_AMPDU_BUF_HT 0x40 +#define IEEE80211_MAX_AMPDU_BUF_HE 0x100 +#define IEEE80211_MAX_AMPDU_BUF_EHT 0x400 + + +/* Spatial Multiplexing Power Save Modes (for capability) */ +#define WLAN_HT_CAP_SM_PS_STATIC 0 +#define WLAN_HT_CAP_SM_PS_DYNAMIC 1 +#define WLAN_HT_CAP_SM_PS_INVALID 2 +#define WLAN_HT_CAP_SM_PS_DISABLED 3 + +/* for SM power control field lower two bits */ +#define WLAN_HT_SMPS_CONTROL_DISABLED 0 +#define WLAN_HT_SMPS_CONTROL_STATIC 1 +#define WLAN_HT_SMPS_CONTROL_DYNAMIC 3 + +/* HT action codes */ +enum ieee80211_ht_actioncode { +WLAN_HT_ACTION_NOTIFY_CHANWIDTH =0 , +WLAN_HT_ACTION_SMPS =1 , +WLAN_HT_ACTION_PSMP =2 , +WLAN_HT_ACTION_PCO_PHASE =3 , +WLAN_HT_ACTION_CSI =4 , +WLAN_HT_ACTION_NONCOMPRESSED_BF =5 , +WLAN_HT_ACTION_COMPRESSED_BF =6 , +WLAN_HT_ACTION_ASEL_IDX_FEEDBACK =7 , +}; + +/* BACK action code */ +enum ieee80211_back_actioncode { +WLAN_ACTION_ADDBA_REQ =0 , +WLAN_ACTION_ADDBA_RESP =1 , +WLAN_ACTION_DELBA =2 , +}; + +/* BACK (block-ack) parties */ +enum ieee80211_back_parties { +WLAN_BACK_RECIPIENT =0 , +WLAN_BACK_INITIATOR =1 , +}; + +#endif /* LINUX_IEEE80211_HT_H */
include/linux/ieee80211.h +1 -271
320 lines not on this page · raw message
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 59/957 wifi: ieee80211: split VHT definitions out
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <[email protected]>
[ Upstream commit 7cb14da1d7bbfa4a6417ed7f1bc07dd77bcd9c83 ]
The ieee80211.h file has gotten very long, continue splitting it by putting VHT definitions into a separate file.
Stable-dep-of: cb0caadb64ca ("wifi: ieee80211: fix definition of EHT-MCS 15 in MRU")
--- include/linux/ieee80211-vht.h | 236 ++++++++++++++++++++++++++++++++++ include/linux/ieee80211.h | 216 +------------------------------ 2 files changed, 237 insertions(+), 215 deletions(-) create mode 100644 include/linux/ieee80211-vht.h
include/linux/ieee80211-vht.h new file +236 -0
@@ -0,0 +1,236 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* IEEE 802.11 VHT definitions +* +* Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen +* <[email protected]> +* Copyright (c) 2002-2003, Jouni Malinen <[email protected]> +* Copyright (c) 2005, Devicescape Software, Inc. +* Copyright (c) 2006, Michael Wu <[email protected]> +* Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH +* Copyright (c) 2016 - 2017 Intel Deutschland GmbH +* Copyright (c) 2018 - 2025 Intel Corporation +*/ + +#ifndef LINUX_IEEE80211_VHT_H +#define LINUX_IEEE80211_VHT_H + +#include <linux/types.h> +#include <linux/if_ether.h> + +#define IEEE80211_MAX_MPDU_LEN_VHT_3895 3895 +#define IEEE80211_MAX_MPDU_LEN_VHT_7991 7991 +#define IEEE80211_MAX_MPDU_LEN_VHT_11454 11454 + +/** +* enum ieee80211_vht_opmode_bits - VHT operating mode field bits +* @IEEE80211_OPMODE_NOTIF_CHANWIDTH_MASK: channel width mask +* @IEEE80211_OPMODE_NOTIF_CHANWIDTH_20MHZ: 20 MHz channel width +* @IEEE80211_OPMODE_NOTIF_CHANWIDTH_40MHZ: 40 MHz channel width +* @IEEE80211_OPMODE_NOTIF_CHANWIDTH_80MHZ: 80 MHz channel width +* @IEEE80211_OPMODE_NOTIF_CHANWIDTH_160MHZ: 160 MHz or 80+80 MHz channel width +* @IEEE80211_OPMODE_NOTIF_BW_160_80P80: 160 / 80+80 MHz indicator flag +* @IEEE80211_OPMODE_NOTIF_RX_NSS_MASK: number of spatial streams mask +* (the NSS value is the value of this field + 1) +* @IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT: number of spatial streams shift +* @IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF: indicates streams in SU-MIMO PPDU +* using a beamforming steering matrix +*/ +enum ieee80211_vht_opmode_bits { +IEEE80211_OPMODE_NOTIF_CHANWIDTH_MASK =0x03 , +IEEE80211_OPMODE_NOTIF_CHANWIDTH_20MHZ =0 , +IEEE80211_OPMODE_NOTIF_CHANWIDTH_40MHZ =1 , +IEEE80211_OPMODE_NOTIF_CHANWIDTH_80MHZ =2 , +IEEE80211_OPMODE_NOTIF_CHANWIDTH_160MHZ =3 , +IEEE80211_OPMODE_NOTIF_BW_160_80P80 =0x04 , +IEEE80211_OPMODE_NOTIF_RX_NSS_MASK =0x70 , +IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT =4 , +IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF =0x80 , +}; + +/* +* Maximum length of AMPDU that the STA can receive in VHT. +* Length = 2 ^ (13 + max_ampdu_length_exp) - 1 (octets) +*/ +enum ieee80211_vht_max_ampdu_length_exp { +IEEE80211_VHT_MAX_AMPDU_8K =0 , +IEEE80211_VHT_MAX_AMPDU_16K =1 , +IEEE80211_VHT_MAX_AMPDU_32K =2 , +IEEE80211_VHT_MAX_AMPDU_64K =3 , +IEEE80211_VHT_MAX_AMPDU_128K =4 , +IEEE80211_VHT_MAX_AMPDU_256K =5 , +IEEE80211_VHT_MAX_AMPDU_512K =6 , +IEEE80211_VHT_MAX_AMPDU_1024K =7 +}; + +/** +* struct ieee80211_vht_mcs_info - VHT MCS information +* @rx_mcs_map: RX MCS map 2 bits for each stream, total 8 streams +* @rx_highest: Indicates highest long GI VHT PPDU data rate +* STA can receive. Rate expressed in units of 1 Mbps. +* If this field is 0 this value should not be used to +* consider the highest RX data rate supported. +* The top 3 bits of this field indicate the Maximum NSTS,total +* (a beamformee capability.) +* @tx_mcs_map: TX MCS map 2 bits for each stream, total 8 streams +* @tx_highest: Indicates highest long GI VHT PPDU data rate +* STA can transmit. Rate expressed in units of 1 Mbps. +* If this field is 0 this value should not be used to +* consider the highest TX data rate supported. +* The top 2 bits of this field are reserved, the +* 3rd bit from the top indiciates VHT Extended NSS BW +* Capability. +*/ +struct ieee80211_vht_mcs_info { +__le16 rx_mcs_map; +__le16 rx_highest; +__le16 tx_mcs_map; +__le16 tx_highest; +} __packed; + +/* for rx_highest */ +#define IEEE80211_VHT_MAX_NSTS_TOTAL_SHIFT 13 +#define IEEE80211_VHT_MAX_NSTS_TOTAL_MASK (7 << IEEE80211_VHT_MAX_NSTS_TOTAL_SHIFT) + +/* for tx_highest */ +#define IEEE80211_VHT_EXT_NSS_BW_CAPABLE (1 << 13) + +/** +* enum ieee80211_vht_mcs_support - VHT MCS support definitions +* @IEEE80211_VHT_MCS_SUPPORT_0_7: MCSes 0-7 are supported for the +* number of streams +* @IEEE80211_VHT_MCS_SUPPORT_0_8: MCSes 0-8 are supported +* @IEEE80211_VHT_MCS_SUPPORT_0_9: MCSes 0-9 are supported +* @IEEE80211_VHT_MCS_NOT_SUPPORTED: This number of streams isn't supported +* +* These definitions are used in each 2-bit subfield of the @rx_mcs_map +* and @tx_mcs_map fields of &struct ieee80211_vht_mcs_info, which are +* both split into 8 subfields by number of streams. These values indicate +* which MCSes are supported for the number of streams the value appears +* for. +*/ +enum ieee80211_vht_mcs_support { +IEEE80211_VHT_MCS_SUPPORT_0_7 =0 , +IEEE80211_VHT_MCS_SUPPORT_0_8 =1 , +IEEE80211_VHT_MCS_SUPPORT_0_9 =2 , +IEEE80211_VHT_MCS_NOT_SUPPORTED =3 , +}; + +/** +* struct ieee80211_vht_cap - VHT capabilities +* +* This structure is the "VHT capabilities element" as +* described in 802.11ac D3.0 8.4.2.160 +* @vht_cap_info: VHT capability info +* @supp_mcs: VHT MCS supported rates +*/ +struct ieee80211_vht_cap { +__le32 vht_cap_info; +struct ieee80211_vht_mcs_info supp_mcs; +} __packed; + +/** +* enum ieee80211_vht_chanwidth - VHT channel width +* @IEEE80211_VHT_CHANWIDTH_USE_HT: use the HT operation IE to +* determine the channel width (20 or 40 MHz) +* @IEEE80211_VHT_CHANWIDTH_80MHZ: 80 MHz bandwidth +* @IEEE80211_VHT_CHANWIDTH_160MHZ: 160 MHz bandwidth +* @IEEE80211_VHT_CHANWIDTH_80P80MHZ: 80+80 MHz bandwidth +*/ +enum ieee80211_vht_chanwidth { +IEEE80211_VHT_CHANWIDTH_USE_HT =0 , +IEEE80211_VHT_CHANWIDTH_80MHZ =1 , +IEEE80211_VHT_CHANWIDTH_160MHZ =2 , +IEEE80211_VHT_CHANWIDTH_80P80MHZ =3 , +}; + +/** +* struct ieee80211_vht_operation - VHT operation IE +* +* This structure is the "VHT operation element" as +* described in 802.11ac D3.0 8.4.2.161 +* @chan_width: Operating channel width +* @center_freq_seg0_idx: center freq segment 0 index +* @center_freq_seg1_idx: center freq segment 1 index +* @basic_mcs_set: VHT Basic MCS rate set +*/ +struct ieee80211_vht_operation { +u8 chan_width; +u8 center_freq_seg0_idx; +u8 center_freq_seg1_idx; +__le16 basic_mcs_set; +} __packed; + +/* 802.11ac VHT Capabilities */ +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 0x00000000 +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 0x00000001 +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 0x00000002 +#define IEEE80211_VHT_CAP_MAX_MPDU_MASK 0x00000003 +#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ 0x00000004 +#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ 0x00000008 +#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK 0x0000000C +#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_SHIFT 2 +#define IEEE80211_VHT_CAP_RXLDPC 0x00000010 +#define IEEE80211_VHT_CAP_SHORT_GI_80 0x00000020 +#define IEEE80211_VHT_CAP_SHORT_GI_160 0x00000040 +#define IEEE80211_VHT_CAP_TXSTBC 0x00000080 +#define IEEE80211_VHT_CAP_RXSTBC_1 0x00000100 +#define IEEE80211_VHT_CAP_RXSTBC_2 0x00000200 +#define IEEE80211_VHT_CAP_RXSTBC_3 0x00000300 +#define IEEE80211_VHT_CAP_RXSTBC_4 0x00000400 +#define IEEE80211_VHT_CAP_RXSTBC_MASK 0x00000700 +#define IEEE80211_VHT_CAP_RXSTBC_SHIFT 8 +#define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE 0x00000800 +#define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE 0x00001000 +#define IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT 13 +#define IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK \ + (7 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT) +#define IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_SHIFT 16 +#define IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK \ + (7 << IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_SHIFT) +#define IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE 0x00080000 +#define IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE 0x00100000 +#define IEEE80211_VHT_CAP_VHT_TXOP_PS 0x00200000 +#define IEEE80211_VHT_CAP_HTC_VHT 0x00400000 +#define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT 23 +#define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK \ + (7 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT) +#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB 0x08000000 +#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB 0x0c000000 +#define IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN 0x10000000 +#define IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN 0x20000000 +#define IEEE80211_VHT_CAP_EXT_NSS_BW_SHIFT 30 +#define IEEE80211_VHT_CAP_EXT_NSS_BW_MASK 0xc0000000 + +/** +* ieee80211_get_vht_max_nss - return max NSS for a given bandwidth/MCS +* @cap: VHT capabilities of the peer +* @bw: bandwidth to use +* @mcs: MCS index to use +* @ext_nss_bw_capable: indicates whether or not the local transmitter +* (rate scaling algorithm) can deal with the new logic +* (dot11VHTExtendedNSSBWCapable) +* @max_vht_nss: current maximum NSS as advertised by the STA in +* operating mode notification, can be 0 in which case the +* capability data will be used to derive this (from MCS support) +* Return: The maximum NSS that can be used for the given bandwidth/MCS +* combination +* +* Due to the VHT Extended NSS Bandwidth Support, the maximum NSS can +* vary for a given BW/MCS. This function parses the data. +* +* Note: This function is exported by cfg80211. +*/ +int ieee80211_get_vht_max_nss (struct ieee80211_vht_cap *cap, +enum ieee80211_vht_chanwidth bw, +int mcs,bool ext_nss_bw_capable, +unsigned int max_vht_nss); + +/* VHT action codes */ +enum ieee80211_vht_actioncode { +WLAN_VHT_ACTION_COMPRESSED_BF =0 , +WLAN_VHT_ACTION_GROUPID_MGMT =1 , +WLAN_VHT_ACTION_OPMODE_NOTIF =2 , +}; + +#endif /* LINUX_IEEE80211_VHT_H */
include/linux/ieee80211.h +1 -215
252 lines not on this page · raw message
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 60/957 wifi: ieee80211: split HE definitions out
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <[email protected]>
[ Upstream commit 02a2cf302557eb59794bba0b05d6755f44928d78 ]
The ieee80211.h file has gotten very long, continue splitting it by putting HE definitions into a separate file.
Stable-dep-of: cb0caadb64ca ("wifi: ieee80211: fix definition of EHT-MCS 15 in MRU")
--- include/linux/ieee80211-he.h | 824 +++++++++++++++++++++++++++++++++++ include/linux/ieee80211.h | 806 +--------------------------------- 2 files changed, 827 insertions(+), 803 deletions(-) create mode 100644 include/linux/ieee80211-he.h
include/linux/ieee80211-he.h new file +824 -0
@@ -0,0 +1,824 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* IEEE 802.11 HE definitions +* +* Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen +* <[email protected]> +* Copyright (c) 2002-2003, Jouni Malinen <[email protected]> +* Copyright (c) 2005, Devicescape Software, Inc. +* Copyright (c) 2006, Michael Wu <[email protected]> +* Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH +* Copyright (c) 2016 - 2017 Intel Deutschland GmbH +* Copyright (c) 2018 - 2025 Intel Corporation +*/ + +#ifndef LINUX_IEEE80211_HE_H +#define LINUX_IEEE80211_HE_H + +#include <linux/types.h> +#include <linux/if_ether.h> + +#define IEEE80211_TWT_CONTROL_NDP BIT(0) +#define IEEE80211_TWT_CONTROL_RESP_MODE BIT(1) +#define IEEE80211_TWT_CONTROL_NEG_TYPE_BROADCAST BIT(3) +#define IEEE80211_TWT_CONTROL_RX_DISABLED BIT(4) +#define IEEE80211_TWT_CONTROL_WAKE_DUR_UNIT BIT(5) + +#define IEEE80211_TWT_REQTYPE_REQUEST BIT(0) +#define IEEE80211_TWT_REQTYPE_SETUP_CMD GENMASK(3, 1) +#define IEEE80211_TWT_REQTYPE_TRIGGER BIT(4) +#define IEEE80211_TWT_REQTYPE_IMPLICIT BIT(5) +#define IEEE80211_TWT_REQTYPE_FLOWTYPE BIT(6) +#define IEEE80211_TWT_REQTYPE_FLOWID GENMASK(9, 7) +#define IEEE80211_TWT_REQTYPE_WAKE_INT_EXP GENMASK(14, 10) +#define IEEE80211_TWT_REQTYPE_PROTECTION BIT(15) + +enum ieee80211_twt_setup_cmd { +TWT_SETUP_CMD_REQUEST , +TWT_SETUP_CMD_SUGGEST , +TWT_SETUP_CMD_DEMAND , +TWT_SETUP_CMD_GROUPING , +TWT_SETUP_CMD_ACCEPT , +TWT_SETUP_CMD_ALTERNATE , +TWT_SETUP_CMD_DICTATE , +TWT_SETUP_CMD_REJECT , +}; + +struct ieee80211_twt_params { +__le16 req_type; +__le64 twt; +u8 min_twt_dur; +__le16 mantissa; +u8 channel; +} __packed; + +struct ieee80211_twt_setup { +u8 dialog_token; +u8 element_id; +u8 length; +u8 control; +u8 params[]; +} __packed; + +/** +* struct ieee80211_he_cap_elem - HE capabilities element +* @mac_cap_info: HE MAC Capabilities Information +* @phy_cap_info: HE PHY Capabilities Information +* +* This structure represents the fixed fields of the payload of the +* "HE capabilities element" as described in IEEE Std 802.11ax-2021 +* sections 9.4.2.248.2 and 9.4.2.248.3. +*/ +struct ieee80211_he_cap_elem { +u8 mac_cap_info[6 ]; +u8 phy_cap_info[11 ]; +} __packed; + +#define IEEE80211_TX_RX_MCS_NSS_DESC_MAX_LEN 5 + +/** +* enum ieee80211_he_mcs_support - HE MCS support definitions +* @IEEE80211_HE_MCS_SUPPORT_0_7: MCSes 0-7 are supported for the +* number of streams +* @IEEE80211_HE_MCS_SUPPORT_0_9: MCSes 0-9 are supported +* @IEEE80211_HE_MCS_SUPPORT_0_11: MCSes 0-11 are supported +* @IEEE80211_HE_MCS_NOT_SUPPORTED: This number of streams isn't supported +* +* These definitions are used in each 2-bit subfield of the rx_mcs_* +* and tx_mcs_* fields of &struct ieee80211_he_mcs_nss_supp, which are +* both split into 8 subfields by number of streams. These values indicate +* which MCSes are supported for the number of streams the value appears +* for. +*/ +enum ieee80211_he_mcs_support { +IEEE80211_HE_MCS_SUPPORT_0_7 =0 , +IEEE80211_HE_MCS_SUPPORT_0_9 =1 , +IEEE80211_HE_MCS_SUPPORT_0_11 =2 , +IEEE80211_HE_MCS_NOT_SUPPORTED =3 , +}; + +/** +* struct ieee80211_he_mcs_nss_supp - HE Tx/Rx HE MCS NSS Support Field +* +* This structure holds the data required for the Tx/Rx HE MCS NSS Support Field +* described in P802.11ax_D2.0 section 9.4.2.237.4 +* +* @rx_mcs_80: Rx MCS map 2 bits for each stream, total 8 streams, for channel +* widths less than 80MHz. +* @tx_mcs_80: Tx MCS map 2 bits for each stream, total 8 streams, for channel +* widths less than 80MHz. +* @rx_mcs_160: Rx MCS map 2 bits for each stream, total 8 streams, for channel +* width 160MHz. +* @tx_mcs_160: Tx MCS map 2 bits for each stream, total 8 streams, for channel +* width 160MHz. +* @rx_mcs_80p80: Rx MCS map 2 bits for each stream, total 8 streams, for +* channel width 80p80MHz. +* @tx_mcs_80p80: Tx MCS map 2 bits for each stream, total 8 streams, for +* channel width 80p80MHz. +*/ +struct ieee80211_he_mcs_nss_supp { +__le16 rx_mcs_80; +__le16 tx_mcs_80; +__le16 rx_mcs_160; +__le16 tx_mcs_160; +__le16 rx_mcs_80p80; +__le16 tx_mcs_80p80; +} __packed; + +/** +* struct ieee80211_he_operation - HE Operation element +* @he_oper_params: HE Operation Parameters + BSS Color Information +* @he_mcs_nss_set: Basic HE-MCS And NSS Set +* @optional: Optional fields VHT Operation Information, Max Co-Hosted +* BSSID Indicator, and 6 GHz Operation Information +* +* This structure represents the payload of the "HE Operation +* element" as described in IEEE Std 802.11ax-2021 section 9.4.2.249. +*/ +struct ieee80211_he_operation { +__le32 he_oper_params; +__le16 he_mcs_nss_set; +u8 optional[]; +} __packed; + +/** +* struct ieee80211_he_spr - Spatial Reuse Parameter Set element +* @he_sr_control: SR Control +* @optional: Optional fields Non-SRG OBSS PD Max Offset, SRG OBSS PD +* Min Offset, SRG OBSS PD Max Offset, SRG BSS Color +* Bitmap, and SRG Partial BSSID Bitmap +* +* This structure represents the payload of the "Spatial Reuse +* Parameter Set element" as described in IEEE Std 802.11ax-2021 +* section 9.4.2.252. +*/ +struct ieee80211_he_spr { +u8 he_sr_control; +u8 optional[]; +} __packed; + +/** +* struct ieee80211_he_mu_edca_param_ac_rec - MU AC Parameter Record field +* @aifsn: ACI/AIFSN +* @ecw_min_max: ECWmin/ECWmax +* @mu_edca_timer: MU EDCA Timer +* +* This structure represents the "MU AC Parameter Record" as described +* in IEEE Std 802.11ax-2021 section 9.4.2.251, Figure 9-788p. +*/ +struct ieee80211_he_mu_edca_param_ac_rec { +u8 aifsn; +u8 ecw_min_max; +u8 mu_edca_timer; +} __packed; + +/** +* struct ieee80211_mu_edca_param_set - MU EDCA Parameter Set element +* @mu_qos_info: QoS Info +* @ac_be: MU AC_BE Parameter Record +* @ac_bk: MU AC_BK Parameter Record +* @ac_vi: MU AC_VI Parameter Record +* @ac_vo: MU AC_VO Parameter Record +* +* This structure represents the payload of the "MU EDCA Parameter Set +* element" as described in IEEE Std 802.11ax-2021 section 9.4.2.251. +*/ +struct ieee80211_mu_edca_param_set { +u8 mu_qos_info; +struct ieee80211_he_mu_edca_param_ac_rec ac_be; +struct ieee80211_he_mu_edca_param_ac_rec ac_bk; +struct ieee80211_he_mu_edca_param_ac_rec ac_vi; +struct ieee80211_he_mu_edca_param_ac_rec ac_vo; +} __packed; + +/* 802.11ax HE MAC capabilities */ +#define IEEE80211_HE_MAC_CAP0_HTC_HE 0x01 +#define IEEE80211_HE_MAC_CAP0_TWT_REQ 0x02 +#define IEEE80211_HE_MAC_CAP0_TWT_RES 0x04 +#define IEEE80211_HE_MAC_CAP0_DYNAMIC_FRAG_NOT_SUPP 0x00 +#define IEEE80211_HE_MAC_CAP0_DYNAMIC_FRAG_LEVEL_1 0x08 +#define IEEE80211_HE_MAC_CAP0_DYNAMIC_FRAG_LEVEL_2 0x10 +#define IEEE80211_HE_MAC_CAP0_DYNAMIC_FRAG_LEVEL_3 0x18 +#define IEEE80211_HE_MAC_CAP0_DYNAMIC_FRAG_MASK 0x18 +#define IEEE80211_HE_MAC_CAP0_MAX_NUM_FRAG_MSDU_1 0x00 +#define IEEE80211_HE_MAC_CAP0_MAX_NUM_FRAG_MSDU_2 0x20 +#define IEEE80211_HE_MAC_CAP0_MAX_NUM_FRAG_MSDU_4 0x40 +#define IEEE80211_HE_MAC_CAP0_MAX_NUM_FRAG_MSDU_8 0x60 +#define IEEE80211_HE_MAC_CAP0_MAX_NUM_FRAG_MSDU_16 0x80 +#define IEEE80211_HE_MAC_CAP0_MAX_NUM_FRAG_MSDU_32 0xa0 +#define IEEE80211_HE_MAC_CAP0_MAX_NUM_FRAG_MSDU_64 0xc0 +#define IEEE80211_HE_MAC_CAP0_MAX_NUM_FRAG_MSDU_UNLIMITED 0xe0 +#define IEEE80211_HE_MAC_CAP0_MAX_NUM_FRAG_MSDU_MASK 0xe0 + +#define IEEE80211_HE_MAC_CAP1_MIN_FRAG_SIZE_UNLIMITED 0x00 +#define IEEE80211_HE_MAC_CAP1_MIN_FRAG_SIZE_128 0x01 +#define IEEE80211_HE_MAC_CAP1_MIN_FRAG_SIZE_256 0x02 +#define IEEE80211_HE_MAC_CAP1_MIN_FRAG_SIZE_512 0x03 +#define IEEE80211_HE_MAC_CAP1_MIN_FRAG_SIZE_MASK 0x03 +#define IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_0US 0x00 +#define IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_8US 0x04 +#define IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US 0x08 +#define IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK 0x0c +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_1 0x00 +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_2 0x10 +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_3 0x20 +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_4 0x30 +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_5 0x40 +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_6 0x50 +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_7 0x60 +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8 0x70 +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_MASK 0x70 + +/* Link adaptation is split between byte HE_MAC_CAP1 and +* HE_MAC_CAP2. It should be set only if IEEE80211_HE_MAC_CAP0_HTC_HE +* in which case the following values apply: +* 0 = No feedback. +* 1 = reserved. +* 2 = Unsolicited feedback. +* 3 = both +*/ +#define IEEE80211_HE_MAC_CAP1_LINK_ADAPTATION 0x80 + +#define IEEE80211_HE_MAC_CAP2_LINK_ADAPTATION 0x01 +#define IEEE80211_HE_MAC_CAP2_ALL_ACK 0x02 +#define IEEE80211_HE_MAC_CAP2_TRS 0x04 +#define IEEE80211_HE_MAC_CAP2_BSR 0x08 +#define IEEE80211_HE_MAC_CAP2_BCAST_TWT 0x10 +#define IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP 0x20 +#define IEEE80211_HE_MAC_CAP2_MU_CASCADING 0x40 +#define IEEE80211_HE_MAC_CAP2_ACK_EN 0x80 + +#define IEEE80211_HE_MAC_CAP3_OMI_CONTROL 0x02 +#define IEEE80211_HE_MAC_CAP3_OFDMA_RA 0x04 + +/* The maximum length of an A-MDPU is defined by the combination of the Maximum +* A-MDPU Length Exponent field in the HT capabilities, VHT capabilities and the +* same field in the HE capabilities. +*/ +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_0 0x00 +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1 0x08 +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2 0x10 +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3 0x18 +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK 0x18 +#define IEEE80211_HE_MAC_CAP3_AMSDU_FRAG 0x20 +#define IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED 0x40 +#define IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS 0x80 + +#define IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG 0x01 +#define IEEE80211_HE_MAC_CAP4_QTP 0x02 +#define IEEE80211_HE_MAC_CAP4_BQR 0x04 +#define IEEE80211_HE_MAC_CAP4_PSR_RESP 0x08 +#define IEEE80211_HE_MAC_CAP4_NDP_FB_REP 0x10 +#define IEEE80211_HE_MAC_CAP4_OPS 0x20 +#define IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU 0x40 +/* Multi TID agg TX is split between byte #4 and #5 +* The value is a combination of B39,B40,B41 +*/ +#define IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39 0x80 + +#define IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B40 0x01 +#define IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B41 0x02 +#define IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECTIVE_TRANSMISSION 0x04 +#define IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU 0x08 +#define IEEE80211_HE_MAC_CAP5_OM_CTRL_UL_MU_DATA_DIS_RX 0x10 +#define IEEE80211_HE_MAC_CAP5_HE_DYNAMIC_SM_PS 0x20 +#define IEEE80211_HE_MAC_CAP5_PUNCTURED_SOUNDING 0x40 +#define IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX 0x80 + +#define IEEE80211_HE_VHT_MAX_AMPDU_FACTOR 20 +#define IEEE80211_HE_HT_MAX_AMPDU_FACTOR 16 +#define IEEE80211_HE_6GHZ_MAX_AMPDU_FACTOR 13 + +/* 802.11ax HE PHY capabilities */ +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G 0x02 +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G 0x04 +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G 0x08 +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G 0x10 +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_MASK_ALL 0x1e + +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_RU_MAPPING_IN_2G 0x20 +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_RU_MAPPING_IN_5G 0x40 +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_MASK 0xfe + +#define IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_80MHZ_ONLY_SECOND_20MHZ 0x01 +#define IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_80MHZ_ONLY_SECOND_40MHZ 0x02 +#define IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_160MHZ_ONLY_SECOND_20MHZ 0x04 +#define IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_160MHZ_ONLY_SECOND_40MHZ 0x08 +#define IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK 0x0f +#define IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A 0x10 +#define IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD 0x20 +#define IEEE80211_HE_PHY_CAP1_HE_LTF_AND_GI_FOR_HE_PPDUS_0_8US 0x40 +/* Midamble RX/TX Max NSTS is split between byte #2 and byte #3 */ +#define IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS 0x80 + +#define IEEE80211_HE_PHY_CAP2_MIDAMBLE_RX_TX_MAX_NSTS 0x01 +#define IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US 0x02 +#define IEEE80211_HE_PHY_CAP2_STBC_TX_UNDER_80MHZ 0x04 +#define IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ 0x08 +#define IEEE80211_HE_PHY_CAP2_DOPPLER_TX 0x10 +#define IEEE80211_HE_PHY_CAP2_DOPPLER_RX 0x20 + +/* Note that the meaning of UL MU below is different between an AP and a non-AP +* sta, where in the AP case it indicates support for Rx and in the non-AP sta +* case it indicates support for Tx. +*/ +#define IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO 0x40 +#define IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO 0x80 + +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_NO_DCM 0x00 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_BPSK 0x01 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_QPSK 0x02 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_16_QAM 0x03 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_MASK 0x03 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_1 0x00 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_2 0x04 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_NO_DCM 0x00 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_BPSK 0x08 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_QPSK 0x10 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_16_QAM 0x18 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK 0x18 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1 0x00 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_2 0x20 +#define IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU 0x40 +#define IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER 0x80 + +#define IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE 0x01 +#define IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER 0x02 + +/* Minimal allowed value of Max STS under 80MHz is 3 */ +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_4 0x0c +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_5 0x10 +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_6 0x14 +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_7 0x18 +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_8 0x1c +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_MASK 0x1c + +/* Minimal allowed value of Max STS above 80MHz is 3 */ +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_4 0x60 +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_5 0x80 +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_6 0xa0 +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_7 0xc0 +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_8 0xe0 +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_MASK 0xe0 + +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_1 0x00 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_2 0x01 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_3 0x02 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_4 0x03 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_5 0x04 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_6 0x05 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_7 0x06 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_8 0x07 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK 0x07 + +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_1 0x00 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2 0x08 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_3 0x10 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_4 0x18 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_5 0x20 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_6 0x28 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_7 0x30 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_8 0x38 +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_MASK 0x38 + +#define IEEE80211_HE_PHY_CAP5_NG16_SU_FEEDBACK 0x40 +#define IEEE80211_HE_PHY_CAP5_NG16_MU_FEEDBACK 0x80 + +#define IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_42_SU 0x01 +#define IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU 0x02 +#define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB 0x04 +#define IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB 0x08 +#define IEEE80211_HE_PHY_CAP6_TRIG_CQI_FB 0x10 +#define IEEE80211_HE_PHY_CAP6_PARTIAL_BW_EXT_RANGE 0x20 +#define IEEE80211_HE_PHY_CAP6_PARTIAL_BANDWIDTH_DL_MUMIMO 0x40 +#define IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT 0x80 + +#define IEEE80211_HE_PHY_CAP7_PSR_BASED_SR 0x01 +#define IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP 0x02 +#define IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI 0x04 +#define IEEE80211_HE_PHY_CAP7_MAX_NC_1 0x08 +#define IEEE80211_HE_PHY_CAP7_MAX_NC_2 0x10 +#define IEEE80211_HE_PHY_CAP7_MAX_NC_3 0x18 +#define IEEE80211_HE_PHY_CAP7_MAX_NC_4 0x20 +#define IEEE80211_HE_PHY_CAP7_MAX_NC_5 0x28 +#define IEEE80211_HE_PHY_CAP7_MAX_NC_6 0x30 +#define IEEE80211_HE_PHY_CAP7_MAX_NC_7 0x38 +#define IEEE80211_HE_PHY_CAP7_MAX_NC_MASK 0x38 +#define IEEE80211_HE_PHY_CAP7_STBC_TX_ABOVE_80MHZ 0x40 +#define IEEE80211_HE_PHY_CAP7_STBC_RX_ABOVE_80MHZ 0x80 + +#define IEEE80211_HE_PHY_CAP8_HE_ER_SU_PPDU_4XLTF_AND_08_US_GI 0x01 +#define IEEE80211_HE_PHY_CAP8_20MHZ_IN_40MHZ_HE_PPDU_IN_2G 0x02 +#define IEEE80211_HE_PHY_CAP8_20MHZ_IN_160MHZ_HE_PPDU 0x04 +#define IEEE80211_HE_PHY_CAP8_80MHZ_IN_160MHZ_HE_PPDU 0x08 +#define IEEE80211_HE_PHY_CAP8_HE_ER_SU_1XLTF_AND_08_US_GI 0x10 +#define IEEE80211_HE_PHY_CAP8_MIDAMBLE_RX_TX_2X_AND_1XLTF 0x20 +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_242 0x00 +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_484 0x40 +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_996 0x80 +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_2x996 0xc0 +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_MASK 0xc0 + +#define IEEE80211_HE_PHY_CAP9_LONGER_THAN_16_SIGB_OFDM_SYM 0x01 +#define IEEE80211_HE_PHY_CAP9_NON_TRIGGERED_CQI_FEEDBACK 0x02 +#define IEEE80211_HE_PHY_CAP9_TX_1024_QAM_LESS_THAN_242_TONE_RU 0x04 +#define IEEE80211_HE_PHY_CAP9_RX_1024_QAM_LESS_THAN_242_TONE_RU 0x08 +#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB 0x10 +#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB 0x20 +#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_0US 0x0 +#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_8US 0x1 +#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US 0x2 +#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_RESERVED 0x3 +#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_POS 6 +#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK 0xc0 + +#define IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF 0x01 + +/* 802.11ax HE TX/RX MCS NSS Support */ +#define IEEE80211_TX_RX_MCS_NSS_SUPP_HIGHEST_MCS_POS (3) +#define IEEE80211_TX_RX_MCS_NSS_SUPP_TX_BITMAP_POS (6) +#define IEEE80211_TX_RX_MCS_NSS_SUPP_RX_BITMAP_POS (11) +#define IEEE80211_TX_RX_MCS_NSS_SUPP_TX_BITMAP_MASK 0x07c0 +#define IEEE80211_TX_RX_MCS_NSS_SUPP_RX_BITMAP_MASK 0xf800 + +/* TX/RX HE MCS Support field Highest MCS subfield encoding */ +enum ieee80211_he_highest_mcs_supported_subfield_enc { +HIGHEST_MCS_SUPPORTED_MCS7 =0 , +HIGHEST_MCS_SUPPORTED_MCS8 , +HIGHEST_MCS_SUPPORTED_MCS9 , +HIGHEST_MCS_SUPPORTED_MCS10 , +HIGHEST_MCS_SUPPORTED_MCS11 , +}; + +/* Calculate 802.11ax HE capabilities IE Tx/Rx HE MCS NSS Support Field size */ +static inline u8 +ieee80211_he_mcs_nss_size (const struct ieee80211_he_cap_elem *he_cap) +{ +u8 count =4 ; + +if (he_cap->phy_cap_info[0 ] & +IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G ) + count +=4 ; + +if (he_cap->phy_cap_info[0 ] & +IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G ) + count +=4 ; + +return count; +} + +/* 802.11ax HE PPE Thresholds */ +#define IEEE80211_PPE_THRES_NSS_SUPPORT_2NSS (1) +#define IEEE80211_PPE_THRES_NSS_POS (0) +#define IEEE80211_PPE_THRES_NSS_MASK (7) +#define IEEE80211_PPE_THRES_RU_INDEX_BITMASK_2x966_AND_966_RU \ + (BIT(5) | BIT(6)) +#define IEEE80211_PPE_THRES_RU_INDEX_BITMASK_MASK 0x78 +#define IEEE80211_PPE_THRES_RU_INDEX_BITMASK_POS (3) +#define IEEE80211_PPE_THRES_INFO_PPET_SIZE (3) +#define IEEE80211_HE_PPE_THRES_INFO_HEADER_SIZE (7) + +/* +* Calculate 802.11ax HE capabilities IE PPE field size +* Input: Header byte of ppe_thres (first byte), and HE capa IE's PHY cap u8* +*/ +static inline u8 +ieee80211_he_ppe_size (u8 ppe_thres_hdr,const u8 *phy_cap_info) +{ +u8 n; + +if ((phy_cap_info[6 ] & +IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT ) ==0 ) +return 0 ; + + n =hweight8 (ppe_thres_hdr & +IEEE80211_PPE_THRES_RU_INDEX_BITMASK_MASK ); + n *= (1 + ((ppe_thres_hdr &IEEE80211_PPE_THRES_NSS_MASK ) >> +IEEE80211_PPE_THRES_NSS_POS )); + +/* +* Each pair is 6 bits, and we need to add the 7 "header" bits to the +* total size. +*/ + n = (n *IEEE80211_PPE_THRES_INFO_PPET_SIZE *2 ) +7 ; + n =DIV_ROUND_UP (n,8 ); + +return n; +} + +static inline bool ieee80211_he_capa_size_ok (const u8 *data,u8 len) +{ +const struct ieee80211_he_cap_elem *he_cap_ie_elem = (const void *)data; +u8 needed =sizeof (*he_cap_ie_elem); + +if (len < needed) +return false; + + needed +=ieee80211_he_mcs_nss_size (he_cap_ie_elem); +if (len < needed) +return false; + +if (he_cap_ie_elem->phy_cap_info[6 ] & +IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT ) { +if (len < needed +1 ) +return false; + needed +=ieee80211_he_ppe_size (data[needed], + he_cap_ie_elem->phy_cap_info); + } + +return len >= needed; +} + +/* HE Operation defines */ +#define IEEE80211_HE_OPERATION_DFLT_PE_DURATION_MASK 0x00000007 +#define IEEE80211_HE_OPERATION_TWT_REQUIRED 0x00000008 +#define IEEE80211_HE_OPERATION_RTS_THRESHOLD_MASK 0x00003ff0 +#define IEEE80211_HE_OPERATION_RTS_THRESHOLD_OFFSET 4 +#define IEEE80211_HE_OPERATION_VHT_OPER_INFO 0x00004000 +#define IEEE80211_HE_OPERATION_CO_HOSTED_BSS 0x00008000 +#define IEEE80211_HE_OPERATION_ER_SU_DISABLE 0x00010000 +#define IEEE80211_HE_OPERATION_6GHZ_OP_INFO 0x00020000 +#define IEEE80211_HE_OPERATION_BSS_COLOR_MASK 0x3f000000 +#define IEEE80211_HE_OPERATION_BSS_COLOR_OFFSET 24 +#define IEEE80211_HE_OPERATION_PARTIAL_BSS_COLOR 0x40000000 +#define IEEE80211_HE_OPERATION_BSS_COLOR_DISABLED 0x80000000 + +#define IEEE80211_6GHZ_CTRL_REG_LPI_AP 0 +#define IEEE80211_6GHZ_CTRL_REG_SP_AP 1 +#define IEEE80211_6GHZ_CTRL_REG_VLP_AP 2 +#define IEEE80211_6GHZ_CTRL_REG_INDOOR_LPI_AP 3 +#define IEEE80211_6GHZ_CTRL_REG_INDOOR_SP_AP_OLD 4 +#define IEEE80211_6GHZ_CTRL_REG_INDOOR_SP_AP 8 + +/** +* struct ieee80211_he_6ghz_oper - HE 6 GHz operation Information field +* @primary: primary channel +* @control: control flags +* @ccfs0: channel center frequency segment 0 +* @ccfs1: channel center frequency segment 1 +* @minrate: minimum rate (in 1 Mbps units) +*/ +struct ieee80211_he_6ghz_oper { +u8 primary; +#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH 0x3 +#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_20MHZ 0 +#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_40MHZ 1 +#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_80MHZ 2 +#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_160MHZ 3 +#define IEEE80211_HE_6GHZ_OPER_CTRL_DUP_BEACON 0x4 +#define IEEE80211_HE_6GHZ_OPER_CTRL_REG_INFO 0x78 +u8 control; +u8 ccfs0; +u8 ccfs1; +u8 minrate; +} __packed; + +/** +* enum ieee80211_reg_conn_bits - represents Regulatory connectivity field bits. +* +* This enumeration defines bit flags used to represent regulatory connectivity +* field bits. +* +* @IEEE80211_REG_CONN_LPI_VALID: Indicates whether the LPI bit is valid. +* @IEEE80211_REG_CONN_LPI_VALUE: Represents the value of the LPI bit. +* @IEEE80211_REG_CONN_SP_VALID: Indicates whether the SP bit is valid. +* @IEEE80211_REG_CONN_SP_VALUE: Represents the value of the SP bit. +*/ +enum ieee80211_reg_conn_bits { +IEEE80211_REG_CONN_LPI_VALID =BIT (0 ), +IEEE80211_REG_CONN_LPI_VALUE =BIT (1 ), +IEEE80211_REG_CONN_SP_VALID =BIT (2 ), +IEEE80211_REG_CONN_SP_VALUE =BIT (3 ), +}; + +/* transmit power interpretation type of transmit power envelope element */ +enum ieee80211_tx_power_intrpt_type { +IEEE80211_TPE_LOCAL_EIRP , +IEEE80211_TPE_LOCAL_EIRP_PSD , +IEEE80211_TPE_REG_CLIENT_EIRP , +IEEE80211_TPE_REG_CLIENT_EIRP_PSD , +}; + +/* category type of transmit power envelope element */ +enum ieee80211_tx_power_category_6ghz { +IEEE80211_TPE_CAT_6GHZ_DEFAULT =0 , +IEEE80211_TPE_CAT_6GHZ_SUBORDINATE =1 , +}; + +/* +* For IEEE80211_TPE_LOCAL_EIRP / IEEE80211_TPE_REG_CLIENT_EIRP, +* setting to 63.5 dBm means no constraint. +*/ +#define IEEE80211_TPE_MAX_TX_PWR_NO_CONSTRAINT 127 + +/* +* For IEEE80211_TPE_LOCAL_EIRP_PSD / IEEE80211_TPE_REG_CLIENT_EIRP_PSD, +* setting to 127 indicates no PSD limit for the 20 MHz channel. +*/ +#define IEEE80211_TPE_PSD_NO_LIMIT 127 + +/** +* struct ieee80211_tx_pwr_env - Transmit Power Envelope +* @info: Transmit Power Information field +* @variable: Maximum Transmit Power field +* +* This structure represents the payload of the "Transmit Power +* Envelope element" as described in IEEE Std 802.11ax-2021 section +* 9.4.2.161 +*/ +struct ieee80211_tx_pwr_env { +u8 info; +u8 variable[]; +} __packed; + +#define IEEE80211_TX_PWR_ENV_INFO_COUNT 0x7 +#define IEEE80211_TX_PWR_ENV_INFO_INTERPRET 0x38 +#define IEEE80211_TX_PWR_ENV_INFO_CATEGORY 0xC0 + +#define IEEE80211_TX_PWR_ENV_EXT_COUNT 0xF + +static inline bool ieee80211_valid_tpe_element (const u8 *data,u8 len) +{ +const struct ieee80211_tx_pwr_env *env = (const void *)data; +u8 count, interpret, category; +u8 needed =sizeof (*env); +u8 N ;/* also called N in the spec */ + +if (len < needed) +return false; + + count =u8_get_bits (env->info,IEEE80211_TX_PWR_ENV_INFO_COUNT ); + interpret =u8_get_bits (env->info,IEEE80211_TX_PWR_ENV_INFO_INTERPRET ); + category =u8_get_bits (env->info,IEEE80211_TX_PWR_ENV_INFO_CATEGORY ); + +switch (category) { +case IEEE80211_TPE_CAT_6GHZ_DEFAULT : +case IEEE80211_TPE_CAT_6GHZ_SUBORDINATE : +break ; +default : +return false; + } + +switch (interpret) { +case IEEE80211_TPE_LOCAL_EIRP : +case IEEE80211_TPE_REG_CLIENT_EIRP : +if (count >3 ) +return false; + +/* count == 0 encodes 1 value for 20 MHz, etc. */ + needed += count +1 ; + +if (len < needed) +return false; + +/* there can be extension fields not accounted for in 'count' */ + +return true; +case IEEE80211_TPE_LOCAL_EIRP_PSD : +case IEEE80211_TPE_REG_CLIENT_EIRP_PSD : +if (count >4 ) +return false; + +N = count ?1 << (count -1 ) :1 ; + needed +=N ; + +if (len < needed) +return false; + +if (len > needed) { +u8 K =u8_get_bits (env->variable[N ], +IEEE80211_TX_PWR_ENV_EXT_COUNT ); + + needed +=1 +K ; +if (len < needed) +return false; + } + +return true; + } + +return false; +} + +/* +* ieee80211_he_oper_size - calculate 802.11ax HE Operations IE size +* @he_oper_ie: byte data of the He Operations IE, stating from the byte +* after the ext ID byte. It is assumed that he_oper_ie has at least +* sizeof(struct ieee80211_he_operation) bytes, the caller must have +* validated this. +* @return the actual size of the IE data (not including header), or 0 on error +*/ +static inline u8 +ieee80211_he_oper_size (const u8 *he_oper_ie) +{ +const struct ieee80211_he_operation *he_oper = (const void *)he_oper_ie; +u8 oper_len =sizeof (struct ieee80211_he_operation ); +u32 he_oper_params; + +/* Make sure the input is not NULL */ +if (!he_oper_ie) +return 0 ; + +/* Calc required length */ + he_oper_params =le32_to_cpu (he_oper->he_oper_params); +if (he_oper_params &IEEE80211_HE_OPERATION_VHT_OPER_INFO ) + oper_len +=3 ; +if (he_oper_params &IEEE80211_HE_OPERATION_CO_HOSTED_BSS ) + oper_len++; +if (he_oper_params &IEEE80211_HE_OPERATION_6GHZ_OP_INFO ) + oper_len +=sizeof (struct ieee80211_he_6ghz_oper ); + +/* Add the first byte (extension ID) to the total length */ + oper_len++; + +return oper_len; +} + +/** +* ieee80211_he_6ghz_oper - obtain 6 GHz operation field +* @he_oper: HE operation element (must be pre-validated for size) +* but may be %NULL +* +* Return: a pointer to the 6 GHz operation field, or %NULL +*/ +static inline const struct ieee80211_he_6ghz_oper * +ieee80211_he_6ghz_oper (const struct ieee80211_he_operation *he_oper) +{ +const u8 *ret; +u32 he_oper_params; + +if (!he_oper) +return NULL ; + + ret = (const void *)&he_oper->optional; + + he_oper_params =le32_to_cpu (he_oper->he_oper_params); + +if (!(he_oper_params &IEEE80211_HE_OPERATION_6GHZ_OP_INFO )) +return NULL ; +if (he_oper_params &IEEE80211_HE_OPERATION_VHT_OPER_INFO ) + ret +=3 ; +if (he_oper_params &IEEE80211_HE_OPERATION_CO_HOSTED_BSS ) + ret++; + +return (const void *)ret; +} + +/* HE Spatial Reuse defines */ +#define IEEE80211_HE_SPR_PSR_DISALLOWED BIT(0) +#define IEEE80211_HE_SPR_NON_SRG_OBSS_PD_SR_DISALLOWED BIT(1) +#define IEEE80211_HE_SPR_NON_SRG_OFFSET_PRESENT BIT(2) +#define IEEE80211_HE_SPR_SRG_INFORMATION_PRESENT BIT(3) +#define IEEE80211_HE_SPR_HESIGA_SR_VAL15_ALLOWED BIT(4) + +/* +* ieee80211_he_spr_size - calculate 802.11ax HE Spatial Reuse IE size +* @he_spr_ie: byte data of the He Spatial Reuse IE, stating from the byte +* after the ext ID byte. It is assumed that he_spr_ie has at least +* sizeof(struct ieee80211_he_spr) bytes, the caller must have validated +* this +* @return the actual size of the IE data (not including header), or 0 on error +*/ +static inline u8 +ieee80211_he_spr_size (const u8 *he_spr_ie) +{ +const struct ieee80211_he_spr *he_spr = (const void *)he_spr_ie; +u8 spr_len =sizeof (struct ieee80211_he_spr ); +u8 he_spr_params; + +/* Make sure the input is not NULL */ +if (!he_spr_ie) +return 0 ; + +/* Calc required length */ + he_spr_params = he_spr->he_sr_control; +if (he_spr_params &IEEE80211_HE_SPR_NON_SRG_OFFSET_PRESENT ) + spr_len++; +if (he_spr_params &IEEE80211_HE_SPR_SRG_INFORMATION_PRESENT ) + spr_len +=18 ; + +/* Add the first byte (extension ID) to the total length */ + spr_len++; + +return spr_len; +} + +struct ieee80211_he_6ghz_capa { +/* uses IEEE80211_HE_6GHZ_CAP_* below */ +__le16 capa; +} __packed; + +/* HE 6 GHz band capabilities */ +/* uses enum ieee80211_min_mpdu_spacing values */ +#define IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START 0x0007 +/* uses enum ieee80211_vht_max_ampdu_length_exp values */ +#define IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP 0x0038 +/* uses IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_* values */ +#define IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN 0x00c0 +/* WLAN_HT_CAP_SM_PS_* values */ +#define IEEE80211_HE_6GHZ_CAP_SM_PS 0x0600 +#define IEEE80211_HE_6GHZ_CAP_RD_RESPONDER 0x0800 +#define IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS 0x1000 +#define IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS 0x2000 + +#endif /* LINUX_IEEE80211_HE_H */
include/linux/ieee80211.h +3 -803
836 lines not on this page · raw message
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 61/957 wifi: ieee80211: split EHT definitions out
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <[email protected]>
[ Upstream commit 86bc0c662322b4749cd666678d2fdce7015bcae3 ]
The ieee80211.h file has gotten very long, continue splitting it by putting EHT definitions into a separate file.
Stable-dep-of: cb0caadb64ca ("wifi: ieee80211: fix definition of EHT-MCS 15 in MRU")
--- include/linux/ieee80211-eht.h | 1182 +++++++++++++++++++++++++++++++++ include/linux/ieee80211.h | 1164 +------------------------------- 2 files changed, 1184 insertions(+), 1162 deletions(-) create mode 100644 include/linux/ieee80211-eht.h
include/linux/ieee80211-eht.h new file +1182 -0
@@ -0,0 +1,1182 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* IEEE 802.11 EHT definitions +* +* Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen +* <[email protected]> +* Copyright (c) 2002-2003, Jouni Malinen <[email protected]> +* Copyright (c) 2005, Devicescape Software, Inc. +* Copyright (c) 2006, Michael Wu <[email protected]> +* Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH +* Copyright (c) 2016 - 2017 Intel Deutschland GmbH +* Copyright (c) 2018 - 2025 Intel Corporation +*/ + +#ifndef LINUX_IEEE80211_EHT_H +#define LINUX_IEEE80211_EHT_H + +#include <linux/types.h> +#include <linux/if_ether.h> +/* need HE definitions for the inlines here */ +#include <linux/ieee80211-he.h> + +#define IEEE80211_TTLM_MAX_CNT 2 +#define IEEE80211_TTLM_CONTROL_DIRECTION 0x03 +#define IEEE80211_TTLM_CONTROL_DEF_LINK_MAP 0x04 +#define IEEE80211_TTLM_CONTROL_SWITCH_TIME_PRESENT 0x08 +#define IEEE80211_TTLM_CONTROL_EXPECTED_DUR_PRESENT 0x10 +#define IEEE80211_TTLM_CONTROL_LINK_MAP_SIZE 0x20 + +#define IEEE80211_TTLM_DIRECTION_DOWN 0 +#define IEEE80211_TTLM_DIRECTION_UP 1 +#define IEEE80211_TTLM_DIRECTION_BOTH 2 + +/** +* struct ieee80211_ttlm_elem - TID-To-Link Mapping element +* +* Defined in section 9.4.2.314 in P802.11be_D4 +* +* @control: the first part of control field +* @optional: the second part of control field +*/ +struct ieee80211_ttlm_elem { +u8 control; +u8 optional[]; +} __packed; + +#define IEEE80211_EHT_MCS_NSS_RX 0x0f +#define IEEE80211_EHT_MCS_NSS_TX 0xf0 + +/** +* struct ieee80211_eht_mcs_nss_supp_20mhz_only - EHT 20MHz only station max +* supported NSS for per MCS. +* +* For each field below, bits 0 - 3 indicate the maximal number of spatial +* streams for Rx, and bits 4 - 7 indicate the maximal number of spatial streams +* for Tx. +* +* @rx_tx_mcs7_max_nss: indicates the maximum number of spatial streams +* supported for reception and the maximum number of spatial streams +* supported for transmission for MCS 0 - 7. +* @rx_tx_mcs9_max_nss: indicates the maximum number of spatial streams +* supported for reception and the maximum number of spatial streams +* supported for transmission for MCS 8 - 9. +* @rx_tx_mcs11_max_nss: indicates the maximum number of spatial streams +* supported for reception and the maximum number of spatial streams +* supported for transmission for MCS 10 - 11. +* @rx_tx_mcs13_max_nss: indicates the maximum number of spatial streams +* supported for reception and the maximum number of spatial streams +* supported for transmission for MCS 12 - 13. +* @rx_tx_max_nss: array of the previous fields for easier loop access +*/ +struct ieee80211_eht_mcs_nss_supp_20mhz_only { +union { +struct { +u8 rx_tx_mcs7_max_nss; +u8 rx_tx_mcs9_max_nss; +u8 rx_tx_mcs11_max_nss; +u8 rx_tx_mcs13_max_nss; + }; +u8 rx_tx_max_nss[4 ]; + }; +}; + +/** +* struct ieee80211_eht_mcs_nss_supp_bw - EHT max supported NSS per MCS (except +* 20MHz only stations). +* +* For each field below, bits 0 - 3 indicate the maximal number of spatial +* streams for Rx, and bits 4 - 7 indicate the maximal number of spatial streams +* for Tx. +* +* @rx_tx_mcs9_max_nss: indicates the maximum number of spatial streams +* supported for reception and the maximum number of spatial streams +* supported for transmission for MCS 0 - 9. +* @rx_tx_mcs11_max_nss: indicates the maximum number of spatial streams +* supported for reception and the maximum number of spatial streams +* supported for transmission for MCS 10 - 11. +* @rx_tx_mcs13_max_nss: indicates the maximum number of spatial streams +* supported for reception and the maximum number of spatial streams +* supported for transmission for MCS 12 - 13. +* @rx_tx_max_nss: array of the previous fields for easier loop access +*/ +struct ieee80211_eht_mcs_nss_supp_bw { +union { +struct { +u8 rx_tx_mcs9_max_nss; +u8 rx_tx_mcs11_max_nss; +u8 rx_tx_mcs13_max_nss; + }; +u8 rx_tx_max_nss[3 ]; + }; +}; + +/** +* struct ieee80211_eht_cap_elem_fixed - EHT capabilities fixed data +* +* This structure is the "EHT Capabilities element" fixed fields as +* described in P802.11be_D2.0 section 9.4.2.313. +* +* @mac_cap_info: MAC capabilities, see IEEE80211_EHT_MAC_CAP* +* @phy_cap_info: PHY capabilities, see IEEE80211_EHT_PHY_CAP* +*/ +struct ieee80211_eht_cap_elem_fixed { +u8 mac_cap_info[2 ]; +u8 phy_cap_info[9 ]; +} __packed; + +/** +* struct ieee80211_eht_cap_elem - EHT capabilities element +* @fixed: fixed parts, see &ieee80211_eht_cap_elem_fixed +* @optional: optional parts +*/ +struct ieee80211_eht_cap_elem { +struct ieee80211_eht_cap_elem_fixed fixed; + +/* +* Followed by: +* Supported EHT-MCS And NSS Set field: 4, 3, 6 or 9 octets. +* EHT PPE Thresholds field: variable length. +*/ +u8 optional[]; +} __packed; + +#define IEEE80211_EHT_OPER_INFO_PRESENT 0x01 +#define IEEE80211_EHT_OPER_DISABLED_SUBCHANNEL_BITMAP_PRESENT 0x02 +#define IEEE80211_EHT_OPER_EHT_DEF_PE_DURATION 0x04 +#define IEEE80211_EHT_OPER_GROUP_ADDRESSED_BU_IND_LIMIT 0x08 +#define IEEE80211_EHT_OPER_GROUP_ADDRESSED_BU_IND_EXP_MASK 0x30 +#define IEEE80211_EHT_OPER_MCS15_DISABLE 0x40 + +/** +* struct ieee80211_eht_operation - eht operation element +* +* This structure is the "EHT Operation Element" fields as +* described in P802.11be_D2.0 section 9.4.2.311 +* +* @params: EHT operation element parameters. See &IEEE80211_EHT_OPER_* +* @basic_mcs_nss: indicates the EHT-MCSs for each number of spatial streams in +* EHT PPDUs that are supported by all EHT STAs in the BSS in transmit and +* receive. +* @optional: optional parts +*/ +struct ieee80211_eht_operation { +u8 params; +struct ieee80211_eht_mcs_nss_supp_20mhz_only basic_mcs_nss; +u8 optional[]; +} __packed; + +/** +* struct ieee80211_eht_operation_info - eht operation information +* +* @control: EHT operation information control. +* @ccfs0: defines a channel center frequency for a 20, 40, 80, 160, or 320 MHz +* EHT BSS. +* @ccfs1: defines a channel center frequency for a 160 or 320 MHz EHT BSS. +* @optional: optional parts +*/ +struct ieee80211_eht_operation_info { +u8 control; +u8 ccfs0; +u8 ccfs1; +u8 optional[]; +} __packed; + +/* EHT MAC capabilities as defined in P802.11be_D2.0 section 9.4.2.313.2 */ +#define IEEE80211_EHT_MAC_CAP0_EPCS_PRIO_ACCESS 0x01 +#define IEEE80211_EHT_MAC_CAP0_OM_CONTROL 0x02 +#define IEEE80211_EHT_MAC_CAP0_TRIG_TXOP_SHARING_MODE1 0x04 +#define IEEE80211_EHT_MAC_CAP0_TRIG_TXOP_SHARING_MODE2 0x08 +#define IEEE80211_EHT_MAC_CAP0_RESTRICTED_TWT 0x10 +#define IEEE80211_EHT_MAC_CAP0_SCS_TRAFFIC_DESC 0x20 +#define IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_MASK 0xc0 +#define IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_3895 0 +#define IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_7991 1 +#define IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_11454 2 + +#define IEEE80211_EHT_MAC_CAP1_MAX_AMPDU_LEN_MASK 0x01 +#define IEEE80211_EHT_MAC_CAP1_EHT_TRS 0x02 +#define IEEE80211_EHT_MAC_CAP1_TXOP_RET 0x04 +#define IEEE80211_EHT_MAC_CAP1_TWO_BQRS 0x08 +#define IEEE80211_EHT_MAC_CAP1_EHT_LINK_ADAPT_MASK 0x30 +#define IEEE80211_EHT_MAC_CAP1_UNSOL_EPCS_PRIO_ACCESS 0x40 + +/* EHT PHY capabilities as defined in P802.11be_D2.0 section 9.4.2.313.3 */ +#define IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ 0x02 +#define IEEE80211_EHT_PHY_CAP0_242_TONE_RU_GT20MHZ 0x04 +#define IEEE80211_EHT_PHY_CAP0_NDP_4_EHT_LFT_32_GI 0x08 +#define IEEE80211_EHT_PHY_CAP0_PARTIAL_BW_UL_MU_MIMO 0x10 +#define IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMER 0x20 +#define IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMEE 0x40 + +/* EHT beamformee number of spatial streams <= 80MHz is split */ +#define IEEE80211_EHT_PHY_CAP0_BEAMFORMEE_SS_80MHZ_MASK 0x80 +#define IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_80MHZ_MASK 0x03 + +#define IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_160MHZ_MASK 0x1c +#define IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_320MHZ_MASK 0xe0 + +#define IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_80MHZ_MASK 0x07 +#define IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_160MHZ_MASK 0x38 + +/* EHT number of sounding dimensions for 320MHz is split */ +#define IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_320MHZ_MASK 0xc0 +#define IEEE80211_EHT_PHY_CAP3_SOUNDING_DIM_320MHZ_MASK 0x01 +#define IEEE80211_EHT_PHY_CAP3_NG_16_SU_FEEDBACK 0x02 +#define IEEE80211_EHT_PHY_CAP3_NG_16_MU_FEEDBACK 0x04 +#define IEEE80211_EHT_PHY_CAP3_CODEBOOK_4_2_SU_FDBK 0x08 +#define IEEE80211_EHT_PHY_CAP3_CODEBOOK_7_5_MU_FDBK 0x10 +#define IEEE80211_EHT_PHY_CAP3_TRIG_SU_BF_FDBK 0x20 +#define IEEE80211_EHT_PHY_CAP3_TRIG_MU_BF_PART_BW_FDBK 0x40 +#define IEEE80211_EHT_PHY_CAP3_TRIG_CQI_FDBK 0x80 + +#define IEEE80211_EHT_PHY_CAP4_PART_BW_DL_MU_MIMO 0x01 +#define IEEE80211_EHT_PHY_CAP4_PSR_SR_SUPP 0x02 +#define IEEE80211_EHT_PHY_CAP4_POWER_BOOST_FACT_SUPP 0x04 +#define IEEE80211_EHT_PHY_CAP4_EHT_MU_PPDU_4_EHT_LTF_08_GI 0x08 +#define IEEE80211_EHT_PHY_CAP4_MAX_NC_MASK 0xf0 + +#define IEEE80211_EHT_PHY_CAP5_NON_TRIG_CQI_FEEDBACK 0x01 +#define IEEE80211_EHT_PHY_CAP5_TX_LESS_242_TONE_RU_SUPP 0x02 +#define IEEE80211_EHT_PHY_CAP5_RX_LESS_242_TONE_RU_SUPP 0x04 +#define IEEE80211_EHT_PHY_CAP5_PPE_THRESHOLD_PRESENT 0x08 +#define IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_MASK 0x30 +#define IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_0US 0 +#define IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_8US 1 +#define IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_16US 2 +#define IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_20US 3 + +/* Maximum number of supported EHT LTF is split */ +#define IEEE80211_EHT_PHY_CAP5_MAX_NUM_SUPP_EHT_LTF_MASK 0xc0 +#define IEEE80211_EHT_PHY_CAP5_SUPP_EXTRA_EHT_LTF 0x40 +#define IEEE80211_EHT_PHY_CAP6_MAX_NUM_SUPP_EHT_LTF_MASK 0x07 + +#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_80MHZ 0x08 +#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_160MHZ 0x30 +#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_320MHZ 0x40 +#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_MASK 0x78 +#define IEEE80211_EHT_PHY_CAP6_EHT_DUP_6GHZ_SUPP 0x80 + +#define IEEE80211_EHT_PHY_CAP7_20MHZ_STA_RX_NDP_WIDER_BW 0x01 +#define IEEE80211_EHT_PHY_CAP7_NON_OFDMA_UL_MU_MIMO_80MHZ 0x02 +#define IEEE80211_EHT_PHY_CAP7_NON_OFDMA_UL_MU_MIMO_160MHZ 0x04 +#define IEEE80211_EHT_PHY_CAP7_NON_OFDMA_UL_MU_MIMO_320MHZ 0x08 +#define IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_80MHZ 0x10 +#define IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_160MHZ 0x20 +#define IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_320MHZ 0x40 +#define IEEE80211_EHT_PHY_CAP7_TB_SOUNDING_FDBK_RATE_LIMIT 0x80 + +#define IEEE80211_EHT_PHY_CAP8_RX_1024QAM_WIDER_BW_DL_OFDMA 0x01 +#define IEEE80211_EHT_PHY_CAP8_RX_4096QAM_WIDER_BW_DL_OFDMA 0x02 + +/* +* EHT operation channel width as defined in P802.11be_D2.0 section 9.4.2.311 +*/ +#define IEEE80211_EHT_OPER_CHAN_WIDTH 0x7 +#define IEEE80211_EHT_OPER_CHAN_WIDTH_20MHZ 0 +#define IEEE80211_EHT_OPER_CHAN_WIDTH_40MHZ 1 +#define IEEE80211_EHT_OPER_CHAN_WIDTH_80MHZ 2 +#define IEEE80211_EHT_OPER_CHAN_WIDTH_160MHZ 3 +#define IEEE80211_EHT_OPER_CHAN_WIDTH_320MHZ 4 + +/* Calculate 802.11be EHT capabilities IE Tx/Rx EHT MCS NSS Support Field size */ +static inline u8 +ieee80211_eht_mcs_nss_size (const struct ieee80211_he_cap_elem *he_cap, +const struct ieee80211_eht_cap_elem_fixed *eht_cap, +bool from_ap) +{ +u8 count =0 ; + +/* on 2.4 GHz, if it supports 40 MHz, the result is 3 */ +if (he_cap->phy_cap_info[0 ] & +IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G ) +return 3 ; + +/* on 2.4 GHz, these three bits are reserved, so should be 0 */ +if (he_cap->phy_cap_info[0 ] & +IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G ) + count +=3 ; + +if (he_cap->phy_cap_info[0 ] & +IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G ) + count +=3 ; + +if (eht_cap->phy_cap_info[0 ] &IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ ) + count +=3 ; + +if (count) +return count; + +return from_ap ?3 :4 ; +} + +/* 802.11be EHT PPE Thresholds */ +#define IEEE80211_EHT_PPE_THRES_NSS_POS 0 +#define IEEE80211_EHT_PPE_THRES_NSS_MASK 0xf +#define IEEE80211_EHT_PPE_THRES_RU_INDEX_BITMASK_MASK 0x1f0 +#define IEEE80211_EHT_PPE_THRES_INFO_PPET_SIZE 3 +#define IEEE80211_EHT_PPE_THRES_INFO_HEADER_SIZE 9 + +/* +* Calculate 802.11be EHT capabilities IE EHT field size +*/ +static inline u8 +ieee80211_eht_ppe_size (u16 ppe_thres_hdr,const u8 *phy_cap_info) +{ +u32 n; + +if (!(phy_cap_info[5 ] & +IEEE80211_EHT_PHY_CAP5_PPE_THRESHOLD_PRESENT )) +return 0 ; + + n =hweight16 (ppe_thres_hdr & +IEEE80211_EHT_PPE_THRES_RU_INDEX_BITMASK_MASK ); + n *=1 +u16_get_bits (ppe_thres_hdr,IEEE80211_EHT_PPE_THRES_NSS_MASK ); + +/* +* Each pair is 6 bits, and we need to add the 9 "header" bits to the +* total size. +*/ + n = n *IEEE80211_EHT_PPE_THRES_INFO_PPET_SIZE *2 + +IEEE80211_EHT_PPE_THRES_INFO_HEADER_SIZE ; +return DIV_ROUND_UP (n,8 ); +} + +static inline bool +ieee80211_eht_capa_size_ok (const u8 *he_capa,const u8 *data,u8 len, +bool from_ap) +{ +const struct ieee80211_eht_cap_elem_fixed *elem = (const void *)data; +u8 needed =sizeof (struct ieee80211_eht_cap_elem_fixed ); + +if (len < needed || !he_capa) +return false; + + needed +=ieee80211_eht_mcs_nss_size ((const void *)he_capa, + (const void *)data, + from_ap); +if (len < needed) +return false; + +if (elem->phy_cap_info[5 ] & +IEEE80211_EHT_PHY_CAP5_PPE_THRESHOLD_PRESENT ) { +u16 ppe_thres_hdr; + +if (len < needed +sizeof (ppe_thres_hdr)) +return false; + + ppe_thres_hdr =get_unaligned_le16 (data + needed); + needed +=ieee80211_eht_ppe_size (ppe_thres_hdr, + elem->phy_cap_info); + } + +return len >= needed; +} + +static inline bool +ieee80211_eht_oper_size_ok (const u8 *data,u8 len) +{ +const struct ieee80211_eht_operation *elem = (const void *)data; +u8 needed =sizeof (*elem); + +if (len < needed) +return false; + +if (elem->params &IEEE80211_EHT_OPER_INFO_PRESENT ) { + needed +=3 ; + +if (elem->params & +IEEE80211_EHT_OPER_DISABLED_SUBCHANNEL_BITMAP_PRESENT ) + needed +=2 ; + } + +return len >= needed; +} + +/* must validate ieee80211_eht_oper_size_ok() first */ +static inline u16 +ieee80211_eht_oper_dis_subchan_bitmap (const struct ieee80211_eht_operation *eht_oper) +{ +const struct ieee80211_eht_operation_info *info = + (const void *)eht_oper->optional; + +if (!(eht_oper->params &IEEE80211_EHT_OPER_INFO_PRESENT )) +return 0 ; + +if (!(eht_oper->params &IEEE80211_EHT_OPER_DISABLED_SUBCHANNEL_BITMAP_PRESENT )) +return 0 ; + +return get_unaligned_le16 (info->optional); +} + +#define IEEE80211_BW_IND_DIS_SUBCH_PRESENT BIT(1) + +struct ieee80211_bandwidth_indication { +u8 params; +struct ieee80211_eht_operation_info info; +} __packed; + +static inline bool +ieee80211_bandwidth_indication_size_ok (const u8 *data,u8 len) +{ +const struct ieee80211_bandwidth_indication *bwi = (const void *)data; + +if (len <sizeof (*bwi)) +return false; + +if (bwi->params &IEEE80211_BW_IND_DIS_SUBCH_PRESENT && + len <sizeof (*bwi) +2 ) +return false; + +return true; +} + +/* Protected EHT action codes */ +enum ieee80211_protected_eht_actioncode { +WLAN_PROTECTED_EHT_ACTION_TTLM_REQ =0 , +WLAN_PROTECTED_EHT_ACTION_TTLM_RES =1 , +WLAN_PROTECTED_EHT_ACTION_TTLM_TEARDOWN =2 , +WLAN_PROTECTED_EHT_ACTION_EPCS_ENABLE_REQ =3 , +WLAN_PROTECTED_EHT_ACTION_EPCS_ENABLE_RESP =4 , +WLAN_PROTECTED_EHT_ACTION_EPCS_ENABLE_TEARDOWN =5 , +WLAN_PROTECTED_EHT_ACTION_EML_OP_MODE_NOTIF =6 , +WLAN_PROTECTED_EHT_ACTION_LINK_RECOMMEND =7 , +WLAN_PROTECTED_EHT_ACTION_ML_OP_UPDATE_REQ =8 , +WLAN_PROTECTED_EHT_ACTION_ML_OP_UPDATE_RESP =9 , +WLAN_PROTECTED_EHT_ACTION_LINK_RECONFIG_NOTIF =10 , +WLAN_PROTECTED_EHT_ACTION_LINK_RECONFIG_REQ =11 , +WLAN_PROTECTED_EHT_ACTION_LINK_RECONFIG_RESP =12 , +}; + +/* multi-link device */ +#define IEEE80211_MLD_MAX_NUM_LINKS 15 + +#define IEEE80211_ML_CONTROL_TYPE 0x0007 +#define IEEE80211_ML_CONTROL_TYPE_BASIC 0 +#define IEEE80211_ML_CONTROL_TYPE_PREQ 1 +#define IEEE80211_ML_CONTROL_TYPE_RECONF 2 +#define IEEE80211_ML_CONTROL_TYPE_TDLS 3 +#define IEEE80211_ML_CONTROL_TYPE_PRIO_ACCESS 4 +#define IEEE80211_ML_CONTROL_PRESENCE_MASK 0xfff0 + +struct ieee80211_multi_link_elem { +__le16 control; +u8 variable[]; +} __packed; + +#define IEEE80211_MLC_BASIC_PRES_LINK_ID 0x0010 +#define IEEE80211_MLC_BASIC_PRES_BSS_PARAM_CH_CNT 0x0020 +#define IEEE80211_MLC_BASIC_PRES_MED_SYNC_DELAY 0x0040 +#define IEEE80211_MLC_BASIC_PRES_EML_CAPA 0x0080 +#define IEEE80211_MLC_BASIC_PRES_MLD_CAPA_OP 0x0100 +#define IEEE80211_MLC_BASIC_PRES_MLD_ID 0x0200 +#define IEEE80211_MLC_BASIC_PRES_EXT_MLD_CAPA_OP 0x0400 + +#define IEEE80211_MED_SYNC_DELAY_DURATION 0x00ff +#define IEEE80211_MED_SYNC_DELAY_SYNC_OFDM_ED_THRESH 0x0f00 +#define IEEE80211_MED_SYNC_DELAY_SYNC_MAX_NUM_TXOPS 0xf000 + +/* +* Described in P802.11be_D3.0 +* dot11MSDTimerDuration should default to 5484 (i.e. 171.375) +* dot11MSDOFDMEDthreshold defaults to -72 (i.e. 0) +* dot11MSDTXOPMAX defaults to 1 +*/ +#define IEEE80211_MED_SYNC_DELAY_DEFAULT 0x10ac + +#define IEEE80211_EML_CAP_EMLSR_SUPP 0x0001 +#define IEEE80211_EML_CAP_EMLSR_PADDING_DELAY 0x000e +#define IEEE80211_EML_CAP_EMLSR_PADDING_DELAY_0US 0 +#define IEEE80211_EML_CAP_EMLSR_PADDING_DELAY_32US 1 +#define IEEE80211_EML_CAP_EMLSR_PADDING_DELAY_64US 2 +#define IEEE80211_EML_CAP_EMLSR_PADDING_DELAY_128US 3 +#define IEEE80211_EML_CAP_EMLSR_PADDING_DELAY_256US 4 +#define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY 0x0070 +#define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_0US 0 +#define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_16US 1 +#define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_32US 2 +#define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_64US 3 +#define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_128US 4 +#define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_256US 5 +#define IEEE80211_EML_CAP_EMLMR_SUPPORT 0x0080 +#define IEEE80211_EML_CAP_EMLMR_DELAY 0x0700 +#define IEEE80211_EML_CAP_EMLMR_DELAY_0US 0 +#define IEEE80211_EML_CAP_EMLMR_DELAY_32US 1 +#define IEEE80211_EML_CAP_EMLMR_DELAY_64US 2 +#define IEEE80211_EML_CAP_EMLMR_DELAY_128US 3 +#define IEEE80211_EML_CAP_EMLMR_DELAY_256US 4 +#define IEEE80211_EML_CAP_TRANSITION_TIMEOUT 0x7800 +#define IEEE80211_EML_CAP_TRANSITION_TIMEOUT_0 0 +#define IEEE80211_EML_CAP_TRANSITION_TIMEOUT_128US 1 +#define IEEE80211_EML_CAP_TRANSITION_TIMEOUT_256US 2 +#define IEEE80211_EML_CAP_TRANSITION_TIMEOUT_512US 3 +#define IEEE80211_EML_CAP_TRANSITION_TIMEOUT_1TU 4 +#define IEEE80211_EML_CAP_TRANSITION_TIMEOUT_2TU 5 +#define IEEE80211_EML_CAP_TRANSITION_TIMEOUT_4TU 6 +#define IEEE80211_EML_CAP_TRANSITION_TIMEOUT_8TU 7 +#define IEEE80211_EML_CAP_TRANSITION_TIMEOUT_16TU 8 +#define IEEE80211_EML_CAP_TRANSITION_TIMEOUT_32TU 9 +#define IEEE80211_EML_CAP_TRANSITION_TIMEOUT_64TU 10 +#define IEEE80211_EML_CAP_TRANSITION_TIMEOUT_128TU 11 + +#define IEEE80211_MLD_CAP_OP_MAX_SIMUL_LINKS 0x000f +#define IEEE80211_MLD_CAP_OP_SRS_SUPPORT 0x0010 +#define IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP 0x0060 +#define IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_NO_SUPP 0 +#define IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP_SAME 1 +#define IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_RESERVED 2 +#define IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP_DIFF 3 +#define IEEE80211_MLD_CAP_OP_FREQ_SEP_TYPE_IND 0x0f80 +#define IEEE80211_MLD_CAP_OP_AAR_SUPPORT 0x1000 +#define IEEE80211_MLD_CAP_OP_LINK_RECONF_SUPPORT 0x2000 +#define IEEE80211_MLD_CAP_OP_ALIGNED_TWT_SUPPORT 0x4000 + +struct ieee80211_mle_basic_common_info { +u8 len; +u8 mld_mac_addr[ETH_ALEN ]; +u8 variable[]; +} __packed; + +#define IEEE80211_MLC_PREQ_PRES_MLD_ID 0x0010 + +struct ieee80211_mle_preq_common_info { +u8 len; +u8 variable[]; +} __packed; + +#define IEEE80211_MLC_RECONF_PRES_MLD_MAC_ADDR 0x0010 +#define IEEE80211_MLC_RECONF_PRES_EML_CAPA 0x0020 +#define IEEE80211_MLC_RECONF_PRES_MLD_CAPA_OP 0x0040 +#define IEEE80211_MLC_RECONF_PRES_EXT_MLD_CAPA_OP 0x0080 + +/* no fixed fields in RECONF */ + +struct ieee80211_mle_tdls_common_info { +u8 len; +u8 ap_mld_mac_addr[ETH_ALEN ]; +} __packed; + +#define IEEE80211_MLC_PRIO_ACCESS_PRES_AP_MLD_MAC_ADDR 0x0010 + +/* no fixed fields in PRIO_ACCESS */ + +/** +* ieee80211_mle_common_size - check multi-link element common size +* @data: multi-link element, must already be checked for size using +* ieee80211_mle_size_ok() +* Return: the size of the multi-link element's "common" subfield +*/ +static inline u8 ieee80211_mle_common_size (const u8 *data) +{ +const struct ieee80211_multi_link_elem *mle = (const void *)data; +u16 control =le16_to_cpu (mle->control); + +switch (u16_get_bits (control,IEEE80211_ML_CONTROL_TYPE )) { +case IEEE80211_ML_CONTROL_TYPE_BASIC : +case IEEE80211_ML_CONTROL_TYPE_PREQ : +case IEEE80211_ML_CONTROL_TYPE_TDLS : +case IEEE80211_ML_CONTROL_TYPE_RECONF : +case IEEE80211_ML_CONTROL_TYPE_PRIO_ACCESS : +/* +* The length is the first octet pointed by mle->variable so no +* need to add anything +*/ +break ; +default : +WARN_ON (1 ); +return 0 ; + } + +return sizeof (*mle) + mle->variable[0 ]; +} + +/** +* ieee80211_mle_get_link_id - returns the link ID +* @data: the basic multi link element +* Return: the link ID, or -1 if not present +* +* The element is assumed to be of the correct type (BASIC) and big enough, +* this must be checked using ieee80211_mle_type_ok(). +*/ +static inline int ieee80211_mle_get_link_id (const u8 *data) +{ +const struct ieee80211_multi_link_elem *mle = (const void *)data; +u16 control =le16_to_cpu (mle->control); +const u8 *common = mle->variable; + +/* common points now at the beginning of ieee80211_mle_basic_common_info */ + common +=sizeof (struct ieee80211_mle_basic_common_info ); + +if (!(control &IEEE80211_MLC_BASIC_PRES_LINK_ID )) +return -1 ; + +return *common; +} + +/** +* ieee80211_mle_get_bss_param_ch_cnt - returns the BSS parameter change count +* @data: pointer to the basic multi link element +* Return: the BSS Parameter Change Count field value, or -1 if not present +* +* The element is assumed to be of the correct type (BASIC) and big enough, +* this must be checked using ieee80211_mle_type_ok(). +*/ +static inline int +ieee80211_mle_get_bss_param_ch_cnt (const u8 *data) +{ +const struct ieee80211_multi_link_elem *mle = (const void *)data; +u16 control =le16_to_cpu (mle->control); +const u8 *common = mle->variable; + +/* common points now at the beginning of ieee80211_mle_basic_common_info */ + common +=sizeof (struct ieee80211_mle_basic_common_info ); + +if (!(control &IEEE80211_MLC_BASIC_PRES_BSS_PARAM_CH_CNT )) +return -1 ; + +if (control &IEEE80211_MLC_BASIC_PRES_LINK_ID ) + common +=1 ; + +return *common; +} + +/** +* ieee80211_mle_get_eml_med_sync_delay - returns the medium sync delay +* @data: pointer to the multi-link element +* Return: the medium synchronization delay field value from the multi-link +* element, or the default value (%IEEE80211_MED_SYNC_DELAY_DEFAULT) +* if not present +* +* The element is assumed to be of the correct type (BASIC) and big enough, +* this must be checked using ieee80211_mle_type_ok(). +*/ +static inline u16 ieee80211_mle_get_eml_med_sync_delay (const u8 *data) +{ +const struct ieee80211_multi_link_elem *mle = (const void *)data; +u16 control =le16_to_cpu (mle->control); +const u8 *common = mle->variable; + +/* common points now at the beginning of ieee80211_mle_basic_common_info */ + common +=sizeof (struct ieee80211_mle_basic_common_info ); + +if (!(control &IEEE80211_MLC_BASIC_PRES_MED_SYNC_DELAY )) +return IEEE80211_MED_SYNC_DELAY_DEFAULT ; + +if (control &IEEE80211_MLC_BASIC_PRES_LINK_ID ) + common +=1 ; +if (control &IEEE80211_MLC_BASIC_PRES_BSS_PARAM_CH_CNT ) + common +=1 ; + +return get_unaligned_le16 (common); +} + +/** +* ieee80211_mle_get_eml_cap - returns the EML capability +* @data: pointer to the multi-link element +* Return: the EML capability field value from the multi-link element, +* or 0 if not present +* +* The element is assumed to be of the correct type (BASIC) and big enough, +* this must be checked using ieee80211_mle_type_ok(). +*/ +static inline u16 ieee80211_mle_get_eml_cap (const u8 *data) +{ +const struct ieee80211_multi_link_elem *mle = (const void *)data; +u16 control =le16_to_cpu (mle->control); +const u8 *common = mle->variable; + +/* common points now at the beginning of ieee80211_mle_basic_common_info */ + common +=sizeof (struct ieee80211_mle_basic_common_info ); + +if (!(control &IEEE80211_MLC_BASIC_PRES_EML_CAPA )) +return 0 ; + +if (control &IEEE80211_MLC_BASIC_PRES_LINK_ID ) + common +=1 ; +if (control &IEEE80211_MLC_BASIC_PRES_BSS_PARAM_CH_CNT ) + common +=1 ; +if (control &IEEE80211_MLC_BASIC_PRES_MED_SYNC_DELAY ) + common +=2 ; + +return get_unaligned_le16 (common); +} + +/** +* ieee80211_mle_get_mld_capa_op - returns the MLD capabilities and operations. +* @data: pointer to the multi-link element +* Return: the MLD capabilities and operations field value from the multi-link +* element, or 0 if not present +* +* The element is assumed to be of the correct type (BASIC) and big enough, +* this must be checked using ieee80211_mle_type_ok(). +*/ +static inline u16 ieee80211_mle_get_mld_capa_op (const u8 *data) +{ +const struct ieee80211_multi_link_elem *mle = (const void *)data; +u16 control =le16_to_cpu (mle->control); +const u8 *common = mle->variable; + +/* +* common points now at the beginning of +* ieee80211_mle_basic_common_info +*/ + common +=sizeof (struct ieee80211_mle_basic_common_info ); + +if (!(control &IEEE80211_MLC_BASIC_PRES_MLD_CAPA_OP )) +return 0 ; + +if (control &IEEE80211_MLC_BASIC_PRES_LINK_ID ) + common +=1 ; +if (control &IEEE80211_MLC_BASIC_PRES_BSS_PARAM_CH_CNT ) + common +=1 ; +if (control &IEEE80211_MLC_BASIC_PRES_MED_SYNC_DELAY ) + common +=2 ; +if (control &IEEE80211_MLC_BASIC_PRES_EML_CAPA ) + common +=2 ; + +return get_unaligned_le16 (common); +} + +/* Defined in Figure 9-1074t in P802.11be_D7.0 */ +#define IEEE80211_EHT_ML_EXT_MLD_CAPA_OP_PARAM_UPDATE 0x0001 +#define IEEE80211_EHT_ML_EXT_MLD_CAPA_OP_RECO_MAX_LINKS_MASK 0x001e +#define IEEE80211_EHT_ML_EXT_MLD_CAPA_NSTR_UPDATE 0x0020 +#define IEEE80211_EHT_ML_EXT_MLD_CAPA_EMLSR_ENA_ON_ONE_LINK 0x0040 +#define IEEE80211_EHT_ML_EXT_MLD_CAPA_BTM_MLD_RECO_MULTI_AP 0x0080 + +/** +* ieee80211_mle_get_ext_mld_capa_op - returns the extended MLD capabilities +* and operations. +* @data: pointer to the multi-link element +* Return: the extended MLD capabilities and operations field value from +* the multi-link element, or 0 if not present +* +* The element is assumed to be of the correct type (BASIC) and big enough, +* this must be checked using ieee80211_mle_type_ok(). +*/ +static inline u16 ieee80211_mle_get_ext_mld_capa_op (const u8 *data) +{ +const struct ieee80211_multi_link_elem *mle = (const void *)data; +u16 control =le16_to_cpu (mle->control); +const u8 *common = mle->variable; + +/* +* common points now at the beginning of +* ieee80211_mle_basic_common_info +*/ + common +=sizeof (struct ieee80211_mle_basic_common_info ); + +if (!(control &IEEE80211_MLC_BASIC_PRES_EXT_MLD_CAPA_OP )) +return 0 ; + +if (control &IEEE80211_MLC_BASIC_PRES_LINK_ID ) + common +=1 ; +if (control &IEEE80211_MLC_BASIC_PRES_BSS_PARAM_CH_CNT ) + common +=1 ; +if (control &IEEE80211_MLC_BASIC_PRES_MED_SYNC_DELAY ) + common +=2 ; +if (control &IEEE80211_MLC_BASIC_PRES_EML_CAPA ) + common +=2 ; +if (control &IEEE80211_MLC_BASIC_PRES_MLD_CAPA_OP ) + common +=2 ; +if (control &IEEE80211_MLC_BASIC_PRES_MLD_ID ) + common +=1 ; + +return get_unaligned_le16 (common); +} + +/** +* ieee80211_mle_get_mld_id - returns the MLD ID +* @data: pointer to the multi-link element +* Return: The MLD ID in the given multi-link element, or 0 if not present +* +* The element is assumed to be of the correct type (BASIC) and big enough, +* this must be checked using ieee80211_mle_type_ok(). +*/ +static inline u8 ieee80211_mle_get_mld_id (const u8 *data) +{ +const struct ieee80211_multi_link_elem *mle = (const void *)data; +u16 control =le16_to_cpu (mle->control); +const u8 *common = mle->variable; + +/* +* common points now at the beginning of +* ieee80211_mle_basic_common_info +*/ + common +=sizeof (struct ieee80211_mle_basic_common_info ); + +if (!(control &IEEE80211_MLC_BASIC_PRES_MLD_ID )) +return 0 ; + +if (control &IEEE80211_MLC_BASIC_PRES_LINK_ID ) + common +=1 ; +if (control &IEEE80211_MLC_BASIC_PRES_BSS_PARAM_CH_CNT ) + common +=1 ; +if (control &IEEE80211_MLC_BASIC_PRES_MED_SYNC_DELAY ) + common +=2 ; +if (control &IEEE80211_MLC_BASIC_PRES_EML_CAPA ) + common +=2 ; +if (control &IEEE80211_MLC_BASIC_PRES_MLD_CAPA_OP ) + common +=2 ; + +return *common; +} + +/** +* ieee80211_mle_size_ok - validate multi-link element size +* @data: pointer to the element data +* @len: length of the containing element +* Return: whether or not the multi-link element size is OK +*/ +static inline bool ieee80211_mle_size_ok (const u8 *data,size_t len) +{ +const struct ieee80211_multi_link_elem *mle = (const void *)data; +u8 fixed =sizeof (*mle); +u8 common =0 ; +bool check_common_len = false; +u16 control; + +if (!data || len < fixed) +return false; + + control =le16_to_cpu (mle->control); + +switch (u16_get_bits (control,IEEE80211_ML_CONTROL_TYPE )) { +case IEEE80211_ML_CONTROL_TYPE_BASIC : + common +=sizeof (struct ieee80211_mle_basic_common_info ); + check_common_len = true; +if (control &IEEE80211_MLC_BASIC_PRES_LINK_ID ) + common +=1 ; +if (control &IEEE80211_MLC_BASIC_PRES_BSS_PARAM_CH_CNT ) + common +=1 ; +if (control &IEEE80211_MLC_BASIC_PRES_MED_SYNC_DELAY ) + common +=2 ; +if (control &IEEE80211_MLC_BASIC_PRES_EML_CAPA ) + common +=2 ; +if (control &IEEE80211_MLC_BASIC_PRES_MLD_CAPA_OP ) + common +=2 ; +if (control &IEEE80211_MLC_BASIC_PRES_MLD_ID ) + common +=1 ; +if (control &IEEE80211_MLC_BASIC_PRES_EXT_MLD_CAPA_OP ) + common +=2 ; +break ; +case IEEE80211_ML_CONTROL_TYPE_PREQ : + common +=sizeof (struct ieee80211_mle_preq_common_info ); +if (control &IEEE80211_MLC_PREQ_PRES_MLD_ID ) + common +=1 ; + check_common_len = true; +break ; +case IEEE80211_ML_CONTROL_TYPE_RECONF : +if (control &IEEE80211_MLC_RECONF_PRES_MLD_MAC_ADDR ) + common +=ETH_ALEN ; +if (control &IEEE80211_MLC_RECONF_PRES_EML_CAPA ) + common +=2 ; +if (control &IEEE80211_MLC_RECONF_PRES_MLD_CAPA_OP ) + common +=2 ; +if (control &IEEE80211_MLC_RECONF_PRES_EXT_MLD_CAPA_OP ) + common +=2 ; +break ; +case IEEE80211_ML_CONTROL_TYPE_TDLS : + common +=sizeof (struct ieee80211_mle_tdls_common_info ); + check_common_len = true; +break ; +case IEEE80211_ML_CONTROL_TYPE_PRIO_ACCESS : + common =ETH_ALEN +1 ; +break ; +default : +/* we don't know this type */ +return true; + } + +if (len < fixed + common) +return false; + +if (!check_common_len) +return true; + +/* if present, common length is the first octet there */ +return mle->variable[0 ] >= common; +} + +/** +* ieee80211_mle_type_ok - validate multi-link element type and size +* @data: pointer to the element data +* @type: expected type of the element +* @len: length of the containing element +* Return: whether or not the multi-link element type matches and size is OK +*/ +static inline bool ieee80211_mle_type_ok (const u8 *data,u8 type,size_t len) +{ +const struct ieee80211_multi_link_elem *mle = (const void *)data; +u16 control; + +if (!ieee80211_mle_size_ok (data, len)) +return false; + + control =le16_to_cpu (mle->control); + +if (u16_get_bits (control,IEEE80211_ML_CONTROL_TYPE ) == type) +return true; + +return false; +} + +enum ieee80211_mle_subelems { +IEEE80211_MLE_SUBELEM_PER_STA_PROFILE =0 , +IEEE80211_MLE_SUBELEM_FRAGMENT =254 , +}; + +#define IEEE80211_MLE_STA_CONTROL_LINK_ID 0x000f +#define IEEE80211_MLE_STA_CONTROL_COMPLETE_PROFILE 0x0010 +#define IEEE80211_MLE_STA_CONTROL_STA_MAC_ADDR_PRESENT 0x0020 +#define IEEE80211_MLE_STA_CONTROL_BEACON_INT_PRESENT 0x0040 +#define IEEE80211_MLE_STA_CONTROL_TSF_OFFS_PRESENT 0x0080 +#define IEEE80211_MLE_STA_CONTROL_DTIM_INFO_PRESENT 0x0100 +#define IEEE80211_MLE_STA_CONTROL_NSTR_LINK_PAIR_PRESENT 0x0200 +#define IEEE80211_MLE_STA_CONTROL_NSTR_BITMAP_SIZE 0x0400 +#define IEEE80211_MLE_STA_CONTROL_BSS_PARAM_CHANGE_CNT_PRESENT 0x0800 + +struct ieee80211_mle_per_sta_profile { +__le16 control; +u8 sta_info_len; +u8 variable[]; +} __packed; + +/** +* ieee80211_mle_basic_sta_prof_size_ok - validate basic multi-link element sta +* profile size +* @data: pointer to the sub element data +* @len: length of the containing sub element +* Return: %true if the STA profile is large enough, %false otherwise +*/ +static inline bool ieee80211_mle_basic_sta_prof_size_ok (const u8 *data, +size_t len) +{ +const struct ieee80211_mle_per_sta_profile *prof = (const void *)data; +u16 control; +u8 fixed =sizeof (*prof); +u8 info_len =1 ; + +if (len < fixed) +return false; + + control =le16_to_cpu (prof->control); + +if (control &IEEE80211_MLE_STA_CONTROL_STA_MAC_ADDR_PRESENT ) + info_len +=6 ; +if (control &IEEE80211_MLE_STA_CONTROL_BEACON_INT_PRESENT ) + info_len +=2 ; +if (control &IEEE80211_MLE_STA_CONTROL_TSF_OFFS_PRESENT ) + info_len +=8 ; +if (control &IEEE80211_MLE_STA_CONTROL_DTIM_INFO_PRESENT ) + info_len +=2 ; +if (control &IEEE80211_MLE_STA_CONTROL_COMPLETE_PROFILE && + control &IEEE80211_MLE_STA_CONTROL_NSTR_LINK_PAIR_PRESENT ) { +if (control &IEEE80211_MLE_STA_CONTROL_NSTR_BITMAP_SIZE ) + info_len +=2 ; +else + info_len +=1 ; + } +if (control &IEEE80211_MLE_STA_CONTROL_BSS_PARAM_CHANGE_CNT_PRESENT ) + info_len +=1 ; + +return prof->sta_info_len >= info_len && + fixed + prof->sta_info_len -1 <= len; +} + +/** +* ieee80211_mle_basic_sta_prof_bss_param_ch_cnt - get per-STA profile BSS +* parameter change count +* @prof: the per-STA profile, having been checked with +* ieee80211_mle_basic_sta_prof_size_ok() for the correct length +* +* Return: The BSS parameter change count value if present, 0 otherwise. +*/ +static inline u8 +ieee80211_mle_basic_sta_prof_bss_param_ch_cnt (const struct ieee80211_mle_per_sta_profile *prof) +{ +u16 control =le16_to_cpu (prof->control); +const u8 *pos = prof->variable; + +if (!(control &IEEE80211_MLE_STA_CONTROL_BSS_PARAM_CHANGE_CNT_PRESENT )) +return 0 ; + +if (control &IEEE80211_MLE_STA_CONTROL_STA_MAC_ADDR_PRESENT ) + pos +=6 ; +if (control &IEEE80211_MLE_STA_CONTROL_BEACON_INT_PRESENT ) + pos +=2 ; +if (control &IEEE80211_MLE_STA_CONTROL_TSF_OFFS_PRESENT ) + pos +=8 ; +if (control &IEEE80211_MLE_STA_CONTROL_DTIM_INFO_PRESENT ) + pos +=2 ; +if (control &IEEE80211_MLE_STA_CONTROL_COMPLETE_PROFILE && + control &IEEE80211_MLE_STA_CONTROL_NSTR_LINK_PAIR_PRESENT ) { +if (control &IEEE80211_MLE_STA_CONTROL_NSTR_BITMAP_SIZE ) + pos +=2 ; +else + pos +=1 ; + } + +return *pos; +} + +#define IEEE80211_MLE_STA_RECONF_CONTROL_LINK_ID 0x000f +#define IEEE80211_MLE_STA_RECONF_CONTROL_COMPLETE_PROFILE 0x0010 +#define IEEE80211_MLE_STA_RECONF_CONTROL_STA_MAC_ADDR_PRESENT 0x0020 +#define IEEE80211_MLE_STA_RECONF_CONTROL_AP_REM_TIMER_PRESENT 0x0040 +#define IEEE80211_MLE_STA_RECONF_CONTROL_OPERATION_TYPE 0x0780 +#define IEEE80211_MLE_STA_RECONF_CONTROL_OPERATION_TYPE_AP_REM 0 +#define IEEE80211_MLE_STA_RECONF_CONTROL_OPERATION_TYPE_OP_PARAM_UPDATE 1 +#define IEEE80211_MLE_STA_RECONF_CONTROL_OPERATION_TYPE_ADD_LINK 2 +#define IEEE80211_MLE_STA_RECONF_CONTROL_OPERATION_TYPE_DEL_LINK 3 +#define IEEE80211_MLE_STA_RECONF_CONTROL_OPERATION_TYPE_NSTR_STATUS 4 +#define IEEE80211_MLE_STA_RECONF_CONTROL_OPERATION_PARAMS_PRESENT 0x0800 + +/** +* ieee80211_mle_reconf_sta_prof_size_ok - validate reconfiguration multi-link +* element sta profile size. +* @data: pointer to the sub element data +* @len: length of the containing sub element +* Return: %true if the STA profile is large enough, %false otherwise +*/ +static inline bool ieee80211_mle_reconf_sta_prof_size_ok (const u8 *data, +size_t len) +{ +const struct ieee80211_mle_per_sta_profile *prof = (const void *)data; +u16 control; +u8 fixed =sizeof (*prof); +u8 info_len =1 ; + +if (len < fixed) +return false; + + control =le16_to_cpu (prof->control); + +if (control &IEEE80211_MLE_STA_RECONF_CONTROL_STA_MAC_ADDR_PRESENT ) + info_len +=ETH_ALEN ; +if (control &IEEE80211_MLE_STA_RECONF_CONTROL_AP_REM_TIMER_PRESENT ) + info_len +=2 ; +if (control &IEEE80211_MLE_STA_RECONF_CONTROL_OPERATION_PARAMS_PRESENT ) + info_len +=2 ; + +return prof->sta_info_len >= info_len && + fixed + prof->sta_info_len -1 <= len; +} + +#define IEEE80211_MLE_STA_EPCS_CONTROL_LINK_ID 0x000f +#define IEEE80211_EPCS_ENA_RESP_BODY_LEN 3 + +static inline bool ieee80211_tid_to_link_map_size_ok (const u8 *data,size_t len) +{ +const struct ieee80211_ttlm_elem *t2l = (const void *)data; +u8 control, fixed =sizeof (*t2l), elem_len =0 ; + +if (len < fixed) +return false; + + control = t2l->control; + +if (control &IEEE80211_TTLM_CONTROL_SWITCH_TIME_PRESENT ) + elem_len +=2 ; +if (control &IEEE80211_TTLM_CONTROL_EXPECTED_DUR_PRESENT ) + elem_len +=3 ; + +if (!(control &IEEE80211_TTLM_CONTROL_DEF_LINK_MAP )) { +u8 bm_size; + + elem_len +=1 ; +if (len < fixed + elem_len) +return false; + +if (control &IEEE80211_TTLM_CONTROL_LINK_MAP_SIZE ) + bm_size =1 ; +else + bm_size =2 ; + + elem_len +=hweight8 (t2l->optional[0 ]) * bm_size; + } + +return len >= fixed + elem_len; +} + +/** +* ieee80211_emlsr_pad_delay_in_us - Fetch the EMLSR Padding delay +* in microseconds +* @eml_cap: EML capabilities field value from common info field of +* the Multi-link element +* Return: the EMLSR Padding delay (in microseconds) encoded in the +* EML Capabilities field +*/ + +static inline u32 ieee80211_emlsr_pad_delay_in_us (u16 eml_cap) +{ +/* IEEE Std 802.11be-2024 Table 9-417i—Encoding of the EMLSR +* Padding Delay subfield. +*/ +u32 pad_delay =u16_get_bits (eml_cap, +IEEE80211_EML_CAP_EMLSR_PADDING_DELAY ); + +if (!pad_delay || + pad_delay >IEEE80211_EML_CAP_EMLSR_PADDING_DELAY_256US ) +return 0 ; + +return 32 * (1 << (pad_delay -1 )); +} + +/** +* ieee80211_emlsr_trans_delay_in_us - Fetch the EMLSR Transition +* delay in microseconds +* @eml_cap: EML capabilities field value from common info field of +* the Multi-link element +* Return: the EMLSR Transition delay (in microseconds) encoded in the +* EML Capabilities field +*/ + +static inline u32 ieee80211_emlsr_trans_delay_in_us (u16 eml_cap) +{ +/* IEEE Std 802.11be-2024 Table 9-417j—Encoding of the EMLSR +* Transition Delay subfield. +*/ +u32 trans_delay = +u16_get_bits (eml_cap, +IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY ); + +/* invalid values also just use 0 */ +if (!trans_delay || + trans_delay >IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_256US ) +return 0 ; + +return 16 * (1 << (trans_delay -1 )); +} + +/** +* ieee80211_eml_trans_timeout_in_us - Fetch the EMLSR Transition +* timeout value in microseconds +* @eml_cap: EML capabilities field value from common info field of +* the Multi-link element +* Return: the EMLSR Transition timeout (in microseconds) encoded in +* the EML Capabilities field +*/ + +static inline u32 ieee80211_eml_trans_timeout_in_us (u16 eml_cap) +{ +/* IEEE Std 802.11be-2024 Table 9-417m—Encoding of the +* Transition Timeout subfield. +*/ +u8 timeout =u16_get_bits (eml_cap, +IEEE80211_EML_CAP_TRANSITION_TIMEOUT ); + +/* invalid values also just use 0 */ +if (!timeout || timeout >IEEE80211_EML_CAP_TRANSITION_TIMEOUT_128TU ) +return 0 ; + +return 128 * (1 << (timeout -1 )); +} + +#define for_each_mle_subelement (_elem, _data, _len) \ + if (ieee80211_mle_size_ok(_data, _len)) \ + for_each_element(_elem, \ + _data + ieee80211_mle_common_size(_data),\ + _len - ieee80211_mle_common_size(_data)) + +#endif /* LINUX_IEEE80211_H */
include/linux/ieee80211.h +2 -1162
1,200 lines not on this page · raw message
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 62/957 wifi: ieee80211: fix definition of EHT-MCS 15 in MRU
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shayne Chen <[email protected]>
[ Upstream commit cb0caadb64ca0894c4a24e1a34841f260d462f90 ]
According to the definition in IEEE Std 802.11be-2024, Table 9-417r, each bit indicates support for the transmission and reception of EHT-MCS 15 in:
- B0: 52+26-tone and 106+26-tone MRUs.
- B1: a 484+242-tone MRU if 80 MHz is supported.
- B2: a 996+484-tone MRU and a 996+484+242-tone MRU if 160 MHz is supported.
- B3: a 3×996-tone MRU if 320 MHz is supported.
--- include/linux/ieee80211-eht.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/ieee80211-eht.h +2 -2
@@ -251,8 +251,8 @@ struct ieee80211_eht_operation_info {#define IEEE80211_EHT_PHY_CAP5_SUPP_EXTRA_EHT_LTF 0x40#define IEEE80211_EHT_PHY_CAP6_MAX_NUM_SUPP_EHT_LTF_MASK 0x07 -#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_80MHZ 0x08 -#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_160MHZ 0x30 +#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_80MHZ 0x10 +#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_160MHZ 0x20#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_320MHZ 0x40#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_MASK 0x78#define IEEE80211_EHT_PHY_CAP6_EHT_DUP_6GHZ_SUPP 0x80
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 63/957 dpaa2: add independent dependencies for FSL_DPAA2_SWITCH
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cai Xinchen <[email protected]>
[ Upstream commit 12589892f41c4c645c80ef9f036f7451a6045624 ]
Since the commit 84cba72956fd ("dpaa2-switch: integrate the MAC endpoint support") included dpaa2-mac.o in the driver, but it didn't select PCS_LYNX, PHYLINK and FSL_XGMAC_MDIO. it will lead to link error, such as
undefined reference to phylink_ethtool_ksettings_set' undefined reference to lynx_pcs_create_fwnode'
And the same reason as the commit d2624e70a2f53 ("dpaa2-eth: select XGMAC_MDIO for MDIO bus support"), enable the FSL_XGMAC_MDIO Kconfig option in order to have MDIO access to internal and external PHYs.
Because dpaa2-switch uses fsl_mc_driver APIs, add depends on FSL_MC_BUS && FSL_MC_DPIO as FSL_DPAA2_SWITCH do.
FSL_XGMAC_MDIO and FSL_MC_BUS depend on OF, thus the dependence of FSL_MC_BUS can satisfy FSL_XGMAC_MDIO's OF requirement.
--- drivers/net/ethernet/freescale/dpaa2/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/freescale/dpaa2/Kconfig +4 -0
@@ -34,6 +34,10 @@ config FSL_DPAA2_SWITCH tristate "Freescale DPAA2 Ethernet Switch" depends on BRIDGE || BRIDGE=n depends on NET_SWITCHDEV + depends on FSL_MC_BUS && FSL_MC_DPIO + select PHYLINK + select PCS_LYNX + select FSL_XGMAC_MDIO help Driver for Freescale DPAA2 Ethernet Switch. This driver manages switch objects discovered on the Freeescale MC bus.
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 64/957 dpaa2: compile dpaa2 even CONFIG_FSL_DPAA2_ETH=n
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cai Xinchen <[email protected]>
[ Upstream commit 97daf00745f7f9f261b0e91418de6e79d7826c36 ]
CONFIG_FSL_DPAA2_ETH and CONFIG_FSL_DPAA2_SWITCH are not associated, but the compilation of FSL_DPAA2_SWITCH depends on the compilation of the dpaa2 folder. The files controlled by CONFIG_FSL_DPAA2_SWITCH in the dpaa2 folder are not controlled by CONFIG_FSL_DPAA2_ETH, except for the files controlled by CONFIG_FSL_DPAA2_SWITCH. Therefore, removing the restriction will not affect the compilation of the files in the directory.
--- drivers/net/ethernet/freescale/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/freescale/Makefile +1 -2
@@ -22,6 +22,5 @@ ucc_geth_driver-objs := ucc_geth.o ucc_geth_ethtool.o obj-$(CONFIG_FSL_FMAN) += fman/ obj-$(CONFIG_FSL_DPAA_ETH) += dpaa/ -obj-$(CONFIG_FSL_DPAA2_ETH) += dpaa2/ - +obj-y += dpaa2/ obj-y += enetc/
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 65/957 s390/bpf: Zero-extend bpf prog return values and kfunc arguments
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilya Leoshkevich <[email protected]>
[ Upstream commit 202e42e4aa890172366354b233c42c73107a3f59 ]
s390x ABI requires callers to zero-extend unsigned arguments and sign-extend signed arguments, and callees to zero-extend unsigned return values and sign-extend signed return values.
s390 BPF JIT currently implements only sign extension. Fix this omission and implement zero extension too.
--- arch/s390/net/bpf_jit_comp.c | 39 ++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 15 deletions(-)
arch/s390/net/bpf_jit_comp.c +24 -15
@@ -831,25 +831,34 @@ static int bpf_jit_probe_post(struct bpf_jit *jit, struct bpf_prog *fp, }/* -* Sign-extend the register if necessary +* Sign- or zero-extend the register if necessary */ -static int sign_extend (struct bpf_jit *jit,int r,u8 size,u8 flags) +static int sign_zero_extend (struct bpf_jit *jit,int r,u8 size,u8 flags) { -if (!(flags &BTF_FMODEL_SIGNED_ARG )) -return 0 ; -switch (size) {case 1 : -/* lgbr %r,%r */ -EMIT4 (0xb9060000 , r, r); +if (flags &BTF_FMODEL_SIGNED_ARG ) +/* lgbr %r,%r */ +EMIT4 (0xb9060000 , r, r); +else +/* llgcr %r,%r */ +EMIT4 (0xb9840000 , r, r);return 0 ;case 2 : -/* lghr %r,%r */ -EMIT4 (0xb9070000 , r, r); +if (flags &BTF_FMODEL_SIGNED_ARG ) +/* lghr %r,%r */ +EMIT4 (0xb9070000 , r, r); +else +/* llghr %r,%r */ +EMIT4 (0xb9850000 , r, r);return 0 ;case 4 : -/* lgfr %r,%r */ -EMIT4 (0xb9140000 , r, r); +if (flags &BTF_FMODEL_SIGNED_ARG ) +/* lgfr %r,%r */ +EMIT4 (0xb9140000 , r, r); +else +/* llgfr %r,%r */ +EMIT4 (0xb9160000 , r, r);return 0 ;case 8 :return 0 ;
@@ -1799,9 +1808,9 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp,return -1 ;for (j =0 ; j < m->nr_args; j++) { -if (sign_extend (jit,BPF_REG_1 + j, - m->arg_size[j], - m->arg_flags[j])) +if (sign_zero_extend (jit,BPF_REG_1 + j, + m->arg_size[j], + m->arg_flags[j]))return -1 ; } }
@@ -2555,7 +2564,7 @@ static int invoke_bpf_prog(struct bpf_tramp_jit *tjit,EMIT6_PCREL_RILB_PTR (0xc0050000 ,REG_14 , p->bpf_func);/* stg %r2,retval_off(%r15) */ if (save_ret) { -if (sign_extend (jit,REG_2 , m->ret_size, m->ret_flags)) +if (sign_zero_extend (jit,REG_2 , m->ret_size, m->ret_flags))return -1 ;EMIT6_DISP_LH (0xe3000000 ,0x0024 ,REG_2 ,REG_0 ,REG_15 , tjit->retval_off);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 66/957 powerpc/pgtable-frag: Fix bad page state in pte_frag_destroy
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ritesh Harjani (IBM) <[email protected]>
[ Upstream commit fda4d71651f71c44b35829d13f3c8bf920032f77 ]
powerpc uses pt_frag_refcount as a reference counter for tracking it's pte and pmd page table fragments. For PTE table, in case of Hash with 64K pagesize, we have 16 fragments of 4K size in one 64K page.
Patch series [1] "mm: free retracted page table by RCU"
added pte_free_defer() to defer the freeing of PTE tables when retract_page_tables() is called for madvise MADV_COLLAPSE on shmem range.
[1]: https://lore.kernel.org/all/[email protected]/
pte_free_defer() sets the active flag on the corresponding fragment's folio & calls pte_fragment_free(), which reduces the pt_frag_refcount. When pt_frag_refcount reaches 0 (no active fragment using the folio), it checks if the folio active flag is set, if set, it calls call_rcu to free the folio, it the active flag is unset then it calls pte_free_now().
Now, this can lead to following problem in a corner case...
[ 265.351553][ T183] BUG: Bad page state in process a.out pfn:20d62 [ 265.353555][ T183] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x20d62 [ 265.355457][ T183] flags: 0x3ffff800000100(active|node=0|zone=0|lastcpupid=0x7ffff) [ 265.358719][ T183] raw: 003ffff800000100 0000000000000000 5deadbeef0000122 0000000000000000 [ 265.360177][ T183] raw: 0000000000000000 c0000000119caf58 00000000ffffffff 0000000000000000 [ 265.361438][ T183] page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set [ 265.362572][ T183] Modules linked in: [ 265.364622][ T183] CPU: 0 UID: 0 PID: 183 Comm: a.out Not tainted 6.18.0-rc3-00141-g1ddeaaace7ff-dirty #53 VOLUNTARY [ 265.364785][ T183] Hardware name: IBM pSeries (emulated by qemu) POWER10 (architected) 0x801200 0xf000006 of:SLOF,git-ee03ae pSeries [ 265.364908][ T183] Call Trace: [ 265.364955][ T183] [c000000011e6f7c0] [c000000001cfaa18] dump_stack_lvl+0x130/0x148 (unreliable) [ 265.365202][ T183] [c000000011e6f7f0] [c000000000794758] bad_page+0xb4/0x1c8 [ 265.365384][ T183] [c000000011e6f890] [c00000000079c020] __free_frozen_pages+0x838/0xd08 [ 265.365554][ T183] [c000000011e6f980] [c0000000000a70ac] pte_frag_destroy+0x298/0x310 [ 265.365729][ T183] [c000000011e6fa30] [c0000000000aa764] arch_exit_mmap+0x34/0x218 [ 265.365912][ T183] [c000000011e6fa80] [c000000000751698] exit_mmap+0xb8/0x820 [ 265.366080][ T183] [c000000011e6fc30] [c0000000001b1258] __mmput+0x98/0x300 [ 265.366244][ T183] [c000000011e6fc80] [c0000000001c81f8] do_exit+0x470/0x1508 [ 265.366421][ T183] [c000000011e6fd70] [c0000000001c95e4] do_group_exit+0x88/0x148 [ 265.366602][ T183] [c000000011e6fdc0] [c0000000001c96ec] pid_child_should_wake+0x0/0x178 [ 265.366780][ T183] [c000000011e6fdf0] [c00000000003a270] system_call_exception+0x1b0/0x4e0 [ 265.366958][ T183] [c000000011e6fe50] [c00000000000d05c] system_call_vectored_common+0x15c/0x2ec
The bad page state error occurs when such a folio gets freed (with active flag set), from do_exit() path in parallel.
... this can happen when the pte fragment was allocated from this folio, but when all the fragments get freed, the pte_frag_refcount still had some unused fragments. Now, if this process exits, with such folio as it's cached pte_frag in mm->context, then during pte_frag_destroy(), we simply call pagetable_dtor() and pagetable_free(), meaning it doesn't clear the active flag. This, can lead to the above bug. Since we are anyway in do_exit() path, then if the refcount is 0, then I guess it should be ok to simply clear the folio active flag before calling pagetable_dtor() & pagetable_free().
--- arch/powerpc/mm/pgtable-frag.c | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/mm/pgtable-frag.c +1 -0
@@ -25,6 +25,7 @@ void pte_frag_destroy(void *pte_frag) count = ((unsigned long )pte_frag & ~PAGE_MASK ) >>PTE_FRAG_SIZE_SHIFT ;/* We allow PTE_FRAG_NR fragments from a PTE page */ if (atomic_sub_and_test (PTE_FRAG_NR - count, &ptdesc->pt_frag_refcount)) { +folio_clear_active (ptdesc_folio (ptdesc));pagetable_dtor (ptdesc);pagetable_free (ptdesc); }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 40/957 x86/tdx: Fix the typo in TDX_ATTR_MIGRTABLE
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiaoyao Li <[email protected]>
[ Upstream commit 3aecb2e7b948400354399b26f3f1653bd2c1bae0 ]
The TD scoped TDCS attributes are defined by bit positions. In the guest side of the TDX code, the 'tdx_attributes' string array holds pretty print names for these attributes, which are generated via macros and defines. Today these pretty print names are only used to print the attribute names to dmesg.
Unfortunately there is a typo in the define for the migratable bit. Change the defines TDX_ATTR_MIGRTABLE* to TDX_ATTR_MIGRATABLE*. Update the sole user, the tdx_attributes array, to use the fixed name.
Since these defines control the string printed to dmesg, the change is user visible. But the risk of breakage is almost zero since it is not exposed in any interface expected to be consumed programmatically.
--- arch/x86/coco/tdx/debug.c | 2 +- arch/x86/include/asm/shared/tdx.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/x86/coco/tdx/debug.c +1 -1
@@ -17,7 +17,7 @@ static __initdata const char *tdx_attributes[] = {DEF_TDX_ATTR_NAME (ICSSD ),DEF_TDX_ATTR_NAME (LASS ),DEF_TDX_ATTR_NAME (SEPT_VE_DISABLE ), -DEF_TDX_ATTR_NAME (MIGRTABLE ), +DEF_TDX_ATTR_NAME (MIGRATABLE ),DEF_TDX_ATTR_NAME (PKS ),DEF_TDX_ATTR_NAME (KL ), DEF_TDX_ATTR_NAME(TPA),
arch/x86/include/asm/shared/tdx.h +2 -2
@@ -35,8 +35,8 @@#define TDX_ATTR_LASS BIT_ULL(TDX_ATTR_LASS_BIT)#define TDX_ATTR_SEPT_VE_DISABLE_BIT 28#define TDX_ATTR_SEPT_VE_DISABLE BIT_ULL(TDX_ATTR_SEPT_VE_DISABLE_BIT) -#define TDX_ATTR_MIGRTABLE_BIT 29 -#define TDX_ATTR_MIGRTABLE BIT_ULL(TDX_ATTR_MIGRTABLE_BIT) +#define TDX_ATTR_MIGRATABLE_BIT 29 +#define TDX_ATTR_MIGRATABLE BIT_ULL(TDX_ATTR_MIGRATABLE_BIT)#define TDX_ATTR_PKS_BIT 30#define TDX_ATTR_PKS BIT_ULL(TDX_ATTR_PKS_BIT)#define TDX_ATTR_KL_BIT 31
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 67/957 params: Replace __modinit with __init_or_module
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Petr Pavlu <[email protected]>
[ Upstream commit 3cb0c3bdea5388519bc1bf575dca6421b133302b ]
Remove the custom __modinit macro from kernel/params.c and instead use the common __init_or_module macro from include/linux/module.h. Both provide the same functionality.
Stable-dep-of: deffe1edba62 ("module: Fix freeing of charp module parameters when CONFIG_SYSFS=n")
--- kernel/params.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
kernel/params.c +5 -10
@@ -596,12 +596,6 @@ static ssize_t param_attr_store(const struct module_attribute *mattr, }#endif -#ifdef CONFIG_MODULES -#define __modinit -#else -#define __modinit __init -#endif -#ifdef CONFIG_SYSFS void kernel_param_lock (struct module *mod) {
@@ -626,9 +620,9 @@ EXPORT_SYMBOL(kernel_param_unlock);* create file in sysfs. Returns an error on out of memory. Always cleans up * if there's an error. */ -static __modinit int add_sysfs_param(struct module_kobject *mk, -const struct kernel_param *kp, -const char *name) +static __init_or_module int add_sysfs_param(struct module_kobject *mk, +const struct kernel_param *kp, +const char *name) {struct module_param_attrs *new_mp;struct attribute **new_attrs;
@@ -761,7 +755,8 @@ void destroy_params(const struct kernel_param *params, unsigned num) params[i].ops->free (params[i].arg); } -struct module_kobject __modinit * lookup_or_create_module_kobject(const char *name) +struct module_kobject * __init_or_module +lookup_or_create_module_kobject (const char *name) {struct module_kobject *mk;struct kobject *kobj;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 68/957 module: Fix freeing of charp module parameters when CONFIG_SYSFS=n
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Petr Pavlu <[email protected]>
[ Upstream commit deffe1edba626d474fef38007c03646ca5876a0e ]
When setting a charp module parameter, the param_set_charp() function allocates memory to store a copy of the input value. Later, when the module is potentially unloaded, the destroy_params() function is called to free this allocated memory.
However, destroy_params() is available only when CONFIG_SYSFS=y, otherwise only a dummy variant is present. In the unlikely case that the kernel is configured with CONFIG_MODULES=y and CONFIG_SYSFS=n, this results in a memory leak of charp values when a module is unloaded.
Fix this issue by making destroy_params() always available when CONFIG_MODULES=y. Rename the function to module_destroy_params() to clarify that it is intended for use by the module loader.
--- include/linux/moduleparam.h | 11 +++-------- kernel/module/main.c | 4 ++-- kernel/params.c | 27 ++++++++++++++++++--------- 3 files changed, 23 insertions(+), 19 deletions(-)
include/linux/moduleparam.h +3 -8
@@ -414,14 +414,9 @@ extern char *parse_args(const char *name, void *arg, parse_unknown_fn unknown);/* Called by module remove. */ -#ifdef CONFIG_SYSFS -extern void destroy_params (const struct kernel_param *params,unsigned num); -#else -static inline void destroy_params (const struct kernel_param *params, -unsigned num) -{ -} -#endif /* !CONFIG_SYSFS */ +#ifdef CONFIG_MODULES +void module_destroy_params (const struct kernel_param *params,unsigned int num); +#endif /* All the helper functions */ /* The macros to do compile-time type checking stolen from Jakub
kernel/module/main.c +2 -2
@@ -1408,7 +1408,7 @@ static void free_module(struct module *mod)module_unload_free (mod);/* Free any allocated parameters. */ -destroy_params (mod->kp, mod->num_kp); +module_destroy_params (mod->kp, mod->num_kp);if (is_livepatch_module (mod))free_module_elf (mod);
@@ -3519,7 +3519,7 @@ static int load_module(struct load_info *info, const char __user *uargs,mod_sysfs_teardown (mod); coming_cleanup: mod->state =MODULE_STATE_GOING ; -destroy_params (mod->kp, mod->num_kp); +module_destroy_params (mod->kp, mod->num_kp);blocking_notifier_call_chain (&module_notify_list,MODULE_STATE_GOING , mod);klp_module_going (mod);
kernel/params.c +18 -9
@@ -746,15 +746,6 @@ void module_param_sysfs_remove(struct module *mod) }#endif -void destroy_params (const struct kernel_param *params,unsigned num) -{ -unsigned int i; - -for (i =0 ; i < num; i++) -if (params[i].ops->free) - params[i].ops->free (params[i].arg); -} - struct module_kobject * __init_or_modulelookup_or_create_module_kobject (const char *name) {
@@ -986,3 +977,21 @@ static int __init param_sysfs_builtin_init(void)late_initcall (param_sysfs_builtin_init);#endif /* CONFIG_SYSFS */ + +#ifdef CONFIG_MODULES + +/* +* module_destroy_params - free all parameters for one module +* @params: module parameters (array) +* @num: number of module parameters +*/ +void module_destroy_params (const struct kernel_param *params,unsigned int num) +{ +unsigned int i; + +for (i =0 ; i < num; i++) +if (params[i].ops->free) + params[i].ops->free (params[i].arg); +} + +#endif /* CONFIG_MODULES */
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 69/957 wifi: libertas: use USB anchors for tracking in-flight URBs
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heitor Alves de Siqueira <[email protected]>
[ Upstream commit a57f35fc19add4dfe33703af575a2c19c2cef9c7 ]
The libertas driver currently handles URB lifecycles manually, which makes it non-trivial to check if specific URBs are pending or not. Add anchors for TX/RX URBs, and use those to track in-flight requests.
Stable-dep-of: 7c5c2b661bdb ("wifi: libertas: don't kill URBs in interrupt context")
--- .../net/wireless/marvell/libertas/if_usb.c | 27 ++++++++++++------- .../net/wireless/marvell/libertas/if_usb.h | 3 +++ 2 files changed, 20 insertions(+), 10 deletions(-)
drivers/net/wireless/marvell/libertas/if_usb.c +17 -10
@@ -114,8 +114,8 @@ static void if_usb_write_bulk_callback(struct urb *urb)static void if_usb_free (struct if_usb_card *cardp) {/* Unlink tx & rx urb */ -usb_kill_urb (cardp->tx_urb); -usb_kill_urb (cardp->rx_urb); +usb_kill_anchored_urbs (&cardp->tx_submitted); +usb_kill_anchored_urbs (&cardp->rx_submitted);usb_free_urb (cardp->tx_urb); cardp->tx_urb =NULL ;
@@ -221,6 +221,9 @@ static int if_usb_probe(struct usb_interface *intf, udev->descriptor.bDeviceSubClass, udev->descriptor.bDeviceProtocol); +init_usb_anchor (&cardp->rx_submitted); +init_usb_anchor (&cardp->tx_submitted); +for (i =0 ; i < iface_desc->desc.bNumEndpoints; ++i) { endpoint = &iface_desc->endpoint[i].desc;if (usb_endpoint_is_bulk_in (endpoint)) {
@@ -426,7 +429,7 @@ static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb goto tx_ret; } -usb_kill_urb (cardp->tx_urb); +usb_kill_anchored_urbs (&cardp->tx_submitted); usb_fill_bulk_urb(cardp->tx_urb, cardp->udev, usb_sndbulkpipe(cardp->udev,
@@ -435,8 +438,10 @@ static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb cardp->tx_urb->transfer_flags |=URB_ZERO_PACKET ; +usb_anchor_urb (cardp->tx_urb, &cardp->tx_submitted);if ((ret =usb_submit_urb (cardp->tx_urb,GFP_ATOMIC ))) {lbs_deb_usbd (&cardp->udev->dev,"usb_submit_urb failed: %d\n" , ret); +usb_unanchor_urb (cardp->tx_urb); }else {lbs_deb_usb2 (&cardp->udev->dev,"usb_submit_urb success\n" ); ret =0 ;
@@ -467,8 +472,10 @@ static int __if_usb_submit_rx_urb(struct if_usb_card *cardp, cardp);lbs_deb_usb2 (&cardp->udev->dev,"Pointer for rx_urb %p\n" , cardp->rx_urb); +usb_anchor_urb (cardp->rx_urb, &cardp->rx_submitted);if ((ret =usb_submit_urb (cardp->rx_urb,GFP_ATOMIC ))) {lbs_deb_usbd (&cardp->udev->dev,"Submit Rx URB failed: %d\n" , ret); +usb_unanchor_urb (cardp->rx_urb);kfree_skb (skb); cardp->rx_skb =NULL ; ret =-1 ;
@@ -838,8 +845,8 @@ static void if_usb_prog_firmware(struct lbs_private *priv, int ret, }/* Cancel any pending usb business */ -usb_kill_urb (cardp->rx_urb); -usb_kill_urb (cardp->tx_urb); +usb_kill_anchored_urbs (&cardp->rx_submitted); +usb_kill_anchored_urbs (&cardp->tx_submitted); cardp->fwlastblksent =0 ; cardp->fwdnldover =0 ;
@@ -869,8 +876,8 @@ static void if_usb_prog_firmware(struct lbs_private *priv, int ret,if (cardp->bootcmdresp ==BOOT_CMD_RESP_NOT_SUPPORTED ) {/* Return to normal operation */ ret = -EOPNOTSUPP ; -usb_kill_urb (cardp->rx_urb); -usb_kill_urb (cardp->tx_urb); +usb_kill_anchored_urbs (&cardp->rx_submitted); +usb_kill_anchored_urbs (&cardp->tx_submitted);if (if_usb_submit_rx_urb (cardp) <0 ) ret = -EIO ; goto done;
@@ -900,7 +907,7 @@ static void if_usb_prog_firmware(struct lbs_private *priv, int ret,wait_event_interruptible (cardp->fw_wq, cardp->surprise_removed || cardp->fwdnldover);timer_delete_sync (&cardp->fw_timeout); -usb_kill_urb (cardp->rx_urb); +usb_kill_anchored_urbs (&cardp->rx_submitted);if (!cardp->fwdnldover) {pr_info ("failed to load fw, resetting device!\n" );
@@ -960,8 +967,8 @@ static int if_usb_suspend(struct usb_interface *intf, pm_message_t message) goto out;/* Unlink tx & rx urb */ -usb_kill_urb (cardp->tx_urb); -usb_kill_urb (cardp->rx_urb); +usb_kill_anchored_urbs (&cardp->tx_submitted); +usb_kill_anchored_urbs (&cardp->rx_submitted); out:return ret;
drivers/net/wireless/marvell/libertas/if_usb.h +3 -0
@@ -48,6 +48,9 @@ struct if_usb_card {struct urb *rx_urb, *tx_urb;struct lbs_private *priv; +struct usb_anchor rx_submitted; +struct usb_anchor tx_submitted; +struct sk_buff *rx_skb;uint8_t ep_in;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 70/957 wifi: libertas: dont kill URBs in interrupt context
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heitor Alves de Siqueira <[email protected]>
[ Upstream commit 7c5c2b661bdb78c1472b8833265c9ed1ee880039 ]
Serialization for the TX path was enforced by calling usb_kill_urb()/usb_kill_anchored_urbs(), to prevent transmission before a previous URB was completed. usb_tx_block() can be called from interrupt context (e.g. in the HCD giveback path), so we can't always use it to kill in-flight URBs.
Prevent sleeping during interrupt context by checking the tx_submitted anchor for existing URBs. We now return -EBUSY, to indicate there's a pending request.
--- drivers/net/wireless/marvell/libertas/if_usb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/wireless/marvell/libertas/if_usb.c +6 -1
@@ -429,7 +429,12 @@ static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb goto tx_ret; } -usb_kill_anchored_urbs (&cardp->tx_submitted); +/* check if there are pending URBs */ +if (!usb_anchor_empty (&cardp->tx_submitted)) { +lbs_deb_usbd (&cardp->udev->dev,"%s failed: pending URB\n" , __func__); + ret = -EBUSY ; + goto tx_ret; + } usb_fill_bulk_urb(cardp->tx_urb, cardp->udev, usb_sndbulkpipe(cardp->udev,
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 71/957 tools/nolibc: implement %m if errno is not defined
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Berg <[email protected]>
[ Upstream commit fbd1b7f6b322a63b21ebbf00c732a17bb8bdb5d4 ]
For improved compatibility, print %m as "unknown error" when nolibc is compiled using NOLIBC_IGNORE_ERRNO.
Stable-dep-of: 4045e7b19bbf ("tools/nolibc/printf: Move snprintf length check to callback")
--- tools/include/nolibc/stdio.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
tools/include/nolibc/stdio.h +4 -2
@@ -321,11 +321,13 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const charif (!outstr) outstr="(null)" ; } -#ifndef NOLIBC_IGNORE_ERRNO else if (c =='m' ) { +#ifdef NOLIBC_IGNORE_ERRNO + outstr ="unknown error" ; +#else outstr =strerror (errno); - }#endif /* NOLIBC_IGNORE_ERRNO */ + }else if (c =='%' ) {/* queue it verbatim */ continue ;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 72/957 tools/nolibc/printf: Change variables c to ch and tmpbuf[] to outbuf[]
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Laight <[email protected]>
[ Upstream commit f675ae28fcdf7db93a8c1a6964f062725b1e06a0 ]
Changing 'c' makes the code slightly easier to read because the variable stands out from the single character literals (especially 'c').
Change tmpbuf[] to outbuf[] because 'out' points into it.
The following patches pretty much rewrite the function so the churn is limited.
Stable-dep-of: 4045e7b19bbf ("tools/nolibc/printf: Move snprintf length check to callback")
--- tools/include/nolibc/stdio.h | 38 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-)
tools/include/nolibc/stdio.h +19 -19
@@ -250,16 +250,16 @@ typedef int (*__nolibc_printf_cb)(intptr_t state, const char *buf, size_t size);static __attribute__((unused,format (printf,4 ,0 )))int __nolibc_printf (__nolibc_printf_cb cb,intptr_t state,size_t n,const char *fmt,va_list args) { -char escape, lpref, c; +char escape, lpref, ch;unsigned long long v;unsigned int written, width;size_t len, ofs, w; -char tmpbuf[21 ]; +char outbuf[21 ];const char *outstr; written = ofs = escape = lpref =0 ;while (1 ) { - c = fmt[ofs++]; + ch = fmt[ofs++]; width =0 ;if (escape) {
@@ -267,17 +267,17 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char escape =0 ;/* width */ -while (c >='0' && c <='9' ) { +while (ch >='0' && ch <='9' ) { width *=10 ; - width += c -'0' ; + width += ch -'0' ; - c = fmt[ofs++]; + ch = fmt[ofs++]; } -if (c =='c' || c =='d' || c =='u' || c =='x' || c =='p' ) { -char *out = tmpbuf; +if (ch =='c' || ch =='d' || ch =='u' || ch =='x' || ch =='p' ) { +char *out = outbuf; -if (c =='p' ) +if (ch =='p' ) v = va_arg(args, unsigned long);else if (lpref) {if (lpref >1 )
@@ -287,7 +287,7 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char }else v = va_arg(args, unsigned int); -if (c =='d' ) { +if (ch =='d' ) {/* sign-extend the value */ if (lpref ==0 ) v = (long long )(int )v;
@@ -295,7 +295,7 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char v = (long long )(long )v; } -switch (c) { +switch (ch) {case 'c' : out[0 ] = v; out[1 ] =0 ;
@@ -314,30 +314,30 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const charu64toh_r (v, out);break ; } - outstr = tmpbuf; + outstr = outbuf; } -else if (c =='s' ) { +else if (ch =='s' ) { outstr = va_arg(args, char *);if (!outstr) outstr="(null)" ; } -else if (c =='m' ) { +else if (ch =='m' ) {#ifdef NOLIBC_IGNORE_ERRNO outstr ="unknown error" ;#else outstr =strerror (errno);#endif /* NOLIBC_IGNORE_ERRNO */ } -else if (c =='%' ) { +else if (ch =='%' ) {/* queue it verbatim */ continue ; }else {/* modifiers or final 0 */ -if (c =='l' ) { +if (ch =='l' ) {/* long format prefix, maintain the escape */ lpref++; - }else if (c =='j' ) { + }else if (ch =='j' ) { lpref =2 ; } escape =1 ;
@@ -348,7 +348,7 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char }/* not an escape sequence */ -if (c ==0 || c =='%' ) { +if (ch ==0 || ch =='%' ) {/* flush pending data on escape or end */ escape =1 ; lpref =0 ;
@@ -369,7 +369,7 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char written += len; do_escape: -if (c ==0 ) +if (ch ==0 )break ; fmt += ofs; ofs =0 ;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 73/957 tools/nolibc/printf: Move snprintf length check to callback
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Laight <[email protected]>
[ Upstream commit 4045e7b19bbf7338452cda11e64cfe7ae3361964 ]
Move output truncation to the snprintf() callback.
This simplifies the main code and fixes truncation of padded fields.
Add a zero length callback to 'finalise' the buffer rather than doing it in snprintf() itself.
--- tools/include/nolibc/stdio.h | 94 +++++++++++++++++++++++++----------- 1 file changed, 67 insertions(+), 27 deletions(-)
tools/include/nolibc/stdio.h +67 -27
@@ -244,16 +244,25 @@ char *fgets(char *s, int size, FILE *stream)* - %[l*]{d,u,c,x,p} * - %s * - unknown modifiers are ignored. +* +* Called by vfprintf() and snprintf() to do the actual formatting. +* The callers provide a callback function to save the formatted data. +* The callback function is called multiple times: +* - for each group of literal characters in the format string. +* - for field padding. +* - for each conversion specifier. +* - with (NULL, 0) at the end of the __nolibc_printf. +* If the callback returns non-zero __nolibc_printf() immediately returns -1. */ -typedef int (*__nolibc_printf_cb )(intptr_t state,const char *buf,size_t size); +typedef int (*__nolibc_printf_cb )(void *state,const char *buf,size_t size); -static __attribute__((unused,format (printf,4 ,0 ))) -int __nolibc_printf (__nolibc_printf_cb cb,intptr_t state,size_t n,const char *fmt,va_list args) +static __attribute__((unused,format (printf,3 ,0 ))) +int __nolibc_printf (__nolibc_printf_cb cb,void *state,const char *fmt,va_list args) {char escape, lpref, ch;unsigned long long v;unsigned int written, width; -size_t len, ofs, w; +size_t len, ofs;char outbuf[21 ];const char *outstr;
@@ -355,17 +364,13 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char outstr = fmt; len = ofs -1 ; flush_str: -if (n) { - w = len < n ? len : n; - n -= w; -while (width-- > w) { -if (cb (state," " ,1 ) !=0 ) -return -1 ; - written +=1 ; - } -if (cb (state, outstr, w) !=0 ) +while (width-- > len) { +if (cb (state," " ,1 ) !=0 )return -1 ; + written +=1 ; } +if (cb (state, outstr, len) !=0 ) +return -1 ; written += len; do_escape:
@@ -378,18 +383,25 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char/* literal char, just queue it */ } + +/* Request a final '\0' be added to the snprintf() output. +* This may be the only call of the cb() function. +*/ +if (cb (state,NULL ,0 ) !=0 ) +return -1 ; +return written; } -static int __nolibc_fprintf_cb (intptr_t state,const char *buf,size_t size) +static int __nolibc_fprintf_cb (void *stream,const char *buf,size_t size) { -return _fwrite (buf, size, (FILE *)state); +return _fwrite (buf, size, stream); }static __attribute__((unused,format (printf,2 ,0 )))int vfprintf (FILE *stream,const char *fmt,va_list args) { -return __nolibc_printf (__nolibc_fprintf_cb, (intptr_t )stream,SIZE_MAX , fmt, args); +return __nolibc_printf (__nolibc_fprintf_cb, stream, fmt, args); } static __attribute__((unused, format(printf, 1, 0)))
@@ -447,26 +459,54 @@ int dprintf(int fd, const char *fmt, ...)return ret; } -static int __nolibc_sprintf_cb (intptr_t _state,const char *buf,size_t size) +struct __nolibc_sprintf_cb_state { +char *buf; +size_t space; +}; + +static int __nolibc_sprintf_cb (void *v_state,const char *buf,size_t size) { -char **state = (char **)_state; +struct __nolibc_sprintf_cb_state *state = v_state; +size_t space = state->space; +char *tgt; + +/* Truncate the request to fit in the output buffer space. +* The last byte is reserved for the terminating '\0'. +* state->space can only be zero for snprintf(NULL, 0, fmt, args) +* so this normally lets through calls with 'size == 0'. +*/ +if (size >= space) { +if (space <=1 ) +return 0 ; + size = space -1 ; + } + tgt = state->buf; + +/* __nolibc_printf() ends with cb(state, NULL, 0) to request the output +* buffer be '\0' terminated. +* That will be the only cb() call for, eg, snprintf(buf, sz, ""). +* Zero lengths can occur at other times (eg "%s" for an empty string). +* Unconditionally write the '\0' byte to reduce code size, it is +* normally overwritten by the data being output. +* There is no point adding a '\0' after copied data - there is always +* another call. +*/ + *tgt ='\0' ; +if (size) { + state->space = space - size; + state->buf = tgt + size; +memcpy (tgt, buf, size); + } -memcpy (*state, buf, size); - *state += size;return 0 ; }static __attribute__((unused,format (printf,3 ,0 )))int vsnprintf (char *buf,size_t size,const char *fmt,va_list args) { -char *state = buf; -int ret; +struct __nolibc_sprintf_cb_state state = { .buf = buf, .space = size }; - ret =__nolibc_printf (__nolibc_sprintf_cb, (intptr_t )&state, size, fmt, args); -if (ret <0 ) -return ret; - buf[(size_t )ret < size ? (size_t )ret : size -1 ] ='\0' ; -return ret; +return __nolibc_printf (__nolibc_sprintf_cb, &state, fmt, args); } static __attribute__((unused, format(printf, 3, 4)))
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 74/957 wifi: mt76: mt7996: fix the behavior of radar detection
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: StanleyYP Wang <[email protected]>
[ Upstream commit 45a09251d610f3b8a1fb02039146e42f1f4efe90 ]
RDD_DET_MODE is a firmware command intended for testing and does not pause TX after radar detection, so remove it from the normal flow; instead, use the MAC_ENABLE_CTRL firmware command to resume TX after the radar-triggered channel switch completes.
--- .../net/wireless/mediatek/mt76/mt7996/mac.c | 8 +-- .../net/wireless/mediatek/mt76/mt7996/main.c | 20 ++++++++ .../net/wireless/mediatek/mt76/mt7996/mcu.c | 49 ++++++++++++++++--- .../net/wireless/mediatek/mt76/mt7996/mcu.h | 1 + .../wireless/mediatek/mt76/mt7996/mt7996.h | 2 + 5 files changed, 68 insertions(+), 12 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/mac.c +2 -6
@@ -2944,7 +2944,7 @@ static void mt7996_dfs_stop_radar_detector(struct mt7996_phy *phy)static int mt7996_dfs_start_rdd (struct mt7996_dev *dev,int rdd_idx) { -int err, region; +int region;switch (dev->mt76.region) {case NL80211_DFS_ETSI :
@@ -2959,11 +2959,7 @@ static int mt7996_dfs_start_rdd(struct mt7996_dev *dev, int rdd_idx)break ; } - err =mt7996_mcu_rdd_cmd (dev,RDD_START , rdd_idx, region); -if (err <0 ) -return err; - -return mt7996_mcu_rdd_cmd (dev,RDD_DET_MODE , rdd_idx,1 ); +return mt7996_mcu_rdd_cmd (dev,RDD_START , rdd_idx, region); }static int mt7996_dfs_start_radar_detector (struct mt7996_phy *phy)
drivers/net/wireless/mediatek/mt76/mt7996/main.c +20 -0
@@ -79,6 +79,7 @@ static void mt7996_stop_phy(struct mt7996_phy *phy)mutex_lock (&dev->mt76.mutex); +mt7996_mcu_rdd_resume_tx (phy);mt7996_mcu_set_radio_en (phy, false);clear_bit (MT76_STATE_RUNNING , &phy->mt76->state);
@@ -933,6 +934,24 @@ mt7996_channel_switch_beacon(struct ieee80211_hw *hw,mutex_unlock (&dev->mt76.mutex); } +static int +mt7996_post_channel_switch (struct ieee80211_hw *hw,struct ieee80211_vif *vif, +struct ieee80211_bss_conf *link_conf) +{ +struct cfg80211_chan_def *chandef = &link_conf->chanreq.oper; +struct mt7996_dev *dev =mt7996_hw_dev (hw); +struct mt7996_phy *phy =mt7996_band_phy (dev, chandef->chan->band); +int ret; + +mutex_lock (&dev->mt76.mutex); + + ret =mt7996_mcu_rdd_resume_tx (phy); + +mutex_unlock (&dev->mt76.mutex); + +return ret; +} + static int mt7996_mac_sta_init_link(struct mt7996_dev *dev, struct ieee80211_bss_conf *link_conf,
@@ -2295,6 +2314,7 @@ const struct ieee80211_ops mt7996_ops = { .release_buffered_frames = mt76_release_buffered_frames, .get_txpower = mt7996_get_txpower, .channel_switch_beacon = mt7996_channel_switch_beacon, + .post_channel_switch = mt7996_post_channel_switch, .get_stats = mt7996_get_stats, .get_et_sset_count = mt7996_get_et_sset_count, .get_et_stats = mt7996_get_et_stats,
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +43 -6
73 lines not on this page · raw message
drivers/net/wireless/mediatek/mt76/mt7996/mcu.h +1 -0
@@ -837,6 +837,7 @@ enum {enum {UNI_BAND_CONFIG_RADIO_ENABLE ,UNI_BAND_CONFIG_RTS_THRESHOLD =0x08 , +UNI_BAND_CONFIG_MAC_ENABLE_CTRL =0x0c , };enum {
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h +2 -0
@@ -376,6 +376,7 @@ struct mt7996_phy {bool has_aux_rx;bool counter_reset; +bool rdd_tx_paused; };struct mt7996_dev {
@@ -725,6 +726,7 @@ int mt7996_mcu_get_temperature(struct mt7996_phy *phy);int mt7996_mcu_set_thermal_throttling (struct mt7996_phy *phy,u8 state);int mt7996_mcu_set_thermal_protect (struct mt7996_phy *phy,bool enable);int mt7996_mcu_set_txpower_sku (struct mt7996_phy *phy); +int mt7996_mcu_rdd_resume_tx (struct mt7996_phy *phy);int mt7996_mcu_rdd_cmd (struct mt7996_dev *dev,int cmd,u8 rdd_idx,u8 val);int mt7996_mcu_rdd_background_enable (struct mt7996_phy *phy,struct cfg80211_chan_def *chandef);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 75/957 wifi: mt76: mt7996: fix iface combination for different chipsets
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shayne Chen <[email protected]>
[ Upstream commit 5ef0e8e2653b1ba325eb883ffb94073f19cb669a ]
MT7992 and MT7990 support up to 19 interfaces per band and 32 in total.
--- .../net/wireless/mediatek/mt76/mt7996/init.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/init.c +16 -1
@@ -34,6 +34,20 @@ static const struct ieee80211_iface_combination if_comb_global = {BIT (NL80211_CHAN_WIDTH_40 ) |BIT (NL80211_CHAN_WIDTH_80 ) | BIT(NL80211_CHAN_WIDTH_160), + .beacon_int_min_gcd = 100, +}; + +static const struct ieee80211_iface_combination if_comb_global_7992 = { + .limits = &if_limits_global, + .n_limits =1 , + .max_interfaces =32 , + .num_different_channels =MT7996_MAX_RADIOS -1 , + .radar_detect_widths =BIT (NL80211_CHAN_WIDTH_20_NOHT ) | +BIT (NL80211_CHAN_WIDTH_20 ) | +BIT (NL80211_CHAN_WIDTH_40 ) | +BIT (NL80211_CHAN_WIDTH_80 ) | +BIT (NL80211_CHAN_WIDTH_160 ), + .beacon_int_min_gcd =100 , };static const struct ieee80211_iface_limit if_limits[] = {
@@ -485,7 +499,8 @@ mt7996_init_wiphy(struct ieee80211_hw *hw, struct mtk_wed_device *wed) hw->vif_data_size =sizeof (struct mt7996_vif ); hw->chanctx_data_size =sizeof (struct mt76_chanctx ); - wiphy->iface_combinations = &if_comb_global; + wiphy->iface_combinations =is_mt7996 (&dev->mt76) ? &if_comb_global : + &if_comb_global_7992; wiphy->n_iface_combinations =1 ; wiphy->radio = dev->radios;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 76/957 wifi: mt76: mt7996: Set mtxq->wcid just for primary link
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Bianconi <[email protected]>
[ Upstream commit 654abcbe4528f74428b69292fad5c4224414fa1b ]
Set WCID index in mt76_txq struct just for the primary link in mt7996_vif_link_add routine.
--- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/main.c +6 -8
@@ -301,7 +301,6 @@ int mt7996_vif_link_add(struct mt76_phy *mphy, struct ieee80211_vif *vif, .cmd = SET_KEY, .link_id = link_conf->link_id, }; -struct mt76_txq *mtxq;int mld_idx, idx, ret; mlink->idx =__ffs64 (~dev->mt76.vif_mask);
@@ -344,11 +343,6 @@ int mt7996_vif_link_add(struct mt76_phy *mphy, struct ieee80211_vif *vif,mt7996_mac_wtbl_update (dev, idx,MT_WTBL_UPDATE_ADM_COUNT_CLEAR ); -if (vif->txq) { - mtxq = (struct mt76_txq *)vif->txq->drv_priv; - mtxq->wcid = idx; - } -if (vif->type !=NL80211_IFTYPE_AP && (!mlink->omac_idx || mlink->omac_idx >3 )) vif->offload_flags =0 ;
@@ -371,9 +365,13 @@ int mt7996_vif_link_add(struct mt76_phy *mphy, struct ieee80211_vif *vif,ieee80211_iter_keys (mphy->hw, vif, mt7996_key_iter, &it); -if (!mlink->wcid->offchannel && - mvif->mt76.deflink_id ==IEEE80211_LINK_UNSPECIFIED ) +if (vif->txq && !mlink->wcid->offchannel && + mvif->mt76.deflink_id ==IEEE80211_LINK_UNSPECIFIED ) { +struct mt76_txq *mtxq = (struct mt76_txq *)vif->txq->drv_priv; + mvif->mt76.deflink_id = link_conf->link_id; + mtxq->wcid = idx; + }return 0 ; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 41/957 rust: sync: atomic: Remove bound `T: Sync` for `Atomic::from_ptr()`
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Boqun Feng <[email protected]>
[ Upstream commit 4a5dc632e0b603ec1cbbf87b78de86b4b6359cff ]
Originally, Atomic::from_ptr() requires T being a Sync because I thought having the ability to do from_ptr() meant multiplle &Atomic<T>s shared by different threads, which was identical (or similar) to multiple &Ts shared by different threads. Hence T was required to be Sync. However this is not true, since &Atomic<T> is not the same at &T. Moreover, having this bound makes Atomic::<*mut T>::from_ptr() impossible, which is definitely not intended. Therefore remove the T: Sync bound.
[boqun: Fix title typo spotted by Alice & Gary]
--- rust/kernel/sync/atomic.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
rust/kernel/sync/atomic.rs +1 -4
@@ -202,10 +202,7 @@ impl<T: AtomicType> Atomic<T> {/// // no data race. /// unsafe { Atomic::from_ptr(foo_a_ptr) }.store(2, Release); /// ``` -pub unsafe fn from_ptr <'a>(ptr: *mut T ) -> &'aSelf -where -T :Sync , - { +pub unsafe fn from_ptr <'a>(ptr: *mut T ) -> &'aSelf {// CAST: `T` and `Atomic<T>` have the same size, alignment and bit validity. // SAFETY: Per function safety requirement, `ptr` is a valid pointer and the object will // live long enough. It's safe to return a `&Atomic<T>` because function safety requirement
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 77/957 wifi: mt76: mt7996: Reset mtxq->idx if primary link is removed in mt7996_vif_link_remove()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Bianconi <[email protected]>
[ Upstream commit 751a2679b15e3a0fa8fc9175862f0ec40643db68 ]
Reset WCID index in mt76_txq struct if primary link is removed in mt7996_vif_link_remove routine.
--- .../net/wireless/mediatek/mt76/mt7996/main.c | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/main.c +16 -5
@@ -402,17 +402,28 @@ void mt7996_vif_link_remove(struct mt76_phy *mphy, struct ieee80211_vif *vif,rcu_assign_pointer (dev->mt76.wcid[idx],NULL ); -if (!mlink->wcid->offchannel && +if (vif->txq && !mlink->wcid->offchannel && mvif->mt76.deflink_id == link_conf->link_id) {struct ieee80211_bss_conf *iter; +struct mt76_txq *mtxq;unsigned int link_id; mvif->mt76.deflink_id =IEEE80211_LINK_UNSPECIFIED ; + mtxq = (struct mt76_txq *)vif->txq->drv_priv; +/* Primary link will be removed, look for a new one */ for_each_vif_active_link (vif, iter, link_id) { -if (link_id !=IEEE80211_LINK_UNSPECIFIED ) { - mvif->mt76.deflink_id = link_id; -break ; - } +struct mt7996_vif_link *link; + +if (link_id == link_conf->link_id) +continue ; + + link =mt7996_vif_link (dev, vif, link_id); +if (!link) +continue ; + + mtxq->wcid = link->msta_link.wcid.idx; + mvif->mt76.deflink_id = link_id; +break ; } }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 78/957 wifi: mt76: mt7996: Clear wcid pointer in mt7996_mac_sta_deinit_link()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Bianconi <[email protected]>
[ Upstream commit 88973240dc7c976dd320b36a9e6d925c9be083ae ]
Clear WCID pointer removing the sta link in mt7996_mac_sta_deinit_link routine.
--- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/mediatek/mt76/mt7996/main.c +1 -0
@@ -1032,6 +1032,7 @@ void mt7996_mac_sta_deinit_link(struct mt7996_dev *dev,list_del_init (&msta_link->rc_list);spin_unlock_bh (&dev->mt76.sta_poll_lock); +rcu_assign_pointer (dev->mt76.wcid[msta_link->wcid.idx],NULL );mt76_wcid_cleanup (&dev->mt76, &msta_link->wcid);mt76_wcid_mask_clear (dev->mt76.wcid_mask, msta_link->wcid.idx); }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 79/957 wifi: mt76: mt7996: Reset ampdu_state state in case of failure in mt7996_tx_check_aggr()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Bianconi <[email protected]>
[ Upstream commit c0747db7c10c2dfbdcff0e8e97021e3df1f1e362 ]
Reset the ampdu_state configured state if ieee80211_start_tx_ba_session routine fails in mt7996_tx_check_aggr()
--- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/mac.c +3 -2
@@ -1243,8 +1243,9 @@ mt7996_tx_check_aggr(struct ieee80211_link_sta *link_sta,if (unlikely (fc != (IEEE80211_FTYPE_DATA |IEEE80211_STYPE_QOS_DATA )))return ; -if (!test_and_set_bit (tid, &wcid->ampdu_state)) -ieee80211_start_tx_ba_session (link_sta->sta, tid,0 ); +if (!test_and_set_bit (tid, &wcid->ampdu_state) && +ieee80211_start_tx_ba_session (link_sta->sta, tid,0 )) +clear_bit (tid, &wcid->ampdu_state); } static void
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 80/957 wifi: mt76: mt7921: Reset ampdu_state state in case of failure in mt76_connac2_tx_check_aggr()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sean Wang <[email protected]>
[ Upstream commit 53ffffeb9624ffab6d9a3b1da8635a23f1172b5e ]
Reset ampdu_state if ieee80211_start_tx_ba_session() fails in mt76_connac2_tx_check_aggr(), otherwise the driver may incorrectly assume aggregation is active and skip future BA setup attempts.
--- drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c +4 -2
@@ -1150,8 +1150,10 @@ void mt76_connac2_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)return ; wcid = (struct mt76_wcid *)sta->drv_priv; -if (!test_and_set_bit (tid, &wcid->ampdu_state)) -ieee80211_start_tx_ba_session (sta, tid,0 ); +if (!test_and_set_bit (tid, &wcid->ampdu_state)) { +if (ieee80211_start_tx_ba_session (sta, tid,0 )) +clear_bit (tid, &wcid->ampdu_state); + } }EXPORT_SYMBOL_GPL (mt76_connac2_tx_check_aggr);
Signature · 1 line
2.53.0