From c11a72ae82987971d9b19b40eaafbc3f2c656964 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Sun, 12 Apr 2020 15:11:00 -0700 Subject: Updated to 5.6.3.a --- ...-potential-access-overflow-in-beep-helper.patch | 42 ++++ ...cie-restore-support-for-Killer-Qu-C0-NICs.patch | 42 ---- ...PageReserved-manipulation-from-drm_pci_al.patch | 91 -------- ...e_i915_active_acquire_with__active_retire.patch | 78 ------- ...ake_runtime-pm_wakeref_prior_to_unbinding.patch | 129 ----------- ...15-gem-Avoid-parking-the-vma-as-we-unbind.patch | 63 ------ ...15-gem-Try-to-flush-pending-unbind-events.patch | 64 ------ ...nitialise-the-local-list-before-repeating.patch | 33 --- ...-a-simple-is-bound-check-before-unbinding.patch | 41 ---- 0010-drm-i915-Introduce-a-vma.kref.patch | 252 --------------------- ...-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch | 152 ------------- ...-register-bounds-after-jmp32-instructions.patch | 57 ----- PKGBUILD | 64 ++---- config | 183 +++++++++++---- sphinx-workaround.patch | 13 ++ 15 files changed, 209 insertions(+), 1095 deletions(-) create mode 100644 0002-ALSA-hda-Fix-potential-access-overflow-in-beep-helper.patch delete mode 100644 0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch delete mode 100644 0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch delete mode 100644 0004-drm_915_Serialise_i915_active_acquire_with__active_retire.patch delete mode 100644 0005-drm_i915_gem_Take_runtime-pm_wakeref_prior_to_unbinding.patch delete mode 100644 0006-drm-915-gem-Avoid-parking-the-vma-as-we-unbind.patch delete mode 100644 0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch delete mode 100644 0008-drm-i915-gem-Reinitialise-the-local-list-before-repeating.patch delete mode 100644 0009-drm-i915-Add-a-simple-is-bound-check-before-unbinding.patch delete mode 100644 0010-drm-i915-Introduce-a-vma.kref.patch delete mode 100644 0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch delete mode 100644 0012-Revert-bpf-Provide-better-register-bounds-after-jmp32-instructions.patch create mode 100644 sphinx-workaround.patch diff --git a/0002-ALSA-hda-Fix-potential-access-overflow-in-beep-helper.patch b/0002-ALSA-hda-Fix-potential-access-overflow-in-beep-helper.patch new file mode 100644 index 0000000..48dfbf5 --- /dev/null +++ b/0002-ALSA-hda-Fix-potential-access-overflow-in-beep-helper.patch @@ -0,0 +1,42 @@ +From 28a3a4bec629ccb9cef64c546998052e0806cb1b Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 7 Apr 2020 10:36:22 +0200 +Subject: ALSA: hda: Fix potential access overflow in beep helper + +The beep control helper function blindly stores the values in two +stereo channels no matter whether the actual control is mono or +stereo. This is practically harmless, but it annoys the recently +introduced sanity check, resulting in an error when the checker is +enabled. + +This patch corrects the behavior to store only on the defined array +member. + +BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207139 +Cc: +Signed-off-by: Takashi Iwai +--- + sound/pci/hda/hda_beep.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c +index f5fd62ed4df5..841523f6b88d 100644 +--- a/sound/pci/hda/hda_beep.c ++++ b/sound/pci/hda/hda_beep.c +@@ -290,8 +290,12 @@ int snd_hda_mixer_amp_switch_get_beep(struct snd_kcontrol *kcontrol, + { + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + struct hda_beep *beep = codec->beep; ++ int chs = get_amp_channels(kcontrol); ++ + if (beep && (!beep->enabled || !ctl_has_mute(kcontrol))) { +- ucontrol->value.integer.value[0] = ++ if (chs & 1) ++ ucontrol->value.integer.value[0] = beep->enabled; ++ if (chs & 2) + ucontrol->value.integer.value[1] = beep->enabled; + return 0; + } +-- +cgit v1.2.3-1-gf6bb5 + diff --git a/0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch b/0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch deleted file mode 100644 index c98f5b1..0000000 --- a/0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 6566cb507b8ab275efd1f39e89c4db0d127eea00 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 24 Dec 2019 06:16:39 +0100 -Subject: iwlwifi: pcie: restore support for Killer Qu C0 NICs - -Commit 809805a820c6 ("iwlwifi: pcie: move some cfg mangling from -trans_pcie_alloc to probe") refactored the cfg mangling. Unfortunately, -in this process the lines which picked the right cfg for Killer Qu C0 -NICs after C0 detection were lost. These lines were added by commit -b9500577d361 ("iwlwifi: pcie: handle switching killer Qu B0 NICs to -C0"). - -I suspect this is more of the "merge damage" which commit 7cded5658329 -("iwlwifi: pcie: fix merge damage on making QnJ exclusive") talks about. - -Restore the missing lines so the driver loads the right firmware for -these NICs. - -Fixes: 809805a820c6 ("iwlwifi: pcie: move some cfg mangling from trans_pcie_alloc to probe") -Signed-off-by: Jan Alexander Steffens (heftig) ---- - drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c -index b0b7eca1754e..de62a6dc4e73 100644 ---- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c -+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c -@@ -1107,6 +1107,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) - cfg = &iwl9560_2ac_cfg_qu_c0_jf_b0; - else if (cfg == &iwl9560_2ac_160_cfg_qu_b0_jf_b0) - cfg = &iwl9560_2ac_160_cfg_qu_c0_jf_b0; -+ else if (cfg == &killer1650s_2ax_cfg_qu_b0_hr_b0) -+ cfg = &killer1650s_2ax_cfg_qu_c0_hr_b0; -+ else if (cfg == &killer1650i_2ax_cfg_qu_b0_hr_b0) -+ cfg = &killer1650i_2ax_cfg_qu_c0_hr_b0; - } - - /* same thing for QuZ... */ --- -cgit v1.2.1-1-g437b - diff --git a/0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch b/0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch deleted file mode 100644 index 15688c8..0000000 --- a/0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch +++ /dev/null @@ -1,91 +0,0 @@ -From c40f78c76b2f3ae55c348e8b206b0b283f01549c Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Sun, 2 Feb 2020 17:16:31 +0000 -Subject: drm: Remove PageReserved manipulation from drm_pci_alloc - -drm_pci_alloc/drm_pci_free are very thin wrappers around the core dma -facilities, and we have no special reason within the drm layer to behave -differently. In particular, since - -commit de09d31dd38a50fdce106c15abd68432eebbd014 -Author: Kirill A. Shutemov -Date: Fri Jan 15 16:51:42 2016 -0800 - - page-flags: define PG_reserved behavior on compound pages - - As far as I can see there's no users of PG_reserved on compound pages. - Let's use PF_NO_COMPOUND here. - -it has been illegal to combine GFP_COMP with SetPageReserved, so lets -stop doing both and leave the dma layer to its own devices. - -Reported-by: Taketo Kabe -Bug: https://gitlab.freedesktop.org/drm/intel/issues/1027 -Fixes: de09d31dd38a ("page-flags: define PG_reserved behavior on compound pages") -Signed-off-by: Chris Wilson -Cc: # v4.5+ -Reviewed-by: Alex Deucher -Link: https://patchwork.freedesktop.org/patch/msgid/20200202171635.4039044-1-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/drm_pci.c | 23 ++--------------------- - 1 file changed, 2 insertions(+), 21 deletions(-) - -diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c -index a86a3ab2771c..235729f4aadb 100644 ---- a/drivers/gpu/drm/drm_pci.c -+++ b/drivers/gpu/drm/drm_pci.c -@@ -51,8 +51,6 @@ - drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t align) - { - drm_dma_handle_t *dmah; -- unsigned long addr; -- size_t sz; - - /* pci_alloc_consistent only guarantees alignment to the smallest - * PAGE_SIZE order which is greater than or equal to the requested size. -@@ -68,20 +66,13 @@ drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t ali - dmah->size = size; - dmah->vaddr = dma_alloc_coherent(&dev->pdev->dev, size, - &dmah->busaddr, -- GFP_KERNEL | __GFP_COMP); -+ GFP_KERNEL); - - if (dmah->vaddr == NULL) { - kfree(dmah); - return NULL; - } - -- /* XXX - Is virt_to_page() legal for consistent mem? */ -- /* Reserve */ -- for (addr = (unsigned long)dmah->vaddr, sz = size; -- sz > 0; addr += PAGE_SIZE, sz -= PAGE_SIZE) { -- SetPageReserved(virt_to_page((void *)addr)); -- } -- - return dmah; - } - -@@ -94,19 +85,9 @@ EXPORT_SYMBOL(drm_pci_alloc); - */ - void __drm_legacy_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah) - { -- unsigned long addr; -- size_t sz; -- -- if (dmah->vaddr) { -- /* XXX - Is virt_to_page() legal for consistent mem? */ -- /* Unreserve */ -- for (addr = (unsigned long)dmah->vaddr, sz = dmah->size; -- sz > 0; addr += PAGE_SIZE, sz -= PAGE_SIZE) { -- ClearPageReserved(virt_to_page((void *)addr)); -- } -+ if (dmah->vaddr) - dma_free_coherent(&dev->pdev->dev, dmah->size, dmah->vaddr, - dmah->busaddr); -- } - } - - /** --- -cgit v1.2.2-1-gc45e - diff --git a/0004-drm_915_Serialise_i915_active_acquire_with__active_retire.patch b/0004-drm_915_Serialise_i915_active_acquire_with__active_retire.patch deleted file mode 100644 index 937adac..0000000 --- a/0004-drm_915_Serialise_i915_active_acquire_with__active_retire.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 167299b5c1cc6f0c1274271aec0ab2b9fec01594 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Thu, 5 Dec 2019 18:33:32 +0000 -Subject: drm/i915: Serialise i915_active_acquire() with __active_retire() - -As __active_retire() does it's final atomic_dec() under the -ref->tree_lock spinlock, in order to prevent ourselves from reusing the -ref->cache and ref->tree as they are being destroyed, we need to -serialise with the retirement during i915_active_acquire(). - -[ +0.000005] kernel BUG at drivers/gpu/drm/i915/i915_active.c:157! -[ +0.000011] invalid opcode: 0000 [#1] SMP -[ +0.000004] CPU: 7 PID: 188 Comm: kworker/u16:4 Not tainted 5.4.0-rc8-03070-gac5e57322614 #89 -[ +0.000002] Hardware name: Razer Razer Blade Stealth 13 Late 2019/LY320, BIOS 1.02 09/10/2019 -[ +0.000082] Workqueue: events_unbound active_work [i915] -[ +0.000059] RIP: 0010:__active_retire+0x115/0x120 [i915] -[ +0.000003] Code: 75 28 48 8b 3d 8c 6e 1a 00 48 89 ee e8 e4 5f a5 c0 48 8b 44 24 10 65 48 33 04 25 28 00 00 00 75 0f 48 83 c4 18 5b 5d 41 5c c3 <0f> 0b 0f 0b 0f 0b e8 a0 90 87 c0 0f 1f 44 00 00 48 8b 3d 54 6e 1a -[ +0.000002] RSP: 0018:ffffb833003f7e48 EFLAGS: 00010286 -[ +0.000003] RAX: ffff8d6e8d726d00 RBX: ffff8d6f9db4e840 RCX: 0000000000000000 -[ +0.000001] RDX: ffffffff82605930 RSI: ffff8d6f9adc4908 RDI: ffff8d6e96cefe28 -[ +0.000002] RBP: ffff8d6e96cefe00 R08: 0000000000000000 R09: ffff8d6f9ffe9a50 -[ +0.000002] R10: 0000000000000048 R11: 0000000000000018 R12: ffff8d6f9adc4930 -[ +0.000001] R13: ffff8d6f9e04fb00 R14: 0000000000000000 R15: ffff8d6f9adc4988 -[ +0.000002] FS: 0000000000000000(0000) GS:ffff8d6f9ffc0000(0000) knlGS:0000000000000000 -[ +0.000002] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 -[ +0.000002] CR2: 000055eb5a34cf10 CR3: 000000018d609002 CR4: 0000000000760ee0 -[ +0.000002] PKRU: 55555554 -[ +0.000001] Call Trace: -[ +0.000010] process_one_work+0x1aa/0x350 -[ +0.000004] worker_thread+0x4d/0x3a0 -[ +0.000004] kthread+0xfb/0x130 -[ +0.000004] ? process_one_work+0x350/0x350 -[ +0.000003] ? kthread_park+0x90/0x90 -[ +0.000005] ret_from_fork+0x1f/0x40 - -Reported-by: Kenneth Graunke -Fixes: c9ad602feabe ("drm/i915: Split i915_active.mutex into an irq-safe spinlock for the rbtree") -Signed-off-by: Chris Wilson -Cc: Tvrtko Ursulin -Cc: Kenneth Graunke -Cc: Matthew Auld -Tested-by: Kenneth Graunke -Reviewed-by: Kenneth Graunke -Link: https://patchwork.freedesktop.org/patch/msgid/20191205183332.801237-1-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/i915/i915_active.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c -index a19e7d89bc8a..378b52d1ab74 100644 ---- a/drivers/gpu/drm/i915/i915_active.c -+++ b/drivers/gpu/drm/i915/i915_active.c -@@ -91,10 +91,9 @@ static void debug_active_init(struct i915_active *ref) - - static void debug_active_activate(struct i915_active *ref) - { -- spin_lock_irq(&ref->tree_lock); -+ lockdep_assert_held(&ref->tree_lock); - if (!atomic_read(&ref->count)) /* before the first inc */ - debug_object_activate(ref, &active_debug_desc); -- spin_unlock_irq(&ref->tree_lock); - } - - static void debug_active_deactivate(struct i915_active *ref) -@@ -407,8 +406,10 @@ int i915_active_acquire(struct i915_active *ref) - if (!atomic_read(&ref->count) && ref->active) - err = ref->active(ref); - if (!err) { -+ spin_lock_irq(&ref->tree_lock); /* vs __active_retire() */ - debug_active_activate(ref); - atomic_inc(&ref->count); -+ spin_unlock_irq(&ref->tree_lock); - } - - mutex_unlock(&ref->mutex); --- -cgit v1.2.2-1-gc45e - diff --git a/0005-drm_i915_gem_Take_runtime-pm_wakeref_prior_to_unbinding.patch b/0005-drm_i915_gem_Take_runtime-pm_wakeref_prior_to_unbinding.patch deleted file mode 100644 index 3afe243..0000000 --- a/0005-drm_i915_gem_Take_runtime-pm_wakeref_prior_to_unbinding.patch +++ /dev/null @@ -1,129 +0,0 @@ -From e3d3fd13d0ac1e12848b4f2a57e9e4bf2b557bf0 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Tue, 3 Dec 2019 10:13:46 +0000 -Subject: drm/i915/gem: Take runtime-pm wakeref prior to unbinding - -Some machines require ACPI for runtime resume, and ACPI is quite kmalloc -happy. We cannot handle kmalloc from inside the vm->mutex, as they are -used by the shrinker, and so we must ensure the global runtime-pm is -awake prior to unbinding to avoid the potential inversion. - -<4> [57.121748] ====================================================== -<4> [57.121750] WARNING: possible circular locking dependency detected -<4> [57.121753] 5.4.0-rc8-CI-CI_DRM_7466+ #1 Tainted: G U -<4> [57.121754] ------------------------------------------------------ -<4> [57.121756] i915_pm_rpm/1105 is trying to acquire lock: -<4> [57.121758] ffffffff82263a40 (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part.117+0x0/0x30 -<4> [57.121766] -but task is already holding lock: -<4> [57.121768] ffff888475a593c0 (&vm->mutex){+.+.}, at: i915_vma_unbind+0x21/0x50 [i915] -<4> [57.121868] -which lock already depends on the new lock. - -<4> [57.121869] -the existing dependency chain (in reverse order) is: -<4> [57.121871] --> #1 (&vm->mutex){+.+.}: -<4> [57.121951] i915_gem_shrinker_taints_mutex+0xa2/0xd0 [i915] -<4> [57.122028] i915_address_space_init+0xa9/0x170 [i915] -<4> [57.122104] i915_ggtt_init_hw+0x47/0x130 [i915] -<4> [57.122150] i915_driver_probe+0xbb4/0x15f0 [i915] -<4> [57.122197] i915_pci_probe+0x43/0x1c0 [i915] -<4> [57.122202] pci_device_probe+0x9e/0x120 -<4> [57.122206] really_probe+0xea/0x420 -<4> [57.122209] driver_probe_device+0x10b/0x120 -<4> [57.122212] device_driver_attach+0x4a/0x50 -<4> [57.122214] __driver_attach+0x97/0x130 -<4> [57.122217] bus_for_each_dev+0x74/0xc0 -<4> [57.122220] bus_add_driver+0x142/0x220 -<4> [57.122222] driver_register+0x56/0xf0 -<4> [57.122226] do_one_initcall+0x58/0x2ff -<4> [57.122230] do_init_module+0x56/0x1f8 -<4> [57.122233] load_module+0x243e/0x29f0 -<4> [57.122236] __do_sys_finit_module+0xe9/0x110 -<4> [57.122239] do_syscall_64+0x4f/0x210 -<4> [57.122242] entry_SYSCALL_64_after_hwframe+0x49/0xbe -<4> [57.122244] --> #0 (fs_reclaim){+.+.}: -<4> [57.122249] __lock_acquire+0x1328/0x15d0 -<4> [57.122251] lock_acquire+0xa7/0x1c0 -<4> [57.122254] fs_reclaim_acquire.part.117+0x24/0x30 -<4> [57.122257] __kmalloc+0x48/0x320 -<4> [57.122261] acpi_ns_internalize_name+0x44/0x9b -<4> [57.122264] acpi_ns_get_node_unlocked+0x6b/0xd3 -<4> [57.122267] acpi_ns_get_node+0x3b/0x50 -<4> [57.122271] acpi_get_handle+0x8a/0xb4 -<4> [57.122274] acpi_has_method+0x1c/0x40 -<4> [57.122278] acpi_pci_set_power_state+0x40/0xe0 -<4> [57.122281] pci_platform_power_transition+0x3e/0x90 -<4> [57.122284] pci_set_power_state+0x83/0xf0 -<4> [57.122287] pci_restore_standard_config+0x22/0x40 -<4> [57.122289] pci_pm_runtime_resume+0x23/0xc0 -<4> [57.122293] __rpm_callback+0xb1/0x110 -<4> [57.122296] rpm_callback+0x1a/0x70 -<4> [57.122299] rpm_resume+0x50e/0x790 -<4> [57.122302] __pm_runtime_resume+0x42/0x80 -<4> [57.122357] __intel_runtime_pm_get+0x15/0x60 [i915] -<4> [57.122435] ggtt_unbind_vma+0x24/0x60 [i915] -<4> [57.122514] __i915_vma_unbind.part.39+0xb5/0x500 [i915] -<4> [57.122593] i915_vma_unbind+0x2d/0x50 [i915] -<4> [57.122668] i915_gem_object_unbind+0x11c/0x260 [i915] -<4> [57.122740] i915_gem_object_set_cache_level+0x32/0x90 [i915] -<4> [57.122810] i915_gem_set_caching_ioctl+0x1f7/0x2f0 [i915] -<4> [57.122815] drm_ioctl_kernel+0xa7/0xf0 -<4> [57.122818] drm_ioctl+0x2e1/0x390 -<4> [57.122822] do_vfs_ioctl+0xa0/0x6f0 -<4> [57.122825] ksys_ioctl+0x35/0x60 -<4> [57.122828] __x64_sys_ioctl+0x11/0x20 -<4> [57.122830] do_syscall_64+0x4f/0x210 -<4> [57.122833] entry_SYSCALL_64_after_hwframe+0x49/0xbe - -Closes: https://gitlab.freedesktop.org/drm/intel/issues/711 -Signed-off-by: Chris Wilson -Reviewed-by: Matthew Auld -Link: https://patchwork.freedesktop.org/patch/msgid/20191203101347.2836057-1-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/i915/i915_gem.c | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c -index 3f07948ea4da..ed2436db5dd2 100644 ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -119,10 +119,23 @@ i915_gem_get_aperture_ioctl(struct drm_device *dev, void *data, - int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - unsigned long flags) - { -- struct i915_vma *vma; -+ struct intel_runtime_pm *rpm = &to_i915(obj->base.dev)->runtime_pm; - LIST_HEAD(still_in_list); -+ intel_wakeref_t wakeref; -+ struct i915_vma *vma; - int ret = 0; - -+ if (!atomic_read(&obj->bind_count)) -+ return 0; -+ -+ /* -+ * As some machines use ACPI to handle runtime-resume callbacks, and -+ * ACPI is quite kmalloc happy, we cannot resume beneath the vm->mutex -+ * as they are required by the shrinker. Ergo, we wake the device up -+ * first just in case. -+ */ -+ wakeref = intel_runtime_pm_get(rpm); -+ - spin_lock(&obj->vma.lock); - while (!ret && (vma = list_first_entry_or_null(&obj->vma.list, - struct i915_vma, -@@ -146,6 +159,8 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - list_splice(&still_in_list, &obj->vma.list); - spin_unlock(&obj->vma.lock); - -+ intel_runtime_pm_put(rpm, wakeref); -+ - return ret; - } - --- -cgit v1.2.2-1-gc45e - diff --git a/0006-drm-915-gem-Avoid-parking-the-vma-as-we-unbind.patch b/0006-drm-915-gem-Avoid-parking-the-vma-as-we-unbind.patch deleted file mode 100644 index 9887e67..0000000 --- a/0006-drm-915-gem-Avoid-parking-the-vma-as-we-unbind.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 89678e8921d00143665237e719f96cfc8425f804 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Tue, 3 Dec 2019 15:50:32 +0000 -Subject: drm/i915/gem: Avoid parking the vma as we unbind - -In order to avoid keeping a reference on the i915_vma (which is long -overdue!) we have to coordinate all the possible lifetimes and only use -the vma while we know it is alive. In this episode, we are reminded that -while idle, the closed vma are destroyed. So if the GT idles while we are -working with the vma, the vma itself becomes invalid. - -First class i915_vma here we come, but in the meantime keep piling on -the straw. - -Signed-off-by: Chris Wilson -Reviewed-by: Matthew Auld -Link: https://patchwork.freedesktop.org/patch/msgid/20191203155032.3137263-1-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/i915/i915_gem.c | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c -index ed2436db5dd2..739543812422 100644 ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -141,18 +141,33 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - struct i915_vma, - obj_link))) { - struct i915_address_space *vm = vma->vm; -+ bool awake = false; - -- ret = -EBUSY; -+ ret = -EAGAIN; - if (!i915_vm_tryopen(vm)) - break; - -+ /* Prevent vma being freed by i915_vma_parked as we unbind */ -+ if (intel_gt_pm_get_if_awake(vm->gt)) { -+ awake = true; -+ } else { -+ if (i915_vma_is_closed(vma)) { -+ spin_unlock(&obj->vma.lock); -+ goto err_vm; -+ } -+ } -+ - list_move_tail(&vma->obj_link, &still_in_list); - spin_unlock(&obj->vma.lock); - -+ ret = -EBUSY; - if (flags & I915_GEM_OBJECT_UNBIND_ACTIVE || - !i915_vma_is_active(vma)) - ret = i915_vma_unbind(vma); - -+ if (awake) -+ intel_gt_pm_put(vm->gt); -+err_vm: - i915_vm_close(vm); - spin_lock(&obj->vma.lock); - } --- -cgit v1.2.2-1-gc45e - diff --git a/0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch b/0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch deleted file mode 100644 index 52196eb..0000000 --- a/0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch +++ /dev/null @@ -1,64 +0,0 @@ -From bfe34ef7e07d52ada331df8e1c5938906693b950 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Wed, 4 Dec 2019 12:35:56 +0000 -Subject: drm/i915/gem: Try to flush pending unbind events - -If we cannot handle a vma within the unbind loop, try to flush the -pending events (i915_vma_parked, i915_vm_release) and try again. This -avoids a round trip to userspace that is not guaranteed to make forward -progress, as the events we wait upon require being idle. - -References: cb6c3d45f948 ("drm/i915/gem: Avoid parking the vma as we unbind") -Signed-off-by: Chris Wilson -Cc: Matthew Auld -Reviewed-by: Matthew Auld -Link: https://patchwork.freedesktop.org/patch/msgid/20191204123556.3740002-1-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/i915/i915_gem.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c -index 739543812422..85b12228c2cf 100644 ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -123,7 +123,7 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - LIST_HEAD(still_in_list); - intel_wakeref_t wakeref; - struct i915_vma *vma; -- int ret = 0; -+ int ret; - - if (!atomic_read(&obj->bind_count)) - return 0; -@@ -136,6 +136,8 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - */ - wakeref = intel_runtime_pm_get(rpm); - -+try_again: -+ ret = 0; - spin_lock(&obj->vma.lock); - while (!ret && (vma = list_first_entry_or_null(&obj->vma.list, - struct i915_vma, -@@ -153,6 +155,7 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - } else { - if (i915_vma_is_closed(vma)) { - spin_unlock(&obj->vma.lock); -+ i915_vma_parked(vm->gt); - goto err_vm; - } - } -@@ -174,6 +177,11 @@ err_vm: - list_splice(&still_in_list, &obj->vma.list); - spin_unlock(&obj->vma.lock); - -+ if (ret == -EAGAIN && flags & I915_GEM_OBJECT_UNBIND_ACTIVE) { -+ rcu_barrier(); /* flush the i915_vm_release() */ -+ goto try_again; -+ } -+ - intel_runtime_pm_put(rpm, wakeref); - - return ret; --- -cgit v1.2.2-1-gc45e - diff --git a/0008-drm-i915-gem-Reinitialise-the-local-list-before-repeating.patch b/0008-drm-i915-gem-Reinitialise-the-local-list-before-repeating.patch deleted file mode 100644 index 2719884..0000000 --- a/0008-drm-i915-gem-Reinitialise-the-local-list-before-repeating.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 52bc26b084be047fbc485f711dc2b88c0a1b2923 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Thu, 5 Dec 2019 13:29:12 +0000 -Subject: drm/i915/gem: Reinitialise the local list before repeating - -As we may start the loop again, we require our local list of i915_vma -we've processed to be reinitialised. - -Fixes: aa5e4453dc05 ("drm/i915/gem: Try to flush pending unbind events") -Closes: https://gitlab.freedesktop.org/drm/intel/issues/731 -Signed-off-by: Chris Wilson -Reviewed-by: Andi Shyti -Link: https://patchwork.freedesktop.org/patch/msgid/20191205132912.606868-1-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/i915/i915_gem.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c -index 85b12228c2cf..c2c025c4f4ad 100644 ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -174,7 +174,7 @@ err_vm: - i915_vm_close(vm); - spin_lock(&obj->vma.lock); - } -- list_splice(&still_in_list, &obj->vma.list); -+ list_splice_init(&still_in_list, &obj->vma.list); - spin_unlock(&obj->vma.lock); - - if (ret == -EAGAIN && flags & I915_GEM_OBJECT_UNBIND_ACTIVE) { --- -cgit v1.2.2-1-gc45e - diff --git a/0009-drm-i915-Add-a-simple-is-bound-check-before-unbinding.patch b/0009-drm-i915-Add-a-simple-is-bound-check-before-unbinding.patch deleted file mode 100644 index 9db4525..0000000 --- a/0009-drm-i915-Add-a-simple-is-bound-check-before-unbinding.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 513cbef093293a7f0e331eb4fee8e6a1bb9bf5a2 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Sun, 22 Dec 2019 21:02:54 +0000 -Subject: drm/i915: Add a simple is-bound check before unbinding - -Only acquire the various atomic references required to unbind the vma if -we do need to unbind the vma. - -Signed-off-by: Chris Wilson -Acked-by: Imre Deak -Link: https://patchwork.freedesktop.org/patch/msgid/20191222210256.2066451-1-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/i915/i915_gem.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c -index c2c025c4f4ad..83eed642cbcd 100644 ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -145,6 +145,10 @@ try_again: - struct i915_address_space *vm = vma->vm; - bool awake = false; - -+ list_move_tail(&vma->obj_link, &still_in_list); -+ if (!i915_vma_is_bound(vma, I915_VMA_BIND_MASK)) -+ continue; -+ - ret = -EAGAIN; - if (!i915_vm_tryopen(vm)) - break; -@@ -160,7 +164,6 @@ try_again: - } - } - -- list_move_tail(&vma->obj_link, &still_in_list); - spin_unlock(&obj->vma.lock); - - ret = -EBUSY; --- -cgit v1.2.2-1-gc45e - diff --git a/0010-drm-i915-Introduce-a-vma.kref.patch b/0010-drm-i915-Introduce-a-vma.kref.patch deleted file mode 100644 index 2ad022b..0000000 --- a/0010-drm-i915-Introduce-a-vma.kref.patch +++ /dev/null @@ -1,252 +0,0 @@ -From 2029f44eb483a6ab7c0bc017cb699b7084f5eab4 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Sun, 22 Dec 2019 21:02:55 +0000 -Subject: drm/i915: Introduce a vma.kref - -Start introducing a kref on i915_vma in order to protect the vma unbind -(i915_gem_object_unbind) from a parallel destruction (i915_vma_parked). -Later, we will use the refcount to manage all access and turn i915_vma -into a first class container. - -Signed-off-by: Chris Wilson -Cc: Imre Deak -Acked-by: Imre Deak -Link: https://patchwork.freedesktop.org/patch/msgid/20191222210256.2066451-2-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/i915/gem/i915_gem_object.c | 2 +- - drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 3 +-- - drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 4 ++-- - drivers/gpu/drm/i915/i915_gem.c | 27 ++++++++-------------- - drivers/gpu/drm/i915/i915_gem_gtt.c | 5 ++-- - drivers/gpu/drm/i915/i915_vma.c | 9 +++++--- - drivers/gpu/drm/i915/i915_vma.h | 25 +++++++++++++++++--- - 7 files changed, 44 insertions(+), 31 deletions(-) - -diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.c b/drivers/gpu/drm/i915/gem/i915_gem_object.c -index a596548c07bf..b6937469ffd3 100644 ---- a/drivers/gpu/drm/i915/gem/i915_gem_object.c -+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.c -@@ -174,7 +174,7 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915, - GEM_BUG_ON(vma->obj != obj); - spin_unlock(&obj->vma.lock); - -- i915_vma_destroy(vma); -+ __i915_vma_put(vma); - - spin_lock(&obj->vma.lock); - } -diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c -index 688c49a24f32..bd1e2c12de63 100644 ---- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c -+++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c -@@ -1110,8 +1110,7 @@ static int __igt_write_huge(struct intel_context *ce, - out_vma_unpin: - i915_vma_unpin(vma); - out_vma_close: -- i915_vma_destroy(vma); -- -+ __i915_vma_put(vma); - return err; - } - -diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c -index 29b2077b73d2..d226e55df8b2 100644 ---- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c -+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c -@@ -161,7 +161,7 @@ static int check_partial_mapping(struct drm_i915_gem_object *obj, - kunmap(p); - - out: -- i915_vma_destroy(vma); -+ __i915_vma_put(vma); - return err; - } - -@@ -255,7 +255,7 @@ static int check_partial_mappings(struct drm_i915_gem_object *obj, - if (err) - return err; - -- i915_vma_destroy(vma); -+ __i915_vma_put(vma); - - if (igt_timeout(end_time, - "%s: timed out after tiling=%d stride=%d\n", -diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c -index 83eed642cbcd..0475a0343487 100644 ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -143,7 +143,6 @@ try_again: - struct i915_vma, - obj_link))) { - struct i915_address_space *vm = vma->vm; -- bool awake = false; - - list_move_tail(&vma->obj_link, &still_in_list); - if (!i915_vma_is_bound(vma, I915_VMA_BIND_MASK)) -@@ -154,26 +153,18 @@ try_again: - break; - - /* Prevent vma being freed by i915_vma_parked as we unbind */ -- if (intel_gt_pm_get_if_awake(vm->gt)) { -- awake = true; -- } else { -- if (i915_vma_is_closed(vma)) { -- spin_unlock(&obj->vma.lock); -- i915_vma_parked(vm->gt); -- goto err_vm; -- } -- } -- -+ vma = __i915_vma_get(vma); - spin_unlock(&obj->vma.lock); - -- ret = -EBUSY; -- if (flags & I915_GEM_OBJECT_UNBIND_ACTIVE || -- !i915_vma_is_active(vma)) -- ret = i915_vma_unbind(vma); -+ if (vma) { -+ ret = -EBUSY; -+ if (flags & I915_GEM_OBJECT_UNBIND_ACTIVE || -+ !i915_vma_is_active(vma)) -+ ret = i915_vma_unbind(vma); -+ -+ __i915_vma_put(vma); -+ } - -- if (awake) -- intel_gt_pm_put(vm->gt); --err_vm: - i915_vm_close(vm); - spin_lock(&obj->vma.lock); - } -diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c -index 44727806dfd7..dd2c20f7d4d2 100644 ---- a/drivers/gpu/drm/i915/i915_gem_gtt.c -+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c -@@ -522,7 +522,7 @@ void __i915_vm_close(struct i915_address_space *vm) - - atomic_and(~I915_VMA_PIN_MASK, &vma->flags); - WARN_ON(__i915_vma_unbind(vma)); -- i915_vma_destroy(vma); -+ __i915_vma_put(vma); - - i915_gem_object_put(obj); - } -@@ -1790,7 +1790,7 @@ static void gen6_ppgtt_cleanup(struct i915_address_space *vm) - { - struct gen6_ppgtt *ppgtt = to_gen6_ppgtt(i915_vm_to_ppgtt(vm)); - -- i915_vma_destroy(ppgtt->vma); -+ __i915_vma_put(ppgtt->vma); - - gen6_ppgtt_free_pd(ppgtt); - free_scratch(vm); -@@ -1878,6 +1878,7 @@ static struct i915_vma *pd_vma_create(struct gen6_ppgtt *ppgtt, int size) - - i915_active_init(&vma->active, NULL, NULL); - -+ kref_init(&vma->ref); - mutex_init(&vma->pages_mutex); - vma->vm = i915_vm_get(&ggtt->vm); - vma->ops = &pd_vma_ops; -diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c -index 01c822256b39..00973017abba 100644 ---- a/drivers/gpu/drm/i915/i915_vma.c -+++ b/drivers/gpu/drm/i915/i915_vma.c -@@ -112,6 +112,7 @@ vma_create(struct drm_i915_gem_object *obj, - if (vma == NULL) - return ERR_PTR(-ENOMEM); - -+ kref_init(&vma->ref); - mutex_init(&vma->pages_mutex); - vma->vm = i915_vm_get(vm); - vma->ops = &vm->vma_ops; -@@ -978,8 +979,10 @@ void i915_vma_reopen(struct i915_vma *vma) - __i915_vma_remove_closed(vma); - } - --void i915_vma_destroy(struct i915_vma *vma) -+void i915_vma_release(struct kref *ref) - { -+ struct i915_vma *vma = container_of(ref, typeof(*vma), ref); -+ - if (drm_mm_node_allocated(&vma->node)) { - mutex_lock(&vma->vm->mutex); - atomic_and(~I915_VMA_PIN_MASK, &vma->flags); -@@ -1027,7 +1030,7 @@ void i915_vma_parked(struct intel_gt *gt) - spin_unlock_irq(>->closed_lock); - - if (obj) { -- i915_vma_destroy(vma); -+ __i915_vma_put(vma); - i915_gem_object_put(obj); - } - -@@ -1192,7 +1195,7 @@ int __i915_vma_unbind(struct i915_vma *vma) - i915_vma_detach(vma); - vma_unbind_pages(vma); - -- drm_mm_remove_node(&vma->node); /* pairs with i915_vma_destroy() */ -+ drm_mm_remove_node(&vma->node); /* pairs with i915_vma_release() */ - return 0; - } - -diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h -index 465932813bc5..ce1db908ad69 100644 ---- a/drivers/gpu/drm/i915/i915_vma.h -+++ b/drivers/gpu/drm/i915/i915_vma.h -@@ -51,14 +51,19 @@ enum i915_cache_level; - */ - struct i915_vma { - struct drm_mm_node node; -- struct drm_i915_gem_object *obj; -+ - struct i915_address_space *vm; - const struct i915_vma_ops *ops; -- struct i915_fence_reg *fence; -+ -+ struct drm_i915_gem_object *obj; - struct dma_resv *resv; /** Alias of obj->resv */ -+ - struct sg_table *pages; - void __iomem *iomap; - void *private; /* owned by creator */ -+ -+ struct i915_fence_reg *fence; -+ - u64 size; - u64 display_alignment; - struct i915_page_sizes page_sizes; -@@ -71,6 +76,7 @@ struct i915_vma { - * handles (but same file) for execbuf, i.e. the number of aliases - * that exist in the ctx->handle_vmas LUT for this vma. - */ -+ struct kref ref; - atomic_t open_count; - atomic_t flags; - /** -@@ -333,7 +339,20 @@ int __must_check i915_vma_unbind(struct i915_vma *vma); - void i915_vma_unlink_ctx(struct i915_vma *vma); - void i915_vma_close(struct i915_vma *vma); - void i915_vma_reopen(struct i915_vma *vma); --void i915_vma_destroy(struct i915_vma *vma); -+ -+static inline struct i915_vma *__i915_vma_get(struct i915_vma *vma) -+{ -+ if (kref_get_unless_zero(&vma->ref)) -+ return vma; -+ -+ return NULL; -+} -+ -+void i915_vma_release(struct kref *ref); -+static inline void __i915_vma_put(struct i915_vma *vma) -+{ -+ kref_put(&vma->ref, i915_vma_release); -+} - - #define assert_vma_held(vma) dma_resv_assert_held((vma)->resv) - --- -cgit v1.2.2-1-gc45e - diff --git a/0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch b/0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch deleted file mode 100644 index af462ee..0000000 --- a/0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch +++ /dev/null @@ -1,152 +0,0 @@ -From ec701fa986108fae10bee7cfe269e12210521c5f Mon Sep 17 00:00:00 2001 -From: Golan Ben Ami -Date: Wed, 18 Mar 2020 08:12:54 +0200 -Subject: iwlwifi: don't send GEO_TX_POWER_LIMIT if no wgds table - -The GEO_TX_POWER_LIMIT command was sent although -there is no wgds table, so the fw got wrong SAR values -from the driver. - -Fix this by avoiding sending the command if no wgds -tables are available. - -Signed-off-by: Golan Ben Ami -Fixes: 39c1a9728f93 ("iwlwifi: refactor the SAR tables from mvm to acpi") -Signed-off-by: Luca Coelho -Tested-By: Jonathan McDowell -Tested-by: Len Brown ---- - drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 14 ++++++++------ - drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 14 ++++++++------ - drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 9 ++++++++- - 3 files changed, 24 insertions(+), 13 deletions(-) - -diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c -index 48d375a86d86..ba2aff3af0fe 100644 ---- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c -+++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c -@@ -6,7 +6,7 @@ - * GPL LICENSE SUMMARY - * - * Copyright(c) 2017 Intel Deutschland GmbH -- * Copyright (C) 2019 Intel Corporation -+ * Copyright (C) 2019 - 2020 Intel Corporation - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as -@@ -27,7 +27,7 @@ - * BSD LICENSE - * - * Copyright(c) 2017 Intel Deutschland GmbH -- * Copyright (C) 2019 Intel Corporation -+ * Copyright (C) 2019 - 2020 Intel Corporation - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without -@@ -491,13 +491,13 @@ int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt, - } - IWL_EXPORT_SYMBOL(iwl_validate_sar_geo_profile); - --void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, -- struct iwl_per_chain_offset_group *table) -+int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, -+ struct iwl_per_chain_offset_group *table) - { - int ret, i, j; - - if (!iwl_sar_geo_support(fwrt)) -- return; -+ return -EOPNOTSUPP; - - ret = iwl_sar_get_wgds_table(fwrt); - if (ret < 0) { -@@ -505,7 +505,7 @@ void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, - "Geo SAR BIOS table invalid or unavailable. (%d)\n", - ret); - /* we don't fail if the table is not available */ -- return; -+ return -ENOENT; - } - - BUILD_BUG_ON(ACPI_NUM_GEO_PROFILES * ACPI_WGDS_NUM_BANDS * -@@ -530,5 +530,7 @@ void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, - i, j, value[1], value[2], value[0]); - } - } -+ -+ return 0; - } - IWL_EXPORT_SYMBOL(iwl_sar_geo_init); -diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h -index 4a6e8262974b..5590e5cc8fbb 100644 ---- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h -+++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h -@@ -6,7 +6,7 @@ - * GPL LICENSE SUMMARY - * - * Copyright(c) 2017 Intel Deutschland GmbH -- * Copyright(c) 2018 - 2019 Intel Corporation -+ * Copyright(c) 2018 - 2020 Intel Corporation - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as -@@ -27,7 +27,7 @@ - * BSD LICENSE - * - * Copyright(c) 2017 Intel Deutschland GmbH -- * Copyright(c) 2018 - 2019 Intel Corporation -+ * Copyright(c) 2018 - 2020 Intel Corporation - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without -@@ -171,8 +171,9 @@ bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt); - int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt, - struct iwl_host_cmd *cmd); - --void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, -- struct iwl_per_chain_offset_group *table); -+int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, -+ struct iwl_per_chain_offset_group *table); -+ - #else /* CONFIG_ACPI */ - - static inline void *iwl_acpi_get_object(struct device *dev, acpi_string method) -@@ -243,9 +244,10 @@ static inline int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt, - return -ENOENT; - } - --static inline void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, -- struct iwl_per_chain_offset_group *table) -+static inline int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, -+ struct iwl_per_chain_offset_group *table) - { -+ return -ENOENT; - } - - #endif /* CONFIG_ACPI */ -diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c -index c09624d8d7ee..81b7da5815eb 100644 ---- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c -+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c -@@ -749,10 +749,17 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm) - u16 cmd_wide_id = WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT); - union geo_tx_power_profiles_cmd cmd; - u16 len; -+ int ret; - - cmd.geo_cmd.ops = cpu_to_le32(IWL_PER_CHAIN_OFFSET_SET_TABLES); - -- iwl_sar_geo_init(&mvm->fwrt, cmd.geo_cmd.table); -+ ret = iwl_sar_geo_init(&mvm->fwrt, cmd.geo_cmd.table); -+ /* -+ * It is a valid scenario to not support SAR, or miss wgds table, -+ * but in that case there is no need to send the command. -+ */ -+ if (ret) -+ return 0; - - cmd.geo_cmd.table_revision = cpu_to_le32(mvm->fwrt.geo_rev); - --- -cgit v1.2.2-1-gc45e - diff --git a/0012-Revert-bpf-Provide-better-register-bounds-after-jmp32-instructions.patch b/0012-Revert-bpf-Provide-better-register-bounds-after-jmp32-instructions.patch deleted file mode 100644 index 4e866fa..0000000 --- a/0012-Revert-bpf-Provide-better-register-bounds-after-jmp32-instructions.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 9ff88052dbb54cdb7b05d91561b3540056c96e83 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Mon, 30 Mar 2020 22:37:11 +0200 -Subject: Revert "bpf: Provide better register bounds after jmp32 instructions" - -This reverts commit 581738a681b6faae5725c2555439189ca81c0f1f. ---- - kernel/bpf/verifier.c | 19 ------------------- - 1 file changed, 19 deletions(-) - -diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c -index 7d530ce8719d..79f38a281390 100644 ---- a/kernel/bpf/verifier.c -+++ b/kernel/bpf/verifier.c -@@ -1034,17 +1034,6 @@ static void __reg_bound_offset(struct bpf_reg_state *reg) - reg->umax_value)); - } - --static void __reg_bound_offset32(struct bpf_reg_state *reg) --{ -- u64 mask = 0xffffFFFF; -- struct tnum range = tnum_range(reg->umin_value & mask, -- reg->umax_value & mask); -- struct tnum lo32 = tnum_cast(reg->var_off, 4); -- struct tnum hi32 = tnum_lshift(tnum_rshift(reg->var_off, 32), 32); -- -- reg->var_off = tnum_or(hi32, tnum_intersect(lo32, range)); --} -- - /* Reset the min/max bounds of a register */ - static void __mark_reg_unbounded(struct bpf_reg_state *reg) - { -@@ -5677,10 +5666,6 @@ static void reg_set_min_max(struct bpf_reg_state *true_reg, - /* We might have learned some bits from the bounds. */ - __reg_bound_offset(false_reg); - __reg_bound_offset(true_reg); -- if (is_jmp32) { -- __reg_bound_offset32(false_reg); -- __reg_bound_offset32(true_reg); -- } - /* Intersecting with the old var_off might have improved our bounds - * slightly. e.g. if umax was 0x7f...f and var_off was (0; 0xf...fc), - * then new var_off is (0; 0x7f...fc) which improves our umax. -@@ -5790,10 +5775,6 @@ static void reg_set_min_max_inv(struct bpf_reg_state *true_reg, - /* We might have learned some bits from the bounds. */ - __reg_bound_offset(false_reg); - __reg_bound_offset(true_reg); -- if (is_jmp32) { -- __reg_bound_offset32(false_reg); -- __reg_bound_offset32(true_reg); -- } - /* Intersecting with the old var_off might have improved our bounds - * slightly. e.g. if umax was 0x7f...f and var_off was (0; 0xf...fc), - * then new var_off is (0; 0x7f...fc) which improves our umax. --- -cgit v1.2.3-1-gf6bb5 - diff --git a/PKGBUILD b/PKGBUILD index b30d272..dd3fd4a 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -18,9 +18,9 @@ _pkgbase=linux-hardened pkgbase=linux-libre-hardened _supver=5 -_majver=5 -_minver=13 -_hardenedver=b +_majver=6 +_minver=3 +_hardenedver=a _gccpatchver='20191217' _gccpatchger='9.1' _gccpatchker='5.5' @@ -48,22 +48,13 @@ _gnupkgver=${_pkgver}-gnu source=( https://linux-libre.fsfla.org/pub/linux-libre/releases/${_gnumajver}/linux-libre-${_gnumajver}.tar.xz{,.sign} https://github.com/anthraxx/${_pkgbase}/releases/download/${pkgver}/${_pkgbase}-${pkgver}.patch{,.sig} - 0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch - 0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch - 0004-drm_915_Serialise_i915_active_acquire_with__active_retire.patch - 0005-drm_i915_gem_Take_runtime-pm_wakeref_prior_to_unbinding.patch - 0006-drm-915-gem-Avoid-parking-the-vma-as-we-unbind.patch - 0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch - 0008-drm-i915-gem-Reinitialise-the-local-list-before-repeating.patch - 0009-drm-i915-Add-a-simple-is-bound-check-before-unbinding.patch - 0010-drm-i915-Introduce-a-vma.kref.patch - 0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch - 0012-Revert-bpf-Provide-better-register-bounds-after-jmp32-instructions.patch + 0002-ALSA-hda-Fix-potential-access-overflow-in-beep-helper.patch graysky_bdver2-hotfix.patch kernel_gcc_patch-${_gccpatchver}.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/${_gccpatchver}.tar.gz ath9k-regdom-hack.patch raid6-default-algo.patch config # the main kernel config file + sphinx-workaround.patch ) if [ "$_minver" != "0" ]; then source+=(https://linux-libre.fsfla.org/pub/linux-libre/releases/${_gnupkgver}/patch-${_gnumajver}-${_gnupkgver}.xz{,.sign}) @@ -72,27 +63,18 @@ validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva 'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak ) -b2sums=('a4d4c927af24f61aba451cc21117c5a508ab2037b81ca6add19b4838940f8f321c8bf14b2d35e388f93801d92b296a998c15d2aac92dc2df761322e7ea37dd1d' +b2sums=('921a3836ffbd5ababb897b8d923ab3e97c10c39b8d01060fe41742005f8111b5c2c9e76c9b7bcf4fe59a056454a364eca5df8006ca8a174205df152007e18dff' 'SKIP' - '0675b661107ccef3c8e61fe5d96d285d92cee67bdf7ea6ad9b972bf1409b141111e0f5ee6ae898e43154b4416fb693fa361249158833b48a322ae58c513d0859' + '47a8ba59ad90afc51a6e3c6c02dc54af2da3b27093859f30d33e799bc5103261f3bca91a89b201ff9b6acddcb610f8da3764eddf64c4b2ce80b9009557301340' 'SKIP' - '2e822cf7d4ff8b7458e22d3ce110fd8534e17a9aac2feace41c591f70697e1fab7bd9ce307c60a6361fbe525d10dab74c8b76fcb5276cd27f6e945f8fdfcc25c' - 'd8027cd96a447ea0987a67f3e65d157bb3d396069a944b140610f74c663677fe45e171e96a92dfd5eda8f71a5c715fd8114ee0e60b7620bc401a2a548bcf83cc' - 'df41200d86f1fd493861d4b4a091ec5f853ce7668ec9712f57e574ce2c1a94c7054ec8abcdf947086e5f98b0cdde73523521552536c91373dacdd10c4ecf4c1a' - 'f4d5f82c5deb981f475fd18a408e23b5f170e23c7a49c3563171e55abd78c07c475a7a9c67850c4a3665ce3447cd7b5fb3171e47af8cd8077822f2a6679cfd9b' - '70d02b7fc8b26c783eaabafb9bef5d3895c0031642dc8b71d8737762722695221340315576433d1544b79b37446212ce5e3d0936f695af307b3344a717274ba8' - '5909775c40e31588072e052d28daa4472b7b0e0cb124d631bfa967ce398b9cf44afb6937f5f4ec709b0430f0a27262ce876c7d3ca71fae821138671bc492176f' - 'c1410e2d53dd7afb6d68f75c557774e37f466a5b5b7432ec6802b2c2a9644c8a6b5fcd38a76781b9229a9cb2cf4c0c55129ee050918577937d91dd7ee789f3b8' - '63e9e6ceda80243910c073ec81555f2781d75ac4b3cb5000c1328f2624f7be840684b0f383768020e82bce502aa90a1c8729f7b3e91c099652075a42da2187cf' - '078bb20a03b7e43ad0685b0c3f6a54f1c4bd32d25e0f6c6434100c6f5f5bc27cd6281bf2134b7c7034e6aa448d895d23c20d32f7d1cc40e55f0735af777694a3' - '7b56fe6d171bc9f5154fd6dd89e6678f7e65f26d53551ebc758142a3440cb796b8f7badc361b1e19ff70dfc842dce235fb3b476d35994cb0022157ae64e28cf3' - '152bdc0b317a91a8d822bcb9fc7e5d0af158e5f8095ca88af9e9c03d9c1d6ff64c412be2849d5912f5e593eb890655da630bfe3e903a29aff3fd8de3634af004' + '4d0a521668223e00d0c7a7e4359ae18a5506b65b3394f3050ea20e304cc37c2c73f757a09b70737118bffe95db23a02d4da7640a3726ce9c88966c3a8c5ceb11' '1892bd22775eac3bcc4d37f4fd30c95346bf3a0888cbbff57fd614973b525390dff2e315ce35b2e498523cceaab94ff21a80475dee8df3de4dd8fc0fab07d74e' 'd76bd0bf237ea2bb7999fd3715cb664d89148cb0ade8057d57cdb40bc0a7954336e50ee077312e5e192398b0f35f055786deb98af9130d57e60f2ea040fbb66f' '2e58bb89b247b1678355368956e67c1de51fcde97a227b2162f6771e30f17fa5520faafe7be4b6816a542e7ae10d05f64c6b6354f352c12746d4b8da632936dd' 'fde132f3705d908e6f2147c78a2193289916d72304ca5efa2229d79fc3e57a857314ce94e71425caef2f7f7b6cf87f05ef86335dc8bd4be78e7035afe608005a' - 'f97be5da0e531ace7d6a0c1afa02a247d7bbf40c1d458709e648c0360c9d487b629ef76bde87f24c30e0ad42701d18e587f3f621d19d3bd1d4c7446ef223854c' - 'd10810b3f96821965cfb106a53302329a346815b78ef5720dbd3b9065a0542034a4e071133459e4288304de5658c5509847ee8e6770a4d553593ed815034a0fb' + 'e617e416336217aa8868c8baa6371236362f35663a49b974b1decc2701584c9b197cc642080c13248a4cf28e3ba2f9ba70af87b3116ee9ff4480ad6de702d35a' + 'b4e1377d97ad7e8144d6e55b6d43731e3271a5aec65b65ca6d81026a95f15f549b9303fb3c6f492099ca691e3f65f4cf7f0c3aa742df03b396d7f6d81813aa95' + '33ce93ba7c83909f992a7bfa72ff9eebd82e70f4c5b4124ab450aea250748f3a429e436a045350aba547656897659be89a4f5cedd63e4c85f7af125510b9291d' 'SKIP') export KBUILD_BUILD_HOST=$pkgbase @@ -111,17 +93,8 @@ prepare() { # Hotfixes echo "Applying hotfixes" - patch -p1 -i ../0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch - patch -p1 -i ../0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch - patch -p1 -i ../0004-drm_915_Serialise_i915_active_acquire_with__active_retire.patch - patch -p1 -i ../0005-drm_i915_gem_Take_runtime-pm_wakeref_prior_to_unbinding.patch - patch -p1 -i ../0006-drm-915-gem-Avoid-parking-the-vma-as-we-unbind.patch - patch -p1 -i ../0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch - patch -p1 -i ../0008-drm-i915-gem-Reinitialise-the-local-list-before-repeating.patch - patch -p1 -i ../0009-drm-i915-Add-a-simple-is-bound-check-before-unbinding.patch - patch -p1 -i ../0010-drm-i915-Introduce-a-vma.kref.patch - patch -p1 -i ../0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch - patch -p1 -i ../0012-Revert-bpf-Provide-better-register-bounds-after-jmp32-instructions.patch + patch -p1 -i ../0002-ALSA-hda-Fix-potential-access-overflow-in-beep-helper.patch + patch -p1 -i ../sphinx-workaround.patch # linux hardened patch @@ -202,6 +175,8 @@ _package() { optdepends=('crda: to set the correct wireless channels of your country' 'linux-libre-firmware: firmware images needed for some devices' 'usbctl-libre: deny_new_usb control') + provides=(WIREGUARD-MODULE) + replaces=(wireguard-arch) cd $_srcname local kernver="$(