From c351c2be08711bf367cefd15d40d7a13bc5755c7 Mon Sep 17 00:00:00 2001 From: Deepak R Varma Date: Sat, 14 Jan 2023 21:12:39 +0530 Subject: [PATCH 01/30] drm/i915/gvt: Remove extra semicolon Remove the extra semicolon at end. Issue identified using semicolon.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/Y8LNbzgTf/1kYJX/@ubun2204.myguest.virtualbox.org Reviewed-by: Zhenyu Wang --- drivers/gpu/drm/i915/gvt/vgpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c b/drivers/gpu/drm/i915/gvt/vgpu.c index 3c529c2705dd..2a7b36c5ea57 100644 --- a/drivers/gpu/drm/i915/gvt/vgpu.c +++ b/drivers/gpu/drm/i915/gvt/vgpu.c @@ -325,7 +325,7 @@ int intel_gvt_create_vgpu(struct intel_vgpu *vgpu, ret = idr_alloc(&gvt->vgpu_idr, vgpu, IDLE_VGPU_IDR + 1, GVT_MAX_VGPU, GFP_KERNEL); if (ret < 0) - goto out_unlock;; + goto out_unlock; vgpu->id = ret; vgpu->sched_ctl.weight = conf->weight; From 0c7012ed5d9735a27a730da406e728cfaa3d2120 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 25 Apr 2019 10:19:52 +0100 Subject: [PATCH 02/30] lockdep: Swap storage for pin_count and references As a lockmap takes a reference for every ww_mutex used together, this can be an arbitrarily large number and under control of userspace -- easily overflowing the arbitrary limit of 4096. However, the pin_count (used for detecting unexpected lock dropping) is a full 32b despite nesting being extremely rare (see lockdep_pin_lock). References: https://gitlab.freedesktop.org/drm/intel/-/issues/8028 Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190425092004.9995-33-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi --- include/linux/lockdep.h | 4 ++-- kernel/locking/lockdep.c | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 1f1099dac3f0..04fff0e757e0 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h @@ -134,8 +134,8 @@ struct held_lock { unsigned int read:2; /* see lock_acquire() comment */ unsigned int check:1; /* see lock_acquire() comment */ unsigned int hardirqs_off:1; - unsigned int references:12; /* 32 bits */ - unsigned int pin_count; + unsigned int pin_count:12; /* 32 bits */ + unsigned int references; }; /* diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index e3375bc40dad..fcc22f71ad09 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -5431,11 +5431,14 @@ static struct pin_cookie __lock_pin_lock(struct lockdep_map *lock) if (match_held_lock(hlock, lock)) { /* - * Grab 16bits of randomness; this is sufficient to not - * be guessable and still allows some pin nesting in - * our u32 pin_count. + * Grab 6bits of randomness; this is barely sufficient + * to not be guessable and still allows some 32 levels + * of pin nesting in our u12 pin_count. */ - cookie.val = 1 + (sched_clock() & 0xffff); + cookie.val = 1 + (sched_clock() & 0x3f); + if (DEBUG_LOCKS_WARN_ON(hlock->pin_count + cookie.val >= 1 << 12)) + return NIL_COOKIE; + hlock->pin_count += cookie.val; return cookie; } From 37c252ea83061b8bc60a0dd4e4bec436ac18503a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 13 Nov 2017 12:57:06 +0000 Subject: [PATCH 03/30] ftrace: Allow configuring global trace buffer size (for dump-on-oops) We have recently turned on ftrace-dump-on-oops for i915's CI and an issue we have encountered is that the trace buffer size greatly exceeds the pstore capabilities; we get the tail of the oops but not the introduction. Currently the global buffer size is controllable on the cmdline, but at the request of our CI sysadmin, we would like to add a control to the Kconfig as well. The rationale being the cmdline carries the temporary hacks that we want to eradicate, and we want to track the permanent configuration in .config. I have kept the Kconfig option hidden from the user as the default should suffice for the majority of users; reserving the configuration for those that eschew the cmdline option. v2: Add an expert prompt to stop the default value overriding .config changes. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8029 Signed-off-by: Chris Wilson Cc: Steven Rostedt Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Tomi Sarvela Cc: Joonas Lahtinen Cc: Daniel Vetter Signed-off-by: Rodrigo Vivi --- kernel/trace/Kconfig | 7 +++++++ kernel/trace/trace.c | 4 +--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 197545241ab8..c43652693160 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -159,6 +159,13 @@ config TRACING select TRACE_CLOCK select TASKS_RCU if PREEMPTION +config GLOBAL_TRACE_BUF_SIZE + int + prompt "Global ftrace buffer size (for trace_printk)" if EXPERT + range 0 4194034 + default 1441792 # 16384 * 88 (sizeof(struct print_entry)) + depends on TRACING + config GENERIC_TRACER bool select TRACING diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index a555a861b978..2762dbda8556 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -812,9 +812,7 @@ int tracing_is_enabled(void) * to not have to wait for all that output. Anyway this can be * boot time and run time configurable. */ -#define TRACE_BUF_SIZE_DEFAULT 1441792UL /* 16384 * 88 (sizeof(entry)) */ - -static unsigned long trace_buf_size = TRACE_BUF_SIZE_DEFAULT; +static unsigned long trace_buf_size = CONFIG_GLOBAL_TRACE_BUF_SIZE; /* trace_types holds a link list of available tracers. */ static struct tracer *trace_types __read_mostly; From 4491f6974253027459757198a97ec9946c5becf1 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 3 Sep 2018 14:17:45 +0100 Subject: [PATCH 04/30] kernel/panic: Show the stacktrace after additional notifier messages Most systems keep the last messages from the panic, and we value the stacktrace most, so dump it last in order to preserve it for post-mortems. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8030 Signed-off-by: Chris Wilson Acked-by: Martin Peres Link: https://patchwork.freedesktop.org/patch/msgid/20180903131745.30593-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi --- kernel/panic.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/kernel/panic.c b/kernel/panic.c index 463c9295bc28..5cb4fdbb56f2 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -310,13 +310,6 @@ void panic(const char *fmt, ...) buf[len - 1] = '\0'; pr_emerg("Kernel panic - not syncing: %s\n", buf); -#ifdef CONFIG_DEBUG_BUGVERBOSE - /* - * Avoid nested stack-dumping if a panic occurs during oops processing - */ - if (!test_taint(TAINT_DIE) && oops_in_progress <= 1) - dump_stack(); -#endif /* * If kgdb is enabled, give it a chance to run before we stop all @@ -359,6 +352,14 @@ void panic(const char *fmt, ...) panic_print_sys_info(false); +#ifdef CONFIG_DEBUG_BUGVERBOSE + /* + * Avoid nested stack-dumping if a panic occurs during oops processing + */ + if (!test_taint(TAINT_DIE) && oops_in_progress <= 1) + dump_stack(); +#endif + kmsg_dump(KMSG_DUMP_PANIC); /* From 442d573f7822df06d097f7136b13b675453e29f1 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 9 Oct 2018 12:35:21 +0100 Subject: [PATCH 05/30] x86: Downgrade clock throttling thermal event critical error Under CI testing, it is common for the cpus to overheat with the continuous workloads and end up being throttled. As the cpus still function, it is less of a critical error meriting urgent action, but an expected yet significant condition (pr_note). References: https://gitlab.freedesktop.org/drm/intel/-/issues/8031 Signed-off-by: Chris Wilson Cc: Petri Latvala Signed-off-by: Rodrigo Vivi --- drivers/thermal/intel/therm_throt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/intel/therm_throt.c b/drivers/thermal/intel/therm_throt.c index 2e22bb82b738..130f425abc64 100644 --- a/drivers/thermal/intel/therm_throt.c +++ b/drivers/thermal/intel/therm_throt.c @@ -289,10 +289,10 @@ static void __maybe_unused throttle_active_work(struct work_struct *work) avg /= ARRAY_SIZE(state->temp_samples); if (state->average > avg) { - pr_warn("CPU%d: %s temperature is above threshold, cpu clock is throttled (total events = %lu)\n", - this_cpu, - state->level == CORE_LEVEL ? "Core" : "Package", - state->count); + pr_notice("CPU%d: %s temperature is above threshold, cpu clock is throttled (total events = %lu)\n", + this_cpu, + state->level == CORE_LEVEL ? "Core" : "Package", + state->count); state->rate_control_active = true; } From bcf22e42eb4251a64c221626a44b7079cf81a37c Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 16 Nov 2021 09:22:48 +0100 Subject: [PATCH 06/30] libata: Downgrade unsupported feature warnings to notifications References: https://gitlab.freedesktop.org/drm/intel/-/issues/8032 Signed-off-by: Chris Wilson Cc: Petri Latvala [danvet: Rebase] Signed-off-by: Rodrigo Vivi --- drivers/ata/libata-core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 884ae73b11ea..515e73bbbcf3 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -2038,7 +2038,7 @@ static bool ata_identify_page_supported(struct ata_device *dev, u8 page) * for drives which implement this ATA level or above. */ if (ata_id_major_version(dev->id) >= 10) - ata_dev_warn(dev, + ata_dev_notice(dev, "ATA Identify Device Log not supported\n"); dev->horkage |= ATA_HORKAGE_NO_ID_DEV_LOG; return false; @@ -2110,7 +2110,7 @@ static void ata_dev_config_ncq_send_recv(struct ata_device *dev) unsigned int err_mask; if (!ata_log_supported(dev, ATA_LOG_NCQ_SEND_RECV)) { - ata_dev_warn(dev, "NCQ Send/Recv Log not supported\n"); + ata_dev_notice(dev, "NCQ Send/Recv Log not supported\n"); return; } err_mask = ata_read_log_page(dev, ATA_LOG_NCQ_SEND_RECV, @@ -2135,8 +2135,8 @@ static void ata_dev_config_ncq_non_data(struct ata_device *dev) unsigned int err_mask; if (!ata_log_supported(dev, ATA_LOG_NCQ_NON_DATA)) { - ata_dev_warn(dev, - "NCQ Send/Recv Log not supported\n"); + ata_dev_notice(dev, + "NCQ Send/Recv Log not supported\n"); return; } err_mask = ata_read_log_page(dev, ATA_LOG_NCQ_NON_DATA, @@ -2632,14 +2632,14 @@ int ata_dev_configure(struct ata_device *dev) if (ata_id_is_cfa(id)) { /* CPRM may make this media unusable */ if (id[ATA_ID_CFA_KEY_MGMT] & 1) - ata_dev_warn(dev, + ata_dev_notice(dev, "supports DRM functions and may not be fully accessible\n"); snprintf(revbuf, 7, "CFA"); } else { snprintf(revbuf, 7, "ATA-%d", ata_id_major_version(id)); /* Warn the user if the device has TPM extensions */ if (ata_id_has_tpm(id)) - ata_dev_warn(dev, + ata_dev_notice(dev, "supports DRM functions and may not be fully accessible\n"); } @@ -2792,8 +2792,8 @@ int ata_dev_configure(struct ata_device *dev) } if ((dev->horkage & ATA_HORKAGE_FIRMWARE_WARN) && print_info) { - ata_dev_warn(dev, "WARNING: device requires firmware update to be fully functional\n"); - ata_dev_warn(dev, " contact the vendor or visit http://ata.wiki.kernel.org\n"); + ata_dev_notice(dev, "WARNING: device requires firmware update to be fully functional\n"); + ata_dev_notice(dev, " contact the vendor or visit http://ata.wiki.kernel.org\n"); } return 0; From a7d4fe1daf0887aef390d27a3c75004dee89220b Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Mon, 2 Jul 2018 16:57:56 +0300 Subject: [PATCH 07/30] ICL HACK: usb/icl: Work around ACPI boottime crash Work around the following boot time crash: [ 10.456056] CPU: 1 PID: 220 Comm: systemd-udevd Tainted: G W 4.17.0-rc7-CI-CI_DRM_4040+ #182 [ 10.465828] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP, BIOS +ICLSFWR1.R00.2204.A00.1805172221 05/17/2018 [ 10.479168] RIP: 0010:acpi_ps_complete_this_op+0xa7/0x22a [ 10.484627] RSP: 0018:ffffc900003a7578 EFLAGS: 00010202 [ 10.489881] RAX: 6b6b6b6b6b6b6b6b RBX: ffff8804abeda9c8 RCX: 0000000000000020 [ 10.497045] RDX: 0000000000000000 RSI: ffff88049e604a68 RDI: 0000000000000000 [ 10.504213] RBP: 0000000000000000 R08: ffff8804abeda9c8 R09: 0000000000000000 [ 10.511376] R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000000e [ 10.518542] R13: ffff88049e604a68 R14: ffff88049e604a68 R15: ffffffffa00263c2 [ 10.525713] FS: 00007ff6d85f18c0(0000) GS:ffff8804be880000(0000) knlGS:0000000000000000 [ 10.533839] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 10.539616] CR2: 00007ff6d73cff40 CR3: 000000049f794001 CR4: 0000000000760ee0 [ 10.546783] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 10.553949] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 10.561112] PKRU: 55555554 [ 10.563849] Call Trace: [ 10.566323] acpi_ps_complete_op+0x49/0x3f1 [ 10.570537] acpi_ps_parse_loop+0x94c/0x9bb [ 10.574754] ? acpi_ds_delete_walk_state+0x113/0x131 [ 10.579750] acpi_ps_parse_aml+0x1a2/0x4af [ 10.583875] acpi_ps_execute_method+0x1e9/0x2a5 [ 10.588435] acpi_ns_evaluate+0x2e4/0x42c [ 10.592473] acpi_evaluate_object+0x1fd/0x3a8 [ 10.596873] usb_acpi_find_companion+0xee/0x1f0 [usbcore] [ 10.602319] acpi_platform_notify+0x33/0xa0 [ 10.606532] device_add+0x197/0x600 [ 10.610048] ? __init_waitqueue_head+0x36/0x50 [ 10.614529] usb_hub_create_port_device+0x11d/0x340 [usbcore] [ 10.620314] hub_probe+0x9a5/0x1010 [usbcore] [ 10.624701] ? _raw_spin_unlock_irqrestore+0x51/0x60 [ 10.629730] usb_probe_interface+0x13f/0x300 [usbcore] [ 10.634900] driver_probe_device+0x302/0x470 [ 10.639198] ? __driver_attach+0xe0/0xe0 [ 10.643147] bus_for_each_drv+0x59/0x90 [ 10.647013] __device_attach+0xb7/0x130 [ 10.650878] bus_probe_device+0x9c/0xb0 [ 10.654745] device_add+0x3c5/0x600 [ 10.658270] usb_set_configuration+0x540/0x880 [usbcore] [ 10.663621] generic_probe+0x28/0x80 [usbcore] [ 10.668097] driver_probe_device+0x302/0x470 [ 10.672393] ? __driver_attach+0xe0/0xe0 [ 10.676346] bus_for_each_drv+0x59/0x90 [ 10.680211] __device_attach+0xb7/0x130 [ 10.684076] bus_probe_device+0x9c/0xb0 [ 10.687940] device_add+0x3c5/0x600 [ 10.691464] usb_new_device+0x269/0x490 [usbcore] [ 10.696206] usb_add_hcd+0x558/0x850 [usbcore] [ 10.700682] xhci_pci_probe+0x13d/0x240 [xhci_pci] [ 10.705534] pci_device_probe+0xa1/0x130 [ 10.709484] driver_probe_device+0x302/0x470 [ 10.713784] __driver_attach+0xb9/0xe0 [ 10.717562] ? driver_probe_device+0x470/0x470 [ 10.722033] ? driver_probe_device+0x470/0x470 [ 10.726505] bus_for_each_dev+0x64/0x90 [ 10.730370] ? preempt_count_sub+0x92/0xd0 [ 10.734495] bus_add_driver+0x164/0x260 [ 10.738362] ? 0xffffffffa004e000 [ 10.741704] driver_register+0x57/0xc0 [ 10.745482] ? 0xffffffffa004e000 [ 10.748824] do_one_initcall+0x4a/0x350 [ 10.752690] ? do_init_module+0x22/0x20a [ 10.756643] ? rcu_read_lock_sched_held+0x74/0x80 [ 10.761377] ? kmem_cache_alloc_trace+0x284/0x2e0 [ 10.766114] do_init_module+0x5b/0x20a [ 10.769895] load_module+0x250d/0x2b20 [ 10.773678] ? kernel_read+0x2c/0x40 [ 10.777285] ? __se_sys_finit_module+0xaa/0xc0 [ 10.781759] __se_sys_finit_module+0xaa/0xc0 [ 10.786061] do_syscall_64+0x54/0x190 [ 10.789752] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 10.794831] RIP: 0033:0x7ff6d74664d9 [ 10.798430] RSP: 002b:00007ffd91e7dd78 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 10.806033] RAX: ffffffffffffffda RBX: 0000560519bfae20 RCX: 00007ff6d74664d9 [ 10.813195] RDX: 0000000000000000 RSI: 00007ff6d795ce23 RDI: 000000000000000e [ 10.820360] RBP: 00007ff6d795ce23 R08: 0000000000000000 R09: 0000000000000000 [ 10.827523] R10: 000000000000000e R11: 0000000000000246 R12: 0000000000000000 [ 10.834690] R13: 0000560519bf9a30 R14: 0000000000020000 R15: 000000000aba9500 [ 10.841862] Code: c2 10 5f ea 81 48 c7 c6 f0 5e ea 81 bf 7c 00 00 00 e8 0d 7c 00 00 31 ed e9 88 01 00 00 48 8b 03 31 ed 48 85 c0 +0f 84 e9 00 00 00 <4c> 8b 60 28 4d 85 e4 0f 84 dc 00 00 00 0f b7 78 0a e8 62 fe ff [ 10.860832] RIP: acpi_ps_complete_this_op+0xa7/0x22a RSP: ffffc900003a7578 [ 10.867907] ---[ end trace 3a0d2ee1129bc71e ]--- References: https://gitlab.freedesktop.org/drm/intel/-/issues/8033 Cc: Chris Wilson Signed-off-by: Imre Deak Tested-by: Tomi Sarvela Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180702135756.12159-1-imre.deak@intel.com Signed-off-by: Rodrigo Vivi --- drivers/usb/core/usb-acpi.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c index 6d93428432f1..b2f3b4099424 100644 --- a/drivers/usb/core/usb-acpi.c +++ b/drivers/usb/core/usb-acpi.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "hub.h" @@ -81,6 +82,20 @@ int usb_acpi_set_power_state(struct usb_device *hdev, int index, bool enable) } EXPORT_SYMBOL_GPL(usb_acpi_set_power_state); +static const struct dmi_system_id intel_icl_broken_acpi[] = { + { + .ident = "ICL RVP", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "Ice Lake Client Platform"), + }, + }, + + { } +}; + +static bool acpi_connection_type_broken; + static enum usb_port_connect_type usb_acpi_get_connect_type(acpi_handle handle, struct acpi_pld_info *pld) { @@ -89,6 +104,10 @@ static enum usb_port_connect_type usb_acpi_get_connect_type(acpi_handle handle, union acpi_object *upc = NULL; acpi_status status; + /* Work around unknown ACPI instruction error on ICL RVP BIOSes. */ + if (acpi_connection_type_broken) + return USB_PORT_CONNECT_TYPE_UNKNOWN; + /* * According to 9.14 in ACPI Spec 6.2. _PLD indicates whether usb port * is user visible and _UPC indicates whether it is connectable. If @@ -260,6 +279,11 @@ static struct acpi_bus_type usb_acpi_bus = { int usb_acpi_register(void) { + if (dmi_check_system(intel_icl_broken_acpi)) { + pr_info("USB ACPI connection type broken.\n"); + acpi_connection_type_broken = true; + } + return register_acpi_bus_type(&usb_acpi_bus); } From a2c52596c8a61dbbaf4c16322204f07a4c4ac2d0 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Thu, 2 May 2019 22:46:48 +0200 Subject: [PATCH 08/30] RFC: hung_task: taint kernel There's the hung_task_panic sysctl, but that's a bit an extreme measure. As a fallback taint at least the machine. Our CI uses this to decide when a reboot is necessary, plus to figure out whether the kernel is still happy. v2: Works much better when I put the else { add_taint() } at the right place. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8034 Signed-off-by: Daniel Vetter Cc: Andrew Morton Cc: Tetsuo Handa Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Valdis Kletnieks Cc: Daniel Vetter Cc: Vitaly Kuznetsov Cc: "Liu, Chuansheng" Acked-by: Chris Wilson (for core-for-CI) Link: https://patchwork.freedesktop.org/patch/msgid/20190502204648.5537-1-daniel.vetter@ffwll.ch Signed-off-by: Jani Nikula Signed-off-by: Rodrigo Vivi --- kernel/hung_task.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/hung_task.c b/kernel/hung_task.c index c71889f3f3fc..d393221b6cf8 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c @@ -120,6 +120,8 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout) console_verbose(); hung_task_show_lock = true; hung_task_call_panic = true; + } else { + add_taint(TAINT_WARN, LOCKDEP_STILL_OK); } /* From 871a54884e45f2764b0fe6f040b96bd98a15f2ad Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Thu, 2 May 2019 21:42:08 +0200 Subject: [PATCH 09/30] RFC: soft/hardlookup: taint kernel There's the soft/hardlookup_panic sysctls, but that's a bit an extreme measure. As a fallback taint at least the machine. Our CI uses this to decide when a reboot is necessary, plus to figure out whether the kernel is still happy. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8035 Signed-off-by: Daniel Vetter Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Valdis Kletnieks Cc: Laurence Oberman Cc: Vincent Whitchurch Cc: Don Zickus Cc: Andrew Morton Cc: Sergey Senozhatsky Cc: Sinan Kaya Cc: Daniel Vetter Acked-by: Chris Wilson (for core-for-CI) Link: https://patchwork.freedesktop.org/patch/msgid/20190502194208.3535-2-daniel.vetter@ffwll.ch Signed-off-by: Jani Nikula Signed-off-by: Rodrigo Vivi --- kernel/watchdog.c | 2 ++ kernel/watchdog_hld.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 8e61f21e7e33..dc52f290c3bb 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -442,6 +442,8 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK); if (softlockup_panic) panic("softlockup: hung tasks"); + else + add_taint(TAINT_WARN, LOCKDEP_STILL_OK); } return HRTIMER_RESTART; diff --git a/kernel/watchdog_hld.c b/kernel/watchdog_hld.c index 247bf0b1582c..cce46cf75d76 100644 --- a/kernel/watchdog_hld.c +++ b/kernel/watchdog_hld.c @@ -154,6 +154,8 @@ static void watchdog_overflow_callback(struct perf_event *event, if (hardlockup_panic) nmi_panic(regs, "Hard LOCKUP"); + else + add_taint(TAINT_WARN, LOCKDEP_STILL_OK); __this_cpu_write(hard_watchdog_warn, true); return; From 30e2cd423c06685994184f31c35273b68192910c Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 16 Nov 2021 09:27:50 +0100 Subject: [PATCH 10/30] sched: Mark "RT throttling activated" as KERN_NOTICE References: https://gitlab.freedesktop.org/drm/intel/-/issues/8036 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2781 [danvet: Rebase] Signed-off-by: Rodrigo Vivi --- kernel/sched/deadline.c | 2 +- kernel/sched/rt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index 0d97d54276cc..58b77024eb37 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -870,7 +870,7 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se) * entity. */ if (dl_time_before(dl_se->deadline, rq_clock(rq))) { - printk_deferred_once("sched: DL replenish lagged too much\n"); + printk_deferred_once(KERN_NOTICE "sched: DL replenish lagged too much\n"); replenish_dl_new_period(dl_se, rq); } diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index ed2a47e4ddae..3d6d63898158 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -1019,7 +1019,7 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq) */ if (likely(rt_b->rt_runtime)) { rt_rq->rt_throttled = 1; - printk_deferred_once("sched: RT throttling activated\n"); + printk_deferred_once(KERN_NOTICE "sched: RT throttling activated\n"); } else { /* * In case we did anyway, make it go away, From bc085bdfce85ab416240bb6cd565b0d282293dbc Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 18 Jul 2017 10:21:10 +0200 Subject: [PATCH 11/30] net/sch_generic: Shut up noise We can't allow spam in CI. Update 26th June 2018: This is still an issue: Update 23rd May 2019: You guessed it, still ocurring. [ 224.739686] ------------[ cut here ]------------ [ 224.739712] WARNING: CPU: 3 PID: 2982 at net/sched/sch_generic.c:461 dev_watchdog+0x1fd/0x210 [ 224.739714] Modules linked in: vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_pcm i915 asix usbnet mii mei_me mei prime_numbers i2c_hid pinctrl_sunrisepoint pinctrl_intel btusb btrtl btbcm btintel bluetooth ecdh_generic [ 224.739775] CPU: 3 PID: 2982 Comm: gem_exec_suspen Tainted: G U W 4.18.0-rc2-CI-Patchwork_9414+ #1 [ 224.739777] Hardware name: Dell Inc. XPS 13 9350/, BIOS 1.4.12 11/30/2016 [ 224.739780] RIP: 0010:dev_watchdog+0x1fd/0x210 [ 224.739781] Code: 49 63 4c 24 f0 eb 92 4c 89 ef c6 05 21 46 ad 00 01 e8 77 ee fc ff 89 d9 48 89 c2 4c 89 ee 48 c7 c7 88 4c 14 82 e8 a3 fe 84 ff <0f> 0b eb be 0f 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 c7 47 [ 224.739866] RSP: 0018:ffff88027dd83e40 EFLAGS: 00010286 [ 224.739869] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000102 [ 224.739871] RDX: 0000000080000102 RSI: ffffffff820c8c6c RDI: 00000000ffffffff [ 224.739873] RBP: ffff8802644c1540 R08: 0000000071be9b33 R09: 0000000000000000 [ 224.739874] R10: ffff88027dd83dc0 R11: 0000000000000000 R12: ffff8802644c1588 [ 224.739876] R13: ffff8802644c1160 R14: 0000000000000001 R15: ffff88026a5dc728 [ 224.739878] FS: 00007f18f4887980(0000) GS:ffff88027dd80000(0000) knlGS:0000000000000000 [ 224.739880] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 224.739881] CR2: 00007f4c627ae548 CR3: 000000022ca1a002 CR4: 00000000003606e0 [ 224.739883] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 224.739885] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 224.739886] Call Trace: [ 224.739888] [ 224.739892] ? qdisc_reset+0xe0/0xe0 [ 224.739894] ? qdisc_reset+0xe0/0xe0 [ 224.739897] call_timer_fn+0x93/0x360 [ 224.739903] expire_timers+0xc1/0x1d0 [ 224.739908] run_timer_softirq+0xc7/0x170 [ 224.739916] __do_softirq+0xd9/0x505 [ 224.739923] irq_exit+0xa9/0xc0 [ 224.739926] smp_apic_timer_interrupt+0x9c/0x2d0 [ 224.739929] apic_timer_interrupt+0xf/0x20 [ 224.739931] [ 224.739934] RIP: 0010:delay_tsc+0x2e/0xb0 [ 224.739936] Code: 49 89 fc 55 53 bf 01 00 00 00 e8 6d 2c 78 ff e8 88 9d b6 ff 41 89 c5 0f ae e8 0f 31 48 c1 e2 20 48 09 c2 48 89 d5 eb 16 f3 90 01 00 00 00 e8 48 2c 78 ff e8 63 9d b6 ff 44 39 e8 75 36 0f ae [ 224.740021] RSP: 0018:ffffc900002f7d48 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 [ 224.740024] RAX: 0000000080000000 RBX: 0000000649565ca9 RCX: 0000000000000001 [ 224.740026] RDX: 0000000080000001 RSI: ffffffff820c8c6c RDI: 00000000ffffffff [ 224.740027] RBP: 00000006493ea9ce R08: 000000005e81e2ee R09: 0000000000000000 [ 224.740029] R10: 0000000000000120 R11: 0000000000000000 R12: 00000000002ad8d6 [ 224.740030] R13: 0000000000000003 R14: 0000000000000004 R15: ffff88025caf5408 [ 224.740040] ? delay_tsc+0x66/0xb0 [ 224.740045] hibernation_debug_sleep+0x1c/0x30 [ 224.740048] hibernation_snapshot+0x2c1/0x690 [ 224.740053] hibernate+0x142/0x2a4 [ 224.740057] state_store+0xd0/0xe0 [ 224.740063] kernfs_fop_write+0x104/0x190 [ 224.740068] __vfs_write+0x31/0x180 [ 224.740072] ? rcu_read_lock_sched_held+0x6f/0x80 [ 224.740075] ? rcu_sync_lockdep_assert+0x29/0x50 [ 224.740078] ? __sb_start_write+0x152/0x1f0 [ 224.740080] ? __sb_start_write+0x168/0x1f0 [ 224.740084] vfs_write+0xbd/0x1a0 [ 224.740088] ksys_write+0x50/0xc0 [ 224.740094] do_syscall_64+0x55/0x190 [ 224.740097] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 224.740099] RIP: 0033:0x7f18f400a281 [ 224.740100] Code: c3 0f 1f 84 00 00 00 00 00 48 8b 05 59 8d 20 00 c3 0f 1f 84 00 00 00 00 00 8b 05 8a d1 20 00 85 c0 75 16 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 57 f3 c3 0f 1f 44 00 00 41 54 55 49 89 d4 53 [ 224.740186] RSP: 002b:00007fffd1f4fec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 224.740189] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f18f400a281 [ 224.740190] RDX: 0000000000000004 RSI: 00007f18f448069a RDI: 0000000000000006 [ 224.740192] RBP: 00007fffd1f4fef0 R08: 0000000000000000 R09: 0000000000000000 [ 224.740194] R10: 0000000000000000 R11: 0000000000000246 R12: 000055e795d03400 [ 224.740195] R13: 00007fffd1f50500 R14: 0000000000000000 R15: 0000000000000000 [ 224.740205] irq event stamp: 1582591 [ 224.740207] hardirqs last enabled at (1582590): [] vprintk_emit+0x4bc/0x4d0 [ 224.740210] hardirqs last disabled at (1582591): [] error_entry+0x7c/0x100 [ 224.740212] softirqs last enabled at (1582568): [] __do_softirq+0x34f/0x505 [ 224.740215] softirqs last disabled at (1582571): [] irq_exit+0xa9/0xc0 [ 224.740218] WARNING: CPU: 3 PID: 2982 at net/sched/sch_generic.c:461 dev_watchdog+0x1fd/0x210 [ 224.740219] ---[ end trace 6e41d690e611c338 ]--- References: https://gitlab.freedesktop.org/drm/intel/-/issues/8037 References: https://bugzilla.kernel.org/show_bug.cgi?id=196399 Acked-by: Martin Peres Cc: Martin Peres Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170718082110.12524-1-daniel.vetter@ffwll.ch Signed-off-by: Rodrigo Vivi --- net/sched/sch_generic.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index a9aadc4e6858..916556278b80 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -520,7 +520,12 @@ static void dev_watchdog(struct timer_list *t) } } - if (unlikely(some_queue_timedout)) { + /* The noise is pissing off our CI and upstream doesn't + * move on the bug report: + * + * https://bugzilla.kernel.org/show_bug.cgi?id=196399 + */ + if (unlikely(some_queue_timedout) && 0) { trace_net_dev_xmit_timeout(dev, i); WARN_ONCE(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit queue %u timed out\n", dev->name, netdev_drivername(dev), i); From 1d3a724287ef44497f773943530f987f4f7fa773 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 1 Jul 2019 15:29:03 +0100 Subject: [PATCH 12/30] mm: Show slab debug as offsets from section base not hashed pointers Since the kernel now used hashed pointers for raw addresses, it is very hard to guage the relative placement within a section, and since the hash value will never match up with any contents, using it provides no information relevant for slab debugging. Show the relative offset into each section, so that some reference for the hexdump is provided. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8038 Signed-off-by: Chris Wilson Signed-off-by: Rodrigo Vivi --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slub.c b/mm/slub.c index 13459c69095a..bf8cc8c5326a 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -706,7 +706,7 @@ static void print_section(char *level, char *text, u8 *addr, unsigned int length) { metadata_access_enable(); - print_hex_dump(level, text, DUMP_PREFIX_ADDRESS, + print_hex_dump(level, text, DUMP_PREFIX_OFFSET, 16, 1, kasan_reset_tag((void *)addr), length, 1); metadata_access_disable(); } From 7f8675a80317c127e9b8283e75d0e5db5079c173 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 27 Jul 2019 13:17:50 +0100 Subject: [PATCH 13/30] uapi/perf: Squelch compiler warning Remove copious amounts of ./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) as they are drowning out our warnings. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8039 Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190727121750.20882-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi --- include/uapi/linux/perf_event.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index ccb7f5dad59b..8dd2157001ef 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h @@ -167,6 +167,9 @@ enum perf_event_sample_format { }; #define PERF_SAMPLE_WEIGHT_TYPE (PERF_SAMPLE_WEIGHT | PERF_SAMPLE_WEIGHT_STRUCT) + +#define __PERF_SAMPLE_CALLCHAIN_EARLY (1ULL << 63) /* non-ABI; internal use */ + /* * values to program into branch_sample_type when PERF_SAMPLE_BRANCH is set * From 1e205b76ec083183a8a59bf9f735cefa39326143 Mon Sep 17 00:00:00 2001 From: Joonas Lahtinen Date: Wed, 6 Nov 2019 12:01:55 +0200 Subject: [PATCH 14/30] Revert "drm/i915: Don't select BROKEN" This reverts commit cea35f5ad5ffac06ea29e0d7a7f748683e1f1b7d. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8040 References: https://lists.freedesktop.org/archives/intel-gfx/2019-November/218878.html Suggested-by: Daniel Vetter Signed-off-by: Joonas Lahtinen Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug index 47e845353ffa..93dfb7ed9705 100644 --- a/drivers/gpu/drm/i915/Kconfig.debug +++ b/drivers/gpu/drm/i915/Kconfig.debug @@ -40,6 +40,7 @@ config DRM_I915_DEBUG select DRM_I915_DEBUG_RUNTIME_PM select DRM_I915_SW_FENCE_DEBUG_OBJECTS select DRM_I915_SELFTEST + select BROKEN # for prototype uAPI default n help Choose this option to turn on extra driver debugging that may affect From fab7d45cb3baa6c2781e5de57b0a97034364cf27 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 23 Apr 2020 09:27:53 +0100 Subject: [PATCH 15/30] pci/msi: Stop warning for MSI enabling failure If the MSI is already enabled, trying to enable it again results in an -EINVAL and on the first attempt a WARN. That WARN causes our CI to abort the run [on each first attempt to suspend]: <4> [463.142025] WARNING: CPU: 0 PID: 2225 at drivers/pci/msi.c:1074 __pci_enable_msi_range+0x3cb/0x420 <4> [463.142026] Modules linked in: snd_hda_intel i915 snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul snd_intel_dspcfg ghash_clmulni_intel snd_hda_codec btusb btrtl btbcm btintel e1000e bluetooth snd_hwdep snd_hda_core ptp ecdh_generic snd_pcm ecc pps_core mei_me mei prime_numbers [last unloaded: i915] <4> [463.142045] CPU: 0 PID: 2225 Comm: kworker/u8:14 Tainted: G U 5.7.0-rc2-CI-CI_DRM_8350+ #1 <4> [463.142046] Hardware name: Intel Corporation NUC7i5BNH/NUC7i5BNB, BIOS BNKBL357.86A.0060.2017.1214.2013 12/14/2017 <4> [463.142049] Workqueue: events_unbound async_run_entry_fn <4> [463.142051] RIP: 0010:__pci_enable_msi_range+0x3cb/0x420 <4> [463.142053] Code: 76 58 49 8d 56 48 48 89 df e8 31 73 fd ff e9 20 fe ff ff 31 f6 48 89 df e8 c2 e9 fd ff e9 d6 fe ff ff 45 89 fc e9 1a ff ff ff <0f> 0b 41 bc ea ff ff ff e9 0d ff ff ff 41 bc ea ff ff ff e9 02 ff <4> [463.142054] RSP: 0018:ffffc90000593cd0 EFLAGS: 00010202 <4> [463.142056] RAX: 0000000000000010 RBX: ffff888274051000 RCX: 0000000000000000 <4> [463.142057] RDX: 0000000000000001 RSI: 0000000000000001 RDI: ffff888274051000 <4> [463.142058] RBP: ffff888238aa1018 R08: 0000000000000001 R09: 0000000000000001 <4> [463.142060] R10: ffffc90000593d90 R11: 00000000c79cdfd5 R12: ffff8882740510b0 <4> [463.142061] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001 <4> [463.142062] FS: 0000000000000000(0000) GS:ffff888276c00000(0000) knlGS:0000000000000000 <4> [463.142064] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [463.142065] CR2: 000055706f347d80 CR3: 0000000005610003 CR4: 00000000003606f0 <4> [463.142066] Call Trace: <4> [463.142073] pci_enable_msi+0x11/0x20 <4> [463.142077] azx_resume+0x1ab/0x200 [snd_hda_intel] <4> [463.142080] ? pci_pm_thaw+0x80/0x80 <4> [463.142084] dpm_run_callback+0x64/0x280 <4> [463.142089] device_resume+0xd4/0x1c0 <4> [463.142093] ? dpm_watchdog_set+0x60/0 While this would appear to be a bug in snd-hda, it does appear inconsequential, at least for gfx-ci. Downgrade the warning to an info, like the other already-enabled error for MSI-X. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8041 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1687 Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200423082753.3899018-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi --- drivers/pci/msi/msi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c index 1f716624ca56..4c41e9a54ee5 100644 --- a/drivers/pci/msi/msi.c +++ b/drivers/pci/msi/msi.c @@ -420,8 +420,10 @@ int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec, if (maxvec < minvec) return -ERANGE; - if (WARN_ON_ONCE(dev->msi_enabled)) + if (dev->msi_enabled) { + pci_info(dev, "can't enable MSI, already enabled\n"); return -EINVAL; + } nvec = pci_msi_vec_count(dev); if (nvec < 0) From 174c0a6d18c6b9a88907fd0ca95287237c4b5f7c Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Sat, 2 May 2020 18:14:13 +0100 Subject: [PATCH 16/30] perf/core: Only copy-to-user after completely unlocking all locks, v3. We inadvertently create a dependency on mmap_sem with a whole chain. This breaks any user who wants to take a lock and call rcu_barrier(), while also taking that lock inside mmap_sem: <4> [604.892532] ====================================================== <4> [604.892534] WARNING: possible circular locking dependency detected <4> [604.892536] 5.6.0-rc7-CI-Patchwork_17096+ #1 Tainted: G U <4> [604.892537] ------------------------------------------------------ <4> [604.892538] kms_frontbuffer/2595 is trying to acquire lock: <4> [604.892540] ffffffff8264a558 (rcu_state.barrier_mutex){+.+.}, at: rcu_barrier+0x23/0x190 <4> [604.892547] but task is already holding lock: <4> [604.892547] ffff888484716050 (reservation_ww_class_mutex){+.+.}, at: i915_gem_object_pin_to_display_plane+0x89/0x270 [i915] <4> [604.892592] which lock already depends on the new lock. <4> [604.892593] the existing dependency chain (in reverse order) is: <4> [604.892594] -> #6 (reservation_ww_class_mutex){+.+.}: <4> [604.892597] __ww_mutex_lock.constprop.15+0xc3/0x1090 <4> [604.892598] ww_mutex_lock+0x39/0x70 <4> [604.892600] dma_resv_lockdep+0x10e/0x1f5 <4> [604.892602] do_one_initcall+0x58/0x300 <4> [604.892604] kernel_init_freeable+0x17b/0x1dc <4> [604.892605] kernel_init+0x5/0x100 <4> [604.892606] ret_from_fork+0x24/0x50 <4> [604.892607] -> #5 (reservation_ww_class_acquire){+.+.}: <4> [604.892609] dma_resv_lockdep+0xec/0x1f5 <4> [604.892610] do_one_initcall+0x58/0x300 <4> [604.892610] kernel_init_freeable+0x17b/0x1dc <4> [604.892611] kernel_init+0x5/0x100 <4> [604.892612] ret_from_fork+0x24/0x50 <4> [604.892613] -> #4 (&mm->mmap_sem#2){++++}: <4> [604.892615] __might_fault+0x63/0x90 <4> [604.892617] _copy_to_user+0x1e/0x80 <4> [604.892619] perf_read+0x200/0x2b0 <4> [604.892621] vfs_read+0x96/0x160 <4> [604.892622] ksys_read+0x9f/0xe0 <4> [604.892623] do_syscall_64+0x4f/0x220 <4> [604.892624] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4> [604.892625] -> #3 (&cpuctx_mutex){+.+.}: <4> [604.892626] __mutex_lock+0x9a/0x9c0 <4> [604.892627] perf_event_init_cpu+0xa4/0x140 <4> [604.892629] perf_event_init+0x19d/0x1cd <4> [604.892630] start_kernel+0x362/0x4e4 <4> [604.892631] secondary_startup_64+0xa4/0xb0 <4> [604.892631] -> #2 (pmus_lock){+.+.}: <4> [604.892633] __mutex_lock+0x9a/0x9c0 <4> [604.892633] perf_event_init_cpu+0x6b/0x140 <4> [604.892635] cpuhp_invoke_callback+0x9b/0x9d0 <4> [604.892636] _cpu_up+0xa2/0x140 <4> [604.892637] do_cpu_up+0x61/0xa0 <4> [604.892639] smp_init+0x57/0x96 <4> [604.892639] kernel_init_freeable+0x87/0x1dc <4> [604.892640] kernel_init+0x5/0x100 <4> [604.892642] ret_from_fork+0x24/0x50 <4> [604.892642] -> #1 (cpu_hotplug_lock.rw_sem){++++}: <4> [604.892643] cpus_read_lock+0x34/0xd0 <4> [604.892644] rcu_barrier+0xaa/0x190 <4> [604.892645] kernel_init+0x21/0x100 <4> [604.892647] ret_from_fork+0x24/0x50 <4> [604.892647] -> #0 (rcu_state.barrier_mutex){+.+.}: <4> [604.892649] __lock_acquire+0x1328/0x15d0 <4> [604.892650] lock_acquire+0xa7/0x1c0 <4> [604.892651] __mutex_lock+0x9a/0x9c0 <4> [604.892652] rcu_barrier+0x23/0x190 <4> [604.892680] i915_gem_object_unbind+0x29d/0x3f0 [i915] <4> [604.892707] i915_gem_object_pin_to_display_plane+0x141/0x270 [i915] <4> [604.892737] intel_pin_and_fence_fb_obj+0xec/0x1f0 [i915] <4> [604.892767] intel_plane_pin_fb+0x3f/0xd0 [i915] <4> [604.892797] intel_prepare_plane_fb+0x13b/0x5c0 [i915] <4> [604.892798] drm_atomic_helper_prepare_planes+0x85/0x110 <4> [604.892827] intel_atomic_commit+0xda/0x390 [i915] <4> [604.892828] drm_atomic_helper_set_config+0x57/0xa0 <4> [604.892830] drm_mode_setcrtc+0x1c4/0x720 <4> [604.892830] drm_ioctl_kernel+0xb0/0xf0 <4> [604.892831] drm_ioctl+0x2e1/0x390 <4> [604.892833] ksys_ioctl+0x7b/0x90 <4> [604.892835] __x64_sys_ioctl+0x11/0x20 <4> [604.892835] do_syscall_64+0x4f/0x220 <4> [604.892836] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4> [604.892837] Changes since v1: - Use (*values)[n++] in perf_read_one(). Changes since v2: - Centrally allocate values. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8042 Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200502171413.9133-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi --- kernel/events/core.c | 49 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index eacc3702654d..c3762a371dc6 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -5500,20 +5500,16 @@ static int __perf_read_group_add(struct perf_event *leader, } static int perf_read_group(struct perf_event *event, - u64 read_format, char __user *buf) + u64 read_format, char __user *buf, + u64 *values) { struct perf_event *leader = event->group_leader, *child; struct perf_event_context *ctx = leader->ctx; int ret; - u64 *values; lockdep_assert_held(&ctx->mutex); - values = kzalloc(event->read_size, GFP_KERNEL); - if (!values) - return -ENOMEM; - - values[0] = 1 + leader->nr_siblings; + *values = 1 + leader->nr_siblings; /* * By locking the child_mutex of the leader we effectively @@ -5531,25 +5527,17 @@ static int perf_read_group(struct perf_event *event, goto unlock; } - mutex_unlock(&leader->child_mutex); - ret = event->read_size; - if (copy_to_user(buf, values, event->read_size)) - ret = -EFAULT; - goto out; - unlock: mutex_unlock(&leader->child_mutex); -out: - kfree(values); return ret; } static int perf_read_one(struct perf_event *event, - u64 read_format, char __user *buf) + u64 read_format, char __user *buf, + u64 *values) { u64 enabled, running; - u64 values[5]; int n = 0; values[n++] = __perf_event_read_value(event, &enabled, &running); @@ -5562,9 +5550,6 @@ static int perf_read_one(struct perf_event *event, if (read_format & PERF_FORMAT_LOST) values[n++] = atomic64_read(&event->lost_samples); - if (copy_to_user(buf, values, n * sizeof(u64))) - return -EFAULT; - return n * sizeof(u64); } @@ -5585,7 +5570,8 @@ static bool is_event_hup(struct perf_event *event) * Read the performance event - simple non blocking version for now */ static ssize_t -__perf_read(struct perf_event *event, char __user *buf, size_t count) +__perf_read(struct perf_event *event, char __user *buf, + size_t count, u64 *values) { u64 read_format = event->attr.read_format; int ret; @@ -5603,9 +5589,9 @@ __perf_read(struct perf_event *event, char __user *buf, size_t count) WARN_ON_ONCE(event->ctx->parent_ctx); if (read_format & PERF_FORMAT_GROUP) - ret = perf_read_group(event, read_format, buf); + ret = perf_read_group(event, read_format, buf, values); else - ret = perf_read_one(event, read_format, buf); + ret = perf_read_one(event, read_format, buf, values); return ret; } @@ -5615,16 +5601,31 @@ perf_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct perf_event *event = file->private_data; struct perf_event_context *ctx; + u64 stack_values[8]; + u64 *values; int ret; ret = security_perf_event_read(event); if (ret) return ret; + if (event->read_size <= sizeof(stack_values)) + values = memset(stack_values, 0, event->read_size); + else + values = kzalloc(event->read_size, GFP_KERNEL); + if (!values) + return -ENOMEM; + ctx = perf_event_ctx_lock(event); - ret = __perf_read(event, buf, count); + ret = __perf_read(event, buf, count, values); perf_event_ctx_unlock(event, ctx); + if (ret > 0 && copy_to_user(buf, values, ret)) + ret = -EFAULT; + + if (values != stack_values) + kfree(values); + return ret; } From 8b71ff14ec5ebb1d715364ee57fd6997498ca144 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 31 Oct 2020 19:20:41 +0000 Subject: [PATCH 17/30] HAX suspend: Disable S3/S4 for fi-bdw-samus References: https://gitlab.freedesktop.org/drm/intel/-/issues/8043 Signed-off-by: Rodrigo Vivi --- drivers/acpi/sleep.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 0b557c0d405e..c4230342aab2 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -80,11 +80,16 @@ static int acpi_sleep_prepare(u32 acpi_state) return 0; } +static u8 max_sleep_state = -1; + bool acpi_sleep_state_supported(u8 sleep_state) { acpi_status status; u8 type_a, type_b; + if (sleep_state > max_sleep_state) + return false; + status = acpi_get_sleep_type_data(sleep_state, &type_a, &type_b); return ACPI_SUCCESS(status) && (!acpi_gbl_reduced_hardware || (acpi_gbl_FADT.sleep_control.address @@ -161,6 +166,13 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d) return 0; } +static int __init init_nosleep(const struct dmi_system_id *d) +{ + pr_info("Disabling ACPI suspend\n"); + max_sleep_state = 0; + return 0; +} + bool acpi_sleep_default_s3; static int __init init_default_s3(const struct dmi_system_id *d) @@ -393,6 +405,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = { DMI_MATCH(DMI_PRODUCT_NAME, "ASUS EXPERTBOOK B1400CEAE"), }, }, + { + .callback = init_nosleep, + .ident = "samus", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"), + DMI_MATCH(DMI_PRODUCT_NAME, "Samus"), + }, + }, {}, }; From ae44b06313e89b2b95f651af810a7756d1b8e2cd Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 11 Nov 2020 14:51:55 +0000 Subject: [PATCH 18/30] HAX x86/rapl: Treat Tigerlake like Icelake Since Tigerlake seems to have inherited its cstates and other rapl power caps from Icelake, assume it also follows Icelake for its rapl events. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8044 Signed-off-by: Chris Wilson Signed-off-by: Rodrigo Vivi --- arch/x86/events/rapl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c index a829492bca4c..ae5779ea4417 100644 --- a/arch/x86/events/rapl.c +++ b/arch/x86/events/rapl.c @@ -800,6 +800,8 @@ static const struct x86_cpu_id rapl_model_match[] __initconst = { X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_X, &model_hsx), X86_MATCH_INTEL_FAM6_MODEL(COMETLAKE_L, &model_skl), X86_MATCH_INTEL_FAM6_MODEL(COMETLAKE, &model_skl), + X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, &model_skl), + X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, &model_skl), X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, &model_skl), X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, &model_skl), X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N, &model_skl), From ba02ddc1eea3eb466c16edb7a9e0d75cd0e69116 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 27 Nov 2020 23:51:06 +0000 Subject: [PATCH 19/30] HAX sound: Disable probing snd_hda with DG1 Audio component in i915 is not hooked up yet causing long timeouts and angry abortive CI. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8045 Signed-off-by: Rodrigo Vivi --- sound/hda/hdac_i915.c | 23 +++++++++++++++++++++++ sound/pci/hda/hda_intel.c | 2 -- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c index 161a9711cd63..2b13c49a1061 100644 --- a/sound/hda/hdac_i915.c +++ b/sound/hda/hdac_i915.c @@ -133,6 +133,26 @@ static int i915_gfx_present(struct pci_dev *hdac_pci) return false; } +static bool dg1_gfx_present(void) +{ + static const struct pci_device_id ids[] = { + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4905), + .class = PCI_BASE_CLASS_DISPLAY << 16, + .class_mask = 0xff << 16 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4906), + .class = PCI_BASE_CLASS_DISPLAY << 16, + .class_mask = 0xff << 16 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4907), + .class = PCI_BASE_CLASS_DISPLAY << 16, + .class_mask = 0xff << 16 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4908), + .class = PCI_BASE_CLASS_DISPLAY << 16, + .class_mask = 0xff << 16 }, + {} + }; + return pci_dev_present(ids); +} + /** * snd_hdac_i915_init - Initialize i915 audio component * @bus: HDA core bus @@ -153,6 +173,9 @@ int snd_hdac_i915_init(struct hdac_bus *bus) if (!i915_gfx_present(to_pci_dev(bus->dev))) return -ENODEV; + if (dg1_gfx_present()) + return -ENODEV; + err = snd_hdac_acomp_init(bus, NULL, i915_component_master_match, sizeof(struct i915_audio_component) - sizeof(*acomp)); diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 87002670c0c9..e68fbda11809 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2249,8 +2249,6 @@ static int azx_probe_continue(struct azx *chip) * codecs can be on the same link. */ if (CONTROLLER_IN_GPU(pci)) { - dev_err(chip->card->dev, - "HSW/BDW HD-audio HDMI/DP requires binding with gfx driver\n"); goto out_free; } else { /* don't bother any longer */ From 36be0c414eafc5def5525c1eca293bbe354c32a4 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 17 Dec 2020 16:47:00 +0000 Subject: [PATCH 20/30] HAX net/phy: Suppress WARN for calling stop while halted References: https://gitlab.freedesktop.org/drm/intel/-/issues/8046 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2805 Signed-off-by: Rodrigo Vivi --- drivers/net/phy/phy.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index e5b6cb1a77f9..8c4e5f9da885 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -1095,11 +1095,8 @@ void phy_stop(struct phy_device *phydev) { struct net_device *dev = phydev->attached_dev; - if (!phy_is_started(phydev) && phydev->state != PHY_DOWN) { - WARN(1, "called from state %s\n", - phy_state_to_str(phydev->state)); + if (!phy_is_started(phydev) && phydev->state != PHY_DOWN) return; - } mutex_lock(&phydev->lock); From 6b6f47dcc9124d8548a40e3efd11d6dadfa967f3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 21 Jan 2021 20:40:54 +0000 Subject: [PATCH 21/30] HAX net/phy: Suppress WARN from phy_error References: https://gitlab.freedesktop.org/drm/intel/-/issues/8047 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2874 Signed-off-by: Rodrigo Vivi --- drivers/net/phy/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 8c4e5f9da885..508c8fc8f812 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -973,7 +973,7 @@ void phy_stop_machine(struct phy_device *phydev) */ void phy_error(struct phy_device *phydev) { - WARN_ON(1); + pr_notice_once("%s\n", __func__); mutex_lock(&phydev->lock); phydev->state = PHY_HALTED; From c1d014b32eb8c307810818938af61545ae173866 Mon Sep 17 00:00:00 2001 From: Karolina Drobnik Date: Tue, 13 Sep 2022 08:39:18 +0200 Subject: [PATCH 22/30] Revert "iommu/dma: Fix race condition during iova_domain initialization" This reverts commit ac9a5d522bb80be50ea84965699e1c8257d745ce. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8048 Signed-off-by: Karolina Drobnik [ Lucas: iommu maintainers/developers were informed about the regression. A proper fix is required. For now, just reverting to see if CI recovers and then also proves this commit is indeed the culprit here, now that our other iommu-related commits were removed from topic/core-for-CI ] Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220913063918.422492-1-karolina.drobnik@intel.com --- drivers/iommu/dma-iommu.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index f798c44e0903..fae9985bbb57 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -66,7 +66,6 @@ struct iommu_dma_cookie { /* Domain for flush queue callback; NULL if flush queue not in use */ struct iommu_domain *fq_domain; - struct mutex mutex; }; static DEFINE_STATIC_KEY_FALSE(iommu_deferred_attach_enabled); @@ -313,7 +312,6 @@ int iommu_get_dma_cookie(struct iommu_domain *domain) if (!domain->iova_cookie) return -ENOMEM; - mutex_init(&domain->iova_cookie->mutex); return 0; } @@ -564,33 +562,26 @@ static int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base, } /* start_pfn is always nonzero for an already-initialised domain */ - mutex_lock(&cookie->mutex); if (iovad->start_pfn) { if (1UL << order != iovad->granule || base_pfn != iovad->start_pfn) { pr_warn("Incompatible range for DMA domain\n"); - ret = -EFAULT; - goto done_unlock; + return -EFAULT; } - ret = 0; - goto done_unlock; + return 0; } init_iova_domain(iovad, 1UL << order, base_pfn); ret = iova_domain_init_rcaches(iovad); if (ret) - goto done_unlock; + return ret; /* If the FQ fails we can simply fall back to strict mode */ if (domain->type == IOMMU_DOMAIN_DMA_FQ && iommu_dma_init_fq(domain)) domain->type = IOMMU_DOMAIN_DMA; - ret = iova_reserve_iommu_regions(dev, domain); - -done_unlock: - mutex_unlock(&cookie->mutex); - return ret; + return iova_reserve_iommu_regions(dev, domain); } /** From e3897a5146e539c08611cba96ff0ecc82d3bdd1f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 28 Sep 2022 10:58:25 +0200 Subject: [PATCH 23/30] iommu: Remove iova cpu hotplugging flushing Manual revert of commit f598a497bc7d ("iova: Add CPU hotplug handler to flush rcaches"). It is trying to instantiate a cpuhp notifier from inside a cpuhp callback. That code replaced intel_iommu implementation of flushing per-IOVA domain CPU rcaches which used a single instance of cpuhp held for the module lifetime. <4>[ 6.928112] ====================================================== <4>[ 6.928621] WARNING: possible circular locking dependency detected <4>[ 6.929225] 6.0.0-rc6-CI_DRM_12164-ga1f63e144e54+ #1 Not tainted <4>[ 6.929818] ------------------------------------------------------ <4>[ 6.930415] cpuhp/0/15 is trying to acquire lock: <4>[ 6.931011] ffff888100e02a78 (&(&priv->bus_notifier)->rwsem){++++}-{3:3}, at: blocking_notifier_call_chain+0x20/0x50 <4>[ 6.931533] but task is already holding lock: <4>[ 6.931534] ffffffff826490c0 (cpuhp_state-up){+.+.}-{0:0}, at: cpuhp_thread_fun+0x48/0x1f0 <4>[ 6.933069] which lock already depends on the new lock. <4>[ 6.933070] the existing dependency chain (in reverse order) is: <4>[ 6.933071] -> #2 (cpuhp_state-up){+.+.}-{0:0}: <4>[ 6.933076] lock_acquire+0xd3/0x310 <4>[ 6.933079] cpuhp_thread_fun+0xa6/0x1f0 <4>[ 6.933082] smpboot_thread_fn+0x1b5/0x260 <4>[ 6.933084] kthread+0xed/0x120 <4>[ 6.933086] ret_from_fork+0x1f/0x30 <4>[ 6.933089] -> #1 (cpu_hotplug_lock){++++}-{0:0}: <4>[ 6.933092] lock_acquire+0xd3/0x310 <4>[ 6.933094] __cpuhp_state_add_instance+0x43/0x1c0 <4>[ 6.933096] iova_domain_init_rcaches+0x199/0x1c0 <4>[ 6.933099] iommu_setup_dma_ops+0x104/0x3d0 <4>[ 6.933101] iommu_probe_device+0xa4/0x180 <4>[ 6.933103] iommu_bus_notifier+0x2d/0x40 <4>[ 6.933105] notifier_call_chain+0x31/0x90 <4>[ 6.933108] blocking_notifier_call_chain+0x3a/0x50 <4>[ 6.933110] device_add+0x3c1/0x900 <4>[ 6.933112] pci_device_add+0x255/0x580 <4>[ 6.933115] pci_scan_single_device+0xa6/0xd0 <4>[ 6.933117] p2sb_bar+0x7f/0x220 <4>[ 6.933120] i801_add_tco_spt.isra.18+0x2b/0xca [i2c_i801] <4>[ 6.933124] i801_add_tco+0xb1/0xfe [i2c_i801] <4>[ 6.933126] i801_probe.cold.25+0xa9/0x3a7 [i2c_i801] <4>[ 6.933129] pci_device_probe+0x95/0x110 <4>[ 6.933132] really_probe+0xd6/0x350 <4>[ 6.933134] __driver_probe_device+0x73/0x170 <4>[ 6.933137] driver_probe_device+0x1a/0x90 <4>[ 6.933140] __driver_attach+0xbc/0x190 <4>[ 6.933141] bus_for_each_dev+0x72/0xc0 <4>[ 6.933143] bus_add_driver+0x1bb/0x210 <4>[ 6.933146] driver_register+0x66/0xc0 <4>[ 6.933147] wmi_bmof_probe+0x3b/0xac [wmi_bmof] <4>[ 6.933150] do_one_initcall+0x53/0x2f0 <4>[ 6.933152] do_init_module+0x45/0x1c0 <4>[ 6.933154] load_module+0x1cd5/0x1ec0 <4>[ 6.933156] __do_sys_finit_module+0xaf/0x120 <4>[ 6.933158] do_syscall_64+0x37/0x90 <4>[ 6.933160] entry_SYSCALL_64_after_hwframe+0x63/0xcd <4>[ 6.953757] -> #0 (&(&priv->bus_notifier)->rwsem){++++}-{3:3}: <4>[ 6.953779] validate_chain+0xb3f/0x2000 <4>[ 6.953785] __lock_acquire+0x5a4/0xb70 <4>[ 6.953786] lock_acquire+0xd3/0x310 <4>[ 6.953787] down_read+0x39/0x140 <4>[ 6.953790] blocking_notifier_call_chain+0x20/0x50 <4>[ 6.953794] device_add+0x3c1/0x900 <4>[ 6.953797] platform_device_add+0x108/0x240 <4>[ 6.953799] coretemp_cpu_online+0xe1/0x15e [coretemp] <4>[ 6.953805] cpuhp_invoke_callback+0x181/0x8a0 <4>[ 6.958244] cpuhp_thread_fun+0x188/0x1f0 <4>[ 6.958267] smpboot_thread_fn+0x1b5/0x260 <4>[ 6.958270] kthread+0xed/0x120 <4>[ 6.958272] ret_from_fork+0x1f/0x30 <4>[ 6.958274] other info that might help us debug this: <4>[ 6.958275] Chain exists of: &(&priv->bus_notifier)->rwsem --> cpu_hotplug_lock --> cpuhp_state-up <4>[ 6.961037] Possible unsafe locking scenario: <4>[ 6.961038] CPU0 CPU1 <4>[ 6.961038] ---- ---- <4>[ 6.961039] lock(cpuhp_state-up); <4>[ 6.961040] lock(cpu_hotplug_lock); <4>[ 6.961041] lock(cpuhp_state-up); <4>[ 6.961042] lock(&(&priv->bus_notifier)->rwsem); <4>[ 6.961044] *** DEADLOCK *** <4>[ 6.961044] 2 locks held by cpuhp/0/15: <4>[ 6.961046] #0: ffffffff82648f10 (cpu_hotplug_lock){++++}-{0:0}, at: cpuhp_thread_fun+0x48/0x1f0 <4>[ 6.961053] #1: ffffffff826490c0 (cpuhp_state-up){+.+.}-{0:0}, at: cpuhp_thread_fun+0x48/0x1f0 <4>[ 6.961058] stack backtrace: <4>[ 6.961059] CPU: 0 PID: 15 Comm: cpuhp/0 Not tainted 6.0.0-rc6-CI_DRM_12164-ga1f63e144e54+ #1 <4>[ 6.961062] Hardware name: Intel Corporation NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0047.2018.0718.1706 07/18/2018 <4>[ 6.961063] Call Trace: <4>[ 6.961064] <4>[ 6.961065] dump_stack_lvl+0x56/0x7f <4>[ 6.961069] check_noncircular+0x132/0x150 <4>[ 6.961078] validate_chain+0xb3f/0x2000 <4>[ 6.961083] __lock_acquire+0x5a4/0xb70 <4>[ 6.961087] lock_acquire+0xd3/0x310 <4>[ 6.961088] ? blocking_notifier_call_chain+0x20/0x50 <4>[ 6.961093] down_read+0x39/0x140 <4>[ 6.961097] ? blocking_notifier_call_chain+0x20/0x50 <4>[ 6.961099] blocking_notifier_call_chain+0x20/0x50 <4>[ 6.961102] device_add+0x3c1/0x900 <4>[ 6.961106] ? dev_set_name+0x4e/0x70 <4>[ 6.961109] platform_device_add+0x108/0x240 <4>[ 6.961112] coretemp_cpu_online+0xe1/0x15e [coretemp] <4>[ 6.961117] ? create_core_data+0x550/0x550 [coretemp] <4>[ 6.961120] cpuhp_invoke_callback+0x181/0x8a0 <4>[ 6.961124] cpuhp_thread_fun+0x188/0x1f0 <4>[ 6.961129] ? smpboot_thread_fn+0x1e/0x260 <4>[ 6.961131] smpboot_thread_fn+0x1b5/0x260 <4>[ 6.961134] ? sort_range+0x20/0x20 <4>[ 6.961135] kthread+0xed/0x120 <4>[ 6.961137] ? kthread_complete_and_exit+0x20/0x20 <4>[ 6.961139] ret_from_fork+0x1f/0x30 <4>[ 6.961145] References: https://gitlab.freedesktop.org/drm/intel/-/issues/8049 Closes: https://gitlab.freedesktop.org/drm/intel/issues/6641 Signed-off-by: Chris Wilson Signed-off-by: Janusz Krzysztofik Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220928085826.243721-2-janusz.krzysztofik@linux.intel.com --- drivers/iommu/iova.c | 28 ---------------------------- include/linux/cpuhotplug.h | 1 - include/linux/iova.h | 1 - 3 files changed, 30 deletions(-) diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c index a44ad92fc5eb..7d246bce7d84 100644 --- a/drivers/iommu/iova.c +++ b/drivers/iommu/iova.c @@ -31,16 +31,6 @@ unsigned long iova_rcache_range(void) return PAGE_SIZE << (IOVA_RANGE_CACHE_MAX_SIZE - 1); } -static int iova_cpuhp_dead(unsigned int cpu, struct hlist_node *node) -{ - struct iova_domain *iovad; - - iovad = hlist_entry_safe(node, struct iova_domain, cpuhp_dead); - - free_cpu_cached_iovas(cpu, iovad); - return 0; -} - static void free_global_cached_iovas(struct iova_domain *iovad); static struct iova *to_iova(struct rb_node *node) @@ -255,21 +245,10 @@ int iova_cache_get(void) { mutex_lock(&iova_cache_mutex); if (!iova_cache_users) { - int ret; - - ret = cpuhp_setup_state_multi(CPUHP_IOMMU_IOVA_DEAD, "iommu/iova:dead", NULL, - iova_cpuhp_dead); - if (ret) { - mutex_unlock(&iova_cache_mutex); - pr_err("Couldn't register cpuhp handler\n"); - return ret; - } - iova_cache = kmem_cache_create( "iommu_iova", sizeof(struct iova), 0, SLAB_HWCACHE_ALIGN, NULL); if (!iova_cache) { - cpuhp_remove_multi_state(CPUHP_IOMMU_IOVA_DEAD); mutex_unlock(&iova_cache_mutex); pr_err("Couldn't create iova cache\n"); return -ENOMEM; @@ -292,7 +271,6 @@ void iova_cache_put(void) } iova_cache_users--; if (!iova_cache_users) { - cpuhp_remove_multi_state(CPUHP_IOMMU_IOVA_DEAD); kmem_cache_destroy(iova_cache); } mutex_unlock(&iova_cache_mutex); @@ -495,8 +473,6 @@ EXPORT_SYMBOL_GPL(free_iova_fast); static void iova_domain_free_rcaches(struct iova_domain *iovad) { - cpuhp_state_remove_instance_nocalls(CPUHP_IOMMU_IOVA_DEAD, - &iovad->cpuhp_dead); free_iova_rcaches(iovad); } @@ -748,10 +724,6 @@ int iova_domain_init_rcaches(struct iova_domain *iovad) } } - ret = cpuhp_state_add_instance_nocalls(CPUHP_IOMMU_IOVA_DEAD, - &iovad->cpuhp_dead); - if (ret) - goto out_err; return 0; out_err: diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h index 6c6859bfc454..a5e356bbb1d6 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h @@ -96,7 +96,6 @@ enum cpuhp_state { CPUHP_PAGE_ALLOC, CPUHP_NET_DEV_DEAD, CPUHP_PCI_XGENE_DEAD, - CPUHP_IOMMU_IOVA_DEAD, CPUHP_LUSTRE_CFS_DEAD, CPUHP_AP_ARM_CACHE_B15_RAC_DEAD, CPUHP_PADATA_DEAD, diff --git a/include/linux/iova.h b/include/linux/iova.h index 83c00fac2acb..6fe3374e8dd6 100644 --- a/include/linux/iova.h +++ b/include/linux/iova.h @@ -37,7 +37,6 @@ struct iova_domain { struct iova anchor; /* rbtree lookup anchor */ struct iova_rcache *rcaches; - struct hlist_node cpuhp_dead; }; static inline unsigned long iova_size(struct iova *iova) From 14bec5f5761fa58c8831d52e875616690f10fbcd Mon Sep 17 00:00:00 2001 From: Janusz Krzysztofik Date: Wed, 28 Sep 2022 10:58:26 +0200 Subject: [PATCH 24/30] Restore "iommu/dma: Fix race condition during iova_domain initialization" This reverts commit bc79ef6d5a22 ("Revert "iommu/dma: Fix race condition during iova_domain initialization"") that reverted commit ac9a5d522bb8 ("iommu/dma: Fix race condition during iova_domain initialization"). That revert is no longer needed with "iommu: Remove iova cpu hotplugging flushing" in place that breaks more instances of the same lockdep loop. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8050 Signed-off-by: Janusz Krzysztofik Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220928085826.243721-3-janusz.krzysztofik@linux.intel.com --- drivers/iommu/dma-iommu.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index fae9985bbb57..f798c44e0903 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -66,6 +66,7 @@ struct iommu_dma_cookie { /* Domain for flush queue callback; NULL if flush queue not in use */ struct iommu_domain *fq_domain; + struct mutex mutex; }; static DEFINE_STATIC_KEY_FALSE(iommu_deferred_attach_enabled); @@ -312,6 +313,7 @@ int iommu_get_dma_cookie(struct iommu_domain *domain) if (!domain->iova_cookie) return -ENOMEM; + mutex_init(&domain->iova_cookie->mutex); return 0; } @@ -562,26 +564,33 @@ static int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base, } /* start_pfn is always nonzero for an already-initialised domain */ + mutex_lock(&cookie->mutex); if (iovad->start_pfn) { if (1UL << order != iovad->granule || base_pfn != iovad->start_pfn) { pr_warn("Incompatible range for DMA domain\n"); - return -EFAULT; + ret = -EFAULT; + goto done_unlock; } - return 0; + ret = 0; + goto done_unlock; } init_iova_domain(iovad, 1UL << order, base_pfn); ret = iova_domain_init_rcaches(iovad); if (ret) - return ret; + goto done_unlock; /* If the FQ fails we can simply fall back to strict mode */ if (domain->type == IOMMU_DOMAIN_DMA_FQ && iommu_dma_init_fq(domain)) domain->type = IOMMU_DOMAIN_DMA; - return iova_reserve_iommu_regions(dev, domain); + ret = iova_reserve_iommu_regions(dev, domain); + +done_unlock: + mutex_unlock(&cookie->mutex); + return ret; } /** From f4073c450d2717b819cda488b4429a5071984298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Fri, 21 Oct 2022 11:05:48 +0300 Subject: [PATCH 25/30] drm: Disable dynamic debug as broken MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CONFIG_DRM_USE_DYNAMIC_DEBUG breaks debug prints for (at least modular) drm drivers. The debug prints can be reinstated by manually frobbing /sys/module/drm/parameters/debug after the fact, but at that point the damage is done and all debugs from driver probe are lost. This makes drivers totally undebuggable. Mark the feature as broken and disable it by default. Maybe someone can still salvage it later... References: https://gitlab.freedesktop.org/drm/intel/-/issues/8051 Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 315cbdf61979..9abfb482b615 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -53,7 +53,8 @@ config DRM_DEBUG_MM config DRM_USE_DYNAMIC_DEBUG bool "use dynamic debug to implement drm.debug" - default y + default n + depends on BROKEN depends on DRM depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE depends on JUMP_LABEL From 2c670055c9fb5747d1f3719fcf184785fcac4bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Tue, 25 Oct 2022 07:03:13 +0300 Subject: [PATCH 26/30] freezer: Dump more info on whoever is trying to get frozen with locks held MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We're hitting this WARN sporadically in intel gfx CI but so far no idea who is the culprit. Dump more info. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8052 References: https://lore.kernel.org/all/Y1LVYaPCCP3BBS4g@intel.com/ Signed-off-by: Ville Syrjälä --- kernel/freezer.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/kernel/freezer.c b/kernel/freezer.c index 4fad0e6fca64..e211184c26c7 100644 --- a/kernel/freezer.c +++ b/kernel/freezer.c @@ -125,8 +125,16 @@ static int __set_task_frozen(struct task_struct *p, void *arg) /* * It's dangerous to freeze with locks held; there be dragons there. */ - if (!(state & __TASK_FREEZABLE_UNSAFE)) - WARN_ON_ONCE(debug_locks && p->lockdep_depth); + if (!(state & __TASK_FREEZABLE_UNSAFE)) { + static bool warned = false; + + if (!warned && debug_locks && p->lockdep_depth) { + debug_show_held_locks(p); + WARN(1, "%s/%d holding locks while freezing\n", + p->comm, task_pid_nr(p)); + warned = true; + } + } #endif WRITE_ONCE(p->__state, TASK_FROZEN); From 67d4276f8342780b8eaa6e9f5c15d979254a5675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Thu, 16 Mar 2023 00:29:41 +0200 Subject: [PATCH 27/30] drm-tip: 2023y-03m-15d-22h-28m-45s UTC integration manifest --- integration-manifest | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 integration-manifest diff --git a/integration-manifest b/integration-manifest new file mode 100644 index 000000000000..7de64d88db94 --- /dev/null +++ b/integration-manifest @@ -0,0 +1,28 @@ +drm drm-fixes eeac8ede17557680855031c6f305ece2378af326 + Linux 6.3-rc2 +drm-misc drm-misc-fixes 4028cbf867f70a3c599c9b0c9509334c56ed97d7 + drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion again +drm-intel drm-intel-fixes e0e6b416b25ee14716f3549e0cbec1011b193809 + drm/i915/active: Fix misuse of non-idle barriers as fence trackers +drm drm-next 8bf6e20253b2d2b614f2c0b491f840e956fa6b05 + Merge tag 'drm-intel-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-next +drm-misc drm-misc-next-fixes 047a754558d640eaa080fce3b22ca9f3d4e04626 + drm/shmem-helper: Revert accidental non-GPL export +drm-intel drm-intel-next-fixes fe15c26ee26efa11741a7b632e9f23b01aca4cc6 + Linux 6.3-rc1 +drm-misc drm-misc-next 328839ff93709a517e89ba1de1132c5d138e5dcb + drm/vmwgfx: Fix src/dst_pitch confusion +drm-intel drm-intel-next fb4651f9e00dd4e07dce4c48d458abb50d276e40 + drm/i915: Don't send idle pattern after DP2.0 link training +drm-intel drm-intel-gt-next d2a9692ad4295e227e3352fdbf14b8491b01e1c9 + drm/i915/gt: make kobj attributes const +sound-upstream for-linus 7cf3dead1ad70c72edb03e2d98e1f3dcd332cdb2 + Linux 5.13 +sound-upstream for-next 7cf3dead1ad70c72edb03e2d98e1f3dcd332cdb2 + Linux 5.13 +drm-intel topic/core-for-CI 2c670055c9fb5747d1f3719fcf184785fcac4bf3 + freezer: Dump more info on whoever is trying to get frozen with locks held +drm-misc topic/i915-ttm 1e3944578b749449bd7fa6bf0bae4c3d3f5f1733 + Merge tag 'amd-drm-next-5.16-2021-09-27' of https://gitlab.freedesktop.org/agd5f/linux into drm-next +drm topic/nouveau-misc dfc4005f8c172eea359f9db08c3b2b0ff0153699 + drm/nouveau/disp: move DAC load detection method From 6658af4ff3f846e9ca29f6d788859d5c6ec312da Mon Sep 17 00:00:00 2001 From: Cai Huoqing Date: Fri, 3 Mar 2023 22:07:18 +0800 Subject: [PATCH 28/30] drm/i915/gvt: Make use of idr_find and idr_for_each_entry in dmabuf This patch uses the already existing IDR mechanism to simplify and improve the dmabuf code. Using 'vgpu.object_idr' directly instead of 'dmabuf_obj_list_head' or 'dmabuf.list', because the dmabuf_obj can be found by 'idr_find' or 'idr_for_each_entry'. Signed-off-by: Cai Huoqing Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20230303140718.25355-1-cai.huoqing@linux.dev Reviewed-by: Zhenyu Wang --- drivers/gpu/drm/i915/gvt/dmabuf.c | 58 +++++++------------------------ drivers/gpu/drm/i915/gvt/dmabuf.h | 1 - drivers/gpu/drm/i915/gvt/gvt.h | 1 - drivers/gpu/drm/i915/gvt/vgpu.c | 1 - 4 files changed, 12 insertions(+), 49 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/dmabuf.c b/drivers/gpu/drm/i915/gvt/dmabuf.c index 6834f9fe40cf..cf619b1ed3ad 100644 --- a/drivers/gpu/drm/i915/gvt/dmabuf.c +++ b/drivers/gpu/drm/i915/gvt/dmabuf.c @@ -133,21 +133,15 @@ static void dmabuf_gem_object_free(struct kref *kref) struct intel_vgpu_dmabuf_obj *obj = container_of(kref, struct intel_vgpu_dmabuf_obj, kref); struct intel_vgpu *vgpu = obj->vgpu; - struct list_head *pos; struct intel_vgpu_dmabuf_obj *dmabuf_obj; if (vgpu && test_bit(INTEL_VGPU_STATUS_ACTIVE, vgpu->status) && - !list_empty(&vgpu->dmabuf_obj_list_head)) { - list_for_each(pos, &vgpu->dmabuf_obj_list_head) { - dmabuf_obj = list_entry(pos, struct intel_vgpu_dmabuf_obj, list); - if (dmabuf_obj == obj) { - list_del(pos); - idr_remove(&vgpu->object_idr, - dmabuf_obj->dmabuf_id); - kfree(dmabuf_obj->info); - kfree(dmabuf_obj); - break; - } + !idr_is_empty(&vgpu->object_idr)) { + dmabuf_obj = idr_find(&vgpu->object_idr, obj->dmabuf_id); + if (dmabuf_obj) { + idr_remove(&vgpu->object_idr, obj->dmabuf_id); + kfree(dmabuf_obj->info); + kfree(dmabuf_obj); } } else { /* Free the orphan dmabuf_objs here */ @@ -340,13 +334,12 @@ static struct intel_vgpu_dmabuf_obj * pick_dmabuf_by_info(struct intel_vgpu *vgpu, struct intel_vgpu_fb_info *latest_info) { - struct list_head *pos; struct intel_vgpu_fb_info *fb_info; struct intel_vgpu_dmabuf_obj *dmabuf_obj = NULL; struct intel_vgpu_dmabuf_obj *ret = NULL; + int id; - list_for_each(pos, &vgpu->dmabuf_obj_list_head) { - dmabuf_obj = list_entry(pos, struct intel_vgpu_dmabuf_obj, list); + idr_for_each_entry(&vgpu->object_idr, dmabuf_obj, id) { if (!dmabuf_obj->info) continue; @@ -366,24 +359,6 @@ pick_dmabuf_by_info(struct intel_vgpu *vgpu, return ret; } -static struct intel_vgpu_dmabuf_obj * -pick_dmabuf_by_num(struct intel_vgpu *vgpu, u32 id) -{ - struct list_head *pos; - struct intel_vgpu_dmabuf_obj *dmabuf_obj = NULL; - struct intel_vgpu_dmabuf_obj *ret = NULL; - - list_for_each(pos, &vgpu->dmabuf_obj_list_head) { - dmabuf_obj = list_entry(pos, struct intel_vgpu_dmabuf_obj, list); - if (dmabuf_obj->dmabuf_id == id) { - ret = dmabuf_obj; - break; - } - } - - return ret; -} - static void update_fb_info(struct vfio_device_gfx_plane_info *gvt_dmabuf, struct intel_vgpu_fb_info *fb_info) { @@ -477,11 +452,6 @@ int intel_vgpu_query_plane(struct intel_vgpu *vgpu, void *args) update_fb_info(gfx_plane_info, &fb_info); - INIT_LIST_HEAD(&dmabuf_obj->list); - mutex_lock(&vgpu->dmabuf_lock); - list_add_tail(&dmabuf_obj->list, &vgpu->dmabuf_obj_list_head); - mutex_unlock(&vgpu->dmabuf_lock); - gvt_dbg_dpy("vgpu%d: %s new dmabuf_obj ref %d, id %d\n", vgpu->id, __func__, kref_read(&dmabuf_obj->kref), ret); @@ -508,7 +478,7 @@ int intel_vgpu_get_dmabuf(struct intel_vgpu *vgpu, unsigned int dmabuf_id) mutex_lock(&vgpu->dmabuf_lock); - dmabuf_obj = pick_dmabuf_by_num(vgpu, dmabuf_id); + dmabuf_obj = idr_find(&vgpu->object_idr, dmabuf_id); if (dmabuf_obj == NULL) { gvt_vgpu_err("invalid dmabuf id:%d\n", dmabuf_id); ret = -EINVAL; @@ -570,23 +540,19 @@ int intel_vgpu_get_dmabuf(struct intel_vgpu *vgpu, unsigned int dmabuf_id) void intel_vgpu_dmabuf_cleanup(struct intel_vgpu *vgpu) { - struct list_head *pos, *n; struct intel_vgpu_dmabuf_obj *dmabuf_obj; + int id; mutex_lock(&vgpu->dmabuf_lock); - list_for_each_safe(pos, n, &vgpu->dmabuf_obj_list_head) { - dmabuf_obj = list_entry(pos, struct intel_vgpu_dmabuf_obj, list); + idr_for_each_entry(&vgpu->object_idr, dmabuf_obj, id) { dmabuf_obj->vgpu = NULL; - idr_remove(&vgpu->object_idr, dmabuf_obj->dmabuf_id); - list_del(pos); - + idr_remove(&vgpu->object_idr, id); /* dmabuf_obj might be freed in dmabuf_obj_put */ if (dmabuf_obj->initref) { dmabuf_obj->initref = false; dmabuf_obj_put(dmabuf_obj); } - } mutex_unlock(&vgpu->dmabuf_lock); } diff --git a/drivers/gpu/drm/i915/gvt/dmabuf.h b/drivers/gpu/drm/i915/gvt/dmabuf.h index 3dcdb6570eda..93c0e00bdab9 100644 --- a/drivers/gpu/drm/i915/gvt/dmabuf.h +++ b/drivers/gpu/drm/i915/gvt/dmabuf.h @@ -57,7 +57,6 @@ struct intel_vgpu_dmabuf_obj { __u32 dmabuf_id; struct kref kref; bool initref; - struct list_head list; }; int intel_vgpu_query_plane(struct intel_vgpu *vgpu, void *args); diff --git a/drivers/gpu/drm/i915/gvt/gvt.h b/drivers/gpu/drm/i915/gvt/gvt.h index 2d65800d8e93..1100c789f207 100644 --- a/drivers/gpu/drm/i915/gvt/gvt.h +++ b/drivers/gpu/drm/i915/gvt/gvt.h @@ -211,7 +211,6 @@ struct intel_vgpu { struct dentry *debugfs; - struct list_head dmabuf_obj_list_head; struct mutex dmabuf_lock; struct idr object_idr; struct intel_vgpu_vblank_timer vblank_timer; diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c b/drivers/gpu/drm/i915/gvt/vgpu.c index 08ad1bd651f1..0a511cfef067 100644 --- a/drivers/gpu/drm/i915/gvt/vgpu.c +++ b/drivers/gpu/drm/i915/gvt/vgpu.c @@ -329,7 +329,6 @@ int intel_gvt_create_vgpu(struct intel_vgpu *vgpu, vgpu->sched_ctl.weight = conf->weight; mutex_init(&vgpu->vgpu_lock); mutex_init(&vgpu->dmabuf_lock); - INIT_LIST_HEAD(&vgpu->dmabuf_obj_list_head); INIT_RADIX_TREE(&vgpu->page_track_tree, GFP_KERNEL); idr_init_base(&vgpu->object_idr, 1); intel_vgpu_init_cfg_space(vgpu, 1); From e0598d0ee7f9eba4cbee832e11468e2d816d1051 Mon Sep 17 00:00:00 2001 From: Zhenyu Wang Date: Thu, 16 Mar 2023 10:38:04 +0800 Subject: [PATCH 29/30] gvt-staging: 2023y-03m-16d-10h-37m-51s CST integration manifest --- integration-manifest | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/integration-manifest b/integration-manifest index 7de64d88db94..c1f80074c991 100644 --- a/integration-manifest +++ b/integration-manifest @@ -1,28 +1,16 @@ -drm drm-fixes eeac8ede17557680855031c6f305ece2378af326 - Linux 6.3-rc2 -drm-misc drm-misc-fixes 4028cbf867f70a3c599c9b0c9509334c56ed97d7 - drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion again -drm-intel drm-intel-fixes e0e6b416b25ee14716f3549e0cbec1011b193809 - drm/i915/active: Fix misuse of non-idle barriers as fence trackers -drm drm-next 8bf6e20253b2d2b614f2c0b491f840e956fa6b05 - Merge tag 'drm-intel-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-next -drm-misc drm-misc-next-fixes 047a754558d640eaa080fce3b22ca9f3d4e04626 - drm/shmem-helper: Revert accidental non-GPL export -drm-intel drm-intel-next-fixes fe15c26ee26efa11741a7b632e9f23b01aca4cc6 - Linux 6.3-rc1 -drm-misc drm-misc-next 328839ff93709a517e89ba1de1132c5d138e5dcb - drm/vmwgfx: Fix src/dst_pitch confusion -drm-intel drm-intel-next fb4651f9e00dd4e07dce4c48d458abb50d276e40 - drm/i915: Don't send idle pattern after DP2.0 link training -drm-intel drm-intel-gt-next d2a9692ad4295e227e3352fdbf14b8491b01e1c9 - drm/i915/gt: make kobj attributes const -sound-upstream for-linus 7cf3dead1ad70c72edb03e2d98e1f3dcd332cdb2 - Linux 5.13 -sound-upstream for-next 7cf3dead1ad70c72edb03e2d98e1f3dcd332cdb2 - Linux 5.13 -drm-intel topic/core-for-CI 2c670055c9fb5747d1f3719fcf184785fcac4bf3 - freezer: Dump more info on whoever is trying to get frozen with locks held -drm-misc topic/i915-ttm 1e3944578b749449bd7fa6bf0bae4c3d3f5f1733 - Merge tag 'amd-drm-next-5.16-2021-09-27' of https://gitlab.freedesktop.org/agd5f/linux into drm-next -drm topic/nouveau-misc dfc4005f8c172eea359f9db08c3b2b0ff0153699 - drm/nouveau/disp: move DAC load detection method +drm-tip/drm-tip 67d4276f8342780b8eaa6e9f5c15d979254a5675 + drm-tip: 2023y-03m-15d-22h-28m-45s UTC integration manifest +vfio-upstream/for-linus 4928f67bc911e46a43004251a4d7eb2259ba6077 + vfio/mlx5: Fix the report of dirty_bytes upon pre-copy +intel-iommu/iommu/next a593472591a5cf2d91244bc3f319c9dd91119343 + Merge branches 'iommu/fixes', 'arm/omap', 'arm/exynos', 'x86/amd', 'x86/vt-d' and 'core' into next +intel-iommu/iommu/fixes 142e821f68cf5da79ce722cb9c1323afae30e185 + iommu/mediatek-v1: Fix an error handling path in mtk_iommu_v1_probe() +origin/gvt-fixes 4a61648af68f5ba4884f0e3b494ee1cabc4b6620 + drm/i915/gvt: fix double free bug in split_2MB_gtt_entry +origin/gvt-next c351c2be08711bf367cefd15d40d7a13bc5755c7 + drm/i915/gvt: Remove extra semicolon +origin/gvt-gt-next f25e3908b9cd4a3fe819e9bdcdde58f20bacb34c + drm/i915: Get PM ref before accessing HW register +origin/gvt-next-fixes 6658af4ff3f846e9ca29f6d788859d5c6ec312da + drm/i915/gvt: Make use of idr_find and idr_for_each_entry in dmabuf From 9724e02ccd28ca6ca974dd6c5af6b2ec68a15cf6 Mon Sep 17 00:00:00 2001 From: Robert Dower Date: Fri, 3 May 2024 14:52:48 -0700 Subject: [PATCH 30/30] add required SECURITY.md file for OSSF Scorecard compliance --- SECURITY.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000000..373608b6a61a --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,5 @@ +# Security Policy +Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation. + +## Reporting a Vulnerability +Please report any security vulnerabilities in this project utilizing the guidelines [here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html).