6.3.8-rc1 review
Subsystems (3)
Greg Kroah-Hartman
maintainerPATCH 145/160 vduse: avoid empty string for dev name
In reply to Greg Kroah-HartmanFrom: Sheng Zhao <[email protected]>
[ Upstream commit a90e8608eb0ed93d31ac0feb055f77ce59512542 ]
Syzkaller hits a kernel WARN when the first character of the dev name provided is NULL. Solution is to add a NULL check before calling cdev_device_add() in vduse_create_dev().
kobject: (0000000072042169): attempted to be registered with empty name!
WARNING: CPU: 0 PID: 112695 at lib/kobject.c:236 Call Trace: kobject_add_varg linux/src/lib/kobject.c:390 [inline] kobject_add+0xf6/0x150 linux/src/lib/kobject.c:442 device_add+0x28f/0xc20 linux/src/drivers/base/core.c:2167 cdev_device_add+0x83/0xc0 linux/src/fs/char_dev.c:546 vduse_create_dev linux/src/drivers/vdpa/vdpa_user/vduse_dev.c:2254 [inline] vduse_ioctl+0x7b5/0xf30 linux/src/drivers/vdpa/vdpa_user/vduse_dev.c:2316 vfs_ioctl linux/src/fs/ioctl.c:47 [inline] file_ioctl linux/src/fs/ioctl.c:510 [inline] do_vfs_ioctl+0x14b/0xa80 linux/src/fs/ioctl.c:697 ksys_ioctl+0x7c/0xa0 linux/src/fs/ioctl.c:714 __do_sys_ioctl linux/src/fs/ioctl.c:721 [inline] __se_sys_ioctl linux/src/fs/ioctl.c:719 [inline] __x64_sys_ioctl+0x42/0x50 linux/src/fs/ioctl.c:719 do_syscall_64+0x94/0x330 linux/src/arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x44/0xa9
Message-Id: <[email protected]>
--- drivers/vdpa/vdpa_user/vduse_dev.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/vdpa/vdpa_user/vduse_dev.c +3 -0
@@ -1443,6 +1443,9 @@ static bool vduse_validate_config(struct vduse_dev_config *config)if (config->vq_num >0xffff )return false; +if (!config->name[0 ]) +return false; +if (!device_is_allowed (config->device_id))return false;
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 146/160 vdpa/mlx5: Fix hang when cvq commands are triggered during device unregister
In reply to Greg Kroah-HartmanFrom: Dragos Tatulea <[email protected]>
[ Upstream commit 73790bdfba076c0886f0f14fd46ff2c70ee31ce9 ]
Currently the vdpa device is unregistered after the workqueue that processes vq commands is disabled. However, the device unregister process can still send commands to the cvq (a vlan delete for example) which leads to a hang because the handing workqueue has been disabled and the command never finishes:
[ 2263.095764] rcu: INFO: rcu_sched self-detected stall on CPU [ 2263.096307] rcu: 9-....: (5250 ticks this GP) idle=dac4/1/0x4000000000000000 softirq=111009/111009 fqs=2544 [ 2263.097154] rcu: (t=5251 jiffies g=393549 q=347 ncpus=10) [ 2263.097648] CPU: 9 PID: 94300 Comm: kworker/u20:2 Not tainted 6.3.0-rc6_for_upstream_min_debug_2023_04_14_00_02 #1 [ 2263.098535] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 2263.099481] Workqueue: mlx5_events mlx5_vhca_state_work_handler [mlx5_core] [ 2263.100143] RIP: 0010:virtnet_send_command+0x109/0x170 [ 2263.100621] Code: 1d df f5 ff 85 c0 78 5c 48 8b 7b 08 e8 d0 c5 f5 ff 84 c0 75 11 eb 22 48 8b 7b 08 e8 01 b7 f5 ff 84 c0 75 15 f3 90 48 8b 7b 08 <48> 8d 74 24 04 e8 8d c5 f5 ff 48 85 c0 74 de 48 8b 83 f8 00 00 00 [ 2263.102148] RSP: 0018:ffff888139cf36e8 EFLAGS: 00000246 [ 2263.102624] RAX: 0000000000000000 RBX: ffff888166bea940 RCX: 0000000000000001 [ 2263.103244] RDX: 0000000000000000 RSI: ffff888139cf36ec RDI: ffff888146763800 [ 2263.103864] RBP: ffff888139cf3710 R08: ffff88810d201000 R09: 0000000000000000 [ 2263.104473] R10: 0000000000000002 R11: 0000000000000003 R12: 0000000000000002 [ 2263.105082] R13: 0000000000000002 R14: ffff888114528400 R15: ffff888166bea000 [ 2263.105689] FS: 0000000000000000(0000) GS:ffff88852cc80000(0000) knlGS:0000000000000000 [ 2263.106404] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2263.106925] CR2: 00007f31f394b000 CR3: 000000010615b006 CR4: 0000000000370ea0 [ 2263.107542] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2263.108163] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2263.108769] Call Trace: [ 2263.109059] <TASK> [ 2263.109320] ? check_preempt_wakeup+0x11f/0x230 [ 2263.109750] virtnet_vlan_rx_kill_vid+0x5a/0xa0 [ 2263.110180] vlan_vid_del+0x9c/0x170 [ 2263.110546] vlan_device_event+0x351/0x760 [8021q] [ 2263.111004] raw_notifier_call_chain+0x41/0x60 [ 2263.111426] dev_close_many+0xcb/0x120 [ 2263.111808] unregister_netdevice_many_notify+0x130/0x770 [ 2263.112297] ? wq_worker_running+0xa/0x30 [ 2263.112688] unregister_netdevice_queue+0x89/0xc0 [ 2263.113128] unregister_netdev+0x18/0x20 [ 2263.113512] virtnet_remove+0x4f/0x230 [ 2263.113885] virtio_dev_remove+0x31/0x70 [ 2263.114273] device_release_driver_internal+0x18f/0x1f0 [ 2263.114746] bus_remove_device+0xc6/0x130 [ 2263.115146] device_del+0x173/0x3c0 [ 2263.115502] ? kernfs_find_ns+0x35/0xd0 [ 2263.115895] device_unregister+0x1a/0x60 [ 2263.116279] unregister_virtio_device+0x11/0x20 [ 2263.116706] device_release_driver_internal+0x18f/0x1f0 [ 2263.117182] bus_remove_device+0xc6/0x130 [ 2263.117576] device_del+0x173/0x3c0 [ 2263.117929] ? vdpa_dev_remove+0x20/0x20 [vdpa] [ 2263.118364] device_unregister+0x1a/0x60 [ 2263.118752] mlx5_vdpa_dev_del+0x4c/0x80 [mlx5_vdpa] [ 2263.119232] vdpa_match_remove+0x21/0x30 [vdpa] [ 2263.119663] bus_for_each_dev+0x71/0xc0 [ 2263.120054] vdpa_mgmtdev_unregister+0x57/0x70 [vdpa] [ 2263.120520] mlx5v_remove+0x12/0x20 [mlx5_vdpa] [ 2263.120953] auxiliary_bus_remove+0x18/0x30 [ 2263.121356] device_release_driver_internal+0x18f/0x1f0 [ 2263.121830] bus_remove_device+0xc6/0x130 [ 2263.122223] device_del+0x173/0x3c0 [ 2263.122581] ? devl_param_driverinit_value_get+0x29/0x90 [ 2263.123070] mlx5_rescan_drivers_locked+0xc4/0x2d0 [mlx5_core] [ 2263.123633] mlx5_unregister_device+0x54/0x80 [mlx5_core] [ 2263.124169] mlx5_uninit_one+0x54/0x150 [mlx5_core] [ 2263.124656] mlx5_sf_dev_remove+0x45/0x90 [mlx5_core] [ 2263.125153] auxiliary_bus_remove+0x18/0x30 [ 2263.125560] device_release_driver_internal+0x18f/0x1f0 [ 2263.126052] bus_remove_device+0xc6/0x130 [ 2263.126451] device_del+0x173/0x3c0 [ 2263.126815] mlx5_sf_dev_remove+0x39/0xf0 [mlx5_core] [ 2263.127318] mlx5_sf_dev_state_change_handler+0x178/0x270 [mlx5_core] [ 2263.127920] blocking_notifier_call_chain+0x5a/0x80 [ 2263.128379] mlx5_vhca_state_work_handler+0x151/0x200 [mlx5_core] [ 2263.128951] process_one_work+0x1bb/0x3c0 [ 2263.129355] ? process_one_work+0x3c0/0x3c0 [ 2263.129766] worker_thread+0x4d/0x3c0 [ 2263.130140] ? process_one_work+0x3c0/0x3c0 [ 2263.130548] kthread+0xb9/0xe0 [ 2263.130895] ? kthread_complete_and_exit+0x20/0x20 [ 2263.131349] ret_from_fork+0x1f/0x30 [ 2263.131717] </TASK>
The fix is to disable and destroy the workqueue after the device unregister. It is expected that vhost will not trigger kicks after the unregister. But even if it would, the wq is disabled already by setting the pointer to NULL (done so in the referenced commit).
Message-Id: <[email protected]>
--- drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vdpa/mlx5/net/mlx5_vnet.c +1 -1
@@ -3323,10 +3323,10 @@ static void mlx5_vdpa_dev_del(struct vdpa_mgmt_dev *v_mdev, struct vdpa_device *mlx5_vdpa_remove_debugfs (ndev->debugfs); ndev->debugfs =NULL ;unregister_link_notifier (ndev); +_vdpa_unregister_device (dev); wq = mvdev->wq; mvdev->wq =NULL ;destroy_workqueue (wq); -_vdpa_unregister_device (dev); mgtdev->ndev =NULL ; }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 147/160 vhost: support PACKED when setting-getting vring_base
In reply to Greg Kroah-HartmanFrom: Shannon Nelson <[email protected]>
[ Upstream commit 55d8122f5cd62d5aaa225d7167dcd14a44c850b9 ]
Use the right structs for PACKED or split vqs when setting and getting the vring base.
Message-Id: <[email protected]>
--- drivers/vhost/vhost.c | 18 +++++++++++++----- drivers/vhost/vhost.h | 8 ++++++-- 2 files changed, 19 insertions(+), 7 deletions(-)
drivers/vhost/vhost.c +13 -5
@@ -1633,17 +1633,25 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg r = -EFAULT ;break ; } -if (s.num >0xffff ) { - r = -EINVAL ; -break ; +if (vhost_has_feature (vq,VIRTIO_F_RING_PACKED )) { + vq->last_avail_idx = s.num &0xffff ; + vq->last_used_idx = (s.num >>16 ) &0xffff ; + }else { +if (s.num >0xffff ) { + r = -EINVAL ; +break ; + } + vq->last_avail_idx = s.num; } - vq->last_avail_idx = s.num;/* Forget the cached index value. */ vq->avail_idx = vq->last_avail_idx;break ;case VHOST_GET_VRING_BASE : s.index = idx; - s.num = vq->last_avail_idx; +if (vhost_has_feature (vq,VIRTIO_F_RING_PACKED )) + s.num = (u32 )vq->last_avail_idx | ((u32 )vq->last_used_idx <<16 ); +else + s.num = vq->last_avail_idx;if (copy_to_user (argp, &s,sizeof s)) r = -EFAULT ;break ;
drivers/vhost/vhost.h +6 -2
@@ -85,13 +85,17 @@ struct vhost_virtqueue {/* The routine to call when the Guest pings us, or timeout. */ vhost_work_fn_t handle_kick; -/* Last available index we saw. */ +/* Last available index we saw. +* Values are limited to 0x7fff, and the high bit is used as +* a wrap counter when using VIRTIO_F_RING_PACKED. */ u16 last_avail_idx;/* Caches available index value from user. */ u16 avail_idx; -/* Last index we used. */ +/* Last index we used. +* Values are limited to 0x7fff, and the high bit is used as +* a wrap counter when using VIRTIO_F_RING_PACKED. */ u16 last_used_idx;/* Used flags */
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 148/160 vhost_vdpa: support PACKED when setting-getting vring_base
In reply to Greg Kroah-HartmanFrom: Shannon Nelson <[email protected]>
[ Upstream commit beee7fdb5b56a46415a4992d28dd4c2d06eb52df ]
Use the right structs for PACKED or split vqs when setting and getting the vring base.
Message-Id: <[email protected]>
--- drivers/vhost/vdpa.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-)
drivers/vhost/vdpa.c +17 -4
@@ -572,7 +572,14 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd,if (r)return r; - vq->last_avail_idx = vq_state.split.avail_index; +if (vhost_has_feature (vq,VIRTIO_F_RING_PACKED )) { + vq->last_avail_idx = vq_state.packed.last_avail_idx | + (vq_state.packed.last_avail_counter <<15 ); + vq->last_used_idx = vq_state.packed.last_used_idx | + (vq_state.packed.last_used_counter <<15 ); + }else { + vq->last_avail_idx = vq_state.split.avail_index; + }break ; }
@@ -590,9 +597,15 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd,break ;case VHOST_SET_VRING_BASE : - vq_state.split.avail_index = vq->last_avail_idx; -if (ops->set_vq_state (vdpa, idx, &vq_state)) - r = -EINVAL ; +if (vhost_has_feature (vq,VIRTIO_F_RING_PACKED )) { + vq_state.packed.last_avail_idx = vq->last_avail_idx &0x7fff ; + vq_state.packed.last_avail_counter = !!(vq->last_avail_idx &0x8000 ); + vq_state.packed.last_used_idx = vq->last_used_idx &0x7fff ; + vq_state.packed.last_used_counter = !!(vq->last_used_idx &0x8000 ); + }else { + vq_state.split.avail_index = vq->last_avail_idx; + } + r = ops->set_vq_state (vdpa, idx, &vq_state);break ;case VHOST_SET_VRING_CALL :
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 149/160 ksmbd: fix out-of-bound read in deassemble_neg_contexts()
In reply to Greg Kroah-HartmanFrom: Namjae Jeon <[email protected]>
commit f1a411873c85b642f13b01f21b534c2bab81fc1b upstream.
The check in the beginning isclen + sizeof(struct smb2_neg_context) <= len_of_ctxts, but in the end of loop, len_of_ctxts will subtract ((clen + 7) & ~0x7) + sizeof(struct smb2_neg_context), which causes integer underflow when clen does the 8 alignment. We should use (clen + 7) & ~0x7 in the check to avoid underflow from happening.
Then there are some variables that need to be declared unsigned instead of signed.
[ 11.671070] BUG: KASAN: slab-out-of-bounds in smb2_handle_negotiate+0x799/0x1610 [ 11.671533] Read of size 2 at addr ffff888005e86cf2 by task kworker/0:0/7 ... [ 11.673383] Call Trace: [ 11.673541] <TASK> [ 11.673679] dump_stack_lvl+0x33/0x50 [ 11.673913] print_report+0xcc/0x620 [ 11.674671] kasan_report+0xae/0xe0 [ 11.675171] kasan_check_range+0x35/0x1b0 [ 11.675412] smb2_handle_negotiate+0x799/0x1610 [ 11.676217] ksmbd_smb_negotiate_common+0x526/0x770 [ 11.676795] handle_ksmbd_work+0x274/0x810
...
--- fs/ksmbd/smb2pdu.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
fs/ksmbd/smb2pdu.c +6 -7
@@ -991,13 +991,13 @@ static void decode_sign_cap_ctxt(structstatic __le32 deassemble_neg_contexts (struct ksmbd_conn *conn,struct smb2_negotiate_req *req, -int len_of_smb) +unsigned int len_of_smb) {/* +4 is to account for the RFC1001 len field */ struct smb2_neg_context *pctx = (struct smb2_neg_context *)req;int i =0 , len_of_ctxts; -int offset =le32_to_cpu (req->NegotiateContextOffset); -int neg_ctxt_cnt =le16_to_cpu (req->NegotiateContextCount); +unsigned int offset =le32_to_cpu (req->NegotiateContextOffset); +unsigned int neg_ctxt_cnt =le16_to_cpu (req->NegotiateContextCount);__le32 status =STATUS_INVALID_PARAMETER ;ksmbd_debug (SMB ,"decoding %d negotiate contexts\n" , neg_ctxt_cnt);
@@ -1011,7 +1011,7 @@ static __le32 deassemble_neg_contexts(stwhile (i++ < neg_ctxt_cnt) {int clen, ctxt_len; -if (len_of_ctxts <sizeof (struct smb2_neg_context )) +if (len_of_ctxts < (int )sizeof (struct smb2_neg_context ))break ; pctx = (struct smb2_neg_context *)((char *)pctx + offset);
@@ -1066,9 +1066,8 @@ static __le32 deassemble_neg_contexts(st }/* offsets must be 8 byte aligned */ - clen = (clen +7 ) & ~0x7 ; - offset = clen +sizeof (struct smb2_neg_context ); - len_of_ctxts -= clen +sizeof (struct smb2_neg_context ); + offset = (ctxt_len +7 ) & ~0x7 ; + len_of_ctxts -= offset; }return status; }
Greg Kroah-Hartman
maintainerPATCH 150/160 ksmbd: fix out-of-bound read in parse_lease_state()
In reply to Greg Kroah-HartmanFrom: Namjae Jeon <[email protected]>
commit fc6c6a3c324c1b3e93a03d0cfa3749c781f23de0 upstream.
This bug is in parse_lease_state, and it is caused by the missing check of struct create_context. When the ksmbd traverses the create_contexts, it doesn't check if the field of NameOffset and Next is valid, The KASAN message is following:
[ 6.664323] BUG: KASAN: slab-out-of-bounds in parse_lease_state+0x7d/0x280 [ 6.664738] Read of size 2 at addr ffff888005c08988 by task kworker/0:3/103 ... [ 6.666644] Call Trace: [ 6.666796] <TASK> [ 6.666933] dump_stack_lvl+0x33/0x50 [ 6.667167] print_report+0xcc/0x620 [ 6.667903] kasan_report+0xae/0xe0 [ 6.668374] kasan_check_range+0x35/0x1b0 [ 6.668621] parse_lease_state+0x7d/0x280 [ 6.668868] smb2_open+0xbe8/0x4420 [ 6.675137] handle_ksmbd_work+0x282/0x820
Use smb2_find_context_vals() to find smb2 create request lease context. smb2_find_context_vals validate create context fields.
--- fs/ksmbd/oplock.c | 70 ++++++++++++++++++++---------------------------------- 1 file changed, 26 insertions(+), 44 deletions(-)
fs/ksmbd/oplock.c +26 -44
@@ -1415,56 +1415,38 @@ void create_lease_buf(u8 *rbuf, struct l*/ struct lease_ctx_info *parse_lease_state (void *open_req) { -char *data_offset;struct create_context *cc; -unsigned int next =0 ; -char *name; -bool found = false;struct smb2_create_req *req = (struct smb2_create_req *)open_req; -struct lease_ctx_info *lreq =kzalloc (sizeof (struct lease_ctx_info ), -GFP_KERNEL ); +struct lease_ctx_info *lreq; + + cc =smb2_find_context_vals (req,SMB2_CREATE_REQUEST_LEASE ,4 ); +if (IS_ERR_OR_NULL (cc)) +return NULL ; + + lreq =kzalloc (sizeof (struct lease_ctx_info ),GFP_KERNEL );if (!lreq)return NULL ; - data_offset = (char *)req +le32_to_cpu (req->CreateContextsOffset); - cc = (struct create_context *)data_offset; -do { - cc = (struct create_context *)((char *)cc + next); - name =le16_to_cpu (cc->NameOffset) + (char *)cc; -if (le16_to_cpu (cc->NameLength) !=4 || -strncmp (name,SMB2_CREATE_REQUEST_LEASE ,4 )) { - next =le32_to_cpu (cc->Next); -continue ; - } - found = true; -break ; - }while (next !=0 ); - -if (found) { -if (sizeof (struct lease_context_v2 ) ==le32_to_cpu (cc->DataLength)) { -struct create_lease_v2 *lc = (struct create_lease_v2 *)cc; - -memcpy (lreq->lease_key, lc->lcontext.LeaseKey,SMB2_LEASE_KEY_SIZE ); - lreq->req_state = lc->lcontext.LeaseState; - lreq->flags = lc->lcontext.LeaseFlags; - lreq->duration = lc->lcontext.LeaseDuration; -memcpy (lreq->parent_lease_key, lc->lcontext.ParentLeaseKey, -SMB2_LEASE_KEY_SIZE ); - lreq->version =2 ; - }else { -struct create_lease *lc = (struct create_lease *)cc; - -memcpy (lreq->lease_key, lc->lcontext.LeaseKey,SMB2_LEASE_KEY_SIZE ); - lreq->req_state = lc->lcontext.LeaseState; - lreq->flags = lc->lcontext.LeaseFlags; - lreq->duration = lc->lcontext.LeaseDuration; - lreq->version =1 ; - } -return lreq; - } +if (sizeof (struct lease_context_v2 ) ==le32_to_cpu (cc->DataLength)) { +struct create_lease_v2 *lc = (struct create_lease_v2 *)cc; -kfree (lreq); -return NULL ; +memcpy (lreq->lease_key, lc->lcontext.LeaseKey,SMB2_LEASE_KEY_SIZE ); + lreq->req_state = lc->lcontext.LeaseState; + lreq->flags = lc->lcontext.LeaseFlags; + lreq->duration = lc->lcontext.LeaseDuration; +memcpy (lreq->parent_lease_key, lc->lcontext.ParentLeaseKey, +SMB2_LEASE_KEY_SIZE ); + lreq->version =2 ; + }else { +struct create_lease *lc = (struct create_lease *)cc; + +memcpy (lreq->lease_key, lc->lcontext.LeaseKey,SMB2_LEASE_KEY_SIZE ); + lreq->req_state = lc->lcontext.LeaseState; + lreq->flags = lc->lcontext.LeaseFlags; + lreq->duration = lc->lcontext.LeaseDuration; + lreq->version =1 ; + } +return lreq; }/**
Greg Kroah-Hartman
maintainerPATCH 141/160 riscv: mm: Ensure prot of VM_WRITE and VM_EXEC must be readable
In reply to Greg Kroah-HartmanFrom: Hsieh-Tseng Shen <[email protected]>
[ Upstream commit 6569fc12e442ea973d96db39e542aa19a7bc3a79 ]
Commit 8aeb7b17f04e ("RISC-V: Make mmap() with PROT_WRITE imply PROT_READ") allows riscv to use mmap with PROT_WRITE only, and meanwhile mmap with w+x is also permitted. However, when userspace tries to access this page with PROT_WRITE|PROT_EXEC, which causes infinite loop at load page fault as well as it triggers soft lockup. According to riscv privileged spec, "Writable pages must also be marked readable". The fix to drop the PAGE_COPY_READ_EXEC and then PAGE_COPY_EXEC would be just used instead. This aligns the other arches (i.e arm64) for protection_map.
--- arch/riscv/include/asm/pgtable.h | 3 +-- arch/riscv/mm/init.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
arch/riscv/include/asm/pgtable.h +1 -2
@@ -165,8 +165,7 @@ extern struct pt_alloc_ops pt_ops __initdata; _PAGE_EXEC | _PAGE_WRITE)#define PAGE_COPY PAGE_READ -#define PAGE_COPY_EXEC PAGE_EXEC -#define PAGE_COPY_READ_EXEC PAGE_READ_EXEC +#define PAGE_COPY_EXEC PAGE_READ_EXEC#define PAGE_SHARED PAGE_WRITE#define PAGE_SHARED_EXEC PAGE_WRITE_EXEC
arch/riscv/mm/init.c +1 -1
@@ -286,7 +286,7 @@ static const pgprot_t protection_map[16] = { [VM_EXEC] = PAGE_EXEC, [VM_EXEC | VM_READ] = PAGE_READ_EXEC, [VM_EXEC | VM_WRITE] = PAGE_COPY_EXEC, - [VM_EXEC | VM_WRITE | VM_READ] = PAGE_COPY_READ_EXEC, + [VM_EXEC | VM_WRITE | VM_READ] = PAGE_COPY_EXEC, [VM_SHARED] = PAGE_NONE, [VM_SHARED | VM_READ] = PAGE_READ, [VM_SHARED | VM_WRITE] = PAGE_SHARED,
Signature · 1 line
2.39.2
Re: [PATCH 6.3 038/160] wifi: cfg80211: fix locking in regulatory disconnect
In reply to Greg Kroah-HartmanQuoted 7 lines · Greg Kroah-Hartman
From: Johannes Berg <[email protected]>
[ Upstream commit
f7e60032c6618dfd643c7210d5cba2789e2de2e2]This should use
wiphy_lock()now instead of requiring the RTNL, since__cfg80211_leave()viacfg80211_leave()is now requiring that lock to be held.
You should perhaps hold off on this. While all this is correct, I missed something that Dan found later:
I'll have this in the next pull request.
I suppose _both_ should go to stable, and nobody ever seems to run into this patch (at least lockdep would loudly complain), but stills seems better in the short term to have missing locking than a deadlock.
johannes
Greg Kroah-Hartman
maintainerRe: [PATCH 6.3 038/160] wifi: cfg80211: fix locking in regulatory disconnect
Quoted 12 lines · Johannes Berg
Quoted 7 lines · Greg Kroah-Hartman
From: Johannes Berg <[email protected]>
[ Upstream commit
f7e60032c6618dfd643c7210d5cba2789e2de2e2]This should use
wiphy_lock()now instead of requiring the RTNL, since__cfg80211_leave()viacfg80211_leave()is now requiring that lock to be held.You should perhaps hold off on this. While all this is correct, I missed something that Dan found later:
Quoted 7 lines
I'll have this in the next pull request.
I suppose _both_ should go to stable, and nobody ever seems to run into this patch (at least lockdep would loudly complain), but stills seems better in the short term to have missing locking than a deadlock.
Thanks for letting me know, I've dropped this from all queues now.
greg k-h
Quoted 9 lines
This is the start of the stable review cycle for the 6.3.8 release. There are 160 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 Wed, 14 Jun 2023 10:16:41 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.3.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.3.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my x86_64 and ARM64 test systems. No errors or regressions.
Thanks.
Hello Greg,
Quoted 10 lines
From: Greg Kroah-Hartman <[email protected]>
Sent: Monday, June 12, 2023 11:26 AMThis is the start of the stable review cycle for the 6.3.8 release. There are 160 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 Wed, 14 Jun 2023 10:16:41 +0000. Anything received after that time might be too late.
Thank you for the release!
CIP configurations built and booted okay with Linux 6.3.8-rc1 (718be3905b8f):
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/pipelines/897025257
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/commits/linux-6.3.y
Kind regards, Chris
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.3.8 release. There are 160 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 Wed, 14 Jun 2023 10:16:41 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.3.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.3.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.3.8 release. There are 160 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.
Successfully compiled and installed bindeb-pkgs on my computer (Acer Aspire E15, Intel Core i3 Haswell). No noticeable regressions.
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.3.8 release. There are 160 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 Wed, 14 Jun 2023 10:16:41 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.3.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.3.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.3.8 release. There are 160 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 Wed, 14 Jun 2023 10:16:41 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.3.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.3.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 6.3.8-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git branch: linux-6.3.y
* git commit: 718be3905b8f1b4c3ef58c6b82bba0bb167f5da8
* git describe: v6.3.7-161-g718be3905b8f
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.3.y/build/v6.3.7-161-g718be3905b8f
## Test Regressions (compared to v6.3.7)
## Metric Regressions (compared to v6.3.7)
## Test Fixes (compared to v6.3.7)
## Metric Fixes (compared to v6.3.7)
## Test result summary
total: 173472, pass: 151655, fail: 3242, skip: 18318, xfail: 257
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 141 total, 140 passed, 1 failed
* arm64: 50 total, 50 passed, 0 failed
* i386: 37 total, 36 passed, 1 failed
* mips: 26 total, 26 passed, 0 failed
* parisc: 3 total, 3 passed, 0 failed
* powerpc: 34 total, 34 passed, 0 failed
* riscv: 22 total, 22 passed, 0 failed
* s390: 12 total, 12 passed, 0 failed
* sh: 12 total, 12 passed, 0 failed
* sparc: 6 total, 6 passed, 0 failed
* x86_64: 42 total, 42 passed, 0 failed
## Test suites summary
* boot
* fwts
* igt-gpu-tools
* kselftest-android
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-exec
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-firmware
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-membarrier
* kselftest-mincore
* kselftest-mqueue
* kselftest-net
* kselftest-net-forwarding
* kselftest-net-mptcp
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-user_events
* kselftest-vDSO
* kselftest-watchdog
* kselftest-x86
* kselftest-zram
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* network-basic-tests
* perf
* rcutorture
* v4l2-compliance
* vdso
--
Linaro LKFT
https://lkft.linaro.org
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.3.8 release. There are 160 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 Wed, 14 Jun 2023 10:16:41 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.3.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.3.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v6.3:
11 builds: 11 pass, 0 fail
28 boots: 28 pass, 0 fail
130 tests: 130 pass, 0 failLinux version: 6.3.8-rc1-g718be3905b8f
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.3.8 release. There are 160 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.
Thanks,
Conor.
Hi Greg,
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.3.8 release. There are 160 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.
Build test (gcc version 12.2.1 20230511):
mips: 52 configs -> no failure
arm: 71 configs -> no failure
arm64: 3 configs -> no failurex86_64: 4 configs -> no failure
alpha allmodconfig -> no failure
csky allmodconfig -> no failure
powerpc allmodconfig -> no failure
riscv allmodconfig -> no failure
s390 allmodconfig -> no failure
xtensa allmodconfig -> no failure
Boot test:x86_64: Booted on my test laptop. No regression.x86_64: Booted on qemu. No regression. [1]
arm64: Booted on rpi4b (4GB model). No regression. [2]
mips: Booted on ci20 board. No regression. [3]
[1]. https://openqa.qa.codethink.co.uk/tests/3923
[2]. https://openqa.qa.codethink.co.uk/tests/3925
[3]. https://openqa.qa.codethink.co.uk/tests/3924
Signature · 2 lines
Regards Sudip
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.3.8 release. There are 160 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 Wed, 14 Jun 2023 10:16:41 +0000. Anything received after that time might be too late.
Hi Greg,
6.3.8-rc1 tested.
Run tested on:
- Allwinner H6 (Tanix TX6)
- Intel Alder Lake x86_64 (nuc12 i7-1260P)
In addition - build tested for:
- Allwinner A64
- Allwinner H3
- Allwinner H5
- NXP iMX6
- NXP iMX8
- Qualcomm Dragonboard
- Rockchip RK3288
- Rockchip RK3328
- Rockchip RK3399pro
- Samsung Exynos
--
Rudi
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.3.8 release. There are 160 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 Wed, 14 Jun 2023 10:16:41 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.3.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.3.y
and the diffstat can be found below.thanks,
greg k-h
Tested rc1 against the Fedora build system (aarch64, ppc64le, s390x, x86_64), and boot tested x86_64. No regressions noted.
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.3.8 release. There are 160 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 Wed, 14 Jun 2023 10:16:41 +0000. Anything received after that time might be too late.
Build results:
total: 153 pass: 153 fail: 0 Qemu test results: total: 520 pass: 520 fail: 0
Guenter
Re: [PATCH 6.3 038/160] wifi: cfg80211: fix locking in regulatory disconnect
In reply to Greg Kroah-HartmanQuoted 15 lines · Greg Kroah-Hartman
Quoted 14 lines · Johannes Berg
Quoted 7 lines · Greg Kroah-Hartman
From: Johannes Berg <[email protected]>
[ Upstream commit
f7e60032c6618dfd643c7210d5cba2789e2de2e2]This should use
wiphy_lock()now instead of requiring the RTNL, since__cfg80211_leave()viacfg80211_leave()is now requiring that lock to be held.You should perhaps hold off on this. While all this is correct, I missed something that Dan found later:
Quoted 8 lines
Quoted 5 lines
I'll have this in the next pull request.
I suppose _both_ should go to stable, and nobody ever seems to run into this patch (at least lockdep would loudly complain), but stills seems better in the short term to have missing locking than a deadlock.
Thanks for letting me know, I've dropped this from all queues now.
The above commit has landed in Linus's tree, and I think you actually should pick up both of these now - there's a lockdep assertion there and locking issues triggered that I (if erroneously) fixed. Seems that we hardly ever get to that code though.
Should I send those patches individually?
johannes
Greg Kroah-Hartman
maintainerRe: [PATCH 6.3 038/160] wifi: cfg80211: fix locking in regulatory disconnect
Quoted 25 lines · Johannes Berg
Quoted 15 lines · Greg Kroah-Hartman
Quoted 14 lines · Johannes Berg
Quoted 7 lines · Greg Kroah-Hartman
From: Johannes Berg <[email protected]>
[ Upstream commit
f7e60032c6618dfd643c7210d5cba2789e2de2e2]This should use
wiphy_lock()now instead of requiring the RTNL, since__cfg80211_leave()viacfg80211_leave()is now requiring that lock to be held.You should perhaps hold off on this. While all this is correct, I missed something that Dan found later:
Quoted 8 lines
Quoted 5 lines
I'll have this in the next pull request.
I suppose _both_ should go to stable, and nobody ever seems to run into this patch (at least lockdep would loudly complain), but stills seems better in the short term to have missing locking than a deadlock.
Thanks for letting me know, I've dropped this from all queues now.
Quoted 6 lines
The above commit has landed in Linus's tree, and I think you actually should pick up both of these now - there's a lockdep assertion there and locking issues triggered that I (if erroneously) fixed. Seems that we hardly ever get to that code though.
Should I send those patches individually?
I can pick them up from here, as the git ids are present and that's all I need, right?
thanks,
greg k-h
Re: [PATCH 6.3 038/160] wifi: cfg80211: fix locking in regulatory disconnect
Quoted 4 lines · Greg Kroah-Hartman
Quoted 3 lines · Johannes Berg
Quoted 2 lines · Greg Kroah-Hartman
Quoted 1 line · Johannes Berg
On Mon, 2023-06-12 at 10:26 +0000, Greg Kroah-Hartman wrote:
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
From: Johannes Berg <[email protected]>
[ Upstream commit
f7e60032c6618dfd643c7210d5cba2789e2de2e2]I can pick them up from here, as the git ids are present and that's all I need, right?
Correct, thanks!
Note that in 6.0 the indentation for the second patch changed, but otherwise the logic is the same (just additional indentation due to multi-link support.) But I can also just send a fixed version when you bounce it back due to not applying.
Also, FWIW, I did verify all this in the meantime, and in fact there's an additional bug here since 6.0, I'll send a separate fix. Also another problem with OCB iftype ... oh well. More fixes to come later, I guess, though that's probably not that interesting for stable.
Thanks,
johannes
Greg Kroah-Hartman
maintainerRe: [PATCH 6.3 038/160] wifi: cfg80211: fix locking in regulatory disconnect
Quoted 14 lines · Johannes Berg
Quoted 4 lines · Greg Kroah-Hartman
Quoted 3 lines · Johannes Berg
Quoted 2 lines · Greg Kroah-Hartman
Quoted 1 line · Johannes Berg
On Mon, 2023-06-12 at 10:26 +0000, Greg Kroah-Hartman wrote:
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
From: Johannes Berg <[email protected]>
[ Upstream commit
f7e60032c6618dfd643c7210d5cba2789e2de2e2]I can pick them up from here, as the git ids are present and that's all I need, right?
Quoted 6 lines
Correct, thanks!
Note that in 6.0 the indentation for the second patch changed, but otherwise the logic is the same (just additional indentation due to multi-link support.) But I can also just send a fixed version when you bounce it back due to not applying.
I fixed it up by hand, thanks.
greg k-h