6.4.16-rc1 review
Subsystems (12)
Greg Kroah-Hartman
maintainerPATCH 652/737 media: i2c: Add a camera sensor top level menu
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sakari Ailus <[email protected]>
commit 7d3c7d2a2914e10bec3b9cdacdadb8e1f65f715a upstream.
Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for all sensor drivers. This also adds the options to drivers that don't specifically need them, these are still seldom used drivers using old APIs. The upside is that these should now all compile --- many drivers have had missing dependencies.
The "menu" is replaced by selectable "menuconfig" to select the needed V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API options.
Also select MEDIA_CONTROLLER which VIDEO_V4L2_SUBDEV_API effectively depends on, and add the I2C dependency to the menu.
--- drivers/media/i2c/Kconfig | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/media/i2c/Kconfig +10 -3
@@ -25,8 +25,15 @@ config VIDEO_IR_I2C # V4L2 I2C drivers that are related with Camera support # -menu "Camera sensor devices" - visible if MEDIA_CAMERA_SUPPORT +menuconfig VIDEO_CAMERA_SENSOR + bool "Camera sensor devices" + depends on MEDIA_CAMERA_SUPPORT && I2C + select MEDIA_CONTROLLER + select V4L2_FWNODE + select VIDEO_V4L2_SUBDEV_API + default y + +if VIDEO_CAMERA_SENSOR config VIDEO_APTINA_PLL tristate
@@ -797,7 +804,7 @@ config VIDEO_ST_VGXY61 source "drivers/media/i2c/ccs/Kconfig" source "drivers/media/i2c/et8ek8/Kconfig" -endmenu +endif menu "Lens drivers" visible if MEDIA_CAMERA_SUPPORT
Greg Kroah-Hartman
maintainerPATCH 653/737 PCI: rockchip: Use 64-bit mask on MSI 64-bit PCI address
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rick Wertenbroek <[email protected]>
commit cdb50033dd6dfcf02ae3d4ee56bc1a9555be6d36 upstream.
A 32-bit mask was used on the 64-bit PCI address used for mapping MSIs. This would result in the upper 32 bits being unintentionally zeroed and MSIs getting mapped to incorrect PCI addresses if the address had any of the upper bits set.
Replace 32-bit mask by appropriate 64-bit mask.
--- drivers/pci/controller/pcie-rockchip.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pci/controller/pcie-rockchip.h +3 -3
@@ -158,7 +158,9 @@#define PCIE_RC_CONFIG_THP_CAP (PCIE_RC_CONFIG_BASE + 0x274)#define PCIE_RC_CONFIG_THP_CAP_NEXT_MASK GENMASK(31, 20) -#define PCIE_ADDR_MASK 0xffffff00 +#define MAX_AXI_IB_ROOTPORT_REGION_NUM 3 +#define MIN_AXI_ADDR_BITS_PASSED 8 +#define PCIE_ADDR_MASK GENMASK_ULL(63, MIN_AXI_ADDR_BITS_PASSED)#define PCIE_CORE_AXI_CONF_BASE 0xc00000#define PCIE_CORE_OB_REGION_ADDR0 (PCIE_CORE_AXI_CONF_BASE + 0x0)#define PCIE_CORE_OB_REGION_ADDR0_NUM_BITS 0x3f
@@ -185,8 +187,6 @@#define AXI_WRAPPER_TYPE1_CFG 0xb#define AXI_WRAPPER_NOR_MSG 0xc -#define MAX_AXI_IB_ROOTPORT_REGION_NUM 3 -#define MIN_AXI_ADDR_BITS_PASSED 8#define PCIE_RC_SEND_PME_OFF 0x11960#define ROCKCHIP_VENDOR_ID 0x1d87#define PCIE_LINK_IS_L2 (x) \
Greg Kroah-Hartman
maintainerPATCH 654/737 ipmi_si: fix a memleak in try_smi_init()
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yi Yang <[email protected]>
commit 6cf1a126de2992b4efe1c3c4d398f8de4aed6e3f upstream.
Kmemleak reported the following leak info in try_smi_init():
unreferenced object 0xffff00018ecf9400 (size 1024):
comm "modprobe", pid 2707763, jiffies 4300851415 (age 773.308s) backtrace:
[<000000004ca5b312>] __kmalloc+0x4b8/0x7b0
[<00000000953b1072>] try_smi_init+0x148/0x5dc [ipmi_si]
[<000000006460d325>] 0xffff800081b10148
[<0000000039206ea5>] do_one_initcall+0x64/0x2a4
[<00000000601399ce>] do_init_module+0x50/0x300
[<000000003c12ba3c>] load_module+0x7a8/0x9e0
[<00000000c246fffe>] __se_sys_init_module+0x104/0x180
[<00000000eea99093>] __arm64_sys_init_module+0x24/0x30
[<0000000021b1ef87>] el0_svc_common.constprop.0+0x94/0x250
[<0000000070f4f8b7>] do_el0_svc+0x48/0xe0
[<000000005a05337f>] el0_svc+0x24/0x3c
[<000000005eb248d6>] el0_sync_handler+0x160/0x164
[<0000000030a59039>] el0_sync+0x160/0x180The problem was that when an error occurred before handlers registration and after allocating new_smi->si_sm, the variable wouldn't be freed in the error handling afterwards since shutdown_smi() hadn't been registered yet. Fix it by adding a kfree() in the error handling path in try_smi_init().
Message-Id: <[email protected]>
--- drivers/char/ipmi/ipmi_si_intf.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/char/ipmi/ipmi_si_intf.c +5 -0
@@ -2082,6 +2082,11 @@ static int try_smi_init(struct smi_info new_smi->io.io_cleanup =NULL ; } +if (rv && new_smi->si_sm) { +kfree (new_smi->si_sm); + new_smi->si_sm =NULL ; + } +return rv; }
Greg Kroah-Hartman
maintainerPATCH 655/737 ARM: OMAP2+: Fix -Warray-bounds warning in _pwrdm_state_switch()
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gustavo A. R. Silva <[email protected]>
commit 847fb80cc01a54bc827b02547bb8743bdb59ddab upstream.
If function pwrdm_read_prev_pwrst() returns -EINVAL, we will end up accessing array pwrdm->state_counter through negative index -22. This is wrong and the compiler is legitimately warning us about this potential problem.
Fix this by sanity checking the value stored in variable _prev_ before accessing array pwrdm->state_counter.
Address the following -Warray-bounds warning:arch/arm/mach-omap2/powerdomain.c:178:45: warning: array subscript -22 is below array bounds of 'unsigned int[4]' [-Warray-bounds]
Message-ID: <ZIFVGwImU3kpaGeH@work>
--- arch/arm/mach-omap2/powerdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/powerdomain.c +1 -1
@@ -174,7 +174,7 @@ static int _pwrdm_state_switch(struct pobreak ;case PWRDM_STATE_PREV : prev =pwrdm_read_prev_pwrst (pwrdm); -if (pwrdm->state != prev) +if (prev >=0 && pwrdm->state != prev) pwrdm->state_counter[prev]++;if (prev ==PWRDM_POWER_RET )_update_logic_membank_counters (pwrdm);
Greg Kroah-Hartman
maintainerPATCH 656/737 riscv: Move create_tmp_mapping() to init sections
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexandre Ghiti <[email protected]>
commit 9bdd924803787ceeb10f1ea399e91d75fb05d3a7 upstream.
This function is only used at boot time so mark it as __init.
--- arch/riscv/mm/kasan_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/mm/kasan_init.c +1 -1
@@ -438,7 +438,7 @@ static void __init kasan_shallow_populatkasan_shallow_populate_pgd (vaddr, vend); } -static void create_tmp_mapping (void ) +static void __init create_tmp_mapping (void ) {void *ptr;p4d_t *base_p4d;
Greg Kroah-Hartman
maintainerPATCH 657/737 riscv: Mark KASAN tmp* page tables variables as static
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexandre Ghiti <[email protected]>
commit dd7664d67b478afeb79a89e4586c2cd7707d17d6 upstream.
tmp_pg_dir, tmp_p4d and tmp_pud are only used in kasan_init.c so they should be declared as static.
--- arch/riscv/mm/kasan_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/riscv/mm/kasan_init.c +3 -3
@@ -22,9 +22,9 @@* region is not and then we have to go down to the PUD level. */ -pgd_t tmp_pg_dir[PTRS_PER_PGD] __page_aligned_bss; -p4d_t tmp_p4d[PTRS_PER_P4D] __page_aligned_bss; -pud_t tmp_pud[PTRS_PER_PUD] __page_aligned_bss; +static pgd_t tmp_pg_dir[PTRS_PER_PGD] __page_aligned_bss; +static p4d_t tmp_p4d[PTRS_PER_P4D] __page_aligned_bss; +static pud_t tmp_pud[PTRS_PER_PUD] __page_aligned_bss;static void __init kasan_populate_pte (pmd_t *pmd,unsigned long vaddr,unsigned long end) {
Greg Kroah-Hartman
maintainerPATCH 658/737 XArray: Do not return sibling entries from xa_load()
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Wilcox (Oracle) <[email protected]>
commit cbc02854331edc6dc22d8b77b6e22e38ebc7dd51 upstream.
It is possible for xa_load() to observe a sibling entry pointing to another sibling entry. An example:
Thread A: Thread B:
xa_store_range(xa, entry, 188, 191, gfp); xa_load(xa, 191); entry = xa_entry(xa, node, 63); [entry is a sibling of 188] xa_store_range(xa, entry, 184, 191, gfp);
if (xa_is_sibling(entry))
offset = xa_to_sibling(entry);
entry = xa_entry(xas->xa, node, offset);
[entry is now a sibling of 184]
It is sufficient to go around this loop until we hit a non-sibling entry. Sibling entries always point earlier in the node, so we are guaranteed to terminate this search.
--- lib/xarray.c | 2 - tools/testing/radix-tree/multiorder.c | 68 +++++++++++++++++++++++++++++++++- 2 files changed, 67 insertions(+), 3 deletions(-)
lib/xarray.c +1 -1
@@ -206,7 +206,7 @@ static void *xas_descend(struct xa_statevoid *entry =xa_entry (xas->xa, node, offset); xas->xa_node = node; -if (xa_is_sibling (entry)) { +while (xa_is_sibling (entry)) { offset =xa_to_sibling (entry); entry =xa_entry (xas->xa, node, offset);if (node->shift &&xa_is_node (entry))
tools/testing/radix-tree/multiorder.c +66 -2
97 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 659/737 io_uring: fix false positive KASAN warnings
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pavel Begunkov <[email protected]>
commit 569f5308e54352a12181cc0185f848024c5443e8 upstream.
io_req_local_work_add() peeks into the work list, which can be executed in the meanwhile. It's completely fine without KASAN as we're in an RCU read section and it's SLAB_TYPESAFE_BY_RCU. With KASAN though it may trigger a false positive warning because internal io_uring caches are sanitised.
Remove sanitisation from the io_uring request cache for now.
--- io_uring/io_uring.c | 1 - io_uring/io_uring.h | 1 - 2 files changed, 2 deletions(-)
io_uring/io_uring.c +0 -1
@@ -231,7 +231,6 @@ static inline void req_fail_link_node(ststatic inline void io_req_add_to_cache (struct io_kiocb *req,struct io_ring_ctx *ctx) {wq_stack_add_head (&req->comp_list, &ctx->submit_state.free_list); -kasan_poison_object_data (req_cachep, req); }static __cold void io_ring_ctx_ref_free (struct percpu_ref *ref)
io_uring/io_uring.h +0 -1
@@ -361,7 +361,6 @@ static inline struct io_kiocb *io_extracstruct io_kiocb *req; req = container_of(ctx->submit_state.free_list.next, struct io_kiocb, comp_list); -kasan_unpoison_object_data (req_cachep, req);wq_stack_extract (&ctx->submit_state.free_list);return req; }
Greg Kroah-Hartman
maintainerPATCH 660/737 io_uring: break iopolling on signal
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pavel Begunkov <[email protected]>
commit dc314886cb3d0e4ab2858003e8de2917f8a3ccbd upstream.
Don't keep spinning iopoll with a signal set. It'll eventually return back, e.g. by virtue of need_resched(), but it's not a nice user experience.
--- io_uring/io_uring.c | 3 +++ 1 file changed, 3 insertions(+)
io_uring/io_uring.c +3 -0
@@ -1689,6 +1689,9 @@ static int io_iopoll_check(struct io_rinbreak ; nr_events += ret; ret =0 ; + +if (task_sigpending (current)) +return -EINTR ; }while (nr_events < min && !need_resched ());return ret;
Greg Kroah-Hartman
maintainerPATCH 661/737 io_uring/sqpoll: fix io-wq affinity when IORING_SETUP_SQPOLL is used
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jens Axboe <[email protected]>
commit ebdfefc09c6de7897962769bd3e63a2ff443ebf5 upstream.
If we setup the ring with SQPOLL, then that polling thread has its own io-wq setup. This means that if the application uses IORING_REGISTER_IOWQ_AFF to set the io-wq affinity, we should not be setting it for the invoking task, but rather the sqpoll task.
Add an sqpoll helper that parks the thread and updates the affinity, and use that one if we're using SQPOLL.
--- io_uring/io-wq.c | 9 ++++++--- io_uring/io-wq.h | 2 +- io_uring/io_uring.c | 29 ++++++++++++++++++----------- io_uring/sqpoll.c | 15 +++++++++++++++ io_uring/sqpoll.h | 1 + 5 files changed, 41 insertions(+), 15 deletions(-)
io_uring/io-wq.c +6 -3
@@ -1285,13 +1285,16 @@ static int io_wq_cpu_offline(unsigned inreturn __io_wq_cpu_online (wq, cpu, false); } -int io_wq_cpu_affinity (struct io_wq *wq,cpumask_var_t mask) +int io_wq_cpu_affinity (struct io_uring_task *tctx,cpumask_var_t mask) { +if (!tctx || !tctx->io_wq) +return -EINVAL ; +rcu_read_lock ();if (mask) -cpumask_copy (wq->cpu_mask, mask); +cpumask_copy (tctx->io_wq->cpu_mask, mask);else -cpumask_copy (wq->cpu_mask, cpu_possible_mask); +cpumask_copy (tctx->io_wq->cpu_mask, cpu_possible_mask);rcu_read_unlock ();return 0 ;
io_uring/io-wq.h +1 -1
@@ -50,7 +50,7 @@ void io_wq_put_and_exit(struct io_wq *wqvoid io_wq_enqueue (struct io_wq *wq,struct io_wq_work *work);void io_wq_hash_work (struct io_wq_work *work,void *val); -int io_wq_cpu_affinity (struct io_wq *wq,cpumask_var_t mask); +int io_wq_cpu_affinity (struct io_uring_task *tctx,cpumask_var_t mask);int io_wq_max_workers (struct io_wq *wq,int *new_count);static inline bool io_wq_is_hashed (struct io_wq_work *work)
io_uring/io_uring.c +18 -11
@@ -4177,16 +4177,28 @@ static int io_register_enable_rings(strureturn 0 ; } +static __cold int __io_register_iowq_aff (struct io_ring_ctx *ctx, +cpumask_var_t new_mask) +{ +int ret; + +if (!(ctx->flags &IORING_SETUP_SQPOLL )) { + ret =io_wq_cpu_affinity (current->io_uring, new_mask); + }else { +mutex_unlock (&ctx->uring_lock); + ret =io_sqpoll_wq_cpu_affinity (ctx, new_mask); +mutex_lock (&ctx->uring_lock); + } + +return ret; +} +static __cold int io_register_iowq_aff (struct io_ring_ctx *ctx,void __user *arg,unsigned len) { -struct io_uring_task *tctx = current->io_uring;cpumask_var_t new_mask;int ret; -if (!tctx || !tctx->io_wq) -return -EINVAL ; -if (!alloc_cpumask_var (&new_mask,GFP_KERNEL ))return -ENOMEM ;
@@ -4207,19 +4219,14 @@ static __cold int io_register_iowq_aff(sreturn -EFAULT ; } - ret =io_wq_cpu_affinity (tctx->io_wq, new_mask); + ret =__io_register_iowq_aff (ctx, new_mask);free_cpumask_var (new_mask);return ret; }static __cold int io_unregister_iowq_aff (struct io_ring_ctx *ctx) { -struct io_uring_task *tctx = current->io_uring; - -if (!tctx || !tctx->io_wq) -return -EINVAL ; - -return io_wq_cpu_affinity (tctx->io_wq,NULL ); +return __io_register_iowq_aff (ctx,NULL ); } static __cold int io_register_iowq_max_workers(struct io_ring_ctx *ctx,
io_uring/sqpoll.c +15 -0
@@ -421,3 +421,18 @@ err:io_sq_thread_finish (ctx);return ret; } + +__cold int io_sqpoll_wq_cpu_affinity (struct io_ring_ctx *ctx, +cpumask_var_t mask) +{ +struct io_sq_data *sqd = ctx->sq_data; +int ret = -EINVAL ; + +if (sqd) { +io_sq_thread_park (sqd); + ret =io_wq_cpu_affinity (sqd->thread->io_uring, mask); +io_sq_thread_unpark (sqd); + } + +return ret; +}
io_uring/sqpoll.h +1 -0
@@ -27,3 +27,4 @@ void io_sq_thread_park(struct io_sq_datavoid io_sq_thread_unpark (struct io_sq_data *sqd);void io_put_sq_data (struct io_sq_data *sqd);void io_sqpoll_wait_sq (struct io_ring_ctx *ctx); +int io_sqpoll_wq_cpu_affinity (struct io_ring_ctx *ctx,cpumask_var_t mask);
Greg Kroah-Hartman
maintainerPATCH 662/737 io_uring: break out of iowq iopoll on teardown
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pavel Begunkov <[email protected]>
commit 45500dc4e01c167ee063f3dcc22f51ced5b2b1e9 upstream.
io-wq will retry iopoll even when it failed with -EAGAIN. If that races with task exit, which sets TIF_NOTIFY_SIGNAL for all its workers, such workers might potentially infinitely spin retrying iopoll again and again and each time failing on some allocation / waiting / etc. Don't keep spinning if io-wq is dying.
--- io_uring/io-wq.c | 10 ++++++++++ io_uring/io-wq.h | 1 + io_uring/io_uring.c | 2 ++ 3 files changed, 13 insertions(+)
io_uring/io-wq.c +10 -0
@@ -174,6 +174,16 @@ static void io_worker_ref_put(struct io_complete (&wq->worker_done); } +bool io_wq_worker_stopped (void ) +{ +struct io_worker *worker = current->worker_private; + +if (WARN_ON_ONCE (!io_wq_current_is_worker ())) +return true; + +return test_bit (IO_WQ_BIT_EXIT , &worker->wq->state); +} +static void io_worker_cancel_cb (struct io_worker *worker) {struct io_wq_acct *acct =io_wq_get_acct (worker);
io_uring/io-wq.h +1 -0
@@ -52,6 +52,7 @@ void io_wq_hash_work(struct io_wq_work *int io_wq_cpu_affinity (struct io_uring_task *tctx,cpumask_var_t mask);int io_wq_max_workers (struct io_wq *wq,int *new_count); +bool io_wq_worker_stopped (void );static inline bool io_wq_is_hashed (struct io_wq_work *work) {
io_uring/io_uring.c +2 -0
@@ -2050,6 +2050,8 @@ fail:if (!needs_poll) {if (!(req->ctx->flags &IORING_SETUP_IOPOLL ))break ; +if (io_wq_worker_stopped ()) +break ;cond_resched ();continue ; }
Greg Kroah-Hartman
maintainerPATCH 663/737 backlight/gpio_backlight: Compare against struct fb_info.device
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Zimmermann <[email protected]>
commit 7b91d017f77c1bda56f27c2f4bbb70de7c6eca08 upstream.
Struct gpio_backlight_platform_data refers to a platform device within the Linux device hierarchy. The test in gpio_backlight_check_fb() compares it against the fbdev device in struct fb_info.dev, which is different. Fix the test by comparing to struct fb_info.device.
Fixes a bug in the backlight driver and prepares fbdev for making struct fb_info.dev optional.
v2:
* move renames into separate patch (Javier, Sam, Michael)
--- drivers/video/backlight/gpio_backlight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/backlight/gpio_backlight.c +1 -1
@@ -35,7 +35,7 @@ static int gpio_backlight_check_fb(struc {struct gpio_backlight *gbl =bl_get_data (bl); -return gbl->fbdev ==NULL || gbl->fbdev == info->dev; +return gbl->fbdev ==NULL || gbl->fbdev == info->device; }static const struct backlight_ops gpio_backlight_ops = {
Greg Kroah-Hartman
maintainerPATCH 664/737 backlight/bd6107: Compare against struct fb_info.device
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Zimmermann <[email protected]>
commit 992bdddaabfba19bdc77c1c7a4977b2aa41ec891 upstream.
Struct bd6107_platform_data refers to a platform device within the Linux device hierarchy. The test in bd6107_backlight_check_fb() compares it against the fbdev device in struct fb_info.dev, which is different. Fix the test by comparing to struct fb_info.device.
Fixes a bug in the backlight driver and prepares fbdev for making struct fb_info.dev optional.
v2:
* move renames into separate patch (Javier, Sam, Michael)
--- drivers/video/backlight/bd6107.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/backlight/bd6107.c +1 -1
@@ -104,7 +104,7 @@ static int bd6107_backlight_check_fb(str {struct bd6107 *bd =bl_get_data (backlight); -return bd->pdata->fbdev ==NULL || bd->pdata->fbdev == info->dev; +return bd->pdata->fbdev ==NULL || bd->pdata->fbdev == info->device; }static const struct backlight_ops bd6107_backlight_ops = {
Greg Kroah-Hartman
maintainerPATCH 665/737 backlight/lv5207lp: Compare against struct fb_info.device
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Zimmermann <[email protected]>
commit 1ca8819320fd84e7d95b04e7668efc5f9fe9fa5c upstream.
Struct lv5207lp_platform_data refers to a platform device within the Linux device hierarchy. The test in lv5207lp_backlight_check_fb() compares it against the fbdev device in struct fb_info.dev, which is different. Fix the test by comparing to struct fb_info.device.
Fixes a bug in the backlight driver and prepares fbdev for making struct fb_info.dev optional.
v2:
* move renames into separate patch (Javier, Sam, Michael)
--- drivers/video/backlight/lv5207lp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/backlight/lv5207lp.c +1 -1
@@ -67,7 +67,7 @@ static int lv5207lp_backlight_check_fb(s {struct lv5207lp *lv =bl_get_data (backlight); -return lv->pdata->fbdev ==NULL || lv->pdata->fbdev == info->dev; +return lv->pdata->fbdev ==NULL || lv->pdata->fbdev == info->device; }static const struct backlight_ops lv5207lp_backlight_ops = {
Greg Kroah-Hartman
maintainerPATCH 666/737 drm/amd/display: register edp_backlight_control() for DCN301
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hamza Mahfooz <[email protected]>
commit 1611917f39bee1abfc01501238db8ac19649042d upstream.
As made mention of in commit 099303e9a9bd ("drm/amd/display: eDP intermittent black screen during PnP"), we need to turn off the display's backlight before powering off an eDP display. Not doing so will result in undefined behaviour according to the eDP spec. So, set DCN301's edp_backlight_control() function pointer to dce110_edp_backlight_control().
--- drivers/gpu/drm/amd/display/dc/dcn301/dcn301_init.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/dcn301/dcn301_init.c +1 -0
@@ -75,6 +75,7 @@ static const struct hw_sequencer_funcs d .get_hw_state = dcn10_get_hw_state, .clear_status_bits = dcn10_clear_status_bits, .wait_for_mpcc_disconnect = dcn10_wait_for_mpcc_disconnect, + .edp_backlight_control = dce110_edp_backlight_control, .edp_power_control = dce110_edp_power_control, .edp_wait_for_hpd_ready = dce110_edp_wait_for_hpd_ready, .set_cursor_position = dcn10_set_cursor_position,
Greg Kroah-Hartman
maintainerPATCH 667/737 xtensa: PMU: fix base address for the newer hardware
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Max Filippov <[email protected]>
commit 687eb3c42f4ad81e7c947c50e2d865f692064291 upstream.
With introduction of ERI access control in RG.0 base address of the PMU unit registers has changed. Add support for the new PMU configuration.
--- arch/xtensa/include/asm/core.h | 9 +++++++++ arch/xtensa/kernel/perf_event.c | 17 +++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-)
arch/xtensa/include/asm/core.h +9 -0
@@ -44,4 +44,13 @@#define XTENSA_STACK_ALIGNMENT 16#endif +#ifndef XCHAL_HW_MIN_VERSION +#if defined(XCHAL_HW_MIN_VERSION_MAJOR ) && defined(XCHAL_HW_MIN_VERSION_MINOR ) +#define XCHAL_HW_MIN_VERSION (XCHAL_HW_MIN_VERSION_MAJOR * 100 + \ + XCHAL_HW_MIN_VERSION_MINOR) +#else +#define XCHAL_HW_MIN_VERSION 0 +#endif +#endif +#endif
arch/xtensa/kernel/perf_event.c +13 -4
@@ -13,17 +13,26 @@#include <linux/perf_event.h> #include <linux/platform_device.h> +#include <asm/core.h> #include <asm/processor.h> #include <asm/stacktrace.h> +#define XTENSA_HWVERSION_RG_2015_0 260000 + +#if XCHAL_HW_MIN_VERSION >=XTENSA_HWVERSION_RG_2015_0 +#define XTENSA_PMU_ERI_BASE 0x00101000 +#else +#define XTENSA_PMU_ERI_BASE 0x00001000 +#endif +/* Global control/status for all perf counters */ -#define XTENSA_PMU_PMG 0x1000 +#define XTENSA_PMU_PMG XTENSA_PMU_ERI_BASE/* Perf counter values */ -#define XTENSA_PMU_PM (i) (0x1080 + (i) * 4) +#define XTENSA_PMU_PM (i) (XTENSA_PMU_ERI_BASE + 0x80 + (i) * 4)/* Perf counter control registers */ -#define XTENSA_PMU_PMCTRL (i) (0x1100 + (i) * 4) +#define XTENSA_PMU_PMCTRL (i) (XTENSA_PMU_ERI_BASE + 0x100 + (i) * 4)/* Perf counter status registers */ -#define XTENSA_PMU_PMSTAT (i) (0x1180 + (i) * 4) +#define XTENSA_PMU_PMSTAT (i) (XTENSA_PMU_ERI_BASE + 0x180 + (i) * 4)#define XTENSA_PMU_PMG_PMEN 0x1
Greg Kroah-Hartman
maintainerPATCH 668/737 LoongArch: mm: Add p?d_leaf() definitions
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hongchen Zhang <[email protected]>
commit 303be4b33562a5b689261ced1616bf16ad49efa7 upstream.
When I do LTP test, LTP test case ksm06 caused panic at
break_ksm_pmd_entry -> pmd_leaf (Huge page table but False) -> pte_present (panic)
The reason is pmd_leaf() is not defined, So like commit 501b81046701 ("mips: mm: add p?d_leaf() definitions") add p?d_leaf() definition for LoongArch.
--- arch/loongarch/include/asm/pgtable.h | 3 +++ 1 file changed, 3 insertions(+)
arch/loongarch/include/asm/pgtable.h +3 -0
@@ -593,6 +593,9 @@ static inline long pmd_protnone(pmd_t pm }#endif /* CONFIG_NUMA_BALANCING */ +#define pmd_leaf (pmd) ((pmd_val(pmd) & _PAGE_HUGE) != 0) +#define pud_leaf (pud) ((pud_val(pud) & _PAGE_HUGE) != 0) +/* * We provide our own get_unmapped area to cope with the virtual aliasing * constraints placed on us by the cache architecture.
Greg Kroah-Hartman
maintainerPATCH 669/737 powerpc/ftrace: Fix dropping weak symbols with older toolchains
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Naveen N Rao <[email protected]>
commit f6834c8c59a8e977a6f6e4f96c5d28dfa5db8430 upstream.
The minimum level of gcc supported for building the kernel is v5.1. v5.x releases of gcc emitted a three instruction sequence for -mprofile-kernel:
mflr r0 std r0, 16(r1) bl _mcount
It is only with the v6.x releases that gcc started emitting the two instruction sequence for -mprofile-kernel, omitting the second store instruction.
With the older three instruction sequence, the actual ftrace location can be the 5th instruction into a function. Update the allowed offset for ftrace location from 12 to 16 to accommodate the same.
--- arch/powerpc/include/asm/ftrace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/include/asm/ftrace.h +1 -1
@@ -12,7 +12,7 @@/* Ignore unused weak functions which will have larger offsets */ #ifdef CONFIG_MPROFILE_KERNEL -#define FTRACE_MCOUNT_MAX_OFFSET 12 +#define FTRACE_MCOUNT_MAX_OFFSET 16#elif defined(CONFIG_PPC32 )#define FTRACE_MCOUNT_MAX_OFFSET 8#endif
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 670/737 i3c: master: svc: fix probe failure when no i3c device exist
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Frank Li <[email protected]>
commit 6e13d6528be2f7e801af63c8153b87293f25d736 upstream.
I3C masters are expected to support hot-join. This means at initialization time we might not yet discover any device and this should not be treated as a fatal error.
During the DAA procedure which happens at probe time, if no device has joined, all CCC will be NACKed (from a bus perspective). This leads to an early return with an error code which fails the probe of the master.
Let's avoid this by just telling the core through an I3C_ERROR_M2 return command code that no device was discovered, which is a valid situation. This way the master will no longer bail out and fail to probe for a wrong reason.
--- drivers/i3c/master/svc-i3c-master.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/i3c/master/svc-i3c-master.c +12 -2
@@ -782,6 +782,10 @@ static int svc_i3c_master_do_daa_locked(*/ break ; }else if (SVC_I3C_MSTATUS_NACKED (reg)) { +/* No I3C devices attached */ +if (dev_nb ==0 ) +break ; +/* * A slave device nacked the address, this is * allowed only once, DAA will be stopped and
@@ -1251,11 +1255,17 @@ static int svc_i3c_master_send_ccc_cmd(s {struct svc_i3c_master *master =to_svc_i3c_master (m);bool broadcast = cmd->id <0x80 ; +int ret;if (broadcast) -return svc_i3c_master_send_bdcast_ccc_cmd (master, cmd); + ret =svc_i3c_master_send_bdcast_ccc_cmd (master, cmd);else -return svc_i3c_master_send_direct_ccc_cmd (master, cmd); + ret =svc_i3c_master_send_direct_ccc_cmd (master, cmd); + +if (ret) + cmd->err =I3C_ERROR_M2 ; + +return ret; } static int svc_i3c_master_priv_xfers(struct i3c_dev_desc *dev,
Greg Kroah-Hartman
maintainerPATCH 671/737 io_uring: Dont set affinity on a dying sqpoll thread
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gabriel Krisman Bertazi <[email protected]>
commit bd6fc5da4c51107e1e0cec4a3a07963d1dae2c84 upstream.
Syzbot reported a null-ptr-deref of sqd->thread inside io_sqpoll_wq_cpu_affinity. It turns out the sqd->thread can go away from under us during io_uring_register, in case the process gets a fatal signal during io_uring_register.
It is not particularly hard to hit the race, and while I am not sure this is the exact case hit by syzbot, it solves it. Finally, checking ->thread is enough to close the race because we locked sqd while "parking" the thread, thus preventing it from going away.
I reproduced it fairly consistently with a program that does:
int main(void) {
...
io_uring_queue_init(RING_LEN, &ring1, IORING_SETUP_SQPOLL);
while (1) {
io_uring_register_iowq_aff(ring, 1, &mask); }
}
Executed in a loop with timeout to trigger SIGTERM:
while true; do timeout 1 /a.out ; done
This will hit the following BUG() in very few attempts.
BUG: kernel NULL pointer dereference, address: 00000000000007a8 PGD 800000010e949067 P4D 800000010e949067 PUD 10e46e067 PMD 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 0 PID: 15715 Comm: dead-sqpoll Not tainted 6.5.0-rc7-next-20230825-g193296236fa0-dirty #23 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:io_sqpoll_wq_cpu_affinity+0x27/0x70 Code: 90 90 90 0f 1f 44 00 00 55 53 48 8b 9f 98 03 00 00 48 85 db 74 4f 48 89 df 48 89 f5 e8 e2 f8 ff ff 48 8b 43 38 48 85 c0 74 22 <48> 8b b8 a8 07 00 00 48 89 ee e8 ba b1 00 00 48 89 df 89 c5 e8 70 RSP: 0018:ffffb04040ea7e70 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff93c010749e40 RCX: 0000000000000001 RDX: 0000000000000000 RSI: ffffffffa7653331 RDI: 00000000ffffffff RBP: ffffb04040ea7eb8 R08: 0000000000000000 R09: c0000000ffffdfff R10: ffff93c01141b600 R11: ffffb04040ea7d18 R12: ffff93c00ea74840 R13: 0000000000000011 R14: 0000000000000000 R15: ffff93c00ea74800 FS: 00007fb7c276ab80(0000) GS:ffff93c36f200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000007a8 CR3: 0000000111634003 CR4: 0000000000370ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ? __die_body+0x1a/0x60 ? page_fault_oops+0x154/0x440 ? do_user_addr_fault+0x174/0x7b0 ? exc_page_fault+0x63/0x140 ? asm_exc_page_fault+0x22/0x30 ? io_sqpoll_wq_cpu_affinity+0x27/0x70 __io_register_iowq_aff+0x2b/0x60 __io_uring_register+0x614/0xa70 __x64_sys_io_uring_register+0xaa/0x1a0 do_syscall_64+0x3a/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 RIP: 0033:0x7fb7c226fec9 Code: 2e 00 b8 ca 00 00 00 0f 05 eb a5 66 0f 1f 44 00 00 48 89 f8 48 89
f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 97 7f 2d 00 f7 d8 64 89 01 48
RSP: 002b:00007ffe2c0674f8 EFLAGS: 00000246 ORIG_RAX: 00000000000001ab
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fb7c226fec9
RDX: 00007ffe2c067530 RSI: 0000000000000011 RDI: 0000000000000003
RBP: 00007ffe2c0675d0 R08: 00007ffe2c067550 R09: 00007ffe2c067550
R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe2c067750 R14: 0000000000000000 R15: 0000000000000000
</TASK> Modules linked in: CR2: 00000000000007a8 ---[ end trace 0000000000000000 ]---
--- io_uring/sqpoll.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
io_uring/sqpoll.c +3 -1
@@ -430,7 +430,9 @@ __cold int io_sqpoll_wq_cpu_affinity(strif (sqd) {io_sq_thread_park (sqd); - ret =io_wq_cpu_affinity (sqd->thread->io_uring, mask); +/* Don't set affinity for a dying thread */ +if (sqd->thread) + ret =io_wq_cpu_affinity (sqd->thread->io_uring, mask);io_sq_thread_unpark (sqd); }
Greg Kroah-Hartman
maintainerPATCH 672/737 arm64: csum: Fix OoB access in IP checksum code for negative lengths
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Will Deacon <[email protected]>
commit 8bd795fedb8450ecbef18eeadbd23ed8fc7630f5 upstream.
Although commit c2c24edb1d9c ("arm64: csum: Fix pathological zero-length calls") added an early return for zero-length input, syzkaller has popped up with an example of a _negative_ length which causes an undefined shift and an out-of-bounds read:
| BUG: KASAN: slab-out-of-bounds in do_csum+0x44/0x254 arch/arm64/lib/csum.c:39 | Read of size 4294966928 at addr ffff0000d7ac0170 by task syz-executor412/5975 | | CPU: 0 PID: 5975 Comm: syz-executor412 Not tainted 6.4.0-rc4-syzkaller-g908f31f2a05b #0 | Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 | Call trace: | dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 | show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 | __dump_stack lib/dump_stack.c:88 [inline] | dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 | print_address_description mm/kasan/report.c:351 [inline] | print_report+0x174/0x514 mm/kasan/report.c:462 | kasan_report+0xd4/0x130 mm/kasan/report.c:572 | kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:187 | __kasan_check_read+0x20/0x30 mm/kasan/shadow.c:31 | do_csum+0x44/0x254 arch/arm64/lib/csum.c:39 | csum_partial+0x30/0x58 lib/checksum.c:128 | gso_make_checksum include/linux/skbuff.h:4928 [inline] | __udp_gso_segment+0xaf4/0x1bc4 net/ipv4/udp_offload.c:332 | udp6_ufo_fragment+0x540/0xca0 net/ipv6/udp_offload.c:47 | ipv6_gso_segment+0x5cc/0x1760 net/ipv6/ip6_offload.c:119 | skb_mac_gso_segment+0x2b4/0x5b0 net/core/gro.c:141 | __skb_gso_segment+0x250/0x3d0 net/core/dev.c:3401 | skb_gso_segment include/linux/netdevice.h:4859 [inline] | validate_xmit_skb+0x364/0xdbc net/core/dev.c:3659 | validate_xmit_skb_list+0x94/0x130 net/core/dev.c:3709 | sch_direct_xmit+0xe8/0x548 net/sched/sch_generic.c:327 | __dev_xmit_skb net/core/dev.c:3805 [inline] | __dev_queue_xmit+0x147c/0x3318 net/core/dev.c:4210 | dev_queue_xmit include/linux/netdevice.h:3085 [inline] | packet_xmit+0x6c/0x318 net/packet/af_packet.c:276 | packet_snd net/packet/af_packet.c:3081 [inline] | packet_sendmsg+0x376c/0x4c98 net/packet/af_packet.c:3113 | sock_sendmsg_nosec net/socket.c:724 [inline] | sock_sendmsg net/socket.c:747 [inline] | __sys_sendto+0x3b4/0x538 net/socket.c:2144
Extend the early return to reject negative lengths as well, aligning our implementation with the generic code in lib/checksum.c
--- arch/arm64/lib/csum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/lib/csum.c +1 -1
@@ -24,7 +24,7 @@ unsigned int __no_sanitize_address do_csconst u64 *ptr;u64 data, sum64 =0 ; -if (unlikely (len ==0 )) +if (unlikely (len <=0 ))return 0 ; offset = (unsigned long )buff &7 ;
Greg Kroah-Hartman
maintainerPATCH 673/737 ALSA: hda/cirrus: Fix broken audio on hardware with two CS42L42 codecs.
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vitaly Rodionov <[email protected]>
commit 99bf5b0baac941176a6a3d5cef7705b29808de34 upstream.
Recently in v6.3-rc1 there was a change affecting behaviour of hrtimers (commit 0c52310f260014d95c1310364379772cb74cf82d) and causing few issues on platforms with two CS42L42 codecs. Canonical/Dell has reported an issue with Vostro-3910.
We need to increase this value by 15ms.
--- sound/pci/hda/patch_cs8409.c | 2 +- sound/pci/hda/patch_cs8409.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
sound/pci/hda/patch_cs8409.c +1 -1
@@ -888,7 +888,7 @@ static void cs42l42_resume(struct sub_co/* Initialize CS42L42 companion codec */ cs8409_i2c_bulk_write (cs42l42, cs42l42->init_seq, cs42l42->init_seq_num); -usleep_range (30000 ,35000 ); +msleep (CS42L42_INIT_TIMEOUT_MS );/* Clear interrupts, by reading interrupt status registers */ cs8409_i2c_bulk_read (cs42l42, irq_regs,ARRAY_SIZE (irq_regs));
sound/pci/hda/patch_cs8409.h +1 -0
@@ -229,6 +229,7 @@ enum cs8409_coefficient_index_registers#define CS42L42_I2C_SLEEP_US (2000)#define CS42L42_PDN_TIMEOUT_US (250000)#define CS42L42_PDN_SLEEP_US (2000) +#define CS42L42_INIT_TIMEOUT_MS (45)#define CS42L42_FULL_SCALE_VOL_MASK (2)#define CS42L42_FULL_SCALE_VOL_0DB (1)#define CS42L42_FULL_SCALE_VOL_MINUS6DB (0)
Greg Kroah-Hartman
maintainerPATCH 674/737 media: dvb: symbol fixup for dvb_attach()
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Greg Kroah-Hartman <[email protected]>
commit 86495af1171e1feec79faa9b64c05c89f46e41d1 upstream.
In commit 9011e49d54dc ("modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules") the use of symbol_get is properly restricted to GPL-only marked symbols. This interacts oddly with the DVB logic which only uses dvb_attach() to load the dvb driver which then uses symbol_get().
Fix this up by properly marking all of the dvb_attach attach symbols as EXPORT_SYMBOL_GPL().
--- drivers/media/dvb-frontends/ascot2e.c | 2 +- drivers/media/dvb-frontends/atbm8830.c | 2 +- drivers/media/dvb-frontends/au8522_dig.c | 2 +- drivers/media/dvb-frontends/bcm3510.c | 2 +- drivers/media/dvb-frontends/cx22700.c | 2 +- drivers/media/dvb-frontends/cx22702.c | 2 +- drivers/media/dvb-frontends/cx24110.c | 2 +- drivers/media/dvb-frontends/cx24113.c | 2 +- drivers/media/dvb-frontends/cx24116.c | 2 +- drivers/media/dvb-frontends/cx24120.c | 2 +- drivers/media/dvb-frontends/cx24123.c | 2 +- drivers/media/dvb-frontends/cxd2820r_core.c | 2 +- drivers/media/dvb-frontends/cxd2841er.c | 4 ++-- drivers/media/dvb-frontends/cxd2880/cxd2880_top.c | 2 +- drivers/media/dvb-frontends/dib0070.c | 2 +- drivers/media/dvb-frontends/dib0090.c | 4 ++-- drivers/media/dvb-frontends/dib3000mb.c | 2 +- drivers/media/dvb-frontends/dib3000mc.c | 2 +- drivers/media/dvb-frontends/dib7000m.c | 2 +- drivers/media/dvb-frontends/dib7000p.c | 2 +- drivers/media/dvb-frontends/dib8000.c | 2 +- drivers/media/dvb-frontends/dib9000.c | 2 +- drivers/media/dvb-frontends/drx39xyj/drxj.c | 2 +- drivers/media/dvb-frontends/drxd_hard.c | 2 +- drivers/media/dvb-frontends/drxk_hard.c | 2 +- drivers/media/dvb-frontends/ds3000.c | 2 +- drivers/media/dvb-frontends/dvb-pll.c | 2 +- drivers/media/dvb-frontends/ec100.c | 2 +- drivers/media/dvb-frontends/helene.c | 4 ++-- drivers/media/dvb-frontends/horus3a.c | 2 +- drivers/media/dvb-frontends/isl6405.c | 2 +- drivers/media/dvb-frontends/isl6421.c | 2 +- drivers/media/dvb-frontends/isl6423.c | 2 +- drivers/media/dvb-frontends/itd1000.c | 2 +- drivers/media/dvb-frontends/ix2505v.c | 2 +- drivers/media/dvb-frontends/l64781.c | 2 +- drivers/media/dvb-frontends/lg2160.c | 2 +- drivers/media/dvb-frontends/lgdt3305.c | 2 +- drivers/media/dvb-frontends/lgdt3306a.c | 2 +- drivers/media/dvb-frontends/lgdt330x.c | 2 +- drivers/media/dvb-frontends/lgs8gxx.c | 2 +- drivers/media/dvb-frontends/lnbh25.c | 2 +- drivers/media/dvb-frontends/lnbp21.c | 4 ++-- drivers/media/dvb-frontends/lnbp22.c | 2 +- drivers/media/dvb-frontends/m88ds3103.c | 2 +- drivers/media/dvb-frontends/m88rs2000.c | 2 +- drivers/media/dvb-frontends/mb86a16.c | 2 +- drivers/media/dvb-frontends/mb86a20s.c | 2 +- drivers/media/dvb-frontends/mt312.c | 2 +- drivers/media/dvb-frontends/mt352.c | 2 +- drivers/media/dvb-frontends/nxt200x.c | 2 +- drivers/media/dvb-frontends/nxt6000.c | 2 +- drivers/media/dvb-frontends/or51132.c | 2 +- drivers/media/dvb-frontends/or51211.c | 2 +- drivers/media/dvb-frontends/s5h1409.c | 2 +- drivers/media/dvb-frontends/s5h1411.c | 2 +- drivers/media/dvb-frontends/s5h1420.c | 2 +- drivers/media/dvb-frontends/s5h1432.c | 2 +- drivers/media/dvb-frontends/s921.c | 2 +- drivers/media/dvb-frontends/si21xx.c | 2 +- drivers/media/dvb-frontends/sp887x.c | 2 +- drivers/media/dvb-frontends/stb0899_drv.c | 2 +- drivers/media/dvb-frontends/stb6000.c | 2 +- drivers/media/dvb-frontends/stb6100.c | 2 +- drivers/media/dvb-frontends/stv0288.c | 2 +- drivers/media/dvb-frontends/stv0297.c | 2 +- drivers/media/dvb-frontends/stv0299.c | 2 +- drivers/media/dvb-frontends/stv0367.c | 6 +++--- drivers/media/dvb-frontends/stv0900_core.c | 2 +- drivers/media/dvb-frontends/stv090x.c | 2 +- drivers/media/dvb-frontends/stv6110.c | 2 +- drivers/media/dvb-frontends/stv6110x.c | 2 +- drivers/media/dvb-frontends/tda10021.c | 2 +- drivers/media/dvb-frontends/tda10023.c | 2 +- drivers/media/dvb-frontends/tda10048.c | 2 +- drivers/media/dvb-frontends/tda1004x.c | 4 ++-- drivers/media/dvb-frontends/tda10086.c | 2 +- drivers/media/dvb-frontends/tda665x.c | 2 +- drivers/media/dvb-frontends/tda8083.c | 2 +- drivers/media/dvb-frontends/tda8261.c | 2 +- drivers/media/dvb-frontends/tda826x.c | 2 +- drivers/media/dvb-frontends/ts2020.c | 2 +- drivers/media/dvb-frontends/tua6100.c | 2 +- drivers/media/dvb-frontends/ves1820.c | 2 +- drivers/media/dvb-frontends/ves1x93.c | 2 +- drivers/media/dvb-frontends/zl10036.c | 2 +- drivers/media/dvb-frontends/zl10039.c | 2 +- drivers/media/dvb-frontends/zl10353.c | 2 +- drivers/media/pci/bt8xx/dst.c | 2 +- drivers/media/pci/bt8xx/dst_ca.c | 2 +- drivers/media/pci/ddbridge/ddbridge-dummy-fe.c | 2 +- drivers/media/tuners/fc0011.c | 2 +- drivers/media/tuners/fc0012.c | 2 +- drivers/media/tuners/fc0013.c | 2 +- drivers/media/tuners/max2165.c | 2 +- drivers/media/tuners/mc44s803.c | 2 +- drivers/media/tuners/mt2060.c | 2 +- drivers/media/tuners/mt2131.c | 2 +- drivers/media/tuners/mt2266.c | 2 +- drivers/media/tuners/mxl5005s.c | 2 +- drivers/media/tuners/qt1010.c | 2 +- drivers/media/tuners/tda18218.c | 2 +- drivers/media/tuners/xc2028.c | 2 +- drivers/media/tuners/xc4000.c | 2 +- drivers/media/tuners/xc5000.c | 2 +- drivers/staging/media/av7110/sp8870.c | 2 +- 106 files changed, 113 insertions(+), 113 deletions(-)
drivers/media/dvb-frontends/ascot2e.c +1 -1
@@ -533,7 +533,7 @@ struct dvb_frontend *ascot2e_attach(stru priv->i2c_address, priv->i2c);return fe; } -EXPORT_SYMBOL (ascot2e_attach); +EXPORT_SYMBOL_GPL (ascot2e_attach);MODULE_DESCRIPTION ("Sony ASCOT2E terr/cab tuner driver" );MODULE_AUTHOR ("[email protected]" );
drivers/media/dvb-frontends/atbm8830.c +1 -1
@@ -489,7 +489,7 @@ error_out:return NULL ; } -EXPORT_SYMBOL (atbm8830_attach); +EXPORT_SYMBOL_GPL (atbm8830_attach);MODULE_DESCRIPTION ("AltoBeam ATBM8830/8831 GB20600 demodulator driver" );MODULE_AUTHOR ("David T. L. Wong <[email protected]>" );
drivers/media/dvb-frontends/au8522_dig.c +1 -1
@@ -879,7 +879,7 @@ error:au8522_release_state (state);return NULL ; } -EXPORT_SYMBOL (au8522_attach); +EXPORT_SYMBOL_GPL (au8522_attach);static const struct dvb_frontend_ops au8522_ops = { .delsys = {SYS_ATSC ,SYS_DVBC_ANNEX_B },
drivers/media/dvb-frontends/bcm3510.c +1 -1
@@ -835,7 +835,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (bcm3510_attach); +EXPORT_SYMBOL_GPL (bcm3510_attach);static const struct dvb_frontend_ops bcm3510_ops = { .delsys = {SYS_ATSC ,SYS_DVBC_ANNEX_B },
drivers/media/dvb-frontends/cx22700.c +1 -1
@@ -432,4 +432,4 @@ MODULE_DESCRIPTION("Conexant CX22700 DVBMODULE_AUTHOR ("Holger Waechtler" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (cx22700_attach); +EXPORT_SYMBOL_GPL (cx22700_attach);
drivers/media/dvb-frontends/cx22702.c +1 -1
@@ -604,7 +604,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (cx22702_attach); +EXPORT_SYMBOL_GPL (cx22702_attach);static const struct dvb_frontend_ops cx22702_ops = { .delsys = {SYS_DVBT },
drivers/media/dvb-frontends/cx24110.c +1 -1
@@ -653,4 +653,4 @@ MODULE_DESCRIPTION("Conexant CX24110 DVBMODULE_AUTHOR ("Peter Hettkamp" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (cx24110_attach); +EXPORT_SYMBOL_GPL (cx24110_attach);
drivers/media/dvb-frontends/cx24113.c +1 -1
@@ -590,7 +590,7 @@ error:return NULL ; } -EXPORT_SYMBOL (cx24113_attach); +EXPORT_SYMBOL_GPL (cx24113_attach);module_param (debug, int,0644 );MODULE_PARM_DESC (debug,"Activates frontend debugging (default:0)" );
drivers/media/dvb-frontends/cx24116.c +1 -1
@@ -1133,7 +1133,7 @@ struct dvb_frontend *cx24116_attach(cons state->frontend.demodulator_priv = state;return &state->frontend; } -EXPORT_SYMBOL (cx24116_attach); +EXPORT_SYMBOL_GPL (cx24116_attach);/* * Initialise or wake up device
drivers/media/dvb-frontends/cx24120.c +1 -1
@@ -305,7 +305,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (cx24120_attach); +EXPORT_SYMBOL_GPL (cx24120_attach);static int cx24120_test_rom (struct cx24120_state *state) {
drivers/media/dvb-frontends/cx24123.c +1 -1
@@ -1096,7 +1096,7 @@ error:return NULL ; } -EXPORT_SYMBOL (cx24123_attach); +EXPORT_SYMBOL_GPL (cx24123_attach);static const struct dvb_frontend_ops cx24123_ops = { .delsys = {SYS_DVBS },
drivers/media/dvb-frontends/cxd2820r_core.c +1 -1
@@ -536,7 +536,7 @@ struct dvb_frontend *cxd2820r_attach(conreturn pdata.get_dvb_frontend (client); } -EXPORT_SYMBOL (cxd2820r_attach); +EXPORT_SYMBOL_GPL (cxd2820r_attach);static struct dvb_frontend *cxd2820r_get_dvb_frontend (struct i2c_client *client) {
drivers/media/dvb-frontends/cxd2841er.c +2 -2
@@ -3930,14 +3930,14 @@ struct dvb_frontend *cxd2841er_attach_s( {return cxd2841er_attach (cfg, i2c,SYS_DVBS ); } -EXPORT_SYMBOL (cxd2841er_attach_s); +EXPORT_SYMBOL_GPL (cxd2841er_attach_s);struct dvb_frontend *cxd2841er_attach_t_c (struct cxd2841er_config *cfg,struct i2c_adapter *i2c) {return cxd2841er_attach (cfg, i2c,0 ); } -EXPORT_SYMBOL (cxd2841er_attach_t_c); +EXPORT_SYMBOL_GPL (cxd2841er_attach_t_c);static const struct dvb_frontend_ops cxd2841er_dvbs_s2_ops = { .delsys = {SYS_DVBS ,SYS_DVBS2 },
drivers/media/dvb-frontends/cxd2880/cxd2880_top.c +1 -1
@@ -1950,7 +1950,7 @@ struct dvb_frontend *cxd2880_attach(strureturn fe; } -EXPORT_SYMBOL (cxd2880_attach); +EXPORT_SYMBOL_GPL (cxd2880_attach);MODULE_DESCRIPTION ("Sony CXD2880 DVB-T2/T tuner + demod driver" );MODULE_AUTHOR ("Sony Semiconductor Solutions Corporation" );
drivers/media/dvb-frontends/dib0070.c +1 -1
@@ -762,7 +762,7 @@ free_mem: fe->tuner_priv =NULL ;return NULL ; } -EXPORT_SYMBOL (dib0070_attach); +EXPORT_SYMBOL_GPL (dib0070_attach);MODULE_AUTHOR ("Patrick Boettcher <[email protected]>" );MODULE_DESCRIPTION ("Driver for the DiBcom 0070 base-band RF Tuner" );
drivers/media/dvb-frontends/dib0090.c +2 -2
@@ -2634,7 +2634,7 @@ struct dvb_frontend *dib0090_register(streturn NULL ; } -EXPORT_SYMBOL (dib0090_register); +EXPORT_SYMBOL_GPL (dib0090_register);struct dvb_frontend *dib0090_fw_register (struct dvb_frontend *fe,struct i2c_adapter *i2c,const struct dib0090_config *config) {
@@ -2660,7 +2660,7 @@ free_mem: fe->tuner_priv =NULL ;return NULL ; } -EXPORT_SYMBOL (dib0090_fw_register); +EXPORT_SYMBOL_GPL (dib0090_fw_register);MODULE_AUTHOR ("Patrick Boettcher <[email protected]>" );MODULE_AUTHOR ("Olivier Grenie <[email protected]>" );
drivers/media/dvb-frontends/dib3000mb.c +1 -1
@@ -815,4 +815,4 @@ MODULE_AUTHOR(DRIVER_AUTHOR);MODULE_DESCRIPTION (DRIVER_DESC );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (dib3000mb_attach); +EXPORT_SYMBOL_GPL (dib3000mb_attach);
drivers/media/dvb-frontends/dib3000mc.c +1 -1
@@ -935,7 +935,7 @@ error:kfree (st);return NULL ; } -EXPORT_SYMBOL (dib3000mc_attach); +EXPORT_SYMBOL_GPL (dib3000mc_attach);static const struct dvb_frontend_ops dib3000mc_ops = { .delsys = {SYS_DVBT },
drivers/media/dvb-frontends/dib7000m.c +1 -1
@@ -1434,7 +1434,7 @@ error:kfree (st);return NULL ; } -EXPORT_SYMBOL (dib7000m_attach); +EXPORT_SYMBOL_GPL (dib7000m_attach);static const struct dvb_frontend_ops dib7000m_ops = { .delsys = {SYS_DVBT },
drivers/media/dvb-frontends/dib7000p.c +1 -1
@@ -2822,7 +2822,7 @@ void *dib7000p_attach(struct dib7000p_opreturn ops; } -EXPORT_SYMBOL (dib7000p_attach); +EXPORT_SYMBOL_GPL (dib7000p_attach);static const struct dvb_frontend_ops dib7000p_ops = { .delsys = {SYS_DVBT },
drivers/media/dvb-frontends/dib8000.c +1 -1
@@ -4527,7 +4527,7 @@ void *dib8000_attach(struct dib8000_opsreturn ops; } -EXPORT_SYMBOL (dib8000_attach); +EXPORT_SYMBOL_GPL (dib8000_attach);MODULE_AUTHOR ("Olivier Grenie <[email protected], Patrick Boettcher <[email protected]>" );MODULE_DESCRIPTION ("Driver for the DiBcom 8000 ISDB-T demodulator" );
drivers/media/dvb-frontends/dib9000.c +1 -1
@@ -2546,7 +2546,7 @@ error:kfree (st);return NULL ; } -EXPORT_SYMBOL (dib9000_attach); +EXPORT_SYMBOL_GPL (dib9000_attach);static const struct dvb_frontend_ops dib9000_ops = { .delsys = {SYS_DVBT },
drivers/media/dvb-frontends/drx39xyj/drxj.c +1 -1
@@ -12372,7 +12372,7 @@ error:return NULL ; } -EXPORT_SYMBOL (drx39xxj_attach); +EXPORT_SYMBOL_GPL (drx39xxj_attach);static const struct dvb_frontend_ops drx39xxj_ops = { .delsys = {SYS_ATSC ,SYS_DVBC_ANNEX_B },
drivers/media/dvb-frontends/drxd_hard.c +1 -1
@@ -2939,7 +2939,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (drxd_attach); +EXPORT_SYMBOL_GPL (drxd_attach);MODULE_DESCRIPTION ("DRXD driver" );MODULE_AUTHOR ("Micronas" );
drivers/media/dvb-frontends/drxk_hard.c +1 -1
@@ -6833,7 +6833,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (drxk_attach); +EXPORT_SYMBOL_GPL (drxk_attach);MODULE_DESCRIPTION ("DRX-K driver" );MODULE_AUTHOR ("Ralph Metzler" );
drivers/media/dvb-frontends/ds3000.c +1 -1
@@ -859,7 +859,7 @@ struct dvb_frontend *ds3000_attach(constds3000_set_voltage (&state->frontend,SEC_VOLTAGE_OFF );return &state->frontend; } -EXPORT_SYMBOL (ds3000_attach); +EXPORT_SYMBOL_GPL (ds3000_attach);static int ds3000_set_carrier_offset (struct dvb_frontend *fe,s32 carrier_offset_khz)
drivers/media/dvb-frontends/dvb-pll.c +1 -1
@@ -866,7 +866,7 @@ out:return NULL ; } -EXPORT_SYMBOL (dvb_pll_attach); +EXPORT_SYMBOL_GPL (dvb_pll_attach); static int
drivers/media/dvb-frontends/ec100.c +1 -1
@@ -299,7 +299,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (ec100_attach); +EXPORT_SYMBOL_GPL (ec100_attach);static const struct dvb_frontend_ops ec100_ops = { .delsys = {SYS_DVBT },
drivers/media/dvb-frontends/helene.c +2 -2
@@ -1025,7 +1025,7 @@ struct dvb_frontend *helene_attach_s(str priv->i2c_address, priv->i2c);return fe; } -EXPORT_SYMBOL (helene_attach_s); +EXPORT_SYMBOL_GPL (helene_attach_s); struct dvb_frontend *helene_attach(struct dvb_frontend *fe, const struct helene_config *config,
@@ -1061,7 +1061,7 @@ struct dvb_frontend *helene_attach(struc priv->i2c_address, priv->i2c);return fe; } -EXPORT_SYMBOL (helene_attach); +EXPORT_SYMBOL_GPL (helene_attach);static int helene_probe (struct i2c_client *client) {
drivers/media/dvb-frontends/horus3a.c +1 -1
@@ -395,7 +395,7 @@ struct dvb_frontend *horus3a_attach(stru priv->i2c_address, priv->i2c);return fe; } -EXPORT_SYMBOL (horus3a_attach); +EXPORT_SYMBOL_GPL (horus3a_attach);MODULE_DESCRIPTION ("Sony HORUS3A satellite tuner driver" );MODULE_AUTHOR ("Sergey Kozlov <[email protected]>" );
drivers/media/dvb-frontends/isl6405.c +1 -1
@@ -141,7 +141,7 @@ struct dvb_frontend *isl6405_attach(strureturn fe; } -EXPORT_SYMBOL (isl6405_attach); +EXPORT_SYMBOL_GPL (isl6405_attach);MODULE_DESCRIPTION ("Driver for lnb supply and control ic isl6405" );MODULE_AUTHOR ("Hartmut Hackmann & Oliver Endriss" );
drivers/media/dvb-frontends/isl6421.c +1 -1
@@ -213,7 +213,7 @@ struct dvb_frontend *isl6421_attach(strureturn fe; } -EXPORT_SYMBOL (isl6421_attach); +EXPORT_SYMBOL_GPL (isl6421_attach);MODULE_DESCRIPTION ("Driver for lnb supply and control ic isl6421" );MODULE_AUTHOR ("Andrew de Quincey & Oliver Endriss" );
drivers/media/dvb-frontends/isl6423.c +1 -1
@@ -289,7 +289,7 @@ exit: fe->sec_priv =NULL ;return NULL ; } -EXPORT_SYMBOL (isl6423_attach); +EXPORT_SYMBOL_GPL (isl6423_attach);MODULE_DESCRIPTION ("ISL6423 SEC" );MODULE_AUTHOR ("Manu Abraham" );
drivers/media/dvb-frontends/itd1000.c +1 -1
@@ -389,7 +389,7 @@ struct dvb_frontend *itd1000_attach(strureturn fe; } -EXPORT_SYMBOL (itd1000_attach); +EXPORT_SYMBOL_GPL (itd1000_attach);MODULE_AUTHOR ("Patrick Boettcher <[email protected]>" );MODULE_DESCRIPTION ("Integrant ITD1000 driver" );
drivers/media/dvb-frontends/ix2505v.c +1 -1
@@ -302,7 +302,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (ix2505v_attach); +EXPORT_SYMBOL_GPL (ix2505v_attach);module_param_named (debug, ix2505v_debug, int,0644 );MODULE_PARM_DESC (debug,"Turn on/off frontend debugging (default:off)." );
drivers/media/dvb-frontends/l64781.c +1 -1
@@ -593,4 +593,4 @@ MODULE_DESCRIPTION("LSI L64781 DVB-T DemMODULE_AUTHOR ("Holger Waechtler, Marko Kohtala" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (l64781_attach); +EXPORT_SYMBOL_GPL (l64781_attach);
drivers/media/dvb-frontends/lg2160.c +1 -1
@@ -1426,7 +1426,7 @@ struct dvb_frontend *lg2160_attach(constreturn &state->frontend; } -EXPORT_SYMBOL (lg2160_attach); +EXPORT_SYMBOL_GPL (lg2160_attach);MODULE_DESCRIPTION ("LG Electronics LG216x ATSC/MH Demodulator Driver" );MODULE_AUTHOR ("Michael Krufky <[email protected]>" );
drivers/media/dvb-frontends/lgdt3305.c +1 -1
@@ -1148,7 +1148,7 @@ fail:kfree (state);return NULL ; } -EXPORT_SYMBOL (lgdt3305_attach); +EXPORT_SYMBOL_GPL (lgdt3305_attach);static const struct dvb_frontend_ops lgdt3304_ops = { .delsys = {SYS_ATSC ,SYS_DVBC_ANNEX_B },
drivers/media/dvb-frontends/lgdt3306a.c +1 -1
@@ -1859,7 +1859,7 @@ fail:kfree (state);return NULL ; } -EXPORT_SYMBOL (lgdt3306a_attach); +EXPORT_SYMBOL_GPL (lgdt3306a_attach);#ifdef DBG_DUMP
drivers/media/dvb-frontends/lgdt330x.c +1 -1
@@ -927,7 +927,7 @@ struct dvb_frontend *lgdt330x_attach(conreturn lgdt330x_get_dvb_frontend (client); } -EXPORT_SYMBOL (lgdt330x_attach); +EXPORT_SYMBOL_GPL (lgdt330x_attach);static const struct dvb_frontend_ops lgdt3302_ops = { .delsys = {SYS_ATSC ,SYS_DVBC_ANNEX_B },
drivers/media/dvb-frontends/lgs8gxx.c +1 -1
@@ -1043,7 +1043,7 @@ error_out:return NULL ; } -EXPORT_SYMBOL (lgs8gxx_attach); +EXPORT_SYMBOL_GPL (lgs8gxx_attach);MODULE_DESCRIPTION ("Legend Silicon LGS8913/LGS8GXX DMB-TH demodulator driver" );MODULE_AUTHOR ("David T. L. Wong <[email protected]>" );
drivers/media/dvb-frontends/lnbh25.c +1 -1
@@ -173,7 +173,7 @@ struct dvb_frontend *lnbh25_attach(struc __func__, priv->i2c_address);return fe; } -EXPORT_SYMBOL (lnbh25_attach); +EXPORT_SYMBOL_GPL (lnbh25_attach);MODULE_DESCRIPTION ("ST LNBH25 driver" );MODULE_AUTHOR ("[email protected]" );
drivers/media/dvb-frontends/lnbp21.c +2 -2
@@ -155,7 +155,7 @@ struct dvb_frontend *lnbh24_attach(strucreturn lnbx2x_attach (fe, i2c, override_set, override_clear, i2c_addr,LNBH24_TTX ); } -EXPORT_SYMBOL (lnbh24_attach); +EXPORT_SYMBOL_GPL (lnbh24_attach); struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 override_set,
@@ -164,7 +164,7 @@ struct dvb_frontend *lnbp21_attach(strucreturn lnbx2x_attach (fe, i2c, override_set, override_clear,0x08 ,LNBP21_ISEL ); } -EXPORT_SYMBOL (lnbp21_attach); +EXPORT_SYMBOL_GPL (lnbp21_attach);MODULE_DESCRIPTION ("Driver for lnb supply and control ic lnbp21, lnbh24" );MODULE_AUTHOR ("Oliver Endriss, Igor M. Liplianin" );
drivers/media/dvb-frontends/lnbp22.c +1 -1
@@ -125,7 +125,7 @@ struct dvb_frontend *lnbp22_attach(strucreturn fe; } -EXPORT_SYMBOL (lnbp22_attach); +EXPORT_SYMBOL_GPL (lnbp22_attach);MODULE_DESCRIPTION ("Driver for lnb supply and control ic lnbp22" );MODULE_AUTHOR ("Dominik Kuhlen" );
drivers/media/dvb-frontends/m88ds3103.c +1 -1
@@ -1695,7 +1695,7 @@ struct dvb_frontend *m88ds3103_attach(co *tuner_i2c_adapter = pdata.get_i2c_adapter (client);return pdata.get_dvb_frontend (client); } -EXPORT_SYMBOL (m88ds3103_attach); +EXPORT_SYMBOL_GPL (m88ds3103_attach);static const struct dvb_frontend_ops m88ds3103_ops = { .delsys = {SYS_DVBS ,SYS_DVBS2 },
drivers/media/dvb-frontends/m88rs2000.c +1 -1
@@ -808,7 +808,7 @@ error:return NULL ; } -EXPORT_SYMBOL (m88rs2000_attach); +EXPORT_SYMBOL_GPL (m88rs2000_attach);MODULE_DESCRIPTION ("M88RS2000 DVB-S Demodulator driver" );MODULE_AUTHOR ("Malcolm Priestley [email protected]" );
drivers/media/dvb-frontends/mb86a16.c +1 -1
@@ -1851,6 +1851,6 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (mb86a16_attach); +EXPORT_SYMBOL_GPL (mb86a16_attach);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Manu Abraham" );
drivers/media/dvb-frontends/mb86a20s.c +1 -1
@@ -2081,7 +2081,7 @@ struct dvb_frontend *mb86a20s_attach(condev_info (&i2c->dev,"Detected a Fujitsu mb86a20s frontend\n" );return &state->frontend; } -EXPORT_SYMBOL (mb86a20s_attach); +EXPORT_SYMBOL_GPL (mb86a20s_attach);static const struct dvb_frontend_ops mb86a20s_ops = { .delsys = {SYS_ISDBT },
drivers/media/dvb-frontends/mt312.c +1 -1
@@ -827,7 +827,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (mt312_attach); +EXPORT_SYMBOL_GPL (mt312_attach);module_param (debug, int,0644 );MODULE_PARM_DESC (debug,"Turn on/off frontend debugging (default:off)." );
drivers/media/dvb-frontends/mt352.c +1 -1
@@ -593,4 +593,4 @@ MODULE_DESCRIPTION("Zarlink MT352 DVB-TMODULE_AUTHOR ("Holger Waechtler, Daniel Mack, Antonio Mancuso" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (mt352_attach); +EXPORT_SYMBOL_GPL (mt352_attach);
drivers/media/dvb-frontends/nxt200x.c +1 -1
@@ -1216,5 +1216,5 @@ MODULE_DESCRIPTION("NXT200X (ATSC 8VSB &MODULE_AUTHOR ("Kirk Lapray, Michael Krufky, Jean-Francois Thibert, and Taylor Jacob" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (nxt200x_attach); +EXPORT_SYMBOL_GPL (nxt200x_attach);
drivers/media/dvb-frontends/nxt6000.c +1 -1
@@ -621,4 +621,4 @@ MODULE_DESCRIPTION("NxtWave NXT6000 DVB-MODULE_AUTHOR ("Florian Schirmer" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (nxt6000_attach); +EXPORT_SYMBOL_GPL (nxt6000_attach);
drivers/media/dvb-frontends/or51132.c +1 -1
@@ -605,4 +605,4 @@ MODULE_AUTHOR("Kirk Lapray");MODULE_AUTHOR ("Trent Piepho" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (or51132_attach); +EXPORT_SYMBOL_GPL (or51132_attach);
drivers/media/dvb-frontends/or51211.c +1 -1
@@ -551,5 +551,5 @@ MODULE_DESCRIPTION("Oren OR51211 VSB [pcMODULE_AUTHOR ("Kirk Lapray" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (or51211_attach); +EXPORT_SYMBOL_GPL (or51211_attach);
drivers/media/dvb-frontends/s5h1409.c +1 -1
@@ -981,7 +981,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (s5h1409_attach); +EXPORT_SYMBOL_GPL (s5h1409_attach);static const struct dvb_frontend_ops s5h1409_ops = { .delsys = {SYS_ATSC ,SYS_DVBC_ANNEX_B },
drivers/media/dvb-frontends/s5h1411.c +1 -1
@@ -900,7 +900,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (s5h1411_attach); +EXPORT_SYMBOL_GPL (s5h1411_attach);static const struct dvb_frontend_ops s5h1411_ops = { .delsys = {SYS_ATSC ,SYS_DVBC_ANNEX_B },
drivers/media/dvb-frontends/s5h1420.c +1 -1
@@ -918,7 +918,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (s5h1420_attach); +EXPORT_SYMBOL_GPL (s5h1420_attach);static const struct dvb_frontend_ops s5h1420_ops = { .delsys = {SYS_DVBS },
drivers/media/dvb-frontends/s5h1432.c +1 -1
@@ -355,7 +355,7 @@ struct dvb_frontend *s5h1432_attach(consreturn &state->frontend; } -EXPORT_SYMBOL (s5h1432_attach); +EXPORT_SYMBOL_GPL (s5h1432_attach);static const struct dvb_frontend_ops s5h1432_ops = { .delsys = {SYS_DVBT },
drivers/media/dvb-frontends/s921.c +1 -1
@@ -495,7 +495,7 @@ struct dvb_frontend *s921_attach(const sreturn &state->frontend; } -EXPORT_SYMBOL (s921_attach); +EXPORT_SYMBOL_GPL (s921_attach);static const struct dvb_frontend_ops s921_ops = { .delsys = {SYS_ISDBT },
drivers/media/dvb-frontends/si21xx.c +1 -1
@@ -937,7 +937,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (si21xx_attach); +EXPORT_SYMBOL_GPL (si21xx_attach);module_param (debug, int,0644 );MODULE_PARM_DESC (debug,"Turn on/off frontend debugging (default:off)." );
drivers/media/dvb-frontends/sp887x.c +1 -1
@@ -624,4 +624,4 @@ MODULE_PARM_DESC(debug, "Turn on/off froMODULE_DESCRIPTION ("Spase sp887x DVB-T demodulator driver" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (sp887x_attach); +EXPORT_SYMBOL_GPL (sp887x_attach);
drivers/media/dvb-frontends/stb0899_drv.c +1 -1
@@ -1638,7 +1638,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (stb0899_attach); +EXPORT_SYMBOL_GPL (stb0899_attach);MODULE_PARM_DESC (verbose,"Set Verbosity level" );MODULE_AUTHOR ("Manu Abraham" );MODULE_DESCRIPTION ("STB0899 Multi-Std frontend" );
drivers/media/dvb-frontends/stb6000.c +1 -1
@@ -232,7 +232,7 @@ struct dvb_frontend *stb6000_attach(strureturn fe; } -EXPORT_SYMBOL (stb6000_attach); +EXPORT_SYMBOL_GPL (stb6000_attach);module_param (debug, int,0644 );MODULE_PARM_DESC (debug,"Turn on/off frontend debugging (default:off)." );
drivers/media/dvb-frontends/stb6100.c +1 -1
@@ -557,7 +557,7 @@ static void stb6100_release(struct dvb_fkfree (state); } -EXPORT_SYMBOL (stb6100_attach); +EXPORT_SYMBOL_GPL (stb6100_attach);MODULE_PARM_DESC (verbose,"Set Verbosity level" );MODULE_AUTHOR ("Manu Abraham" );
drivers/media/dvb-frontends/stv0288.c +1 -1
@@ -590,7 +590,7 @@ error:return NULL ; } -EXPORT_SYMBOL (stv0288_attach); +EXPORT_SYMBOL_GPL (stv0288_attach);module_param (debug_legacy_dish_switch, int,0444 ); MODULE_PARM_DESC(debug_legacy_dish_switch,
drivers/media/dvb-frontends/stv0297.c +1 -1
@@ -710,4 +710,4 @@ MODULE_DESCRIPTION("ST STV0297 DVB-C DemMODULE_AUTHOR ("Dennis Noermann and Andrew de Quincey" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (stv0297_attach); +EXPORT_SYMBOL_GPL (stv0297_attach);
drivers/media/dvb-frontends/stv0299.c +1 -1
@@ -752,4 +752,4 @@ MODULE_DESCRIPTION("ST STV0299 DVB DemodMODULE_AUTHOR ("Ralph Metzler, Holger Waechtler, Peter Schildmann, Felix Domke, Andreas Oberritter, Andrew de Quincey, Kenneth Aafly" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (stv0299_attach); +EXPORT_SYMBOL_GPL (stv0299_attach);
drivers/media/dvb-frontends/stv0367.c +3 -3
@@ -1750,7 +1750,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (stv0367ter_attach); +EXPORT_SYMBOL_GPL (stv0367ter_attach);static int stv0367cab_gate_ctrl (struct dvb_frontend *fe,int enable) {
@@ -2919,7 +2919,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (stv0367cab_attach); +EXPORT_SYMBOL_GPL (stv0367cab_attach);/* * Functions for operation on Digital Devices hardware
@@ -3340,7 +3340,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (stv0367ddb_attach); +EXPORT_SYMBOL_GPL (stv0367ddb_attach);MODULE_PARM_DESC (debug,"Set debug" );MODULE_PARM_DESC (i2c_debug,"Set i2c debug" );
drivers/media/dvb-frontends/stv0900_core.c +1 -1
@@ -1957,7 +1957,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (stv0900_attach); +EXPORT_SYMBOL_GPL (stv0900_attach);MODULE_PARM_DESC (debug,"Set debug" );
drivers/media/dvb-frontends/stv090x.c +1 -1
@@ -5071,7 +5071,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (stv090x_attach); +EXPORT_SYMBOL_GPL (stv090x_attach);static const struct i2c_device_id stv090x_id_table[] = { {"stv090x" ,0 },
drivers/media/dvb-frontends/stv6110.c +1 -1
@@ -427,7 +427,7 @@ struct dvb_frontend *stv6110_attach(strureturn fe; } -EXPORT_SYMBOL (stv6110_attach); +EXPORT_SYMBOL_GPL (stv6110_attach);module_param (debug, int,0644 );MODULE_PARM_DESC (debug,"Turn on/off frontend debugging (default:off)." );
drivers/media/dvb-frontends/stv6110x.c +1 -1
@@ -467,7 +467,7 @@ const struct stv6110x_devctl *stv6110x_adev_info (&stv6110x->i2c->dev,"Attaching STV6110x\n" );return stv6110x->devctl; } -EXPORT_SYMBOL (stv6110x_attach); +EXPORT_SYMBOL_GPL (stv6110x_attach);static const struct i2c_device_id stv6110x_id_table[] = { {"stv6110x" ,0 },
drivers/media/dvb-frontends/tda10021.c +1 -1
@@ -523,4 +523,4 @@ MODULE_DESCRIPTION("Philips TDA10021 DVBMODULE_AUTHOR ("Ralph Metzler, Holger Waechtler, Markus Schulz" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (tda10021_attach); +EXPORT_SYMBOL_GPL (tda10021_attach);
drivers/media/dvb-frontends/tda10023.c +1 -1
@@ -594,4 +594,4 @@ MODULE_DESCRIPTION("Philips TDA10023 DVBMODULE_AUTHOR ("Georg Acher, Hartmut Birr" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (tda10023_attach); +EXPORT_SYMBOL_GPL (tda10023_attach);
drivers/media/dvb-frontends/tda10048.c +1 -1
@@ -1138,7 +1138,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (tda10048_attach); +EXPORT_SYMBOL_GPL (tda10048_attach);static const struct dvb_frontend_ops tda10048_ops = { .delsys = {SYS_DVBT },
drivers/media/dvb-frontends/tda1004x.c +2 -2
@@ -1378,5 +1378,5 @@ MODULE_DESCRIPTION("Philips TDA10045H &MODULE_AUTHOR ("Andrew de Quincey & Robert Schlabbach" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (tda10045_attach); -EXPORT_SYMBOL (tda10046_attach); +EXPORT_SYMBOL_GPL (tda10045_attach); +EXPORT_SYMBOL_GPL (tda10046_attach);
drivers/media/dvb-frontends/tda10086.c +1 -1
@@ -764,4 +764,4 @@ MODULE_DESCRIPTION("Philips TDA10086 DVBMODULE_AUTHOR ("Andrew de Quincey" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (tda10086_attach); +EXPORT_SYMBOL_GPL (tda10086_attach);
drivers/media/dvb-frontends/tda665x.c +1 -1
@@ -227,7 +227,7 @@ struct dvb_frontend *tda665x_attach(strureturn fe; } -EXPORT_SYMBOL (tda665x_attach); +EXPORT_SYMBOL_GPL (tda665x_attach);MODULE_DESCRIPTION ("TDA665x driver" );MODULE_AUTHOR ("Manu Abraham" );
drivers/media/dvb-frontends/tda8083.c +1 -1
@@ -481,4 +481,4 @@ MODULE_DESCRIPTION("Philips TDA8083 DVB-MODULE_AUTHOR ("Ralph Metzler, Holger Waechtler" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (tda8083_attach); +EXPORT_SYMBOL_GPL (tda8083_attach);
drivers/media/dvb-frontends/tda8261.c +1 -1
@@ -188,7 +188,7 @@ exit:return NULL ; } -EXPORT_SYMBOL (tda8261_attach); +EXPORT_SYMBOL_GPL (tda8261_attach);MODULE_AUTHOR ("Manu Abraham" );MODULE_DESCRIPTION ("TDA8261 8PSK/QPSK Tuner" );
drivers/media/dvb-frontends/tda826x.c +1 -1
@@ -164,7 +164,7 @@ struct dvb_frontend *tda826x_attach(strureturn fe; } -EXPORT_SYMBOL (tda826x_attach); +EXPORT_SYMBOL_GPL (tda826x_attach);module_param (debug, int,0644 );MODULE_PARM_DESC (debug,"Turn on/off frontend debugging (default:off)." );
drivers/media/dvb-frontends/ts2020.c +1 -1
@@ -525,7 +525,7 @@ struct dvb_frontend *ts2020_attach(strucreturn fe; } -EXPORT_SYMBOL (ts2020_attach); +EXPORT_SYMBOL_GPL (ts2020_attach);/* * We implement own regmap locking due to legacy DVB attach which uses frontend
drivers/media/dvb-frontends/tua6100.c +1 -1
@@ -186,7 +186,7 @@ struct dvb_frontend *tua6100_attach(stru fe->tuner_priv = priv;return fe; } -EXPORT_SYMBOL (tua6100_attach); +EXPORT_SYMBOL_GPL (tua6100_attach);MODULE_DESCRIPTION ("DVB tua6100 driver" );MODULE_AUTHOR ("Andrew de Quincey" );
drivers/media/dvb-frontends/ves1820.c +1 -1
@@ -434,4 +434,4 @@ MODULE_DESCRIPTION("VLSI VES1820 DVB-C DMODULE_AUTHOR ("Ralph Metzler, Holger Waechtler" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (ves1820_attach); +EXPORT_SYMBOL_GPL (ves1820_attach);
drivers/media/dvb-frontends/ves1x93.c +1 -1
@@ -540,4 +540,4 @@ MODULE_DESCRIPTION("VLSI VES1x93 DVB-S DMODULE_AUTHOR ("Ralph Metzler" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (ves1x93_attach); +EXPORT_SYMBOL_GPL (ves1x93_attach);
drivers/media/dvb-frontends/zl10036.c +1 -1
@@ -496,7 +496,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (zl10036_attach); +EXPORT_SYMBOL_GPL (zl10036_attach);module_param_named (debug, zl10036_debug, int,0644 );MODULE_PARM_DESC (debug,"Turn on/off frontend debugging (default:off)." );
drivers/media/dvb-frontends/zl10039.c +1 -1
@@ -295,7 +295,7 @@ error:kfree (state);return NULL ; } -EXPORT_SYMBOL (zl10039_attach); +EXPORT_SYMBOL_GPL (zl10039_attach);module_param (debug, int,0644 );MODULE_PARM_DESC (debug,"Turn on/off frontend debugging (default:off)." );
drivers/media/dvb-frontends/zl10353.c +1 -1
@@ -665,4 +665,4 @@ MODULE_DESCRIPTION("Zarlink ZL10353 DVB-MODULE_AUTHOR ("Chris Pascoe" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (zl10353_attach); +EXPORT_SYMBOL_GPL (zl10353_attach);
drivers/media/pci/bt8xx/dst.c +1 -1
@@ -1722,7 +1722,7 @@ struct dst_state *dst_attach(struct dst_return state;/* Manu (DST is a card not a frontend) */ } -EXPORT_SYMBOL (dst_attach); +EXPORT_SYMBOL_GPL (dst_attach);static const struct dvb_frontend_ops dst_dvbt_ops = { .delsys = {SYS_DVBT },
drivers/media/pci/bt8xx/dst_ca.c +1 -1
@@ -668,7 +668,7 @@ struct dvb_device *dst_ca_attach(structreturn NULL ; } -EXPORT_SYMBOL (dst_ca_attach); +EXPORT_SYMBOL_GPL (dst_ca_attach);MODULE_DESCRIPTION ("DST DVB-S/T/C Combo CA driver" );MODULE_AUTHOR ("Manu Abraham" );
drivers/media/pci/ddbridge/ddbridge-dummy-fe.c +1 -1
@@ -112,7 +112,7 @@ struct dvb_frontend *ddbridge_dummy_fe_q state->frontend.demodulator_priv = state;return &state->frontend; } -EXPORT_SYMBOL (ddbridge_dummy_fe_qam_attach); +EXPORT_SYMBOL_GPL (ddbridge_dummy_fe_qam_attach);static const struct dvb_frontend_ops ddbridge_dummy_fe_qam_ops = { .delsys = {SYS_DVBC_ANNEX_A },
drivers/media/tuners/fc0011.c +1 -1
@@ -499,7 +499,7 @@ struct dvb_frontend *fc0011_attach(strucreturn fe; } -EXPORT_SYMBOL (fc0011_attach); +EXPORT_SYMBOL_GPL (fc0011_attach);MODULE_DESCRIPTION ("Fitipower FC0011 silicon tuner driver" );MODULE_AUTHOR ("Michael Buesch <[email protected]>" );
drivers/media/tuners/fc0012.c +1 -1
@@ -495,7 +495,7 @@ err:return fe; } -EXPORT_SYMBOL (fc0012_attach); +EXPORT_SYMBOL_GPL (fc0012_attach);MODULE_DESCRIPTION ("Fitipower FC0012 silicon tuner driver" );MODULE_AUTHOR ("Hans-Frieder Vogt <[email protected]>" );
drivers/media/tuners/fc0013.c +1 -1
@@ -608,7 +608,7 @@ struct dvb_frontend *fc0013_attach(strucreturn fe; } -EXPORT_SYMBOL (fc0013_attach); +EXPORT_SYMBOL_GPL (fc0013_attach);MODULE_DESCRIPTION ("Fitipower FC0013 silicon tuner driver" );MODULE_AUTHOR ("Hans-Frieder Vogt <[email protected]>" );
drivers/media/tuners/max2165.c +1 -1
@@ -410,7 +410,7 @@ struct dvb_frontend *max2165_attach(strureturn fe; } -EXPORT_SYMBOL (max2165_attach); +EXPORT_SYMBOL_GPL (max2165_attach);MODULE_AUTHOR ("David T. L. Wong <[email protected]>" );MODULE_DESCRIPTION ("Maxim MAX2165 silicon tuner driver" );
drivers/media/tuners/mc44s803.c +1 -1
@@ -356,7 +356,7 @@ error:kfree (priv);return NULL ; } -EXPORT_SYMBOL (mc44s803_attach); +EXPORT_SYMBOL_GPL (mc44s803_attach);MODULE_AUTHOR ("Jochen Friedrich" );MODULE_DESCRIPTION ("Freescale MC44S803 silicon tuner driver" );
drivers/media/tuners/mt2060.c +1 -1
@@ -440,7 +440,7 @@ struct dvb_frontend * mt2060_attach(strureturn fe; } -EXPORT_SYMBOL (mt2060_attach); +EXPORT_SYMBOL_GPL (mt2060_attach);static int mt2060_probe (struct i2c_client *client) {
drivers/media/tuners/mt2131.c +1 -1
@@ -274,7 +274,7 @@ struct dvb_frontend * mt2131_attach(stru fe->tuner_priv = priv;return fe; } -EXPORT_SYMBOL (mt2131_attach); +EXPORT_SYMBOL_GPL (mt2131_attach);MODULE_AUTHOR ("Steven Toth" );MODULE_DESCRIPTION ("Microtune MT2131 silicon tuner driver" );
drivers/media/tuners/mt2266.c +1 -1
@@ -336,7 +336,7 @@ struct dvb_frontend * mt2266_attach(strumt2266_calibrate (priv);return fe; } -EXPORT_SYMBOL (mt2266_attach); +EXPORT_SYMBOL_GPL (mt2266_attach);MODULE_AUTHOR ("Olivier DANET" );MODULE_DESCRIPTION ("Microtune MT2266 silicon tuner driver" );
drivers/media/tuners/mxl5005s.c +1 -1
@@ -4120,7 +4120,7 @@ struct dvb_frontend *mxl5005s_attach(str fe->tuner_priv = state;return fe; } -EXPORT_SYMBOL (mxl5005s_attach); +EXPORT_SYMBOL_GPL (mxl5005s_attach);MODULE_DESCRIPTION ("MaxLinear MXL5005S silicon tuner driver" );MODULE_AUTHOR ("Steven Toth" );
drivers/media/tuners/qt1010.c +1 -1
@@ -440,7 +440,7 @@ struct dvb_frontend * qt1010_attach(stru fe->tuner_priv = priv;return fe; } -EXPORT_SYMBOL (qt1010_attach); +EXPORT_SYMBOL_GPL (qt1010_attach);MODULE_DESCRIPTION ("Quantek QT1010 silicon tuner driver" );MODULE_AUTHOR ("Antti Palosaari <[email protected]>" );
drivers/media/tuners/tda18218.c +1 -1
@@ -336,7 +336,7 @@ struct dvb_frontend *tda18218_attach(strreturn fe; } -EXPORT_SYMBOL (tda18218_attach); +EXPORT_SYMBOL_GPL (tda18218_attach);MODULE_DESCRIPTION ("NXP TDA18218HN silicon tuner driver" );MODULE_AUTHOR ("Antti Palosaari <[email protected]>" );
drivers/media/tuners/xc2028.c +1 -1
@@ -1512,7 +1512,7 @@ fail:return NULL ; } -EXPORT_SYMBOL (xc2028_attach); +EXPORT_SYMBOL_GPL (xc2028_attach);MODULE_DESCRIPTION ("Xceive xc2028/xc3028 tuner driver" );MODULE_AUTHOR ("Michel Ludwig <[email protected]>" );
drivers/media/tuners/xc4000.c +1 -1
@@ -1742,7 +1742,7 @@ fail2:xc4000_release (fe);return NULL ; } -EXPORT_SYMBOL (xc4000_attach); +EXPORT_SYMBOL_GPL (xc4000_attach);MODULE_AUTHOR ("Steven Toth, Davide Ferri" );MODULE_DESCRIPTION ("Xceive xc4000 silicon tuner driver" );
drivers/media/tuners/xc5000.c +1 -1
@@ -1460,7 +1460,7 @@ fail:xc5000_release (fe);return NULL ; } -EXPORT_SYMBOL (xc5000_attach); +EXPORT_SYMBOL_GPL (xc5000_attach);MODULE_AUTHOR ("Steven Toth" );MODULE_DESCRIPTION ("Xceive xc5000 silicon tuner driver" );
drivers/staging/media/av7110/sp8870.c +1 -1
@@ -606,4 +606,4 @@ MODULE_DESCRIPTION("Spase SP8870 DVB-T DMODULE_AUTHOR ("Juergen Peitz" );MODULE_LICENSE ("GPL" ); -EXPORT_SYMBOL (sp8870_attach); +EXPORT_SYMBOL_GPL (sp8870_attach);
Greg Kroah-Hartman
maintainerPATCH 675/737 media: venus: hfi_venus: Write to VIDC_CTRL_INIT after unmasking interrupts
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
commit d74e481609808330b4625b3691cf01e1f56e255e upstream.
The startup procedure shouldn't be started with interrupts masked, as that may entail silent failures.
Kick off initialization only after the interrupts are unmasked.
--- drivers/media/platform/qcom/venus/hfi_venus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/qcom/venus/hfi_venus.c +1 -1
@@ -453,7 +453,6 @@ static int venus_boot_core(struct venus_void __iomem *wrapper_base = hdev->core->wrapper_base;int ret =0 ; -writel (BIT (VIDC_CTRL_INIT_CTRL_SHIFT ), cpu_cs_base +VIDC_CTRL_INIT );if (IS_V6 (hdev->core)) { mask_val =readl (wrapper_base +WRAPPER_INTR_MASK ); mask_val &= ~(WRAPPER_INTR_MASK_A2HWD_BASK_V6 |
@@ -464,6 +463,7 @@ static int venus_boot_core(struct venus_writel (mask_val, wrapper_base +WRAPPER_INTR_MASK );writel (1 , cpu_cs_base +CPU_CS_SCIACMDARG3 ); +writel (BIT (VIDC_CTRL_INIT_CTRL_SHIFT ), cpu_cs_base +VIDC_CTRL_INIT );while (!ctrl_status && count < max_tries) { ctrl_status =readl (cpu_cs_base +CPU_CS_SCIACMDARG0 );if ((ctrl_status &CPU_CS_SCIACMDARG0_ERROR_STATUS_MASK ) ==4 ) {
Greg Kroah-Hartman
maintainerPATCH 676/737 media: nxp: Fix wrong return pointer check in mxc_isi_crossbar_init()
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yang Yingliang <[email protected]>
commit 4b60db99babad0254129ddc58e0927ffa9e93e35 upstream.
It should check 'xbar->inputs', when allocate memory for it.
--- drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c +1 -1
@@ -483,7 +483,7 @@ int mxc_isi_crossbar_init(struct mxc_isi_dev *isi) xbar->inputs =kcalloc (xbar->num_sinks,sizeof (*xbar->inputs),GFP_KERNEL ); -if (!xbar->pads) { +if (!xbar->inputs) { ret = -ENOMEM ; goto err_free; }
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 677/737 Revert "scsi: qla2xxx: Fix buffer overrun"
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nilesh Javali <[email protected]>
commit 641671d97b9199f1ba35ccc2222d4b189a6a5de5 upstream.
Revert due to Get PLOGI Template failed.
This reverts commit b68710a8094fdffe8dd4f7a82c82649f479bb453.
--- drivers/scsi/qla2xxx/qla_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_init.c +1 -1
@@ -5549,7 +5549,7 @@ static void qla_get_login_template(scsi___be32 *q;memset (ha->init_cb,0 , ha->init_cb_size); - sz =min_t (int,sizeof (struct fc_els_csp ), ha->init_cb_size); + sz =min_t (int,sizeof (struct fc_els_flogi ), ha->init_cb_size); rval =qla24xx_get_port_login_templ (vha, ha->init_cb_dma, ha->init_cb, sz);if (rval !=QLA_SUCCESS ) {
Greg Kroah-Hartman
maintainerPATCH 678/737 scsi: mpt3sas: Perform additional retries if doorbell read returns 0
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ranjan Kumar <[email protected]>
commit 4ca10f3e31745d35249a727ecd108eb58f0a8c5e upstream.
The driver retries certain register reads 3 times if the returned value is
0. This was done because the controller could return 0 for certain registers if other registers were being accessed concurrently by the BMC.
In certain systems with increased BMC interactions, the register values returned can be 0 for longer than 3 retries. Change the retry count from 3 to 30 for the affected registers to prevent problems with out-of-band management.
--- drivers/scsi/mpt3sas/mpt3sas_base.c | 46 +++++++++++++++++++++++++----------- drivers/scsi/mpt3sas/mpt3sas_base.h | 1 2 files changed, 34 insertions(+), 13 deletions(-)
drivers/scsi/mpt3sas/mpt3sas_base.c +33 -13
@@ -138,6 +138,9 @@ _base_get_ioc_facts(struct MPT3SAS_ADAPTstatic void _base_clear_outstanding_commands (struct MPT3SAS_ADAPTER *ioc); +static u32 +_base_readl_ext_retry (const volatile void __iomem *addr); +/** * mpt3sas_base_check_cmd_timeout - Function * to check timeout and command termination due
@@ -213,6 +216,20 @@ _base_readl_aero(const volatile void __ireturn ret_val; } +static u32 +_base_readl_ext_retry (const volatile void __iomem *addr) +{ +u32 i, ret_val; + +for (i =0 ; i <30 ; i++) { + ret_val =readl (addr); +if (ret_val ==0 ) +continue ; + } + +return ret_val; +} +static inline u32 _base_readl (const volatile void __iomem *addr) {
@@ -940,7 +957,7 @@ mpt3sas_halt_firmware(struct MPT3SAS_ADAdump_stack (); - doorbell = ioc->base_readl (&ioc->chip->Doorbell); + doorbell = ioc->base_readl_ext_retry (&ioc->chip->Doorbell);if ((doorbell &MPI2_IOC_STATE_MASK ) ==MPI2_IOC_STATE_FAULT ) {mpt3sas_print_fault_code (ioc, doorbell &MPI2_DOORBELL_DATA_MASK );
@@ -6686,7 +6703,7 @@ mpt3sas_base_get_iocstate(struct MPT3SAS {u32 s, sc; - s = ioc->base_readl (&ioc->chip->Doorbell); + s = ioc->base_readl_ext_retry (&ioc->chip->Doorbell); sc = s &MPI2_IOC_STATE_MASK ;return cooked ? sc : s; }
@@ -6831,7 +6848,7 @@ _base_wait_for_doorbell_ack(struct MPT3S __func__, count, timeout));return 0 ; }else if (int_status &MPI2_HIS_IOC2SYS_DB_STATUS ) { - doorbell = ioc->base_readl (&ioc->chip->Doorbell); + doorbell = ioc->base_readl_ext_retry (&ioc->chip->Doorbell);if ((doorbell &MPI2_IOC_STATE_MASK ) ==MPI2_IOC_STATE_FAULT ) {mpt3sas_print_fault_code (ioc, doorbell);
@@ -6871,7 +6888,7 @@ _base_wait_for_doorbell_not_used(struct count =0 ; cntdn =1000 * timeout; do { - doorbell_reg = ioc->base_readl(&ioc->chip->Doorbell); + doorbell_reg = ioc->base_readl_ext_retry(&ioc->chip->Doorbell); if (!(doorbell_reg & MPI2_DOORBELL_USED)) { dhsprintk(ioc, ioc_info(ioc, "%s: successful count(%d), timeout(%d)\n",
@@ -7019,7 +7036,7 @@ _base_handshake_req_reply_wait(struct MP__le32 *mfp;/* make sure doorbell is not in use */ -if ((ioc->base_readl (&ioc->chip->Doorbell) &MPI2_DOORBELL_USED )) { +if ((ioc->base_readl_ext_retry (&ioc->chip->Doorbell) &MPI2_DOORBELL_USED )) {ioc_err (ioc,"doorbell is in use (line=%d)\n" , __LINE__);return -EFAULT ; }
@@ -7068,7 +7085,7 @@ _base_handshake_req_reply_wait(struct MP }/* read the first two 16-bits, it gives the total length of the reply */ - reply[0 ] =le16_to_cpu (ioc->base_readl (&ioc->chip->Doorbell) + reply[0 ] =le16_to_cpu (ioc->base_readl_ext_retry (&ioc->chip->Doorbell) &MPI2_DOORBELL_DATA_MASK );writel (0 , &ioc->chip->HostInterruptStatus);if ((_base_wait_for_doorbell_int (ioc,5 ))) {
@@ -7076,7 +7093,7 @@ _base_handshake_req_reply_wait(struct MP __LINE__);return -EFAULT ; } - reply[1 ] =le16_to_cpu (ioc->base_readl (&ioc->chip->Doorbell) + reply[1 ] =le16_to_cpu (ioc->base_readl_ext_retry (&ioc->chip->Doorbell) &MPI2_DOORBELL_DATA_MASK );writel (0 , &ioc->chip->HostInterruptStatus);
@@ -7087,10 +7104,10 @@ _base_handshake_req_reply_wait(struct MPreturn -EFAULT ; }if (i >= reply_bytes/2 )/* overflow case */ - ioc->base_readl (&ioc->chip->Doorbell); + ioc->base_readl_ext_retry (&ioc->chip->Doorbell);else reply[i] =le16_to_cpu ( - ioc->base_readl (&ioc->chip->Doorbell) + ioc->base_readl_ext_retry (&ioc->chip->Doorbell) &MPI2_DOORBELL_DATA_MASK );writel (0 , &ioc->chip->HostInterruptStatus); }
@@ -7949,7 +7966,7 @@ _base_diag_reset(struct MPT3SAS_ADAPTER goto out; } - host_diagnostic = ioc->base_readl (&ioc->chip->HostDiagnostic); + host_diagnostic = ioc->base_readl_ext_retry (&ioc->chip->HostDiagnostic);drsprintk (ioc,ioc_info (ioc,"wrote magic sequence: count(%d), host_diagnostic(0x%08x)\n" , count, host_diagnostic));
@@ -7969,7 +7986,7 @@ _base_diag_reset(struct MPT3SAS_ADAPTERfor (count =0 ; count < (300000000 /MPI2_HARD_RESET_PCIE_SECOND_READ_DELAY_MICRO_SEC ); count++) { - host_diagnostic = ioc->base_readl (&ioc->chip->HostDiagnostic); + host_diagnostic = ioc->base_readl_ext_retry (&ioc->chip->HostDiagnostic);if (host_diagnostic ==0xFFFFFFFF ) { ioc_info(ioc,
@@ -8359,10 +8376,13 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPT ioc->rdpq_array_enable_assigned =0 ; ioc->use_32bit_dma = false; ioc->dma_mask =64 ; -if (ioc->is_aero_ioc) +if (ioc->is_aero_ioc) { ioc->base_readl = &_base_readl_aero; -else + ioc->base_readl_ext_retry = &_base_readl_ext_retry; + }else { ioc->base_readl = &_base_readl; + ioc->base_readl_ext_retry = &_base_readl; + } r =mpt3sas_base_map_resources (ioc);if (r) goto out_free_resources;
drivers/scsi/mpt3sas/mpt3sas_base.h +1 -0
@@ -1618,6 +1618,7 @@ struct MPT3SAS_ADAPTER {u8 diag_trigger_active;u8 atomic_desc_capable;BASE_READ_REG base_readl; +BASE_READ_REG base_readl_ext_retry;struct SL_WH_MASTER_TRIGGER_T diag_trigger_master;struct SL_WH_EVENT_TRIGGERS_T diag_trigger_event;struct SL_WH_SCSI_TRIGGERS_T diag_trigger_scsi;
Greg Kroah-Hartman
maintainerPATCH 679/737 PCI: Free released resource after coalescing
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ross Lagerwall <[email protected]>
commit 8ec9c1d5d0a5a4744516adb483b97a238892f9d5 upstream.
release_resource() doesn't actually free the resource or resource list entry so free the resource list entry to avoid a leak.
--- drivers/pci/probe.c | 1 + 1 file changed, 1 insertion(+)
drivers/pci/probe.c +1 -0
@@ -999,6 +999,7 @@ static int pci_register_host_bridge(stru res = window->res;if (!res->flags && !res->start && !res->end) {release_resource (res); +resource_list_destroy_entry (window);continue ; }
Greg Kroah-Hartman
maintainerPATCH 680/737 PCI: hv: Fix a crash in hv_pci_restore_msi_msg() during hibernation
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dexuan Cui <[email protected]>
commit 04bbe863241a9be7d57fb4cf217ee4a72f480e70 upstream.
When a Linux VM with an assigned PCI device runs on Hyper-V, if the PCI device driver is not loaded yet (i.e. MSI-X/MSI is not enabled on the device yet), doing a VM hibernation triggers a panic in hv_pci_restore_msi_msg() -> msi_lock_descs(&pdev->dev), because pdev->dev.msi.data is still NULL.
Avoid the panic by checking if MSI-X/MSI is enabled.
--- drivers/pci/controller/pci-hyperv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/pci/controller/pci-hyperv.c +3 -0
@@ -3983,6 +3983,9 @@ static int hv_pci_restore_msi_msg(structstruct msi_desc *entry;int ret =0 ; +if (!pdev->msi_enabled && !pdev->msix_enabled) +return 0 ; +msi_lock_descs (&pdev->dev);msi_for_each_desc (entry, &pdev->dev,MSI_DESC_ASSOCIATED ) { irq_data =irq_get_irq_data (entry->irq);
Greg Kroah-Hartman
maintainerPATCH 681/737 PCI/PM: Only read PCI_PM_CTRL register when available
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Feiyang Chen <[email protected]>
commit 5694ba13b004eea683c6d4faeb6d6e7a9636bda0 upstream.
For a device with no Power Management Capability, pci_power_up() previously returned 0 (success) if the platform was able to put the device in D0, which led to pci_set_full_power_state() trying to read PCI_PM_CTRL, even though it doesn't exist.
Since dev->pm_cap == 0 in this case, pci_set_full_power_state() actually read the wrong register, interpreted it as PCI_PM_CTRL, and corrupted dev->current_state. This led to messages like this in some cases:
pci 0000:01:00.0: Refused to change power state from D3hot to D0
To prevent this, make pci_power_up() always return a negative failure code if the device lacks a Power Management Capability, even if non-PCI platform power management has been able to put the device in D0. The failure will prevent pci_set_full_power_state() from trying to access PCI_PM_CTRL.
--- drivers/pci/pci.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/pci/pci.c +9 -4
@@ -1200,6 +1200,10 @@ static int pci_dev_wait(struct pci_dev ** * On success, return 0 or 1, depending on whether or not it is necessary to * restore the device's BARs subsequently (1 is returned in that case). +* +* On failure, return a negative error code. Always return failure if @dev +* lacks a Power Management Capability, even if the platform was able to +* put the device in D0 via non-PCI means. */ int pci_power_up (struct pci_dev *dev) {
@@ -1216,9 +1220,6 @@ int pci_power_up(struct pci_dev *dev)else dev->current_state = state; -if (state ==PCI_D0 ) -return 0 ; -return -EIO ; }
@@ -1276,8 +1277,12 @@ static int pci_set_full_power_state(struint ret; ret =pci_power_up (dev); -if (ret <0 ) +if (ret <0 ) { +if (dev->current_state ==PCI_D0 ) +return 0 ; +return ret; + }pci_read_config_word (dev, dev->pm_cap +PCI_PM_CTRL , &pmcsr); dev->current_state = pmcsr &PCI_PM_CTRL_STATE_MASK ;
Greg Kroah-Hartman
maintainerPATCH 682/737 ntb: Drop packets when qp link is down
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jiang <[email protected]>
commit f195a1a6fe416882984f8bd6c61afc1383171860 upstream.
Currently when the transport receive packets after netdev has closed the transport returns error and triggers tx errors to be incremented and carrier to be stopped. There is no reason to return error if the device is already closed. Drop the packet and return 0.
--- drivers/ntb/ntb_transport.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/ntb/ntb_transport.c +5 -1
@@ -2276,9 +2276,13 @@ int ntb_transport_tx_enqueue(struct ntb_struct ntb_queue_entry *entry;int rc; -if (!qp || !qp->link_is_up || !len) +if (!qp || !len)return -EINVAL ; +/* If the qp link is down already, just ignore. */ +if (!qp->link_is_up) +return 0 ; + entry =ntb_list_rm (&qp->ntb_tx_free_q_lock, &qp->tx_free_q);if (!entry) { qp->tx_err_no_buf++;
Greg Kroah-Hartman
maintainerPATCH 683/737 ntb: Clean up tx tail index on link down
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jiang <[email protected]>
commit cc79bd2738c2d40aba58b2be6ce47dc0e471df0e upstream.
The tx tail index is not reset when the link goes down. This causes the tail index to go out of sync when the link goes down and comes back up. Refactor the ntb_qp_link_down_reset() and reset the tail index as well.
--- drivers/ntb/ntb_transport.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/ntb/ntb_transport.c +9 -2
@@ -909,7 +909,7 @@ static int ntb_set_mw(struct ntb_transporeturn 0 ; } -static void ntb_qp_link_down_reset (struct ntb_transport_qp *qp) +static void ntb_qp_link_context_reset (struct ntb_transport_qp *qp) { qp->link_is_up = false; qp->active = false;
@@ -932,6 +932,13 @@ static void ntb_qp_link_down_reset(struc qp->tx_async =0 ; } +static void ntb_qp_link_down_reset (struct ntb_transport_qp *qp) +{ +ntb_qp_link_context_reset (qp); +if (qp->remote_rx_info) + qp->remote_rx_info->entry = qp->rx_max_entry -1 ; +} +static void ntb_qp_link_cleanup (struct ntb_transport_qp *qp) {struct ntb_transport_ctx *nt = qp->transport;
@@ -1174,7 +1181,7 @@ static int ntb_transport_init_queue(stru qp->ndev = nt->ndev; qp->client_ready = false; qp->event_handler =NULL ; -ntb_qp_link_down_reset (qp); +ntb_qp_link_context_reset (qp);if (mw_num < qp_count % mw_count) num_qps_mw = qp_count / mw_count +1 ;
Greg Kroah-Hartman
maintainerPATCH 684/737 ntb: Fix calculation ntb_transport_tx_free_entry()
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jiang <[email protected]>
commit 5a7693e6bbf19b22fd6c1d2c4b7beb0a03969e2c upstream.
ntb_transport_tx_free_entry() never returns 0 with the current calculation. If head == tail, then it would return qp->tx_max_entry. Change compare to tail >= head and when they are equal, a 0 would be returned.
--- drivers/ntb/ntb_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ntb/ntb_transport.c +1 -1
@@ -2429,7 +2429,7 @@ unsigned int ntb_transport_tx_free_entryunsigned int head = qp->tx_index;unsigned int tail = qp->remote_rx_info->entry; -return tail > head ? tail - head : qp->tx_max_entry + tail - head; +return tail >= head ? tail - head : qp->tx_max_entry + tail - head; }EXPORT_SYMBOL_GPL (ntb_transport_tx_free_entry);
Greg Kroah-Hartman
maintainerPATCH 685/737 Revert "PCI: Mark NVIDIA T4 GPUs to avoid bus reset"
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bjorn Helgaas <[email protected]>
commit 5260bd6d36c83c5b269c33baaaf8c78e520908b0 upstream.
This reverts commit d5af729dc2071273f14cbb94abbc60608142fd83.
d5af729dc207 ("PCI: Mark NVIDIA T4 GPUs to avoid bus reset") avoided Secondary Bus Reset on the T4 because the reset seemed to not work when the T4 was directly attached to a Root Port.
But NVIDIA thinks the issue is probably related to some issue with the Root Port, not with the T4. The T4 provides neither PM nor FLR reset, so masking bus reset compromises this device for assignment scenarios.
Revert d5af729dc207 as requested by Wu Zongyong. This will leave SBR broken in the specific configuration Wu tested, as it was in v6.5, so Wu will debug that further.
--- drivers/pci/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/quirks.c +1 -1
@@ -3631,7 +3631,7 @@ static void quirk_no_bus_reset(struct pc*/ static void quirk_nvidia_no_bus_reset (struct pci_dev *dev) { -if ((dev->device &0xffc0 ) ==0x2340 || dev->device ==0x1eb8 ) +if ((dev->device &0xffc0 ) ==0x2340 )quirk_no_bus_reset (dev); } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,
Greg Kroah-Hartman
maintainerPATCH 686/737 block: dont add or resize partition on the disk with GENHD_FL_NO_PART
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li Lingfeng <[email protected]>
commit 1a721de8489fa559ff4471f73c58bb74ac5580d3 upstream.
Commit a33df75c6328 ("block: use an xarray for disk->part_tbl") remove disk_expand_part_tbl() in add_partition(), which means all kinds of devices will support extended dynamic dev_t.
However, some devices with GENHD_FL_NO_PART are not expected to add or resize partition.
Fix this by adding check of GENHD_FL_NO_PART before add or resize partition.
--- block/ioctl.c | 2 ++ 1 file changed, 2 insertions(+)
block/ioctl.c +2 -0
@@ -20,6 +20,8 @@ static int blkpg_do_ioctl(struct block_dstruct blkpg_partition p;long long start, length; +if (disk->flags &GENHD_FL_NO_PART ) +return -EINVAL ;if (!capable (CAP_SYS_ADMIN ))return -EACCES ;if (copy_from_user (&p, upart,sizeof (struct blkpg_partition )))
Greg Kroah-Hartman
maintainerPATCH 687/737 procfs: block chmod on /proc/thread-self/comm
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aleksa Sarai <[email protected]>
commit ccf61486fe1e1a48e18c638d1813cda77b3c0737 upstream.
Due to an oversight in commit 1b3044e39a89 ("procfs: fix pthread cross-thread naming if !PR_DUMPABLE") in switching from REG to NOD, chmod operations on /proc/thread-self/comm were no longer blocked as they are on almost all other procfs files.
A very similar situation with /proc/self/environ was used to as a root exploit a long time ago, but procfs has SB_I_NOEXEC so this is simply a correctness issue.
Ref: https://lwn.net/Articles/191954/
Ref: 6d76fa58b050 ("Don't allow chmod() on the /proc/<pid>/ files")
Message-Id: <[email protected]>
--- fs/proc/base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/proc/base.c +2 -1
@@ -3583,7 +3583,8 @@ static int proc_tid_comm_permission(stru }static const struct inode_operations proc_tid_comm_inode_operations = { - .permission = proc_tid_comm_permission, + .setattr = proc_setattr, + .permission = proc_tid_comm_permission, };/*
Greg Kroah-Hartman
maintainerPATCH 688/737 parisc: Fix /proc/cpuinfo output for lscpu
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Helge Deller <[email protected]>
commit 9f5ba4b3e1b3c123eeca5d2d09161e8720048b5c upstream.
The lscpu command is broken since commit cab56b51ec0e ("parisc: Fix device names in /proc/iomem") added the PA pathname to all PA devices, includig the CPUs.
lscpu parses /proc/cpuinfo and now believes it found different CPU types since every CPU is listed with an unique identifier (PA pathname).
Fix this problem by simply dropping the PA pathname when listing the CPUs in /proc/cpuinfo. There is no need to show the pathname in this procfs file.
--- arch/parisc/kernel/processor.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
arch/parisc/kernel/processor.c +10 -3
@@ -377,10 +377,18 @@ int show_cpuinfo (struct seq_file *m, void *v) { unsigned long cpu; +char cpu_name[60 ], *p; + +/* strip PA path from CPU name to not confuse lscpu */ +strlcpy (cpu_name,per_cpu (cpu_data,0 ).dev->name,sizeof (cpu_name)); + p =strrchr (cpu_name,'[' ); +if (p) + *(--p) =0 ;for_each_online_cpu (cpu) { -const struct cpuinfo_parisc *cpuinfo = &per_cpu (cpu_data, cpu);#ifdef CONFIG_SMP +const struct cpuinfo_parisc *cpuinfo = &per_cpu (cpu_data, cpu); +if (0 == cpuinfo->hpa)continue ;#endif
@@ -425,8 +433,7 @@ show_cpuinfo (struct seq_file *m, void *seq_printf (m,"model\t\t: %s - %s\n" , boot_cpu_data.pdc.sys_model_name, - cpuinfo->dev ? - cpuinfo->dev->name :"Unknown" ); + cpu_name); seq_printf(m, "hversion\t: 0x%08x\n" "sversion\t: 0x%08x\n",
Greg Kroah-Hartman
maintainerPATCH 689/737 misc: fastrpc: Pass proper scm arguments for static process init
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ekansh Gupta <[email protected]>
commit fe6518d547fc52ba74201018dc9aeb364072ac78 upstream.
Memory is allocated for dynamic loading when audio daemon is trying to attach to audioPD on DSP side. This memory is allocated from reserved CMA memory region and needs ownership assignment to new VMID in order to use it from audioPD.
In the current implementation, arguments are not correctly passed to the scm call which might result in failure of dynamic loading on audioPD. Added changes to pass correct arguments during daemon attach request.
--- drivers/misc/fastrpc.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/misc/fastrpc.c +9 -4
@@ -1322,13 +1322,18 @@ static int fastrpc_init_create_static_prreturn 0 ; err_invoke:if (fl->cctx->vmcount) { -struct qcom_scm_vmperm perm; +u64 src_perms =0 ; +struct qcom_scm_vmperm dst_perms; +u32 i; - perm.vmid =QCOM_SCM_VMID_HLOS ; - perm.perm =QCOM_SCM_PERM_RWX ; +for (i =0 ; i < fl->cctx->vmcount; i++) + src_perms |=BIT (fl->cctx->vmperms[i].vmid); + + dst_perms.vmid =QCOM_SCM_VMID_HLOS ; + dst_perms.perm =QCOM_SCM_PERM_RWX ; err =qcom_scm_assign_mem (fl->cctx->remote_heap->phys, (u64 )fl->cctx->remote_heap->size, - &fl->cctx->perms, &perm,1 ); + &src_perms, &dst_perms,1 );if (err)dev_err (fl->sctx->dev,"Failed to assign memory phys 0x%llx size 0x%llx err %d" , fl->cctx->remote_heap->phys, fl->cctx->remote_heap->size, err);
Greg Kroah-Hartman
maintainerPATCH 690/737 drm/amd/display: Add smu write msg id fail retry process
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fudong Wang <[email protected]>
commit 72105dcfa3d12b5af49311f857e3490baa225135 upstream.
A benchmark stress test (12-40 machines x 48hours) found that DCN315 has cases where DC writes to an indirect register to set the smu clock msg id, but when we go to read the same indirect register the returned msg id doesn't match with what we just set it to. So, to fix this retry the write until the register's value matches with the requested value.
--- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_smu.c | 20 ++++++++++--- 1 file changed, 16 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_smu.c +16 -4
@@ -32,6 +32,7 @@#define MAX_INSTANCE 6#define MAX_SEGMENT 6 +#define SMU_REGISTER_WRITE_RETRY_COUNT 5struct IP_BASE_INSTANCE {
@@ -134,6 +135,8 @@ static int dcn315_smu_send_msg_with_para unsigned int msg_id, unsigned int param) { uint32_t result; +uint32_t i =0 ; +uint32_t read_back_data; result =dcn315_smu_wait_for_response (clk_mgr,10 ,200000 );
@@ -150,10 +153,19 @@ static int dcn315_smu_send_msg_with_para/* Set the parameter register for the SMU message, unit is Mhz */ REG_WRITE (MP1_SMN_C2PMSG_37 , param); -/* Trigger the message transaction by writing the message ID */ -generic_write_indirect_reg (CTX , -REG_NBIO (RSMU_INDEX ),REG_NBIO (RSMU_DATA ), - mmMP1_C2PMSG_3, msg_id); +for (i =0 ; i <SMU_REGISTER_WRITE_RETRY_COUNT ; i++) { +/* Trigger the message transaction by writing the message ID */ +generic_write_indirect_reg (CTX , +REG_NBIO (RSMU_INDEX ),REG_NBIO (RSMU_DATA ), + mmMP1_C2PMSG_3, msg_id); + read_back_data =generic_read_indirect_reg (CTX , +REG_NBIO (RSMU_INDEX ),REG_NBIO (RSMU_DATA ), + mmMP1_C2PMSG_3); +if (read_back_data == msg_id) +break ; +udelay (2 ); +smu_print ("SMU msg id write fail %x times. \n" , i +1 ); + } result =dcn315_smu_wait_for_response (clk_mgr,10 ,200000 );
Greg Kroah-Hartman
maintainerPATCH 691/737 bpf: Fix issue in verifying allow_ptr_leaks
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yafang Shao <[email protected]>
commit d75e30dddf73449bc2d10bb8e2f1a2c446bc67a2 upstream.
After we converted the capabilities of our networking-bpf program from cap_sys_admin to cap_net_admin+cap_bpf, our networking-bpf program failed to start. Because it failed the bpf verifier, and the error log is "R3 pointer comparison prohibited".
A simple reproducer as follows,
SEC("cls-ingress")
int ingress(struct __sk_buff *skb)
{
struct iphdr *iph = (void *)(long)skb->data + sizeof(struct ethhdr);
if ((long)(iph + 1) > (long)skb->data_end)
return TC_ACT_STOLEN;
return TC_ACT_OK;
}Per discussion with Yonghong and Alexei [1], comparison of two packet pointers is not a pointer leak. This patch fixes it.
Our local kernel is 6.1.y and we expect this fix to be backported to 6.1.y, so stable is CCed.
[1]. https://lore.kernel.org/bpf/CAADnVQ+Nmspr7Si+pxWn8zkE7hX-7s93ugwC+94aXSy4uQ9vBg@mail.gmail.com/
--- kernel/bpf/verifier.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
kernel/bpf/verifier.c +9 -8
@@ -13597,6 +13597,12 @@ static int check_cond_jmp_op(struct bpf_return -EINVAL ; } +/* check src2 operand */ + err =check_reg_arg (env, insn->dst_reg,SRC_OP ); +if (err) +return err; + + dst_reg = ®s[insn->dst_reg];if (BPF_SRC (insn->code) ==BPF_X ) {if (insn->imm !=0 ) {verbose (env,"BPF_JMP/JMP32 uses reserved fields\n" );
@@ -13608,12 +13614,13 @@ static int check_cond_jmp_op(struct bpf_if (err)return err; -if (is_pointer_value (env, insn->src_reg)) { + src_reg = ®s[insn->src_reg]; +if (!(reg_is_pkt_pointer_any (dst_reg) &®_is_pkt_pointer_any (src_reg)) && +is_pointer_value (env, insn->src_reg)) {verbose (env,"R%d pointer comparison prohibited\n" , insn->src_reg);return -EACCES ; } - src_reg = ®s[insn->src_reg]; }else {if (insn->src_reg !=BPF_REG_0 ) {verbose (env,"BPF_JMP/JMP32 uses reserved fields\n" );
@@ -13621,12 +13628,6 @@ static int check_cond_jmp_op(struct bpf_ } } -/* check src2 operand */ - err =check_reg_arg (env, insn->dst_reg,SRC_OP ); -if (err) -return err; - - dst_reg = ®s[insn->dst_reg]; is_jmp32 =BPF_CLASS (insn->code) ==BPF_JMP32 ;if (BPF_SRC (insn->code) ==BPF_K ) {
Greg Kroah-Hartman
maintainerPATCH 692/737 dlm: fix plock lookup when using multiple lockspaces
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Aring <[email protected]>
commit 7c53e847ff5e97f033fdd31f71949807633d506b upstream.
All posix lock ops, for all lockspaces (gfs2 file systems) are sent to userspace (dlm_controld) through a single misc device. The dlm_controld daemon reads the ops from the misc device and sends them to other cluster nodes using separate, per-lockspace cluster api communication channels. The ops for a single lockspace are ordered at this level, so that the results are received in the same sequence that the requests were sent. When the results are sent back to the kernel via the misc device, they are again funneled through the single misc device for all lockspaces. When the dlm code in the kernel processes the results from the misc device, these results will be returned in the same sequence that the requests were sent, on a per-lockspace basis. A recent change in this request/reply matching code missed the "per-lockspace" check (fsid comparison) when matching request and reply, so replies could be incorrectly matched to requests from other lockspaces.
--- fs/dlm/plock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
fs/dlm/plock.c +3 -3
@@ -456,7 +456,8 @@ static ssize_t dev_write(struct file *fi } }else {list_for_each_entry (iter, &recv_list, list) { -if (!iter->info.wait) { +if (!iter->info.wait && + iter->info.fsid == info.fsid) { op = iter;break ; }
@@ -468,8 +469,7 @@ static ssize_t dev_write(struct file *fiif (info.wait)WARN_ON (op->info.optype !=DLM_PLOCK_OP_LOCK );else -WARN_ON (op->info.fsid != info.fsid || - op->info.number != info.number || +WARN_ON (op->info.number != info.number || op->info.owner != info.owner || op->info.optype != info.optype);
Greg Kroah-Hartman
maintainerPATCH 693/737 dccp: Fix out of bounds access in DCCP error handler
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jann Horn <[email protected]>
commit 977ad86c2a1bcaf58f01ab98df5cc145083c489c upstream.
There was a previous attempt to fix an out-of-bounds access in the DCCP error handlers, but that fix assumed that the error handlers only want to access the first 8 bytes of the DCCP header. Actually, they also look at the DCCP sequence number, which is stored beyond 8 bytes, so an explicit pskb_may_pull() is required.
--- net/dccp/ipv4.c | 13 +++++++++---- net/dccp/ipv6.c | 15 ++++++++++----- 2 files changed, 19 insertions(+), 9 deletions(-)
net/dccp/ipv4.c +9 -4
@@ -255,12 +255,17 @@ static int dccp_v4_err(struct sk_buff *sint err;struct net *net =dev_net (skb->dev); -/* Only need dccph_dport & dccph_sport which are the first -* 4 bytes in dccp header. +/* For the first __dccp_basic_hdr_len() check, we only need dh->dccph_x, +* which is in byte 7 of the dccp header. * Our caller (icmp_socket_deliver()) already pulled 8 bytes for us. +* +* Later on, we want to access the sequence number fields, which are +* beyond 8 bytes, so we have to pskb_may_pull() ourselves. */ - BUILD_BUG_ON(offsetofend(struct dccp_hdr, dccph_sport) > 8); - BUILD_BUG_ON(offsetofend(struct dccp_hdr, dccph_dport) > 8); + dh = (struct dccp_hdr *)(skb->data + offset); +if (!pskb_may_pull (skb, offset +__dccp_basic_hdr_len (dh))) +return -EINVAL ; + iph = (struct iphdr *)skb->data; dh = (struct dccp_hdr *)(skb->data + offset); sk = __inet_lookup_established(net, &dccp_hashinfo,
net/dccp/ipv6.c +10 -5
@@ -74,7 +74,7 @@ static inline __u64 dccp_v6_init_sequencstatic int dccp_v6_err (struct sk_buff *skb,struct inet6_skb_parm *opt,u8 type,u8 code,int offset,__be32 info) { -const struct ipv6hdr *hdr = (const struct ipv6hdr *)skb->data; +const struct ipv6hdr *hdr;const struct dccp_hdr *dh;struct dccp_sock *dp;struct ipv6_pinfo *np;
@@ -83,12 +83,17 @@ static int dccp_v6_err(struct sk_buff *s__u64 seq;struct net *net =dev_net (skb->dev); -/* Only need dccph_dport & dccph_sport which are the first -* 4 bytes in dccp header. +/* For the first __dccp_basic_hdr_len() check, we only need dh->dccph_x, +* which is in byte 7 of the dccp header. * Our caller (icmpv6_notify()) already pulled 8 bytes for us. +* +* Later on, we want to access the sequence number fields, which are +* beyond 8 bytes, so we have to pskb_may_pull() ourselves. */ - BUILD_BUG_ON(offsetofend(struct dccp_hdr, dccph_sport) > 8); - BUILD_BUG_ON(offsetofend(struct dccp_hdr, dccph_dport) > 8); + dh = (struct dccp_hdr *)(skb->data + offset); +if (!pskb_may_pull (skb, offset +__dccp_basic_hdr_len (dh))) +return -EINVAL ; + hdr = (const struct ipv6hdr *)skb->data; dh = (struct dccp_hdr *)(skb->data + offset); sk = __inet6_lookup_established(net, &dccp_hashinfo,
Greg Kroah-Hartman
maintainerPATCH 694/737 x86/sev: Make enc_dec_hypercall() accept a size instead of npages
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steve Rutherford <[email protected]>
commit ac3f9c9f1b37edaa7d1a9b908bc79d843955a1a2 upstream.
enc_dec_hypercall() accepted a page count instead of a size, which forced its callers to round up. As a result, non-page aligned vaddrs caused pages to be spuriously marked as decrypted via the encryption status hypercall, which in turn caused consistent corruption of pages during live migration. Live migration requires accurate encryption status information to avoid migrating pages from the wrong perspective.
--- arch/x86/include/asm/mem_encrypt.h | 6 +++--- arch/x86/kernel/kvm.c | 4 +--- arch/x86/mm/mem_encrypt_amd.c | 13 ++++++------- 3 files changed, 10 insertions(+), 13 deletions(-)
arch/x86/include/asm/mem_encrypt.h +3 -3
@@ -50,8 +50,8 @@ void __init sme_enable(struct boot_paramint __init early_set_memory_decrypted (unsigned long vaddr,unsigned long size);int __init early_set_memory_encrypted (unsigned long vaddr,unsigned long size); -void __init early_set_mem_enc_dec_hypercall (unsigned long vaddr,int npages, -bool enc); +void __init early_set_mem_enc_dec_hypercall (unsigned long vaddr, +unsigned long size,bool enc);void __init mem_encrypt_free_decrypted_mem (void );
@@ -85,7 +85,7 @@ early_set_memory_decrypted(unsigned longstatic inline int __init early_set_memory_encrypted (unsigned long vaddr,unsigned long size) {return 0 ; }static inline void __init -early_set_mem_enc_dec_hypercall (unsigned long vaddr,int npages,bool enc) {} +early_set_mem_enc_dec_hypercall (unsigned long vaddr,unsigned long size,bool enc) {}static inline void mem_encrypt_free_decrypted_mem (void ) { }
arch/x86/kernel/kvm.c +1 -3
@@ -966,10 +966,8 @@ static void __init kvm_init_platform(voi* Ensure that _bss_decrypted section is marked as decrypted in the * shared pages list. */ - nr_pages =DIV_ROUND_UP (__end_bss_decrypted - __start_bss_decrypted, -PAGE_SIZE );early_set_mem_enc_dec_hypercall ((unsigned long )__start_bss_decrypted, - nr_pages,0 ); + __end_bss_decrypted - __start_bss_decrypted,0 );/* * If not booted using EFI, enable Live migration support.
arch/x86/mm/mem_encrypt_amd.c +6 -7
@@ -288,11 +288,10 @@ static bool amd_enc_cache_flush_requiredreturn !cpu_feature_enabled (X86_FEATURE_SME_COHERENT ); } -static void enc_dec_hypercall (unsigned long vaddr,int npages,bool enc) +static void enc_dec_hypercall (unsigned long vaddr,unsigned long size,bool enc) {#ifdef CONFIG_PARAVIRT -unsigned long sz = npages <<PAGE_SHIFT ; -unsigned long vaddr_end = vaddr + sz; +unsigned long vaddr_end = vaddr + size;while (vaddr < vaddr_end) {int psize, pmask, level;
@@ -342,7 +341,7 @@ static bool amd_enc_status_change_finishsnp_set_memory_private (vaddr, npages);if (!cc_platform_has (CC_ATTR_HOST_MEM_ENCRYPT )) -enc_dec_hypercall (vaddr, npages, enc); +enc_dec_hypercall (vaddr, npages <<PAGE_SHIFT , enc);return true; }
@@ -466,7 +465,7 @@ static int __init early_set_memory_enc_d ret =0 ; -early_set_mem_enc_dec_hypercall (start,PAGE_ALIGN (size) >>PAGE_SHIFT , enc); +early_set_mem_enc_dec_hypercall (start, size, enc); out:__flush_tlb_all ();return ret;
@@ -482,9 +481,9 @@ int __init early_set_memory_encrypted(unreturn early_set_memory_enc_dec (vaddr, size, true); } -void __init early_set_mem_enc_dec_hypercall (unsigned long vaddr,int npages,bool enc) +void __init early_set_mem_enc_dec_hypercall (unsigned long vaddr,unsigned long size,bool enc) { -enc_dec_hypercall (vaddr, npages, enc); +enc_dec_hypercall (vaddr, size, enc); }void __init sme_early_init (void )
Greg Kroah-Hartman
maintainerPATCH 695/737 r8169: fix ASPM-related issues on a number of systems with NIC version from RTL8168h
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiner Kallweit <[email protected]>
commit 90ca51e8c654699b672ba61aeaa418dfb3252e5e upstream.
This effectively reverts 4b5f82f6aaef. On a number of systems ASPM L1 causes tx timeouts with RTL8168h, see referenced bug report.
--- drivers/net/ethernet/realtek/r8169_main.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/ethernet/realtek/r8169_main.c +0 -4
@@ -5241,13 +5241,9 @@ static int rtl_init_one(struct pci_dev */* Disable ASPM L1 as that cause random device stop working * problems as well as full system hangs for some PCIe devices users. -* Chips from RTL8168h partially have issues with L1.2, but seem -* to work fine with L1 and L1.1. */ if (rtl_aspm_is_safe (tp)) rc =0 ; -else if (tp->mac_version >=RTL_GIGA_MAC_VER_46 ) - rc =pci_disable_link_state (pdev,PCIE_LINK_STATE_L1_2 );else rc =pci_disable_link_state (pdev,PCIE_LINK_STATE_L1 ); tp->aspm_manageable = !rc;
Greg Kroah-Hartman
maintainerPATCH 696/737 X.509: if signature is unsupported skip validation
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thore Sommer <[email protected]>
commit ef5b52a631f8c18353e80ccab8408b963305510c upstream.
When the hash algorithm for the signature is not available the digest size is 0 and the signature in the certificate is marked as unsupported.
When validating a self-signed certificate, this needs to be checked, because otherwise trying to validate the signature will fail with an warning:
Loading compiled-in X.509 certificates
WARNING: CPU: 0 PID: 1 at crypto/rsa-pkcs1pad.c:537 \ pkcs1pad_verify+0x46/0x12c
...
Problem loading in-kernel X.509 certificate (-22)
--- crypto/asymmetric_keys/x509_public_key.c | 5 +++++ 1 file changed, 5 insertions(+)
crypto/asymmetric_keys/x509_public_key.c +5 -0
@@ -117,6 +117,11 @@ int x509_check_for_self_signed(struct x5 goto out; } +if (cert->unsupported_sig) { + ret =0 ; + goto out; + } + ret =public_key_verify_signature (cert->pub, cert->sig);if (ret <0 ) {if (ret == -ENOPKG ) {
Greg Kroah-Hartman
maintainerPATCH 697/737 net: handle ARPHRD_PPP in dev_is_mac_header_xmit()
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Dichtel <[email protected]>
commit a4f39c9f14a634e4cd35fcd338c239d11fcc73fc upstream.
The goal is to support a bpf_redirect() from an ethernet device (ingress) to a ppp device (egress).
The l2 header is added automatically by the ppp driver, thus the ethernet header should be removed.
--- include/linux/if_arp.h | 4 ++++ 1 file changed, 4 insertions(+)
include/linux/if_arp.h +4 -0
@@ -53,6 +53,10 @@ static inline bool dev_is_mac_header_xmicase ARPHRD_NONE :case ARPHRD_RAWIP :case ARPHRD_PIMREG : +/* PPP adds its l2 header automatically in ppp_start_xmit(). +* This makes it look like an l3 device to __bpf_redirect() and tcf_mirred_init(). +*/ +case ARPHRD_PPP :return false;default :return true;
Greg Kroah-Hartman
maintainerPATCH 698/737 fsverity: skip PKCS#7 parser when keyring is empty
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Biggers <[email protected]>
commit 919dc320956ea353a7fb2d84265195ad5ef525ac upstream.
If an fsverity builtin signature is given for a file but the ".fs-verity" keyring is empty, there's no real reason to run the PKCS#7 parser. Skip this to avoid the PKCS#7 attack surface when builtin signature support is configured into the kernel but is not being used.
This is a hardening improvement, not a fix per se, but I've added Fixes and Cc stable to get it out to more users.
--- fs/verity/signature.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
fs/verity/signature.c +16 -0
@@ -54,6 +54,22 @@ int fsverity_verify_signature(const strureturn 0 ; } +if (fsverity_keyring->keys.nr_leaves_on_tree ==0 ) { +/* +* The ".fs-verity" keyring is empty, due to builtin signatures +* being supported by the kernel but not actually being used. +* In this case, verify_pkcs7_signature() would always return an +* error, usually ENOKEY. It could also be EBADMSG if the +* PKCS#7 is malformed, but that isn't very important to +* distinguish. So, just skip to ENOKEY to avoid the attack +* surface of the PKCS#7 parser, which would otherwise be +* reachable by any task able to execute FS_IOC_ENABLE_VERITY. +*/ +fsverity_err (inode, +"fs-verity keyring is empty, rejecting signed file!" ); +return -ENOKEY ; + } + d =kzalloc (sizeof (*d) + hash_alg->digest_size,GFP_KERNEL );if (!d)return -ENOMEM ;
Greg Kroah-Hartman
maintainerPATCH 699/737 x86/MCE: Always save CS register on AMD Zen IF Poison errors
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yazen Ghannam <[email protected]>
commit 4240e2ebe67941ce2c4f5c866c3af4b5ac7a0c67 upstream.
The Instruction Fetch (IF) units on current AMD Zen-based systems do not guarantee a synchronous #MC is delivered for poison consumption errors. Therefore, MCG_STATUS[EIPV|RIPV] will not be set. However, the microarchitecture does guarantee that the exception is delivered within the same context. In other words, the exact rIP is not known, but the context is known to not have changed.
There is no architecturally-defined method to determine this behavior.
The Code Segment (CS) register is always valid on such IF unit poison errors regardless of the value of MCG_STATUS[EIPV|RIPV].
Add a quirk to save the CS register for poison consumption from the IF unit banks.
This is needed to properly determine the context of the error. Otherwise, the severity grading function will assume the context is IN_KERNEL due to the m->cs value being 0 (the initialized value). This leads to unnecessary kernel panics on data poison errors due to the kernel believing the poison consumption occurred in kernel context.
--- arch/x86/kernel/cpu/mce/core.c | 26 ++++++++++++++++++++++++++ arch/x86/kernel/cpu/mce/internal.h | 5 ++++- 2 files changed, 30 insertions(+), 1 deletion(-)
arch/x86/kernel/cpu/mce/core.c +26 -0
@@ -843,6 +843,26 @@ static noinstr bool quirk_skylake_repmov }/* +* Some Zen-based Instruction Fetch Units set EIPV=RIPV=0 on poison consumption +* errors. This means mce_gather_info() will not save the "ip" and "cs" registers. +* +* However, the context is still valid, so save the "cs" register for later use. +* +* The "ip" register is truly unknown, so don't save it or fixup EIPV/RIPV. +* +* The Instruction Fetch Unit is at MCA bank 1 for all affected systems. +*/ +static __always_inline void quirk_zen_ifu(int bank, struct mce *m, struct pt_regs *regs) +{ +if (bank !=1 ) +return ; +if (!(m->status &MCI_STATUS_POISON )) +return ; + + m->cs = regs->cs; +} + +/* * Do a quick check if any of the events requires a panic. * This decides if we keep the events around or clear them. */
@@ -861,6 +881,9 @@ static __always_inline int mce_no_way_ouif (mce_flags.snb_ifu_quirk)quirk_sandybridge_ifu (i, m, regs); +if (mce_flags.zen_ifu_quirk) +quirk_zen_ifu (i, m, regs); + m->bank = i;if (mce_severity (m, regs, &tmp, true) >=MCE_PANIC_SEVERITY ) {mce_read_aux (m, i);
@@ -1842,6 +1865,9 @@ static int __mcheck_cpu_apply_quirks(strif (c->x86 ==0x15 && c->x86_model <=0xf ) mce_flags.overflow_recov =1 ; +if (c->x86 >=0x17 && c->x86 <=0x1A ) + mce_flags.zen_ifu_quirk =1 ; + }if (c->x86_vendor ==X86_VENDOR_INTEL ) {
arch/x86/kernel/cpu/mce/internal.h +4 -1
@@ -157,6 +157,9 @@ struct mce_vendor_flags {*/ smca : 1, + /* Zen IFU quirk */ + zen_ifu_quirk : 1, + /* AMD-style error thresholding banks present. */ amd_threshold : 1,
@@ -172,7 +175,7 @@ struct mce_vendor_flags {/* Skylake, Cascade Lake, Cooper Lake REP;MOVS* quirk */ skx_repmov_quirk :1 , - __reserved_0 : 56; + __reserved_0 : 55; };extern struct mce_vendor_flags mce_flags;
Greg Kroah-Hartman
maintainerPATCH 700/737 crypto: af_alg - Decrement struct key.usage in alg_set_by_key_serial()
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Frederick Lawler <[email protected]>
commit 6b4b53ca0b7300ba2af98a49dbce22054bf034fe upstream.
Calls to lookup_user_key() require a corresponding key_put() to decrement the usage counter. Once it reaches zero, we schedule key GC. Therefore decrement struct key.usage in alg_set_by_key_serial().
--- crypto/af_alg.c | 3 +++ 1 file changed, 3 insertions(+)
crypto/af_alg.c +3 -0
@@ -320,18 +320,21 @@ static int alg_setkey_by_key_serial(struif (IS_ERR (ret)) {up_read (&key->sem); +key_put (key);return PTR_ERR (ret); } key_data =sock_kmalloc (&ask->sk, key_datalen,GFP_KERNEL );if (!key_data) {up_read (&key->sem); +key_put (key);return -ENOMEM ; }memcpy (key_data, ret, key_datalen);up_read (&key->sem); +key_put (key); err = type->setkey (ask->private, key_data, key_datalen);
Greg Kroah-Hartman
maintainerPATCH 701/737 platform/chrome: chromeos_acpi: print hex string for ACPI_TYPE_BUFFER
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tzung-Bi Shih <[email protected]>
commit 0820debb7d489e9eb1f68b7bb69e6ae210699b3f upstream.
element->buffer.pointer should be binary blob. %s doesn't work perfect for them.
Print hex string for ACPI_TYPE_BUFFER. Also update the documentation to reflect this.
--- Documentation/ABI/testing/sysfs-driver-chromeos-acpi | 2 - drivers/platform/chrome/chromeos_acpi.c | 31 ++++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-driver-chromeos-acpi +1 -1
@@ -134,4 +134,4 @@ KernelVersion: 5.19 Description: Returns the verified boot data block shared between the firmware verification step and the kernel verification step - (binary). + (hex dump).
drivers/platform/chrome/chromeos_acpi.c +30 -1
@@ -90,7 +90,36 @@ static int chromeos_acpi_handle_package(case ACPI_TYPE_STRING :return sysfs_emit (buf,"%s\n" , element->string.pointer);case ACPI_TYPE_BUFFER : -return sysfs_emit (buf,"%s\n" , element->buffer.pointer); + { +int i, r, at, room_left; +const int byte_per_line =16 ; + + at =0 ; + room_left =PAGE_SIZE -1 ; +for (i =0 ; i < element->buffer.length && room_left; i += byte_per_line) { + r =hex_dump_to_buffer (element->buffer.pointer + i, + element->buffer.length - i, + byte_per_line,1 , buf + at, room_left, + false); +if (r > room_left) + goto truncating; + at += r; + room_left -= r; + + r =sysfs_emit_at (buf, at,"\n" ); +if (!r) + goto truncating; + at += r; + room_left -= r; + } + + buf[at] =0 ; +return at; +truncating: +dev_info_once (dev,"truncating sysfs content for %s\n" , name); +sysfs_emit_at (buf,PAGE_SIZE -4 ,"..\n" ); +return PAGE_SIZE -1 ; + }default :dev_err (dev,"element type %d not supported\n" , element->type);return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 702/737 mmc: renesas_sdhi: register irqs before registering controller
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wolfram Sang <[email protected]>
commit 74f45de394d979cc7770271f92fafa53e1ed3119 upstream.
IRQs should be ready to serve when we call mmc_add_host() via tmio_mmc_host_probe(). To achieve that, ensure that all irqs are masked before registering the handlers.
--- drivers/mmc/host/renesas_sdhi_core.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/mmc/host/renesas_sdhi_core.c +7 -3
@@ -1006,6 +1006,8 @@ int renesas_sdhi_probe(struct platform_d host->sdcard_irq_setbit_mask =TMIO_STAT_ALWAYS_SET_27 ; host->sdcard_irq_mask_all =TMIO_MASK_ALL_RCAR2 ; host->reset = renesas_sdhi_reset; + }else { + host->sdcard_irq_mask_all =TMIO_MASK_ALL ; }/* Orginally registers were 16 bit apart, could be 32 or 64 nowadays */
@@ -1100,9 +1102,7 @@ int renesas_sdhi_probe(struct platform_d host->ops.hs400_complete = renesas_sdhi_hs400_complete; } - ret =tmio_mmc_host_probe (host); -if (ret <0 ) - goto edisclk; +sd_ctrl_write32_as_16_and_16 (host,CTL_IRQ_MASK , host->sdcard_irq_mask_all); num_irqs =platform_irq_count (pdev);if (num_irqs <0 ) {
@@ -1129,6 +1129,10 @@ int renesas_sdhi_probe(struct platform_d goto eirq; } + ret =tmio_mmc_host_probe (host); +if (ret <0 ) + goto edisclk; +dev_info (&pdev->dev,"%s base at %pa, max clock rate %u MHz\n" ,mmc_hostname (host->mmc), &res->start, host->mmc->f_max /1000000 );
Greg Kroah-Hartman
maintainerPATCH 703/737 pstore/ram: Check start of empty przs during init
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Enlin Mu <[email protected]>
commit fe8c3623ab06603eb760444a032d426542212021 upstream.
After commit 30696378f68a ("pstore/ram: Do not treat empty buffers as valid"), initialization would assume a prz was valid after seeing that the buffer_size is zero (regardless of the buffer start position). This unchecked start value means it could be outside the bounds of the buffer, leading to future access panics when written to:
sysdump_panic_event+0x3b4/0x5b8 atomic_notifier_call_chain+0x54/0x90 panic+0x1c8/0x42c die+0x29c/0x2a8 die_kernel_fault+0x68/0x78 __do_kernel_fault+0x1c4/0x1e0 do_bad_area+0x40/0x100 do_translation_fault+0x68/0x80 do_mem_abort+0x68/0xf8 el1_da+0x1c/0xc0 __raw_writeb+0x38/0x174 __memcpy_toio+0x40/0xac persistent_ram_update+0x44/0x12c persistent_ram_write+0x1a8/0x1b8 ramoops_pstore_write+0x198/0x1e8 pstore_console_write+0x94/0xe0 ...
To avoid this, also check if the prz start is 0 during the initialization phase. If not, the next prz sanity check case will discover it (start > size) and zap the buffer back to a sane state.
--- fs/pstore/ram_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/pstore/ram_core.c +1 -1
@@ -519,7 +519,7 @@ static int persistent_ram_post_init(stru sig ^=PERSISTENT_RAM_SIG ;if (prz->buffer->sig == sig) { -if (buffer_size (prz) ==0 ) { +if (buffer_size (prz) ==0 &&buffer_start (prz) ==0 ) {pr_debug ("found existing empty buffer\n" );return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 704/737 arm64: sdei: abort running SDEI handlers during crash
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: D Scott Phillips <[email protected]>
commit 5cd474e57368f0957c343bb21e309cf82826b1ef upstream.
Interrupts are blocked in SDEI context, per the SDEI spec: "The client interrupts cannot preempt the event handler." If we crashed in the SDEI handler-running context (as with ACPI's AGDI) then we need to clean up the SDEI state before proceeding to the crash kernel so that the crash kernel can have working interrupts.
Track the active SDEI handler per-cpu so that we can COMPLETE_AND_RESUME the handler, discarding the interrupted context.
--- arch/arm64/include/asm/sdei.h | 6 ++++++ arch/arm64/kernel/entry.S | 27 +++++++++++++++++++++++++-- arch/arm64/kernel/sdei.c | 3 +++ arch/arm64/kernel/smp.c | 8 ++++---- drivers/firmware/arm_sdei.c | 19 +++++++++++++++++++ include/linux/arm_sdei.h | 2 ++ 6 files changed, 59 insertions(+), 6 deletions(-)
arch/arm64/include/asm/sdei.h +6 -0
@@ -17,6 +17,9 @@#include <asm/virt.h> +DECLARE_PER_CPU(struct sdei_registered_event *, sdei_active_normal_event); +DECLARE_PER_CPU(struct sdei_registered_event *, sdei_active_critical_event); +extern unsigned long sdei_exit_mode;/* Software Delegated Exception entry point from firmware*/
@@ -29,6 +32,9 @@ asmlinkage void __sdei_asm_entry_trampolunsigned long pc, unsigned long pstate); +/* Abort a running handler. Context is discarded. */ +void __sdei_handler_abort (void ); +/* * The above entry point does the minimum to call C code. This function does * anything else, before calling the driver.
arch/arm64/kernel/entry.S +25 -2
@@ -1003,9 +1003,13 @@ SYM_CODE_START(__sdei_asm_handler) mov x19, x1 -#if defined(CONFIG_VMAP_STACK) || defined(CONFIG_SHADOW_CALL_STACK) + /* Store the registered-event for crash_smp_send_stop() */ ldrb w4, [x19, #SDEI_EVENT_PRIORITY] -#endif + cbnz w4, 1f + adr_this_cpu dst=x5, sym=sdei_active_normal_event, tmp=x6 + b 2f +1: adr_this_cpu dst=x5, sym=sdei_active_critical_event, tmp=x6 +2: str x19, [x5] #ifdef CONFIG_VMAP_STACK /*
@@ -1072,6 +1076,14 @@ SYM_CODE_START(__sdei_asm_handler) ldr_l x2, sdei_exit_mode + /* Clear the registered-event seen by crash_smp_send_stop() */ + ldrb w3, [x4, #SDEI_EVENT_PRIORITY] + cbnz w3, 1f + adr_this_cpu dst=x5, sym=sdei_active_normal_event, tmp=x6 + b 2f +1: adr_this_cpu dst=x5, sym=sdei_active_critical_event, tmp=x6 +2: str xzr, [x5] + alternative_if_not ARM64_UNMAP_KERNEL_AT_EL0 sdei_handler_exit exit_mode=x2 alternative_else_nop_endif
@@ -1082,4 +1094,15 @@ alternative_else_nop_endif #endif SYM_CODE_END(__sdei_asm_handler) NOKPROBE(__sdei_asm_handler) + +SYM_CODE_START(__sdei_handler_abort) + mov_q x0, SDEI_1_0_FN_SDEI_EVENT_COMPLETE_AND_RESUME + adr x1, 1f + ldr_l x2, sdei_exit_mode + sdei_handler_exit exit_mode=x2 + // exit the handler and jump to the next instruction. + // Exit will stomp x0-x17, PSTATE, ELR_ELx, and SPSR_ELx. +1: ret +SYM_CODE_END(__sdei_handler_abort) +NOKPROBE(__sdei_handler_abort) #endif /* CONFIG_ARM_SDE_INTERFACE */
arch/arm64/kernel/sdei.c +3 -0
@@ -47,6 +47,9 @@ DEFINE_PER_CPU(unsigned long *, sdei_sha DEFINE_PER_CPU(unsigned long *, sdei_shadow_call_stack_critical_ptr);#endif +DEFINE_PER_CPU(struct sdei_registered_event *, sdei_active_normal_event); +DEFINE_PER_CPU(struct sdei_registered_event *, sdei_active_critical_event); +static void _free_sdei_stack (unsigned long *__percpu *ptr,int cpu) {unsigned long *p;
arch/arm64/kernel/smp.c +4 -4
@@ -1048,10 +1048,8 @@ void crash_smp_send_stop(void)* If this cpu is the only one alive at this point in time, online or * not, there are no stop messages to be sent around, so just back out. */ -if (num_other_online_cpus () ==0 ) { -sdei_mask_local_cpu (); -return ; - } +if (num_other_online_cpus () ==0 ) + goto skip_ipi;cpumask_copy (&mask, cpu_online_mask);cpumask_clear_cpu (smp_processor_id (), &mask);
@@ -1070,7 +1068,9 @@ void crash_smp_send_stop(void)pr_warn ("SMP: failed to stop secondary CPUs %*pbl\n" ,cpumask_pr_args (&mask)); +skip_ipi:sdei_mask_local_cpu (); +sdei_handler_abort (); }bool smp_crash_stop_failed (void )
drivers/firmware/arm_sdei.c +19 -0
@@ -1095,3 +1095,22 @@ int sdei_event_handler(struct pt_regs *rreturn err; }NOKPROBE_SYMBOL (sdei_event_handler); + +void sdei_handler_abort (void ) +{ +/* +* If the crash happened in an SDEI event handler then we need to +* finish the handler with the firmware so that we can have working +* interrupts in the crash kernel. +*/ +if (__this_cpu_read (sdei_active_critical_event)) { +pr_warn ("still in SDEI critical event context, attempting to finish handler.\n" ); +__sdei_handler_abort (); +__this_cpu_write (sdei_active_critical_event,NULL ); + } +if (__this_cpu_read (sdei_active_normal_event)) { +pr_warn ("still in SDEI normal event context, attempting to finish handler.\n" ); +__sdei_handler_abort (); +__this_cpu_write (sdei_active_normal_event,NULL ); + } +}
include/linux/arm_sdei.h +2 -0
@@ -47,10 +47,12 @@ int sdei_unregister_ghes(struct ghes *ghint sdei_mask_local_cpu (void );int sdei_unmask_local_cpu (void );void __init sdei_init (void ); +void sdei_handler_abort (void );#else static inline int sdei_mask_local_cpu (void ) {return 0 ; }static inline int sdei_unmask_local_cpu (void ) {return 0 ; }static inline void sdei_init (void ) { } +static inline void sdei_handler_abort (void ) { }#endif /* CONFIG_ARM_SDE_INTERFACE */
Greg Kroah-Hartman
maintainerPATCH 705/737 regulator: dt-bindings: qcom,rpm: fix pattern for children
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
commit 75d9bf03e2fa38242b35e941ce7c7cdabe479961 upstream.
The "or" (|) in regular expression must be within parentheses, otherwise it is not really an "or" and it matches supplies:
qcom-apq8060-dragonboard.dtb: regulators-1: vdd_ncp-supply: [[34]] is not of type 'object'
--- .../devicetree/bindings/regulator/qcom,rpm-regulator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/regulator/qcom,rpm-regulator.yaml +1 -1
@@ -49,7 +49,7 @@ patternProperties: ".*-supply$": description: Input supply phandle(s) for this node - "^((s|l|lvs)[0-9]*)|(s[1-2][a-b])|(ncp)|(mvs)|(usb-switch)|(hdmi-switch)$": + "^((s|l|lvs)[0-9]*|s[1-2][a-b]|ncp|mvs|usb-switch|hdmi-switch)$": description: List of regulators and its properties $ref: regulator.yaml# unevaluatedProperties: false
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 706/737 iov_iter: Fix iov_iter_extract_pages() with zero-sized entries
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <[email protected]>
commit f741bd7178c95abd7aeac5a9d933ee542f9a5509 upstream.
iov_iter_extract_pages() doesn't correctly handle skipping over initial zero-length entries in ITER_KVEC and ITER_BVEC-type iterators.
The problem is that it accidentally reduces maxsize to 0 when it skipping and thus runs to the end of the array and returns 0.
Fix this by sticking the calculated size-to-copy in a new variable rather than back in maxsize.
--- lib/iov_iter.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)
lib/iov_iter.c +15 -15
@@ -2086,14 +2086,14 @@ static ssize_t iov_iter_extract_bvec_pag size_t *offset0) {struct page **p, *page; -size_t skip = i->iov_offset, offset; +size_t skip = i->iov_offset, offset, size;int k;for (;;) {if (i->nr_segs ==0 )return 0 ; - maxsize =min (maxsize, i->bvec->bv_len - skip); -if (maxsize) + size =min (maxsize, i->bvec->bv_len - skip); +if (size)break ; i->iov_offset =0 ; i->nr_segs--;
@@ -2106,16 +2106,16 @@ static ssize_t iov_iter_extract_bvec_pag offset = skip %PAGE_SIZE ; *offset0 = offset; - maxpages =want_pages_array (pages, maxsize, offset, maxpages); + maxpages =want_pages_array (pages, size, offset, maxpages);if (!maxpages)return -ENOMEM ; p = *pages;for (k =0 ; k < maxpages; k++) p[k] = page + k; - maxsize =min_t (size_t, maxsize, maxpages *PAGE_SIZE - offset); -iov_iter_advance (i, maxsize); -return maxsize; + size =min_t (size_t, size, maxpages *PAGE_SIZE - offset); +iov_iter_advance (i, size); +return size; }/*
@@ -2130,14 +2130,14 @@ static ssize_t iov_iter_extract_kvec_pag {struct page **p, *page;const void *kaddr; -size_t skip = i->iov_offset, offset, len; +size_t skip = i->iov_offset, offset, len, size;int k;for (;;) {if (i->nr_segs ==0 )return 0 ; - maxsize =min (maxsize, i->kvec->iov_len - skip); -if (maxsize) + size =min (maxsize, i->kvec->iov_len - skip); +if (size)break ; i->iov_offset =0 ; i->nr_segs--;
@@ -2149,13 +2149,13 @@ static ssize_t iov_iter_extract_kvec_pag offset = (unsigned long )kaddr & ~PAGE_MASK ; *offset0 = offset; - maxpages =want_pages_array (pages, maxsize, offset, maxpages); + maxpages =want_pages_array (pages, size, offset, maxpages);if (!maxpages)return -ENOMEM ; p = *pages; kaddr -= offset; - len = offset + maxsize; + len = offset + size;for (k =0 ; k < maxpages; k++) {size_t seg =min_t (size_t, len,PAGE_SIZE );
@@ -2169,9 +2169,9 @@ static ssize_t iov_iter_extract_kvec_pag kaddr +=PAGE_SIZE ; } - maxsize =min_t (size_t, maxsize, maxpages *PAGE_SIZE - offset); -iov_iter_advance (i, maxsize); -return maxsize; + size =min_t (size_t, size, maxpages *PAGE_SIZE - offset); +iov_iter_advance (i, size); +return size; }/*
Greg Kroah-Hartman
maintainerPATCH 707/737 s390/dcssblk: fix kernel crash with list_add corruption
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gerald Schaefer <[email protected]>
commit c8f40a0bccefd613748d080147469a4652d6e74c upstream.
Commit fb08a1908cb1 ("dax: simplify the dax_device <-> gendisk association") introduced new logic for gendisk association, requiring drivers to explicitly call dax_add_host() and dax_remove_host().
For dcssblk driver, some dax_remove_host() calls were missing, e.g. in device remove path. The commit also broke error handling for out_dax case in device add path, resulting in an extra put_device() w/o the previous get_device() in that case.
This lead to stale xarray entries after device add / remove cycles. In the case when a previously used struct gendisk pointer (xarray index) would be used again, because blk_alloc_disk() happened to return such a pointer, the xa_insert() in dax_add_host() would fail and go to out_dax, doing the extra put_device() in the error path. In combination with an already flawed error handling in dcssblk (device_register() cleanup), which needs to be addressed in a separate patch, this resulted in a missing device_del() / klist_del(), and eventually in the kernel crash with list_add corruption on a subsequent device_add() / klist_add().
Fix this by adding the missing dax_remove_host() calls, and also move the put_device() in the error path to restore the previous logic.
--- drivers/s390/block/dcssblk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/s390/block/dcssblk.c +3 -1
@@ -411,6 +411,7 @@ removeseg: }list_del (&dev_info->lh); +dax_remove_host (dev_info->gd);kill_dax (dev_info->dax_dev);put_dax (dev_info->dax_dev);del_gendisk (dev_info->gd);
@@ -706,9 +707,9 @@ dcssblk_add_store(struct device *dev, st goto out; out_dax_host: +put_device (&dev_info->dev);dax_remove_host (dev_info->gd); out_dax: -put_device (&dev_info->dev);kill_dax (dev_info->dax_dev);put_dax (dev_info->dax_dev); put_dev:
@@ -788,6 +789,7 @@ dcssblk_remove_store(struct device *dev, }list_del (&dev_info->lh); +dax_remove_host (dev_info->gd);kill_dax (dev_info->dax_dev);put_dax (dev_info->dax_dev);del_gendisk (dev_info->gd);
Greg Kroah-Hartman
maintainerPATCH 708/737 s390/ipl: add missing secure/has_secure file to ipl type unknown
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sven Schnelle <[email protected]>
commit ea5717cb13468323a7c3dd394748301802991f39 upstream.
OS installers are relying on /sys/firmware/ipl/has_secure to be present on machines supporting secure boot. This file is present for all IPL types, but not the unknown type, which prevents a secure installation when an LPAR is booted in HMC via FTP(s), because this is an unknown IPL type in linux. While at it, also add the secure file.
--- arch/s390/kernel/ipl.c | 2 ++ 1 file changed, 2 insertions(+)
arch/s390/kernel/ipl.c +2 -0
@@ -638,6 +638,8 @@ static struct attribute_group ipl_ccw_atstatic struct attribute *ipl_unknown_attrs[] = { &sys_ipl_type_attr.attr, + &sys_ipl_secure_attr.attr, + &sys_ipl_has_secure_attr.attr,NULL , };
Greg Kroah-Hartman
maintainerPATCH 709/737 s390/dasd: fix string length handling
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Carstens <[email protected]>
commit f7cf22424665043787a96a66a048ff6b2cfd473c upstream.
Building dasd_eckd.o with latest clang reveals this bug:
CC drivers/s390/block/dasd_eckd.o
drivers/s390/block/dasd_eckd.c:1082:3: warning: 'snprintf' will always be truncated; specified size is 1, but format string expands to at least 11 [-Wfortify-source]
1082 | snprintf(print_uid, sizeof(*print_uid),
| ^
drivers/s390/block/dasd_eckd.c:1087:3: warning: 'snprintf' will always be truncated; specified size is 1, but format string expands to at least 10 [-Wfortify-source]
1087 | snprintf(print_uid, sizeof(*print_uid),
| ^
Fix this by moving and using the existing UID_STRLEN for the arrays that are being written to. Also rename UID_STRLEN to DASD_UID_STRLEN to clarify its scope.
--- drivers/s390/block/dasd_devmap.c | 6 +----- drivers/s390/block/dasd_eckd.c | 10 +++++----- drivers/s390/block/dasd_int.h | 4 ++++ 3 files changed, 10 insertions(+), 10 deletions(-)
drivers/s390/block/dasd_devmap.c +1 -5
@@ -1378,16 +1378,12 @@ static ssize_t dasd_vendor_show(struct d static DEVICE_ATTR(vendor, 0444, dasd_vendor_show, NULL); -#define UID_STRLEN ( /* vendor */ 3 + 1 + /* serial */ 14 + 1 +\ - /* SSID */ 4 + 1 + /* unit addr */ 2 + 1 +\ - /* vduit */ 32 + 1) -static ssize_t dasd_uid_show (struct device *dev,struct device_attribute *attr,char *buf) { +char uid_string[DASD_UID_STRLEN ];struct dasd_device *device;struct dasd_uid uid; -char uid_string[UID_STRLEN ];char ua_string[3 ]; device =dasd_device_from_cdev (to_ccwdev (dev));
drivers/s390/block/dasd_eckd.c +5 -5
@@ -1079,12 +1079,12 @@ static void dasd_eckd_get_uid_string(strcreate_uid (conf, &uid);if (strlen (uid.vduit) >0 ) -snprintf (print_uid,sizeof (*print_uid), +snprintf (print_uid,DASD_UID_STRLEN ,"%s.%s.%04x.%02x.%s" , uid.vendor, uid.serial, uid.ssid, uid.real_unit_addr, uid.vduit);else -snprintf (print_uid,sizeof (*print_uid), +snprintf (print_uid,DASD_UID_STRLEN ,"%s.%s.%04x.%02x" , uid.vendor, uid.serial, uid.ssid, uid.real_unit_addr);
@@ -1093,8 +1093,8 @@ static void dasd_eckd_get_uid_string(strstatic int dasd_eckd_check_cabling (struct dasd_device *device,void *conf_data,__u8 lpm) { +char print_path_uid[DASD_UID_STRLEN ], print_device_uid[DASD_UID_STRLEN ];struct dasd_eckd_private *private = device->private; -char print_path_uid[60 ], print_device_uid[60 ];struct dasd_conf path_conf; path_conf.data = conf_data;
@@ -1293,9 +1293,9 @@ static void dasd_eckd_path_available_act__u8 path_rcd_buf[DASD_ECKD_RCD_DATA_SIZE ];__u8 lpm, opm, npm, ppm, epm, hpfpm, cablepm;struct dasd_conf_data *conf_data; +char print_uid[DASD_UID_STRLEN ];struct dasd_conf path_conf;unsigned long flags; -char print_uid[60 ];int rc, pos; opm =0 ;
@@ -5855,8 +5855,8 @@ static void dasd_eckd_dump_sense(structstatic int dasd_eckd_reload_device (struct dasd_device *device) {struct dasd_eckd_private *private = device->private; +char print_uid[DASD_UID_STRLEN ];int rc, old_base; -char print_uid[60 ];struct dasd_uid uid;unsigned long flags;
drivers/s390/block/dasd_int.h +4 -0
@@ -259,6 +259,10 @@ struct dasd_uid {char vduit[33 ]; }; +#define DASD_UID_STRLEN (/* vendor */ 3 +1 +/* serial */ 14 +1 + \ +/* SSID */ 4 +1 +/* unit addr */ 2 +1 + \ + /* vduit */ 32 + 1) +/* * PPRC Status data */
Greg Kroah-Hartman
maintainerPATCH 710/737 HID: logitech-hidpp: rework one more time the retries attempts
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Tissoires <[email protected]>
commit 60165ab774cb0c509680a73cf826d0e158454653 upstream.
Extract the internal code inside a helper function, fix the initialization of the parameters used in the helper function (hidpp->answer_available was not reset and *response wasn't either), and use a do {...} while(); loop.
--- drivers/hid/hid-logitech-hidpp.c | 115 ++++++++++++++++++++----------- 1 file changed, 75 insertions(+), 40 deletions(-)
drivers/hid/hid-logitech-hidpp.c +75 -40
@@ -275,21 +275,22 @@ static int __hidpp_send_report(struct hid_device *hdev, }/* -* hidpp_send_message_sync() returns 0 in case of success, and something else -* in case of a failure. -* - If ' something else' is positive, that means that an error has been raised -* by the protocol itself. -* - If ' something else' is negative, that means that we had a classic error -* (-ENOMEM, -EPIPE, etc...) +* Effectively send the message to the device, waiting for its answer. +* +* Must be called with hidpp->send_mutex locked +* +* Same return protocol than hidpp_send_message_sync(): +* - success on 0 +* - negative error means transport error +* - positive value means protocol error */ -static int hidpp_send_message_sync (struct hidpp_device *hidpp, +static int __do_hidpp_send_message_sync (struct hidpp_device *hidpp,struct hidpp_report *message,struct hidpp_report *response) { -int ret =-1 ; -int max_retries =3 ; +int ret; -mutex_lock (&hidpp->send_mutex); +__must_hold (&hidpp->send_mutex); hidpp->send_receive_buf = response; hidpp->answer_available = false;
@@ -300,47 +301,74 @@ static int hidpp_send_message_sync(struct hidpp_device *hidpp,*/ *response = *message; -for (; max_retries !=0 && ret; max_retries--) { - ret =__hidpp_send_report (hidpp->hid_dev, message); + ret =__hidpp_send_report (hidpp->hid_dev, message); +if (ret) { +dbg_hid ("__hidpp_send_report returned err: %d\n" , ret); +memset (response,0 ,sizeof (struct hidpp_report )); +return ret; + } -if (ret) { -dbg_hid ("__hidpp_send_report returned err: %d\n" , ret); -memset (response,0 ,sizeof (struct hidpp_report )); -break ; - } +if (!wait_event_timeout (hidpp->wait, hidpp->answer_available, +5 *HZ )) { +dbg_hid ("%s:timeout waiting for response\n" , __func__); +memset (response,0 ,sizeof (struct hidpp_report )); +return -ETIMEDOUT ; + } -if (!wait_event_timeout (hidpp->wait, hidpp->answer_available, -5 *HZ )) { -dbg_hid ("%s:timeout waiting for response\n" , __func__); -memset (response,0 ,sizeof (struct hidpp_report )); - ret = -ETIMEDOUT ; -break ; - } +if (response->report_id ==REPORT_ID_HIDPP_SHORT && + response->rap.sub_id ==HIDPP_ERROR ) { + ret = response->rap.params[1 ]; +dbg_hid ("%s:got hidpp error %02X\n" , __func__, ret); +return ret; + } -if (response->report_id ==REPORT_ID_HIDPP_SHORT && - response->rap.sub_id ==HIDPP_ERROR ) { - ret = response->rap.params[1 ]; -dbg_hid ("%s:got hidpp error %02X\n" , __func__, ret); +if ((response->report_id ==REPORT_ID_HIDPP_LONG || + response->report_id ==REPORT_ID_HIDPP_VERY_LONG ) && + response->fap.feature_index ==HIDPP20_ERROR ) { + ret = response->fap.params[1 ]; +dbg_hid ("%s:got hidpp 2.0 error %02X\n" , __func__, ret); +return ret; + } + +return 0 ; +} + +/* +* hidpp_send_message_sync() returns 0 in case of success, and something else +* in case of a failure. +* +* See __do_hidpp_send_message_sync() for a detailed explanation of the returned +* value. +*/ +static int hidpp_send_message_sync (struct hidpp_device *hidpp, +struct hidpp_report *message, +struct hidpp_report *response) +{ +int ret; +int max_retries =3 ; + +mutex_lock (&hidpp->send_mutex); + +do { + ret =__do_hidpp_send_message_sync (hidpp, message, response); +if (ret !=HIDPP20_ERROR_BUSY )break ; - } -if ((response->report_id ==REPORT_ID_HIDPP_LONG || - response->report_id ==REPORT_ID_HIDPP_VERY_LONG ) && - response->fap.feature_index ==HIDPP20_ERROR ) { - ret = response->fap.params[1 ]; -if (ret !=HIDPP20_ERROR_BUSY ) { -dbg_hid ("%s:got hidpp 2.0 error %02X\n" , __func__, ret); -break ; - } -dbg_hid ("%s:got busy hidpp 2.0 error %02X, retrying\n" , __func__, ret); - } - } +dbg_hid ("%s:got busy hidpp 2.0 error %02X, retrying\n" , __func__, ret); + }while (--max_retries);mutex_unlock (&hidpp->send_mutex);return ret; } +/* +* hidpp_send_fap_command_sync() returns 0 in case of success, and something else +* in case of a failure. +* +* See __do_hidpp_send_message_sync() for a detailed explanation of the returned +* value. +*/ static int hidpp_send_fap_command_sync (struct hidpp_device *hidpp,u8 feat_index,u8 funcindex_clientid,u8 *params,int param_count,struct hidpp_report *response)
@@ -373,6 +401,13 @@ static int hidpp_send_fap_command_sync(struct hidpp_device *hidpp,return ret; } +/* +* hidpp_send_rap_command_sync() returns 0 in case of success, and something else +* in case of a failure. +* +* See __do_hidpp_send_message_sync() for a detailed explanation of the returned +* value. +*/ static int hidpp_send_rap_command_sync (struct hidpp_device *hidpp_dev,u8 report_id,u8 sub_id,u8 reg_address,u8 *params,int param_count,struct hidpp_report *response)
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 711/737 crypto: stm32 - fix loop iterating through scatterlist for DMA
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Bourgoin <[email protected]>
commit d9c83f71eeceed2cb54bb78be84f2d4055fd9a1f upstream.
We were reading the length of the scatterlist sg after copying value of tsg inside.
So we are using the size of the previous scatterlist and for the first one we are using an unitialised value.
Fix this by copying tsg in sg[0] before reading the size.
--- drivers/crypto/stm32/stm32-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/stm32/stm32-hash.c +1 -1
@@ -627,9 +627,9 @@ static int stm32_hash_dma_send(struct st }for_each_sg (rctx->sg, tsg, rctx->nents, i) { + sg[0 ] = *tsg; len = sg->length; - sg[0 ] = *tsg;if (sg_is_last (sg)) {if (hdev->dma_mode ==1 ) { len = (ALIGN (sg->length,16 ) -16 );
Greg Kroah-Hartman
maintainerPATCH 712/737 crypto: stm32 - fix MDMAT condition
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Bourgoin <[email protected]>
commit a4adfbc2544933ac12e7fbd50708290265546dbc upstream.
If IP has MDMAT support, set or reset the bit MDMAT in Control Register.
--- drivers/crypto/stm32/stm32-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/stm32/stm32-hash.c +1 -1
@@ -492,7 +492,7 @@ static int stm32_hash_xmit_dma(struct st reg =stm32_hash_read (hdev,HASH_CR ); -if (!hdev->pdata->has_mdmat) { +if (hdev->pdata->has_mdmat) {if (mdma) reg |=HASH_CR_MDMAT ;else
Greg Kroah-Hartman
maintainerPATCH 713/737 cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gustavo A. R. Silva <[email protected]>
commit e520d0b6be950ce3738cf4b9bd3b392be818f1dc upstream.
Allocate extra space for terminating element at:
drivers/cpufreq/brcmstb-avs-cpufreq.c:
449 table[i].frequency = CPUFREQ_TABLE_END;
and add code comment to make this clear.
This fixes the following -Warray-bounds warning seen after building
ARM with multi_v7_defconfig (GCC 13):
In function 'brcm_avs_get_freq_table',
inlined from 'brcm_avs_cpufreq_init' at drivers/cpufreq/brcmstb-avs-cpufreq.c:623:15:drivers/cpufreq/brcmstb-avs-cpufreq.c:449:28: warning: array subscript 5 is outside array bounds of 'void[60]' [-Warray-bounds=]
449 | table[i].frequency = CPUFREQ_TABLE_END;
In file included from include/linux/node.h:18,
from include/linux/cpu.h:17,
from include/linux/cpufreq.h:12,
from drivers/cpufreq/brcmstb-avs-cpufreq.c:44:
In function 'devm_kmalloc_array',
inlined from 'devm_kcalloc' at include/linux/device.h:328:9,
inlined from 'brcm_avs_get_freq_table' at drivers/cpufreq/brcmstb-avs-cpufreq.c:437:10,
inlined from 'brcm_avs_cpufreq_init' at drivers/cpufreq/brcmstb-avs-cpufreq.c:623:15:include/linux/device.h:323:16: note: at offset 60 into object of size 60 allocated by 'devm_kmalloc'
323 | return devm_kmalloc(dev, bytes, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -Warray-bounds.
--- drivers/cpufreq/brcmstb-avs-cpufreq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/cpufreq/brcmstb-avs-cpufreq.c +5 -1
@@ -434,7 +434,11 @@ brcm_avs_get_freq_table(struct device *dif (ret)return ERR_PTR (ret); - table =devm_kcalloc (dev,AVS_PSTATE_MAX +1 ,sizeof (*table), +/* +* We allocate space for the 5 different P-STATES AVS, +* plus extra space for a terminating element. +*/ + table =devm_kcalloc (dev,AVS_PSTATE_MAX +1 +1 ,sizeof (*table),GFP_KERNEL );if (!table)return ERR_PTR (-ENOMEM );
Greg Kroah-Hartman
maintainerPATCH 714/737 of: property: fw_devlink: Add a devlink for panel followers
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Anderson <[email protected]>
commit fbf0ea2da3c7cd0b33ed7ae53a67ab1c24838cba upstream.
Inform fw_devlink of the fact that a panel follower (like a touchscreen) is effectively a consumer of the panel from the purposes of fw_devlink.
NOTE: this patch isn't required for correctness but instead optimizes probe order / helps avoid deferrals.
--- drivers/of/property.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/of/property.c +2 -0
@@ -1266,6 +1266,7 @@ DEFINE_SIMPLE_PROP(pwms, "pwms", "#pwm-c DEFINE_SIMPLE_PROP(resets, "resets", "#reset-cells") DEFINE_SIMPLE_PROP(leds, "leds", NULL) DEFINE_SIMPLE_PROP(backlight, "backlight", NULL) +DEFINE_SIMPLE_PROP(panel, "panel", NULL) DEFINE_SUFFIX_PROP(regulators, "-supply", NULL)DEFINE_SUFFIX_PROP (gpio,"-gpio" ,"#gpio-cells" )
@@ -1354,6 +1355,7 @@ static const struct supplier_bindings of { .parse_prop = parse_resets, }, { .parse_prop = parse_leds, }, { .parse_prop = parse_backlight, }, + { .parse_prop = parse_panel, }, { .parse_prop = parse_gpio_compat, }, { .parse_prop = parse_interrupts, }, { .parse_prop = parse_regulators, },
Greg Kroah-Hartman
maintainerPATCH 715/737 usb: typec: tcpm: set initial svdm version based on pd revision
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: RD Babiera <[email protected]>
commit c97cd0b4b54eb42aed7f6c3c295a2d137f6d2416 upstream.
When sending Discover Identity messages to a Port Partner that uses Power Delivery v2 and SVDM v1, we currently send PD v2 messages with SVDM v2.0, expecting the port partner to respond with its highest supported SVDM version as stated in Section 6.4.4.2.3 in the Power Delivery v3 specification. However, sending SVDM v2 to some Power Delivery v2 port partners results in a NAK whereas sending SVDM v1 does not.
NAK messages can be handled by the initiator (PD v3 section 6.4.4.2.5.1), and one solution could be to resend Discover Identity on a lower SVDM version if possible. But, Section 6.4.4.3 of PD v2 states that "A NAK response Should be taken as an indication not to retry that particular Command."
Instead, we can set the SVDM version to the maximum one supported by the negotiated PD revision. When operating in PD v2, this obeys Section 6.4.4.2.3, which states the SVDM field "Shall be set to zero to indicate Version 1.0." In PD v3, the SVDM field "Shall be set to 01b to indicate Version 2.0."
--- drivers/usb/typec/tcpm/tcpm.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-)
drivers/usb/typec/tcpm/tcpm.c +31 -4
@@ -3935,6 +3935,29 @@ static enum typec_cc_status tcpm_pwr_opm } } +static void tcpm_set_initial_svdm_version (struct tcpm_port *port) +{ +switch (port->negotiated_rev) { +case PD_REV30 : +break ; +/* +* 6.4.4.2.3 Structured VDM Version +* 2.0 states "At this time, there is only one version (1.0) defined. +* This field Shall be set to zero to indicate Version 1.0." +* 3.0 states "This field Shall be set to 01b to indicate Version 2.0." +* To ensure that we follow the Power Delivery revision we are currently +* operating on, downgrade the SVDM version to the highest one supported +* by the Power Delivery revision. +*/ +case PD_REV20 : +typec_partner_set_svdm_version (port->partner,SVDM_VER_1_0 ); +break ; +default : +typec_partner_set_svdm_version (port->partner,SVDM_VER_1_0 ); +break ; + } +} +static void run_state_machine (struct tcpm_port *port) {int ret;
@@ -4172,10 +4195,12 @@ static void run_state_machine(struct tcp* For now, this driver only supports SOP for DISCOVER_IDENTITY, thus using * port->explicit_contract to decide whether to send the command. */ -if (port->explicit_contract) +if (port->explicit_contract) { +tcpm_set_initial_svdm_version (port);mod_send_discover_delayed_work (port,0 ); -else + }else { port->send_discover = false; + }/* * 6.3.5
@@ -4462,10 +4487,12 @@ static void run_state_machine(struct tcp* For now, this driver only supports SOP for DISCOVER_IDENTITY, thus using * port->explicit_contract. */ -if (port->explicit_contract) +if (port->explicit_contract) { +tcpm_set_initial_svdm_version (port);mod_send_discover_delayed_work (port,0 ); -else + }else { port->send_discover = false; + }power_supply_changed (port->psy);break ;
Greg Kroah-Hartman
maintainerPATCH 716/737 usb: typec: bus: verify partner exists in typec_altmode_attention
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: RD Babiera <[email protected]>
commit f23643306430f86e2f413ee2b986e0773e79da31 upstream.
Some usb hubs will negotiate DisplayPort Alt mode with the device but will then negotiate a data role swap after entering the alt mode. The data role swap causes the device to unregister all alt modes, however the usb hub will still send Attention messages even after failing to reregister the Alt Mode. type_altmode_attention currently does not verify whether or not a device's altmode partner exists, which results in a NULL pointer error when dereferencing the typec_altmode and typec_altmode_ops belonging to the altmode partner.
Verify the presence of a device's altmode partner before sending the Attention message to the Alt Mode driver.
--- drivers/usb/typec/bus.c | 12 ++++++++++-- drivers/usb/typec/tcpm/tcpm.c | 3 ++- include/linux/usb/typec_altmode.h | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-)
drivers/usb/typec/bus.c +10 -2
@@ -183,12 +183,20 @@ EXPORT_SYMBOL_GPL(typec_altmode_exit);* * Notifies the partner of @adev about Attention command. */ -void typec_altmode_attention (struct typec_altmode *adev,u32 vdo) +int typec_altmode_attention (struct typec_altmode *adev,u32 vdo) { -struct typec_altmode *pdev = &to_altmode (adev)->partner->adev; +struct altmode *partner =to_altmode (adev)->partner; +struct typec_altmode *pdev; + +if (!partner) +return -ENODEV ; + + pdev = &partner->adev;if (pdev->ops && pdev->ops->attention) pdev->ops->attention (pdev, vdo); + +return 0 ; }EXPORT_SYMBOL_GPL (typec_altmode_attention);
drivers/usb/typec/tcpm/tcpm.c +2 -1
@@ -1877,7 +1877,8 @@ static void tcpm_handle_vdm_request(stru }break ;case ADEV_ATTENTION : -typec_altmode_attention (adev, p[1 ]); +if (typec_altmode_attention (adev, p[1 ])) +tcpm_log (port,"typec_altmode_attention no port partner altmode" );break ; } }
include/linux/usb/typec_altmode.h +1 -1
@@ -67,7 +67,7 @@ struct typec_altmode_ops {int typec_altmode_enter (struct typec_altmode *altmode,u32 *vdo);int typec_altmode_exit (struct typec_altmode *altmode); -void typec_altmode_attention (struct typec_altmode *altmode,u32 vdo); +int typec_altmode_attention (struct typec_altmode *altmode,u32 vdo);int typec_altmode_vdm (struct typec_altmode *altmode,const u32 header,const u32 *vdo,int count); int typec_altmode_notify(struct typec_altmode *altmode, unsigned long conf,
Greg Kroah-Hartman
maintainerPATCH 717/737 USB: core: Unite old scheme and new scheme descriptor reads
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alan Stern <[email protected]>
commit 85d07c55621676d47d873d2749b88f783cd4d5a1 upstream.
In preparation for reworking the usb_get_device_descriptor() routine, it is desirable to unite the two different code paths responsible for initially determining endpoint 0's maximum packet size in a newly discovered USB device. Making this determination presents a chicken-and-egg sort of problem, in that the only way to learn the maxpacket value is to get it from the device descriptor retrieved from the device, but communicating with the device to retrieve a descriptor requires us to know beforehand the ep0 maxpacket size.
In practice this problem is solved in two different ways, referred to in hub.c as the "old scheme" and the "new scheme". The old scheme (which is the approach recommended by the USB-2 spec) involves asking the device to send just the first eight bytes of its device descriptor. Such a transfer uses packets containing no more than eight bytes each, and every USB device must have an ep0 maxpacket size
Quoted 1 line
= 8, so this should succeed. Since the bMaxPacketSize0 field of the
device descriptor lies within the first eight bytes, this is all we need.
The new scheme is an imitation of the technique used in an early Windows USB implementation, giving it the happy advantage of working with a wide variety of devices (some of them at the time would not work with the old scheme, although that's probably less true now). It involves making an initial guess of the ep0 maxpacket size, asking the device to send up to 64 bytes worth of its device descriptor (which is only 18 bytes long), and then resetting the device to clear any error condition that might have resulted from the guess being wrong. The initial guess is determined by the connection speed; it should be correct in all cases other than full speed, for which the allowed values are 8, 16, 32, and 64 (in this case the initial guess is 64).
The reason for this patch is that the old- and new-scheme parts of hub_port_init() use different code paths, one involving usb_get_device_descriptor() and one not, for their initial reads of the device descriptor. Since these reads have essentially the same purpose and are made under essentially the same circumstances, this is illogical. It makes more sense to have both of them use a common subroutine.
This subroutine does basically what the new scheme's code did, because that approach is more general than the one used by the old scheme. It only needs to know how many bytes to transfer and whether or not it is being called for the first iteration of a retry loop (in case of certain time-out errors). There are two main differences from the former code:
We initialize the bDescriptorType field of the transfer buffer to 0 before performing the transfer, to avoid possibly accessing an uninitialized value afterward.
We read the device descriptor into a temporary buffer rather than storing it directly into udev->descriptor, which the old scheme implementation used to do.
Since the whole point of this first read of the device descriptor is to determine the bMaxPacketSize0 value, that is what the new routine returns (or an error code). The value is stored in a local variable rather than in udev->descriptor. As a side effect, this necessitates moving a section of code that checks the bcdUSB field for SuperSpeed devices until after the full device descriptor has been retrieved.
--- drivers/usb/core/hub.c | 173 ++++++++++++++++++++++++++----------------------- 1 file changed, 94 insertions(+), 79 deletions(-)
drivers/usb/core/hub.c +94 -79
@@ -4703,6 +4703,67 @@ static int hub_enable_device(struct usb_return hcd->driver->enable_device (hcd, udev); } +/* +* Get the bMaxPacketSize0 value during initialization by reading the +* device's device descriptor. Since we don't already know this value, +* the transfer is unsafe and it ignores I/O errors, only testing for +* reasonable received values. +* +* For "old scheme" initialization, size will be 8 so we read just the +* start of the device descriptor, which should work okay regardless of +* the actual bMaxPacketSize0 value. For "new scheme" initialization, +* size will be 64 (and buf will point to a sufficiently large buffer), +* which might not be kosher according to the USB spec but it's what +* Windows does and what many devices expect. +* +* Returns: bMaxPacketSize0 or a negative error code. +*/ +static int get_bMaxPacketSize0 (struct usb_device *udev, +struct usb_device_descriptor *buf,int size,bool first_time) +{ +int i, rc; + +/* +* Retry on all errors; some devices are flakey. +* 255 is for WUSB devices, we actually need to use +* 512 (WUSB1.0[4.8.1]). +*/ +for (i =0 ; i <GET_MAXPACKET0_TRIES ; ++i) { +/* Start with invalid values in case the transfer fails */ + buf->bDescriptorType = buf->bMaxPacketSize0 =0 ; + rc =usb_control_msg (udev,usb_rcvaddr0pipe (), +USB_REQ_GET_DESCRIPTOR ,USB_DIR_IN , +USB_DT_DEVICE <<8 ,0 , + buf, size, + initial_descriptor_timeout); +switch (buf->bMaxPacketSize0) { +case 8 :case 16 :case 32 :case 64 :case 255 : +if (buf->bDescriptorType ==USB_DT_DEVICE ) { + rc = buf->bMaxPacketSize0; +break ; + } + fallthrough; +default : +if (rc >=0 ) + rc = -EPROTO ; +break ; + } + +/* +* Some devices time out if they are powered on +* when already connected. They need a second +* reset, so return early. But only on the first +* attempt, lest we get into a time-out/reset loop. +*/ +if (rc >0 || (rc == -ETIMEDOUT && first_time && + udev->speed >USB_SPEED_FULL )) +break ; + } +return rc; +} + +#define GET_DESCRIPTOR_BUFSIZE 64 +/* Reset device, (re)assign address, get device descriptor. * Device connection must be stable, no more debouncing needed. * Returns device in USB_STATE_ADDRESS, except on error.
@@ -4727,6 +4788,12 @@ hub_port_init(struct usb_hub *hub, strucint devnum = udev->devnum;const char *driver_name;bool do_new_scheme; +int maxp0; +struct usb_device_descriptor *buf; + + buf =kmalloc (GET_DESCRIPTOR_BUFSIZE ,GFP_NOIO ); +if (!buf) +return -ENOMEM ;/* root hub ports have a slightly longer reset period * (from USB 2.0 spec, section 7.1.7.5)
@@ -4846,9 +4913,6 @@ hub_port_init(struct usb_hub *hub, struc }if (do_new_scheme) { -struct usb_device_descriptor *buf; -int r =0 ; - retval =hub_enable_device (udev);if (retval <0 ) { dev_err(&udev->dev,
@@ -4857,52 +4921,8 @@ hub_port_init(struct usb_hub *hub, struc goto fail; } -#define GET_DESCRIPTOR_BUFSIZE 64 - buf =kmalloc (GET_DESCRIPTOR_BUFSIZE ,GFP_NOIO ); -if (!buf) { - retval = -ENOMEM ; -continue ; - } - -/* Retry on all errors; some devices are flakey. -* 255 is for WUSB devices, we actually need to use -* 512 (WUSB1.0[4.8.1]). -*/ -for (operations =0 ; operations <GET_MAXPACKET0_TRIES ; - ++operations) { - buf->bMaxPacketSize0 =0 ; - r =usb_control_msg (udev,usb_rcvaddr0pipe (), -USB_REQ_GET_DESCRIPTOR ,USB_DIR_IN , -USB_DT_DEVICE <<8 ,0 , - buf,GET_DESCRIPTOR_BUFSIZE , - initial_descriptor_timeout); -switch (buf->bMaxPacketSize0) { -case 8 :case 16 :case 32 :case 64 :case 255 : -if (buf->bDescriptorType == -USB_DT_DEVICE ) { - r =0 ; -break ; - } - fallthrough; -default : -if (r ==0 ) - r = -EPROTO ; -break ; - } -/* -* Some devices time out if they are powered on -* when already connected. They need a second -* reset. But only on the first attempt, -* lest we get into a time out/reset loop -*/ -if (r ==0 || (r == -ETIMEDOUT && - retries ==0 && - udev->speed >USB_SPEED_FULL )) -break ; - } - udev->descriptor.bMaxPacketSize0 = - buf->bMaxPacketSize0; -kfree (buf); + maxp0 =get_bMaxPacketSize0 (udev, buf, +GET_DESCRIPTOR_BUFSIZE , retries ==0 ); retval =hub_port_reset (hub, port1, udev, delay, false);if (retval <0 )/* error or disconnect */
@@ -4913,14 +4933,13 @@ hub_port_init(struct usb_hub *hub, struc retval = -ENODEV ; goto fail; } -if (r) { -if (r != -ENODEV ) +if (maxp0 <0 ) { +if (maxp0 != -ENODEV )dev_err (&udev->dev,"device descriptor read/64, error %d\n" , - r); - retval = -EMSGSIZE ; + maxp0); + retval = maxp0;continue ; } -#undef GET_DESCRIPTOR_BUFSIZE }/*
@@ -4966,19 +4985,17 @@ hub_port_init(struct usb_hub *hub, strucbreak ; } - retval =usb_get_device_descriptor (udev,8 ); -if (retval <8 ) { +/* !do_new_scheme || wusb */ + maxp0 =get_bMaxPacketSize0 (udev, buf,8 , retries ==0 ); +if (maxp0 <0 ) { + retval = maxp0;if (retval != -ENODEV )dev_err (&udev->dev,"device descriptor read/8, error %d\n" , retval); -if (retval >=0 ) - retval = -EMSGSIZE ; }else {u32 delay; - retval =0 ; - delay = udev->parent->hub_delay; udev->hub_delay =min_t (u32, delay,USB_TP_TRANSMISSION_DELAY_MAX );
@@ -4995,27 +5012,10 @@ hub_port_init(struct usb_hub *hub, strucif (retval) goto fail; -/* -* Some superspeed devices have finished the link training process -* and attached to a superspeed hub port, but the device descriptor -* got from those devices show they aren't superspeed devices. Warm -* reset the port attached by the devices can fix them. -*/ -if ((udev->speed >=USB_SPEED_SUPER ) && - (le16_to_cpu (udev->descriptor.bcdUSB) <0x0300 )) { -dev_err (&udev->dev,"got a wrong device descriptor, " -"warm reset device\n" ); -hub_port_reset (hub, port1, udev, -HUB_BH_RESET_TIME , true); - retval = -EINVAL ; - goto fail; - } - -if (udev->descriptor.bMaxPacketSize0 ==0xff || - udev->speed >=USB_SPEED_SUPER ) +if (maxp0 ==0xff || udev->speed >=USB_SPEED_SUPER ) i =512 ;else - i = udev->descriptor.bMaxPacketSize0; + i = maxp0;if (usb_endpoint_maxp (&udev->ep0.desc) != i) {if (udev->speed ==USB_SPEED_LOW || !(i ==8 || i ==16 || i ==32 || i ==64 )) {
@@ -5041,6 +5041,20 @@ hub_port_init(struct usb_hub *hub, struc goto fail; } +/* +* Some superspeed devices have finished the link training process +* and attached to a superspeed hub port, but the device descriptor +* got from those devices show they aren't superspeed devices. Warm +* reset the port attached by the devices can fix them. +*/ +if ((udev->speed >=USB_SPEED_SUPER ) && + (le16_to_cpu (udev->descriptor.bcdUSB) <0x0300 )) { +dev_err (&udev->dev,"got a wrong device descriptor, warm reset device\n" ); +hub_port_reset (hub, port1, udev,HUB_BH_RESET_TIME , true); + retval = -EINVAL ; + goto fail; + } +usb_detect_quirks (udev);if (udev->wusb ==0 &&le16_to_cpu (udev->descriptor.bcdUSB) >=0x0201 ) {
@@ -5063,6 +5077,7 @@ fail:hub_port_disable (hub, port1,0 );update_devnum (udev, devnum);/* for disconnect processing */ } +kfree (buf);return retval; }
Greg Kroah-Hartman
maintainerPATCH 718/737 USB: core: Change usb_get_device_descriptor() API
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alan Stern <[email protected]>
commit de28e469da75359a2bb8cd8778b78aa64b1be1f4 upstream.
The usb_get_device_descriptor() routine reads the device descriptor from the udev device and stores it directly in udev->descriptor. This interface is error prone, because the USB subsystem expects in-memory copies of a device's descriptors to be immutable once the device has been initialized.
The interface is changed so that the device descriptor is left in a kmalloc-ed buffer, not copied into the usb_device structure. A pointer to the buffer is returned to the caller, who is then responsible for kfree-ing it. The corresponding changes needed in the various callers are fairly small.
--- drivers/usb/core/hcd.c | 10 +++++++--- drivers/usb/core/hub.c | 44 +++++++++++++++++++++++--------------------- drivers/usb/core/message.c | 29 ++++++++++++----------------- drivers/usb/core/usb.h | 4 ++-- 4 files changed, 44 insertions(+), 43 deletions(-)
drivers/usb/core/hcd.c +7 -3
@@ -983,6 +983,7 @@ static int register_root_hub(struct usb_ {struct device *parent_dev = hcd->self.controller;struct usb_device *usb_dev = hcd->self.root_hub; +struct usb_device_descriptor *descr;const int devnum =1 ;int retval;
@@ -994,13 +995,16 @@ static int register_root_hub(struct usb_mutex_lock (&usb_bus_idr_lock); usb_dev->ep0.desc.wMaxPacketSize =cpu_to_le16 (64 ); - retval =usb_get_device_descriptor (usb_dev,USB_DT_DEVICE_SIZE ); -if (retval !=sizeof usb_dev->descriptor) { + descr =usb_get_device_descriptor (usb_dev); +if (IS_ERR (descr)) { + retval =PTR_ERR (descr);mutex_unlock (&usb_bus_idr_lock);dev_dbg (parent_dev,"can't read %s device descriptor %d\n" ,dev_name (&usb_dev->dev), retval); -return (retval <0 ) ? retval : -EMSGSIZE ; +return retval; } + usb_dev->descriptor = *descr; +kfree (descr);if (le16_to_cpu (usb_dev->descriptor.bcdUSB) >=0x0201 ) { retval =usb_get_bos_descriptor (usb_dev);
drivers/usb/core/hub.c +23 -21
104 lines not on this page · raw message
drivers/usb/core/message.c +12 -17
@@ -1040,40 +1040,35 @@ char *usb_cache_string(struct usb_deviceEXPORT_SYMBOL_GPL (usb_cache_string);/* -* usb_get_device_descriptor - (re)reads the device descriptor (usbcore) -* @dev: the device whose device descriptor is being updated -* @size: how much of the descriptor to read +* usb_get_device_descriptor - read the device descriptor +* @udev: the device whose device descriptor should be read * * Context: task context, might sleep. * -* Updates the copy of the device descriptor stored in the device structure, -* which dedicates space for this purpose. -* * Not exported, only for use by the core. If drivers really want to read * the device descriptor directly, they can call usb_get_descriptor() with * type = USB_DT_DEVICE and index = 0. * -* This call is synchronous, and may not be used in an interrupt context. -* -* Return: The number of bytes received on success, or else the status code -* returned by the underlying usb_control_msg() call. +* Returns: a pointer to a dynamically allocated usb_device_descriptor +* structure (which the caller must deallocate), or an ERR_PTR value. */ -int usb_get_device_descriptor (struct usb_device *dev,unsigned int size) +struct usb_device_descriptor *usb_get_device_descriptor (struct usb_device *udev) {struct usb_device_descriptor *desc;int ret; -if (size >sizeof (*desc)) -return -EINVAL ; desc =kmalloc (sizeof (*desc),GFP_NOIO );if (!desc) -return -ENOMEM ; +return ERR_PTR (-ENOMEM ); + + ret =usb_get_descriptor (udev,USB_DT_DEVICE ,0 , desc,sizeof (*desc)); +if (ret ==sizeof (*desc)) +return desc; - ret =usb_get_descriptor (dev,USB_DT_DEVICE ,0 , desc, size);if (ret >=0 ) -memcpy (&dev->descriptor, desc, size); + ret = -EMSGSIZE ;kfree (desc); -return ret; +return ERR_PTR (ret); }/*
drivers/usb/core/usb.h +2 -2
@@ -43,8 +43,8 @@ extern bool usb_endpoint_is_ignored(stru struct usb_endpoint_descriptor *epd);extern int usb_remove_device (struct usb_device *udev); -extern int usb_get_device_descriptor (struct usb_device *dev, -unsigned int size); +extern struct usb_device_descriptor *usb_get_device_descriptor ( +struct usb_device *udev);extern int usb_set_isoch_delay (struct usb_device *dev);extern int usb_get_bos_descriptor (struct usb_device *dev);extern void usb_release_bos_descriptor (struct usb_device *dev);
Greg Kroah-Hartman
maintainerPATCH 719/737 USB: core: Fix race by not overwriting udev->descriptor in hub_port_init()
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alan Stern <[email protected]>
commit ff33299ec8bb80cdcc073ad9c506bd79bb2ed20b upstream.
Syzbot reported an out-of-bounds read in sysfs.c:read_descriptors():
BUG: KASAN: slab-out-of-bounds in read_descriptors+0x263/0x280 drivers/usb/core/sysfs.c:883 Read of size 8 at addr ffff88801e78b8c8 by task udevd/5011 CPU: 0 PID: 5011 Comm: udevd Not tainted 6.4.0-rc6-syzkaller-00195-g40f71e7cd3c6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 read_descriptors+0x263/0x280 drivers/usb/core/sysfs.c:883 ... Allocated by task 758: ... __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc+0x5e/0x190 mm/slab_common.c:979 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:680 [inline] usb_get_configuration+0x1f7/0x5170 drivers/usb/core/config.c:887 usb_enumerate_device drivers/usb/core/hub.c:2407 [inline] usb_new_device+0x12b0/0x19d0 drivers/usb/core/hub.c:2545
As analyzed by Khazhy Kumykov, the cause of this bug is a race between read_descriptors() and hub_port_init(): The first routine uses a field in udev->descriptor, not expecting it to change, while the second overwrites it.
Prior to commit 45bf39f8df7f ("USB: core: Don't hold device lock while reading the "descriptors" sysfs file") this race couldn't occur, because the routines were mutually exclusive thanks to the device locking. Removing that locking from read_descriptors() exposed it to the race.
The best way to fix the bug is to keep hub_port_init() from changing udev->descriptor once udev has been initialized and registered. Drivers expect the descriptors stored in the kernel to be immutable; we should not undermine this expectation. In fact, this change should have been made long ago.
So now hub_port_init() will take an additional argument, specifying a buffer in which to store the device descriptor it reads. (If udev has not yet been initialized, the buffer pointer will be NULL and then hub_port_init() will store the device descriptor in udev as before.) This eliminates the data race responsible for the out-of-bounds read.
The changes to hub_port_init() appear more extensive than they really are, because of indentation changes resulting from an attempt to avoid writing to other parts of the usb_device structure after it has been initialized. Similar changes should be made to the code that reads the BOS descriptor, but that can be handled in a separate patch later on. This patch is sufficient to fix the bug found by syzbot.
--- drivers/usb/core/hub.c | 114 ++++++++++++++++++++++++++++++------------------- 1 file changed, 70 insertions(+), 44 deletions(-)
drivers/usb/core/hub.c +70 -44
@@ -4778,10 +4778,17 @@ static int get_bMaxPacketSize0(struct us* the port lock. For a newly detected device that is not accessible * through any global pointers, it's not necessary to lock the device, * but it is still necessary to lock the port. +* +* For a newly detected device, @dev_descr must be NULL. The device +* descriptor retrieved from the device will then be stored in +* @udev->descriptor. For an already existing device, @dev_descr +* must be non-NULL. The device descriptor will be stored there, +* not in @udev->descriptor, because descriptors for registered +* devices are meant to be immutable. */ static int hub_port_init (struct usb_hub *hub,struct usb_device *udev,int port1, -int retry_counter) +int retry_counter,struct usb_device_descriptor *dev_descr) {struct usb_device *hdev = hub->hdev;struct usb_hcd *hcd =bus_to_hcd (hdev->bus);
@@ -4793,6 +4800,7 @@ hub_port_init(struct usb_hub *hub, strucint devnum = udev->devnum;const char *driver_name;bool do_new_scheme; +const bool initial = !dev_descr;int maxp0;struct usb_device_descriptor *buf, *descr;
@@ -4831,32 +4839,34 @@ hub_port_init(struct usb_hub *hub, struc } oldspeed = udev->speed; -/* USB 2.0 section 5.5.3 talks about ep0 maxpacket ... -* it's fixed size except for full speed devices. -* For Wireless USB devices, ep0 max packet is always 512 (tho -* reported as 0xff in the device descriptor). WUSB1.0[4.8.1]. -*/ -switch (udev->speed) { -case USB_SPEED_SUPER_PLUS : -case USB_SPEED_SUPER : -case USB_SPEED_WIRELESS :/* fixed at 512 */ - udev->ep0.desc.wMaxPacketSize =cpu_to_le16 (512 ); -break ; -case USB_SPEED_HIGH :/* fixed at 64 */ - udev->ep0.desc.wMaxPacketSize =cpu_to_le16 (64 ); -break ; -case USB_SPEED_FULL :/* 8, 16, 32, or 64 */ -/* to determine the ep0 maxpacket size, try to read -* the device descriptor to get bMaxPacketSize0 and -* then correct our initial guess. +if (initial) { +/* USB 2.0 section 5.5.3 talks about ep0 maxpacket ... +* it's fixed size except for full speed devices. +* For Wireless USB devices, ep0 max packet is always 512 (tho +* reported as 0xff in the device descriptor). WUSB1.0[4.8.1]. */ - udev->ep0.desc.wMaxPacketSize =cpu_to_le16 (64 ); -break ; -case USB_SPEED_LOW :/* fixed at 8 */ - udev->ep0.desc.wMaxPacketSize =cpu_to_le16 (8 ); -break ; -default : - goto fail; +switch (udev->speed) { +case USB_SPEED_SUPER_PLUS : +case USB_SPEED_SUPER : +case USB_SPEED_WIRELESS :/* fixed at 512 */ + udev->ep0.desc.wMaxPacketSize =cpu_to_le16 (512 ); +break ; +case USB_SPEED_HIGH :/* fixed at 64 */ + udev->ep0.desc.wMaxPacketSize =cpu_to_le16 (64 ); +break ; +case USB_SPEED_FULL :/* 8, 16, 32, or 64 */ +/* to determine the ep0 maxpacket size, try to read +* the device descriptor to get bMaxPacketSize0 and +* then correct our initial guess. +*/ + udev->ep0.desc.wMaxPacketSize =cpu_to_le16 (64 ); +break ; +case USB_SPEED_LOW :/* fixed at 8 */ + udev->ep0.desc.wMaxPacketSize =cpu_to_le16 (8 ); +break ; +default : + goto fail; + } }if (udev->speed ==USB_SPEED_WIRELESS )
@@ -4879,22 +4889,24 @@ hub_port_init(struct usb_hub *hub, strucif (udev->speed <USB_SPEED_SUPER )dev_info (&udev->dev,"%s %s USB device number %d using %s\n" , - (udev->config) ?"reset" :"new" , speed, + (initial ?"new" :"reset" ), speed, devnum, driver_name); -/* Set up TT records, if needed */ -if (hdev->tt) { - udev->tt = hdev->tt; - udev->ttport = hdev->ttport; - }else if (udev->speed !=USB_SPEED_HIGH - && hdev->speed ==USB_SPEED_HIGH ) { -if (!hub->tt.hub) { -dev_err (&udev->dev,"parent hub has no TT\n" ); - retval = -EINVAL ; - goto fail; +if (initial) { +/* Set up TT records, if needed */ +if (hdev->tt) { + udev->tt = hdev->tt; + udev->ttport = hdev->ttport; + }else if (udev->speed !=USB_SPEED_HIGH + && hdev->speed ==USB_SPEED_HIGH ) { +if (!hub->tt.hub) { +dev_err (&udev->dev,"parent hub has no TT\n" ); + retval = -EINVAL ; + goto fail; + } + udev->tt = &hub->tt; + udev->ttport = port1; } - udev->tt = &hub->tt; - udev->ttport = port1; }/* Why interleave GET_DESCRIPTOR and SET_ADDRESS this way?
@@ -4928,6 +4940,12 @@ hub_port_init(struct usb_hub *hub, struc maxp0 =get_bMaxPacketSize0 (udev, buf,GET_DESCRIPTOR_BUFSIZE , retries ==0 ); +if (maxp0 >0 && !initial && + maxp0 != udev->descriptor.bMaxPacketSize0) { +dev_err (&udev->dev,"device reset changed ep0 maxpacket size!\n" ); + retval = -ENODEV ; + goto fail; + } retval =hub_port_reset (hub, port1, udev, delay, false);if (retval <0 )/* error or disconnect */
@@ -5001,6 +5019,12 @@ hub_port_init(struct usb_hub *hub, struc }else {u32 delay; +if (!initial && maxp0 != udev->descriptor.bMaxPacketSize0) { +dev_err (&udev->dev,"device reset changed ep0 maxpacket size!\n" ); + retval = -ENODEV ; + goto fail; + } + delay = udev->parent->hub_delay; udev->hub_delay =min_t (u32, delay,USB_TP_TRANSMISSION_DELAY_MAX );
@@ -5044,7 +5068,10 @@ hub_port_init(struct usb_hub *hub, struc retval); goto fail; } - udev->descriptor = *descr; +if (initial) + udev->descriptor = *descr; +else + *dev_descr = *descr;kfree (descr);/*
@@ -5354,7 +5381,7 @@ static void hub_port_connect(struct usb_ }/* reset (non-USB 3.0 devices) and get descriptor */ - status =hub_port_init (hub, udev, port1, i); + status =hub_port_init (hub, udev, port1, i,NULL );if (status <0 ) goto loop;
@@ -5984,7 +6011,7 @@ static int usb_reset_and_verify_device(sstruct usb_device *parent_hdev = udev->parent;struct usb_hub *parent_hub;struct usb_hcd *hcd =bus_to_hcd (udev->bus); -struct usb_device_descriptor descriptor = udev->descriptor; +struct usb_device_descriptor descriptor;struct usb_host_bos *bos;int i, j, ret =0 ;int port1 = udev->portnum;
@@ -6020,7 +6047,7 @@ static int usb_reset_and_verify_device(s/* ep0 maxpacket size may change; let the HCD know about it. * Other endpoints will be handled by re-enumeration. */ usb_ep0_reinit (udev); - ret =hub_port_init (parent_hub, udev, port1, i); + ret =hub_port_init (parent_hub, udev, port1, i, &descriptor);if (ret >=0 || ret == -ENOTCONN || ret == -ENODEV )break ; }
@@ -6032,7 +6059,6 @@ static int usb_reset_and_verify_device(s/* Device might have changed firmware (DFU or similar) */ if (descriptors_changed (udev, &descriptor, bos)) {dev_info (&udev->dev,"device firmware changed\n" ); - udev->descriptor = descriptor;/* for disconnect() calls */ goto re_enumerate; }
Greg Kroah-Hartman
maintainerPATCH 720/737 USB: core: Fix oversight in SuperSpeed initialization
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alan Stern <[email protected]>
commit 59cf445754566984fd55af19ba7146c76e6627bc upstream.
Commit 85d07c556216 ("USB: core: Unite old scheme and new scheme descriptor reads") altered the way USB devices are enumerated following detection, and in the process it messed up the initialization of SuperSpeed (or faster) devices:
[ 31.650759] usb 2-1: new SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd [ 31.663107] usb 2-1: device descriptor read/8, error -71 [ 31.952697] usb 2-1: new SuperSpeed Plus Gen 2x1 USB device number 3 using xhci_hcd [ 31.965122] usb 2-1: device descriptor read/8, error -71 [ 32.080991] usb usb2-port1: attempt power cycle
...
The problem was caused by the commit forgetting that in SuperSpeed or faster devices, the device descriptor uses a logarithmic encoding of the bMaxPacketSize0 value. (For some reason I thought the 255 case in the switch statement was meant for these devices, but it isn't -- it was meant for Wireless USB and is no longer needed.)
We can fix the oversight by testing for buf->bMaxPacketSize0 = 9 (meaning 512, the actual maxpacket size for ep0 on all SuperSpeed devices) and straightening out the logic that checks and adjusts our initial guesses of the maxpacket value.
--- drivers/usb/core/hub.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-)
drivers/usb/core/hub.c +24 -12
@@ -4742,7 +4742,7 @@ static int get_bMaxPacketSize0(struct us buf, size, initial_descriptor_timeout);switch (buf->bMaxPacketSize0) { -case 8 :case 16 :case 32 :case 64 :case 255 : +case 8 :case 16 :case 32 :case 64 :case 9 :if (buf->bDescriptorType ==USB_DT_DEVICE ) { rc = buf->bMaxPacketSize0;break ;
@@ -5041,23 +5041,35 @@ hub_port_init(struct usb_hub *hub, strucif (retval) goto fail; -if (maxp0 ==0xff || udev->speed >=USB_SPEED_SUPER ) - i =512 ; -else - i = maxp0; -if (usb_endpoint_maxp (&udev->ep0.desc) != i) { -if (udev->speed ==USB_SPEED_LOW || - !(i ==8 || i ==16 || i ==32 || i ==64 )) { -dev_err (&udev->dev,"Invalid ep0 maxpacket: %d\n" , i); - retval = -EMSGSIZE ; - goto fail; - } +/* +* Check the ep0 maxpacket guess and correct it if necessary. +* maxp0 is the value stored in the device descriptor; +* i is the value it encodes (logarithmic for SuperSpeed or greater). +*/ + i = maxp0; +if (udev->speed >=USB_SPEED_SUPER ) { +if (maxp0 <=16 ) + i =1 << maxp0; +else + i =0 ;/* Invalid */ + } +if (usb_endpoint_maxp (&udev->ep0.desc) == i) { + ;/* Initial ep0 maxpacket guess is right */ + }else if ((udev->speed ==USB_SPEED_FULL || + udev->speed ==USB_SPEED_HIGH ) && + (i ==8 || i ==16 || i ==32 || i ==64 )) { +/* Initial guess is wrong; use the descriptor's value */ if (udev->speed ==USB_SPEED_FULL )dev_dbg (&udev->dev,"ep0 maxpacket = %d\n" , i);else dev_warn (&udev->dev,"Using ep0 maxpacket: %d\n" , i); udev->ep0.desc.wMaxPacketSize =cpu_to_le16 (i);usb_ep0_reinit (udev); + }else { +/* Initial guess is wrong and descriptor's value is invalid */ +dev_err (&udev->dev,"Invalid ep0 maxpacket: %d\n" , maxp0); + retval = -EMSGSIZE ; + goto fail; } descr =usb_get_device_descriptor (udev);
Greg Kroah-Hartman
maintainerPATCH 721/737 x86/sgx: Break up long non-preemptible delays in sgx_vepc_release()
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jack Wang <[email protected]>
commit 3d7d72a34e05b23e21bafc8bfb861e73c86b31f3 upstream.
On large enclaves we hit the softlockup warning with following call trace:
xa_erase() sgx_vepc_release() __fput() task_work_run() do_exit()
The latency issue is similar to the one fixed in:
8795359e35bc ("x86/sgx: Silence softlockup detection when releasing large enclaves")
The test system has 64GB of enclave memory, and all is assigned to a single VM. Release of 'vepc' takes a longer time and causes long latencies, which triggers the softlockup warning.
Add cond_resched() to give other tasks a chance to run and reduce latencies, which also avoids the softlockup detector.
[ mingo: Rewrote the changelog. ]
--- arch/x86/kernel/cpu/sgx/virt.c | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/kernel/cpu/sgx/virt.c +3 -0
@@ -204,6 +204,7 @@ static int sgx_vepc_release(struct inodecontinue ;xa_erase (&vepc->page_array, index); +cond_resched (); }/*
@@ -222,6 +223,7 @@ static int sgx_vepc_release(struct inodelist_add_tail (&epc_page->list, &secs_pages);xa_erase (&vepc->page_array, index); +cond_resched (); }/*
@@ -243,6 +245,7 @@ static int sgx_vepc_release(struct inodeif (sgx_vepc_free_page (epc_page))list_add_tail (&epc_page->list, &secs_pages); +cond_resched (); }if (!list_empty (&secs_pages))
Greg Kroah-Hartman
maintainerPATCH 722/737 x86/build: Fix linker fill bytes quirk/incompatibility for ld.lld
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Song Liu <[email protected]>
commit 65e710899fd19f435f40268f3a92dfaa11f14470 upstream.
With ":text =0xcccc", ld.lld fills unused text area with 0xcccc0000. Example objdump -D output:
ffffffff82b04203: 00 00 add %al,(%rax) ffffffff82b04205: cc int3 ffffffff82b04206: cc int3 ffffffff82b04207: 00 00 add %al,(%rax) ffffffff82b04209: cc int3 ffffffff82b0420a: cc int3
Replace it with ":text =0xcccccccc", so we get the following instead:
ffffffff82b04203: cc int3 ffffffff82b04204: cc int3 ffffffff82b04205: cc int3 ffffffff82b04206: cc int3 ffffffff82b04207: cc int3 ffffffff82b04208: cc int3
gcc/ld doesn't seem to have the same issue. The generated code stays the same for gcc/ld.
--- arch/x86/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/vmlinux.lds.S +1 -1
@@ -156,7 +156,7 @@ SECTIONS ALIGN_ENTRY_TEXT_END *(.gnu.warning) - } :text =0xcccc + } :text = 0xcccccccc /* End of text section, which should occupy whole number of pages */ _etext = .;
Greg Kroah-Hartman
maintainerPATCH 723/737 perf/x86/uncore: Correct the number of CHAs on EMR
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kan Liang <[email protected]>
commit 6f7f984fa85b305799076a1bcec941b9377587de upstream.
Starting from SPR, the basic uncore PMON information is retrieved from the discovery table (resides in an MMIO space populated by BIOS). It is called the discovery method. The existing value of the type->num_boxes is from the discovery table.
On some SPR variants, there is a firmware bug that makes the value from the discovery table incorrect. We use the value from the SPR_MSR_UNC_CBO_CONFIG MSR to replace the one from the discovery table:
38776cc45eb7 ("perf/x86/uncore: Correct the number of CHAs on SPR")
Unfortunately, the SPR_MSR_UNC_CBO_CONFIG isn't available for the EMR XCC (Always returns 0), but the above firmware bug doesn't impact the EMR XCC.
Don't let the value from the MSR replace the existing value from the discovery table.
--- arch/x86/events/intel/uncore_snbep.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
arch/x86/events/intel/uncore_snbep.c +11 -1
@@ -6474,8 +6474,18 @@ void spr_uncore_cpu_init(void) type =uncore_find_type_by_id (uncore_msr_uncores,UNCORE_SPR_CHA );if (type) { +/* +* The value from the discovery table (stored in the type->num_boxes +* of UNCORE_SPR_CHA) is incorrect on some SPR variants because of a +* firmware bug. Using the value from SPR_MSR_UNC_CBO_CONFIG to replace it. +*/ rdmsrl (SPR_MSR_UNC_CBO_CONFIG , num_cbo); - type->num_boxes = num_cbo; +/* +* The MSR doesn't work on the EMR XCC, but the firmware bug doesn't impact +* the EMR XCC. Don't let the value from the MSR replace the existing value. +*/ +if (num_cbo) + type->num_boxes = num_cbo; } spr_uncore_iio_free_running.num_boxes =uncore_type_max_boxes (uncore_msr_uncores,UNCORE_SPR_IIO ); }
Greg Kroah-Hartman
maintainerPATCH 724/737 media: ipu3-cio2: allow ipu_bridge to be a module again
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
commit 2545a2c02ba1da9cfb9ec218623c71b00eb4a555 upstream.
This code was previously part of the VIDEO_IPU3_CIO2 driver, which could be built-in or a loadable module, but after the move it turned into a builtin-only driver. This fails to link when the I2C subsystem is a module:
x86_64-linux-ld: drivers/media/pci/intel/ipu-bridge.o: in function `ipu_bridge_unregister_sensors':
ipu-bridge.c:(.text+0x50): undefined reference to `i2c_unregister_device'
x86_64-linux-ld: drivers/media/pci/intel/ipu-bridge.o: in function `ipu_bridge_init':
ipu-bridge.c:(.text+0x9c9): undefined reference to `i2c_acpi_new_device_by_fwnode'
In general, drivers should not have to be built-in, so change the option to a tristate with the corresponding dependency. This in turn opens a new problem with the dependency, as the IPU bridge can be a loadable module while the ipu3 driver itself is built-in, producing a new link failure:
86_64-linux-ld: drivers/media/pci/intel/ipu3/ipu3-cio2.o: in function `cio2_pci_probe':
ipu3-cio2.c:(.text+0x197e): undefined reference to `ipu_bridge_init'
In order to fix this, restore the old Kconfig option that controlled the ipu bridge driver before it was split out, but make it select a hidden symbol that now corresponds to the bridge driver.
When other drivers get added that share ipu-bridge, this should cover all corner cases, and allow any combination of them to be built-in or modular.
--- drivers/media/pci/intel/Kconfig | 21 +++++---------------- drivers/media/pci/intel/ipu-bridge.c | 3 +++ drivers/media/pci/intel/ipu3/Kconfig | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+), 16 deletions(-)
drivers/media/pci/intel/Kconfig +5 -16
@@ -1,21 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-only config IPU_BRIDGE - bool "Intel IPU Sensors Bridge" - depends on VIDEO_IPU3_CIO2 && ACPI - depends on I2C + tristate + depends on I2C && ACPI help - This extension provides an API for the Intel IPU driver to create - connections to cameras that are hidden in the SSDB buffer in ACPI. - It can be used to enable support for cameras in detachable / hybrid - devices that ship with Windows. - - Say Y here if your device is a detachable / hybrid laptop that comes - with Windows installed by the OEM, for example: - - - Microsoft Surface models (except Surface Pro 3) - - The Lenovo Miix line (for example the 510, 520, 710 and 720) - - Dell 7285 - - If in doubt, say N here. + This is a helper module for the IPU bridge, which can be + used by ipu3 and other drivers. In order to handle module + dependencies, this is selected by each driver that needs it. source "drivers/media/pci/intel/ipu3/Kconfig"
drivers/media/pci/intel/ipu-bridge.c +3 -0
@@ -497,3 +497,6 @@ err_free_bridge:return ret; }EXPORT_SYMBOL_NS_GPL (ipu_bridge_init,INTEL_IPU_BRIDGE ); + +MODULE_LICENSE ("GPL" ); +MODULE_DESCRIPTION ("Intel IPU Sensors Bridge driver" );
drivers/media/pci/intel/ipu3/Kconfig +20 -0
@@ -8,6 +8,7 @@ config VIDEO_IPU3_CIO2 select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE select VIDEOBUF2_DMA_SG + select IPU_BRIDGE if CIO2_BRIDGE help This is the Intel IPU3 CIO2 CSI-2 receiver unit, found in Intel
@@ -17,3 +18,22 @@ config VIDEO_IPU3_CIO2 Say Y or M here if you have a Skylake/Kaby Lake SoC with MIPI CSI-2 connected camera. The module will be called ipu3-cio2. + +config CIO2_BRIDGE + bool "IPU3 CIO2 Sensors Bridge" + depends on VIDEO_IPU3_CIO2 && ACPI + depends on I2C + help + This extension provides an API for the ipu3-cio2 driver to create + connections to cameras that are hidden in the SSDB buffer in ACPI. + It can be used to enable support for cameras in detachable / hybrid + devices that ship with Windows. + + Say Y here if your device is a detachable / hybrid laptop that comes + with Windows installed by the OEM, for example: + + - Microsoft Surface models (except Surface Pro 3) + - The Lenovo Miix line (for example the 510, 520, 710 and 720) + - Dell 7285 + + If in doubt, say N here.
Greg Kroah-Hartman
maintainerPATCH 725/737 LoongArch: Ensure FP/SIMD registers in the core dump file is up to date
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Huacai Chen <[email protected]>
[ Upstream commit 656f9aec07dba7c61d469727494a5d1b18d0bef4 ]
This is a port of commit 379eb01c21795edb4c ("riscv: Ensure the value of FP registers in the core dump file is up to date").
The values of FP/SIMD registers in the core dump file come from the thread.fpu. However, kernel saves the FP/SIMD registers only before scheduling out the process. If no process switch happens during the exception handling, kernel will not have a chance to save the latest values of FP/SIMD registers. So it may cause their values in the core dump file incorrect. To solve this problem, force fpr_get()/simd_get() to save the FP/SIMD registers into the thread.fpu if the target task equals the current task.
--- arch/loongarch/include/asm/fpu.h | 22 ++++++++++++++++++---- arch/loongarch/kernel/ptrace.c | 2 ++ 2 files changed, 20 insertions(+), 4 deletions(-)
arch/loongarch/include/asm/fpu.h +18 -4
@@ -117,16 +117,30 @@ static inline void restore_fp(struct task_struct *tsk)_restore_fp (&tsk->thread.fpu); } -static inline union fpureg *get_fpu_regs (struct task_struct *tsk) +static inline void save_fpu_regs (struct task_struct *tsk) { +unsigned int euen; +if (tsk == current) {preempt_disable (); -if (is_fpu_owner ()) + + euen =csr_read32 (LOONGARCH_CSR_EUEN ); + +#ifdef CONFIG_CPU_HAS_LASX +if (euen &CSR_EUEN_LASXEN ) +_save_lasx (¤t->thread.fpu); + else +#endif +#ifdef CONFIG_CPU_HAS_LSX +if (euen &CSR_EUEN_LSXEN ) +_save_lsx (¤t->thread.fpu); + else +#endif +if (euen &CSR_EUEN_FPEN )_save_fp (¤t->thread.fpu); +preempt_enable (); } - -return tsk->thread.fpu.fpr; }#endif /* _ASM_FPU_H */
arch/loongarch/kernel/ptrace.c +2 -0
@@ -147,6 +147,8 @@ static int fpr_get(struct task_struct *target, {int r; +save_fpu_regs (target); +if (sizeof (target->thread.fpu.fpr[0 ]) ==sizeof (elf_fpreg_t)) r =gfpr_get (target, &to);else
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 726/737 Bluetooth: msft: Extended monitor tracking by address filter
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hilda Wu <[email protected]>
[ Upstream commit 9e14606d8f38ea52a38c27692a9c1513c987a5da ]
Since limited tracking device per condition, this feature is to support tracking multiple devices concurrently.
When a pattern monitor detects the device, this feature issues an address monitor for tracking that device. Let pattern monitor can keep monitor new devices.
This feature adds an address filter when receiving a LE monitor device event which monitor handle is for a pattern, and the controller started monitoring the device. And this feature also has cancelled the monitor advertisement from address filters when receiving a LE monitor device event when the controller stopped monitoring the device specified by an address and monitor handle.
Below is an example to know the feature adds the address filter.
//Add MSFT pattern monitor
< HCI Command: Vendor (0x3f|0x00f0) plen 14 #142 [hci0] 55.552420
03 b8 a4 03 ff 01 01 06 09 05 5f 52 45 46 .........._REF
Quoted 1 line
HCI Event: Command Complete (
0x0e) plen 6 #143 [hci0] 55.653960
Vendor (0x3f|0x00f0) ncmd 2
Status: Success (0x00)
03 00//Got event from the pattern monitor
Quoted 1 line
HCI Event: Vendor (
0xff) plen 18 #148 [hci0] 58.384953
23 79 54 33 77 88 97 68 02 00 fb c1 29 eb 27 b8 #yT3w..h....).'.
00 01 ..
//Add MSFT address monitor (Sample address: B8:27:EB:29:C1:FB)
< HCI Command: Vendor (0x3f|0x00f0) plen 13 #149 [hci0] 58.385067
03 b8 a4 03 ff 04 00 fb c1 29 eb 27 b8 .........).'.
//Report to userspace about found device (ADV Monitor Device Found)
@ MGMT Event: Unknown (0x002f) plen 38 {0x0003} [hci0] 58.680042
01 00 fb c1 29 eb 27 b8 01 ce 00 00 00 00 16 00 ....).'.........
0a 09 4b 45 59 42 44 5f 52 45 46 02 01 06 03 19 ..KEYBD_REF.....
c1 03 03 03 12 18 ......//Got event from address monitor
Quoted 1 line
HCI Event: Vendor (
0xff) plen 18 #152 [hci0] 58.672956
23 79 54 33 77 88 97 68 02 00 fb c1 29 eb 27 b8 #yT3w..h....).'.
01 01Stable-dep-of: 253f3399f4c0 ("Bluetooth: HCI: Introduce HCI_QUIRK_BROKEN_LE_CODED")
--- drivers/bluetooth/btrtl.c | 4 + include/net/bluetooth/hci.h | 10 + net/bluetooth/msft.c | 412 ++++++++++++++++++++++++++++++++++-- 3 files changed, 411 insertions(+), 15 deletions(-)
drivers/bluetooth/btrtl.c +4 -0
@@ -1199,6 +1199,10 @@ void btrtl_set_quirks(struct hci_dev *hdev, struct btrtl_device_info *btrtl_dev)if (btrtl_dev->project_id ==CHIP_ID_8852C )btrealtek_set_flag (hdev,REALTEK_ALT6_CONTINUOUS_TX_CHIP ); +if (btrtl_dev->project_id ==CHIP_ID_8852A || + btrtl_dev->project_id ==CHIP_ID_8852C ) +set_bit (HCI_QUIRK_USE_MSFT_EXT_ADDRESS_FILTER , &hdev->quirks); +hci_set_aosp_capable (hdev);break ;default :
include/net/bluetooth/hci.h +10 -0
@@ -309,6 +309,16 @@ enum {* to support it. */ HCI_QUIRK_BROKEN_SET_RPA_TIMEOUT , + +/* When this quirk is set, MSFT extension monitor tracking by +* address filter is supported. Since tracking quantity of each +* pattern is limited, this feature supports tracking multiple +* devices concurrently if controller supports multiple +* address filters. +* +* This quirk must be set before hci_register_dev is called. +*/ + HCI_QUIRK_USE_MSFT_EXT_ADDRESS_FILTER, };/* HCI device flags */
net/bluetooth/msft.c +397 -15
545 lines not on this page · raw message
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 727/737 Bluetooth: HCI: Introduce HCI_QUIRK_BROKEN_LE_CODED
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luiz Augusto von Dentz <[email protected]>
[ Upstream commit 253f3399f4c09ce6f4e67350f839be0361b4d5ff ]
This introduces HCI_QUIRK_BROKEN_LE_CODED which is used to indicate that LE Coded PHY shall not be used, it is then set for some Intel models that claim to support it but when used causes many problems.
--- drivers/bluetooth/btintel.c | 6 ++++++ include/net/bluetooth/hci.h | 10 ++++++++++ include/net/bluetooth/hci_core.h | 4 +++- net/bluetooth/hci_sync.c | 5 ++++- 4 files changed, 23 insertions(+), 2 deletions(-)
drivers/bluetooth/btintel.c +6 -0
@@ -2658,6 +2658,9 @@ static int btintel_setup_combined(struct hci_dev *hdev)set_bit (HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED , &hdev->quirks); +/* These variants don't seem to support LE Coded PHY */ +set_bit (HCI_QUIRK_BROKEN_LE_CODED , &hdev->quirks); +/* Setup MSFT Extension support */ btintel_set_msft_opcode (hdev, ver.hw_variant);
@@ -2729,6 +2732,9 @@ static int btintel_setup_combined(struct hci_dev *hdev)*/ set_bit (HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED , &hdev->quirks); +/* These variants don't seem to support LE Coded PHY */ +set_bit (HCI_QUIRK_BROKEN_LE_CODED , &hdev->quirks); +/* Set Valid LE States quirk */ set_bit (HCI_QUIRK_VALID_LE_STATES , &hdev->quirks);
include/net/bluetooth/hci.h +10 -0
@@ -319,6 +319,16 @@ enum {* This quirk must be set before hci_register_dev is called. */ HCI_QUIRK_USE_MSFT_EXT_ADDRESS_FILTER , + +/* +* When this quirk is set, LE Coded PHY shall not be used. This is +* required for some Intel controllers which erroneously claim to +* support it but it causes problems with extended scanning. +* +* This quirk can be set before hci_register_dev is called or +* during the hdev->setup vendor callback. +*/ + HCI_QUIRK_BROKEN_LE_CODED, };/* HCI device flags */
include/net/bluetooth/hci_core.h +3 -1
@@ -1772,7 +1772,9 @@ void hci_conn_del_sysfs(struct hci_conn *conn);#define scan_2m (dev) (((dev)->le_tx_def_phys & HCI_LE_SET_PHY_2M) || \ ((dev)->le_rx_def_phys & HCI_LE_SET_PHY_2M)) -#define le_coded_capable (dev) (((dev)->le_features[1] & HCI_LE_PHY_CODED)) +#define le_coded_capable (dev) (((dev)->le_features[1] & HCI_LE_PHY_CODED) && \ + !test_bit(HCI_QUIRK_BROKEN_LE_CODED, \ + &(dev)->quirks))#define scan_coded (dev) (((dev)->le_tx_def_phys & HCI_LE_SET_PHY_CODED) || \ ((dev)->le_rx_def_phys & HCI_LE_SET_PHY_CODED))
net/bluetooth/hci_sync.c +4 -1
@@ -4684,7 +4684,10 @@ static const struct { "advertised, but not supported."),HCI_QUIRK_BROKEN (SET_RPA_TIMEOUT ,"HCI LE Set Random Private Address Timeout command is " - "advertised, but not supported.") +"advertised, but not supported." ), +HCI_QUIRK_BROKEN (LE_CODED , +"HCI LE Coded PHY feature bit is set, " + "but its usage is not supported.") };/* This function handles hdev setup stage:
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 728/737 serial: sc16is7xx: remove obsolete out_thread label
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hugo Villeneuve <[email protected]>
[ Upstream commit dabc54a45711fe77674a6c0348231e00e66bd567 ]
Commit c8f71b49ee4d ("serial: sc16is7xx: setup GPIO controller later in probe") moved GPIO setup code later in probe function. Doing so also required to move ports cleanup code (out_ports label) after the GPIO cleanup code.
After these moves, the out_thread label becomes misplaced and makes part of the cleanup code illogical.
This patch remove the now obsolete out_thread label and make GPIO setup code jump to out_ports label if it fails.
Stable-dep-of: 049994292834 ("serial: sc16is7xx: fix regression with GPIO configuration")
--- drivers/tty/serial/sc16is7xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/sc16is7xx.c +1 -3
@@ -1529,7 +1529,7 @@ static int sc16is7xx_probe(struct device *dev, s->gpio.can_sleep =1 ; ret =gpiochip_add_data (&s->gpio, s);if (ret) - goto out_thread; + goto out_ports; }#endif
@@ -1555,8 +1555,6 @@ static int sc16is7xx_probe(struct device *dev,#ifdef CONFIG_GPIOLIB if (devtype->nr_gpio)gpiochip_remove (&s->gpio); - -out_thread:#endif out_ports:
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 729/737 serial: sc16is7xx: fix regression with GPIO configuration
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hugo Villeneuve <[email protected]>
[ Upstream commit 0499942928341d572a42199580433c2b0725211e ]
Commit 679875d1d880 ("sc16is7xx: Separate GPIOs from modem control lines") and commit 21144bab4f11 ("sc16is7xx: Handle modem status lines") changed the function of the GPIOs pins to act as modem control lines without any possibility of selecting GPIO function.
As a consequence, applications that depends on GPIO lines configured by default as GPIO pins no longer work as expected.
Also, the change to select modem control lines function was done only for channel A of dual UART variants (752/762). This was not documented in the log message.
Allow to specify GPIO or modem control line function in the device tree, and for each of the ports (A or B).
Do so by using the new device-tree property named "nxp,modem-control-line-ports" (property added in separate patch).
When registering GPIO chip controller, mask-out GPIO pins declared as modem control lines according to this new DT property.
--- drivers/tty/serial/sc16is7xx.c | 143 +++++++++++++++++++++++++-------- 1 file changed, 108 insertions(+), 35 deletions(-)
drivers/tty/serial/sc16is7xx.c +108 -35
@@ -236,7 +236,8 @@/* IOControl register bits (Only 750/760) */ #define SC16IS7XX_IOCONTROL_LATCH_BIT (1 << 0)/* Enable input latching */ -#define SC16IS7XX_IOCONTROL_MODEM_BIT (1 << 1)/* Enable GPIO[7:4] as modem pins */ +#define SC16IS7XX_IOCONTROL_MODEM_A_BIT (1 << 1)/* Enable GPIO[7:4] as modem A pins */ +#define SC16IS7XX_IOCONTROL_MODEM_B_BIT (1 << 2)/* Enable GPIO[3:0] as modem B pins */ #define SC16IS7XX_IOCONTROL_SRESET_BIT (1 << 3)/* Software Reset */ /* EFCR register bits */
@@ -301,12 +302,12 @@/* Misc definitions */ #define SC16IS7XX_FIFO_SIZE (64)#define SC16IS7XX_REG_SHIFT 2 +#define SC16IS7XX_GPIOS_PER_BANK 4struct sc16is7xx_devtype {char name[10 ];int nr_gpio;int nr_uart; -int has_mctrl; };#define SC16IS7XX_RECONF_MD (1 << 0)
@@ -336,7 +337,9 @@ struct sc16is7xx_port {struct clk *clk;#ifdef CONFIG_GPIOLIB struct gpio_chip gpio; +unsigned long gpio_valid_mask;#endif +u8 mctrl_mask;unsigned char buf[SC16IS7XX_FIFO_SIZE ];struct kthread_worker kworker;struct task_struct *kworker_task;
@@ -447,35 +450,30 @@ static const struct sc16is7xx_devtype sc16is74x_devtype = { .name = "SC16IS74X", .nr_gpio = 0, .nr_uart = 1, - .has_mctrl = 0, };static const struct sc16is7xx_devtype sc16is750_devtype = { .name ="SC16IS750" , - .nr_gpio =4 , + .nr_gpio =8 , .nr_uart =1 , - .has_mctrl =1 , };static const struct sc16is7xx_devtype sc16is752_devtype = { .name ="SC16IS752" , - .nr_gpio =0 , + .nr_gpio =8 , .nr_uart =2 , - .has_mctrl =1 , };static const struct sc16is7xx_devtype sc16is760_devtype = { .name ="SC16IS760" , - .nr_gpio =4 , + .nr_gpio =8 , .nr_uart =1 , - .has_mctrl =1 , };static const struct sc16is7xx_devtype sc16is762_devtype = { .name ="SC16IS762" , - .nr_gpio =0 , + .nr_gpio =8 , .nr_uart =2 , - .has_mctrl =1 , };static bool sc16is7xx_regmap_volatile (struct device *dev,unsigned int reg)
@@ -1357,8 +1355,98 @@ static int sc16is7xx_gpio_direction_output(struct gpio_chip *chip,return 0 ; } + +static int sc16is7xx_gpio_init_valid_mask (struct gpio_chip *chip, +unsigned long *valid_mask, +unsigned int ngpios) +{ +struct sc16is7xx_port *s =gpiochip_get_data (chip); + + *valid_mask = s->gpio_valid_mask; + +return 0 ; +} + +static int sc16is7xx_setup_gpio_chip (struct sc16is7xx_port *s) +{ +struct device *dev = s->p[0 ].port.dev; + +if (!s->devtype->nr_gpio) +return 0 ; + +switch (s->mctrl_mask) { +case 0 : + s->gpio_valid_mask =GENMASK (7 ,0 ); +break ; +case SC16IS7XX_IOCONTROL_MODEM_A_BIT : + s->gpio_valid_mask =GENMASK (3 ,0 ); +break ; +case SC16IS7XX_IOCONTROL_MODEM_B_BIT : + s->gpio_valid_mask =GENMASK (7 ,4 ); +break ; +default : +break ; + } + +if (s->gpio_valid_mask ==0 ) +return 0 ; + + s->gpio.owner =THIS_MODULE ; + s->gpio.parent = dev; + s->gpio.label =dev_name (dev); + s->gpio.init_valid_mask = sc16is7xx_gpio_init_valid_mask; + s->gpio.direction_input = sc16is7xx_gpio_direction_input; + s->gpio.get = sc16is7xx_gpio_get; + s->gpio.direction_output = sc16is7xx_gpio_direction_output; + s->gpio.set = sc16is7xx_gpio_set; + s->gpio.base =-1 ; + s->gpio.ngpio = s->devtype->nr_gpio; + s->gpio.can_sleep =1 ; + +return gpiochip_add_data (&s->gpio, s); +}#endif +/* +* Configure ports designated to operate as modem control lines. +*/ +static int sc16is7xx_setup_mctrl_ports (struct sc16is7xx_port *s) +{ +int i; +int ret; +int count; +u32 mctrl_port[2 ]; +struct device *dev = s->p[0 ].port.dev; + + count =device_property_count_u32 (dev,"nxp,modem-control-line-ports" ); +if (count <0 || count >ARRAY_SIZE (mctrl_port)) +return 0 ; + + ret =device_property_read_u32_array (dev,"nxp,modem-control-line-ports" , + mctrl_port, count); +if (ret) +return ret; + + s->mctrl_mask =0 ; + +for (i =0 ; i < count; i++) { +/* Use GPIO lines as modem control lines */ +if (mctrl_port[i] ==0 ) + s->mctrl_mask |=SC16IS7XX_IOCONTROL_MODEM_A_BIT ; +else if (mctrl_port[i] ==1 ) + s->mctrl_mask |=SC16IS7XX_IOCONTROL_MODEM_B_BIT ; + } + +if (s->mctrl_mask) +regmap_update_bits ( + s->regmap, +SC16IS7XX_IOCONTROL_REG <<SC16IS7XX_REG_SHIFT , +SC16IS7XX_IOCONTROL_MODEM_A_BIT | +SC16IS7XX_IOCONTROL_MODEM_B_BIT , s->mctrl_mask); + +return 0 ; +} +static const struct serial_rs485 sc16is7xx_rs485_supported = { .flags =SER_RS485_ENABLED |SER_RS485_RTS_AFTER_SEND , .delay_rts_before_send =1 ,
@@ -1471,12 +1559,6 @@ static int sc16is7xx_probe(struct device *dev,SC16IS7XX_EFCR_RXDISABLE_BIT | SC16IS7XX_EFCR_TXDISABLE_BIT); -/* Use GPIO lines as modem status registers */ -if (devtype->has_mctrl) -sc16is7xx_port_write (&s->p[i].port, -SC16IS7XX_IOCONTROL_REG , -SC16IS7XX_IOCONTROL_MODEM_BIT ); -/* Initialize kthread work structs */ kthread_init_work (&s->p[i].tx_work, sc16is7xx_tx_proc);kthread_init_work (&s->p[i].reg_work, sc16is7xx_reg_proc);
@@ -1514,23 +1596,14 @@ static int sc16is7xx_probe(struct device *dev, s->p[u].irda_mode = true; } + ret =sc16is7xx_setup_mctrl_ports (s); +if (ret) + goto out_ports; +#ifdef CONFIG_GPIOLIB -if (devtype->nr_gpio) { -/* Setup GPIO cotroller */ - s->gpio.owner =THIS_MODULE ; - s->gpio.parent = dev; - s->gpio.label =dev_name (dev); - s->gpio.direction_input = sc16is7xx_gpio_direction_input; - s->gpio.get = sc16is7xx_gpio_get; - s->gpio.direction_output = sc16is7xx_gpio_direction_output; - s->gpio.set = sc16is7xx_gpio_set; - s->gpio.base =-1 ; - s->gpio.ngpio = devtype->nr_gpio; - s->gpio.can_sleep =1 ; - ret =gpiochip_add_data (&s->gpio, s); -if (ret) - goto out_ports; - } + ret =sc16is7xx_setup_gpio_chip (s); +if (ret) + goto out_ports;#endif /*
@@ -1553,7 +1626,7 @@ static int sc16is7xx_probe(struct device *dev,return 0 ;#ifdef CONFIG_GPIOLIB -if (devtype->nr_gpio) +if (s->gpio_valid_mask)gpiochip_remove (&s->gpio);#endif
@@ -1577,7 +1650,7 @@ static void sc16is7xx_remove(struct device *dev)int i;#ifdef CONFIG_GPIOLIB -if (s->devtype->nr_gpio) +if (s->gpio_valid_mask)gpiochip_remove (&s->gpio);#endif
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 730/737 mm/memfd: sysctl: fix MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Xu <[email protected]>
[ Upstream commit 72de259130229412ca49871e70ffaf17dc9fba98 ]
Patch series "mm/memfd: fix sysctl MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED", v2.
When sysctl vm.memfd_noexec is 2 (MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED), memfd_create(.., MFD_EXEC) should fail.
This complies with how MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED is defined - "memfd_create() without MFD_NOEXEC_SEAL will be rejected"
Thanks to Dominique Martinet <[email protected]> who reported the bug. see [1] for context.
This patch (of 2):
When vm.memfd_noexec is 2 (MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED), memfd_create(.., MFD_EXEC) should fail.
This complies with how MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED is defined - "memfd_create() without MFD_NOEXEC_SEAL will be rejected"
Stable-dep-of: 202e14222fad ("memfd: do not -EACCES old memfd_create() users with vm.memfd_noexec=2")
--- mm/memfd.c | 57 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 24 deletions(-)
mm/memfd.c +33 -24
@@ -268,6 +268,36 @@ long memfd_fcntl(struct file *file, unsigned int cmd, unsigned int arg)#define MFD_ALL_FLAGS (MFD_CLOEXEC | MFD_ALLOW_SEALING | MFD_HUGETLB | MFD_NOEXEC_SEAL | MFD_EXEC) +static int check_sysctl_memfd_noexec (unsigned int *flags) +{ +#ifdef CONFIG_SYSCTL +char comm[TASK_COMM_LEN ]; +int sysctl =MEMFD_NOEXEC_SCOPE_EXEC ; +struct pid_namespace *ns; + + ns =task_active_pid_ns (current); +if (ns) + sysctl = ns->memfd_noexec_scope; + +if (!(*flags & (MFD_EXEC |MFD_NOEXEC_SEAL ))) { +if (sysctl ==MEMFD_NOEXEC_SCOPE_NOEXEC_SEAL ) + *flags |=MFD_NOEXEC_SEAL ; +else + *flags |=MFD_EXEC ; + } + +if (*flags &MFD_EXEC && sysctl >=MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED ) { +pr_warn_once ( +"memfd_create(): MFD_NOEXEC_SEAL is enforced, pid=%d '%s'\n" , +task_pid_nr (current),get_task_comm (comm, current)); + +return -EACCES ; + } +#endif + +return 0 ; +} +SYSCALL_DEFINE2 (memfd_create, const char __user *, uname, unsigned int, flags)
@@ -294,35 +324,14 @@ SYSCALL_DEFINE2(memfd_create,return -EINVAL ;if (!(flags & (MFD_EXEC |MFD_NOEXEC_SEAL ))) { -#ifdef CONFIG_SYSCTL -int sysctl =MEMFD_NOEXEC_SCOPE_EXEC ; -struct pid_namespace *ns; - - ns =task_active_pid_ns (current); -if (ns) - sysctl = ns->memfd_noexec_scope; - -switch (sysctl) { -case MEMFD_NOEXEC_SCOPE_EXEC : - flags |=MFD_EXEC ; -break ; -case MEMFD_NOEXEC_SCOPE_NOEXEC_SEAL : - flags |=MFD_NOEXEC_SEAL ; -break ; -default : -pr_warn_once ( -"memfd_create(): MFD_NOEXEC_SEAL is enforced, pid=%d '%s'\n" , -task_pid_nr (current),get_task_comm (comm, current)); -return -EINVAL ; - } -#else - flags |=MFD_EXEC ; -#endif pr_warn_once ("memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=%d '%s'\n" ,task_pid_nr (current),get_task_comm (comm, current)); } +if (check_sysctl_memfd_noexec (&flags) <0 ) +return -EACCES ; +/* length includes terminating zero */ len =strnlen_user (uname,MFD_NAME_MAX_LEN +1 );if (len <=0 )
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 731/737 selftests/memfd: sysctl: fix MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Xu <[email protected]>
[ Upstream commit badbbcd76545c58eff64bb1548f7f834a30dc52a ]
Add selftest for sysctl vm.memfd_noexec is 2
(MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED)
memfd_create(.., MFD_EXEC) should fail in this case.
Stable-dep-of: 202e14222fad ("memfd: do not -EACCES old memfd_create() users with vm.memfd_noexec=2")
--- tools/testing/selftests/memfd/memfd_test.c | 5 +++++ 1 file changed, 5 insertions(+)
tools/testing/selftests/memfd/memfd_test.c +5 -0
@@ -1147,6 +1147,11 @@ static void test_sysctl_child(void)sysctl_assert_write ("2" );mfd_fail_new ("kern_memfd_sysctl_2" ,MFD_CLOEXEC |MFD_ALLOW_SEALING ); +mfd_fail_new ("kern_memfd_sysctl_2_MFD_EXEC" , +MFD_CLOEXEC |MFD_EXEC ); + fd =mfd_assert_new ("" ,0 ,MFD_NOEXEC_SEAL ); +close (fd); +sysctl_fail_write ("0" );sysctl_fail_write ("1" ); }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 732/737 memfd: do not -EACCES old memfd_create() users with vm.memfd_noexec=2
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aleksa Sarai <[email protected]>
[ Upstream commit 202e14222fadb246dfdf182e67de1518e86a1e20 ]
Given the difficulty of auditing all of userspace to figure out whether every memfd_create() user has switched to passing MFD_EXEC and MFD_NOEXEC_SEAL flags, it seems far less distruptive to make it possible for older programs that don't make use of executable memfds to run under vm.memfd_noexec=2. Otherwise, a small dependency change can result in spurious errors. For programs that don't use executable memfds, passing MFD_NOEXEC_SEAL is functionally a no-op and thus having the same
In addition, every failure under vm.memfd_noexec=2 needs to print to the kernel log so that userspace can figure out where the error came from. The concerns about pr_warn_ratelimited() spam that caused the switch to pr_warn_once()[1,2] do not apply to the vm.memfd_noexec=2 case.
This is a user-visible API change, but as it allows programs to do something that would be blocked before, and the sysctl itself was broken and recently released, it seems unlikely this will cause any issues.
[1]: https://lore.kernel.org/Y5yS8wCnuYGLHMj4@x1n/
[2]: https://lore.kernel.org/202212161233.85C9783FB@keescook/
--- include/linux/pid_namespace.h | 16 +++--------- mm/memfd.c | 30 ++++++++-------------- tools/testing/selftests/memfd/memfd_test.c | 22 ++++++++++++---- 3 files changed, 32 insertions(+), 36 deletions(-)
include/linux/pid_namespace.h +4 -12
@@ -17,18 +17,10 @@struct fs_pin ;#if defined(CONFIG_SYSCTL ) && defined(CONFIG_MEMFD_CREATE ) -/* -* sysctl for vm.memfd_noexec -* 0: memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL -* acts like MFD_EXEC was set. -* 1: memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL -* acts like MFD_NOEXEC_SEAL was set. -* 2: memfd_create() without MFD_NOEXEC_SEAL will be -* rejected. -*/ -#define MEMFD_NOEXEC_SCOPE_EXEC 0 -#define MEMFD_NOEXEC_SCOPE_NOEXEC_SEAL 1 -#define MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED 2 +/* modes for vm.memfd_noexec sysctl */ +#define MEMFD_NOEXEC_SCOPE_EXEC 0/* MFD_EXEC implied if unset */ +#define MEMFD_NOEXEC_SCOPE_NOEXEC_SEAL 1/* MFD_NOEXEC_SEAL implied if unset */ +#define MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED 2/* same as 1, except MFD_EXEC rejected */ #endif struct pid_namespace {
mm/memfd.c +11 -19
@@ -271,30 +271,22 @@ long memfd_fcntl(struct file *file, unsigned int cmd, unsigned int arg)static int check_sysctl_memfd_noexec (unsigned int *flags) {#ifdef CONFIG_SYSCTL -char comm[TASK_COMM_LEN ]; -int sysctl =MEMFD_NOEXEC_SCOPE_EXEC ; -struct pid_namespace *ns; - - ns =task_active_pid_ns (current); -if (ns) - sysctl = ns->memfd_noexec_scope; +int sysctl =task_active_pid_ns (current)->memfd_noexec_scope;if (!(*flags & (MFD_EXEC |MFD_NOEXEC_SEAL ))) { -if (sysctl ==MEMFD_NOEXEC_SCOPE_NOEXEC_SEAL ) +if (sysctl >=MEMFD_NOEXEC_SCOPE_NOEXEC_SEAL ) *flags |=MFD_NOEXEC_SEAL ;else *flags |=MFD_EXEC ; } -if (*flags &MFD_EXEC && sysctl >=MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED ) { -pr_warn_once ( -"memfd_create(): MFD_NOEXEC_SEAL is enforced, pid=%d '%s'\n" , -task_pid_nr (current),get_task_comm (comm, current)); - +if (!(*flags &MFD_NOEXEC_SEAL ) && sysctl >=MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED ) { +pr_err_ratelimited ( +"%s[%d]: memfd_create() requires MFD_NOEXEC_SEAL with vm.memfd_noexec=%d\n" , + current->comm,task_pid_nr (current), sysctl);return -EACCES ; }#endif -return 0 ; }
@@ -302,7 +294,6 @@ SYSCALL_DEFINE2(memfd_create, const char __user *, uname, unsigned int, flags) { - char comm[TASK_COMM_LEN]; unsigned int *file_seals;struct file *file;int fd, error;
@@ -325,12 +316,13 @@ SYSCALL_DEFINE2(memfd_create,if (!(flags & (MFD_EXEC |MFD_NOEXEC_SEAL ))) {pr_warn_once ( -"memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=%d '%s'\n" , -task_pid_nr (current),get_task_comm (comm, current)); +"%s[%d]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set\n" , + current->comm,task_pid_nr (current)); } -if (check_sysctl_memfd_noexec (&flags) <0 ) -return -EACCES ; + error =check_sysctl_memfd_noexec (&flags); +if (error <0 ) +return error;/* length includes terminating zero */ len =strnlen_user (uname,MFD_NAME_MAX_LEN +1 );
tools/testing/selftests/memfd/memfd_test.c +17 -5
@@ -1145,11 +1145,23 @@ static void test_sysctl_child(void)printf ("%s sysctl 2\n" , memfd_str);sysctl_assert_write ("2" ); -mfd_fail_new ("kern_memfd_sysctl_2" , -MFD_CLOEXEC |MFD_ALLOW_SEALING ); -mfd_fail_new ("kern_memfd_sysctl_2_MFD_EXEC" , -MFD_CLOEXEC |MFD_EXEC ); - fd =mfd_assert_new ("" ,0 ,MFD_NOEXEC_SEAL ); +mfd_fail_new ("kern_memfd_sysctl_2_exec" , +MFD_EXEC |MFD_CLOEXEC |MFD_ALLOW_SEALING ); + + fd =mfd_assert_new ("kern_memfd_sysctl_2_dfl" , + mfd_def_size, +MFD_CLOEXEC |MFD_ALLOW_SEALING ); +mfd_assert_mode (fd,0666 ); +mfd_assert_has_seals (fd,F_SEAL_EXEC ); +mfd_fail_chmod (fd,0777 ); +close (fd); + + fd =mfd_assert_new ("kern_memfd_sysctl_2_noexec_seal" , + mfd_def_size, +MFD_NOEXEC_SEAL |MFD_CLOEXEC |MFD_ALLOW_SEALING ); +mfd_assert_mode (fd,0666 ); +mfd_assert_has_seals (fd,F_SEAL_EXEC ); +mfd_fail_chmod (fd,0777 );close (fd);sysctl_fail_write ("0" );
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 733/737 memfd: improve userspace warnings for missing exec-related flags
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aleksa Sarai <[email protected]>
[ Upstream commit 434ed3350f57c03a9654fe0619755cc137a58935 ]
In order to incentivise userspace to switch to passing MFD_EXEC and MFD_NOEXEC_SEAL, we need to provide a warning on each attempt to call memfd_create() without the new flags. pr_warn_once() is not useful because on most systems the one warning is burned up during the boot process (on my system, systemd does this within the first second of boot) and thus userspace will in practice never see the warnings to push them to switch to the new flags.
The original patchset[1] used pr_warn_ratelimited(), however there were concerns about the degree of spam in the kernel log[2,3]. The resulting inability to detect every case was flagged as an issue at the time[4].
While we could come up with an alternative rate-limiting scheme such as only outputting the message if vm.memfd_noexec has been modified, or only outputting the message once for a given task, these alternatives have downsides that don't make sense given how low-stakes a single kernel warning message is. Switching to pr_info_ratelimited() instead should be fine -- it's possible some monitoring tool will be unhappy with a stream of warning-level messages but there's already plenty of info-level message spam in dmesg.
[1]: https://lore.kernel.org/[email protected]/
[2]: https://lore.kernel.org/202212161233.85C9783FB@keescook/
[3]: https://lore.kernel.org/Y5yS8wCnuYGLHMj4@x1n/
[4]: https://lore.kernel.org/[email protected]/
--- mm/memfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memfd.c +1 -1
@@ -315,7 +315,7 @@ SYSCALL_DEFINE2(memfd_create,return -EINVAL ;if (!(flags & (MFD_EXEC |MFD_NOEXEC_SEAL ))) { -pr_warn_once ( +pr_info_ratelimited ("%s[%d]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set\n" , current->comm,task_pid_nr (current)); }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 734/737 revert "memfd: improve userspace warnings for missing exec-related flags".
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Morton <[email protected]>
commit 2562d67b1bdf91c7395b0225d60fdeb26b4bc5a0 upstream.
This warning is telling userspace developers to pass MFD_EXEC and MFD_NOEXEC_SEAL to memfd_create(). Commit 434ed3350f57 ("memfd: improve userspace warnings for missing exec-related flags") made the warning more frequent and visible in the hope that this would accelerate the fixing of errant userspace.
But the overall effect is to generate far too much dmesg noise.
--- mm/memfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memfd.c +1 -1
@@ -315,7 +315,7 @@ SYSCALL_DEFINE2(memfd_create,return -EINVAL ;if (!(flags & (MFD_EXEC |MFD_NOEXEC_SEAL ))) { -pr_info_ratelimited ( +pr_warn_once ("%s[%d]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set\n" , current->comm,task_pid_nr (current)); }
Greg Kroah-Hartman
maintainerPATCH 735/737 net: remove duplicate INDIRECT_CALLABLE_DECLARE of udp[6]_ehashfn
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenz Bauer <[email protected]>
commit 74bdfab4fd7c641e55f7fe9d1be9687eeb01df67 upstream.
There are already INDIRECT_CALLABLE_DECLARE in the hashtable headers, no need to declare them again.
--- net/ipv4/inet_hashtables.c | 2 -- net/ipv6/inet6_hashtables.c | 2 -- 2 files changed, 4 deletions(-)
net/ipv4/inet_hashtables.c +0 -2
@@ -333,8 +333,6 @@ static inline int compute_score(struct sreturn score; } -INDIRECT_CALLABLE_DECLARE(inet_ehashfn_t udp_ehashfn); - struct sock *inet_lookup_reuseport(struct net *net, struct sock *sk, struct sk_buff *skb, int doff, __be32 saddr, __be16 sport,
net/ipv6/inet6_hashtables.c +0 -2
@@ -112,8 +112,6 @@ static inline int compute_score(struct sreturn score; } -INDIRECT_CALLABLE_DECLARE(inet6_ehashfn_t udp6_ehashfn); - struct sock *inet6_lookup_reuseport(struct net *net, struct sock *sk, struct sk_buff *skb, int doff, const struct in6_addr *saddr,
Greg Kroah-Hartman
maintainerPATCH 736/737 tracing: Zero the pipe cpumask on alloc to avoid spurious -EBUSY
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brian Foster <[email protected]>
commit 3d07fa1dd19035eb0b13ae6697efd5caa9033e74 upstream.
The pipe cpumask used to serialize opens between the main and percpu trace pipes is not zeroed or initialized. This can result in spurious -EBUSY returns if underlying memory is not fully zeroed. This has been observed by immediate failure to read the main trace_pipe file on an otherwise newly booted and idle system:
# cat /sys/kernel/debug/tracing/trace_pipe cat: /sys/kernel/debug/tracing/trace_pipe: Device or resource busy
Zero the allocation of pipe_cpumask to avoid the problem.
--- kernel/trace/trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/trace.c +2 -2
@@ -9465,7 +9465,7 @@ static struct trace_array *trace_array_cif (!alloc_cpumask_var (&tr->tracing_cpumask,GFP_KERNEL )) goto out_free_tr; -if (!alloc_cpumask_var (&tr->pipe_cpumask,GFP_KERNEL )) +if (!zalloc_cpumask_var (&tr->pipe_cpumask,GFP_KERNEL )) goto out_free_tr; tr->trace_flags = global_trace.trace_flags & ~ZEROED_TRACE_FLAGS ;
@@ -10410,7 +10410,7 @@ __init static int tracer_alloc_buffers(vif (trace_create_savedcmd () <0 ) goto out_free_temp_buffer; -if (!alloc_cpumask_var (&global_trace.pipe_cpumask,GFP_KERNEL )) +if (!zalloc_cpumask_var (&global_trace.pipe_cpumask,GFP_KERNEL )) goto out_free_savedcmd;/* TODO: make the number of buffers hot pluggable with CPUS */
Greg Kroah-Hartman
maintainerPATCH 737/737 Revert "drm/amd/display: Do not set drr on pipe commit"
In reply to Greg Kroah-Hartman6.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michel Dänzer <[email protected]>
commit 360930985ec9f394c82ba0b235403b4a366d1560 upstream.
This reverts commit e101bf95ea87ccc03ac2f48dfc0757c6364ff3c7.
Caused a regression:
Samsung Odyssey Neo G9, running at 5120x1440@240/VRR, connected to Navi 21 via DisplayPort, blanks and the GPU hangs while starting the Steam game Assetto Corsa Competizione (via Proton 7.0).
Example dmesg excerpt:
amdgpu 0000:0c:00.0: [drm] ERROR [CRTC:82:crtc-0] flip_done timed out NMI watchdog: Watchdog detected hard LOCKUP on cpu 6
[...]
RIP: 0010:amdgpu_device_rreg.part.0+0x2f/0xf0 [amdgpu] Code: 41 54 44 8d 24 b5 00 00 00 00 55 89 f5 53 48 89 fb 4c 3b a7 60 0b 00 00 73 6a 83 e2 02 74 29 4c 03 a3 68 0b 00 00 45 8b 24 24 <48> 8b 43 08 0f b7 70 3e 66 90 44 89 e0 5b 5d 41 5c 31 d2 31 c9 31 RSP: 0000:ffffb39a119dfb88 EFLAGS: 00000086 RAX: ffffffffc0eb96a0 RBX: ffff9e7963dc0000 RCX: 0000000000007fff RDX: 0000000000000000 RSI: 0000000000004ff6 RDI: ffff9e7963dc0000 RBP: 0000000000004ff6 R08: ffffb39a119dfc40 R09: 0000000000000010 R10: ffffb39a119dfc40 R11: ffffb39a119dfc44 R12: 00000000000e05ae R13: 0000000000000000 R14: ffff9e7963dc0010 R15: 0000000000000000 FS: 000000001012f6c0(0000) GS:ffff9e805eb80000(0000) knlGS:000000007fd40000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000461ca000 CR3: 00000002a8a20000 CR4: 0000000000350ee0 Call Trace: <TASK> dm_read_reg_func+0x37/0xc0 [amdgpu] generic_reg_get2+0x22/0x60 [amdgpu] optc1_get_crtc_scanoutpos+0x6a/0xc0 [amdgpu] dc_stream_get_scanoutpos+0x74/0x90 [amdgpu] dm_crtc_get_scanoutpos+0x82/0xf0 [amdgpu] amdgpu_display_get_crtc_scanoutpos+0x91/0x190 [amdgpu] ? dm_read_reg_func+0x37/0xc0 [amdgpu] amdgpu_get_vblank_counter_kms+0xb4/0x1a0 [amdgpu] dm_pflip_high_irq+0x213/0x2f0 [amdgpu] amdgpu_dm_irq_handler+0x8a/0x200 [amdgpu] amdgpu_irq_dispatch+0xd4/0x220 [amdgpu] amdgpu_ih_process+0x7f/0x110 [amdgpu] amdgpu_irq_handler+0x1f/0x70 [amdgpu] __handle_irq_event_percpu+0x46/0x1b0 handle_irq_event+0x34/0x80 handle_edge_irq+0x9f/0x240 __common_interrupt+0x66/0x110 common_interrupt+0x5c/0xd0 asm_common_interrupt+0x22/0x40
--- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 6 ------ drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 7 ------- 2 files changed, 13 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +0 -6
@@ -2124,12 +2124,6 @@ void dcn20_optimize_bandwidth(if (hubbub->funcs->program_compbuf_size) hubbub->funcs->program_compbuf_size (hubbub, context->bw_ctx.bw.dcn.compbuf_size_kb, true); -if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching) { -dc_dmub_srv_p_state_delegate (dc, - true, context); - context->bw_ctx.bw.dcn.clk.p_state_change_support = true; - } - dc->clk_mgr->funcs->update_clocks( dc->clk_mgr, context,
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c +0 -7
@@ -985,18 +985,11 @@ void dcn30_set_disp_pattern_generator(covoid dcn30_prepare_bandwidth (struct dc *dc,struct dc_state *context) { -if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching) { - dc->optimized_required = true; - context->bw_ctx.bw.dcn.clk.p_state_change_support = false; - } -if (dc->clk_mgr->dc_mode_softmax_enabled)if (dc->clk_mgr->clks.dramclk_khz <= dc->clk_mgr->bw_params->dc_mode_softmax_memclk *1000 && context->bw_ctx.bw.dcn.clk.dramclk_khz > dc->clk_mgr->bw_params->dc_mode_softmax_memclk *1000 ) dc->clk_mgr->funcs->set_max_memclk (dc->clk_mgr, dc->clk_mgr->bw_params->clk_table.entries[dc->clk_mgr->bw_params->clk_table.num_entries -1 ].memclk_mhz);dcn20_prepare_bandwidth (dc, context); - -dc_dmub_srv_p_state_delegate (dc, false, context); }
A message that is not in the archive (sent off-list or not yet received): CH0PR12MB5284A97461111A04912017798BF1A@CH0PR12MB5284.namprd12.prod.outlook.com
Greg Kroah-Hartman
maintainerRe: [PATCH 6.4 737/737] Revert "drm/amd/display: Do not set drr on pipe commit"
Quoted 6 lines · Aurabindo
[AMD Official Use Only - General]
Hi Greg,
NAK on this revert. This would cause hangs on multi monitor configurations on recent asics. The original issue that required this patch to be reverted was fixed through a monitor specific workaround (https://gitlab.freedesktop.org/agd5f/linux/-/commit/cc225c8af276396c3379885b38d2a9e28af19aa9)
But this revert is upstream. So should the revert be reverted?
confused,
greg k-h
A message that is not in the archive (sent off-list or not yet received): CH0PR12MB528496066990E49D4F93CD208BF1A@CH0PR12MB5284.namprd12.prod.outlook.com
Greg Kroah-Hartman
maintainerRe: [PATCH 6.4 737/737] Revert "drm/amd/display: Do not set drr on pipe commit"
Quoted 9 lines · Aurabindo
[AMD Official Use Only - General]
Hi Greg,
It was reverted but has been re-applied.
Here is a chronological summary of what happened:
Quoted 6 lines
1. Michel bisected some major issues to "drm/amd/display: Do not set drr on pipe commit" and was revered in upstream. ". Along with that patch, "drm/amd/display: Block optimize on consecutive FAMS enables" was also reverted due to dependency. 2. We found that reverting these patches caused some multi monitor configurations to hang on RDNA3. 3. We debugged Michel's issue and merged a workaround (https://gitlab.freedesktop.org/agd5f/linux/-/commit/cc225c8af276396c3379885b38d2a9e28af19aa9 4. Subsequently, the two patches were reapplied (https://gitlab.freedesktop.org/agd5f/linux/-/commit/bfe1b43c1acee1251ddb09159442b9d782800aef and https://gitlab.freedesktop.org/agd5f/linux/-/commit/f3c2a89c5103b4ffdd88f09caa36488e0d0cf79d)Hence, the stable kernel should have all 3 patches - the workaround and 2 others. Hope that clarifies the situation.
Great, what are the ids of those in Linus's tree?
thanks,
greg k-h
Re: [PATCH 6.4 737/737] Revert "drm/amd/display: Do not set drr on pipe commit"
Quoted 10 lines · Greg Kroah-Hartman
Quoted 9 lines · Aurabindo
[AMD Official Use Only - General]
Hi Greg,
It was reverted but has been re-applied.
Here is a chronological summary of what happened:
Quoted 8 lines
Quoted 6 lines
1. Michel bisected some major issues to "drm/amd/display: Do not set drr on pipe commit" and was revered in upstream. ". Along with that patch, "drm/amd/display: Block optimize on consecutive FAMS enables" was also reverted due to dependency. 2. We found that reverting these patches caused some multi monitor configurations to hang on RDNA3. 3. We debugged Michel's issue and merged a workaround (https://gitlab.freedesktop.org/agd5f/linux/-/commit/cc225c8af276396c3379885b38d2a9e28af19aa9 4. Subsequently, the two patches were reapplied (https://gitlab.freedesktop.org/agd5f/linux/-/commit/bfe1b43c1acee1251ddb09159442b9d782800aef and https://gitlab.freedesktop.org/agd5f/linux/-/commit/f3c2a89c5103b4ffdd88f09caa36488e0d0cf79d)Hence, the stable kernel should have all 3 patches - the workaround and 2 others. Hope that clarifies the situation.
Great, what are the ids of those in Linus's tree?
3b6df06f01cd drm/amd/display: Block optimize on consecutive FAMS enables 09c8cbedba5f drm/amd/display: Do not set drr on pipe commit 613a7956deb3 drm/amd/display: Add monitor specific edid quirk
From https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Quoted 4 lines
thanks,
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 6.4 737/737] Revert "drm/amd/display: Do not set drr on pipe commit"
Quoted 18 lines · Aurabindo Pillai
Quoted 15 lines · Greg Kroah-Hartman
Quoted 14 lines · Aurabindo
[AMD Official Use Only - General]
Hi Greg,
It was reverted but has been re-applied.
Here is a chronological summary of what happened:
1. Michel bisected some major issues to "drm/amd/display: Do not set drr on pipe commit" and was revered in upstream. ". Along with that patch, "drm/amd/display: Block optimize on consecutive FAMS enables" was also reverted due to dependency. 2. We found that reverting these patches caused some multi monitor configurations to hang on RDNA3. 3. We debugged Michel's issue and merged a workaround (https://gitlab.freedesktop.org/agd5f/linux/-/commit/cc225c8af276396c3379885b38d2a9e28af19aa9 4. Subsequently, the two patches were reapplied (https://gitlab.freedesktop.org/agd5f/linux/-/commit/bfe1b43c1acee1251ddb09159442b9d782800aef and https://gitlab.freedesktop.org/agd5f/linux/-/commit/f3c2a89c5103b4ffdd88f09caa36488e0d0cf79d)
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Hence, the stable kernel should have all 3 patches - the workaround and 2 others. Hope that clarifies the situation.
Great, what are the ids of those in Linus's tree?
3b6df06f01cddrm/amd/display: Block optimize on consecutive FAMS enables
Ok, I'll add this one.
Quoted 1 line
09c8cbedba5fdrm/amd/display: Do not set drr on pipe commit
This is already in the 6.5-rc queue
Quoted 1 line
613a7956deb3drm/amd/display: Add monitor specific edid quirk
This is already in the 6.5 release.
So all that was needed was the one additional one? I'll go queue that up now, thanks.
greg k-h
RE: [PATCH 6.4 737/737] Revert "drm/amd/display: Do not set drr on pipe commit"
In reply to Greg Kroah-Hartman[Public]
Quoted 36 lines
-----Original Message-----
From: Greg Kroah-Hartman <[email protected]>
Sent: Tuesday, September 12, 2023 11:39 AM
To: Pillai, Aurabindo <[email protected]>
Cc: [email protected]; Michel Dänzer <[email protected]>; [email protected]; Deucher, Alexander <[email protected]>; Michel Dänzer <[email protected]>; Mahfooz, Hamza <[email protected]>
Subject: Re: [PATCH 6.4 737/737] Revert "drm/amd/display: Do not set drr on pipe commit"Quoted 10 lines · Aurabindo
[AMD Official Use Only - General]
Hi Greg,
It was reverted but has been re-applied.
Here is a chronological summary of what happened:
1. Michel bisected some major issues to "drm/amd/display: Do not set drr
on pipe commit" and was revered in upstream. ". Along with that patch, "drm/amd/display: Block optimize on consecutive FAMS enables" was also reverted due to dependency.
Quoted 1 line
2. We found that reverting these patches caused some multi monitor
configurations to hang on RDNA3.
Quoted 1 line
3. We debugged Michel's issue and merged a workaround
(https://gitlab.freedesktop.org/agd5f/linux/-
/commit/cc225c8af276396c3379885b38d2a9e28af19aa9Quoted 1 line
4. Subsequently, the two patches were reapplied
(https://gitlab.freedesktop.org/agd5f/linux/-
/commit/bfe1b43c1acee1251ddb09159442b9d782800aef and
https://gitlab.freedesktop.org/agd5f/linux/-
/commit/f3c2a89c5103b4ffdd88f09caa36488e0d0cf79d)Quoted 1 line
Quoted 4 lines
Quoted 1 line
Hence, the stable kernel should have all 3 patches - the workaround and 2
others. Hope that clarifies the situation.
Great, what are the ids of those in Linus's tree?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=613a7956deb3b1ffa2810c6d4c90ee9c3d743dbb
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=09c8cbedba5fa85f15ac91ed74848aceff69f8e5
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3b6df06f01cdbff3b610b492ad4879691afdc70d
Thanks,
Alex
Quoted 4 lines
thanks,
greg k-h
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.4.16 release. There are 737 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, 13 Sep 2023 13:44:56 +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.4.16-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.4.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.4.16 release. There are 737 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 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.4.16 release. There are 737 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, 13 Sep 2023 13:44:56 +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.4.16-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.4.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 6.4.16-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.4.y
* git commit: c383978584827c8fe5480bc6c182183dba0e4b92
* git describe: v6.4.15-738-gc38397858482
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.4.y/build/v6.4.15-738-gc38397858482
## Test Regressions (compared to v6.4.15)
## Metric Regressions (compared to v6.4.15)
## Test Fixes (compared to v6.4.15)
## Metric Fixes (compared to v6.4.15)
## Test result summary
total: 145516, pass: 125575, fail: 1989, skip: 17770, xfail: 182
## Build Summary
* arc: 4 total, 4 passed, 0 failed
* arm: 140 total, 138 passed, 2 failed
* arm64: 51 total, 48 passed, 3 failed
* i386: 42 total, 40 passed, 2 failed
* mips: 30 total, 28 passed, 2 failed
* parisc: 4 total, 4 passed, 0 failed
* powerpc: 37 total, 35 passed, 2 failed
* riscv: 25 total, 22 passed, 3 failed
* s390: 16 total, 14 passed, 2 failed
* sh: 14 total, 12 passed, 2 failed
* sparc: 7 total, 7 passed, 0 failed
* x86_64: 46 total, 42 passed, 4 failed
## Test suites summary
* boot
* kselftest-android
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-exec
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-filesystems-epoll
* 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-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-net-forwarding
* kselftest-net-mptcp
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-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-vm
* 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
--
Linaro LKFT
https://lkft.linaro.org
Hi Greg,
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.4.16 release. There are 737 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 13.2.1 20230827):
mips: 52 configs -> no failure
arm: 70 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/5002
[2]. https://openqa.qa.codethink.co.uk/tests/5004
[3]. https://openqa.qa.codethink.co.uk/tests/5003
Signature · 2 lines
Regards Sudip
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.4.16 release. There are 737 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, 13 Sep 2023 13:44:56 +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.4.16-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.4.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 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.4.16 release. There are 737 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.
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.4.16 release. There are 737 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, 13 Sep 2023 13:44:56 +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.4.16-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.4.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v6.4:
11 builds: 11 pass, 0 fail
28 boots: 28 pass, 0 fail
130 tests: 130 pass, 0 failLinux version: 6.4.16-rc1-gc38397858482
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 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.4.16 release. There are 737 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, 13 Sep 2023 13:44:56 +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.4.16-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.4.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.4.16 release. There are 737 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, 13 Sep 2023 13:44:56 +0000. Anything received after that time might be too late.
Build results:
total: 157 pass: 157 fail: 0 Qemu test results: total: 530 pass: 530 fail: 0
Guenter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.4.16 release. There are 737 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, 13 Sep 2023 13:44:56 +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.4.16-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.4.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).