diff options
author | Ben Hutchings <benh@debian.org> | 2022-02-03 18:48:06 +0100 |
---|---|---|
committer | Ben Hutchings <benh@debian.org> | 2022-02-03 18:49:35 +0100 |
commit | 60ce95ec78c385aa19a160a5366f624fae203540 (patch) | |
tree | 5ebf3b619af3f87546eaaa945e0f43a066db423c | |
parent | 143071e764bec02f7e2be47605ae2bc32a038c82 (diff) | |
parent | 39ef73dacb18af3a41b26cd5bc7bb39fdb693074 (diff) | |
download | linux-debian-60ce95ec78c385aa19a160a5366f624fae203540.tar.gz |
Merge tag 'debian/5.15.15-2' into bullseye-backports
Release linux (5.15.15-2).
- Drop ABI reference files
- Change ABI number to 0.bpo.3
-rw-r--r-- | debian/changelog | 1029 | ||||
-rw-r--r-- | debian/config/armhf/config | 1 | ||||
-rw-r--r-- | debian/config/config | 7 | ||||
-rw-r--r-- | debian/config/defines | 2 | ||||
-rw-r--r-- | debian/patches-rt/0001-rcu-tree-Protect-rcu_rdp_is_offloaded-invocations-on.patch (renamed from debian/patches-rt/rcu-tree-Protect-rcu_rdp_is_offloaded-invocations-on.patch) | 17 | ||||
-rw-r--r-- | debian/patches-rt/0002-sched-Introduce-migratable.patch (renamed from debian/patches-rt/sched_introduce_migratable.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0003-arm64-mm-Make-arch_faults_on_old_pte-check-for-migra.patch (renamed from debian/patches-rt/arm64_mm_make_arch_faults_on_old_pte_check_for_migratability.patch) | 15 | ||||
-rw-r--r-- | debian/patches-rt/0004-printk-rename-printk-cpulock-API-and-always-disable-.patch (renamed from debian/patches-rt/printk__rename_printk_cpulock_API_and_always_disable_interrupts.patch) | 38 | ||||
-rw-r--r-- | debian/patches-rt/0005-console-add-write_atomic-interface.patch (renamed from debian/patches-rt/console__add_write_atomic_interface.patch) | 71 | ||||
-rw-r--r-- | debian/patches-rt/0006-kdb-only-use-atomic-consoles-for-output-mirroring.patch (renamed from debian/patches-rt/kdb__only_use_atomic_consoles_for_output_mirroring.patch) | 23 | ||||
-rw-r--r-- | debian/patches-rt/0007-serial-8250-implement-write_atomic.patch (renamed from debian/patches-rt/serial__8250__implement_write_atomic.patch) | 101 | ||||
-rw-r--r-- | debian/patches-rt/0008-printk-relocate-printk_delay.patch (renamed from debian/patches-rt/printk__relocate_printk_delay.patch) | 23 | ||||
-rw-r--r-- | debian/patches-rt/0009-printk-call-boot_delay_msec-in-printk_delay.patch (renamed from debian/patches-rt/printk__call_boot_delay_msec_in_printk_delay.patch) | 23 | ||||
-rw-r--r-- | debian/patches-rt/0010-printk-use-seqcount_latch-for-console_seq.patch (renamed from debian/patches-rt/printk__use_seqcount_latch_for_console_seq.patch) | 29 | ||||
-rw-r--r-- | debian/patches-rt/0011-printk-introduce-kernel-sync-mode.patch (renamed from debian/patches-rt/printk__introduce_kernel_sync_mode.patch) | 53 | ||||
-rw-r--r-- | debian/patches-rt/0012-printk-move-console-printing-to-kthreads.patch (renamed from debian/patches-rt/printk__move_console_printing_to_kthreads.patch) | 122 | ||||
-rw-r--r-- | debian/patches-rt/0013-printk-remove-deferred-printing.patch (renamed from debian/patches-rt/printk__remove_deferred_printing.patch) | 228 | ||||
-rw-r--r-- | debian/patches-rt/0014-printk-add-console-handover.patch (renamed from debian/patches-rt/printk__add_console_handover.patch) | 31 | ||||
-rw-r--r-- | debian/patches-rt/0015-printk-add-pr_flush.patch (renamed from debian/patches-rt/printk__add_pr_flush.patch) | 41 | ||||
-rw-r--r-- | debian/patches-rt/0016-printk-Enhance-the-condition-check-of-msleep-in-pr_f.patch (renamed from debian/patches-rt/printk__Enhance_the_condition_check_of_msleep_in_pr_flush.patch) | 22 | ||||
-rw-r--r-- | debian/patches-rt/0017-sched-Switch-wait_task_inactive-to-HRTIMER_MODE_REL_.patch (renamed from debian/patches-rt/sched-Switch-wait_task_inactive-to-HRTIMER_MODE_REL_.patch) | 15 | ||||
-rw-r--r-- | debian/patches-rt/0018-kthread-Move-prio-affinite-change-into-the-newly-cre.patch (renamed from debian/patches-rt/kthread-Move-prio-affinite-change-into-the-newly-cre.patch) | 18 | ||||
-rw-r--r-- | debian/patches-rt/0019-genirq-Move-prio-assignment-into-the-newly-created-t.patch (renamed from debian/patches-rt/genirq-Move-prio-assignment-into-the-newly-created-t.patch) | 15 | ||||
-rw-r--r-- | debian/patches-rt/0020-genirq-Disable-irqfixup-poll-on-PREEMPT_RT.patch (renamed from debian/patches-rt/genirq-Disable-irqfixup-poll-on-PREEMPT_RT.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0021-efi-Disable-runtime-services-on-RT.patch (renamed from debian/patches-rt/efi-Disable-runtime-services-on-RT.patch) | 12 | ||||
-rw-r--r-- | debian/patches-rt/0022-efi-Allow-efi-runtime.patch (renamed from debian/patches-rt/efi-Allow-efi-runtime.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0023-mm-Disable-zsmalloc-on-PREEMPT_RT.patch (renamed from debian/patches-rt/mm-Disable-zsmalloc-on-PREEMPT_RT.patch) | 12 | ||||
-rw-r--r-- | debian/patches-rt/0024-net-core-disable-NET_RX_BUSY_POLL-on-PREEMPT_RT.patch (renamed from debian/patches-rt/net-core-disable-NET_RX_BUSY_POLL-on-PREEMPT_RT.patch) | 12 | ||||
-rw-r--r-- | debian/patches-rt/0025-samples-kfifo-Rename-read_lock-write_lock.patch (renamed from debian/patches-rt/samples_kfifo__Rename_read_lock_write_lock.patch) | 38 | ||||
-rw-r--r-- | debian/patches-rt/0026-crypto-testmgr-Only-disable-migration-in-crypto_disa.patch (renamed from debian/patches-rt/crypto_testmgr_only_disable_migration_in_crypto_disable_simd_for_test.patch) | 15 | ||||
-rw-r--r-- | debian/patches-rt/0027-mm-Allow-only-SLUB-on-PREEMPT_RT.patch (renamed from debian/patches-rt/mm_allow_only_slub_on_preempt_rt.patch) | 12 | ||||
-rw-r--r-- | debian/patches-rt/0028-mm-page_alloc-Use-migrate_disable-in-drain_local_pag.patch (renamed from debian/patches-rt/mm_page_alloc_use_migrate_disable_in_drain_local_pages_wq.patch) | 17 | ||||
-rw-r--r-- | debian/patches-rt/0029-mm-scatterlist-Replace-the-preemptible-warning-in-sg.patch (renamed from debian/patches-rt/mm_scatterlist_replace_the_preemptible_warning_in_sg_miter_stop.patch) | 17 | ||||
-rw-r--r-- | debian/patches-rt/0030-mm-Disable-NUMA_BALANCING_DEFAULT_ENABLED-and-TRANSP.patch (renamed from debian/patches-rt/mm-Disable-NUMA_BALANCING_DEFAULT_ENABLED-and-TRANSP.patch) | 16 | ||||
-rw-r--r-- | debian/patches-rt/0031-x86-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch (renamed from debian/patches-rt/x86-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch) | 18 | ||||
-rw-r--r-- | debian/patches-rt/0032-Documentation-kcov-Include-types.h-in-the-example.patch (renamed from debian/patches-rt/0001_documentation_kcov_include_types_h_in_the_example.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0033-Documentation-kcov-Define-ip-in-the-example.patch (renamed from debian/patches-rt/0002_documentation_kcov_define_ip_in_the_example.patch) | 12 | ||||
-rw-r--r-- | debian/patches-rt/0034-kcov-Allocate-per-CPU-memory-on-the-relevant-node.patch (renamed from debian/patches-rt/0003_kcov_allocate_per_cpu_memory_on_the_relevant_node.patch) | 12 | ||||
-rw-r--r-- | debian/patches-rt/0035-kcov-Avoid-enable-disable-interrupts-if-in_task.patch (renamed from debian/patches-rt/0004_kcov_avoid_enable_disable_interrupts_if_in_task.patch) | 12 | ||||
-rw-r--r-- | debian/patches-rt/0036-kcov-Replace-local_irq_save-with-a-local_lock_t.patch (renamed from debian/patches-rt/0005_kcov_replace_local_irq_save_with_a_local_lock_t.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0037-net-sched-sch_ets-properly-init-all-active-DRR-list-.patch (renamed from debian/patches-rt/net-sched-sch_ets-properly-init-all-active-DRR-list-.patch) | 21 | ||||
-rw-r--r-- | debian/patches-rt/0038-gen_stats-Add-instead-Set-the-value-in-__gnet_stats_.patch (renamed from debian/patches-rt/0001-gen_stats-Add-instead-Set-the-value-in-__gnet_stats_.patch) | 44 | ||||
-rw-r--r-- | debian/patches-rt/0039-gen_stats-Add-gnet_stats_add_queue.patch (renamed from debian/patches-rt/0002-gen_stats-Add-gnet_stats_add_queue.patch) | 20 | ||||
-rw-r--r-- | debian/patches-rt/0040-mq-mqprio-Use-gnet_stats_add_queue.patch (renamed from debian/patches-rt/0003-mq-mqprio-Use-gnet_stats_add_queue.patch) | 41 | ||||
-rw-r--r-- | debian/patches-rt/0041-gen_stats-Move-remaining-users-to-gnet_stats_add_que.patch (renamed from debian/patches-rt/0004-gen_stats-Move-remaining-users-to-gnet_stats_add_que.patch) | 28 | ||||
-rw-r--r-- | debian/patches-rt/0042-u64_stats-Introduce-u64_stats_set.patch (renamed from debian/patches-rt/0005-u64_stats-Introduce-u64_stats_set.patch) | 16 | ||||
-rw-r--r-- | debian/patches-rt/0043-net-sched-Protect-Qdisc-bstats-with-u64_stats.patch (renamed from debian/patches-rt/0006-net-sched-Protect-Qdisc-bstats-with-u64_stats.patch) | 114 | ||||
-rw-r--r-- | debian/patches-rt/0044-net-sched-Use-_bstats_update-set-instead-of-raw-writ.patch (renamed from debian/patches-rt/0007-net-sched-Use-_bstats_update-set-instead-of-raw-writ.patch) | 50 | ||||
-rw-r--r-- | debian/patches-rt/0045-net-sched-Merge-Qdisc-bstats-and-Qdisc-cpu_bstats-da.patch (renamed from debian/patches-rt/0008-net-sched-Merge-Qdisc-bstats-and-Qdisc-cpu_bstats-da.patch) | 226 | ||||
-rw-r--r-- | debian/patches-rt/0046-net-sched-Remove-Qdisc-running-sequence-counter.patch (renamed from debian/patches-rt/0009-net-sched-Remove-Qdisc-running-sequence-counter.patch) | 190 | ||||
-rw-r--r-- | debian/patches-rt/0047-net-sched-Allow-statistics-reads-from-softirq.patch (renamed from debian/patches-rt/net-sched-Allow-statistics-reads-from-softirq.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0048-net-sched-fix-logic-error-in-qdisc_run_begin.patch (renamed from debian/patches-rt/net-sched-fix-logic-error-in-qdisc_run_begin.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0049-net-sched-remove-one-pair-of-atomic-operations.patch (renamed from debian/patches-rt/net-sched-remove-one-pair-of-atomic-operations.patch) | 18 | ||||
-rw-r--r-- | debian/patches-rt/0050-net-stats-Read-the-statistics-in-___gnet_stats_copy_.patch (renamed from debian/patches-rt/net-stats-Read-the-statistics-in-___gnet_stats_copy_.patch) | 16 | ||||
-rw-r--r-- | debian/patches-rt/0051-net-sched-gred-dynamically-allocate-tc_gred_qopt_off.patch (renamed from debian/patches-rt/net-sched-gred-dynamically-allocate-tc_gred_qopt_off.patch) | 21 | ||||
-rw-r--r-- | debian/patches-rt/0052-sched-rt-Annotate-the-RT-balancing-logic-irqwork-as-.patch (renamed from debian/patches-rt/0001_sched_rt_annotate_the_rt_balancing_logic_irqwork_as_irq_work_hard_irq.patch) | 17 | ||||
-rw-r--r-- | debian/patches-rt/0053-irq_work-Allow-irq_work_sync-to-sleep-if-irq_work-no.patch (renamed from debian/patches-rt/0002_irq_work_allow_irq_work_sync_to_sleep_if_irq_work_no_irq_support.patch) | 19 | ||||
-rw-r--r-- | debian/patches-rt/0054-irq_work-Handle-some-irq_work-in-a-per-CPU-thread-on.patch (renamed from debian/patches-rt/0003_irq_work_handle_some_irq_work_in_a_per_cpu_thread_on_preempt_rt.patch) | 23 | ||||
-rw-r--r-- | debian/patches-rt/0055-irq_work-Also-rcuwait-for-IRQ_WORK_HARD_IRQ-on-PREEM.patch (renamed from debian/patches-rt/0004_irq_work_also_rcuwait_for_irq_work_hard_irq_on_preempt_rt.patch) | 23 | ||||
-rw-r--r-- | debian/patches-rt/0056-irq_poll-Use-raise_softirq_irqoff-in-cpu_dead-notifi.patch (renamed from debian/patches-rt/irq_poll-Use-raise_softirq_irqoff-in-cpu_dead-notifi.patch) | 15 | ||||
-rw-r--r-- | debian/patches-rt/0057-smp-Wake-ksoftirqd-on-PREEMPT_RT-instead-do_softirq.patch (renamed from debian/patches-rt/smp_wake_ksoftirqd_on_preempt_rt_instead_do_softirq.patch) | 19 | ||||
-rw-r--r-- | debian/patches-rt/0058-fs-namespace-Boost-the-mount_lock.lock-owner-instead.patch (renamed from debian/patches-rt/fs-namespace-Boost-the-mount_lock.lock-owner-instead.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0059-fscache-Use-only-one-fscache_object_cong_wait.patch (renamed from debian/patches-rt/fscache-Use-only-one-fscache_object_cong_wait.patch) | 28 | ||||
-rw-r--r-- | debian/patches-rt/0060-sched-Clean-up-the-might_sleep-underscore-zoo.patch (renamed from debian/patches-rt/0001_sched_clean_up_the_might_sleep_underscore_zoo.patch) | 38 | ||||
-rw-r--r-- | debian/patches-rt/0061-sched-Make-cond_resched_-lock-variants-consistent-vs.patch (renamed from debian/patches-rt/0002_sched_make_cond_resched__lock_variants_consistent_vs_might_sleep.patch) | 15 | ||||
-rw-r--r-- | debian/patches-rt/0062-sched-Remove-preempt_offset-argument-from-__might_sl.patch (renamed from debian/patches-rt/0003_sched_remove_preempt_offset_argument_from___might_sleep.patch) | 33 | ||||
-rw-r--r-- | debian/patches-rt/0063-sched-Cleanup-might_sleep-printks.patch (renamed from debian/patches-rt/0004_sched_cleanup_might_sleep_printks.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0064-sched-Make-might_sleep-output-less-confusing.patch (renamed from debian/patches-rt/0005_sched_make_might_sleep_output_less_confusing.patch) | 18 | ||||
-rw-r--r-- | debian/patches-rt/0065-sched-Make-RCU-nest-depth-distinct-in-__might_resche.patch (renamed from debian/patches-rt/0006_sched_make_rcu_nest_depth_distinct_in___might_resched.patch) | 35 | ||||
-rw-r--r-- | debian/patches-rt/0066-sched-Make-cond_resched_lock-variants-RT-aware.patch (renamed from debian/patches-rt/0007_sched_make_cond_resched_lock_variants_rt_aware.patch) | 18 | ||||
-rw-r--r-- | debian/patches-rt/0067-locking-rt-Take-RCU-nesting-into-account-for-__might.patch (renamed from debian/patches-rt/0008_locking_rt_take_rcu_nesting_into_account_for___might_resched.patch) | 15 | ||||
-rw-r--r-- | debian/patches-rt/0068-sched-Limit-the-number-of-task-migrations-per-batch-.patch (renamed from debian/patches-rt/0001_sched_limit_the_number_of_task_migrations_per_batch_on_rt.patch) | 17 | ||||
-rw-r--r-- | debian/patches-rt/0069-sched-Disable-TTWU_QUEUE-on-RT.patch (renamed from debian/patches-rt/0002_sched_disable_ttwu_queue_on_rt.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0070-sched-Move-kprobes-cleanup-out-of-finish_task_switch.patch (renamed from debian/patches-rt/0003_sched_move_kprobes_cleanup_out_of_finish_task_switch.patch) | 25 | ||||
-rw-r--r-- | debian/patches-rt/0071-sched-Delay-task-stack-freeing-on-RT.patch (renamed from debian/patches-rt/0004_sched_delay_task_stack_freeing_on_rt.patch) | 26 | ||||
-rw-r--r-- | debian/patches-rt/0072-sched-Move-mmdrop-to-RCU-on-RT.patch (renamed from debian/patches-rt/0005_sched_move_mmdrop_to_rcu_on_rt.patch) | 30 | ||||
-rw-r--r-- | debian/patches-rt/0073-cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch (renamed from debian/patches-rt/cgroup__use_irqsave_in_cgroup_rstat_flush_locked.patch) | 24 | ||||
-rw-r--r-- | debian/patches-rt/0074-mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch (renamed from debian/patches-rt/mm__workingset__replace_IRQ-off_check_with_a_lockdep_assert..patch) | 21 | ||||
-rw-r--r-- | debian/patches-rt/0075-tcp-Remove-superfluous-BH-disable-around-listening_h.patch (renamed from debian/patches-rt/tcp__Remove_superfluous_BH-disable_around_listening_hash.patch) | 27 | ||||
-rw-r--r-- | debian/patches-rt/0076-jump-label-disable-if-stop_machine-is-used.patch (renamed from debian/patches-rt/jump-label__disable_if_stop_machine_is_used.patch) | 20 | ||||
-rw-r--r-- | debian/patches-rt/0077-locking-Remove-rt_rwlock_is_contended.patch (renamed from debian/patches-rt/locking-Remove-rt_rwlock_is_contended.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0078-lockdep-selftests-Avoid-using-local_lock_-acquire-re.patch (renamed from debian/patches-rt/lockdep-selftests-Avoid-using-local_lock_-acquire-re.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0079-sched-Trigger-warning-if-migration_disabled-counter-.patch (renamed from debian/patches-rt/0001-sched-Trigger-warning-if-migration_disabled-counter-.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0080-rtmutex-Add-a-special-case-for-ww-mutex-handling.patch (renamed from debian/patches-rt/0003-rtmutex-Add-a-special-case-for-ww-mutex-handling.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0081-rtmutex-Add-rt_mutex_lock_nest_lock-and-rt_mutex_loc.patch (renamed from debian/patches-rt/0004-rtmutex-Add-rt_mutex_lock_nest_lock-and-rt_mutex_loc.patch) | 25 | ||||
-rw-r--r-- | debian/patches-rt/0082-lockdep-Make-it-RT-aware.patch (renamed from debian/patches-rt/0005-lockdep-Make-it-RT-aware.patch) | 20 | ||||
-rw-r--r-- | debian/patches-rt/0083-lockdep-selftests-Add-rtmutex-to-the-last-column.patch (renamed from debian/patches-rt/0006-lockdep-selftests-Add-rtmutex-to-the-last-column.patch) | 12 | ||||
-rw-r--r-- | debian/patches-rt/0084-lockdep-selftests-Unbalanced-migrate_disable-rcu_rea.patch (renamed from debian/patches-rt/0007-lockdep-selftests-Unbalanced-migrate_disable-rcu_rea.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0085-lockdep-selftests-Skip-the-softirq-related-tests-on-.patch (renamed from debian/patches-rt/0008-lockdep-selftests-Skip-the-softirq-related-tests-on-.patch) | 44 | ||||
-rw-r--r-- | debian/patches-rt/0086-lockdep-selftests-Adapt-ww-tests-for-PREEMPT_RT.patch (renamed from debian/patches-rt/0010-lockdep-selftests-Adapt-ww-tests-for-PREEMPT_RT.patch) | 36 | ||||
-rw-r--r-- | debian/patches-rt/0087-locking-Allow-to-include-asm-spinlock_types.h-from-l.patch (renamed from debian/patches-rt/locking-Allow-to-include-asm-spinlock_types.h-from-l.patch) | 64 | ||||
-rw-r--r-- | debian/patches-rt/0088-sched-Make-preempt_enable_no_resched-behave-like-pre.patch (renamed from debian/patches-rt/sched-Make-preempt_enable_no_resched-behave-like-pre.patch) | 12 | ||||
-rw-r--r-- | debian/patches-rt/0089-kernel-sched-add-put-get-_cpu_light.patch (renamed from debian/patches-rt/kernel_sched__add_putget_cpu_light.patch) | 20 | ||||
-rw-r--r-- | debian/patches-rt/0090-block-mq-do-not-invoke-preempt_disable.patch (renamed from debian/patches-rt/block_mq__do_not_invoke_preempt_disable.patch) | 22 | ||||
-rw-r--r-- | debian/patches-rt/0091-md-raid5-Make-raid5_percpu-handling-RT-aware.patch (renamed from debian/patches-rt/md__raid5__Make_raid5_percpu_handling_RT_aware.patch) | 31 | ||||
-rw-r--r-- | debian/patches-rt/0092-scsi-fcoe-Make-RT-aware.patch (renamed from debian/patches-rt/scsi_fcoe__Make_RT_aware..patch) | 42 | ||||
-rw-r--r-- | debian/patches-rt/0093-mm-vmalloc-Another-preempt-disable-region-which-suck.patch (renamed from debian/patches-rt/mm_vmalloc__Another_preempt_disable_region_which_sucks.patch) | 25 | ||||
-rw-r--r-- | debian/patches-rt/0094-net-Remove-preemption-disabling-in-netif_rx.patch (renamed from debian/patches-rt/net__Remove_preemption_disabling_in_netif_rx.patch) | 24 | ||||
-rw-r--r-- | debian/patches-rt/0095-sunrpc-Make-svc_xprt_do_enqueue-use-get_cpu_light.patch (renamed from debian/patches-rt/sunrpc__Make_svc_xprt_do_enqueue_use_get_cpu_light.patch) | 25 | ||||
-rw-r--r-- | debian/patches-rt/0096-crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch (renamed from debian/patches-rt/crypto__cryptd_-_add_a_lock_instead_preempt_disable_local_bh_disable.patch) | 31 | ||||
-rw-r--r-- | debian/patches-rt/0097-softirq-Check-preemption-after-reenabling-interrupts.patch (renamed from debian/patches-rt/softirq__Check_preemption_after_reenabling_interrupts.patch) | 37 | ||||
-rw-r--r-- | debian/patches-rt/0098-u64_stats-Disable-preemption-on-32bit-UP-SMP-with-RT.patch (renamed from debian/patches-rt/u64_stats__Disable_preemption_on_32bit-UP_SMP_with_RT_during_updates.patch) | 37 | ||||
-rw-r--r-- | debian/patches-rt/0099-mm-memcontrol-Disable-on-PREEMPT_RT.patch (renamed from debian/patches-rt/mm-memcontro--Disable-on-PREEMPT_RT.patch) | 12 | ||||
-rw-r--r-- | debian/patches-rt/0100-signal-Revert-ptrace-preempt-magic.patch (renamed from debian/patches-rt/signal__Revert_ptrace_preempt_magic.patch) | 22 | ||||
-rw-r--r-- | debian/patches-rt/0101-ptrace-fix-ptrace-vs-tasklist_lock-race.patch (renamed from debian/patches-rt/ptrace__fix_ptrace_vs_tasklist_lock_race.patch) | 40 | ||||
-rw-r--r-- | debian/patches-rt/0102-fs-dcache-use-swait_queue-instead-of-waitqueue.patch (renamed from debian/patches-rt/fs_dcache__use_swait_queue_instead_of_waitqueue.patch) | 94 | ||||
-rw-r--r-- | debian/patches-rt/0103-fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch (renamed from debian/patches-rt/fs_dcache__disable_preemption_on_i_dir_seqs_write_side.patch) | 21 | ||||
-rw-r--r-- | debian/patches-rt/0104-rcu-Delay-RCU-selftests.patch (renamed from debian/patches-rt/rcu__Delay_RCU-selftests.patch) | 36 | ||||
-rw-r--r-- | debian/patches-rt/0105-net-core-use-local_bh_disable-in-netif_rx_ni.patch (renamed from debian/patches-rt/net_core__use_local_bh_disable_in_netif_rx_ni.patch) | 22 | ||||
-rw-r--r-- | debian/patches-rt/0106-net-Use-skbufhead-with-raw-lock.patch (renamed from debian/patches-rt/net__Use_skbufhead_with_raw_lock.patch) | 30 | ||||
-rw-r--r-- | debian/patches-rt/0107-net-Dequeue-in-dev_cpu_dead-without-the-lock.patch (renamed from debian/patches-rt/net__Dequeue_in_dev_cpu_dead_without_the_lock.patch) | 22 | ||||
-rw-r--r-- | debian/patches-rt/0108-net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch (renamed from debian/patches-rt/net__dev__always_take_qdiscs_busylock_in___dev_xmit_skb.patch) | 23 | ||||
-rw-r--r-- | debian/patches-rt/0109-panic-skip-get_random_bytes-for-RT_FULL-in-init_oops.patch (renamed from debian/patches-rt/panic__skip_get_random_bytes_for_RT_FULL_in_init_oops_id.patch) | 21 | ||||
-rw-r--r-- | debian/patches-rt/0110-x86-stackprotector-Avoid-random-pool-on-rt.patch (renamed from debian/patches-rt/x86__stackprotector__Avoid_random_pool_on_rt.patch) | 23 | ||||
-rw-r--r-- | debian/patches-rt/0111-random-Make-it-work-on-rt.patch (renamed from debian/patches-rt/random__Make_it_work_on_rt.patch) | 55 | ||||
-rw-r--r-- | debian/patches-rt/0112-drm-i915-Don-t-disable-interrupts-and-pretend-a-lock.patch (renamed from debian/patches-rt/0002-drm-i915-Don-t-disable-interrupts-and-pretend-a-lock.patch) | 36 | ||||
-rw-r--r-- | debian/patches-rt/0113-drm-i915-Use-preempt_disable-enable_rt-where-recomme.patch (renamed from debian/patches-rt/0003-drm-i915-Use-preempt_disable-enable_rt-where-recomme.patch) | 16 | ||||
-rw-r--r-- | debian/patches-rt/0114-drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch (renamed from debian/patches-rt/0004-drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch) | 22 | ||||
-rw-r--r-- | debian/patches-rt/0115-drm-i915-Don-t-check-for-atomic-context-on-PREEMPT_R.patch (renamed from debian/patches-rt/0005-drm-i915-Don-t-check-for-atomic-context-on-PREEMPT_R.patch) | 15 | ||||
-rw-r--r-- | debian/patches-rt/0116-drm-i915-Disable-tracing-points-on-PREEMPT_RT.patch (renamed from debian/patches-rt/0006-drm-i915-Disable-tracing-points-on-PREEMPT_RT.patch) | 12 | ||||
-rw-r--r-- | debian/patches-rt/0117-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch (renamed from debian/patches-rt/0007-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0118-drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch (renamed from debian/patches-rt/0008-drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0119-drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch (renamed from debian/patches-rt/0009-drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch) | 24 | ||||
-rw-r--r-- | debian/patches-rt/0120-drm-i915-Drop-the-irqs_disabled-check.patch (renamed from debian/patches-rt/0010-drm-i915-Drop-the-irqs_disabled-check.patch) | 16 | ||||
-rw-r--r-- | debian/patches-rt/0121-signal-x86-Delay-calling-signals-in-atomic.patch (renamed from debian/patches-rt/signal_x86__Delay_calling_signals_in_atomic.patch) | 36 | ||||
-rw-r--r-- | debian/patches-rt/0122-x86-kvm-Require-const-tsc-for-RT.patch (renamed from debian/patches-rt/x86__kvm_Require_const_tsc_for_RT.patch) | 22 | ||||
-rw-r--r-- | debian/patches-rt/0123-x86-Allow-to-enable-RT.patch (renamed from debian/patches-rt/x86__Allow_to_enable_RT.patch) | 20 | ||||
-rw-r--r-- | debian/patches-rt/0124-x86-Enable-RT-also-on-32bit.patch (renamed from debian/patches-rt/x86__Enable_RT_also_on_32bit.patch) | 20 | ||||
-rw-r--r-- | debian/patches-rt/0125-genirq-update-irq_set_irqchip_state-documentation.patch (renamed from debian/patches-rt/genirq__update_irq_set_irqchip_state_documentation.patch) | 20 | ||||
-rw-r--r-- | debian/patches-rt/0126-ASoC-mediatek-mt8195-Remove-unsued-irqs_lock.patch (renamed from debian/patches-rt/ASoC-mediatek-mt8195-Remove-unsued-irqs_lock.patch) | 14 | ||||
-rw-r--r-- | debian/patches-rt/0127-smack-Guard-smack_ipv6_lock-definition-within-a-SMAC.patch (renamed from debian/patches-rt/smack-Guard-smack_ipv6_lock-definition-within-a-SMAC.patch) | 18 | ||||
-rw-r--r-- | debian/patches-rt/0128-virt-acrn-Remove-unsued-acrn_irqfds_mutex.patch (renamed from debian/patches-rt/virt-acrn-Remove-unsued-acrn_irqfds_mutex.patch) | 12 | ||||
-rw-r--r-- | debian/patches-rt/0129-tpm_tis-fix-stall-after-iowrite-s.patch (renamed from debian/patches-rt/tpm_tis__fix_stall_after_iowrites.patch) | 26 | ||||
-rw-r--r-- | debian/patches-rt/0130-mm-zsmalloc-Replace-bit-spinlock-and-get_cpu_var-usa.patch (renamed from debian/patches-rt/mm-zsmalloc-Replace-bit-spinlock-and-get_cpu_var-usa.patch) | 31 | ||||
-rw-r--r-- | debian/patches-rt/0131-drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch (renamed from debian/patches-rt/drivers_block_zram__Replace_bit_spinlocks_with_rtmutex_for_-rt.patch) | 31 | ||||
-rw-r--r-- | debian/patches-rt/0132-leds-trigger-Disable-CPU-trigger-on-PREEMPT_RT.patch (renamed from debian/patches-rt/leds-trigger-Disable-CPU-trigger-on-PREEMPT_RT.patch) | 12 | ||||
-rw-r--r-- | debian/patches-rt/0133-generic-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch (renamed from debian/patches-rt/generic-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch) | 12 | ||||
-rw-r--r-- | debian/patches-rt/0134-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch (renamed from debian/patches-rt/softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch) | 28 | ||||
-rw-r--r-- | debian/patches-rt/0135-sched-Add-support-for-lazy-preemption.patch (renamed from debian/patches-rt/sched__Add_support_for_lazy_preemption.patch) | 116 | ||||
-rw-r--r-- | debian/patches-rt/0136-x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch (renamed from debian/patches-rt/x86_entry__Use_should_resched_in_idtentry_exit_cond_resched.patch) | 21 | ||||
-rw-r--r-- | debian/patches-rt/0137-x86-Support-for-lazy-preemption.patch (renamed from debian/patches-rt/x86__Support_for_lazy_preemption.patch) | 40 | ||||
-rw-r--r-- | debian/patches-rt/0138-entry-Fix-the-preempt-lazy-fallout.patch (renamed from debian/patches-rt/entry--Fix-the-preempt-lazy-fallout.patch) | 16 | ||||
-rw-r--r-- | debian/patches-rt/0139-arm-Add-support-for-lazy-preemption.patch (renamed from debian/patches-rt/arm__Add_support_for_lazy_preemption.patch) | 44 | ||||
-rw-r--r-- | debian/patches-rt/0140-powerpc-Add-support-for-lazy-preemption.patch (renamed from debian/patches-rt/powerpc__Add_support_for_lazy_preemption.patch) | 32 | ||||
-rw-r--r-- | debian/patches-rt/0141-arch-arm64-Add-lazy-preempt-support.patch (renamed from debian/patches-rt/arch_arm64__Add_lazy_preempt_support.patch) | 46 | ||||
-rw-r--r-- | debian/patches-rt/0142-ARM-enable-irq-in-translation-section-permission-fau.patch (renamed from debian/patches-rt/ARM__enable_irq_in_translation_section_permission_fault_handlers.patch) | 30 | ||||
-rw-r--r-- | debian/patches-rt/0143-KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch (renamed from debian/patches-rt/KVM__arm_arm64__downgrade_preempt_disabled_region_to_migrate_disable.patch) | 27 | ||||
-rw-r--r-- | debian/patches-rt/0144-arm64-sve-Delay-freeing-memory-in-fpsimd_flush_threa.patch (renamed from debian/patches-rt/arm64-sve-Delay-freeing-memory-in-fpsimd_flush_threa.patch) | 15 | ||||
-rw-r--r-- | debian/patches-rt/0145-arm64-sve-Make-kernel-FPU-protection-RT-friendly.patch (renamed from debian/patches-rt/arm64-sve-Make-kernel-FPU-protection-RT-friendly.patch) | 16 | ||||
-rw-r--r-- | debian/patches-rt/0146-arm64-signal-Use-ARCH_RT_DELAYS_SIGNAL_SEND.patch (renamed from debian/patches-rt/arm64-signal-Use-ARCH_RT_DELAYS_SIGNAL_SEND.patch) | 20 | ||||
-rw-r--r-- | debian/patches-rt/0147-tty-serial-omap-Make-the-locking-RT-aware.patch (renamed from debian/patches-rt/tty_serial_omap__Make_the_locking_RT_aware.patch) | 24 | ||||
-rw-r--r-- | debian/patches-rt/0148-tty-serial-pl011-Make-the-locking-work-on-RT.patch (renamed from debian/patches-rt/tty_serial_pl011__Make_the_locking_work_on_RT.patch) | 24 | ||||
-rw-r--r-- | debian/patches-rt/0149-ARM-Allow-to-enable-RT.patch (renamed from debian/patches-rt/ARM__Allow_to_enable_RT.patch) | 20 | ||||
-rw-r--r-- | debian/patches-rt/0150-ARM64-Allow-to-enable-RT.patch (renamed from debian/patches-rt/ARM64__Allow_to_enable_RT.patch) | 20 | ||||
-rw-r--r-- | debian/patches-rt/0151-powerpc-traps-Use-PREEMPT_RT.patch (renamed from debian/patches-rt/powerpc__traps__Use_PREEMPT_RT.patch) | 20 | ||||
-rw-r--r-- | debian/patches-rt/0152-powerpc-pseries-iommu-Use-a-locallock-instead-local_.patch (renamed from debian/patches-rt/powerpc_pseries_iommu__Use_a_locallock_instead_local_irq_save.patch) | 33 | ||||
-rw-r--r-- | debian/patches-rt/0153-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch (renamed from debian/patches-rt/powerpc_kvm__Disable_in-kernel_MPIC_emulation_for_PREEMPT_RT.patch) | 21 | ||||
-rw-r--r-- | debian/patches-rt/0154-powerpc-stackprotector-work-around-stack-guard-init-.patch (renamed from debian/patches-rt/powerpc_stackprotector__work_around_stack-guard_init_from_atomic.patch) | 23 | ||||
-rw-r--r-- | debian/patches-rt/0155-POWERPC-Allow-to-enable-RT.patch (renamed from debian/patches-rt/POWERPC__Allow_to_enable_RT.patch) | 20 | ||||
-rw-r--r-- | debian/patches-rt/0156-sysfs-Add-sys-kernel-realtime-entry.patch (renamed from debian/patches-rt/sysfs__Add__sys_kernel_realtime_entry.patch) | 28 | ||||
-rw-r--r-- | debian/patches-rt/0157-Add-localversion-for-RT-release.patch | 22 | ||||
-rw-r--r-- | debian/patches-rt/0158-Linux-5.15.10-rt24-REBASE.patch | 21 | ||||
-rw-r--r-- | debian/patches-rt/Add_localversion_for_-RT_release.patch | 19 | ||||
-rw-r--r-- | debian/patches-rt/series | 429 | ||||
-rw-r--r-- | debian/patches/bugfix/all/USB-gadget-detect-too-big-endpoint-0-requests.patch | 112 | ||||
-rw-r--r-- | debian/patches/bugfix/all/USB-gadget-zero-allocate-endpoint-0-buffers.patch | 49 | ||||
-rw-r--r-- | debian/patches/bugfix/all/atlantic-Fix-OOB-read-and-write-in-hw_atl_utils_fw_r.patch | 91 | ||||
-rw-r--r-- | debian/patches/bugfix/all/bpf-fix-kernel-address-leakage-in-atomic-cmpxchg-s-r0-aux-reg.patch | 59 | ||||
-rw-r--r-- | debian/patches/bugfix/all/bpf-fix-kernel-address-leakage-in-atomic-fetch.patch | 69 | ||||
-rw-r--r-- | debian/patches/bugfix/all/bpf-fix-signed-bounds-propagation-after-mov32.patch | 97 | ||||
-rw-r--r-- | debian/patches/bugfix/all/bpf-make-32-64-bounds-propagation-slightly-more-robust.patch | 62 | ||||
-rw-r--r-- | debian/patches/bugfix/all/drm-vmwgfx-Fix-stale-file-descriptors-on-failed-user.patch | 166 | ||||
-rw-r--r-- | debian/patches/bugfix/all/fget-check-that-the-fd-still-exists-after-getting-a-.patch | 67 | ||||
-rw-r--r-- | debian/patches/bugfix/all/fuse-release-pipe-buf-after-last-use.patch | 51 | ||||
-rw-r--r-- | debian/patches/bugfix/all/nfsd-fix-use-after-free-due-to-delegation-race.patch | 67 | ||||
-rw-r--r-- | debian/patches/bugfix/all/radeon-amdgpu-firmware-is-required-for-drm-and-kms-on-r600-onward.patch | 28 | ||||
-rw-r--r-- | debian/patches/bugfix/all/ucount-Make-get_ucount-a-safe-get_user-replacement.patch | 58 | ||||
-rw-r--r-- | debian/patches/bugfix/all/vfs-fs_context-fix-up-param-length-parsing-in-legacy.patch | 39 | ||||
-rw-r--r-- | debian/patches/bugfix/x86/Revert-drm-i915-Implement-Wa_1508744258.patch | 53 | ||||
-rw-r--r-- | debian/patches/bugfix/x86/drm-i915-Flush-TLBs-before-releasing-backing-store.patch | 350 | ||||
-rw-r--r-- | debian/patches/bugfix/x86/mwifiex-Fix-skb_over_panic-in-mwifiex_usb_recv.patch | 67 | ||||
-rw-r--r-- | debian/patches/debian/export-symbols-needed-by-android-drivers.patch | 12 | ||||
-rw-r--r-- | debian/patches/series | 16 | ||||
-rw-r--r-- | debian/templates/control.source.in | 4 | ||||
-rw-r--r-- | debian/templates/control.tools-versioned.in | 2 | ||||
-rw-r--r-- | debian/upstream/rt-signing-key.pgp | bin | 81427 -> 84522 bytes |
186 files changed, 4879 insertions, 2836 deletions
diff --git a/debian/changelog b/debian/changelog index f8e661423..4fdceceaf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,1032 @@ +linux (5.15.15-2~bpo11+1) bullseye-backports; urgency=medium + + * Rebuild for bullseye-backports: + - Change ABI number to 0.bpo.3 + + -- Ben Hutchings <benh@debian.org> Thu, 03 Feb 2022 18:47:14 +0100 + +linux (5.15.15-2) unstable; urgency=high + + [ Bastian Blank ] + * Build-depend on pahole after rename from dwarves. + + [ Salvatore Bonaccorso ] + * [x86] mwifiex: Fix skb_over_panic in mwifiex_usb_recv() (CVE-2021-43976) + * [x86] drm/i915: Flush TLBs before releasing backing store (CVE-2022-0330) + * drm/vmwgfx: Fix stale file descriptors on failed usercopy (CVE-2022-22942) + * ucount: Make get_ucount a safe get_user replacement (CVE-2022-24122) + + -- Salvatore Bonaccorso <carnil@debian.org> Sun, 30 Jan 2022 11:14:49 +0100 + +linux (5.15.15-1) unstable; urgency=high + + * New upstream stable update: + https://www.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.6 + - scsi: sd: Fix sd_do_mode_sense() buffer length handling + (Closes: #1001559) + - ACPI: Get acpi_device's parent from the parent field + - ACPI: CPPC: Add NULL pointer check to cppc_get_perf() + - USB: serial: pl2303: fix GC type detection + - USB: serial: option: add Telit LE910S1 0x9200 composition + - USB: serial: option: add Fibocom FM101-GL variants + - [arm*] usb: dwc2: gadget: Fix ISOC flow for elapsed frames + - [arm*] usb: dwc2: hcd_queue: Fix use of floating point literal + - [arm64,armhf] usb: dwc3: leave default DMA for PCI devices + - [arm64,armhf] usb: dwc3: core: Revise GHWPARAMS9 offset + - [arm64,armhf] usb: dwc3: gadget: Ignore NoStream after End Transfer + - [arm64,armhf] usb: dwc3: gadget: Check for L1/L2/U3 for Start Transfer + - [arm64,armhf] usb: dwc3: gadget: Fix null pointer exception + - net: usb: Correct PHY handling of smsc95xx + - net: nexthop: fix null pointer dereference when IPv6 is not enabled + - [arm64,armhf] usb: chipidea: ci_hdrc_imx: fix potential error pointer + dereference in probe + - [x86,arm64] usb: typec: fusb302: Fix masking of comparator and bc_lvl + interrupts + - [arm64,armhf] usb: xhci: tegra: Check padctrl interrupt presence in + device tree + - usb: hub: Fix usb enumeration issue due to address0 race + - usb: hub: Fix locking issues with address0_mutex + - binder: fix test regression due to sender_euid change + - ALSA: ctxfi: Fix out-of-range access + - [x86] ALSA: hda/realtek: Add quirk for ASRock NUC Box 1100 + - [x86] ALSA: hda/realtek: Fix LED on HP ProBook 435 G7 + - media: cec: copy sequence field for the reply + - [hppa] Revert "parisc: Fix backtrace to always include init funtion + names" (regression in 5.15.3) + - HID: wacom: Use "Confidence" flag to prevent reporting invalid contacts + - staging: rtl8192e: Fix use after free in _rtl92e_pci_disconnect() + - staging: r8188eu: Use kzalloc() with GFP_ATOMIC in atomic context + - staging: r8188eu: Fix breakage introduced when 5G code was removed + - staging: r8188eu: use GFP_ATOMIC under spinlock + - staging: r8188eu: fix a memory leak in rtw_wx_read32() + - xen: don't continue xenstore initialization in case of errors + - xen: detect uninitialized xenbus in xenbus_init + - io_uring: correct link-list traversal locking + - io_uring: fail cancellation for EXITING tasks + - io_uring: fix link traversal locking + - drm/amdgpu: IH process reset count when restart + - drm/amdgpu/pm: fix powerplay OD interface (regression in 5.15) + - drm/nouveau: recognise GA106 + - [powerpc*] KVM: PPC: Book3S HV: Prevent POWER7/8 TLB flush flushing SLB + - tracing/uprobe: Fix uprobe_perf_open probes iteration + - tracing: Fix pid filtering when triggers are attached + - [arm64,armhf] mmc: sdhci-esdhc-imx: disable CMDQ support + - mmc: sdhci: Fix ADMA for PAGE_SIZE >= 64KiB + - [armhf] mdio: aspeed: Fix "Link is Down" issue + - [arm64] mm: Fix VM_BUG_ON(mm != &init_mm) for trans_pgd + - [x86] cpufreq: intel_pstate: Fix active mode offline/online EPP handling + - [powerpc] Fix hardlockup on vmap stack overflow + - iomap: Fix inline extent handling in iomap_readpage + - NFSv42: Fix pagecache invalidation after COPY/CLONE + - [arm64] PCI: aardvark: Deduplicate code in advk_pcie_rd_conf() + - [arm64] PCI: aardvark: Implement re-issuing config requests on CRS + response + - [arm64] PCI: aardvark: Simplify initialization of rootcap on virtual + bridge + - [arm64] PCI: aardvark: Fix link training + - drm/amd/display: Fix OLED brightness control on eDP + - proc/vmcore: fix clearing user buffer by properly using clear_user() + - [x86] ASoC: SOF: Intel: hda: fix hotplug when only codec is suspended + - netfilter: ctnetlink: fix filtering with CTA_TUPLE_REPLY + - netfilter: ctnetlink: do not erase error code with EINVAL + - netfilter: ipvs: Fix reuse connection if RS weight is 0 + - netfilter: flowtable: fix IPv6 tunnel addr match + - media: v4l2-core: fix VIDIOC_DQEVENT handling on non-x86 + - [armhf] firmware: arm_scmi: Fix null de-reference on error path + - ASoC: topology: Add missing rwsem around snd_ctl_remove() calls + - net: ieee802154: handle iftypes as u32 + - [armhf] firmware: arm_scmi: Fix base agent discover response + - [armhf] firmware: arm_scmi: pm: Propagate return value to caller + - [armhf] ASoC: stm32: i2s: fix 32 bits channel length without mclk + - NFSv42: Don't fail clone() unless the OP_CLONE operation failed + - [armhf] socfpga: Fix crash with CONFIG_FORTIRY_SOURCE + - drm/nouveau/acr: fix a couple NULL vs IS_ERR() checks + - scsi: qla2xxx: edif: Fix off by one bug in qla_edif_app_getfcinfo() + - scsi: mpt3sas: Fix kernel panic during drive powercycle test + - scsi: mpt3sas: Fix system going into read-only mode + - scsi: mpt3sas: Fix incorrect system timestamp + - [arm*] drm/vc4: fix error code in vc4_create_object() + - [armhf] drm/aspeed: Fix vga_pw sysfs output + - HID: input: Fix parsing of HID_CP_CONSUMER_CONTROL fields + - HID: input: set usage type to key on keycode remap + - HID: magicmouse: prevent division by 0 on scroll + - iavf: Prevent changing static ITR values if adaptive moderation is on + - iavf: Fix refreshing iavf adapter stats on ethtool request + - iavf: Fix VLAN feature flags after VFR + - [x86] ALSA: intel-dsp-config: add quirk for JSL devices based on ES8336 + codec + - mptcp: fix delack timer + - mptcp: use delegate action to schedule 3rd ack retrans + - af_unix: fix regression in read after shutdown + - [arm64,armhf] firmware: smccc: Fix check for ARCH_SOC_ID not implemented + - ipv6: fix typos in __ip6_finish_output() + - nfp: checking parameter process for rx-usecs/tx-usecs is invalid + - net: stmmac: retain PTP clock time during SIOCSHWTSTAMP ioctls + - net: ipv6: add fib6_nh_release_dsts stub + - net: nexthop: release IPv6 per-cpu dsts when replacing a nexthop group + - ice: fix vsi->txq_map sizing + - ice: avoid bpf_prog refcount underflow + - scsi: core: sysfs: Fix setting device state to SDEV_RUNNING + - scsi: scsi_debug: Zero clear zones at reset write pointer + - erofs: fix deadlock when shrink erofs slab + - i2c: virtio: disable timeout handling + - net/smc: Ensure the active closing peer first closes clcsock + - [arm64,armhf] net: marvell: mvpp2: increase MTU limit when XDP enabled + - [x86] cpufreq: intel_pstate: Add Ice Lake server to out-of-band IDs + - nvmet-tcp: fix incomplete data digest send + - [x86] drm/hyperv: Fix device removal on Gen1 VMs + - [arm64] uaccess: avoid blocking within critical sections + - [armhf] net/ncsi : Add payload to be 32-bit aligned to fix dropped + packets + - PM: hibernate: use correct mode for swsusp_close() + - drm/amd/display: Fix DPIA outbox timeout after GPU reset + - drm/amd/display: Set plane update flags for all planes in reset + - tcp_cubic: fix spurious Hystart ACK train detections for not-cwnd-limited + flows + - lan743x: fix deadlock in lan743x_phy_link_status_change() + - net: phylink: Force link down and retrigger resolve on interface change + - net: phylink: Force retrigger in case of latched link-fail indicator + - net/smc: Fix NULL pointer dereferencing in smc_vlan_by_tcpsk() + - net/smc: Fix loop in smc_listen + - nvmet: use IOCB_NOWAIT only if the filesystem supports it + - igb: fix netpoll exit with traffic + - [mips*el/loongson-3] fix FTLB configuration + - tls: splice_read: fix record type check + - tls: splice_read: fix accessing pre-processed records + - tls: fix replacing proto_ops + - net: stmmac: Disable Tx queues when reconfiguring the interface + - net/sched: sch_ets: don't peek at classes beyond 'nbands' + - ethtool: ioctl: fix potential NULL deref in ethtool_set_coalesce() + - net: vlan: fix underflow for the real_dev refcnt + - net/smc: Don't call clcsock shutdown twice when smc shutdown + - [arm64] net: hns3: fix VF RSS failed problem after PF enable multi-TCs + - [arm64] net: hns3: fix incorrect components info of ethtool --reset + command + - locking/rwsem: Make handoff bit handling more consistent + - perf: Ignore sigtrap for tracepoints destined for other tasks + - sched/scs: Reset task stack state in bringup_cpu() + - [arm64] iommu/rockchip: Fix PAGE_DESC_HI_MASKs for RK3568 + - [x86] iommu/vt-d: Fix unmap_pages support + - f2fs: quota: fix potential deadlock + - f2fs: set SBI_NEED_FSCK flag when inconsistent node block found + - [riscv64] dts: microchip: fix board compatible + - [riscv64] dts: microchip: drop duplicated MMC/SDHC node + - cifs: nosharesock should not share socket with future sessions + - ceph: properly handle statfs on multifs setups + - [amd64] iommu/amd: Clarify AMD IOMMUv2 initialization messages + - vhost/vsock: fix incorrect used length reported to the guest + - tracing: Check pid filtering when creating events + - cifs: nosharesock should be set on new server + - io_uring: fix soft lockup when call __io_remove_buffers + - [armhf] firmware: arm_scmi: Fix type error assignment in voltage protocol + - [armhf] firmware: arm_scmi: Fix type error in sensor protocol + - blk-mq: cancel blk-mq dispatch work in both blk_cleanup_queue and + disk_release() + - block: avoid to quiesce queue in elevator_init_mq + - drm/amdgpu/gfx10: add wraparound gpu counter check for APUs as well + - drm/amdgpu/gfx9: switch to golden tsc registers for renoir+ + https://www.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.7 + - ALSA: usb-audio: Restrict rates for the shared clocks + - ALSA: usb-audio: Rename early_playback_start flag with lowlatency_playback + - ALSA: usb-audio: Disable low-latency playback for free-wheel mode + - ALSA: usb-audio: Disable low-latency mode for implicit feedback sync + - ALSA: usb-audio: Check available frames for the next packet size + - ALSA: usb-audio: Add spinlock to stop_urbs() + - ALSA: usb-audio: Improved lowlatency playback support + - ALSA: usb-audio: Avoid killing in-flight URBs during draining + - ALSA: usb-audio: Fix packet size calculation regression + - ALSA: usb-audio: Less restriction for low-latency playback mode + - ALSA: usb-audio: Switch back to non-latency mode at a later point + - ALSA: usb-audio: Don't start stream for capture at prepare + - gfs2: release iopen glock early in evict + - gfs2: Fix length of holes reported at end-of-file + - [powerpc*] pseries/ddw: Revert "Extend upper limit for huge DMA window + for persistent memory" + - [powerpc*] pseries/ddw: Do not try direct mapping with persistent memory + and one window + - mac80211: do not access the IV when it was stripped + - mac80211: fix throughput LED trigger + - [x86] hyperv: Move required MSRs check to initial platform probing + - net/smc: Transfer remaining wait queue entries during fallback + - net: return correct error code + - [x86] platform/x86: dell-wmi-descriptor: disable by default + - [x86] platform/x86: thinkpad_acpi: Add support for dual fan control + - [x86] platform/x86: thinkpad_acpi: Fix WWAN device disabled issue after + S3 deep + - btrfs: silence lockdep when reading chunk tree during mount + - btrfs: check-integrity: fix a warning on write caching disabled disk + - thermal: core: Reset previous low and high trip during thermal zone init + - scsi: iscsi: Unblock session then wake up error handler + - net: usb: r8152: Add MAC passthrough support for more Lenovo Docks + - drm/amd/pm: Remove artificial freq level on Navi1x + - drm/amd/amdkfd: Fix kernel panic when reset failed and been triggered + again + - drm/amd/amdgpu: fix potential memleak + - [x86] ata: ahci: Add Green Sardine vendor ID as board_ahci_mobile + - ata: libahci: Adjust behavior when StorageD3Enable _DSD is set + - [arm64] ethernet: hisilicon: hns: hns_dsaf_misc: fix a possible array + overflow in hns_dsaf_ge_srst_by_port() + - ipv6: check return value of ipv6_skip_exthdr + - [alpha] net: tulip: de4x5: fix the problem that the array 'lp->phy[8]' + may be out of bound + - [alpha] net: ethernet: dec: tulip: de4x5: fix possible array overflows in + type3_infoblock() + - perf sort: Fix the 'weight' sort key behavior + - perf sort: Fix the 'ins_lat' sort key behavior + - perf sort: Fix the 'p_stage_cyc' sort key behavior + - [arm*] perf inject: Fix ARM SPE handling + - perf hist: Fix memory leak of a perf_hpp_fmt + - perf report: Fix memory leaks around perf_tip() + - tracing: Don't use out-of-sync va_list in event printing + - net/smc: Avoid warning of possible recursive locking + - ACPI: Add stubs for wakeup handler functions + - net/tls: Fix authentication failure in CCM mode + - vrf: Reset IPCB/IP6CB when processing outbound pkts in vrf dev xmit + - kprobes: Limit max data_size of the kretprobe instances + - rt2x00: do not mark device gone on EPROTO errors during start + - ipmi: Move remove_work to dedicated workqueue + - cpufreq: Fix get_cpu_device() failure in add_cpu_dev_symlink() + - iwlwifi: mvm: retry init flow if failed + - [s390x] pci: move pseudo-MMIO to prevent MIO overlap + - scsi: lpfc: Fix non-recovery of remote ports following an unsolicited LOGO + - scsi: ufs: ufs-pci: Add support for Intel ADL + - ipv6: fix memory leak in fib6_rule_suppress + - drm/amd/display: Allow DSC on supported MST branch devices + - [x86] drm/i915/dp: Perform 30ms delay after source OUI write + - [x86] KVM: fix avic_set_running for preemptable kernels + - KVM: Disallow user memslot with size that exceeds "unsigned long" + - [x86] KVM: x86/mmu: Fix TLB flush range when handling disconnected pt + - KVM: Ensure local memslot copies operate on up-to-date arch-specific data + - [x86] KVM: x86: ignore APICv if LAPIC is not enabled + - [x86] KVM: nVMX: Emulate guest TLB flush on nested VM-Enter with new + vpid12 + - [x86] KVM: nVMX: Flush current VPID (L1 vs. L2) for + KVM_REQ_TLB_FLUSH_GUEST + - [x86] KVM: nVMX: Abide to KVM_REQ_TLB_FLUSH_GUEST request on nested + vmentry/vmexit + - [x86] KVM: VMX: prepare sync_pir_to_irr for running with APICv disabled + - [x86] KVM: x86: Use a stable condition around all VT-d PI paths + - [x86] KVM: MMU: shadow nested paging does not have PKU + - [arm64] KVM: arm64: Avoid setting the upper 32 bits of TCR_EL2 and + CPTR_EL2 to 1 + - [x86] KVM: X86: Use vcpu->arch.walk_mmu for kvm_mmu_invlpg() + - [x86] KVM: x86: check PIR even for vCPUs with disabled APICv + - tracing/histograms: String compares should not care about signed values + - [arm64,armhf] net: dsa: mv88e6xxx: Fix application of erratum 4.8 for + 88E6393X + - [arm64,armhf] net: dsa: mv88e6xxx: Drop unnecessary check in + mv88e6393x_serdes_erratum_4_6() + - [arm64,armhf] net: dsa: mv88e6xxx: Save power by disabling SerDes + trasmitter and receiver + - [arm64,armhf] net: dsa: mv88e6xxx: Add fix for erratum 5.2 of 88E6393X + family + - [arm64,armhf] net: dsa: mv88e6xxx: Fix inband AN for 2500base-x on + 88E6393X family + - [arm64,armhf] net: dsa: mv88e6xxx: Link in pcs_get_state() if AN is + bypassed + - wireguard: allowedips: add missing __rcu annotation to satisfy sparse + - wireguard: device: reset peer src endpoint when netns exits + - wireguard: receive: use ring buffer for incoming handshakes + - wireguard: receive: drop handshakes if queue lock is contended + - wireguard: ratelimiter: use kvcalloc() instead of kvzalloc() + - [armhf] i2c: stm32f7: flush TX FIFO upon transfer errors + - [armhf] i2c: stm32f7: recover the bus on access timeout + - [armhf] i2c: stm32f7: stop dma transfer in case of NACK + - tcp: fix page frag corruption on page fault + - net: qlogic: qlcnic: Fix a NULL pointer dereference in + qlcnic_83xx_add_rings() + - net: mpls: Fix notifications when deleting a device + - siphash: use _unaligned version by default + - [arm64] ftrace: add missing BTIs + - iwlwifi: fix warnings produced by kernel debug options + - net/mlx5e: IPsec: Fix Software parser inner l3 type setting in case of + encapsulation + - net/mlx4_en: Fix an use-after-free bug in mlx4_en_try_alloc_resources() + - [armhf] net: dsa: b53: Add SPI ID table (regression in 5.15) + - mt76: mt7915: fix NULL pointer dereference in mt7915_get_phy_mode + - [arm64,armhf] ASoC: tegra: Fix wrong value type in ADMAIF + - [arm64,armhf] ASoC: tegra: Fix wrong value type in I2S + - [arm64,armhf] ASoC: tegra: Fix wrong value type in DMIC + - [arm64,armhf] ASoC: tegra: Fix wrong value type in DSPK + - [arm64,armhf] ASoC: tegra: Fix kcontrol put callback in ADMAIF + - [arm64,armhf] ASoC: tegra: Fix kcontrol put callback in I2S + - [arm64,armhf] ASoC: tegra: Fix kcontrol put callback in DMIC + - [arm64,armhf] ASoC: tegra: Fix kcontrol put callback in DSPK + - [arm64,armhf] ASoC: tegra: Fix kcontrol put callback in AHUB + - rxrpc: Fix rxrpc_peer leak in rxrpc_look_up_bundle() + - rxrpc: Fix rxrpc_local leak in rxrpc_lookup_peer() + - [x86] ALSA: intel-dsp-config: add quirk for CML devices based on ES8336 + codec + - net: stmmac: Avoid DMA_CHAN_CONTROL write if no Split Header support + - net: usb: lan78xx: lan78xx_phy_init(): use PHY_POLL instead of "0" if no + IRQ is available + - [arm64,armhf] net: marvell: mvpp2: Fix the computation of shared CPUs + - [arm64] dpaa2-eth: destroy workqueue at the end of remove function + - net: annotate data-races on txq->xmit_lock_owner + - ipv4: convert fib_num_tclassid_users to atomic_t + - net/smc: fix wrong list_del in smc_lgr_cleanup_early + - net/rds: correct socket tunable error in rds_tcp_tune() + - net/smc: Keep smc_close_final rc during active close + - [arm64] drm/msm/a6xx: Allocate enough space for GMU registers + - [arm64] drm/msm: Do hw_init() before capturing GPU state + - [arm*] drm/vc4: kms: Wait for the commit before increasing our clock rate + - [arm*] drm/vc4: kms: Fix return code check + - [arm*] drm/vc4: kms: Add missing drm_crtc_commit_put + - [arm*] drm/vc4: kms: Clear the HVS FIFO commit pointer once done + - [arm*] drm/vc4: kms: Don't duplicate pending commit + - [arm*] drm/vc4: kms: Fix previous HVS commit wait + - atlantic: Increase delay for fw transactions + - atlatnic: enable Nbase-t speeds with base-t + - atlantic: Fix to display FW bundle version instead of FW mac version. + - atlantic: Add missing DIDs and fix 115c. + - atlantic: Remove Half duplex mode speed capabilities. + - atlantic: Fix statistics logic for production hardware + - atlantic: Remove warn trace message. + - [x86] KVM: x86/mmu: Skip tlb flush if it has been done in zap_gfn_range() + - [x86] KVM: x86/mmu: Pass parameter flush as false in + kvm_tdp_mmu_zap_collapsible_sptes() + - [arm64] drm/msm/devfreq: Fix OPP refcnt leak + - [arm64] drm/msm: Fix mmap to include VM_IO and VM_DONTDUMP + - [arm64] drm/msm: Fix wait_fence submitqueue leak + - [arm64] drm/msm: Restore error return on invalid fence + - iwlwifi: Fix memory leaks in error handling path + - [x86] KVM: X86: Fix when shadow_root_level=5 && guest root_level<4 + - [x86] KVM: SEV: initialize regions_list of a mirror VM + - net/mlx5e: Fix missing IPsec statistics on uplink representor + - net/mlx5: Move MODIFY_RQT command to ignore list in internal error state + - net/mlx5: E-switch, Respect BW share of the new group + - net/mlx5: E-Switch, fix single FDB creation on BlueField + - net/mlx5: E-Switch, Check group pointer before reading bw_share value + - [x86] KVM: x86/pmu: Fix reserved bits for AMD PerfEvtSeln register + - [x86] KVM: VMX: Set failure code in prepare_vmcs02() + - io-wq: don't retry task_work creation failure on fatal conditions + - [x86] sev: Fix SEV-ES INS/OUTS instructions for word, dword, and qword + - [x86] entry: Add a fence for kernel entry SWAPGS in paranoid_entry() + - [x86] entry: Use the correct fence macro after swapgs in kernel CR3 + - [x86] xen: Add xenpv_restore_regs_and_return_to_usermode() + - preempt/dynamic: Fix setup_preempt_mode() return value + - sched/uclamp: Fix rq->uclamp_max not set on first enqueue + - [x86] KVM: SEV: Return appropriate error codes if SEV-ES scratch setup + fails + - [x86] KVM: x86/mmu: Rename slot_handle_leaf to slot_handle_level_4k + - [x86] KVM: x86/mmu: Remove spurious TLB flushes in TDP MMU zap + collapsible path + - net/mlx5e: Rename lro_timeout to packet_merge_timeout + - net/mlx5e: Rename TIR lro functions to TIR packet merge functions + - net/mlx5e: Sync TIR params updates against concurrent create/modify + - [hppa] Fix KBUILD_IMAGE for self-extracting kernel + - [hppa] Fix "make install" on newer debian releases + - [hppa] Mark cr16 CPU clocksource unstable on all SMP machines + - vgacon: Propagate console boot parameters before calling `vc_resize' + - xhci: Fix commad ring abort, write all 64 bits to CRCR register. + - USB: NO_LPM quirk Lenovo Powered USB-C Travel Hub + - [x86,arm64] usb: typec: tcpm: Wait in SNK_DEBOUNCED until disconnect + - [x86] tsc: Add a timer to make sure TSC_adjust is always checked + - [x86] tsc: Disable clocksource watchdog for TSC on qualified platorms + - [amd64] mm: Map all kernel memory into trampoline_pgd + - [arm64] tty: serial: msm_serial: Deactivate RX DMA for polling support + - [arm*] serial: pl011: Add ACPI SBSA UART match id + - [arm64,armhf] serial: tegra: Change lower tolerance baud rate limit for + tegra20 and tegra30 + - serial: core: fix transmit-buffer reset and memleak + - serial: 8250_pci: Fix ACCES entries in pci_serial_quirks array + - serial: 8250_pci: rewrite pericom_do_set_divisor() + - serial: 8250: Fix RTS modem control while in rs485 mode + https://www.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.8 + - usb: gadget: uvc: fix multiple opens + - [x86] HID: quirks: Add quirk for the Microsoft Surface 3 type-cover + - HID: google: add eel USB id + - [x86] HID: intel-ish-hid: ipc: only enable IRQ wakeup when requested + - HID: bigbenff: prevent null pointer dereference + - HID: wacom: fix problems when device is not a valid USB device + - HID: check for valid USB device for many HID drivers + - mtd: dataflash: Add device-tree SPI IDs (regression in 5.15) + - mmc: spi: Add device-tree SPI IDs + - HID: sony: fix error path in probe + - [x86] HID: Ignore battery for Elan touchscreen on Asus UX550VE + - [x86] platform/x86/intel: hid: add quirk to support Surface Go 3 + - [x86] nft_set_pipapo: Fix bucket load in AVX2 lookup routine for six + 8-bit groups + - IB/hfi1: Insure use of smp_processor_id() is preempt disabled + - IB/hfi1: Fix early init panic + - IB/hfi1: Fix leak of rcvhdrtail_dummy_kvaddr + - can: kvaser_usb: get CAN clock frequency from device + - can: kvaser_pciefd: kvaser_pciefd_rx_error_frame(): increase correct + stats->{rx,tx}_errors counter + - can: sja1000: fix use after free in ems_pcmcia_add_card() + - [i386] can: pch_can: pch_can_rx_normal: fix use after free + - [arm64,armhf] net: dsa: mv88e6xxx: fix "don't use PHY_DETECT on internal + PHY's" + - [arm64,armhf] net: dsa: mv88e6xxx: allow use of PHYs on CPU and DSA ports + - [x86] sme: Explicitly map new EFI memmap table as encrypted + - [x86] platform/x86: amd-pmc: Fix s2idle failures on certain AMD laptops + - nfc: fix potential NULL pointer deref in nfc_genl_dump_ses_done + - vrf: don't run conntrack on vrf with !dflt qdisc + - bpf, sockmap: Attach map progs to psock early for feature probes + - bpf: Make sure bpf_disable_instrumentation() is safe vs preemption. + - bpf: Fix the off-by-two error in range markings + - ice: ignore dropped packets during init + - ethtool: do not perform operations on net devices being unregistered + - bonding: make tx_rebalance_counter an atomic + - nfp: Fix memory leak in nfp_cpp_area_cache_add() + - seg6: fix the iif in the IPv6 socket control block + - udp: using datalen to cap max gso segments + - netfilter: nft_exthdr: break evaluation if setting TCP option fails + - netfilter: conntrack: annotate data-races around ct->timeout + - iavf: restore MSI state on reset + - iavf: Fix reporting when setting descriptor count + - IB/hfi1: Correct guard on eager buffer deallocation + - devlink: fix netns refcount leak in devlink_nl_cmd_reload() + - [arm64,armhf] net: dsa: mv88e6xxx: error handling for serdes_power + functions + - [arm64] net: dsa: felix: Fix memory leak in felix_setup_mmio_filtering + - net/sched: fq_pie: prevent dismantle issue + - [arm64,armhf] net: mvpp2: fix XDP rx queues registering + - [x86] KVM: x86: Don't WARN if userspace mucks with RCX during string I/O + exit + - [x86] KVM: x86: Ignore sparse banks size for an "all CPUs", non-sparse + IPI req + - [x86] KVM: x86: Wait for IPIs to be delivered when handling Hyper-V TLB + flush hypercall + - timers: implement usleep_idle_range() + - mm/slub: fix endianness bug for alloc/free_traces attributes + - mm: bdi: initialize bdi_min_ratio when bdi is unregistered + - ALSA: ctl: Fix copy of updated id with element read/write + - [x86] ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 + platform + - [x86] ALSA: hda/realtek: Fix quirk for TongFang PHxTxX1 + - ALSA: pcm: oss: Fix negative period/buffer sizes + - ALSA: pcm: oss: Limit the period size to 16MB + - ALSA: pcm: oss: Handle missing errors in snd_pcm_oss_change_params*() + - cifs: Fix crash on unload of cifs_arc4.ko + - scsi: qla2xxx: Format log strings only if needed + - btrfs: clear extent buffer uptodate when we fail to write it + - btrfs: fix re-dirty process of tree-log nodes + - btrfs: replace the BUG_ON in btrfs_del_root_ref with proper error + handling + - btrfs: free exchange changeset on failures + - [x86] perf intel-pt: Fix some PGE (packet generation enable/control flow + packets) usage + - [x86] perf intel-pt: Fix sync state when a PSB (synchronization) packet + is found + - [x86] perf intel-pt: Fix intel_pt_fup_event() assumptions about setting + state type + - [x86] perf intel-pt: Fix state setting when receiving overflow (OVF) + packet + - [x86] perf intel-pt: Fix next 'err' value, walking trace + - [x86] perf intel-pt: Fix missing 'instruction' events with 'q' option + - [x86] perf intel-pt: Fix error timestamp setting on the decoder error + path + - md: fix update super 1.0 on rdev size change + - nfsd: Fix nsfd startup race (again) + - tracefs: Have new files inherit the ownership of their parent + - hwmon: (pwm-fan) Ensure the fan going on in .probe() + - [arm64] clk: qcom: regmap-mux: fix parent clock lookup + - [x86] thermal: int340x: Fix VCoRefLow MMIO bit offset for TGL + - drm/syncobj: Deal with signalled fences in drm_syncobj_find_fence. + - libata: add horkage for ASMedia 1092 + - io_uring: ensure task_work gets run as part of cancelations + - wait: add wake_up_pollfree() + - binder: use wake_up_pollfree() + - signalfd: use wake_up_pollfree() + - aio: keep poll requests on waitqueue until completed + - aio: fix use-after-free due to missing POLLFREE handling + - tracefs: Set all files to the same group ownership as the mount option + - [powerpc*] i2c: mpc: Use atomic read and fix break condition + - block: fix ioprio_get(IOPRIO_WHO_PGRP) vs setuid(2) + - scsi: pm80xx: Do not call scsi_remove_host() in pm8001_alloc() + - scsi: scsi_debug: Fix buffer size of REPORT ZONES command + - ALSA: usb-audio: Reorder snd_djm_devices[] entries + - qede: validate non LSO skb length + - PM: runtime: Fix pm_runtime_active() kerneldoc comment + - ASoC: rt5682: Fix crash due to out of scope stack vars + - [arm64] RDMA/hns: Do not halt commands during reset until later + - [arm64] RDMA/hns: Do not destroy QP resources in the hw resetting phase + - [x86] hwmon: (dell-smm) Fix warning on /proc/i8k creation error + - [arm64] clk: qcom: clk-alpha-pll: Don't reconfigure running Trion + - i40e: Fix failed opcode appearing if handling messages from VF + - i40e: Fix pre-set max number of queues for VF + - bpf, sockmap: Re-evaluate proto ops when psock is removed from sockmap + - i40e: Fix NULL pointer dereference in i40e_dbg_dump_desc + - [arm64] Revert "PCI: aardvark: Fix support for PCI_ROM_ADDRESS1 on + emulated bridge" (regression in 5.15.3) + - drm/amd/display: Fix DPIA outbox timeout after S3/S4/reset + - perf tools: Fix SMT detection fast read path + - net: cdc_ncm: Allow for dwNtbOutMaxSize to be unset or zero + - [arm64] net: fec: only clear interrupt of handling queue in + fec_enet_rx_queue() + - net, neigh: clear whole pneigh_entry at alloc time + - net/qla3xxx: fix an error code in ql_adapter_up() + - [arm64] Revert "usb: dwc3: dwc3-qcom: Enable tx-fifo-resize property by + default" (regression in 5.15) + - usb: core: config: fix validation of wMaxPacketValue entries + - xhci: Remove CONFIG_USB_DEFAULT_PERSIST to prevent xHCI from runtime + suspending + - xhci: avoid race between disable slot command and host runtime suspend + - iio: gyro: adxrs290: fix data signedness + - iio: trigger: Fix reference counting + - iio: stk3310: Don't return error code in interrupt handler + - iio: mma8452: Fix trigger reference couting + - iio: ltr501: Don't return error code in trigger handler + - iio: kxsd9: Don't return error code in trigger handler + - iio: itg3200: Call iio_trigger_notify_done() on error + - iio: adc: axp20x_adc: fix charging current reporting on AXP22x + - iio: ad7768-1: Call iio_trigger_notify_done() on error + - iio: accel: kxcjk-1013: Fix possible memory leak in probe and remove + - misc: rtsx: Avoid mangling IRQ during runtime PM + - nvmem: eeprom: at25: fix FRAM byte_len + - bus: mhi: pci_generic: Fix device recovery failed issue + - bus: mhi: core: Add support for forced PM resume + - [armhf] irqchip/aspeed-scu: Replace update_bits with write_bits. + - [armhf] irqchip/armada-370-xp: Fix return value of + armada_370_xp_msi_alloc() + - [armhf] irqchip/armada-370-xp: Fix support for Multi-MSI interrupts + - aio: Fix incorrect usage of eventfd_signal_allowed() + - [arm64,armhf] irqchip/irq-gic-v3-its.c: Force synchronisation when + issuing INVALL + - [armhf] clocksource/drivers/dw_apb_timer_of: Fix probe failure + https://www.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.9 + https://www.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.10 + - nfc: fix segfault in nfc_genl_dump_devices_done + - [x86] hwmon: (corsair-psu) fix plain integer used as NULL pointer + - RDMA: Fix use-after-free in rxe_queue_cleanup + - RDMA/mlx5: Fix releasing unallocated memory in dereg MR flow + - mtd: rawnand: Fix nand_erase_op delay + - mtd: rawnand: Fix nand_choose_best_timings() on unsupported interface + - netfs: Fix lockdep warning from taking sb_writers whilst holding + mmap_lock + - ice: fix FDIR init missing when reset VF + - [x86] vmxnet3: fix minimum vectors alloc issue + - [arm64] drm/msm: Fix null ptr access msm_ioctl_gem_submit() + - [arm64] drm/msm/a6xx: Fix uinitialized use of gpu_scid + - [arm64] drm/msm/dsi: set default num_data_lanes + - [arm64] drm/msm/dp: Avoid unpowered AUX xfers that caused crashes + - [arm64] KVM: arm64: Save PSTATE early on exit + - [arm64] Revert "tty: serial: fsl_lpuart: drop earlycon entry for + i.MX8QXP" + - net/mlx4_en: Update reported link modes for 1/10G + - loop: Use pr_warn_once() for loop_control_remove() warning + - ALSA: hda: Add Intel DG2 PCI ID and HDMI codec vid + - [x86] ALSA: hda/hdmi: fix HDA codec entry table order for ADL-P + - [arm64,armhf] i2c: rk3x: Handle a spurious start completion interrupt + flag + - net: netlink: af_netlink: Prevent empty skb by adding a check on len. + - drm/amdgpu: cancel the correct hrtimer on exit + - drm/amdgpu: check atomic flag to differeniate with legacy path + - drm/amd/display: Fix for the no Audio bug with Tiled Displays + - drm/amdkfd: fix double free mem structure + - drm/amd/display: add connector type check for CRC source set + - drm/amdkfd: process_info lock not needed for svm + - tracing: Fix a kmemleak false positive in tracing_map + - fuse: make sure reclaim doesn't write the inode + - perf inject: Fix itrace space allowed for new attributes + https://www.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.11 + - [x86] KVM: VMX: clear vmx_x86_ops.sync_pir_to_irr if APICv is disabled + - KVM: downgrade two BUG_ONs to WARN_ON_ONCE + - [x86] kvm: remove unused ack_notifier callbacks + - [x86] KVM: X86: Fix tlb flush for tdp in kvm_invalidate_pcid() + - mac80211: fix rate control for retransmitted frames + - mac80211: fix regression in SSN handling of addba tx + - mac80211: mark TX-during-stop for TX in in_reconfig + - mac80211: send ADDBA requests using the tid/queue of the aggregation + session + - mac80211: validate extended element ID is present + - [arm64] firmware: arm_scpi: Fix string overflow in SCPI genpd driver + - virtio_ring: Fix querying of maximum DMA mapping size for virtio device + - [s390x] entry: fix duplicate tracking of irq nesting level + - [s390x] recordmcount.pl: look for jgnop instruction as well as bcrl on + s390 + - [arm64] dts: ten64: remove redundant interrupt declaration for gpio-keys + - ceph: fix up non-directory creation in SGID directories + - dm btree remove: fix use after free in rebalance_children() + - audit: improve robustness of the audit queue handling + - btrfs: convert latest_bdev type to btrfs_device and rename + - btrfs: use latest_dev in btrfs_show_devname + - btrfs: update latest_dev when we create a sprout device + - btrfs: remove stale comment about the btrfs_show_devname + - scsi: ufs: core: Retry START_STOP on UNIT_ATTENTION + - [x86] drm/i915/hdmi: convert intel_hdmi_to_dev to intel_hdmi_to_i915 + - [x86] drm/i915/hdmi: Turn DP++ TMDS output buffers back on in encoder-> + shutdown() + - [x86] pinctrl: amd: Fix wakeups when IRQ is shared with SCI + - [arm64] dts: rockchip: remove mmc-hs400-enhanced-strobe from + rk3399-khadas-edge + - [arm64] dts: rockchip: fix rk3308-roc-cc vcc-sd supply + - [arm64] dts: rockchip: fix rk3399-leez-p710 vcc3v3-lan supply + - [arm64] dts: rockchip: fix audio-supply for Rock Pi 4 + - [arm64] dts: rockchip: fix poweroff on helios64 + - mac80211: track only QoS data frames for admission control + - ceph: fix duplicate increment of opened_inodes metric + - ceph: initialize pathlen variable in reconnect_caps_cb + - [armhf] socfpga: dts: fix qspi node compatible + - [arm64] dts: imx8mq: remove interconnect property from lcdif + - clk: Don't parent clks until the parent is fully registered + - [armhf] soc: imx: Register SoC device only on i.MX boards + - iwlwifi: mvm: don't crash on invalid rate w/o STA + - virtio/vsock: fix the transport to work with VMADDR_CID_ANY + - Revert "drm/fb-helper: improve DRM fbdev emulation device names" + - sch_cake: do not call cake_destroy() from cake_init() + - inet_diag: fix kernel-infoleak for UDP sockets + - netdevsim: don't overwrite read only ethtool parms + - [arm64] net: hns3: fix use-after-free bug in hclgevf_send_mbx_msg + - [arm64] net: hns3: fix race condition in debugfs + - net/sched: sch_ets: don't remove idle classes from the round-robin list + - [arm64,armhf] net: dsa: mv88e6xxx: Unforce speed & duplex in + mac_link_down() + - mptcp: never allow the PM to close a listener subflow + - drm/ast: potential dereference of null pointer + - [x86] drm/i915/display: Fix an unsigned subtraction which can never be + negative. + - mac80211: agg-tx: don't schedule_and_wake_txq() under sta->lock + - cfg80211: Acquire wiphy mutex on regulatory work + - mac80211: fix lookup when adding AddBA extension element + - net: stmmac: fix tc flower deletion for VLAN priority Rx steering + - flow_offload: return EOPNOTSUPP for the unsupported mpls action type + - rds: memory leak in __rds_conn_create() (CVE-2021-45480) + - ice: Use div64_u64 instead of div_u64 in adjfine + - ice: Don't put stale timestamps in the skb + - drm/amd/display: Set exit_optimized_pwr_state for DCN31 + - drm/amd/pm: fix a potential gpu_metrics_table memory leak + - mptcp: remove tcp ulp setsockopt support + - mptcp: clear 'kern' flag from fallback sockets + - mptcp: fix deadlock in __mptcp_push_pending() + - [arm64,armhf] soc/tegra: fuse: Fix bitwise vs. logical OR warning + - igb: Fix removal of unicast MAC filters of VFs + - igbvf: fix double free in `igbvf_probe` + - igc: Fix typo in i225 LTR functions + - ixgbe: Document how to enable NBASE-T support + - ixgbe: set X550 MDIO speed before talking to PHY + - netdevsim: Zero-initialize memory for new map's value in function + nsim_bpf_map_alloc (CVE-2021-4135) + - net/packet: rx_owner_map depends on pg_vec + - [arm64,armhf] net: stmmac: dwmac-rk: fix oob read in rk_gmac_setup + - sfc_ef100: potential dereference of null pointer + - [arm64,armhf] dsa: mv88e6xxx: fix debug print for SPEED_UNFORCED + - net: Fix double 0x prefix print in SKB dump + - net/smc: Prevent smc_release() from long blocking + - sit: do not call ipip6_dev_free() from sit_init_net() + - afs: Fix mmap + - [arm64] kexec: Fix missing error code 'ret' warning in + load_other_segments() + - bpf: Fix extable fixup offset. + - USB: gadget: bRequestType is a bitfield, not a enum + - Revert "usb: early: convert to readl_poll_timeout_atomic()" + - [x86] KVM: x86: Drop guest CPUID check for host initiated writes to + MSR_IA32_PERF_CAPABILITIES + - tty: n_hdlc: make n_hdlc_tty_wakeup() asynchronous + - USB: NO_LPM quirk Lenovo USB-C to Ethernet Adapher(RTL8153-04) + - [arm*] usb: dwc2: fix STM ID/VBUS detection startup delay in + dwc2_driver_probe + - PCI/MSI: Clear PCI_MSIX_FLAGS_MASKALL on error + - PCI/MSI: Mask MSI-X vectors only on success + - [x86] usb: xhci: Extend support for runtime power management for AMD's + Yellow carp. + - [x86,arm64] usb: typec: tcpm: fix tcpm unregister port but leave a + pending timer + - usb: gadget: u_ether: fix race in setting MAC address in setup phase + - USB: serial: cp210x: fix CP2105 GPIO registration + - USB: serial: option: add Telit FN990 compositions + - selinux: fix sleeping function called from invalid context + - btrfs: fix memory leak in __add_inode_ref() + - btrfs: fix double free of anon_dev after failure to create subvolume + - btrfs: check WRITE_ERR when trying to read an extent buffer + - btrfs: fix missing blkdev_put() call in btrfs_scan_one_device() + - zonefs: add MODULE_ALIAS_FS + - iocost: Fix divide-by-zero on donation from low hweight cgroup + - [x86] serial: 8250_fintek: Fix garbled text for console + - timekeeping: Really make sure wall_to_monotonic isn't positive + - cifs: sanitize multiple delimiters in prepath + - locking/rtmutex: Fix incorrect condition in rtmutex_spin_on_owner() + - [riscv64] dts: unleashed: Add gpio card detect to mmc-spi-slot + - [riscv64] dts: unmatched: Add gpio card detect to mmc-spi-slot + - perf inject: Fix segfault due to close without open + - perf inject: Fix segfault due to perf_data__fd() without open + - libata: if T_LENGTH is zero, dma direction should be DMA_NONE + - [powerpc*] powerpc/module_64: Fix livepatching for RO modules + - drm/amdgpu: correct register access for RLC_JUMP_TABLE_RESTORE + - drm/amdgpu: don't override default ECO_BITs setting + - drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC + - [armhf] dts: imx6ull-pinfunc: Fix CSI_DATA07__ESAI_TX0 pad name + - mptcp: add missing documented NL params + - [amd64] bpf, x64: Factor out emission of REX byte in more cases + - bpf: Fix extable address check. + - USB: core: Make do_proc_control() and do_proc_bulk() killable + - media: mxl111sf: change mutex_init() location + - ovl: fix warning in ovl_create_real() + - scsi: scsi_debug: Don't call kcalloc() if size arg is zero + - scsi: scsi_debug: Fix type in min_t to avoid stack OOB + - scsi: scsi_debug: Sanity check block descriptor length in + resp_mode_select() + - io-wq: remove spurious bit clear on task_work addition + - io-wq: check for wq exit after adding new worker task_work + - rcu: Mark accesses to rcu_state.n_force_qs + - io-wq: drop wqe lock before creating new worker + - [armhf] bus: ti-sysc: Fix variable set but not used warning for + reinit_modules + - xen/blkfront: harden blkfront against event channel storms + (CVE-2021-28711) + - xen/netfront: harden netfront against event channel storms + (CVE-2021-28712) + - xen/console: harden hvc_xen against event channel storms + (CVE-2021-28713) + - xen/netback: fix rx queue stall detection (CVE-2021-28714) + - xen/netback: don't queue unlimited number of packages (CVE-2021-28715) + https://www.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.12 + - net: usb: lan78xx: add Allied Telesis AT29M2-AF + - ext4: prevent partial update of the extent blocks + - ext4: check for out-of-order index extents in ext4_valid_extent_entries() + - ext4: check for inconsistent extents between index and leaf block + - HID: holtek: fix mouse probing + - HID: potential dereference of null pointer + - NFSD: Fix READDIR buffer overflow + - PM: sleep: Fix error handling in dpm_prepare() + - [arm64] dts: allwinner: orangepi-zero-plus: fix PHY mode + - [arm64,armhf] bus: sunxi-rsb: Fix shutdown + - spi: change clk_disable_unprepare to clk_unprepare + - ucounts: Fix rlimit max values check + - [arm64,armhf] ASoC: meson: aiu: fifo: Add missing + dma_coerce_mask_and_coherent() + - [arm64] RDMA/hns: Fix RNR retransmission issue for HIP08 + - IB/qib: Fix memory leak in qib_user_sdma_queue_pkts() + - [arm64] RDMA/hns: Replace kfree() with kvfree() + - netfilter: nf_tables: fix use-after-free in nft_set_catchall_destroy() + - netfilter: fix regression in looped (broad|multi)cast's MAC handling + - [armhf] dts: imx6qdl-wandboard: Fix Ethernet support + - ice: Use xdp_buf instead of rx_buf for xsk zero-copy + - ice: xsk: return xsk buffers back to pool when cleaning the ring + - qlcnic: potential dereference null pointer of rx_queue->page_ring + - tcp: move inet->rx_dst_ifindex to sk->sk_rx_dst_ifindex + - ipv6: move inet6_sk(sk)->rx_dst_cookie to sk->sk_rx_dst_cookie + - inet: fully convert sk->sk_rx_dst to RCU rules + - net: accept UFOv6 packages in virtio_net_hdr_to_skb + - net: skip virtio_net_hdr_set_proto if protocol already set + - igb: fix deadlock caused by taking RTNL in RPM resume path + - ipmi: Fix UAF when uninstall ipmi_si and ipmi_msghandler module + - bonding: fix ad_actor_system option setting to default + - [amd64] fjes: Check for error irq + - [armhf] drivers: net: smc911x: Check for error irq + - asix: fix uninit-value in asix_mdio_read() + - asix: fix wrong return value in asix_check_host_enable() + - io_uring: zero iocb->ki_pos for stream file types + - veth: ensure skb entering GRO are not cloned. + - net: stmmac: ptp: fix potentially overflowing expression + - net: bridge: Use array_size() helper in copy_to_user() + - net: bridge: fix ioctl old_deviceless bridge argument + - r8152: fix the force speed doesn't work for RTL8156 + - Input: elantech - fix stack out of bound access in + elantech_change_report_id() + - [arm*] pinctrl: bcm2835: Change init order for gpio hogs + - hwmon: (lm90) Fix usage of CONFIG2 register in detect function + - hwmon: (lm90) Prevent integer overflow/underflow in hysteresis + calculations + - hwmon: (lm90) Introduce flag indicating extended temperature support + - hwmon: (lm90) Add basic support for TI TMP461 + - hwmon: (lm90) Drop critical attribute support for MAX6654 + - kernel/crash_core: suppress unknown crashkernel parameter warning + - [x86] Revert "x86/boot: Pull up cmdline preparation and early param + parsing" + - [x86] boot: Move EFI range reservation after cmdline parsing + - ALSA: jack: Check the return value of kstrdup() + - ALSA: drivers: opl3: Fix incorrect use of vp->state + - ALSA: rawmidi - fix the uninitalized user_pversion + - [x86] ALSA: hda/hdmi: Disable silent stream on GLK + - [x86] ALSA: hda/realtek: Amp init fixup for HP ZBook 15 G6 + - [x86] ALSA: hda/realtek: Add new alc285-hp-amp-init model + - [x86] ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook + - [x86] ALSA: hda/realtek: Fix quirk for Clevo NJ51CU + - [arm64,armhf] ASoC: meson: aiu: Move AIU_I2S_MISC hold setting to + aiu-fifo-i2s + - [arm64,armhf] ASoC: tegra: Add DAPM switches for headphones and mic jack + - [armhf] ASoC: tegra: Restore headphones jack name on Nyan Big + - Input: atmel_mxt_ts - fix double free in mxt_read_info_block + - ipmi: bail out if init_srcu_struct fails + - ipmi: ssif: initialize ssif_info->client early + - ipmi: fix initialization when workqueue allocation fails + - [hppa] Correct completer in lws start + - [hppa] Fix mask used to select futex spinlock + - tee: handle lookup of shm with reference count 0 + - [x86] pkey: Fix undefined behaviour with PKRU_WD_BIT + - [amd64] platform/x86: amd-pmc: only use callbacks for suspend + - [x86] platform/x86: intel_pmc_core: fix memleak on registration failure + - [x86] KVM: x86: Always set kvm_run->if_flag + - [x86] KVM: x86/mmu: Don't advance iterator after restart due to yielding + - [x86] KVM: nVMX: Synthesize TRIPLE_FAULT for L2 if emulation is required + - [x86] KVM: VMX: Always clear vmx->fail on emulation_required + - [x86] KVM: VMX: Wake vCPU when delivering posted IRQ even if vCPU == this + vCPU + - [armhf] pinctrl: stm32: consider the GPIO offset to expose all the GPIO + lines + - [arm64,armhf] mmc: sdhci-tegra: Fix switch to HS400ES mode + - [armhf] mmc: meson-mx-sdhc: Set MANUAL_STOP for multi-block SDIO commands + - mmc: core: Disable card detect during shutdown + - [armhf] mmc: mmci: stm32: clear DLYB_CR after sending tuning command + - mac80211: fix locking in ieee80211_start_ap error path + - mm: mempolicy: fix THP allocations escaping mempolicy restrictions + - mm, hwpoison: fix condition in free hugetlb page path + - mm/hwpoison: clear MF_COUNT_INCREASED before retrying get_any_page() + - [arm64] tee: optee: Fix incorrect page free bug + - f2fs: fix to do sanity check on last xattr entry in __f2fs_setxattr() + (CVE-2021-45469) + - netfs: fix parameter of cleanup() + - [x86] KVM: VMX: Fix stale docs for kvm-intel.emulate_invalid_guest_state + - [arm64] dts: lx2160a: fix scl-gpios property name + - [arm64] Input: elants_i2c - do not check Remark ID on eKTH3900/eKTH5312 + - Input: goodix - add id->model mapping for the "9111" model + - [x86] ASoC: SOF: Intel: pci-tgl: add new ADL-P variant + - [x86] ASoC: SOF: Intel: pci-tgl: add ADL-N support + - ASoC: rt5682: fix the wrong jack type detected + - hwmom: (lm90) Fix citical alarm status for MAX6680/MAX6681 + - hwmon: (lm90) Do not report 'busy' status bit as alarm + - r8152: sync ocp base + - ax25: NPD bug when detaching AX25 device + - hamradio: defer ax25 kfree after unregister_netdev + - hamradio: improve the incomplete fix to avoid NPD + - tun: avoid double free in tun_free_netdev + - phonet/pep: refuse to enable an unbound pipe + https://www.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.13 + - Input: i8042 - add deferred probe support + - Input: i8042 - enable deferred probe quirk for ASUS UM325UA + - tomoyo: Check exceeded quota early in tomoyo_domain_quota_is_ok(). + - tomoyo: use hwight16() in tomoyo_domain_quota_is_ok() + - net/sched: Extend qdisc control block with tc control block + - [x86] platform/x86: apple-gmux: use resource_size() with res + - memblock: fix memblock_phys_alloc() section mismatch error + - ALSA: hda: intel-sdw-acpi: harden detection of controller + - ALSA: hda: intel-sdw-acpi: go through HDAS ACPI at max depth of 2 + - efi: Move efifb_setup_from_dmi() prototype from arch headers + - selinux: initialize proto variable in selinux_ip_postroute_compat() + - scsi: lpfc: Terminate string in lpfc_debugfs_nvmeio_trc_write() + - net/mlx5: DR, Fix NULL vs IS_ERR checking in dr_domain_init_resources + - net/mlx5: Fix error print in case of IRQ request failed + - net/mlx5: Fix SF health recovery flow + - net/mlx5: Fix tc max supported prio for nic mode + - net/mlx5e: Wrap the tx reporter dump callback to extract the sq + - net/mlx5e: Fix interoperability between XSK and ICOSQ recovery flow + - net/mlx5e: Fix ICOSQ recovery flow for XSK + - net/mlx5e: Use tc sample stubs instead of ifdefs in source file + - net/mlx5e: Delete forward rule for ct or sample action + - udp: using datalen to cap ipv6 udp max gso segments + - sctp: use call_rcu to free endpoint + - net/smc: fix using of uninitialized completions + - net: usb: pegasus: Do not drop long Ethernet frames + - net/smc: don't send CDC/LLC message if link not ready + - net/smc: fix kernel panic caused by race of smc_sock + - igc: Do not enable crosstimestamping for i225-V models + - igc: Fix TX timestamp support for non-MSI-X platforms + - drm/amd/display: Send s0i2_rdy in stream_count == 0 optimization + - drm/amd/display: Set optimize_pwr_state for DCN31 + - net/mlx5e: Fix wrong features assignment in case of error + - net: bridge: mcast: add and enforce query interval minimum + - net: bridge: mcast: add and enforce startup query interval minimum + - net: bridge: mcast: fix br_multicast_ctx_vlan_global_disabled helper + - [armhf] net/ncsi: check for error return from call to nla_put_u32 + - i2c: validate user data in compat ioctl + - nfc: uapi: use kernel size_t to fix user-space builds + - uapi: fix linux/nfc.h userspace compilation errors + - drm/nouveau: wait for the exclusive fence after the shared ones v2 + (Closes: #1000681) + - drm/amdgpu: When the VCN(1.0) block is suspended, powergating is + explicitly enabled + - drm/amdgpu: add support for IP discovery gc_info table v2 + - drm/amd/display: Changed pipe split policy to allow for multi-display pipe + split + - xhci: Fresco FL1100 controller should not have BROKEN_MSI quirk set. + - usb: gadget: f_fs: Clear ffs_eventfd in ffs_data_clear. + - [arm*] binder: fix async_free_space accounting for empty parcels + - [x86] scsi: vmw_pvscsi: Set residual data length conditionally + - Input: appletouch - initialize work before device registration + - Input: spaceball - fix parsing of movement data packets + - net: fix use-after-free in tw_timer_handler + - fs/mount_setattr: always cleanup mount_kattr + https://www.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.14 + - fscache_cookie_enabled: check cookie is valid before accessing it + - tracing: Fix check for trace_percpu_buffer validity in get_trace_buf() + - tracing: Tag trace_percpu_buffer as a percpu pointer + - Revert "RDMA/mlx5: Fix releasing unallocated memory in dereg MR flow" + - ieee802154: atusb: fix uninit value in atusb_set_extended_addr + - i40e: Fix to not show opcode msg on unsuccessful VF MAC change + - iavf: Fix limit of total number of queues to active queues of VF + - RDMA/core: Don't infoleak GRH fields + - Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo + Docks" + - netrom: fix copying in user data in nr_setsockopt + - RDMA/uverbs: Check for null return of kmalloc_array + - mac80211: initialize variable have_higher_than_11mbit + - mac80211: mesh: embedd mesh_paths and mpp_paths into ieee80211_if_mesh + - sfc: The RX page_ring is optional + - i40e: fix use-after-free in i40e_sync_filters_subtask() + - i40e: Fix for displaying message regarding NVM version + - i40e: Fix incorrect netdev's real number of RX/TX queues + - ipv4: Check attribute length for RTA_GATEWAY in multipath route + - ipv4: Check attribute length for RTA_FLOW in multipath route + - ipv6: Check attribute length for RTA_GATEWAY in multipath route + - ipv6: Check attribute length for RTA_GATEWAY when deleting multipath route + - lwtunnel: Validate RTA_ENCAP_TYPE attribute length + - sctp: hold endpoint before calling cb in sctp_transport_lookup_process + - batman-adv: mcast: don't send link-local multicast to mcast routers + - sch_qfq: prevent shift-out-of-bounds in qfq_init_qdisc + - net: ena: Fix undefined state when tx request id is out of bounds + - net: ena: Fix wrong rx request id by resetting device + - net: ena: Fix error handling when calculating max IO queues number + - md/raid1: fix missing bitmap update w/o WriteMostly devices + - [x86] KVM: x86: Check for rmaps allocation + - cgroup: Use open-time credentials for process migraton perm checks + (CVE-2021-4197) + - cgroup: Allocate cgroup_file_ctx for kernfs_open_file->priv + (CVE-2021-4197) + - cgroup: Use open-time cgroup namespace for process migration perm checks + (CVE-2021-4197) + - Revert "i2c: core: support bus regulator controlling in adapter" + - xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate + (CVE-2021-4155) + - power: supply: core: Break capacity loop + - rndis_host: support Hytera digital radios + - net ticp:fix a kernel-infoleak in __tipc_sendmsg() + - phonet: refcount leak in pep_sock_accep (CVE-2021-45095) + - fbdev: fbmem: add a helper to determine if an aperture is used by a fw fb + - drm/amdgpu: disable runpm if we are the primary adapter + - [arm64] power: bq25890: Enable continuous conversion for ADC at charging + - ipv6: Continue processing multipath route even if gateway attribute is + invalid + - ipv6: Do cleanup if attribute validation fails in multipath route + - drm/amdgpu: fix dropped backing store handling in + amdgpu_dma_buf_move_notify + - scsi: libiscsi: Fix UAF in iscsi_conn_get_param()/iscsi_conn_teardown() + - ip6_vti: initialize __ip6_tnl_parm struct in vti6_siocdevprivate + - net: udp: fix alignment problem in udp4_seq_show() + - atlantic: Fix buff_ring OOB in aq_ring_rx_clean + - drm/amd/pm: skip setting gfx cgpg in the s0ix suspend-resume + - drm/amdgpu: always reset the asic in suspend (v2) + - drm/amdgpu: put SMU into proper state on runpm suspending for BOCO capable + platform + - mISDN: change function names to avoid conflicts + - drm/amd/display: fix B0 TMDS deepcolor no dislay issue + - drm/amd/display: Added power down for DCN10 + - ipv6: raw: check passed optlen before reading + - Revert "drm/amdgpu: stop scheduler when calling hw_fini (v2)" + - drm/amd/pm: keep the BACO feature enabled for suspend + https://www.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.15 + - workqueue: Fix unbind_workers() VS wq_worker_running() race + - staging: r8188eu: switch the led off during deinit + - bpf: Fix out of bounds access from invalid *_or_null type verification + (CVE-2022-23222) + - Bluetooth: btusb: Add protocol for MediaTek bluetooth devices(MT7922) + - Bluetooth: btusb: Add the new support ID for Realtek RTL8852A + - Bluetooth: btusb: Add support for IMC Networks Mediatek Chip(MT7921) + - Bbluetooth: btusb: Add another Bluetooth part for Realtek 8852AE + - Bluetooth: btusb: fix memory leak in btusb_mtk_submit_wmt_recv_urb() + - Bluetooth: btusb: enable Mediatek to support AOSP extension + - Bluetooth: btusb: Add one more Bluetooth part for the Realtek RTL8852AE + - Bluetooth: btusb: Add the new support IDs for WCN6855 + - fget: clarify and improve __fget_files() implementation + - Bluetooth: btusb: Add one more Bluetooth part for WCN6855 + - Bluetooth: btusb: Add two more Bluetooth parts for WCN6855 + - Bluetooth: btusb: Add support for Foxconn MT7922A + - Bluetooth: btintel: Fix broken LED quirk for legacy ROM devices + - Bluetooth: btusb: Add support for Foxconn QCA 0xe0d0 + - Bluetooth: bfusb: fix division by zero in send path + - [armhf] dts: exynos: Fix BCM4330 Bluetooth reset polarity in I9100 + - USB: core: Fix bug in resuming hub's handling of wakeup requests + - USB: Fix "slab-out-of-bounds Write" bug in usb_hcd_poll_rh_status + - ath11k: Fix buffer overflow when scanning with extraie + - mmc: sdhci-pci: Add PCI ID for Intel ADL + - Bluetooth: add quirk disabling LE Read Transmit Power + - Bluetooth: btbcm: disable read tx power for some Macs with the T2 Security + chip + - Bluetooth: btbcm: disable read tx power for MacBook Air 8,1 and 8,2 + - veth: Do not record rx queue hint in veth_xmit + - [x86] mfd: intel-lpss: Fix too early PM enablement in the ACPI ->probe() + - can: gs_usb: fix use of uninitialized variable, detach device on reception + of invalid USB data + - can: isotp: convert struct tpcon::{idx,len} to unsigned int + - can: gs_usb: gs_can_start_xmit(): zero-initialize hf->{flags,reserved} + - random: fix data race on crng_node_pool + - random: fix data race on crng init time + - random: fix crash on multiple early calls to add_bootloader_randomness() + - [x86] platform/x86/intel: hid: add quirk to support Surface Go 3 + - media: Revert "media: uvcvideo: Set unique vdev name based in type" + - [x86] drm/i915: Avoid bitwise vs logical OR warning in + snb_wm_latency_quirk() + + [ Ben Hutchings ] + * Bump ABI to 3 + * wait: Export new function __wake_up_pollfree() needed by binder + * [rt] Add new signing key for Clark Williams + * [rt] Update to 5.15.10-rt24 + * debian/control: Add version to libopencsd-dev build-dependency + * [armhf] media: Set MEDIA_SUPPORT=m so drivers are no longer built-in + + [ Andrew Balmos ] + * net/can: Enable CONFIG_CAN_MCP251X as module + + [ Salvatore Bonaccorso ] + * drivers/infiniband/hw/irdma: Enable INFINIBAND_IRDMA as module + (Closes: #1003082) + * vfs: fs_context: fix up param length parsing in legacy_parse_param + (CVE-2022-0185) + + -- Salvatore Bonaccorso <carnil@debian.org> Tue, 18 Jan 2022 22:31:03 +0100 + linux (5.15.5-2~bpo11+1) bullseye-backports; urgency=medium * Rebuild for bullseye-backports: diff --git a/debian/config/armhf/config b/debian/config/armhf/config index 64122e618..88212201f 100644 --- a/debian/config/armhf/config +++ b/debian/config/armhf/config @@ -670,7 +670,6 @@ CONFIG_BCM2835_MBOX=y ## ## file: drivers/media/Kconfig ## -CONFIG_MEDIA_SUPPORT=y CONFIG_MEDIA_CONTROLLER=y ## diff --git a/debian/config/config b/debian/config/config index cf8f8fd99..fdbac0a62 100644 --- a/debian/config/config +++ b/debian/config/config @@ -1554,6 +1554,11 @@ CONFIG_INFINIBAND_CXGB4=m CONFIG_INFINIBAND_HFI1=m ## +## file: drivers/infiniband/hw/irdma/Kconfig +## +CONFIG_INFINIBAND_IRDMA=m + +## ## file: drivers/infiniband/hw/mlx4/Kconfig ## CONFIG_MLX4_INFINIBAND=m @@ -3182,7 +3187,7 @@ CONFIG_CAN_SOFTING_CS=m ## file: drivers/net/can/spi/Kconfig ## # CONFIG_CAN_HI311X is not set -# CONFIG_CAN_MCP251X is not set +CONFIG_CAN_MCP251X=m ## ## file: drivers/net/can/usb/Kconfig diff --git a/debian/config/defines b/debian/config/defines index 7adee7f9f..193aee55d 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -1,5 +1,5 @@ [abi] -abiname: 0.bpo.2 +abiname: 0.bpo.3 ignore-changes: __cpuhp_* __udp_gso_segment diff --git a/debian/patches-rt/rcu-tree-Protect-rcu_rdp_is_offloaded-invocations-on.patch b/debian/patches-rt/0001-rcu-tree-Protect-rcu_rdp_is_offloaded-invocations-on.patch index f8c87c567..10118226e 100644 --- a/debian/patches-rt/rcu-tree-Protect-rcu_rdp_is_offloaded-invocations-on.patch +++ b/debian/patches-rt/0001-rcu-tree-Protect-rcu_rdp_is_offloaded-invocations-on.patch @@ -1,7 +1,9 @@ +From de1fb5c7b040ec61049b3709675b20d4cea61ae2 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 21 Sep 2021 23:12:50 +0200 -Subject: [PATCH] rcu/tree: Protect rcu_rdp_is_offloaded() invocations on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 001/158] rcu/tree: Protect rcu_rdp_is_offloaded() invocations + on RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Valentin reported warnings about suspicious RCU usage on RT kernels. Those happen when offloading of RCU callbacks is enabled: @@ -44,9 +46,11 @@ Reported-by: Valentin Schneider <valentin.schneider@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - kernel/rcu/tree.c | 7 ++++--- + kernel/rcu/tree.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) +diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c +index bdd1dc6de71a..9a04550cc54b 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -2278,13 +2278,13 @@ rcu_report_qs_rdp(struct rcu_data *rdp) @@ -65,7 +69,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (rdp->cpu_no_qs.b.norm || rdp->gp_seq != rnp->gp_seq || rdp->gpwrap) { -@@ -2446,7 +2446,7 @@ static void rcu_do_batch(struct rcu_data +@@ -2446,7 +2446,7 @@ static void rcu_do_batch(struct rcu_data *rdp) int div; bool __maybe_unused empty; unsigned long flags; @@ -74,7 +78,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct rcu_head *rhp; struct rcu_cblist rcl = RCU_CBLIST_INITIALIZER(rcl); long bl, count = 0; -@@ -2472,6 +2472,7 @@ static void rcu_do_batch(struct rcu_data +@@ -2472,6 +2472,7 @@ static void rcu_do_batch(struct rcu_data *rdp) rcu_nocb_lock(rdp); WARN_ON_ONCE(cpu_is_offline(smp_processor_id())); pending = rcu_segcblist_n_cbs(&rdp->cblist); @@ -82,3 +86,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> div = READ_ONCE(rcu_divisor); div = div < 0 ? 7 : div > sizeof(long) * 8 - 2 ? sizeof(long) * 8 - 2 : div; bl = max(rdp->blimit, pending >> div); +-- +2.33.1 + diff --git a/debian/patches-rt/sched_introduce_migratable.patch b/debian/patches-rt/0002-sched-Introduce-migratable.patch index 8f46414f6..2aa4e2aa3 100644 --- a/debian/patches-rt/sched_introduce_migratable.patch +++ b/debian/patches-rt/0002-sched-Introduce-migratable.patch @@ -1,7 +1,8 @@ +From 6e04aa922e2431cd4ba315f3d0bcde1ba257425a Mon Sep 17 00:00:00 2001 From: Valentin Schneider <valentin.schneider@arm.com> -Subject: sched: Introduce migratable() Date: Wed, 11 Aug 2021 21:13:52 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 002/158] sched: Introduce migratable() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Some areas use preempt_disable() + preempt_enable() to safely access per-CPU data. The PREEMPT_RT folks have shown this can also be done by @@ -22,12 +23,14 @@ Signed-off-by: Valentin Schneider <valentin.schneider@arm.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210811201354.1976839-3-valentin.schneider@arm.com --- - include/linux/sched.h | 10 ++++++++++ + include/linux/sched.h | 10 ++++++++++ 1 file changed, 10 insertions(+) +diff --git a/include/linux/sched.h b/include/linux/sched.h +index c1a927ddec64..33789b6abdc3 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1730,6 +1730,16 @@ static __always_inline bool is_percpu_th +@@ -1730,6 +1730,16 @@ static __always_inline bool is_percpu_thread(void) #endif } @@ -44,3 +47,6 @@ Link: https://lore.kernel.org/r/20210811201354.1976839-3-valentin.schneider@arm. /* Per-process atomic flags. */ #define PFA_NO_NEW_PRIVS 0 /* May not gain new privileges. */ #define PFA_SPREAD_PAGE 1 /* Spread page cache over cpuset */ +-- +2.33.1 + diff --git a/debian/patches-rt/arm64_mm_make_arch_faults_on_old_pte_check_for_migratability.patch b/debian/patches-rt/0003-arm64-mm-Make-arch_faults_on_old_pte-check-for-migra.patch index 0ddc53f11..202368c03 100644 --- a/debian/patches-rt/arm64_mm_make_arch_faults_on_old_pte_check_for_migratability.patch +++ b/debian/patches-rt/0003-arm64-mm-Make-arch_faults_on_old_pte-check-for-migra.patch @@ -1,7 +1,9 @@ +From f7f818b4021dbd63b610e1c28a2065bc0f4893db Mon Sep 17 00:00:00 2001 From: Valentin Schneider <valentin.schneider@arm.com> -Subject: arm64: mm: Make arch_faults_on_old_pte() check for migratability Date: Wed, 11 Aug 2021 21:13:54 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 003/158] arm64: mm: Make arch_faults_on_old_pte() check for + migratability +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz arch_faults_on_old_pte() relies on the calling context being non-preemptible. CONFIG_PREEMPT_RT turns the PTE lock into a sleepable @@ -18,12 +20,14 @@ Signed-off-by: Valentin Schneider <valentin.schneider@arm.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210811201354.1976839-5-valentin.schneider@arm.com --- - arch/arm64/include/asm/pgtable.h | 2 +- + arch/arm64/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h +index 72f95c6a7051..30fe8c324ce6 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h -@@ -995,7 +995,7 @@ static inline void update_mmu_cache(stru +@@ -1001,7 +1001,7 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, */ static inline bool arch_faults_on_old_pte(void) { @@ -32,3 +36,6 @@ Link: https://lore.kernel.org/r/20210811201354.1976839-5-valentin.schneider@arm. return !cpu_has_hw_af(); } +-- +2.33.1 + diff --git a/debian/patches-rt/printk__rename_printk_cpulock_API_and_always_disable_interrupts.patch b/debian/patches-rt/0004-printk-rename-printk-cpulock-API-and-always-disable-.patch index f59e5eefb..bf67b3dc4 100644 --- a/debian/patches-rt/printk__rename_printk_cpulock_API_and_always_disable_interrupts.patch +++ b/debian/patches-rt/0004-printk-rename-printk-cpulock-API-and-always-disable-.patch @@ -1,9 +1,9 @@ -Subject: printk: rename printk cpulock API and always disable interrupts -From: John Ogness <john.ogness@linutronix.de> -Date: Thu Jul 15 09:34:45 2021 +0206 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 7cdde6d0945e28e31949885b7a13b9fc474c93d1 Mon Sep 17 00:00:00 2001 From: John Ogness <john.ogness@linutronix.de> +Date: Thu, 15 Jul 2021 09:34:45 +0206 +Subject: [PATCH 004/158] printk: rename printk cpulock API and always disable + interrupts +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The printk cpulock functions use local_irq_disable(). This means that hardware interrupts are also disabled on PREEMPT_RT. To make this @@ -18,16 +18,17 @@ appropriately for this. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - --- - include/linux/printk.h | 30 ++++++++++++++---------------- - lib/dump_stack.c | 4 ++-- - lib/nmi_backtrace.c | 4 ++-- + include/linux/printk.h | 30 ++++++++++++++---------------- + lib/dump_stack.c | 4 ++-- + lib/nmi_backtrace.c | 4 ++-- 3 files changed, 18 insertions(+), 20 deletions(-) ---- + +diff --git a/include/linux/printk.h b/include/linux/printk.h +index 9497f6b98339..86140f3e7317 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h -@@ -280,17 +280,22 @@ static inline void dump_stack(void) +@@ -284,17 +284,22 @@ static inline void printk_trigger_flush(void) extern int __printk_cpu_trylock(void); extern void __printk_wait_on_cpu_lock(void); extern void __printk_cpu_unlock(void); @@ -54,7 +55,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> for (;;) { \ local_irq_save(flags); \ if (__printk_cpu_trylock()) \ -@@ -300,22 +305,15 @@ extern void __printk_cpu_unlock(void); +@@ -304,22 +309,15 @@ extern void __printk_cpu_unlock(void); } /** @@ -82,9 +83,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> extern int kptr_restrict; +diff --git a/lib/dump_stack.c b/lib/dump_stack.c +index 6b7f1bf6715d..6e8ae42c7e27 100644 --- a/lib/dump_stack.c +++ b/lib/dump_stack.c -@@ -102,9 +102,9 @@ asmlinkage __visible void dump_stack_lvl +@@ -102,9 +102,9 @@ asmlinkage __visible void dump_stack_lvl(const char *log_lvl) * Permit this cpu to perform nested stack dumps while serialising * against other CPUs */ @@ -96,9 +99,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } EXPORT_SYMBOL(dump_stack_lvl); +diff --git a/lib/nmi_backtrace.c b/lib/nmi_backtrace.c +index 199ab201d501..06410209197a 100644 --- a/lib/nmi_backtrace.c +++ b/lib/nmi_backtrace.c -@@ -93,7 +93,7 @@ bool nmi_cpu_backtrace(struct pt_regs *r +@@ -99,7 +99,7 @@ bool nmi_cpu_backtrace(struct pt_regs *regs) * Allow nested NMI backtraces while serializing * against other CPUs. */ @@ -107,7 +112,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (!READ_ONCE(backtrace_idle) && regs && cpu_in_idle(instruction_pointer(regs))) { pr_warn("NMI backtrace for cpu %d skipped: idling at %pS\n", cpu, (void *)instruction_pointer(regs)); -@@ -104,7 +104,7 @@ bool nmi_cpu_backtrace(struct pt_regs *r +@@ -110,7 +110,7 @@ bool nmi_cpu_backtrace(struct pt_regs *regs) else dump_stack(); } @@ -116,3 +121,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> cpumask_clear_cpu(cpu, to_cpumask(backtrace_mask)); return true; } +-- +2.33.1 + diff --git a/debian/patches-rt/console__add_write_atomic_interface.patch b/debian/patches-rt/0005-console-add-write_atomic-interface.patch index 8de52e9a7..2d16f25b7 100644 --- a/debian/patches-rt/console__add_write_atomic_interface.patch +++ b/debian/patches-rt/0005-console-add-write_atomic-interface.patch @@ -1,9 +1,8 @@ -Subject: console: add write_atomic interface -From: John Ogness <john.ogness@linutronix.de> -Date: Mon Nov 30 01:42:01 2020 +0106 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From e3e53b390cd895f2239762e4484772a7a903b7a4 Mon Sep 17 00:00:00 2001 From: John Ogness <john.ogness@linutronix.de> +Date: Mon, 30 Nov 2020 01:42:01 +0106 +Subject: [PATCH 005/158] console: add write_atomic interface +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Add a write_atomic() callback to the console. This is an optional function for console drivers. The function must be atomic (including @@ -37,19 +36,20 @@ re-triggered for that CPU. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - --- - arch/powerpc/include/asm/smp.h | 1 - arch/powerpc/kernel/kgdb.c | 10 ++++++++- - arch/powerpc/kernel/smp.c | 5 ++++ - arch/x86/kernel/kgdb.c | 9 +++++--- - include/linux/console.h | 1 - include/linux/kgdb.h | 3 ++ - include/linux/printk.h | 23 ++++++++++++++++++++ - kernel/debug/debug_core.c | 45 +++++++++++++++++++++++------------------ - kernel/printk/printk.c | 26 +++++++++++++++++++++++ + arch/powerpc/include/asm/smp.h | 1 + + arch/powerpc/kernel/kgdb.c | 10 +++++++- + arch/powerpc/kernel/smp.c | 5 ++++ + arch/x86/kernel/kgdb.c | 9 ++++--- + include/linux/console.h | 1 + + include/linux/kgdb.h | 3 +++ + include/linux/printk.h | 23 +++++++++++++++++ + kernel/debug/debug_core.c | 45 ++++++++++++++++++++-------------- + kernel/printk/printk.c | 26 ++++++++++++++++++++ 9 files changed, 100 insertions(+), 23 deletions(-) ---- + +diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h +index 7ef1cd8168a0..f9e63cacd220 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h @@ -62,6 +62,7 @@ struct smp_ops_t { @@ -60,9 +60,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> extern void smp_send_debugger_break(void); extern void start_secondary_resume(void); extern void smp_generic_give_timebase(void); +diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c +index bdee7262c080..d57d37497862 100644 --- a/arch/powerpc/kernel/kgdb.c +++ b/arch/powerpc/kernel/kgdb.c -@@ -120,11 +120,19 @@ int kgdb_skipexception(int exception, st +@@ -120,11 +120,19 @@ int kgdb_skipexception(int exception, struct pt_regs *regs) static int kgdb_debugger_ipi(struct pt_regs *regs) { @@ -83,9 +85,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> void kgdb_roundup_cpus(void) { smp_send_debugger_break(); +diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c +index 605bab448f84..26c2179cf64a 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c -@@ -589,6 +589,11 @@ static void debugger_ipi_callback(struct +@@ -589,6 +589,11 @@ static void debugger_ipi_callback(struct pt_regs *regs) debugger_ipi(regs); } @@ -97,9 +101,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> void smp_send_debugger_break(void) { smp_send_nmi_ipi(NMI_IPI_ALL_OTHERS, debugger_ipi_callback, 1000000); +diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c +index 3a43a2dee658..37bd37cdf2b6 100644 --- a/arch/x86/kernel/kgdb.c +++ b/arch/x86/kernel/kgdb.c -@@ -502,9 +502,12 @@ static int kgdb_nmi_handler(unsigned int +@@ -502,9 +502,12 @@ static int kgdb_nmi_handler(unsigned int cmd, struct pt_regs *regs) if (atomic_read(&kgdb_active) != -1) { /* KGDB CPU roundup */ cpu = raw_smp_processor_id(); @@ -115,6 +121,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return NMI_HANDLED; } +diff --git a/include/linux/console.h b/include/linux/console.h +index a97f277cfdfa..4410eb7d453f 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -140,6 +140,7 @@ static inline int con_debug_leave(void) @@ -125,9 +133,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> int (*read)(struct console *, char *, unsigned); struct tty_driver *(*device)(struct console *, int *); void (*unblank)(void); +diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h +index 258cdde8d356..9bca0d98db5a 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h -@@ -212,6 +212,8 @@ extern void kgdb_call_nmi_hook(void *ign +@@ -212,6 +212,8 @@ extern void kgdb_call_nmi_hook(void *ignored); */ extern void kgdb_roundup_cpus(void); @@ -143,9 +153,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +static inline void kgdb_roundup_cpu(unsigned int cpu) {} #endif /* ! CONFIG_KGDB */ #endif /* _KGDB_H_ */ +diff --git a/include/linux/printk.h b/include/linux/printk.h +index 86140f3e7317..8a2751e49ec4 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h -@@ -280,10 +280,18 @@ static inline void dump_stack(void) +@@ -284,10 +284,18 @@ static inline void printk_trigger_flush(void) extern int __printk_cpu_trylock(void); extern void __printk_wait_on_cpu_lock(void); extern void __printk_cpu_unlock(void); @@ -164,7 +176,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #endif /* CONFIG_SMP */ /** -@@ -315,6 +323,21 @@ extern void __printk_cpu_unlock(void); +@@ -319,6 +327,21 @@ extern void __printk_cpu_unlock(void); local_irq_restore(flags); \ } while (0) @@ -186,6 +198,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> extern int kptr_restrict; /** +diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c +index da06a5553835..3e39636da842 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c @@ -238,35 +238,42 @@ NOKPROBE_SYMBOL(kgdb_call_nmi_hook); @@ -250,6 +264,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } } NOKPROBE_SYMBOL(kgdb_roundup_cpus); +diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c +index 99221b016c68..c5f26a0ed1f8 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -44,6 +44,7 @@ @@ -260,7 +276,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #include <linux/sched/clock.h> #include <linux/sched/debug.h> #include <linux/sched/task_stack.h> -@@ -3582,6 +3583,7 @@ EXPORT_SYMBOL_GPL(kmsg_dump_rewind); +@@ -3587,6 +3588,7 @@ EXPORT_SYMBOL_GPL(kmsg_dump_rewind); #ifdef CONFIG_SMP static atomic_t printk_cpulock_owner = ATOMIC_INIT(-1); static atomic_t printk_cpulock_nested = ATOMIC_INIT(0); @@ -268,7 +284,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /** * __printk_wait_on_cpu_lock() - Busy wait until the printk cpu-reentrant -@@ -3661,6 +3663,9 @@ EXPORT_SYMBOL(__printk_cpu_trylock); +@@ -3666,6 +3668,9 @@ EXPORT_SYMBOL(__printk_cpu_trylock); */ void __printk_cpu_unlock(void) { @@ -278,7 +294,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (atomic_read(&printk_cpulock_nested)) { atomic_dec(&printk_cpulock_nested); return; -@@ -3671,6 +3676,12 @@ void __printk_cpu_unlock(void) +@@ -3676,6 +3681,12 @@ void __printk_cpu_unlock(void) * LMM(__printk_cpu_unlock:A) */ @@ -291,7 +307,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Guarantee loads and stores from this CPU when it was the * lock owner are visible to the next lock owner. This pairs -@@ -3691,6 +3702,21 @@ void __printk_cpu_unlock(void) +@@ -3696,6 +3707,21 @@ void __printk_cpu_unlock(void) */ atomic_set_release(&printk_cpulock_owner, -1); /* LMM(__printk_cpu_unlock:B) */ @@ -313,3 +329,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +} +EXPORT_SYMBOL(kgdb_roundup_delay); #endif /* CONFIG_SMP */ +-- +2.33.1 + diff --git a/debian/patches-rt/kdb__only_use_atomic_consoles_for_output_mirroring.patch b/debian/patches-rt/0006-kdb-only-use-atomic-consoles-for-output-mirroring.patch index 4235b9133..14b08d47a 100644 --- a/debian/patches-rt/kdb__only_use_atomic_consoles_for_output_mirroring.patch +++ b/debian/patches-rt/0006-kdb-only-use-atomic-consoles-for-output-mirroring.patch @@ -1,9 +1,8 @@ -Subject: kdb: only use atomic consoles for output mirroring -From: John Ogness <john.ogness@linutronix.de> -Date: Fri Mar 19 14:57:31 2021 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 3bd6e0910a63de4840bfda4b6c25e29866679744 Mon Sep 17 00:00:00 2001 From: John Ogness <john.ogness@linutronix.de> +Date: Fri, 19 Mar 2021 14:57:31 +0100 +Subject: [PATCH 006/158] kdb: only use atomic consoles for output mirroring +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Currently kdb uses the @oops_in_progress hack to mirror kdb output to all active consoles from NMI context. Ignoring locks is unsafe. @@ -13,16 +12,15 @@ use that interface to mirror kdb output. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - - --- - kernel/debug/kdb/kdb_io.c | 18 ++++++------------ + kernel/debug/kdb/kdb_io.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) ---- + +diff --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb/kdb_io.c +index 6735ac36b718..539a2f0dc89d 100644 --- a/kernel/debug/kdb/kdb_io.c +++ b/kernel/debug/kdb/kdb_io.c -@@ -559,23 +559,17 @@ static void kdb_msg_write(const char *ms +@@ -559,23 +559,17 @@ static void kdb_msg_write(const char *msg, int msg_len) cp++; } @@ -52,3 +50,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> touch_nmi_watchdog(); } } +-- +2.33.1 + diff --git a/debian/patches-rt/serial__8250__implement_write_atomic.patch b/debian/patches-rt/0007-serial-8250-implement-write_atomic.patch index d872f47fd..7d3bbb3e6 100644 --- a/debian/patches-rt/serial__8250__implement_write_atomic.patch +++ b/debian/patches-rt/0007-serial-8250-implement-write_atomic.patch @@ -1,9 +1,8 @@ -Subject: serial: 8250: implement write_atomic -From: John Ogness <john.ogness@linutronix.de> -Date: Mon Nov 30 01:42:02 2020 +0106 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 64efa8b1714f53b863cb7b22628151667bc2ac58 Mon Sep 17 00:00:00 2001 From: John Ogness <john.ogness@linutronix.de> +Date: Mon, 30 Nov 2020 01:42:02 +0106 +Subject: [PATCH 007/158] serial: 8250: implement write_atomic +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Implement a non-sleeping NMI-safe write_atomic() console function in order to support emergency console printing. @@ -17,20 +16,21 @@ write_atomic(). Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - --- - drivers/tty/serial/8250/8250.h | 47 ++++++++++++++++ - drivers/tty/serial/8250/8250_core.c | 17 ++++-- - drivers/tty/serial/8250/8250_fsl.c | 9 +++ - drivers/tty/serial/8250/8250_ingenic.c | 7 ++ - drivers/tty/serial/8250/8250_mtk.c | 29 +++++++++- - drivers/tty/serial/8250/8250_port.c | 92 ++++++++++++++++++++------------- - include/linux/serial_8250.h | 5 + + drivers/tty/serial/8250/8250.h | 47 ++++++++++++- + drivers/tty/serial/8250/8250_core.c | 17 +++-- + drivers/tty/serial/8250/8250_fsl.c | 9 +++ + drivers/tty/serial/8250/8250_ingenic.c | 7 ++ + drivers/tty/serial/8250/8250_mtk.c | 29 +++++++- + drivers/tty/serial/8250/8250_port.c | 92 ++++++++++++++++---------- + include/linux/serial_8250.h | 5 ++ 7 files changed, 162 insertions(+), 44 deletions(-) ---- + +diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h +index 6473361525d1..2321d02e9b7a 100644 --- a/drivers/tty/serial/8250/8250.h +++ b/drivers/tty/serial/8250/8250.h -@@ -132,12 +132,55 @@ static inline void serial_dl_write(struc +@@ -132,12 +132,55 @@ static inline void serial_dl_write(struct uart_8250_port *up, int value) up->dl_write(up, value); } @@ -87,7 +87,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return true; } -@@ -146,7 +189,7 @@ static inline bool serial8250_clear_THRI +@@ -146,7 +189,7 @@ static inline bool serial8250_clear_THRI(struct uart_8250_port *up) if (!(up->ier & UART_IER_THRI)) return false; up->ier &= ~UART_IER_THRI; @@ -96,9 +96,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return true; } +diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c +index 1ce193daea7f..fad00c0414e3 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c -@@ -264,10 +264,8 @@ static void serial8250_backup_timeout(st +@@ -264,10 +264,8 @@ static void serial8250_backup_timeout(struct timer_list *t) * Must disable interrupts or else we risk racing with the interrupt * based handler. */ @@ -111,7 +113,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> iir = serial_in(up, UART_IIR); -@@ -290,7 +288,7 @@ static void serial8250_backup_timeout(st +@@ -290,7 +288,7 @@ static void serial8250_backup_timeout(struct timer_list *t) serial8250_tx_chars(up); if (up->port.irq) @@ -120,7 +122,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> spin_unlock_irqrestore(&up->port.lock, flags); -@@ -568,6 +566,14 @@ serial8250_register_ports(struct uart_dr +@@ -568,6 +566,14 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev) #ifdef CONFIG_SERIAL_8250_CONSOLE @@ -135,7 +137,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> static void univ8250_console_write(struct console *co, const char *s, unsigned int count) { -@@ -661,6 +667,7 @@ static int univ8250_console_match(struct +@@ -661,6 +667,7 @@ static int univ8250_console_match(struct console *co, char *name, int idx, static struct console univ8250_console = { .name = "ttyS", @@ -143,9 +145,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> .write = univ8250_console_write, .device = uart_console_device, .setup = univ8250_console_setup, +diff --git a/drivers/tty/serial/8250/8250_fsl.c b/drivers/tty/serial/8250/8250_fsl.c +index fc65a2293ce9..19a92530040f 100644 --- a/drivers/tty/serial/8250/8250_fsl.c +++ b/drivers/tty/serial/8250/8250_fsl.c -@@ -60,9 +60,18 @@ int fsl8250_handle_irq(struct uart_port +@@ -60,9 +60,18 @@ int fsl8250_handle_irq(struct uart_port *port) /* Stop processing interrupts on input overrun */ if ((orig_lsr & UART_LSR_OE) && (up->overrun_backoff_time_ms > 0)) { @@ -164,9 +168,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (up->ier & (UART_IER_RLSI | UART_IER_RDI)) { port->ops->stop_rx(port); } else { +diff --git a/drivers/tty/serial/8250/8250_ingenic.c b/drivers/tty/serial/8250/8250_ingenic.c +index 65402d05eff9..8122645ab05c 100644 --- a/drivers/tty/serial/8250/8250_ingenic.c +++ b/drivers/tty/serial/8250/8250_ingenic.c -@@ -146,6 +146,8 @@ OF_EARLYCON_DECLARE(x1000_uart, "ingenic +@@ -146,6 +146,8 @@ OF_EARLYCON_DECLARE(x1000_uart, "ingenic,x1000-uart", static void ingenic_uart_serial_out(struct uart_port *p, int offset, int value) { @@ -175,7 +181,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> int ier; switch (offset) { -@@ -167,7 +169,12 @@ static void ingenic_uart_serial_out(stru +@@ -167,7 +169,12 @@ static void ingenic_uart_serial_out(struct uart_port *p, int offset, int value) * If we have enabled modem status IRQs we should enable * modem mode. */ @@ -188,9 +194,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (ier & UART_IER_MSI) value |= UART_MCR_MDCE | UART_MCR_FCM; +diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c +index fb65dc601b23..9af18b5d8296 100644 --- a/drivers/tty/serial/8250/8250_mtk.c +++ b/drivers/tty/serial/8250/8250_mtk.c -@@ -218,12 +218,37 @@ static void mtk8250_shutdown(struct uart +@@ -218,12 +218,37 @@ static void mtk8250_shutdown(struct uart_port *port) static void mtk8250_disable_intrs(struct uart_8250_port *up, int mask) { @@ -230,9 +238,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static void mtk8250_set_flow_ctrl(struct uart_8250_port *up, int mode) +diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c +index ec88b706e882..7774c63ce53d 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c -@@ -762,7 +762,7 @@ static void serial8250_set_sleep(struct +@@ -762,7 +762,7 @@ static void serial8250_set_sleep(struct uart_8250_port *p, int sleep) serial_out(p, UART_EFR, UART_EFR_ECB); serial_out(p, UART_LCR, 0); } @@ -241,7 +251,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (p->capabilities & UART_CAP_EFR) { serial_out(p, UART_LCR, UART_LCR_CONF_MODE_B); serial_out(p, UART_EFR, efr); -@@ -1436,7 +1436,7 @@ static void serial8250_stop_rx(struct ua +@@ -1436,7 +1436,7 @@ static void serial8250_stop_rx(struct uart_port *port) up->ier &= ~(UART_IER_RLSI | UART_IER_RDI); up->port.read_status_mask &= ~UART_LSR_DR; @@ -250,7 +260,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> serial8250_rpm_put(up); } -@@ -1466,7 +1466,7 @@ void serial8250_em485_stop_tx(struct uar +@@ -1466,7 +1466,7 @@ void serial8250_em485_stop_tx(struct uart_8250_port *p) serial8250_clear_and_reinit_fifos(p); p->ier |= UART_IER_RLSI | UART_IER_RDI; @@ -259,7 +269,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } } EXPORT_SYMBOL_GPL(serial8250_em485_stop_tx); -@@ -1688,7 +1688,7 @@ static void serial8250_disable_ms(struct +@@ -1688,7 +1688,7 @@ static void serial8250_disable_ms(struct uart_port *port) mctrl_gpio_disable_ms(up->gpios); up->ier &= ~UART_IER_MSI; @@ -268,7 +278,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static void serial8250_enable_ms(struct uart_port *port) -@@ -1704,7 +1704,7 @@ static void serial8250_enable_ms(struct +@@ -1704,7 +1704,7 @@ static void serial8250_enable_ms(struct uart_port *port) up->ier |= UART_IER_MSI; serial8250_rpm_get(up); @@ -277,7 +287,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> serial8250_rpm_put(up); } -@@ -2132,14 +2132,7 @@ static void serial8250_put_poll_char(str +@@ -2125,14 +2125,7 @@ static void serial8250_put_poll_char(struct uart_port *port, struct uart_8250_port *up = up_to_u8250p(port); serial8250_rpm_get(up); @@ -293,7 +303,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> wait_for_xmitr(up, BOTH_EMPTY); /* -@@ -2152,7 +2145,7 @@ static void serial8250_put_poll_char(str +@@ -2145,7 +2138,7 @@ static void serial8250_put_poll_char(struct uart_port *port, * and restore the IER */ wait_for_xmitr(up, BOTH_EMPTY); @@ -302,7 +312,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> serial8250_rpm_put(up); } -@@ -2455,7 +2448,7 @@ void serial8250_do_shutdown(struct uart_ +@@ -2448,7 +2441,7 @@ void serial8250_do_shutdown(struct uart_port *port) */ spin_lock_irqsave(&port->lock, flags); up->ier = 0; @@ -311,7 +321,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> spin_unlock_irqrestore(&port->lock, flags); synchronize_irq(port->irq); -@@ -2824,7 +2817,7 @@ serial8250_do_set_termios(struct uart_po +@@ -2830,7 +2823,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, if (up->capabilities & UART_CAP_RTOIE) up->ier |= UART_IER_RTOIE; @@ -320,7 +330,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (up->capabilities & UART_CAP_EFR) { unsigned char efr = 0; -@@ -3290,7 +3283,7 @@ EXPORT_SYMBOL_GPL(serial8250_set_default +@@ -3296,7 +3289,7 @@ EXPORT_SYMBOL_GPL(serial8250_set_defaults); #ifdef CONFIG_SERIAL_8250_CONSOLE @@ -329,7 +339,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> { struct uart_8250_port *up = up_to_u8250p(port); -@@ -3298,6 +3291,18 @@ static void serial8250_console_putchar(s +@@ -3304,6 +3297,18 @@ static void serial8250_console_putchar(struct uart_port *port, int ch) serial_port_out(port, UART_TX, ch); } @@ -348,7 +358,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Restore serial console when h/w power-off detected */ -@@ -3319,6 +3324,32 @@ static void serial8250_console_restore(s +@@ -3325,6 +3330,32 @@ static void serial8250_console_restore(struct uart_8250_port *up) serial8250_out_MCR(up, UART_MCR_DTR | UART_MCR_RTS); } @@ -381,7 +391,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Print a string to the serial port trying not to disturb * any possible real use of the port... -@@ -3335,24 +3366,12 @@ void serial8250_console_write(struct uar +@@ -3341,24 +3372,12 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, struct uart_port *port = &up->port; unsigned long flags; unsigned int ier; @@ -408,7 +418,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* check scratch reg to see if port powered off during system sleep */ if (up->canary && (up->canary != serial_port_in(port, UART_SCR))) { -@@ -3366,7 +3385,9 @@ void serial8250_console_write(struct uar +@@ -3372,7 +3391,9 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, mdelay(port->rs485.delay_rts_before_send); } @@ -418,7 +428,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Finally, wait for transmitter to become empty -@@ -3379,8 +3400,7 @@ void serial8250_console_write(struct uar +@@ -3385,8 +3406,7 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, if (em485->tx_stopped) up->rs485_stop_tx(up); } @@ -428,7 +438,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * The receive handling will happen properly because the -@@ -3392,8 +3412,7 @@ void serial8250_console_write(struct uar +@@ -3398,8 +3418,7 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, if (up->msr_saved_flags) serial8250_modem_status(up); @@ -438,7 +448,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static unsigned int probe_baud(struct uart_port *port) -@@ -3413,6 +3432,7 @@ static unsigned int probe_baud(struct ua +@@ -3419,6 +3438,7 @@ static unsigned int probe_baud(struct uart_port *port) int serial8250_console_setup(struct uart_port *port, char *options, bool probe) { @@ -446,7 +456,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> int baud = 9600; int bits = 8; int parity = 'n'; -@@ -3422,6 +3442,8 @@ int serial8250_console_setup(struct uart +@@ -3428,6 +3448,8 @@ int serial8250_console_setup(struct uart_port *port, char *options, bool probe) if (!port->iobase && !port->membase) return -ENODEV; @@ -455,6 +465,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (options) uart_parse_options(options, &baud, &parity, &bits, &flow); else if (probe) +diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h +index 5db211f43b29..aa011f668705 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h @@ -7,6 +7,7 @@ @@ -474,7 +486,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> struct uart_8250_dma *dma; const struct uart_8250_ops *ops; -@@ -180,6 +183,8 @@ void serial8250_init_port(struct uart_82 +@@ -180,6 +183,8 @@ void serial8250_init_port(struct uart_8250_port *up); void serial8250_set_defaults(struct uart_8250_port *up); void serial8250_console_write(struct uart_8250_port *up, const char *s, unsigned int count); @@ -483,3 +495,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> int serial8250_console_setup(struct uart_port *port, char *options, bool probe); int serial8250_console_exit(struct uart_port *port); +-- +2.33.1 + diff --git a/debian/patches-rt/printk__relocate_printk_delay.patch b/debian/patches-rt/0008-printk-relocate-printk_delay.patch index b2209d31b..c3ecac792 100644 --- a/debian/patches-rt/printk__relocate_printk_delay.patch +++ b/debian/patches-rt/0008-printk-relocate-printk_delay.patch @@ -1,9 +1,8 @@ -Subject: printk: relocate printk_delay() -From: John Ogness <john.ogness@linutronix.de> -Date: Mon Nov 30 01:42:03 2020 +0106 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From cc823542e44547d142c06b5ca0f56c76ae9f55b3 Mon Sep 17 00:00:00 2001 From: John Ogness <john.ogness@linutronix.de> +Date: Mon, 30 Nov 2020 01:42:03 +0106 +Subject: [PATCH 008/158] printk: relocate printk_delay() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Move printk_delay() "as is" further up so that they can be used by new functions in an upcoming commit. @@ -11,14 +10,15 @@ new functions in an upcoming commit. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - --- - kernel/printk/printk.c | 28 ++++++++++++++-------------- + kernel/printk/printk.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) ---- + +diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c +index c5f26a0ed1f8..6b8e6338b394 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -1748,6 +1748,20 @@ SYSCALL_DEFINE3(syslog, int, type, char +@@ -1748,6 +1748,20 @@ SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len) return do_syslog(type, buf, len, SYSLOG_FROM_READER); } @@ -39,7 +39,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Special console_lock variants that help to reduce the risk of soft-lockups. * They allow to pass console_lock to another printk() call using a busy wait. -@@ -2002,20 +2016,6 @@ static u8 *__printk_recursion_counter(vo +@@ -2002,20 +2016,6 @@ static u8 *__printk_recursion_counter(void) local_irq_restore(flags); \ } while (0) @@ -60,3 +60,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> static inline u32 printk_caller_id(void) { return in_task() ? task_pid_nr(current) : +-- +2.33.1 + diff --git a/debian/patches-rt/printk__call_boot_delay_msec_in_printk_delay.patch b/debian/patches-rt/0009-printk-call-boot_delay_msec-in-printk_delay.patch index 42afe9614..deabf9019 100644 --- a/debian/patches-rt/printk__call_boot_delay_msec_in_printk_delay.patch +++ b/debian/patches-rt/0009-printk-call-boot_delay_msec-in-printk_delay.patch @@ -1,9 +1,8 @@ -Subject: printk: call boot_delay_msec() in printk_delay() -From: John Ogness <john.ogness@linutronix.de> -Date: Mon Nov 30 01:42:04 2020 +0106 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From b38f531910cd3d9640f3ac0b2a445af0285bfdf7 Mon Sep 17 00:00:00 2001 From: John Ogness <john.ogness@linutronix.de> +Date: Mon, 30 Nov 2020 01:42:04 +0106 +Subject: [PATCH 009/158] printk: call boot_delay_msec() in printk_delay() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz boot_delay_msec() is always called immediately before printk_delay() so just call it from within printk_delay(). @@ -11,14 +10,15 @@ so just call it from within printk_delay(). Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - --- - kernel/printk/printk.c | 7 ++++--- + kernel/printk/printk.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---- + +diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c +index 6b8e6338b394..d403b1e91030 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -1750,8 +1750,10 @@ SYSCALL_DEFINE3(syslog, int, type, char +@@ -1750,8 +1750,10 @@ SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len) int printk_delay_msec __read_mostly; @@ -30,7 +30,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (unlikely(printk_delay_msec)) { int m = printk_delay_msec; -@@ -2223,8 +2225,7 @@ asmlinkage int vprintk_emit(int facility +@@ -2223,8 +2225,7 @@ asmlinkage int vprintk_emit(int facility, int level, in_sched = true; } @@ -40,3 +40,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> printed_len = vprintk_store(facility, level, dev_info, fmt, args); +-- +2.33.1 + diff --git a/debian/patches-rt/printk__use_seqcount_latch_for_console_seq.patch b/debian/patches-rt/0010-printk-use-seqcount_latch-for-console_seq.patch index 708c7fcce..2e1b0ae47 100644 --- a/debian/patches-rt/printk__use_seqcount_latch_for_console_seq.patch +++ b/debian/patches-rt/0010-printk-use-seqcount_latch-for-console_seq.patch @@ -1,20 +1,20 @@ -Subject: printk: use seqcount_latch for console_seq -From: John Ogness <john.ogness@linutronix.de> -Date: Mon Nov 30 01:42:05 2020 +0106 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 21c812cf08d248a0fbe4bc403533bbc61156ba49 Mon Sep 17 00:00:00 2001 From: John Ogness <john.ogness@linutronix.de> +Date: Mon, 30 Nov 2020 01:42:05 +0106 +Subject: [PATCH 010/158] printk: use seqcount_latch for console_seq +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz In preparation for atomic printing, change @console_seq to use seqcount_latch so that it can be read without requiring @console_sem. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - --- - kernel/printk/printk.c | 73 +++++++++++++++++++++++++++---------------------- + kernel/printk/printk.c | 73 ++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 32 deletions(-) ---- + +diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c +index d403b1e91030..80eea212855c 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -362,9 +362,7 @@ static u64 syslog_seq; @@ -28,10 +28,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> static u64 exclusive_console_stop_seq; static unsigned long console_dropped; -@@ -374,6 +372,17 @@ struct latched_seq { +@@ -373,6 +371,17 @@ struct latched_seq { + u64 val[2]; }; - /* ++/* + * The next printk record to write to the console. There are two + * copies (updated with seqcount_latch) so that reads can locklessly + * access a valid value. Writers are synchronized by @console_sem. @@ -42,10 +43,9 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> + .val[1] = 0, +}; + -+/* + /* * The next printk record to read after the last 'clear' command. There are * two copies (updated with seqcount_latch) so that reads can locklessly - * access a valid value. Writers are synchronized by @syslog_lock. @@ -436,7 +445,7 @@ bool printk_percpu_data_ready(void) return __printk_percpu_data_ready; } @@ -171,7 +171,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> console_unlock(); } -@@ -3032,11 +3041,11 @@ void register_console(struct console *ne +@@ -3032,11 +3041,11 @@ void register_console(struct console *newcon) * ignores console_lock. */ exclusive_console = newcon; @@ -185,3 +185,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> mutex_unlock(&syslog_lock); } console_unlock(); +-- +2.33.1 + diff --git a/debian/patches-rt/printk__introduce_kernel_sync_mode.patch b/debian/patches-rt/0011-printk-introduce-kernel-sync-mode.patch index 683f1ef4a..33ef92f1d 100644 --- a/debian/patches-rt/printk__introduce_kernel_sync_mode.patch +++ b/debian/patches-rt/0011-printk-introduce-kernel-sync-mode.patch @@ -1,9 +1,8 @@ -Subject: printk: introduce kernel sync mode -From: John Ogness <john.ogness@linutronix.de> -Date: Mon Nov 30 01:42:06 2020 +0106 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From d9f3320c725754cced2ad14b5dcb7d70c7881ce1 Mon Sep 17 00:00:00 2001 From: John Ogness <john.ogness@linutronix.de> +Date: Mon, 30 Nov 2020 01:42:06 +0106 +Subject: [PATCH 011/158] printk: introduce kernel sync mode +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz When the kernel performs an OOPS, enter into "sync mode": @@ -15,13 +14,14 @@ buffer used in sync mode. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - --- - include/linux/console.h | 4 + - include/linux/printk.h | 6 + - kernel/printk/printk.c | 178 +++++++++++++++++++++++++++++++++++++++++++++--- + include/linux/console.h | 4 + + include/linux/printk.h | 6 ++ + kernel/printk/printk.c | 178 +++++++++++++++++++++++++++++++++++++--- 3 files changed, 178 insertions(+), 10 deletions(-) ---- + +diff --git a/include/linux/console.h b/include/linux/console.h +index 4410eb7d453f..6116122631f2 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -16,6 +16,7 @@ @@ -42,9 +42,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> uint ispeed; uint ospeed; void *data; +diff --git a/include/linux/printk.h b/include/linux/printk.h +index 8a2751e49ec4..db633f2a6c46 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h -@@ -47,6 +47,12 @@ static inline const char *printk_skip_he +@@ -47,6 +47,12 @@ static inline const char *printk_skip_headers(const char *buffer) #define CONSOLE_EXT_LOG_MAX 8192 @@ -57,6 +59,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* printk's without a loglevel use this.. */ #define MESSAGE_LOGLEVEL_DEFAULT CONFIG_MESSAGE_LOGLEVEL_DEFAULT +diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c +index 80eea212855c..ea2988d3fe31 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -45,6 +45,7 @@ @@ -67,7 +71,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #include <linux/sched/clock.h> #include <linux/sched/debug.h> #include <linux/sched/task_stack.h> -@@ -355,6 +356,9 @@ static int console_msg_format = MSG_FORM +@@ -355,6 +356,9 @@ static int console_msg_format = MSG_FORMAT_DEFAULT; static DEFINE_MUTEX(syslog_lock); #ifdef CONFIG_PRINTK @@ -77,7 +81,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> DECLARE_WAIT_QUEUE_HEAD(log_wait); /* All 3 protected by @syslog_lock. */ /* the next printk record to read by syslog(READ) or /proc/kmsg */ -@@ -382,6 +386,20 @@ static struct latched_seq console_seq = +@@ -382,6 +386,20 @@ static struct latched_seq console_seq = { .val[1] = 0, }; @@ -108,7 +112,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* the maximum size allowed to be reserved for a record */ #define LOG_LINE_MAX (CONSOLE_LOG_MAX - PREFIX_MAX) -@@ -1773,6 +1788,116 @@ static inline void printk_delay(int leve +@@ -1773,6 +1788,116 @@ static inline void printk_delay(int level) } } @@ -225,7 +229,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Special console_lock variants that help to reduce the risk of soft-lockups. * They allow to pass console_lock to another printk() call using a busy wait. -@@ -1947,6 +2072,8 @@ static void call_console_drivers(const c +@@ -1947,6 +2072,8 @@ static void call_console_drivers(const char *ext_text, size_t ext_len, if (!cpu_online(smp_processor_id()) && !(con->flags & CON_ANYTIME)) continue; @@ -234,7 +238,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (con->flags & CON_EXTENDED) con->write(con, ext_text, ext_len); else { -@@ -2114,6 +2241,7 @@ int vprintk_store(int facility, int leve +@@ -2114,6 +2241,7 @@ int vprintk_store(int facility, int level, const u32 caller_id = printk_caller_id(); struct prb_reserved_entry e; enum printk_info_flags flags = 0; @@ -242,7 +246,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> struct printk_record r; unsigned long irqflags; u16 trunc_msg_len = 0; -@@ -2124,6 +2252,7 @@ int vprintk_store(int facility, int leve +@@ -2124,6 +2252,7 @@ int vprintk_store(int facility, int level, u16 text_len; int ret = 0; u64 ts_nsec; @@ -250,7 +254,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Since the duration of printk() can vary depending on the message -@@ -2162,6 +2291,7 @@ int vprintk_store(int facility, int leve +@@ -2162,6 +2291,7 @@ int vprintk_store(int facility, int level, if (flags & LOG_CONT) { prb_rec_init_wr(&r, reserve_size); if (prb_reserve_in_last(&e, prb, &r, caller_id, LOG_LINE_MAX)) { @@ -258,7 +262,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> text_len = printk_sprint(&r.text_buf[r.info->text_len], reserve_size, facility, &flags, fmt, args); r.info->text_len += text_len; -@@ -2169,6 +2299,7 @@ int vprintk_store(int facility, int leve +@@ -2169,6 +2299,7 @@ int vprintk_store(int facility, int level, if (flags & LOG_NEWLINE) { r.info->flags |= LOG_NEWLINE; prb_final_commit(&e); @@ -266,7 +270,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } else { prb_commit(&e); } -@@ -2192,6 +2323,7 @@ int vprintk_store(int facility, int leve +@@ -2192,6 +2323,7 @@ int vprintk_store(int facility, int level, if (!prb_reserve(&e, prb, &r)) goto out; } @@ -274,7 +278,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* fill message */ text_len = printk_sprint(&r.text_buf[0], reserve_size, facility, &flags, fmt, args); -@@ -2207,13 +2339,25 @@ int vprintk_store(int facility, int leve +@@ -2207,13 +2339,25 @@ int vprintk_store(int facility, int level, memcpy(&r.info->dev_info, dev_info, sizeof(r.info->dev_info)); /* A message without a trailing newline can be continued. */ @@ -345,7 +349,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (retry && console_trylock()) goto again; } -@@ -3041,7 +3187,7 @@ void register_console(struct console *ne +@@ -3041,7 +3187,7 @@ void register_console(struct console *newcon) * ignores console_lock. */ exclusive_console = newcon; @@ -354,7 +358,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* Get a consistent copy of @syslog_seq. */ mutex_lock(&syslog_lock); -@@ -3411,6 +3557,18 @@ void kmsg_dump(enum kmsg_dump_reason rea +@@ -3416,6 +3562,18 @@ void kmsg_dump(enum kmsg_dump_reason reason) { struct kmsg_dumper *dumper; @@ -373,3 +377,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> rcu_read_lock(); list_for_each_entry_rcu(dumper, &dump_list, list) { enum kmsg_dump_reason max_reason = dumper->max_reason; +-- +2.33.1 + diff --git a/debian/patches-rt/printk__move_console_printing_to_kthreads.patch b/debian/patches-rt/0012-printk-move-console-printing-to-kthreads.patch index ab6845670..99793b299 100644 --- a/debian/patches-rt/printk__move_console_printing_to_kthreads.patch +++ b/debian/patches-rt/0012-printk-move-console-printing-to-kthreads.patch @@ -1,9 +1,8 @@ -Subject: printk: move console printing to kthreads -From: John Ogness <john.ogness@linutronix.de> -Date: Mon Nov 30 01:42:07 2020 +0106 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 4a8fc6a4ee2ebff5a1e8aaab0d0b58e22987b219 Mon Sep 17 00:00:00 2001 From: John Ogness <john.ogness@linutronix.de> +Date: Mon, 30 Nov 2020 01:42:07 +0106 +Subject: [PATCH 012/158] printk: move console printing to kthreads +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Create a kthread for each console to perform console printing. Now all console printing is fully asynchronous except for the boot @@ -15,12 +14,13 @@ their name says... locking and unlocking of the console. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - ---- - include/linux/console.h | 13 - kernel/printk/printk.c | 715 ++++++++++++++---------------------------------- - 2 files changed, 236 insertions(+), 492 deletions(-) --- + include/linux/console.h | 13 + + kernel/printk/printk.c | 717 +++++++++++++--------------------------- + 2 files changed, 237 insertions(+), 493 deletions(-) + +diff --git a/include/linux/console.h b/include/linux/console.h +index 6116122631f2..58939969541d 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -17,6 +17,12 @@ @@ -36,7 +36,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> struct vc_data; struct console_font_op; -@@ -153,7 +159,14 @@ +@@ -153,7 +159,14 @@ struct console { int cflag; #ifdef CONFIG_PRINTK char sync_buf[CONSOLE_LOG_MAX]; @@ -51,6 +51,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> uint ispeed; uint ospeed; void *data; +diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c +index ea2988d3fe31..aefc850bff93 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -45,6 +45,7 @@ @@ -61,19 +63,19 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #include <linux/clocksource.h> #include <linux/sched/clock.h> #include <linux/sched/debug.h> -@@ -269,11 +270,6 @@ +@@ -268,11 +269,6 @@ static void __up_console_sem(unsigned long ip) + */ static int console_locked, console_suspended; - /* +-/* - * If exclusive_console is non-NULL then only this console is to be printed to. - */ -static struct console *exclusive_console; - --/* + /* * Array of consoles built from command line options (console=) */ - -@@ -352,10 +348,10 @@ +@@ -352,10 +348,10 @@ static int console_msg_format = MSG_FORMAT_DEFAULT; * non-prinatable characters are escaped in the "\xff" notation. */ @@ -85,7 +87,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* Set to enable sync mode. Once set, it is never cleared. */ static bool sync_mode; -@@ -366,40 +362,6 @@ +@@ -366,40 +362,6 @@ static u64 syslog_seq; static size_t syslog_partial; static bool syslog_time; @@ -126,7 +128,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * The next printk record to read after the last 'clear' command. There are * two copies (updated with seqcount_latch) so that reads can locklessly -@@ -1799,6 +1761,8 @@ +@@ -1799,6 +1761,8 @@ static bool console_may_sync(struct console *con) return false; if (con->write_atomic && kernel_sync_mode()) return true; @@ -135,7 +137,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return false; } -@@ -1806,12 +1770,21 @@ +@@ -1806,12 +1770,21 @@ static bool call_sync_console_driver(struct console *con, const char *text, size { if (!(con->flags & CON_ENABLED)) return false; @@ -161,7 +163,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static bool have_atomic_console(void) -@@ -1856,24 +1829,24 @@ +@@ -1856,24 +1829,24 @@ static bool print_sync(struct console *con, u64 *seq) return true; } @@ -191,7 +193,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> { u64 printk_seq; -@@ -1881,210 +1854,26 @@ +@@ -1881,209 +1854,25 @@ static void print_sync_until(struct console *con, u64 seq) cpu_relax(); for (;;) { @@ -220,7 +222,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> __printk_cpu_unlock(); } - /* +-/* - * Special console_lock variants that help to reduce the risk of soft-lockups. - * They allow to pass console_lock to another printk() call using a busy wait. - */ @@ -406,11 +408,10 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - } -} - --/* + /* * Recursion is tracked separately on each CPU. If NMIs are supported, an * additional NMI context per CPU is also separately tracked. Until per-CPU - * is available, a separate "early tracking" is performed. -@@ -2354,7 +2143,7 @@ +@@ -2354,7 +2143,7 @@ int vprintk_store(int facility, int level, for_each_console(con) { if (console_may_sync(con)) @@ -419,7 +420,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } } -@@ -2367,39 +2156,16 @@ +@@ -2367,39 +2156,16 @@ asmlinkage int vprintk_emit(int facility, int level, const char *fmt, va_list args) { int printed_len; @@ -460,7 +461,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> wake_up_klogd(); return printed_len; } -@@ -2424,37 +2190,162 @@ +@@ -2424,37 +2190,162 @@ asmlinkage __visible int _printk(const char *fmt, ...) } EXPORT_SYMBOL(_printk); @@ -494,15 +495,25 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> + write_text = ext_text; + else + write_text = text; -+ + +-#define printk_time false + seq = read_console_seq(con); -+ + +-#define prb_read_valid(rb, seq, r) false +-#define prb_first_valid_seq(rb) 0 +-#define read_console_seq() 0 +-#define latched_seq_write(dst, src) +-#define kernel_sync_mode() false + prb_rec_init_rd(&r, &info, text, LOG_LINE_MAX + PREFIX_MAX); -+ + +-static u64 exclusive_console_stop_seq; +-static unsigned long console_dropped; + for (;;) { + error = wait_event_interruptible(log_wait, + prb_read_valid(prb, seq, &r) || kthread_should_stop()); -+ + +-static size_t record_print_text(const struct printk_record *r, +- bool syslog, bool time) + if (kthread_should_stop()) + break; + @@ -521,8 +532,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> + + if (suppress_message_printing(r.info->level)) + continue; - --#define printk_time false ++ + if (con->flags & CON_EXTENDED) { + len = info_print_ext_header(ext_text, + CONSOLE_EXT_LOG_MAX, @@ -536,12 +546,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> + console_msg_format & MSG_FORMAT_SYSLOG, + printk_time); + } - --#define prb_read_valid(rb, seq, r) false --#define prb_first_valid_seq(rb) 0 --#define read_console_seq() 0 --#define latched_seq_write(dst, src) --#define kernel_sync_mode() false ++ + console_lock(); + + /* @@ -558,17 +563,13 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> + console_unlock(); + break; + } - --static u64 exclusive_console_stop_seq; --static unsigned long console_dropped; ++ + if (!(con->flags & CON_EXTENDED) && dropped) { + dropped_len = snprintf(dropped_text, 64, + "** %lu printk messages dropped **\n", + dropped); + dropped = 0; - --static size_t record_print_text(const struct printk_record *r, -- bool syslog, bool time) ++ + con->write(con, dropped_text, dropped_len); + printk_delay(r.info->level); + } @@ -646,7 +647,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #endif /* CONFIG_PRINTK */ -@@ -2711,36 +2602,6 @@ +@@ -2711,36 +2602,6 @@ int is_console_locked(void) } EXPORT_SYMBOL(is_console_locked); @@ -683,7 +684,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /** * console_unlock - unlock the console system * -@@ -2757,139 +2618,13 @@ +@@ -2757,139 +2618,13 @@ static inline int can_use_console(void) */ void console_unlock(void) { @@ -823,7 +824,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } EXPORT_SYMBOL(console_unlock); -@@ -2939,19 +2674,20 @@ +@@ -2939,19 +2674,20 @@ void console_unblank(void) */ void console_flush_on_panic(enum con_flush_mode mode) { @@ -856,7 +857,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> console_unlock(); } -@@ -3087,6 +2823,7 @@ +@@ -3087,6 +2823,7 @@ static int try_enable_new_console(struct console *newcon, bool user_specified) void register_console(struct console *newcon) { struct console *bcon = NULL; @@ -864,7 +865,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> int err; for_each_console(bcon) { -@@ -3109,6 +2846,8 @@ +@@ -3109,6 +2846,8 @@ void register_console(struct console *newcon) } } @@ -873,7 +874,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (console_drivers && console_drivers->flags & CON_BOOT) bcon = console_drivers; -@@ -3173,27 +2912,21 @@ +@@ -3173,27 +2912,21 @@ void register_console(struct console *newcon) if (newcon->flags & CON_EXTENDED) nr_ext_console_drivers++; @@ -915,7 +916,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> console_unlock(); console_sysfs_notify(); -@@ -3267,6 +3000,9 @@ +@@ -3267,6 +3000,9 @@ int unregister_console(struct console *console) console_unlock(); console_sysfs_notify(); @@ -925,7 +926,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (console->exit) res = console->exit(console); -@@ -3349,6 +3085,15 @@ +@@ -3349,6 +3085,15 @@ static int __init printk_late_init(void) unregister_console(con); } } @@ -941,7 +942,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> ret = cpuhp_setup_state_nocalls(CPUHP_PRINTK_DEAD, "printk:dead", NULL, console_cpu_notify); WARN_ON(ret < 0); -@@ -3364,7 +3109,6 @@ +@@ -3364,7 +3109,6 @@ late_initcall(printk_late_init); * Delayed printk version, for scheduler-internal messages: */ #define PRINTK_PENDING_WAKEUP 0x01 @@ -949,7 +950,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> static DEFINE_PER_CPU(int, printk_pending); -@@ -3372,14 +3116,8 @@ +@@ -3372,14 +3116,8 @@ static void wake_up_klogd_work_func(struct irq_work *irq_work) { int pending = __this_cpu_xchg(printk_pending, 0); @@ -965,7 +966,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static DEFINE_PER_CPU(struct irq_work, wake_up_klogd_work) = -@@ -3400,13 +3138,6 @@ +@@ -3400,18 +3138,11 @@ void wake_up_klogd(void) void defer_console_output(void) { @@ -979,3 +980,12 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } void printk_trigger_flush(void) + { +- defer_console_output(); ++ wake_up_klogd(); + } + + int vprintk_deferred(const char *fmt, va_list args) +-- +2.33.1 + diff --git a/debian/patches-rt/printk__remove_deferred_printing.patch b/debian/patches-rt/0013-printk-remove-deferred-printing.patch index f695693d2..2ad8aed59 100644 --- a/debian/patches-rt/printk__remove_deferred_printing.patch +++ b/debian/patches-rt/0013-printk-remove-deferred-printing.patch @@ -1,9 +1,8 @@ -Subject: printk: remove deferred printing -From: John Ogness <john.ogness@linutronix.de> -Date: Mon Nov 30 01:42:08 2020 +0106 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 0e9e3ca3628d40dae9366055879ce7dbc771e01c Mon Sep 17 00:00:00 2001 From: John Ogness <john.ogness@linutronix.de> +Date: Mon, 30 Nov 2020 01:42:08 +0106 +Subject: [PATCH 013/158] printk: remove deferred printing +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Since printing occurs either atomically or from the printing kthread, there is no need for any deferring or tracking possible @@ -12,41 +11,41 @@ tracking. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - --- - arch/arm/kernel/smp.c | 2 - - arch/powerpc/kexec/crash.c | 3 - - arch/x86/kernel/dumpstack_32.c | 2 - - arch/x86/kernel/dumpstack_64.c | 3 + - arch/x86/kernel/i8259.c | 3 - - arch/x86/kernel/unwind_frame.c | 16 +++----- - arch/x86/kernel/unwind_orc.c | 2 - - drivers/char/random.c | 5 +- - include/linux/printk.h | 34 ------------------ - include/linux/suspend.h | 10 +---- - kernel/power/main.c | 10 +---- - kernel/printk/Makefile | 1 - kernel/printk/internal.h | 36 ------------------- - kernel/printk/printk.c | 74 +++++++++++++--------------------------- - kernel/printk/printk_safe.c | 52 ---------------------------- - kernel/sched/core.c | 9 ++-- - kernel/sched/deadline.c | 2 - - kernel/sched/fair.c | 5 -- - kernel/sched/psi.c | 14 +++---- - kernel/sched/rt.c | 2 - - kernel/time/clockevents.c | 9 +--- - kernel/time/ntp.c | 14 ++----- - kernel/time/timekeeping.c | 30 ++++++++-------- - kernel/time/timekeeping_debug.c | 2 - - kernel/workqueue.c | 4 -- - lib/ratelimit.c | 4 -- + arch/arm/kernel/smp.c | 2 - + arch/powerpc/kexec/crash.c | 3 -- + arch/x86/kernel/dumpstack_32.c | 2 +- + arch/x86/kernel/dumpstack_64.c | 3 +- + arch/x86/kernel/i8259.c | 3 +- + arch/x86/kernel/unwind_frame.c | 16 ++++--- + arch/x86/kernel/unwind_orc.c | 2 +- + drivers/char/random.c | 5 +-- + include/linux/printk.h | 34 --------------- + include/linux/suspend.h | 10 +---- + kernel/power/main.c | 10 ++--- + kernel/printk/Makefile | 1 - + kernel/printk/internal.h | 36 ---------------- + kernel/printk/printk.c | 74 +++++++++++---------------------- + kernel/printk/printk_safe.c | 52 ----------------------- + kernel/sched/core.c | 9 ++-- + kernel/sched/deadline.c | 2 +- + kernel/sched/fair.c | 5 +-- + kernel/sched/psi.c | 14 +++---- + kernel/sched/rt.c | 2 +- + kernel/time/clockevents.c | 9 ++-- + kernel/time/ntp.c | 14 +++---- + kernel/time/timekeeping.c | 30 ++++++------- + kernel/time/timekeeping_debug.c | 2 +- + kernel/workqueue.c | 4 -- + lib/ratelimit.c | 4 +- 26 files changed, 83 insertions(+), 265 deletions(-) - delete mode 100644 kernel/printk/internal.h delete mode 100644 kernel/printk/printk_safe.c ---- + +diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c +index 842427ff2b3c..b943e2df9540 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c -@@ -667,9 +667,7 @@ +@@ -667,9 +667,7 @@ static void do_handle_IPI(int ipinr) break; case IPI_CPU_BACKTRACE: @@ -56,9 +55,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> break; default: +diff --git a/arch/powerpc/kexec/crash.c b/arch/powerpc/kexec/crash.c +index 22ceeeb705ab..d5359701f787 100644 --- a/arch/powerpc/kexec/crash.c +++ b/arch/powerpc/kexec/crash.c -@@ -312,9 +312,6 @@ +@@ -312,9 +312,6 @@ void default_machine_crash_shutdown(struct pt_regs *regs) unsigned int i; int (*old_handler)(struct pt_regs *regs); @@ -68,9 +69,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * This function is only called after the system * has panicked or is otherwise in a critical state. +diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c +index 722fd712e1cf..82cc3a7be6bd 100644 --- a/arch/x86/kernel/dumpstack_32.c +++ b/arch/x86/kernel/dumpstack_32.c -@@ -141,7 +141,7 @@ +@@ -141,7 +141,7 @@ int get_stack_info(unsigned long *stack, struct task_struct *task, */ if (visit_mask) { if (*visit_mask & (1UL << info->type)) { @@ -79,9 +82,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> goto unknown; } *visit_mask |= 1UL << info->type; +diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c +index 6c5defd6569a..5f725b0ceb29 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c -@@ -207,7 +207,8 @@ +@@ -207,7 +207,8 @@ int get_stack_info(unsigned long *stack, struct task_struct *task, if (visit_mask) { if (*visit_mask & (1UL << info->type)) { if (task == current) @@ -91,9 +96,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> goto unknown; } *visit_mask |= 1UL << info->type; +diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c +index 15aefa3f3e18..52af9a89ad47 100644 --- a/arch/x86/kernel/i8259.c +++ b/arch/x86/kernel/i8259.c -@@ -207,8 +207,7 @@ +@@ -207,8 +207,7 @@ static void mask_and_ack_8259A(struct irq_data *data) * lets ACK and report it. [once per IRQ] */ if (!(spurious_irq_mask & irqmask)) { @@ -103,9 +110,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> spurious_irq_mask |= irqmask; } atomic_inc(&irq_err_count); +diff --git a/arch/x86/kernel/unwind_frame.c b/arch/x86/kernel/unwind_frame.c +index d7c44b257f7f..2d0361cd304f 100644 --- a/arch/x86/kernel/unwind_frame.c +++ b/arch/x86/kernel/unwind_frame.c -@@ -41,9 +41,9 @@ +@@ -41,9 +41,9 @@ static void unwind_dump(struct unwind_state *state) dumped_before = true; @@ -118,7 +127,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> for (sp = PTR_ALIGN(state->orig_sp, sizeof(long)); sp; sp = PTR_ALIGN(stack_info.next_sp, sizeof(long))) { -@@ -59,13 +59,11 @@ +@@ -59,13 +59,11 @@ static void unwind_dump(struct unwind_state *state) if (zero) { if (!prev_zero) @@ -134,7 +143,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } } } -@@ -342,13 +340,13 @@ +@@ -342,13 +340,13 @@ bool unwind_next_frame(struct unwind_state *state) goto the_end; if (state->regs) { @@ -150,6 +159,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> "WARNING: kernel stack frame pointer at %p in %s:%d has bad value %p\n", state->bp, state->task->comm, state->task->pid, next_bp); +diff --git a/arch/x86/kernel/unwind_orc.c b/arch/x86/kernel/unwind_orc.c +index a1202536fc57..a26a7c3849f5 100644 --- a/arch/x86/kernel/unwind_orc.c +++ b/arch/x86/kernel/unwind_orc.c @@ -9,7 +9,7 @@ @@ -161,9 +172,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #define orc_warn_current(args...) \ ({ \ +diff --git a/drivers/char/random.c b/drivers/char/random.c +index 605969ed0f96..860900470e17 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c -@@ -1507,9 +1507,8 @@ +@@ -1507,9 +1507,8 @@ static void _warn_unseeded_randomness(const char *func_name, void *caller, print_once = true; #endif if (__ratelimit(&unseeded_warning)) @@ -175,12 +188,15 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } /* +diff --git a/include/linux/printk.h b/include/linux/printk.h +index db633f2a6c46..5f6eba74825f 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h -@@ -162,21 +162,6 @@ +@@ -161,21 +161,6 @@ int vprintk(const char *fmt, va_list args); + asmlinkage __printf(1, 2) __cold int _printk(const char *fmt, ...); - /* +-/* - * Special printk facility for scheduler/timekeeping use only, _DO_NOT_USE_ ! - */ -__printf(1, 2) __cold int _printk_deferred(const char *fmt, ...); @@ -195,11 +211,10 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> -#define printk_deferred_enter __printk_safe_enter -#define printk_deferred_exit __printk_safe_exit - --/* + /* * Please don't use printk_ratelimit(), because it shares ratelimiting state * with all other unrelated printk_ratelimit() callsites. Instead use - * printk_ratelimited() or plain old __ratelimit(). -@@ -216,19 +201,6 @@ +@@ -216,19 +201,6 @@ int _printk(const char *s, ...) { return 0; } @@ -219,7 +234,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> static inline int printk_ratelimit(void) { -@@ -475,8 +447,6 @@ +@@ -475,8 +447,6 @@ struct pi_entry { * See the vsnprintf() documentation for format string extensions over C99. */ #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) @@ -228,7 +243,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /** * pr_emerg - Print an emergency-level message -@@ -614,13 +584,9 @@ +@@ -614,13 +584,9 @@ struct pi_entry { #ifdef CONFIG_PRINTK #define printk_once(fmt, ...) \ DO_ONCE_LITE(printk, fmt, ##__VA_ARGS__) @@ -242,9 +257,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #endif #define pr_emerg_once(fmt, ...) \ +diff --git a/include/linux/suspend.h b/include/linux/suspend.h +index 8af13ba60c7e..79b6933ef8a0 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h -@@ -550,23 +550,17 @@ +@@ -550,23 +550,17 @@ static inline void unlock_system_sleep(void) {} #ifdef CONFIG_PM_SLEEP_DEBUG extern bool pm_print_times_enabled; extern bool pm_debug_messages_on; @@ -270,9 +287,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifdef CONFIG_PM_AUTOSLEEP /* kernel/power/autosleep.c */ +diff --git a/kernel/power/main.c b/kernel/power/main.c +index 44169f3081fd..eaa725ca079c 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c -@@ -543,14 +543,13 @@ +@@ -543,14 +543,13 @@ static int __init pm_debug_messages_setup(char *str) __setup("pm_debug_messages", pm_debug_messages_setup); /** @@ -289,7 +308,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> { struct va_format vaf; va_list args; -@@ -563,10 +562,7 @@ +@@ -563,10 +562,7 @@ void __pm_pr_dbg(bool defer, const char *fmt, ...) vaf.fmt = fmt; vaf.va = &args; @@ -301,6 +320,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> va_end(args); } +diff --git a/kernel/printk/Makefile b/kernel/printk/Makefile +index d118739874c0..bc6b856a0ff4 100644 --- a/kernel/printk/Makefile +++ b/kernel/printk/Makefile @@ -1,6 +1,5 @@ @@ -310,6 +331,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> obj-$(CONFIG_A11Y_BRAILLE_CONSOLE) += braille.o obj-$(CONFIG_PRINTK) += printk_ringbuffer.o obj-$(CONFIG_PRINTK_INDEX) += index.o +diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h +index 9f3ed2fdb721..de8ab059dd96 100644 --- a/kernel/printk/internal.h +++ b/kernel/printk/internal.h @@ -2,7 +2,6 @@ @@ -320,7 +343,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifdef CONFIG_PRINTK -@@ -12,41 +11,6 @@ +@@ -12,41 +11,6 @@ enum printk_info_flags { LOG_CONT = 8, /* text is a fragment of a continuation line */ }; @@ -362,6 +385,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - -static inline bool printk_percpu_data_ready(void) { return false; } #endif /* CONFIG_PRINTK */ +diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c +index aefc850bff93..6bb0cab585d0 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -44,6 +44,7 @@ @@ -372,7 +397,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #include <linux/kgdb.h> #include <linux/kthread.h> #include <linux/clocksource.h> -@@ -228,19 +229,7 @@ +@@ -228,19 +229,7 @@ static int nr_ext_console_drivers; static int __down_trylock_console_sem(unsigned long ip) { @@ -393,7 +418,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return 1; mutex_acquire(&console_lock_dep_map, 0, 1, ip); return 0; -@@ -249,13 +238,9 @@ +@@ -249,13 +238,9 @@ static int __down_trylock_console_sem(unsigned long ip) static void __up_console_sem(unsigned long ip) { @@ -407,7 +432,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } #define up_console_sem() __up_console_sem(_RET_IP_) -@@ -417,7 +402,7 @@ +@@ -417,7 +402,7 @@ static struct printk_ringbuffer *prb = &printk_rb_static; */ static bool __printk_percpu_data_ready __read_mostly; @@ -416,7 +441,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> { return __printk_percpu_data_ready; } -@@ -2023,9 +2008,9 @@ +@@ -2023,9 +2008,9 @@ static u16 printk_sprint(char *text, u16 size, int facility, } __printf(4, 0) @@ -429,7 +454,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> { const u32 caller_id = printk_caller_id(); struct prb_reserved_entry e; -@@ -2171,11 +2156,28 @@ +@@ -2171,11 +2156,28 @@ asmlinkage int vprintk_emit(int facility, int level, } EXPORT_SYMBOL(vprintk_emit); @@ -460,7 +485,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> asmlinkage __visible int _printk(const char *fmt, ...) { -@@ -3136,35 +3138,9 @@ +@@ -3136,37 +3138,11 @@ void wake_up_klogd(void) preempt_enable(); } @@ -470,9 +495,9 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - void printk_trigger_flush(void) { -- defer_console_output(); --} -- + wake_up_klogd(); + } + -int vprintk_deferred(const char *fmt, va_list args) -{ - int r; @@ -493,10 +518,14 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - va_end(args); - - return r; -+ wake_up_klogd(); - } - +-} +- /* + * printk rate limiting, lifted from the networking subsystem. + * +diff --git a/kernel/printk/printk_safe.c b/kernel/printk/printk_safe.c +deleted file mode 100644 +index ef0f9a2044da..000000000000 --- a/kernel/printk/printk_safe.c +++ /dev/null @@ -1,52 +0,0 @@ @@ -552,9 +581,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - return vprintk_default(fmt, args); -} -EXPORT_SYMBOL(vprintk); +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index 0d12ec7be301..c5f12805300e 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2944,9 +2944,8 @@ +@@ -2944,9 +2944,8 @@ void force_compatible_cpus_allowed_ptr(struct task_struct *p) out_set_mask: if (printk_ratelimit()) { @@ -566,7 +597,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } WARN_ON(set_cpus_allowed_ptr(p, override_mask)); -@@ -3376,8 +3375,8 @@ +@@ -3376,8 +3375,8 @@ static int select_fallback_rq(int cpu, struct task_struct *p) * leave kernel. */ if (p->mm && printk_ratelimit()) { @@ -577,9 +608,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } } +diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c +index e94314633b39..fd7c4f972aaf 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c -@@ -800,7 +800,7 @@ +@@ -800,7 +800,7 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se) * entity. */ if (dl_time_before(dl_se->deadline, rq_clock(rq))) { @@ -588,9 +621,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> dl_se->deadline = rq_clock(rq) + pi_of(dl_se)->dl_deadline; dl_se->runtime = pi_of(dl_se)->dl_runtime; } +diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c +index 6f16dfb74246..e3e667b28f41 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c -@@ -4237,10 +4237,7 @@ +@@ -4237,10 +4237,7 @@ static inline void check_schedstat_required(void) trace_sched_stat_iowait_enabled() || trace_sched_stat_blocked_enabled() || trace_sched_stat_runtime_enabled()) { @@ -602,9 +637,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } #endif } +diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c +index 1652f2bb54b7..ab54b2012469 100644 --- a/kernel/sched/psi.c +++ b/kernel/sched/psi.c -@@ -710,10 +710,10 @@ +@@ -710,10 +710,10 @@ static void psi_group_change(struct psi_group *group, int cpu, if (groupc->tasks[t]) { groupc->tasks[t]--; } else if (!psi_bug) { @@ -619,7 +656,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> psi_bug = 1; } } -@@ -779,9 +779,9 @@ +@@ -779,9 +779,9 @@ static void psi_flags_change(struct task_struct *task, int clear, int set) if (((task->psi_flags & set) || (task->psi_flags & clear) != clear) && !psi_bug) { @@ -632,9 +669,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> psi_bug = 1; } +diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c +index bfef3f39b555..ef8228d19382 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c -@@ -977,7 +977,7 @@ +@@ -977,7 +977,7 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq) */ if (likely(rt_b->rt_runtime)) { rt_rq->rt_throttled = 1; @@ -643,9 +682,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } else { /* * In case we did anyway, make it go away, +diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c +index 003ccf338d20..00fc43605c6b 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c -@@ -203,8 +203,7 @@ +@@ -203,8 +203,7 @@ static int clockevents_increase_min_delta(struct clock_event_device *dev) { /* Nothing to do if we already reached the limit */ if (dev->min_delta_ns >= MIN_DELTA_LIMIT) { @@ -655,7 +696,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> dev->next_event = KTIME_MAX; return -ETIME; } -@@ -217,10 +216,8 @@ +@@ -217,10 +216,8 @@ static int clockevents_increase_min_delta(struct clock_event_device *dev) if (dev->min_delta_ns > MIN_DELTA_LIMIT) dev->min_delta_ns = MIN_DELTA_LIMIT; @@ -668,9 +709,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return 0; } +diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c +index 406dccb79c2b..829d7797811f 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c -@@ -939,9 +939,7 @@ +@@ -939,9 +939,7 @@ static long hardpps_update_freq(struct pps_normtime freq_norm) time_status |= STA_PPSERROR; pps_errcnt++; pps_dec_freq_interval(); @@ -681,7 +724,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return 0; } -@@ -954,8 +952,7 @@ +@@ -954,8 +952,7 @@ static long hardpps_update_freq(struct pps_normtime freq_norm) delta = shift_right(ftemp - pps_freq, NTP_SCALE_SHIFT); pps_freq = ftemp; if (delta > PPS_MAXWANDER || delta < -PPS_MAXWANDER) { @@ -691,7 +734,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> time_status |= STA_PPSWANDER; pps_stbcnt++; pps_dec_freq_interval(); -@@ -999,9 +996,8 @@ +@@ -999,9 +996,8 @@ static void hardpps_update_phase(long error) * the time offset is updated. */ if (jitter > (pps_jitter << PPS_POPCORN)) { @@ -703,7 +746,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> time_status |= STA_PPSJITTER; pps_jitcnt++; } else if (time_status & STA_PPSTIME) { -@@ -1058,7 +1054,7 @@ +@@ -1058,7 +1054,7 @@ void __hardpps(const struct timespec64 *phase_ts, const struct timespec64 *raw_t time_status |= STA_PPSJITTER; /* restart the frequency calibration interval */ pps_fbase = *raw_ts; @@ -712,9 +755,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return; } +diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c +index b348749a9fc6..a81beb312038 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c -@@ -203,22 +203,23 @@ +@@ -203,22 +203,23 @@ static void timekeeping_check_update(struct timekeeper *tk, u64 offset) const char *name = tk->tkr_mono.clock->name; if (offset > max_cycles) { @@ -747,7 +792,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> tk->last_warning = jiffies; } tk->underflow_seen = 0; -@@ -226,9 +227,10 @@ +@@ -226,9 +227,10 @@ static void timekeeping_check_update(struct timekeeper *tk, u64 offset) if (tk->overflow_seen) { if (jiffies - tk->last_warning > WARNING_FREQ) { @@ -761,7 +806,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> tk->last_warning = jiffies; } tk->overflow_seen = 0; -@@ -1669,9 +1671,7 @@ +@@ -1669,9 +1671,7 @@ static void __timekeeping_inject_sleeptime(struct timekeeper *tk, const struct timespec64 *delta) { if (!timespec64_valid_strict(delta)) { @@ -772,9 +817,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return; } tk_xtime_add(tk, delta); +diff --git a/kernel/time/timekeeping_debug.c b/kernel/time/timekeeping_debug.c +index b73e8850e58d..149cc4b08d8e 100644 --- a/kernel/time/timekeeping_debug.c +++ b/kernel/time/timekeeping_debug.c -@@ -49,7 +49,7 @@ +@@ -49,7 +49,7 @@ void tk_debug_account_sleep_time(const struct timespec64 *t) int bin = min(fls(t->tv_sec), NUM_BINS-1); sleep_time_bin[bin]++; @@ -783,9 +830,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> (s64)t->tv_sec, t->tv_nsec / NSEC_PER_MSEC); } +diff --git a/kernel/workqueue.c b/kernel/workqueue.c +index 76988f39ed5a..86b6c5a9b274 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c -@@ -4836,9 +4836,7 @@ +@@ -4836,9 +4836,7 @@ void show_workqueue_state(void) * drivers that queue work while holding locks * also taken in their write paths. */ @@ -795,7 +844,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } raw_spin_unlock_irqrestore(&pwq->pool->lock, flags); /* -@@ -4862,7 +4860,6 @@ +@@ -4862,7 +4860,6 @@ void show_workqueue_state(void) * queue work while holding locks also taken in their write * paths. */ @@ -803,7 +852,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> pr_info("pool %d:", pool->id); pr_cont_pool_info(pool); pr_cont(" hung=%us workers=%d", -@@ -4877,7 +4874,6 @@ +@@ -4877,7 +4874,6 @@ void show_workqueue_state(void) first = false; } pr_cont("\n"); @@ -811,9 +860,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> next_pool: raw_spin_unlock_irqrestore(&pool->lock, flags); /* +diff --git a/lib/ratelimit.c b/lib/ratelimit.c +index e01a93f46f83..524cf65dce53 100644 --- a/lib/ratelimit.c +++ b/lib/ratelimit.c -@@ -47,9 +47,7 @@ +@@ -47,9 +47,7 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func) if (time_is_before_jiffies(rs->begin + rs->interval)) { if (rs->missed) { if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE)) { @@ -824,3 +875,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> rs->missed = 0; } } +-- +2.33.1 + diff --git a/debian/patches-rt/printk__add_console_handover.patch b/debian/patches-rt/0014-printk-add-console-handover.patch index c5776921f..8d53ecd59 100644 --- a/debian/patches-rt/printk__add_console_handover.patch +++ b/debian/patches-rt/0014-printk-add-console-handover.patch @@ -1,9 +1,8 @@ -Subject: printk: add console handover -From: John Ogness <john.ogness@linutronix.de> -Date: Mon Nov 30 01:42:09 2020 +0106 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From fc2ef92c5aa214e6996feec1474e6ef001b3ee51 Mon Sep 17 00:00:00 2001 From: John Ogness <john.ogness@linutronix.de> +Date: Mon, 30 Nov 2020 01:42:09 +0106 +Subject: [PATCH 014/158] printk: add console handover +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz If earlyprintk is used, a boot console will print directly to the console immediately. The boot console will unregister itself as soon @@ -22,14 +21,13 @@ take over. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - - --- - include/linux/console.h | 1 + - kernel/printk/printk.c | 15 +++++++++++++-- + include/linux/console.h | 1 + + kernel/printk/printk.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) ---- + +diff --git a/include/linux/console.h b/include/linux/console.h +index 58939969541d..487a4266ab2c 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -143,6 +143,7 @@ static inline int con_debug_leave(void) @@ -40,9 +38,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> struct console { char name[16]; +diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c +index 6bb0cab585d0..47f5387ad4ff 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -1746,6 +1746,8 @@ static bool console_may_sync(struct cons +@@ -1746,6 +1746,8 @@ static bool console_may_sync(struct console *con) return false; if (con->write_atomic && kernel_sync_mode()) return true; @@ -51,7 +51,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (con->write && (con->flags & CON_BOOT) && !con->thread) return true; return false; -@@ -1761,7 +1763,14 @@ static bool call_sync_console_driver(str +@@ -1761,7 +1763,14 @@ static bool call_sync_console_driver(struct console *con, const char *text, size return true; } @@ -67,7 +67,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (console_trylock()) { con->write(con, text, text_len); console_unlock(); -@@ -2891,8 +2900,10 @@ void register_console(struct console *ne +@@ -2891,8 +2900,10 @@ void register_console(struct console *newcon) * the real console are the same physical device, it's annoying to * see the beginning boot messages twice */ @@ -79,3 +79,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Put this console in the list - keep the +-- +2.33.1 + diff --git a/debian/patches-rt/printk__add_pr_flush.patch b/debian/patches-rt/0015-printk-add-pr_flush.patch index 11879f560..90d007ddd 100644 --- a/debian/patches-rt/printk__add_pr_flush.patch +++ b/debian/patches-rt/0015-printk-add-pr_flush.patch @@ -1,9 +1,8 @@ -Subject: printk: add pr_flush() -From: John Ogness <john.ogness@linutronix.de> -Date: Mon Nov 30 01:42:10 2020 +0106 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 3a7c5bee3b806769457858abb072fa19ad898547 Mon Sep 17 00:00:00 2001 From: John Ogness <john.ogness@linutronix.de> +Date: Mon, 30 Nov 2020 01:42:10 +0106 +Subject: [PATCH 015/158] printk: add pr_flush() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Provide a function to allow waiting for console printers to catch up to the latest logged message. @@ -15,17 +14,18 @@ panic(), print_oops_end_marker(), report_bug(), kmsg_dump(). Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - --- - include/linux/printk.h | 7 ++++ - kernel/panic.c | 28 ++++++++++------ - kernel/printk/printk.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++ - lib/bug.c | 1 + include/linux/printk.h | 7 ++++ + kernel/panic.c | 28 +++++++++------ + kernel/printk/printk.c | 81 ++++++++++++++++++++++++++++++++++++++++++ + lib/bug.c | 1 + 4 files changed, 106 insertions(+), 11 deletions(-) ---- + +diff --git a/include/linux/printk.h b/include/linux/printk.h +index 5f6eba74825f..f1b9cd8d11d6 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h -@@ -161,6 +161,8 @@ int vprintk(const char *fmt, va_list arg +@@ -161,6 +161,8 @@ int vprintk(const char *fmt, va_list args); asmlinkage __printf(1, 2) __cold int _printk(const char *fmt, ...); @@ -34,7 +34,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Please don't use printk_ratelimit(), because it shares ratelimiting state * with all other unrelated printk_ratelimit() callsites. Instead use -@@ -201,6 +203,11 @@ int _printk(const char *s, ...) +@@ -202,6 +204,11 @@ int _printk(const char *s, ...) return 0; } @@ -46,6 +46,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> static inline int printk_ratelimit(void) { return 0; +diff --git a/kernel/panic.c b/kernel/panic.c +index cefd7d82366f..84c5775d4944 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -178,12 +178,28 @@ static void panic_print_sys_info(void) @@ -110,9 +112,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } /* +diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c +index 47f5387ad4ff..84e17c974a15 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -3285,6 +3285,12 @@ void kmsg_dump(enum kmsg_dump_reason rea +@@ -3290,6 +3290,12 @@ void kmsg_dump(enum kmsg_dump_reason reason) sync_mode = true; pr_info("enabled sync mode\n"); } @@ -125,7 +129,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } rcu_read_lock(); -@@ -3606,3 +3612,78 @@ bool kgdb_roundup_delay(unsigned int cpu +@@ -3611,3 +3617,78 @@ bool kgdb_roundup_delay(unsigned int cpu) } EXPORT_SYMBOL(kgdb_roundup_delay); #endif /* CONFIG_SMP */ @@ -204,9 +208,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +} +EXPORT_SYMBOL(pr_flush); +#endif /* CONFIG_PRINTK */ +diff --git a/lib/bug.c b/lib/bug.c +index 45a0584f6541..03a87df69ed2 100644 --- a/lib/bug.c +++ b/lib/bug.c -@@ -206,6 +206,7 @@ enum bug_trap_type report_bug(unsigned l +@@ -206,6 +206,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs) else pr_crit("Kernel BUG at %pB [verbose debug info unavailable]\n", (void *)bugaddr); @@ -214,3 +220,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return BUG_TRAP_TYPE_BUG; } +-- +2.33.1 + diff --git a/debian/patches-rt/printk__Enhance_the_condition_check_of_msleep_in_pr_flush.patch b/debian/patches-rt/0016-printk-Enhance-the-condition-check-of-msleep-in-pr_f.patch index 29274c007..2804a4bb8 100644 --- a/debian/patches-rt/printk__Enhance_the_condition_check_of_msleep_in_pr_flush.patch +++ b/debian/patches-rt/0016-printk-Enhance-the-condition-check-of-msleep-in-pr_f.patch @@ -1,9 +1,9 @@ -Subject: printk: Enhance the condition check of msleep in pr_flush() -From: Chao Qin <chao.qin@intel.com> -Date: Mon Jul 19 10:26:50 2021 +0800 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 31cb56b19e7f68f025128b54aa0b1b07b0a54e4f Mon Sep 17 00:00:00 2001 From: Chao Qin <chao.qin@intel.com> +Date: Mon, 19 Jul 2021 10:26:50 +0800 +Subject: [PATCH 016/158] printk: Enhance the condition check of msleep in + pr_flush() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz There is msleep in pr_flush(). If call WARN() in the early boot stage such as in early_initcall, pr_flush() will run into msleep @@ -21,14 +21,15 @@ Reviewed-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/lkml/20210719022649.3444072-1-chao.qin@intel.com - --- - kernel/printk/printk.c | 4 +++- + kernel/printk/printk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---- + +diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c +index 84e17c974a15..0cc8e8acf545 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -3649,7 +3649,9 @@ bool pr_flush(int timeout_ms, bool reset +@@ -3654,7 +3654,9 @@ bool pr_flush(int timeout_ms, bool reset_on_progress) u64 diff; u64 seq; @@ -39,3 +40,6 @@ Link: https://lore.kernel.org/lkml/20210719022649.3444072-1-chao.qin@intel.com seq = prb_next_seq(prb); +-- +2.33.1 + diff --git a/debian/patches-rt/sched-Switch-wait_task_inactive-to-HRTIMER_MODE_REL_.patch b/debian/patches-rt/0017-sched-Switch-wait_task_inactive-to-HRTIMER_MODE_REL_.patch index 8c602262e..69e6b1074 100644 --- a/debian/patches-rt/sched-Switch-wait_task_inactive-to-HRTIMER_MODE_REL_.patch +++ b/debian/patches-rt/0017-sched-Switch-wait_task_inactive-to-HRTIMER_MODE_REL_.patch @@ -1,7 +1,9 @@ +From c12c9235290c517ea3420483ee9b9c9d84ecf43e Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 24 Aug 2021 22:47:37 +0200 -Subject: [PATCH] sched: Switch wait_task_inactive to HRTIMER_MODE_REL_HARD -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 017/158] sched: Switch wait_task_inactive to + HRTIMER_MODE_REL_HARD +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz With PREEMPT_RT enabled all hrtimers callbacks will be invoked in softirq mode unless they are explicitly marked as HRTIMER_MODE_HARD. @@ -24,12 +26,14 @@ Cc: stable-rt@vger.kernel.org Link: https://lkml.kernel.org/r/20210826170408.vm7rlj7odslshwch@linutronix.de Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - kernel/sched/core.c | 2 +- + kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index c5f12805300e..9d31a1b174d2 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -3250,7 +3250,7 @@ unsigned long wait_task_inactive(struct +@@ -3250,7 +3250,7 @@ unsigned long wait_task_inactive(struct task_struct *p, unsigned int match_state ktime_t to = NSEC_PER_SEC / HZ; set_current_state(TASK_UNINTERRUPTIBLE); @@ -38,3 +42,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> continue; } +-- +2.33.1 + diff --git a/debian/patches-rt/kthread-Move-prio-affinite-change-into-the-newly-cre.patch b/debian/patches-rt/0018-kthread-Move-prio-affinite-change-into-the-newly-cre.patch index 22b674ddc..00502fdad 100644 --- a/debian/patches-rt/kthread-Move-prio-affinite-change-into-the-newly-cre.patch +++ b/debian/patches-rt/0018-kthread-Move-prio-affinite-change-into-the-newly-cre.patch @@ -1,8 +1,9 @@ +From 0b740c2058834e8b5750dad59245ca0386949dc9 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 10 Nov 2020 12:38:47 +0100 -Subject: [PATCH] kthread: Move prio/affinite change into the newly created - thread -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 018/158] kthread: Move prio/affinite change into the newly + created thread +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz With enabled threaded interrupts the nouveau driver reported the following: @@ -31,9 +32,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/a23a826af7c108ea5651e73b8fbae5e653f16e86.camel@gmx.de --- - kernel/kthread.c | 16 ++++++++-------- + kernel/kthread.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) +diff --git a/kernel/kthread.c b/kernel/kthread.c +index 5b37a8567168..4a4d7092a2d8 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -270,6 +270,7 @@ EXPORT_SYMBOL_GPL(kthread_parkme); @@ -58,7 +61,7 @@ Link: https://lkml.kernel.org/r/a23a826af7c108ea5651e73b8fbae5e653f16e86.camel@g /* OK, tell user we're spawned, wait for stop or wakeup */ __set_current_state(TASK_UNINTERRUPTIBLE); create->result = current; -@@ -397,7 +405,6 @@ struct task_struct *__kthread_create_on_ +@@ -397,7 +405,6 @@ struct task_struct *__kthread_create_on_node(int (*threadfn)(void *data), } task = create->result; if (!IS_ERR(task)) { @@ -66,7 +69,7 @@ Link: https://lkml.kernel.org/r/a23a826af7c108ea5651e73b8fbae5e653f16e86.camel@g char name[TASK_COMM_LEN]; /* -@@ -406,13 +413,6 @@ struct task_struct *__kthread_create_on_ +@@ -406,13 +413,6 @@ struct task_struct *__kthread_create_on_node(int (*threadfn)(void *data), */ vsnprintf(name, sizeof(name), namefmt, args); set_task_comm(task, name); @@ -80,3 +83,6 @@ Link: https://lkml.kernel.org/r/a23a826af7c108ea5651e73b8fbae5e653f16e86.camel@g } kfree(create); return task; +-- +2.33.1 + diff --git a/debian/patches-rt/genirq-Move-prio-assignment-into-the-newly-created-t.patch b/debian/patches-rt/0019-genirq-Move-prio-assignment-into-the-newly-created-t.patch index 4e2c06796..18cbc3c3f 100644 --- a/debian/patches-rt/genirq-Move-prio-assignment-into-the-newly-created-t.patch +++ b/debian/patches-rt/0019-genirq-Move-prio-assignment-into-the-newly-created-t.patch @@ -1,7 +1,9 @@ +From 0388bb91ccaa9974331e9f4390b40759f143faa6 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 10 Nov 2020 12:38:48 +0100 -Subject: [PATCH] genirq: Move prio assignment into the newly created thread -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 019/158] genirq: Move prio assignment into the newly created + thread +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz With enabled threaded interrupts the nouveau driver reported the following: @@ -32,9 +34,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/a23a826af7c108ea5651e73b8fbae5e653f16e86.camel@gmx.de --- - kernel/irq/manage.c | 4 ++-- + kernel/irq/manage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) +diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c +index 27667e82ecc9..66d51963e837 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -1259,6 +1259,8 @@ static int irq_thread(void *data) @@ -46,7 +50,7 @@ Link: https://lkml.kernel.org/r/a23a826af7c108ea5651e73b8fbae5e653f16e86.camel@g if (force_irqthreads() && test_bit(IRQTF_FORCED_THREAD, &action->thread_flags)) handler_fn = irq_forced_thread_fn; -@@ -1424,8 +1426,6 @@ setup_irq_thread(struct irqaction *new, +@@ -1424,8 +1426,6 @@ setup_irq_thread(struct irqaction *new, unsigned int irq, bool secondary) if (IS_ERR(t)) return PTR_ERR(t); @@ -55,3 +59,6 @@ Link: https://lkml.kernel.org/r/a23a826af7c108ea5651e73b8fbae5e653f16e86.camel@g /* * We keep the reference to the task struct even if * the thread dies to avoid that the interrupt code +-- +2.33.1 + diff --git a/debian/patches-rt/genirq-Disable-irqfixup-poll-on-PREEMPT_RT.patch b/debian/patches-rt/0020-genirq-Disable-irqfixup-poll-on-PREEMPT_RT.patch index 5661b7a2a..01560136e 100644 --- a/debian/patches-rt/genirq-Disable-irqfixup-poll-on-PREEMPT_RT.patch +++ b/debian/patches-rt/0020-genirq-Disable-irqfixup-poll-on-PREEMPT_RT.patch @@ -1,7 +1,8 @@ +From f60bdcc6a930c598d2eb93528aa0dc4af348b5ad Mon Sep 17 00:00:00 2001 From: Ingo Molnar <mingo@kernel.org> Date: Fri, 3 Jul 2009 08:29:57 -0500 -Subject: [PATCH] genirq: Disable irqfixup/poll on PREEMPT_RT. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 020/158] genirq: Disable irqfixup/poll on PREEMPT_RT. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The support for misrouted IRQs is used on old / legacy systems and is not feasible on PREEMPT_RT. @@ -20,12 +21,14 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20210917223841.c6j6jcaffojrnot3@linutronix.de --- - kernel/irq/spurious.c | 8 ++++++++ + kernel/irq/spurious.c | 8 ++++++++ 1 file changed, 8 insertions(+) +diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c +index c481d8458325..02b2daf07441 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c -@@ -447,6 +447,10 @@ MODULE_PARM_DESC(noirqdebug, "Disable ir +@@ -447,6 +447,10 @@ MODULE_PARM_DESC(noirqdebug, "Disable irq lockup detection when true"); static int __init irqfixup_setup(char *str) { @@ -47,3 +50,6 @@ Link: https://lore.kernel.org/r/20210917223841.c6j6jcaffojrnot3@linutronix.de irqfixup = 2; printk(KERN_WARNING "Misrouted IRQ fixup and polling support " "enabled\n"); +-- +2.33.1 + diff --git a/debian/patches-rt/efi-Disable-runtime-services-on-RT.patch b/debian/patches-rt/0021-efi-Disable-runtime-services-on-RT.patch index c4a4099f6..4bdabe813 100644 --- a/debian/patches-rt/efi-Disable-runtime-services-on-RT.patch +++ b/debian/patches-rt/0021-efi-Disable-runtime-services-on-RT.patch @@ -1,7 +1,8 @@ +From ddfef55d466a3186e5f6fbcb5117043435ad91f6 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 26 Jul 2018 15:03:16 +0200 -Subject: [PATCH] efi: Disable runtime services on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 021/158] efi: Disable runtime services on RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Based on measurements the EFI functions get_variable / get_next_variable take up to 2us which looks okay. @@ -25,9 +26,11 @@ Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lkml.kernel.org/r/20210924134919.1913476-2-bigeasy@linutronix.de --- - drivers/firmware/efi/efi.c | 2 +- + drivers/firmware/efi/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c +index 847f33ffc4ae..39031cfcb6b9 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -66,7 +66,7 @@ struct mm_struct efi_mm = { @@ -39,3 +42,6 @@ Link: https://lkml.kernel.org/r/20210924134919.1913476-2-bigeasy@linutronix.de static int __init setup_noefi(char *arg) { disable_runtime = true; +-- +2.33.1 + diff --git a/debian/patches-rt/efi-Allow-efi-runtime.patch b/debian/patches-rt/0022-efi-Allow-efi-runtime.patch index 2b0c0fa78..4875057a9 100644 --- a/debian/patches-rt/efi-Allow-efi-runtime.patch +++ b/debian/patches-rt/0022-efi-Allow-efi-runtime.patch @@ -1,7 +1,8 @@ +From a55188b19dc9fd40ef86147112702b64b8992745 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 26 Jul 2018 15:06:10 +0200 -Subject: [PATCH] efi: Allow efi=runtime -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 022/158] efi: Allow efi=runtime +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz In case the command line option "efi=noruntime" is default at built-time, the user could overwrite its state by `efi=runtime' and allow it again. @@ -13,12 +14,14 @@ Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lkml.kernel.org/r/20210924134919.1913476-3-bigeasy@linutronix.de --- - drivers/firmware/efi/efi.c | 3 +++ + drivers/firmware/efi/efi.c | 3 +++ 1 file changed, 3 insertions(+) +diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c +index 39031cfcb6b9..ae79c3300129 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c -@@ -97,6 +97,9 @@ static int __init parse_efi_cmdline(char +@@ -97,6 +97,9 @@ static int __init parse_efi_cmdline(char *str) if (parse_option_str(str, "noruntime")) disable_runtime = true; @@ -28,3 +31,6 @@ Link: https://lkml.kernel.org/r/20210924134919.1913476-3-bigeasy@linutronix.de if (parse_option_str(str, "nosoftreserve")) set_bit(EFI_MEM_NO_SOFT_RESERVE, &efi.flags); +-- +2.33.1 + diff --git a/debian/patches-rt/mm-Disable-zsmalloc-on-PREEMPT_RT.patch b/debian/patches-rt/0023-mm-Disable-zsmalloc-on-PREEMPT_RT.patch index 8b4b653f0..3dfb9b6fa 100644 --- a/debian/patches-rt/mm-Disable-zsmalloc-on-PREEMPT_RT.patch +++ b/debian/patches-rt/0023-mm-Disable-zsmalloc-on-PREEMPT_RT.patch @@ -1,7 +1,8 @@ +From bfaaac5a74bc7ec766e344fb1200573ce6166236 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 23 Sep 2021 15:51:48 +0200 -Subject: [PATCH] mm: Disable zsmalloc on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 023/158] mm: Disable zsmalloc on PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz For efficiency reasons, zsmalloc is using a slim `handle'. The value is the address of a memory allocation of 4 or 8 bytes depending on the size @@ -23,9 +24,11 @@ get it to work. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lkml.kernel.org/r/20210923170121.1860133-1-bigeasy@linutronix.de --- - mm/Kconfig | 3 ++- + mm/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) +diff --git a/mm/Kconfig b/mm/Kconfig +index c048dea7e342..4ecfacc50193 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -640,6 +640,7 @@ config ZSWAP_ZPOOL_DEFAULT_Z3FOLD @@ -45,3 +48,6 @@ Link: https://lkml.kernel.org/r/20210923170121.1860133-1-bigeasy@linutronix.de help zsmalloc is a slab-based memory allocator designed to store compressed RAM pages. zsmalloc uses virtual memory mapping +-- +2.33.1 + diff --git a/debian/patches-rt/net-core-disable-NET_RX_BUSY_POLL-on-PREEMPT_RT.patch b/debian/patches-rt/0024-net-core-disable-NET_RX_BUSY_POLL-on-PREEMPT_RT.patch index dba529870..0625e7e9a 100644 --- a/debian/patches-rt/net-core-disable-NET_RX_BUSY_POLL-on-PREEMPT_RT.patch +++ b/debian/patches-rt/0024-net-core-disable-NET_RX_BUSY_POLL-on-PREEMPT_RT.patch @@ -1,7 +1,8 @@ +From 13c1669af8961b1dd2c62df30abd7bb853f934ba Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 1 Oct 2021 16:58:41 +0200 -Subject: [PATCH] net/core: disable NET_RX_BUSY_POLL on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 024/158] net/core: disable NET_RX_BUSY_POLL on PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz napi_busy_loop() disables preemption and performs a NAPI poll. We can't acquire sleeping locks with disabled preemption which would be required while @@ -21,9 +22,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20211001145841.2308454-1-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- - net/Kconfig | 2 +- + net/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/net/Kconfig b/net/Kconfig +index fb13460c6dab..074472dfa94a 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -294,7 +294,7 @@ config CGROUP_NET_CLASSID @@ -35,3 +38,6 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> config BQL bool +-- +2.33.1 + diff --git a/debian/patches-rt/samples_kfifo__Rename_read_lock_write_lock.patch b/debian/patches-rt/0025-samples-kfifo-Rename-read_lock-write_lock.patch index 5bf7ddcd0..309701853 100644 --- a/debian/patches-rt/samples_kfifo__Rename_read_lock_write_lock.patch +++ b/debian/patches-rt/0025-samples-kfifo-Rename-read_lock-write_lock.patch @@ -1,9 +1,8 @@ -Subject: samples/kfifo: Rename read_lock/write_lock -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Thu Jul 1 17:43:16 2021 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 70ce6f50d9a5e976ad5ef01faeae0c24693f1c3a Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Thu, 1 Jul 2021 17:43:16 +0200 +Subject: [PATCH 025/158] samples/kfifo: Rename read_lock/write_lock +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The variables names read_lock and write_lock can clash with functions used for read/writer locks. @@ -15,11 +14,13 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20210806152551.qio7c3ho6pexezup@linutronix.de --- - samples/kfifo/bytestream-example.c | 12 ++++++------ - samples/kfifo/inttype-example.c | 12 ++++++------ - samples/kfifo/record-example.c | 12 ++++++------ + samples/kfifo/bytestream-example.c | 12 ++++++------ + samples/kfifo/inttype-example.c | 12 ++++++------ + samples/kfifo/record-example.c | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) ---- + +diff --git a/samples/kfifo/bytestream-example.c b/samples/kfifo/bytestream-example.c +index 5a90aa527877..642d0748c169 100644 --- a/samples/kfifo/bytestream-example.c +++ b/samples/kfifo/bytestream-example.c @@ -22,10 +22,10 @@ @@ -35,7 +36,7 @@ Link: https://lkml.kernel.org/r/20210806152551.qio7c3ho6pexezup@linutronix.de /* * define DYNAMIC in this example for a dynamically allocated fifo. -@@ -116,12 +116,12 @@ static ssize_t fifo_write(struct file *f +@@ -116,12 +116,12 @@ static ssize_t fifo_write(struct file *file, const char __user *buf, int ret; unsigned int copied; @@ -50,7 +51,7 @@ Link: https://lkml.kernel.org/r/20210806152551.qio7c3ho6pexezup@linutronix.de if (ret) return ret; -@@ -134,12 +134,12 @@ static ssize_t fifo_read(struct file *fi +@@ -134,12 +134,12 @@ static ssize_t fifo_read(struct file *file, char __user *buf, int ret; unsigned int copied; @@ -65,6 +66,8 @@ Link: https://lkml.kernel.org/r/20210806152551.qio7c3ho6pexezup@linutronix.de if (ret) return ret; +diff --git a/samples/kfifo/inttype-example.c b/samples/kfifo/inttype-example.c +index e5403d8c971a..c61482ba94f4 100644 --- a/samples/kfifo/inttype-example.c +++ b/samples/kfifo/inttype-example.c @@ -22,10 +22,10 @@ @@ -80,7 +83,7 @@ Link: https://lkml.kernel.org/r/20210806152551.qio7c3ho6pexezup@linutronix.de /* * define DYNAMIC in this example for a dynamically allocated fifo. -@@ -109,12 +109,12 @@ static ssize_t fifo_write(struct file *f +@@ -109,12 +109,12 @@ static ssize_t fifo_write(struct file *file, const char __user *buf, int ret; unsigned int copied; @@ -95,7 +98,7 @@ Link: https://lkml.kernel.org/r/20210806152551.qio7c3ho6pexezup@linutronix.de if (ret) return ret; -@@ -127,12 +127,12 @@ static ssize_t fifo_read(struct file *fi +@@ -127,12 +127,12 @@ static ssize_t fifo_read(struct file *file, char __user *buf, int ret; unsigned int copied; @@ -110,6 +113,8 @@ Link: https://lkml.kernel.org/r/20210806152551.qio7c3ho6pexezup@linutronix.de if (ret) return ret; +diff --git a/samples/kfifo/record-example.c b/samples/kfifo/record-example.c +index f64f3d62d6c2..e4087b2d3fc4 100644 --- a/samples/kfifo/record-example.c +++ b/samples/kfifo/record-example.c @@ -22,10 +22,10 @@ @@ -125,7 +130,7 @@ Link: https://lkml.kernel.org/r/20210806152551.qio7c3ho6pexezup@linutronix.de /* * define DYNAMIC in this example for a dynamically allocated fifo. -@@ -123,12 +123,12 @@ static ssize_t fifo_write(struct file *f +@@ -123,12 +123,12 @@ static ssize_t fifo_write(struct file *file, const char __user *buf, int ret; unsigned int copied; @@ -140,7 +145,7 @@ Link: https://lkml.kernel.org/r/20210806152551.qio7c3ho6pexezup@linutronix.de if (ret) return ret; -@@ -141,12 +141,12 @@ static ssize_t fifo_read(struct file *fi +@@ -141,12 +141,12 @@ static ssize_t fifo_read(struct file *file, char __user *buf, int ret; unsigned int copied; @@ -155,3 +160,6 @@ Link: https://lkml.kernel.org/r/20210806152551.qio7c3ho6pexezup@linutronix.de if (ret) return ret; +-- +2.33.1 + diff --git a/debian/patches-rt/crypto_testmgr_only_disable_migration_in_crypto_disable_simd_for_test.patch b/debian/patches-rt/0026-crypto-testmgr-Only-disable-migration-in-crypto_disa.patch index 362ebc4b7..097f077b8 100644 --- a/debian/patches-rt/crypto_testmgr_only_disable_migration_in_crypto_disable_simd_for_test.patch +++ b/debian/patches-rt/0026-crypto-testmgr-Only-disable-migration-in-crypto_disa.patch @@ -1,7 +1,9 @@ +From 022a098d5137e264c8f042d52ad3a94bd3df894c Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Subject: crypto: testmgr - Only disable migration in crypto_disable_simd_for_test() Date: Tue, 28 Sep 2021 13:54:01 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 026/158] crypto: testmgr - Only disable migration in + crypto_disable_simd_for_test() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz crypto_disable_simd_for_test() disables preemption in order to receive a stable per-CPU variable which it needs to modify in order to alter @@ -18,12 +20,14 @@ stable per-CPU pointer. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210928115401.441339-1-bigeasy@linutronix.de --- - crypto/testmgr.c | 4 ++-- + crypto/testmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) +diff --git a/crypto/testmgr.c b/crypto/testmgr.c +index 70f69f0910c9..58eee8eab4bf 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c -@@ -1061,14 +1061,14 @@ static void generate_random_testvec_conf +@@ -1061,14 +1061,14 @@ static void generate_random_testvec_config(struct testvec_config *cfg, static void crypto_disable_simd_for_test(void) { @@ -40,3 +44,6 @@ Link: https://lore.kernel.org/r/20210928115401.441339-1-bigeasy@linutronix.de } /* +-- +2.33.1 + diff --git a/debian/patches-rt/mm_allow_only_slub_on_preempt_rt.patch b/debian/patches-rt/0027-mm-Allow-only-SLUB-on-PREEMPT_RT.patch index 0b9f4da8c..a8dad0a3a 100644 --- a/debian/patches-rt/mm_allow_only_slub_on_preempt_rt.patch +++ b/debian/patches-rt/0027-mm-Allow-only-SLUB-on-PREEMPT_RT.patch @@ -1,7 +1,8 @@ +From 1f8c776c3f0ee3156496b66864b5f7b11bbb96de Mon Sep 17 00:00:00 2001 From: Ingo Molnar <mingo@kernel.org> -Subject: mm: Allow only SLUB on PREEMPT_RT Date: Fri, 3 Jul 2009 08:44:03 -0500 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 027/158] mm: Allow only SLUB on PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Memory allocators may disable interrupts or preemption as part of the allocation and freeing process. For PREEMPT_RT it is important that @@ -30,9 +31,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Vlastimil Babka <vbabka@suse.cz> Link: https://lore.kernel.org/r/20211015210336.gen3tib33ig5q2md@linutronix.de --- - init/Kconfig | 2 ++ + init/Kconfig | 2 ++ 1 file changed, 2 insertions(+) +diff --git a/init/Kconfig b/init/Kconfig +index 11f8a845f259..906527d01bff 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1896,6 +1896,7 @@ choice @@ -51,3 +54,6 @@ Link: https://lore.kernel.org/r/20211015210336.gen3tib33ig5q2md@linutronix.de help SLOB replaces the stock allocator with a drastically simpler allocator. SLOB is generally more space efficient but +-- +2.33.1 + diff --git a/debian/patches-rt/mm_page_alloc_use_migrate_disable_in_drain_local_pages_wq.patch b/debian/patches-rt/0028-mm-page_alloc-Use-migrate_disable-in-drain_local_pag.patch index af9c84a12..6c380f96c 100644 --- a/debian/patches-rt/mm_page_alloc_use_migrate_disable_in_drain_local_pages_wq.patch +++ b/debian/patches-rt/0028-mm-page_alloc-Use-migrate_disable-in-drain_local_pag.patch @@ -1,7 +1,9 @@ +From 1422a9f9c73845986a558d9ec72714b7220f597f Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Subject: mm: page_alloc: Use migrate_disable() in drain_local_pages_wq() Date: Fri, 15 Oct 2021 23:09:33 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 028/158] mm: page_alloc: Use migrate_disable() in + drain_local_pages_wq() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz drain_local_pages_wq() disables preemption to avoid CPU migration during CPU hotplug and can't use cpus_read_lock(). @@ -17,12 +19,14 @@ Use migrate_disable() in drain_local_pages_wq(). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20211015210933.viw6rjvo64qtqxn4@linutronix.de --- - mm/page_alloc.c | 4 ++-- + mm/page_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---- + +diff --git a/mm/page_alloc.c b/mm/page_alloc.c +index 23d3339ac4e8..e71b9634a321 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -3147,9 +3147,9 @@ static void drain_local_pages_wq(struct +@@ -3149,9 +3149,9 @@ static void drain_local_pages_wq(struct work_struct *work) * cpu which is alright but we also have to make sure to not move to * a different one. */ @@ -34,3 +38,6 @@ Link: https://lore.kernel.org/r/20211015210933.viw6rjvo64qtqxn4@linutronix.de } /* +-- +2.33.1 + diff --git a/debian/patches-rt/mm_scatterlist_replace_the_preemptible_warning_in_sg_miter_stop.patch b/debian/patches-rt/0029-mm-scatterlist-Replace-the-preemptible-warning-in-sg.patch index 89edbaafb..9c3501e75 100644 --- a/debian/patches-rt/mm_scatterlist_replace_the_preemptible_warning_in_sg_miter_stop.patch +++ b/debian/patches-rt/0029-mm-scatterlist-Replace-the-preemptible-warning-in-sg.patch @@ -1,7 +1,9 @@ +From c0eaff4633facf5c6b6c214eaefb20a35a09dc86 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> -Subject: mm/scatterlist: Replace the !preemptible warning in sg_miter_stop() Date: Fri, 15 Oct 2021 23:14:09 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 029/158] mm/scatterlist: Replace the !preemptible warning in + sg_miter_stop() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz sg_miter_stop() checks for disabled preemption before unmapping a page via kunmap_atomic(). The kernel doc mentions under context that @@ -40,12 +42,14 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20211015211409.cqopacv3pxdwn2ty@linutronix.de --- - lib/scatterlist.c | 11 ++++------- + lib/scatterlist.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) +diff --git a/lib/scatterlist.c b/lib/scatterlist.c +index abb3432ed744..d5e82e4a57ad 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c -@@ -828,8 +828,7 @@ static bool sg_miter_get_next_page(struc +@@ -828,8 +828,7 @@ static bool sg_miter_get_next_page(struct sg_mapping_iter *miter) * stops @miter. * * Context: @@ -75,7 +79,7 @@ Link: https://lore.kernel.org/r/20211015211409.cqopacv3pxdwn2ty@linutronix.de */ void sg_miter_stop(struct sg_mapping_iter *miter) { -@@ -922,7 +919,7 @@ void sg_miter_stop(struct sg_mapping_ite +@@ -922,7 +919,7 @@ void sg_miter_stop(struct sg_mapping_iter *miter) flush_dcache_page(miter->page); if (miter->__flags & SG_MITER_ATOMIC) { @@ -84,3 +88,6 @@ Link: https://lore.kernel.org/r/20211015211409.cqopacv3pxdwn2ty@linutronix.de kunmap_atomic(miter->addr); } else kunmap(miter->page); +-- +2.33.1 + diff --git a/debian/patches-rt/mm-Disable-NUMA_BALANCING_DEFAULT_ENABLED-and-TRANSP.patch b/debian/patches-rt/0030-mm-Disable-NUMA_BALANCING_DEFAULT_ENABLED-and-TRANSP.patch index 699117098..e3b9ef7a9 100644 --- a/debian/patches-rt/mm-Disable-NUMA_BALANCING_DEFAULT_ENABLED-and-TRANSP.patch +++ b/debian/patches-rt/0030-mm-Disable-NUMA_BALANCING_DEFAULT_ENABLED-and-TRANSP.patch @@ -1,8 +1,9 @@ +From 13dc6ed14c5943c52597b6b75794ca0cfcd7393d Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 28 Oct 2021 16:33:27 +0200 -Subject: [PATCH] mm: Disable NUMA_BALANCING_DEFAULT_ENABLED and +Subject: [PATCH 030/158] mm: Disable NUMA_BALANCING_DEFAULT_ENABLED and TRANSPARENT_HUGEPAGE on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz TRANSPARENT_HUGEPAGE: There are potential non-deterministic delays to an RT thread if a critical @@ -27,10 +28,12 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Mel Gorman <mgorman@techsingularity.net> Link: https://lore.kernel.org/r/20211028143327.hfbxjze7palrpfgp@linutronix.de --- - init/Kconfig | 2 +- - mm/Kconfig | 2 +- + init/Kconfig | 2 +- + mm/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) +diff --git a/init/Kconfig b/init/Kconfig +index 906527d01bff..45bcaa8e7481 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -901,7 +901,7 @@ config NUMA_BALANCING @@ -42,6 +45,8 @@ Link: https://lore.kernel.org/r/20211028143327.hfbxjze7palrpfgp@linutronix.de help This option adds support for automatic NUMA aware memory/task placement. The mechanism is quite primitive and is based on migrating memory when +diff --git a/mm/Kconfig b/mm/Kconfig +index 4ecfacc50193..71c7457bb974 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -371,7 +371,7 @@ config NOMMU_INITIAL_TRIM_EXCESS @@ -53,3 +58,6 @@ Link: https://lore.kernel.org/r/20211028143327.hfbxjze7palrpfgp@linutronix.de select COMPACTION select XARRAY_MULTI help +-- +2.33.1 + diff --git a/debian/patches-rt/x86-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch b/debian/patches-rt/0031-x86-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch index da12526e4..479675a6f 100644 --- a/debian/patches-rt/x86-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch +++ b/debian/patches-rt/0031-x86-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch @@ -1,7 +1,8 @@ +From 4d1c22ea8c409fbf6c0c8c4116ccb566ca66b770 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> -Subject: x86/softirq: Disable softirq stacks on PREEMPT_RT Date: Fri, 24 Sep 2021 18:12:45 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 031/158] x86/softirq: Disable softirq stacks on PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz PREEMPT_RT preempts softirqs and the current implementation avoids do_softirq_own_stack() and only uses __do_softirq(). @@ -15,10 +16,12 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210924161245.2357247-1-bigeasy@linutronix.de --- - arch/x86/include/asm/irq_stack.h | 3 +++ - arch/x86/kernel/irq_32.c | 2 ++ + arch/x86/include/asm/irq_stack.h | 3 +++ + arch/x86/kernel/irq_32.c | 2 ++ 2 files changed, 5 insertions(+) +diff --git a/arch/x86/include/asm/irq_stack.h b/arch/x86/include/asm/irq_stack.h +index 8d55bd11848c..f755c217f67b 100644 --- a/arch/x86/include/asm/irq_stack.h +++ b/arch/x86/include/asm/irq_stack.h @@ -201,6 +201,7 @@ @@ -38,9 +41,11 @@ Link: https://lore.kernel.org/r/20210924161245.2357247-1-bigeasy@linutronix.de #else /* CONFIG_X86_64 */ /* System vector handlers always run on the stack they interrupted. */ #define run_sysvec_on_irqstack_cond(func, regs) \ +diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c +index 044902d5a3c4..e5dd6da78713 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c -@@ -132,6 +132,7 @@ int irq_init_percpu_irqstack(unsigned in +@@ -132,6 +132,7 @@ int irq_init_percpu_irqstack(unsigned int cpu) return 0; } @@ -56,3 +61,6 @@ Link: https://lore.kernel.org/r/20210924161245.2357247-1-bigeasy@linutronix.de void __handle_irq(struct irq_desc *desc, struct pt_regs *regs) { +-- +2.33.1 + diff --git a/debian/patches-rt/0001_documentation_kcov_include_types_h_in_the_example.patch b/debian/patches-rt/0032-Documentation-kcov-Include-types.h-in-the-example.patch index 3efce87f3..63ab055fe 100644 --- a/debian/patches-rt/0001_documentation_kcov_include_types_h_in_the_example.patch +++ b/debian/patches-rt/0032-Documentation-kcov-Include-types.h-in-the-example.patch @@ -1,7 +1,8 @@ +From 652ee176f98d76d080fe308abf93c8e4a2d76fa4 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Subject: Documentation/kcov: Include types.h in the example. Date: Mon, 30 Aug 2021 19:26:23 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 032/158] Documentation/kcov: Include types.h in the example. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The first example code has includes at the top, the following two example share that part. The last example (remote coverage collection) @@ -14,12 +15,14 @@ example. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210830172627.267989-2-bigeasy@linutronix.de --- - Documentation/dev-tools/kcov.rst | 3 +++ + Documentation/dev-tools/kcov.rst | 3 +++ 1 file changed, 3 insertions(+) +diff --git a/Documentation/dev-tools/kcov.rst b/Documentation/dev-tools/kcov.rst +index d2c4c27e1702..347f3b6de8d4 100644 --- a/Documentation/dev-tools/kcov.rst +++ b/Documentation/dev-tools/kcov.rst -@@ -50,6 +50,7 @@ The following program demonstrates cover +@@ -50,6 +50,7 @@ The following program demonstrates coverage collection from within a test #include <sys/mman.h> #include <unistd.h> #include <fcntl.h> @@ -36,3 +39,6 @@ Link: https://lore.kernel.org/r/20210830172627.267989-2-bigeasy@linutronix.de struct kcov_remote_arg { __u32 trace_mode; __u32 area_size; +-- +2.33.1 + diff --git a/debian/patches-rt/0002_documentation_kcov_define_ip_in_the_example.patch b/debian/patches-rt/0033-Documentation-kcov-Define-ip-in-the-example.patch index 0731c43a2..14e0037fb 100644 --- a/debian/patches-rt/0002_documentation_kcov_define_ip_in_the_example.patch +++ b/debian/patches-rt/0033-Documentation-kcov-Define-ip-in-the-example.patch @@ -1,7 +1,8 @@ +From 8a2e64b42ef87e403dbdd138a38ef7d8d05c5908 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Subject: Documentation/kcov: Define `ip' in the example. Date: Mon, 30 Aug 2021 19:26:24 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 033/158] Documentation/kcov: Define `ip' in the example. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The example code uses the variable `ip' but never declares it. @@ -11,9 +12,11 @@ from which it loads its value. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210830172627.267989-3-bigeasy@linutronix.de --- - Documentation/dev-tools/kcov.rst | 2 ++ + Documentation/dev-tools/kcov.rst | 2 ++ 1 file changed, 2 insertions(+) +diff --git a/Documentation/dev-tools/kcov.rst b/Documentation/dev-tools/kcov.rst +index 347f3b6de8d4..d83c9ab49427 100644 --- a/Documentation/dev-tools/kcov.rst +++ b/Documentation/dev-tools/kcov.rst @@ -178,6 +178,8 @@ Comparison operands collection @@ -25,3 +28,6 @@ Link: https://lore.kernel.org/r/20210830172627.267989-3-bigeasy@linutronix.de type = cover[i * KCOV_WORDS_PER_CMP + 1]; /* arg1 and arg2 - operands of the comparison. */ arg1 = cover[i * KCOV_WORDS_PER_CMP + 2]; +-- +2.33.1 + diff --git a/debian/patches-rt/0003_kcov_allocate_per_cpu_memory_on_the_relevant_node.patch b/debian/patches-rt/0034-kcov-Allocate-per-CPU-memory-on-the-relevant-node.patch index 7326a329c..528622432 100644 --- a/debian/patches-rt/0003_kcov_allocate_per_cpu_memory_on_the_relevant_node.patch +++ b/debian/patches-rt/0034-kcov-Allocate-per-CPU-memory-on-the-relevant-node.patch @@ -1,7 +1,8 @@ +From c6a29ab16948defcb2a09a7f2e44acc19333da2c Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Subject: kcov: Allocate per-CPU memory on the relevant node. Date: Mon, 30 Aug 2021 19:26:25 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 034/158] kcov: Allocate per-CPU memory on the relevant node. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz During boot kcov allocates per-CPU memory which is used later if remote/ softirq processing is enabled. @@ -12,9 +13,11 @@ memory access. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210830172627.267989-4-bigeasy@linutronix.de --- - kernel/kcov.c | 4 ++-- + kernel/kcov.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) +diff --git a/kernel/kcov.c b/kernel/kcov.c +index 80bfe71bbe13..4f910231d99a 100644 --- a/kernel/kcov.c +++ b/kernel/kcov.c @@ -1034,8 +1034,8 @@ static int __init kcov_init(void) @@ -28,3 +31,6 @@ Link: https://lore.kernel.org/r/20210830172627.267989-4-bigeasy@linutronix.de if (!area) return -ENOMEM; per_cpu_ptr(&kcov_percpu_data, cpu)->irq_area = area; +-- +2.33.1 + diff --git a/debian/patches-rt/0004_kcov_avoid_enable_disable_interrupts_if_in_task.patch b/debian/patches-rt/0035-kcov-Avoid-enable-disable-interrupts-if-in_task.patch index 07e54b5a1..bd23c339d 100644 --- a/debian/patches-rt/0004_kcov_avoid_enable_disable_interrupts_if_in_task.patch +++ b/debian/patches-rt/0035-kcov-Avoid-enable-disable-interrupts-if-in_task.patch @@ -1,7 +1,8 @@ +From 94ca1ddf7b460bca23bcab7590ceeafee952db11 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Subject: kcov: Avoid enable+disable interrupts if !in_task(). Date: Mon, 30 Aug 2021 19:26:26 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 035/158] kcov: Avoid enable+disable interrupts if !in_task(). +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz kcov_remote_start() may need to allocate memory in the in_task() case (otherwise per-CPU memory has been pre-allocated) and therefore requires @@ -15,9 +16,11 @@ Enable interrupts only if memory allocation is performed. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210830172627.267989-5-bigeasy@linutronix.de --- - kernel/kcov.c | 6 +++--- + kernel/kcov.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) +diff --git a/kernel/kcov.c b/kernel/kcov.c +index 4f910231d99a..620dc4ffeb68 100644 --- a/kernel/kcov.c +++ b/kernel/kcov.c @@ -869,19 +869,19 @@ void kcov_remote_start(u64 handle) @@ -43,3 +46,6 @@ Link: https://lore.kernel.org/r/20210830172627.267989-5-bigeasy@linutronix.de /* Reset coverage size. */ *(u64 *)area = 0; +-- +2.33.1 + diff --git a/debian/patches-rt/0005_kcov_replace_local_irq_save_with_a_local_lock_t.patch b/debian/patches-rt/0036-kcov-Replace-local_irq_save-with-a-local_lock_t.patch index d3f0ab63d..5e6d11ac8 100644 --- a/debian/patches-rt/0005_kcov_replace_local_irq_save_with_a_local_lock_t.patch +++ b/debian/patches-rt/0036-kcov-Replace-local_irq_save-with-a-local_lock_t.patch @@ -1,7 +1,8 @@ +From 7b2278b28a056115169b0a90c9dae0a537911e25 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Subject: kcov: Replace local_irq_save() with a local_lock_t. Date: Mon, 30 Aug 2021 19:26:27 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 036/158] kcov: Replace local_irq_save() with a local_lock_t. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The kcov code mixes local_irq_save() and spin_lock() in kcov_remote_{start|end}(). This creates a warning on PREEMPT_RT because @@ -33,12 +34,14 @@ Reported-by: Clark Williams <williams@redhat.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210830172627.267989-6-bigeasy@linutronix.de --- - kernel/kcov.c | 30 +++++++++++++++++------------- + kernel/kcov.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) +diff --git a/kernel/kcov.c b/kernel/kcov.c +index 620dc4ffeb68..36ca640c4f8e 100644 --- a/kernel/kcov.c +++ b/kernel/kcov.c -@@ -88,6 +88,7 @@ static struct list_head kcov_remote_area +@@ -88,6 +88,7 @@ static struct list_head kcov_remote_areas = LIST_HEAD_INIT(kcov_remote_areas); struct kcov_percpu_data { void *irq_area; @@ -157,3 +160,6 @@ Link: https://lore.kernel.org/r/20210830172627.267989-6-bigeasy@linutronix.de /* Get in kcov_remote_start(). */ kcov_put(kcov); +-- +2.33.1 + diff --git a/debian/patches-rt/net-sched-sch_ets-properly-init-all-active-DRR-list-.patch b/debian/patches-rt/0037-net-sched-sch_ets-properly-init-all-active-DRR-list-.patch index d04bb68f9..26b1094a8 100644 --- a/debian/patches-rt/net-sched-sch_ets-properly-init-all-active-DRR-list-.patch +++ b/debian/patches-rt/0037-net-sched-sch_ets-properly-init-all-active-DRR-list-.patch @@ -1,7 +1,9 @@ +From e414280078e963375dc17727ac93f6e46b831807 Mon Sep 17 00:00:00 2001 From: Davide Caratti <dcaratti@redhat.com> Date: Thu, 7 Oct 2021 15:05:02 +0200 -Subject: [PATCH] net/sched: sch_ets: properly init all active DRR list handles -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 037/158] net/sched: sch_ets: properly init all active DRR list + handles +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz leaf classes of ETS qdiscs are served in strict priority or deficit round robin (DRR), depending on the value of 'nstrict'. Since this value can be @@ -19,12 +21,14 @@ Signed-off-by: Davide Caratti <dcaratti@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - net/sched/sch_ets.c | 12 +++++++++--- + net/sched/sch_ets.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) +diff --git a/net/sched/sch_ets.c b/net/sched/sch_ets.c +index 92a686807971..2c27f4149149 100644 --- a/net/sched/sch_ets.c +++ b/net/sched/sch_ets.c -@@ -661,7 +661,6 @@ static int ets_qdisc_change(struct Qdisc +@@ -661,7 +661,6 @@ static int ets_qdisc_change(struct Qdisc *sch, struct nlattr *opt, q->nbands = nbands; for (i = nstrict; i < q->nstrict; i++) { @@ -32,7 +36,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (q->classes[i].qdisc->q.qlen) { list_add_tail(&q->classes[i].alist, &q->active); q->classes[i].deficit = quanta[i]; -@@ -687,7 +686,11 @@ static int ets_qdisc_change(struct Qdisc +@@ -689,7 +688,11 @@ static int ets_qdisc_change(struct Qdisc *sch, struct nlattr *opt, ets_offload_change(sch); for (i = q->nbands; i < oldbands; i++) { qdisc_put(q->classes[i].qdisc); @@ -45,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } return 0; } -@@ -696,7 +699,7 @@ static int ets_qdisc_init(struct Qdisc * +@@ -698,7 +701,7 @@ static int ets_qdisc_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) { struct ets_sched *q = qdisc_priv(sch); @@ -54,7 +58,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (!opt) return -EINVAL; -@@ -706,6 +709,9 @@ static int ets_qdisc_init(struct Qdisc * +@@ -708,6 +711,9 @@ static int ets_qdisc_init(struct Qdisc *sch, struct nlattr *opt, return err; INIT_LIST_HEAD(&q->active); @@ -64,3 +68,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return ets_qdisc_change(sch, opt, extack); } +-- +2.33.1 + diff --git a/debian/patches-rt/0001-gen_stats-Add-instead-Set-the-value-in-__gnet_stats_.patch b/debian/patches-rt/0038-gen_stats-Add-instead-Set-the-value-in-__gnet_stats_.patch index 513d4dc89..e1bee6548 100644 --- a/debian/patches-rt/0001-gen_stats-Add-instead-Set-the-value-in-__gnet_stats_.patch +++ b/debian/patches-rt/0038-gen_stats-Add-instead-Set-the-value-in-__gnet_stats_.patch @@ -1,8 +1,9 @@ +From eeaedb3d949a48419420d387ad5e6d8cac9d38ce Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Sat, 16 Oct 2021 10:49:02 +0200 -Subject: [PATCH 1/9] gen_stats: Add instead Set the value in +Subject: [PATCH 038/158] gen_stats: Add instead Set the value in __gnet_stats_copy_basic(). -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz __gnet_stats_copy_basic() always assigns the value to the bstats argument overwriting the previous value. The later added per-CPU version @@ -23,16 +24,18 @@ the function to gnet_stats_add_basic() to make it more obvious. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net> --- - include/net/gen_stats.h | 8 ++++---- - net/core/gen_estimator.c | 2 +- - net/core/gen_stats.c | 29 ++++++++++++++++------------- - net/sched/sch_mq.c | 5 ++--- - net/sched/sch_mqprio.c | 11 +++++------ + include/net/gen_stats.h | 8 ++++---- + net/core/gen_estimator.c | 2 +- + net/core/gen_stats.c | 29 ++++++++++++++++------------- + net/sched/sch_mq.c | 5 ++--- + net/sched/sch_mqprio.c | 11 +++++------ 5 files changed, 28 insertions(+), 27 deletions(-) +diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h +index 1424e02cef90..25740d004bdb 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h -@@ -46,10 +46,10 @@ int gnet_stats_copy_basic(const seqcount +@@ -46,10 +46,10 @@ int gnet_stats_copy_basic(const seqcount_t *running, struct gnet_dump *d, struct gnet_stats_basic_cpu __percpu *cpu, struct gnet_stats_basic_packed *b); @@ -47,9 +50,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> int gnet_stats_copy_basic_hw(const seqcount_t *running, struct gnet_dump *d, struct gnet_stats_basic_cpu __percpu *cpu, +diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c +index 8e582e29a41e..205df8b5116e 100644 --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c -@@ -66,7 +66,7 @@ static void est_fetch_counters(struct ne +@@ -66,7 +66,7 @@ static void est_fetch_counters(struct net_rate_estimator *e, if (e->stats_lock) spin_lock(e->stats_lock); @@ -58,9 +63,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (e->stats_lock) spin_unlock(e->stats_lock); +diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c +index e491b083b348..25d7c0989b83 100644 --- a/net/core/gen_stats.c +++ b/net/core/gen_stats.c -@@ -114,9 +114,8 @@ gnet_stats_start_copy(struct sk_buff *sk +@@ -114,9 +114,8 @@ gnet_stats_start_copy(struct sk_buff *skb, int type, spinlock_t *lock, } EXPORT_SYMBOL(gnet_stats_start_copy); @@ -72,7 +79,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> { int i; -@@ -136,26 +135,30 @@ static void +@@ -136,26 +135,30 @@ __gnet_stats_copy_basic_cpu(struct gnet_stats_basic_packed *bstats, } } @@ -112,7 +119,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static int ___gnet_stats_copy_basic(const seqcount_t *running, -@@ -166,7 +169,7 @@ static int +@@ -166,7 +169,7 @@ ___gnet_stats_copy_basic(const seqcount_t *running, { struct gnet_stats_basic_packed bstats = {0}; @@ -121,9 +128,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (d->compat_tc_stats && type == TCA_STATS_BASIC) { d->tc_stats.bytes = bstats.bytes; +diff --git a/net/sched/sch_mq.c b/net/sched/sch_mq.c +index db18d8a860f9..f3a41249d881 100644 --- a/net/sched/sch_mq.c +++ b/net/sched/sch_mq.c -@@ -147,9 +147,8 @@ static int mq_dump(struct Qdisc *sch, st +@@ -170,9 +170,8 @@ static int mq_dump(struct Qdisc *sch, struct sk_buff *skb) if (qdisc_is_percpu_stats(qdisc)) { qlen = qdisc_qlen_sum(qdisc); @@ -135,9 +144,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> __gnet_stats_copy_queue(&sch->qstats, qdisc->cpu_qstats, &qdisc->qstats, qlen); +diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c +index 50e15add6068..467d0938533f 100644 --- a/net/sched/sch_mqprio.c +++ b/net/sched/sch_mqprio.c -@@ -405,9 +405,8 @@ static int mqprio_dump(struct Qdisc *sch +@@ -427,9 +427,8 @@ static int mqprio_dump(struct Qdisc *sch, struct sk_buff *skb) if (qdisc_is_percpu_stats(qdisc)) { __u32 qlen = qdisc_qlen_sum(qdisc); @@ -149,7 +160,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> __gnet_stats_copy_queue(&sch->qstats, qdisc->cpu_qstats, &qdisc->qstats, qlen); -@@ -535,9 +534,9 @@ static int mqprio_dump_class_stats(struc +@@ -557,9 +556,9 @@ static int mqprio_dump_class_stats(struct Qdisc *sch, unsigned long cl, if (qdisc_is_percpu_stats(qdisc)) { qlen = qdisc_qlen_sum(qdisc); @@ -162,3 +173,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net> __gnet_stats_copy_queue(&qstats, qdisc->cpu_qstats, &qdisc->qstats, +-- +2.33.1 + diff --git a/debian/patches-rt/0002-gen_stats-Add-gnet_stats_add_queue.patch b/debian/patches-rt/0039-gen_stats-Add-gnet_stats_add_queue.patch index f49b856a0..dfb55734a 100644 --- a/debian/patches-rt/0002-gen_stats-Add-gnet_stats_add_queue.patch +++ b/debian/patches-rt/0039-gen_stats-Add-gnet_stats_add_queue.patch @@ -1,7 +1,8 @@ +From 7655593e3a1486274382a9a1448ce61428d6d670 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Sat, 16 Oct 2021 10:49:03 +0200 -Subject: [PATCH 2/9] gen_stats: Add gnet_stats_add_queue(). -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 039/158] gen_stats: Add gnet_stats_add_queue(). +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz This function will replace __gnet_stats_copy_queue(). It reads all arguments and adds them into the passed gnet_stats_queue argument. @@ -10,13 +11,15 @@ In contrast to __gnet_stats_copy_queue() it also copies the qlen member. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net> --- - include/net/gen_stats.h | 3 +++ - net/core/gen_stats.c | 32 ++++++++++++++++++++++++++++++++ + include/net/gen_stats.h | 3 +++ + net/core/gen_stats.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) +diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h +index 25740d004bdb..148f0ba85f25 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h -@@ -62,6 +62,9 @@ int gnet_stats_copy_queue(struct gnet_du +@@ -62,6 +62,9 @@ int gnet_stats_copy_queue(struct gnet_dump *d, void __gnet_stats_copy_queue(struct gnet_stats_queue *qstats, const struct gnet_stats_queue __percpu *cpu_q, const struct gnet_stats_queue *q, __u32 qlen); @@ -26,9 +29,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> int gnet_stats_copy_app(struct gnet_dump *d, void *st, int len); int gnet_stats_finish_copy(struct gnet_dump *d); +diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c +index 25d7c0989b83..26c020a7ead4 100644 --- a/net/core/gen_stats.c +++ b/net/core/gen_stats.c -@@ -321,6 +321,38 @@ void __gnet_stats_copy_queue(struct gnet +@@ -321,6 +321,38 @@ void __gnet_stats_copy_queue(struct gnet_stats_queue *qstats, } EXPORT_SYMBOL(__gnet_stats_copy_queue); @@ -67,3 +72,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net> /** * gnet_stats_copy_queue - copy queue statistics into statistics TLV * @d: dumping handle +-- +2.33.1 + diff --git a/debian/patches-rt/0003-mq-mqprio-Use-gnet_stats_add_queue.patch b/debian/patches-rt/0040-mq-mqprio-Use-gnet_stats_add_queue.patch index 87512956f..de566cb1a 100644 --- a/debian/patches-rt/0003-mq-mqprio-Use-gnet_stats_add_queue.patch +++ b/debian/patches-rt/0040-mq-mqprio-Use-gnet_stats_add_queue.patch @@ -1,7 +1,8 @@ +From 4df802e8cb83ca241e91a4802fdc99f1b4cf5f2d Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Sat, 16 Oct 2021 10:49:04 +0200 -Subject: [PATCH 3/9] mq, mqprio: Use gnet_stats_add_queue(). -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 040/158] mq, mqprio: Use gnet_stats_add_queue(). +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz gnet_stats_add_basic() and gnet_stats_add_queue() add up the statistics so they can be used directly for both the per-CPU and global case. @@ -18,13 +19,15 @@ sch->qstats.qlen. Now both fields are copied individually. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net> --- - net/sched/sch_mq.c | 24 +++++------------------- - net/sched/sch_mqprio.c | 49 ++++++++++++------------------------------------- - 2 files changed, 17 insertions(+), 56 deletions(-) + net/sched/sch_mq.c | 24 +++++--------------- + net/sched/sch_mqprio.c | 51 +++++++++++------------------------------- + 2 files changed, 18 insertions(+), 57 deletions(-) +diff --git a/net/sched/sch_mq.c b/net/sched/sch_mq.c +index f3a41249d881..a7b4c900c0da 100644 --- a/net/sched/sch_mq.c +++ b/net/sched/sch_mq.c -@@ -130,7 +130,6 @@ static int mq_dump(struct Qdisc *sch, st +@@ -153,7 +153,6 @@ static int mq_dump(struct Qdisc *sch, struct sk_buff *skb) struct net_device *dev = qdisc_dev(sch); struct Qdisc *qdisc; unsigned int ntx; @@ -32,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> sch->q.qlen = 0; memset(&sch->bstats, 0, sizeof(sch->bstats)); -@@ -145,24 +144,11 @@ static int mq_dump(struct Qdisc *sch, st +@@ -168,24 +167,11 @@ static int mq_dump(struct Qdisc *sch, struct sk_buff *skb) qdisc = netdev_get_tx_queue(dev, ntx)->qdisc_sleeping; spin_lock_bh(qdisc_lock(qdisc)); @@ -62,9 +65,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> spin_unlock_bh(qdisc_lock(qdisc)); } +diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c +index 467d0938533f..5313a0041beb 100644 --- a/net/sched/sch_mqprio.c +++ b/net/sched/sch_mqprio.c -@@ -402,24 +402,11 @@ static int mqprio_dump(struct Qdisc *sch +@@ -424,24 +424,11 @@ static int mqprio_dump(struct Qdisc *sch, struct sk_buff *skb) qdisc = netdev_get_tx_queue(dev, ntx)->qdisc_sleeping; spin_lock_bh(qdisc_lock(qdisc)); @@ -94,7 +99,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> spin_unlock_bh(qdisc_lock(qdisc)); } -@@ -511,7 +498,7 @@ static int mqprio_dump_class_stats(struc +@@ -533,7 +520,7 @@ static int mqprio_dump_class_stats(struct Qdisc *sch, unsigned long cl, { if (cl >= TC_H_MIN_PRIORITY) { int i; @@ -103,18 +108,13 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct gnet_stats_queue qstats = {0}; struct gnet_stats_basic_packed bstats = {0}; struct net_device *dev = qdisc_dev(sch); -@@ -531,27 +518,15 @@ static int mqprio_dump_class_stats(struc +@@ -553,27 +540,15 @@ static int mqprio_dump_class_stats(struct Qdisc *sch, unsigned long cl, spin_lock_bh(qdisc_lock(qdisc)); - if (qdisc_is_percpu_stats(qdisc)) { - qlen = qdisc_qlen_sum(qdisc); -+ gnet_stats_add_basic(NULL, &bstats, qdisc->cpu_bstats, -+ &qdisc->bstats); -+ gnet_stats_add_queue(&qstats, qdisc->cpu_qstats, -+ &qdisc->qstats); -+ sch->q.qlen += qdisc_qlen(qdisc); - +- - gnet_stats_add_basic(NULL, &bstats, - qdisc->cpu_bstats, - &qdisc->bstats); @@ -131,9 +131,18 @@ Signed-off-by: David S. Miller <davem@davemloft.net> - qstats.requeues += qdisc->qstats.requeues; - qstats.overlimits += qdisc->qstats.overlimits; - } ++ gnet_stats_add_basic(NULL, &bstats, qdisc->cpu_bstats, ++ &qdisc->bstats); ++ gnet_stats_add_queue(&qstats, qdisc->cpu_qstats, ++ &qdisc->qstats); ++ sch->q.qlen += qdisc_qlen(qdisc); ++ spin_unlock_bh(qdisc_lock(qdisc)); } + qlen = qdisc_qlen(sch) + qstats.qlen; /* Reclaim root sleeping lock before completing stats */ if (d->lock) +-- +2.33.1 + diff --git a/debian/patches-rt/0004-gen_stats-Move-remaining-users-to-gnet_stats_add_que.patch b/debian/patches-rt/0041-gen_stats-Move-remaining-users-to-gnet_stats_add_que.patch index 421e84227..5ba3952ae 100644 --- a/debian/patches-rt/0004-gen_stats-Move-remaining-users-to-gnet_stats_add_que.patch +++ b/debian/patches-rt/0041-gen_stats-Move-remaining-users-to-gnet_stats_add_que.patch @@ -1,8 +1,9 @@ +From 34fb160b99d962babcc5605a83b55a6f9b6cc11b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Sat, 16 Oct 2021 10:49:05 +0200 -Subject: [PATCH 4/9] gen_stats: Move remaining users to +Subject: [PATCH 041/158] gen_stats: Move remaining users to gnet_stats_add_queue(). -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The gnet_stats_queue::qlen member is only used in the SMP-case. @@ -19,14 +20,16 @@ __gnet_stats_copy_queue(). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net> --- - include/net/gen_stats.h | 3 --- - include/net/sch_generic.h | 5 ++--- - net/core/gen_stats.c | 39 ++------------------------------------- + include/net/gen_stats.h | 3 --- + include/net/sch_generic.h | 5 ++--- + net/core/gen_stats.c | 39 ++------------------------------------- 3 files changed, 4 insertions(+), 43 deletions(-) +diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h +index 148f0ba85f25..d47155f5db5d 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h -@@ -59,9 +59,6 @@ int gnet_stats_copy_rate_est(struct gnet +@@ -59,9 +59,6 @@ int gnet_stats_copy_rate_est(struct gnet_dump *d, int gnet_stats_copy_queue(struct gnet_dump *d, struct gnet_stats_queue __percpu *cpu_q, struct gnet_stats_queue *q, __u32 qlen); @@ -36,9 +39,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> void gnet_stats_add_queue(struct gnet_stats_queue *qstats, const struct gnet_stats_queue __percpu *cpu_q, const struct gnet_stats_queue *q); +diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h +index 8c2d611639fc..37516cd078b4 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h -@@ -968,10 +968,9 @@ static inline void qdisc_qstats_qlen_bac +@@ -972,10 +972,9 @@ static inline void qdisc_qstats_qlen_backlog(struct Qdisc *sch, __u32 *qlen, __u32 *backlog) { struct gnet_stats_queue qstats = { 0 }; @@ -51,9 +56,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> *backlog = qstats.backlog; } +diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c +index 26c020a7ead4..6ec11289140b 100644 --- a/net/core/gen_stats.c +++ b/net/core/gen_stats.c -@@ -285,42 +285,6 @@ gnet_stats_copy_rate_est(struct gnet_dum +@@ -285,42 +285,6 @@ gnet_stats_copy_rate_est(struct gnet_dump *d, } EXPORT_SYMBOL(gnet_stats_copy_rate_est); @@ -96,7 +103,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static void gnet_stats_add_queue_cpu(struct gnet_stats_queue *qstats, const struct gnet_stats_queue __percpu *q) { -@@ -374,7 +338,8 @@ gnet_stats_copy_queue(struct gnet_dump * +@@ -374,7 +338,8 @@ gnet_stats_copy_queue(struct gnet_dump *d, { struct gnet_stats_queue qstats = {0}; @@ -106,3 +113,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (d->compat_tc_stats) { d->tc_stats.drops = qstats.drops; +-- +2.33.1 + diff --git a/debian/patches-rt/0005-u64_stats-Introduce-u64_stats_set.patch b/debian/patches-rt/0042-u64_stats-Introduce-u64_stats_set.patch index bfee561b6..def7cac0c 100644 --- a/debian/patches-rt/0005-u64_stats-Introduce-u64_stats_set.patch +++ b/debian/patches-rt/0042-u64_stats-Introduce-u64_stats_set.patch @@ -1,7 +1,8 @@ +From bd4207eb981ee5a76342c3267740a23d1de4979c Mon Sep 17 00:00:00 2001 From: "Ahmed S. Darwish" <a.darwish@linutronix.de> Date: Sat, 16 Oct 2021 10:49:06 +0200 -Subject: [PATCH 5/9] u64_stats: Introduce u64_stats_set() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 042/158] u64_stats: Introduce u64_stats_set() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Allow to directly set a u64_stats_t value which is used to provide an init function which sets it directly to zero intead of memset() the value. @@ -14,12 +15,14 @@ Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net> --- - include/linux/u64_stats_sync.h | 10 ++++++++++ + include/linux/u64_stats_sync.h | 10 ++++++++++ 1 file changed, 10 insertions(+) +diff --git a/include/linux/u64_stats_sync.h b/include/linux/u64_stats_sync.h +index e81856c0ba13..e8ec116c916b 100644 --- a/include/linux/u64_stats_sync.h +++ b/include/linux/u64_stats_sync.h -@@ -83,6 +83,11 @@ static inline u64 u64_stats_read(const u +@@ -83,6 +83,11 @@ static inline u64 u64_stats_read(const u64_stats_t *p) return local64_read(&p->v); } @@ -31,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static inline void u64_stats_add(u64_stats_t *p, unsigned long val) { local64_add(val, &p->v); -@@ -104,6 +109,11 @@ static inline u64 u64_stats_read(const u +@@ -104,6 +109,11 @@ static inline u64 u64_stats_read(const u64_stats_t *p) return p->v; } @@ -43,3 +46,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static inline void u64_stats_add(u64_stats_t *p, unsigned long val) { p->v += val; +-- +2.33.1 + diff --git a/debian/patches-rt/0006-net-sched-Protect-Qdisc-bstats-with-u64_stats.patch b/debian/patches-rt/0043-net-sched-Protect-Qdisc-bstats-with-u64_stats.patch index f06e4324a..cf92781f7 100644 --- a/debian/patches-rt/0006-net-sched-Protect-Qdisc-bstats-with-u64_stats.patch +++ b/debian/patches-rt/0043-net-sched-Protect-Qdisc-bstats-with-u64_stats.patch @@ -1,7 +1,8 @@ +From f15edf339b4dc8cf6e5c7608a422afc55aa81140 Mon Sep 17 00:00:00 2001 From: "Ahmed S. Darwish" <a.darwish@linutronix.de> Date: Sat, 16 Oct 2021 10:49:07 +0200 -Subject: [PATCH 6/9] net: sched: Protect Qdisc::bstats with u64_stats -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 043/158] net: sched: Protect Qdisc::bstats with u64_stats +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The not-per-CPU variant of qdisc tc (traffic control) statistics, Qdisc::gnet_stats_basic_packed bstats, is protected with Qdisc::running @@ -37,25 +38,27 @@ Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net> --- - include/net/gen_stats.h | 2 ++ - include/net/sch_generic.h | 2 ++ - net/core/gen_estimator.c | 2 +- - net/core/gen_stats.c | 14 ++++++++++++-- - net/netfilter/xt_RATEEST.c | 1 + - net/sched/act_api.c | 2 ++ - net/sched/sch_atm.c | 1 + - net/sched/sch_cbq.c | 1 + - net/sched/sch_drr.c | 1 + - net/sched/sch_ets.c | 2 +- - net/sched/sch_generic.c | 1 + - net/sched/sch_gred.c | 4 +++- - net/sched/sch_hfsc.c | 1 + - net/sched/sch_htb.c | 7 +++++-- - net/sched/sch_mq.c | 2 +- - net/sched/sch_mqprio.c | 5 +++-- - net/sched/sch_qfq.c | 1 + + include/net/gen_stats.h | 2 ++ + include/net/sch_generic.h | 2 ++ + net/core/gen_estimator.c | 2 +- + net/core/gen_stats.c | 14 ++++++++++++-- + net/netfilter/xt_RATEEST.c | 1 + + net/sched/act_api.c | 2 ++ + net/sched/sch_atm.c | 1 + + net/sched/sch_cbq.c | 1 + + net/sched/sch_drr.c | 1 + + net/sched/sch_ets.c | 2 +- + net/sched/sch_generic.c | 1 + + net/sched/sch_gred.c | 4 +++- + net/sched/sch_hfsc.c | 1 + + net/sched/sch_htb.c | 7 +++++-- + net/sched/sch_mq.c | 2 +- + net/sched/sch_mqprio.c | 5 +++-- + net/sched/sch_qfq.c | 1 + 17 files changed, 39 insertions(+), 10 deletions(-) +diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h +index d47155f5db5d..304d792f7977 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h @@ -11,6 +11,7 @@ @@ -74,9 +77,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> int gnet_stats_start_copy(struct sk_buff *skb, int type, spinlock_t *lock, struct gnet_dump *d, int padattr); +diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h +index 37516cd078b4..594aa219aecd 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h -@@ -848,8 +848,10 @@ static inline int qdisc_enqueue(struct s +@@ -852,8 +852,10 @@ static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch, static inline void _bstats_update(struct gnet_stats_basic_packed *bstats, __u64 bytes, __u32 packets) { @@ -87,6 +92,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } static inline void bstats_update(struct gnet_stats_basic_packed *bstats, +diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c +index 205df8b5116e..64978e77368f 100644 --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c @@ -62,7 +62,7 @@ struct net_rate_estimator { @@ -98,6 +105,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (e->stats_lock) spin_lock(e->stats_lock); +diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c +index 6ec11289140b..f2e12fe7112b 100644 --- a/net/core/gen_stats.c +++ b/net/core/gen_stats.c @@ -18,7 +18,7 @@ @@ -109,7 +118,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static inline int gnet_stats_copy(struct gnet_dump *d, int type, void *buf, int size, int padattr) -@@ -114,6 +114,15 @@ gnet_stats_start_copy(struct sk_buff *sk +@@ -114,6 +114,15 @@ gnet_stats_start_copy(struct sk_buff *skb, int type, spinlock_t *lock, } EXPORT_SYMBOL(gnet_stats_start_copy); @@ -125,7 +134,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static void gnet_stats_add_basic_cpu(struct gnet_stats_basic_packed *bstats, struct gnet_stats_basic_cpu __percpu *cpu) { -@@ -167,8 +176,9 @@ static int +@@ -167,8 +176,9 @@ ___gnet_stats_copy_basic(const seqcount_t *running, struct gnet_stats_basic_packed *b, int type) { @@ -136,9 +145,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> gnet_stats_add_basic(running, &bstats, cpu, b); if (d->compat_tc_stats && type == TCA_STATS_BASIC) { +diff --git a/net/netfilter/xt_RATEEST.c b/net/netfilter/xt_RATEEST.c +index 0d5c422f8745..d5200725ca62 100644 --- a/net/netfilter/xt_RATEEST.c +++ b/net/netfilter/xt_RATEEST.c -@@ -143,6 +143,7 @@ static int xt_rateest_tg_checkentry(cons +@@ -143,6 +143,7 @@ static int xt_rateest_tg_checkentry(const struct xt_tgchk_param *par) if (!est) goto err1; @@ -146,9 +157,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> strlcpy(est->name, info->name, sizeof(est->name)); spin_lock_init(&est->lock); est->refcnt = 1; +diff --git a/net/sched/act_api.c b/net/sched/act_api.c +index 7dd3a2dc5fa4..0302dad42df1 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c -@@ -490,6 +490,8 @@ int tcf_idr_create(struct tc_action_net +@@ -490,6 +490,8 @@ int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est, if (!p->cpu_qstats) goto err3; } @@ -157,9 +170,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> spin_lock_init(&p->tcfa_lock); p->tcfa_index = index; p->tcfa_tm.install = jiffies; +diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c +index 7d8518176b45..c8e1771383f9 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c -@@ -548,6 +548,7 @@ static int atm_tc_init(struct Qdisc *sch +@@ -548,6 +548,7 @@ static int atm_tc_init(struct Qdisc *sch, struct nlattr *opt, pr_debug("atm_tc_init(sch %p,[qdisc %p],opt %p)\n", sch, p, opt); INIT_LIST_HEAD(&p->flows); INIT_LIST_HEAD(&p->link.list); @@ -167,9 +182,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> list_add(&p->link.list, &p->flows); p->link.q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, sch->handle, extack); +diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c +index e0da15530f0e..d01f6ec315f8 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c -@@ -1611,6 +1611,7 @@ cbq_change_class(struct Qdisc *sch, u32 +@@ -1611,6 +1611,7 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **t if (cl == NULL) goto failure; @@ -177,9 +194,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> err = tcf_block_get(&cl->block, &cl->filter_list, sch, extack); if (err) { kfree(cl); +diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c +index 642cd179b7a7..319906e19a6b 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c -@@ -106,6 +106,7 @@ static int drr_change_class(struct Qdisc +@@ -106,6 +106,7 @@ static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid, if (cl == NULL) return -ENOBUFS; @@ -187,9 +206,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> cl->common.classid = classid; cl->quantum = quantum; cl->qdisc = qdisc_create_dflt(sch->dev_queue, +diff --git a/net/sched/sch_ets.c b/net/sched/sch_ets.c +index 2c27f4149149..12eb5a94df07 100644 --- a/net/sched/sch_ets.c +++ b/net/sched/sch_ets.c -@@ -689,7 +689,7 @@ static int ets_qdisc_change(struct Qdisc +@@ -691,7 +691,7 @@ static int ets_qdisc_change(struct Qdisc *sch, struct nlattr *opt, q->classes[i].qdisc = NULL; q->classes[i].quantum = 0; q->classes[i].deficit = 0; @@ -198,9 +219,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> memset(&q->classes[i].qstats, 0, sizeof(q->classes[i].qstats)); } return 0; +diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c +index 66d2fbe9ef50..18c73ba1e6ff 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -892,6 +892,7 @@ struct Qdisc *qdisc_alloc(struct netdev_ +@@ -892,6 +892,7 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue, __skb_queue_head_init(&sch->gso_skb); __skb_queue_head_init(&sch->skb_bad_txq); qdisc_skb_head_init(&sch->q); @@ -208,9 +231,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> spin_lock_init(&sch->q.lock); if (ops->static_flags & TCQ_F_CPUSTATS) { +diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c +index 621dc6afde8f..2ddcbb2efdbb 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c -@@ -364,9 +364,11 @@ static int gred_offload_dump_stats(struc +@@ -364,9 +364,11 @@ static int gred_offload_dump_stats(struct Qdisc *sch) hw_stats->handle = sch->handle; hw_stats->parent = sch->parent; @@ -223,9 +248,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> ret = qdisc_offload_dump_helper(sch, TC_SETUP_QDISC_GRED, hw_stats); /* Even if driver returns failure adjust the stats - in case offload +diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c +index b7ac30cca035..ff6ff54806fc 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c -@@ -1406,6 +1406,7 @@ hfsc_init_qdisc(struct Qdisc *sch, struc +@@ -1406,6 +1406,7 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt, if (err) return err; @@ -233,9 +260,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> q->root.cl_common.classid = sch->handle; q->root.sched = q; q->root.qdisc = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, +diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c +index 5067a6e5d4fd..2e805b17efcf 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c -@@ -1311,7 +1311,7 @@ static void htb_offload_aggregate_stats( +@@ -1311,7 +1311,7 @@ static void htb_offload_aggregate_stats(struct htb_sched *q, struct htb_class *c; unsigned int i; @@ -244,7 +273,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> for (i = 0; i < q->clhash.hashsize; i++) { hlist_for_each_entry(c, &q->clhash.hash[i], common.hnode) { -@@ -1357,7 +1357,7 @@ htb_dump_class_stats(struct Qdisc *sch, +@@ -1357,7 +1357,7 @@ htb_dump_class_stats(struct Qdisc *sch, unsigned long arg, struct gnet_dump *d) if (cl->leaf.q) cl->bstats = cl->leaf.q->bstats; else @@ -253,7 +282,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> cl->bstats.bytes += cl->bstats_bias.bytes; cl->bstats.packets += cl->bstats_bias.packets; } else { -@@ -1849,6 +1849,9 @@ static int htb_change_class(struct Qdisc +@@ -1849,6 +1849,9 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, if (!cl) goto failure; @@ -263,9 +292,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> err = tcf_block_get(&cl->block, &cl->filter_list, sch, extack); if (err) { kfree(cl); +diff --git a/net/sched/sch_mq.c b/net/sched/sch_mq.c +index a7b4c900c0da..12bb61540abd 100644 --- a/net/sched/sch_mq.c +++ b/net/sched/sch_mq.c -@@ -132,7 +132,7 @@ static int mq_dump(struct Qdisc *sch, st +@@ -155,7 +155,7 @@ static int mq_dump(struct Qdisc *sch, struct sk_buff *skb) unsigned int ntx; sch->q.qlen = 0; @@ -274,9 +305,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> memset(&sch->qstats, 0, sizeof(sch->qstats)); /* MQ supports lockless qdiscs. However, statistics accounting needs +diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c +index 5313a0041beb..11d713d8f8b1 100644 --- a/net/sched/sch_mqprio.c +++ b/net/sched/sch_mqprio.c -@@ -390,7 +390,7 @@ static int mqprio_dump(struct Qdisc *sch +@@ -412,7 +412,7 @@ static int mqprio_dump(struct Qdisc *sch, struct sk_buff *skb) unsigned int ntx, tc; sch->q.qlen = 0; @@ -285,7 +318,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> memset(&sch->qstats, 0, sizeof(sch->qstats)); /* MQ supports lockless qdiscs. However, statistics accounting needs -@@ -500,10 +500,11 @@ static int mqprio_dump_class_stats(struc +@@ -522,10 +522,11 @@ static int mqprio_dump_class_stats(struct Qdisc *sch, unsigned long cl, int i; __u32 qlen; struct gnet_stats_queue qstats = {0}; @@ -298,9 +331,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> /* Drop lock here it will be reclaimed before touching * statistics this is required because the d->lock we * hold here is the look on dev_queue->qdisc_sleeping +diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c +index 58a9d42b52b8..b6d989b69324 100644 --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c -@@ -465,6 +465,7 @@ static int qfq_change_class(struct Qdisc +@@ -465,6 +465,7 @@ static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, if (cl == NULL) return -ENOBUFS; @@ -308,3 +343,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net> cl->common.classid = classid; cl->deficit = lmax; +-- +2.33.1 + diff --git a/debian/patches-rt/0007-net-sched-Use-_bstats_update-set-instead-of-raw-writ.patch b/debian/patches-rt/0044-net-sched-Use-_bstats_update-set-instead-of-raw-writ.patch index fb9d09e16..660faec95 100644 --- a/debian/patches-rt/0007-net-sched-Use-_bstats_update-set-instead-of-raw-writ.patch +++ b/debian/patches-rt/0044-net-sched-Use-_bstats_update-set-instead-of-raw-writ.patch @@ -1,8 +1,9 @@ +From c4ce2cc4fb9589ae1f28fe8bc31a7dfa83b1b6e5 Mon Sep 17 00:00:00 2001 From: "Ahmed S. Darwish" <a.darwish@linutronix.de> Date: Sat, 16 Oct 2021 10:49:08 +0200 -Subject: [PATCH 7/9] net: sched: Use _bstats_update/set() instead of raw +Subject: [PATCH 044/158] net: sched: Use _bstats_update/set() instead of raw writes -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The Qdisc::running sequence counter, used to protect Qdisc::bstats reads from parallel writes, is in the process of being removed. Qdisc::bstats @@ -17,16 +18,18 @@ Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net> --- - net/core/gen_stats.c | 9 +++++---- - net/sched/sch_cbq.c | 3 +-- - net/sched/sch_gred.c | 7 ++++--- - net/sched/sch_htb.c | 25 +++++++++++++++---------- - net/sched/sch_qfq.c | 3 +-- + net/core/gen_stats.c | 9 +++++---- + net/sched/sch_cbq.c | 3 +-- + net/sched/sch_gred.c | 7 ++++--- + net/sched/sch_htb.c | 25 +++++++++++++++---------- + net/sched/sch_qfq.c | 3 +-- 5 files changed, 26 insertions(+), 21 deletions(-) +diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c +index f2e12fe7112b..69576972a25f 100644 --- a/net/core/gen_stats.c +++ b/net/core/gen_stats.c -@@ -126,6 +126,7 @@ EXPORT_SYMBOL(gnet_stats_basic_packed_in +@@ -126,6 +126,7 @@ EXPORT_SYMBOL(gnet_stats_basic_packed_init); static void gnet_stats_add_basic_cpu(struct gnet_stats_basic_packed *bstats, struct gnet_stats_basic_cpu __percpu *cpu) { @@ -34,7 +37,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> int i; for_each_possible_cpu(i) { -@@ -139,9 +140,10 @@ static void gnet_stats_add_basic_cpu(str +@@ -139,9 +140,10 @@ static void gnet_stats_add_basic_cpu(struct gnet_stats_basic_packed *bstats, packets = bcpu->bstats.packets; } while (u64_stats_fetch_retry_irq(&bcpu->syncp, start)); @@ -47,7 +50,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } void gnet_stats_add_basic(const seqcount_t *running, -@@ -164,8 +166,7 @@ void gnet_stats_add_basic(const seqcount +@@ -164,8 +166,7 @@ void gnet_stats_add_basic(const seqcount_t *running, packets = b->packets; } while (running && read_seqcount_retry(running, seq)); @@ -57,6 +60,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } EXPORT_SYMBOL(gnet_stats_add_basic); +diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c +index d01f6ec315f8..ef9e87175d35 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c @@ -565,8 +565,7 @@ cbq_update(struct cbq_sched_data *q) @@ -69,9 +74,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> /* * (now - last) is total time between packet right edges. +diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c +index 2ddcbb2efdbb..02b03d6d24ea 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c -@@ -353,6 +353,7 @@ static int gred_offload_dump_stats(struc +@@ -353,6 +353,7 @@ static int gred_offload_dump_stats(struct Qdisc *sch) { struct gred_sched *table = qdisc_priv(sch); struct tc_gred_qopt_offload *hw_stats; @@ -79,7 +86,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> unsigned int i; int ret; -@@ -381,15 +382,15 @@ static int gred_offload_dump_stats(struc +@@ -381,15 +382,15 @@ static int gred_offload_dump_stats(struct Qdisc *sch) table->tab[i]->bytesin += hw_stats->stats.bstats[i].bytes; table->tab[i]->backlog += hw_stats->stats.qstats[i].backlog; @@ -98,9 +105,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> kfree(hw_stats); return ret; +diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c +index 2e805b17efcf..324ecfdf842a 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c -@@ -1308,6 +1308,7 @@ static int htb_dump_class(struct Qdisc * +@@ -1308,6 +1308,7 @@ static int htb_dump_class(struct Qdisc *sch, unsigned long arg, static void htb_offload_aggregate_stats(struct htb_sched *q, struct htb_class *cl) { @@ -108,7 +117,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct htb_class *c; unsigned int i; -@@ -1323,14 +1324,15 @@ static void htb_offload_aggregate_stats( +@@ -1323,14 +1324,15 @@ static void htb_offload_aggregate_stats(struct htb_sched *q, if (p != cl) continue; @@ -128,7 +137,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } static int -@@ -1358,8 +1360,9 @@ htb_dump_class_stats(struct Qdisc *sch, +@@ -1358,8 +1360,9 @@ htb_dump_class_stats(struct Qdisc *sch, unsigned long arg, struct gnet_dump *d) cl->bstats = cl->leaf.q->bstats; else gnet_stats_basic_packed_init(&cl->bstats); @@ -140,7 +149,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } else { htb_offload_aggregate_stats(q, cl); } -@@ -1578,8 +1581,9 @@ static int htb_destroy_class_offload(str +@@ -1578,8 +1581,9 @@ static int htb_destroy_class_offload(struct Qdisc *sch, struct htb_class *cl, WARN_ON(old != q); if (cl->parent) { @@ -152,7 +161,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } offload_opt = (struct tc_htb_qopt_offload) { -@@ -1925,8 +1929,9 @@ static int htb_change_class(struct Qdisc +@@ -1925,8 +1929,9 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, htb_graft_helper(dev_queue, old_q); goto err_kill_estimator; } @@ -164,9 +173,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> qdisc_put(old_q); } new_q = qdisc_create_dflt(dev_queue, &pfifo_qdisc_ops, +diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c +index b6d989b69324..bea68c91027a 100644 --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c -@@ -1235,8 +1235,7 @@ static int qfq_enqueue(struct sk_buff *s +@@ -1235,8 +1235,7 @@ static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch, return err; } @@ -176,3 +187,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net> sch->qstats.backlog += len; ++sch->q.qlen; +-- +2.33.1 + diff --git a/debian/patches-rt/0008-net-sched-Merge-Qdisc-bstats-and-Qdisc-cpu_bstats-da.patch b/debian/patches-rt/0045-net-sched-Merge-Qdisc-bstats-and-Qdisc-cpu_bstats-da.patch index cd2c0b496..3a05a5112 100644 --- a/debian/patches-rt/0008-net-sched-Merge-Qdisc-bstats-and-Qdisc-cpu_bstats-da.patch +++ b/debian/patches-rt/0045-net-sched-Merge-Qdisc-bstats-and-Qdisc-cpu_bstats-da.patch @@ -1,8 +1,9 @@ +From 872703093ad3ae27e9cb1d9f67ffab0988d83e63 Mon Sep 17 00:00:00 2001 From: "Ahmed S. Darwish" <a.darwish@linutronix.de> Date: Sat, 16 Oct 2021 10:49:09 +0200 -Subject: [PATCH 8/9] net: sched: Merge Qdisc::bstats and Qdisc::cpu_bstats +Subject: [PATCH 045/158] net: sched: Merge Qdisc::bstats and Qdisc::cpu_bstats data types -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The only factor differentiating per-CPU bstats data type (struct gnet_stats_basic_cpu) from the packed non-per-CPU one (struct @@ -21,41 +22,43 @@ Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net> --- - drivers/net/ethernet/netronome/nfp/abm/qdisc.c | 2 - include/net/act_api.h | 10 ++-- - include/net/gen_stats.h | 44 +++++++++-------- - include/net/netfilter/xt_rateest.h | 2 - include/net/pkt_cls.h | 4 - - include/net/sch_generic.h | 34 +++---------- - net/core/gen_estimator.c | 36 ++++++++------ - net/core/gen_stats.c | 62 +++++++++++++------------ - net/netfilter/xt_RATEEST.c | 8 +-- - net/sched/act_api.c | 14 ++--- - net/sched/act_bpf.c | 2 - net/sched/act_ife.c | 4 - - net/sched/act_mpls.c | 2 - net/sched/act_police.c | 2 - net/sched/act_sample.c | 2 - net/sched/act_simple.c | 3 - - net/sched/act_skbedit.c | 2 - net/sched/act_skbmod.c | 2 - net/sched/sch_api.c | 2 - net/sched/sch_atm.c | 4 - - net/sched/sch_cbq.c | 4 - - net/sched/sch_drr.c | 4 - - net/sched/sch_ets.c | 4 - - net/sched/sch_generic.c | 4 - - net/sched/sch_gred.c | 10 ++-- - net/sched/sch_hfsc.c | 4 - - net/sched/sch_htb.c | 32 ++++++------ - net/sched/sch_mq.c | 2 - net/sched/sch_mqprio.c | 6 +- - net/sched/sch_qfq.c | 4 - + .../net/ethernet/netronome/nfp/abm/qdisc.c | 2 +- + include/net/act_api.h | 10 +-- + include/net/gen_stats.h | 44 ++++++------- + include/net/netfilter/xt_rateest.h | 2 +- + include/net/pkt_cls.h | 4 +- + include/net/sch_generic.h | 34 +++------- + net/core/gen_estimator.c | 36 ++++++----- + net/core/gen_stats.c | 62 ++++++++++--------- + net/netfilter/xt_RATEEST.c | 8 +-- + net/sched/act_api.c | 14 ++--- + net/sched/act_bpf.c | 2 +- + net/sched/act_ife.c | 4 +- + net/sched/act_mpls.c | 2 +- + net/sched/act_police.c | 2 +- + net/sched/act_sample.c | 2 +- + net/sched/act_simple.c | 3 +- + net/sched/act_skbedit.c | 2 +- + net/sched/act_skbmod.c | 2 +- + net/sched/sch_api.c | 2 +- + net/sched/sch_atm.c | 4 +- + net/sched/sch_cbq.c | 4 +- + net/sched/sch_drr.c | 4 +- + net/sched/sch_ets.c | 4 +- + net/sched/sch_generic.c | 4 +- + net/sched/sch_gred.c | 10 +-- + net/sched/sch_hfsc.c | 4 +- + net/sched/sch_htb.c | 32 +++++----- + net/sched/sch_mq.c | 2 +- + net/sched/sch_mqprio.c | 6 +- + net/sched/sch_qfq.c | 4 +- 30 files changed, 155 insertions(+), 160 deletions(-) +diff --git a/drivers/net/ethernet/netronome/nfp/abm/qdisc.c b/drivers/net/ethernet/netronome/nfp/abm/qdisc.c +index 2473fb5f75e5..2a5cc64227e9 100644 --- a/drivers/net/ethernet/netronome/nfp/abm/qdisc.c +++ b/drivers/net/ethernet/netronome/nfp/abm/qdisc.c -@@ -458,7 +458,7 @@ nfp_abm_qdisc_graft(struct nfp_abm_link +@@ -458,7 +458,7 @@ nfp_abm_qdisc_graft(struct nfp_abm_link *alink, u32 handle, u32 child_handle, static void nfp_abm_stats_calculate(struct nfp_alink_stats *new, struct nfp_alink_stats *old, @@ -64,6 +67,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct gnet_stats_queue *qstats) { _bstats_update(bstats, new->tx_bytes - old->tx_bytes, +diff --git a/include/net/act_api.h b/include/net/act_api.h +index f19f7f4a463c..b5b624c7e488 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h @@ -30,13 +30,13 @@ struct tc_action { @@ -84,7 +89,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct gnet_stats_queue __percpu *cpu_qstats; struct tc_cookie __rcu *act_cookie; struct tcf_chain __rcu *goto_chain; -@@ -206,7 +206,7 @@ static inline void tcf_action_update_bst +@@ -206,7 +206,7 @@ static inline void tcf_action_update_bstats(struct tc_action *a, struct sk_buff *skb) { if (likely(a->cpu_bstats)) { @@ -93,6 +98,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> return; } spin_lock(&a->tcfa_lock); +diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h +index 304d792f7977..52b87588f467 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h @@ -7,15 +7,17 @@ @@ -131,7 +138,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> int gnet_stats_start_copy(struct sk_buff *skb, int type, spinlock_t *lock, struct gnet_dump *d, int padattr); -@@ -46,16 +48,16 @@ int gnet_stats_start_copy_compat(struct +@@ -46,16 +48,16 @@ int gnet_stats_start_copy_compat(struct sk_buff *skb, int type, int gnet_stats_copy_basic(const seqcount_t *running, struct gnet_dump *d, @@ -155,7 +162,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> int gnet_stats_copy_rate_est(struct gnet_dump *d, struct net_rate_estimator __rcu **ptr); int gnet_stats_copy_queue(struct gnet_dump *d, -@@ -68,14 +70,14 @@ int gnet_stats_copy_app(struct gnet_dump +@@ -68,14 +70,14 @@ int gnet_stats_copy_app(struct gnet_dump *d, void *st, int len); int gnet_stats_finish_copy(struct gnet_dump *d); @@ -174,6 +181,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct net_rate_estimator __rcu **ptr, spinlock_t *lock, seqcount_t *running, struct nlattr *opt); +diff --git a/include/net/netfilter/xt_rateest.h b/include/net/netfilter/xt_rateest.h +index 832ab69efda5..4c3809e141f4 100644 --- a/include/net/netfilter/xt_rateest.h +++ b/include/net/netfilter/xt_rateest.h @@ -6,7 +6,7 @@ @@ -185,6 +194,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> spinlock_t lock; +diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h +index 83a6d0792180..4a5833108083 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -765,7 +765,7 @@ struct tc_cookie { @@ -205,6 +216,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct gnet_stats_queue qstats[MAX_DPs]; struct red_stats *xstats[MAX_DPs]; }; +diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h +index 594aa219aecd..79499a48030b 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -97,7 +97,7 @@ struct Qdisc { @@ -225,7 +238,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> seqcount_t running; struct gnet_stats_queue qstats; unsigned long state; -@@ -845,16 +845,16 @@ static inline int qdisc_enqueue(struct s +@@ -849,16 +849,16 @@ static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch, return sch->enqueue(skb, sch, to_free); } @@ -246,7 +259,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> const struct sk_buff *skb) { _bstats_update(bstats, -@@ -862,26 +862,10 @@ static inline void bstats_update(struct +@@ -866,26 +866,10 @@ static inline void bstats_update(struct gnet_stats_basic_packed *bstats, skb_is_gso(skb) ? skb_shinfo(skb)->gso_segs : 1); } @@ -274,7 +287,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } static inline void qdisc_bstats_update(struct Qdisc *sch, -@@ -1313,7 +1297,7 @@ void psched_ppscfg_precompute(struct psc +@@ -1317,7 +1301,7 @@ void psched_ppscfg_precompute(struct psched_pktrate *r, u64 pktrate64); struct mini_Qdisc { struct tcf_proto *filter_list; struct tcf_block *block; @@ -283,7 +296,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct gnet_stats_queue __percpu *cpu_qstats; struct rcu_head rcu; }; -@@ -1321,7 +1305,7 @@ struct mini_Qdisc { +@@ -1325,7 +1309,7 @@ struct mini_Qdisc { static inline void mini_qdisc_bstats_cpu_update(struct mini_Qdisc *miniq, const struct sk_buff *skb) { @@ -292,6 +305,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } static inline void mini_qdisc_qstats_cpu_drop(struct mini_Qdisc *miniq) +diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c +index 64978e77368f..a73ad0bf324c 100644 --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c @@ -40,10 +40,10 @@ @@ -319,7 +334,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (e->stats_lock) spin_lock(e->stats_lock); -@@ -76,14 +76,18 @@ static void est_fetch_counters(struct ne +@@ -76,14 +76,18 @@ static void est_fetch_counters(struct net_rate_estimator *e, static void est_timer(struct timer_list *t) { struct net_rate_estimator *est = from_timer(est, t, timer); @@ -341,7 +356,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> rate = (rate >> est->ewma_log) - (est->avpps >> est->ewma_log); write_seqcount_begin(&est->seq); -@@ -91,8 +95,8 @@ static void est_timer(struct timer_list +@@ -91,8 +95,8 @@ static void est_timer(struct timer_list *t) est->avpps += rate; write_seqcount_end(&est->seq); @@ -352,7 +367,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> est->next_jiffies += ((HZ/4) << est->intvl_log); -@@ -121,8 +125,8 @@ static void est_timer(struct timer_list +@@ -121,8 +125,8 @@ static void est_timer(struct timer_list *t) * Returns 0 on success or a negative error code. * */ @@ -363,7 +378,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct net_rate_estimator __rcu **rate_est, spinlock_t *lock, seqcount_t *running, -@@ -130,7 +134,7 @@ int gen_new_estimator(struct gnet_stats_ +@@ -130,7 +134,7 @@ int gen_new_estimator(struct gnet_stats_basic_packed *bstats, { struct gnet_estimator *parm = nla_data(opt); struct net_rate_estimator *old, *est; @@ -372,7 +387,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> int intvl_log; if (nla_len(opt) < sizeof(*parm)) -@@ -164,8 +168,8 @@ int gen_new_estimator(struct gnet_stats_ +@@ -164,8 +168,8 @@ int gen_new_estimator(struct gnet_stats_basic_packed *bstats, est_fetch_counters(est, &b); if (lock) local_bh_enable(); @@ -394,9 +409,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct net_rate_estimator __rcu **rate_est, spinlock_t *lock, seqcount_t *running, struct nlattr *opt) +diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c +index 69576972a25f..5f57f761def6 100644 --- a/net/core/gen_stats.c +++ b/net/core/gen_stats.c -@@ -115,29 +115,29 @@ gnet_stats_start_copy(struct sk_buff *sk +@@ -115,29 +115,29 @@ gnet_stats_start_copy(struct sk_buff *skb, int type, spinlock_t *lock, EXPORT_SYMBOL(gnet_stats_start_copy); /* Must not be inlined, due to u64_stats seqcount_t lockdep key */ @@ -435,7 +452,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } while (u64_stats_fetch_retry_irq(&bcpu->syncp, start)); t_bytes += bytes; -@@ -147,9 +147,9 @@ static void gnet_stats_add_basic_cpu(str +@@ -147,9 +147,9 @@ static void gnet_stats_add_basic_cpu(struct gnet_stats_basic_packed *bstats, } void gnet_stats_add_basic(const seqcount_t *running, @@ -448,7 +465,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> { unsigned int seq; u64 bytes = 0; -@@ -162,8 +162,8 @@ void gnet_stats_add_basic(const seqcount +@@ -162,8 +162,8 @@ void gnet_stats_add_basic(const seqcount_t *running, do { if (running) seq = read_seqcount_begin(running); @@ -488,7 +505,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } if (d->tail) { -@@ -192,14 +196,14 @@ static int +@@ -192,14 +196,14 @@ ___gnet_stats_copy_basic(const seqcount_t *running, int res; memset(&sb, 0, sizeof(sb)); @@ -508,7 +525,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } return 0; } -@@ -220,8 +224,8 @@ static int +@@ -220,8 +224,8 @@ ___gnet_stats_copy_basic(const seqcount_t *running, int gnet_stats_copy_basic(const seqcount_t *running, struct gnet_dump *d, @@ -530,6 +547,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> { return ___gnet_stats_copy_basic(running, d, cpu, b, TCA_STATS_BASIC_HW); +diff --git a/net/netfilter/xt_RATEEST.c b/net/netfilter/xt_RATEEST.c +index d5200725ca62..8aec1b529364 100644 --- a/net/netfilter/xt_RATEEST.c +++ b/net/netfilter/xt_RATEEST.c @@ -94,11 +94,11 @@ static unsigned int @@ -547,7 +566,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> spin_unlock_bh(&info->est->lock); return XT_CONTINUE; -@@ -143,7 +143,7 @@ static int xt_rateest_tg_checkentry(cons +@@ -143,7 +143,7 @@ static int xt_rateest_tg_checkentry(const struct xt_tgchk_param *par) if (!est) goto err1; @@ -556,9 +575,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> strlcpy(est->name, info->name, sizeof(est->name)); spin_lock_init(&est->lock); est->refcnt = 1; +diff --git a/net/sched/act_api.c b/net/sched/act_api.c +index 0302dad42df1..585829ffa0c4 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c -@@ -480,18 +480,18 @@ int tcf_idr_create(struct tc_action_net +@@ -480,18 +480,18 @@ int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est, atomic_set(&p->tcfa_bindcnt, 1); if (cpustats) { @@ -581,7 +602,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> spin_lock_init(&p->tcfa_lock); p->tcfa_index = index; p->tcfa_tm.install = jiffies; -@@ -1128,13 +1128,13 @@ void tcf_action_update_stats(struct tc_a +@@ -1128,13 +1128,13 @@ void tcf_action_update_stats(struct tc_action *a, u64 bytes, u64 packets, u64 drops, bool hw) { if (a->cpu_bstats) { @@ -598,9 +619,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> return; } +diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c +index 5c36013339e1..f2bf896331a5 100644 --- a/net/sched/act_bpf.c +++ b/net/sched/act_bpf.c -@@ -41,7 +41,7 @@ static int tcf_bpf_act(struct sk_buff *s +@@ -41,7 +41,7 @@ static int tcf_bpf_act(struct sk_buff *skb, const struct tc_action *act, int action, filter_res; tcf_lastuse_update(&prog->tcf_tm); @@ -609,9 +632,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> filter = rcu_dereference(prog->filter); if (at_ingress) { +diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c +index 7064a365a1a9..b757f90a2d58 100644 --- a/net/sched/act_ife.c +++ b/net/sched/act_ife.c -@@ -718,7 +718,7 @@ static int tcf_ife_decode(struct sk_buff +@@ -718,7 +718,7 @@ static int tcf_ife_decode(struct sk_buff *skb, const struct tc_action *a, u8 *tlv_data; u16 metalen; @@ -620,7 +645,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> tcf_lastuse_update(&ife->tcf_tm); if (skb_at_tc_ingress(skb)) -@@ -806,7 +806,7 @@ static int tcf_ife_encode(struct sk_buff +@@ -806,7 +806,7 @@ static int tcf_ife_encode(struct sk_buff *skb, const struct tc_action *a, exceed_mtu = true; } @@ -629,9 +654,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> tcf_lastuse_update(&ife->tcf_tm); if (!metalen) { /* no metadata to send */ +diff --git a/net/sched/act_mpls.c b/net/sched/act_mpls.c +index e4529b428cf4..8faa4c58305e 100644 --- a/net/sched/act_mpls.c +++ b/net/sched/act_mpls.c -@@ -59,7 +59,7 @@ static int tcf_mpls_act(struct sk_buff * +@@ -59,7 +59,7 @@ static int tcf_mpls_act(struct sk_buff *skb, const struct tc_action *a, int ret, mac_len; tcf_lastuse_update(&m->tcf_tm); @@ -640,9 +667,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> /* Ensure 'data' points at mac_header prior calling mpls manipulating * functions. +diff --git a/net/sched/act_police.c b/net/sched/act_police.c +index 832157a840fc..c9383805222d 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c -@@ -248,7 +248,7 @@ static int tcf_police_act(struct sk_buff +@@ -248,7 +248,7 @@ static int tcf_police_act(struct sk_buff *skb, const struct tc_action *a, int ret; tcf_lastuse_update(&police->tcf_tm); @@ -651,9 +680,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> ret = READ_ONCE(police->tcf_action); p = rcu_dereference_bh(police->params); +diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c +index 230501eb9e06..ce859b0e0deb 100644 --- a/net/sched/act_sample.c +++ b/net/sched/act_sample.c -@@ -163,7 +163,7 @@ static int tcf_sample_act(struct sk_buff +@@ -163,7 +163,7 @@ static int tcf_sample_act(struct sk_buff *skb, const struct tc_action *a, int retval; tcf_lastuse_update(&s->tcf_tm); @@ -662,9 +693,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> retval = READ_ONCE(s->tcf_action); psample_group = rcu_dereference_bh(s->psample_group); +diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c +index cbbe1861d3a2..e617ab4505ca 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c -@@ -36,7 +36,8 @@ static int tcf_simp_act(struct sk_buff * +@@ -36,7 +36,8 @@ static int tcf_simp_act(struct sk_buff *skb, const struct tc_action *a, * then it would look like "hello_3" (without quotes) */ pr_info("simple: %s_%llu\n", @@ -674,9 +707,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> spin_unlock(&d->tcf_lock); return d->tcf_action; } +diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c +index 605418538347..d30ecbfc8f84 100644 --- a/net/sched/act_skbedit.c +++ b/net/sched/act_skbedit.c -@@ -31,7 +31,7 @@ static int tcf_skbedit_act(struct sk_buf +@@ -31,7 +31,7 @@ static int tcf_skbedit_act(struct sk_buff *skb, const struct tc_action *a, int action; tcf_lastuse_update(&d->tcf_tm); @@ -685,9 +720,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> params = rcu_dereference_bh(d->params); action = READ_ONCE(d->tcf_action); +diff --git a/net/sched/act_skbmod.c b/net/sched/act_skbmod.c +index ecb9ee666095..9b6b52c5e24e 100644 --- a/net/sched/act_skbmod.c +++ b/net/sched/act_skbmod.c -@@ -31,7 +31,7 @@ static int tcf_skbmod_act(struct sk_buff +@@ -31,7 +31,7 @@ static int tcf_skbmod_act(struct sk_buff *skb, const struct tc_action *a, u64 flags; tcf_lastuse_update(&d->tcf_tm); @@ -696,9 +733,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> action = READ_ONCE(d->tcf_action); if (unlikely(action == TC_ACT_SHOT)) +diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c +index 12f39a2dffd4..2ba8b824224a 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c -@@ -884,7 +884,7 @@ static void qdisc_offload_graft_root(str +@@ -884,7 +884,7 @@ static void qdisc_offload_graft_root(struct net_device *dev, static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid, u32 portid, u32 seq, u16 flags, int event) { @@ -707,6 +746,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct gnet_stats_queue __percpu *cpu_qstats = NULL; struct tcmsg *tcm; struct nlmsghdr *nlh; +diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c +index c8e1771383f9..fbfe4ce9497b 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c @@ -52,7 +52,7 @@ struct atm_flow_data { @@ -718,7 +759,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct gnet_stats_queue qstats; struct list_head list; struct atm_flow_data *excess; /* flow for excess traffic; -@@ -548,7 +548,7 @@ static int atm_tc_init(struct Qdisc *sch +@@ -548,7 +548,7 @@ static int atm_tc_init(struct Qdisc *sch, struct nlattr *opt, pr_debug("atm_tc_init(sch %p,[qdisc %p],opt %p)\n", sch, p, opt); INIT_LIST_HEAD(&p->flows); INIT_LIST_HEAD(&p->link.list); @@ -727,6 +768,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> list_add(&p->link.list, &p->flows); p->link.q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, sch->handle, extack); +diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c +index ef9e87175d35..f0b1282fae11 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c @@ -116,7 +116,7 @@ struct cbq_class { @@ -738,7 +781,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct gnet_stats_queue qstats; struct net_rate_estimator __rcu *rate_est; struct tc_cbq_xstats xstats; -@@ -1610,7 +1610,7 @@ cbq_change_class(struct Qdisc *sch, u32 +@@ -1610,7 +1610,7 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **t if (cl == NULL) goto failure; @@ -747,6 +790,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> err = tcf_block_get(&cl->block, &cl->filter_list, sch, extack); if (err) { kfree(cl); +diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c +index 319906e19a6b..7243617a3595 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c @@ -19,7 +19,7 @@ struct drr_class { @@ -758,7 +803,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct gnet_stats_queue qstats; struct net_rate_estimator __rcu *rate_est; struct list_head alist; -@@ -106,7 +106,7 @@ static int drr_change_class(struct Qdisc +@@ -106,7 +106,7 @@ static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid, if (cl == NULL) return -ENOBUFS; @@ -767,6 +812,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> cl->common.classid = classid; cl->quantum = quantum; cl->qdisc = qdisc_create_dflt(sch->dev_queue, +diff --git a/net/sched/sch_ets.c b/net/sched/sch_ets.c +index 12eb5a94df07..b9a5b052a801 100644 --- a/net/sched/sch_ets.c +++ b/net/sched/sch_ets.c @@ -41,7 +41,7 @@ struct ets_class { @@ -778,7 +825,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct gnet_stats_queue qstats; }; -@@ -689,7 +689,7 @@ static int ets_qdisc_change(struct Qdisc +@@ -691,7 +691,7 @@ static int ets_qdisc_change(struct Qdisc *sch, struct nlattr *opt, q->classes[i].qdisc = NULL; q->classes[i].quantum = 0; q->classes[i].deficit = 0; @@ -787,9 +834,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> memset(&q->classes[i].qstats, 0, sizeof(q->classes[i].qstats)); } return 0; +diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c +index 18c73ba1e6ff..57781af47f12 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -892,12 +892,12 @@ struct Qdisc *qdisc_alloc(struct netdev_ +@@ -892,12 +892,12 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue, __skb_queue_head_init(&sch->gso_skb); __skb_queue_head_init(&sch->skb_bad_txq); qdisc_skb_head_init(&sch->q); @@ -804,9 +853,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (!sch->cpu_bstats) goto errout1; +diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c +index 02b03d6d24ea..72de08ef8335 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c -@@ -366,7 +366,7 @@ static int gred_offload_dump_stats(struc +@@ -366,7 +366,7 @@ static int gred_offload_dump_stats(struct Qdisc *sch) hw_stats->parent = sch->parent; for (i = 0; i < MAX_DPs; i++) { @@ -815,7 +866,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (table->tab[i]) hw_stats->stats.xstats[i] = &table->tab[i]->stats; } -@@ -378,12 +378,12 @@ static int gred_offload_dump_stats(struc +@@ -378,12 +378,12 @@ static int gred_offload_dump_stats(struct Qdisc *sch) for (i = 0; i < MAX_DPs; i++) { if (!table->tab[i]) continue; @@ -832,6 +883,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> sch->qstats.qlen += hw_stats->stats.qstats[i].qlen; sch->qstats.backlog += hw_stats->stats.qstats[i].backlog; sch->qstats.drops += hw_stats->stats.qstats[i].drops; +diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c +index ff6ff54806fc..181c2905ff98 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c @@ -111,7 +111,7 @@ enum hfsc_class_flags { @@ -843,7 +896,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct gnet_stats_queue qstats; struct net_rate_estimator __rcu *rate_est; struct tcf_proto __rcu *filter_list; /* filter list */ -@@ -1406,7 +1406,7 @@ hfsc_init_qdisc(struct Qdisc *sch, struc +@@ -1406,7 +1406,7 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt, if (err) return err; @@ -852,6 +905,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> q->root.cl_common.classid = sch->handle; q->root.sched = q; q->root.qdisc = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, +diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c +index 324ecfdf842a..adceb9e210f6 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -113,8 +113,8 @@ struct htb_class { @@ -865,7 +920,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct tc_htb_xstats xstats; /* our special stats */ /* token bucket parameters */ -@@ -1312,7 +1312,7 @@ static void htb_offload_aggregate_stats( +@@ -1312,7 +1312,7 @@ static void htb_offload_aggregate_stats(struct htb_sched *q, struct htb_class *c; unsigned int i; @@ -874,7 +929,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> for (i = 0; i < q->clhash.hashsize; i++) { hlist_for_each_entry(c, &q->clhash.hash[i], common.hnode) { -@@ -1324,11 +1324,11 @@ static void htb_offload_aggregate_stats( +@@ -1324,11 +1324,11 @@ static void htb_offload_aggregate_stats(struct htb_sched *q, if (p != cl) continue; @@ -890,7 +945,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } } } -@@ -1359,10 +1359,10 @@ htb_dump_class_stats(struct Qdisc *sch, +@@ -1359,10 +1359,10 @@ htb_dump_class_stats(struct Qdisc *sch, unsigned long arg, struct gnet_dump *d) if (cl->leaf.q) cl->bstats = cl->leaf.q->bstats; else @@ -904,7 +959,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } else { htb_offload_aggregate_stats(q, cl); } -@@ -1582,8 +1582,8 @@ static int htb_destroy_class_offload(str +@@ -1582,8 +1582,8 @@ static int htb_destroy_class_offload(struct Qdisc *sch, struct htb_class *cl, if (cl->parent) { _bstats_update(&cl->parent->bstats_bias, @@ -915,7 +970,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } offload_opt = (struct tc_htb_qopt_offload) { -@@ -1853,8 +1853,8 @@ static int htb_change_class(struct Qdisc +@@ -1853,8 +1853,8 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, if (!cl) goto failure; @@ -926,7 +981,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> err = tcf_block_get(&cl->block, &cl->filter_list, sch, extack); if (err) { -@@ -1930,8 +1930,8 @@ static int htb_change_class(struct Qdisc +@@ -1930,8 +1930,8 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, goto err_kill_estimator; } _bstats_update(&parent->bstats_bias, @@ -937,9 +992,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> qdisc_put(old_q); } new_q = qdisc_create_dflt(dev_queue, &pfifo_qdisc_ops, +diff --git a/net/sched/sch_mq.c b/net/sched/sch_mq.c +index 12bb61540abd..f296a00ec1c6 100644 --- a/net/sched/sch_mq.c +++ b/net/sched/sch_mq.c -@@ -132,7 +132,7 @@ static int mq_dump(struct Qdisc *sch, st +@@ -155,7 +155,7 @@ static int mq_dump(struct Qdisc *sch, struct sk_buff *skb) unsigned int ntx; sch->q.qlen = 0; @@ -948,9 +1005,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> memset(&sch->qstats, 0, sizeof(sch->qstats)); /* MQ supports lockless qdiscs. However, statistics accounting needs +diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c +index 11d713d8f8b1..fe4d7f8ea2e7 100644 --- a/net/sched/sch_mqprio.c +++ b/net/sched/sch_mqprio.c -@@ -390,7 +390,7 @@ static int mqprio_dump(struct Qdisc *sch +@@ -412,7 +412,7 @@ static int mqprio_dump(struct Qdisc *sch, struct sk_buff *skb) unsigned int ntx, tc; sch->q.qlen = 0; @@ -959,7 +1018,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> memset(&sch->qstats, 0, sizeof(sch->qstats)); /* MQ supports lockless qdiscs. However, statistics accounting needs -@@ -500,11 +500,11 @@ static int mqprio_dump_class_stats(struc +@@ -522,11 +522,11 @@ static int mqprio_dump_class_stats(struct Qdisc *sch, unsigned long cl, int i; __u32 qlen; struct gnet_stats_queue qstats = {0}; @@ -973,6 +1032,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> /* Drop lock here it will be reclaimed before touching * statistics this is required because the d->lock we * hold here is the look on dev_queue->qdisc_sleeping +diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c +index bea68c91027a..a35200f591a2 100644 --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c @@ -131,7 +131,7 @@ struct qfq_class { @@ -984,7 +1045,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct gnet_stats_queue qstats; struct net_rate_estimator __rcu *rate_est; struct Qdisc *qdisc; -@@ -465,7 +465,7 @@ static int qfq_change_class(struct Qdisc +@@ -465,7 +465,7 @@ static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, if (cl == NULL) return -ENOBUFS; @@ -993,3 +1054,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net> cl->common.classid = classid; cl->deficit = lmax; +-- +2.33.1 + diff --git a/debian/patches-rt/0009-net-sched-Remove-Qdisc-running-sequence-counter.patch b/debian/patches-rt/0046-net-sched-Remove-Qdisc-running-sequence-counter.patch index 89be30417..e3b5fa211 100644 --- a/debian/patches-rt/0009-net-sched-Remove-Qdisc-running-sequence-counter.patch +++ b/debian/patches-rt/0046-net-sched-Remove-Qdisc-running-sequence-counter.patch @@ -1,7 +1,8 @@ +From a9d76266eb6c938c6e715995b101e2029a76c3e1 Mon Sep 17 00:00:00 2001 From: "Ahmed S. Darwish" <a.darwish@linutronix.de> Date: Sat, 16 Oct 2021 10:49:10 +0200 -Subject: [PATCH 9/9] net: sched: Remove Qdisc::running sequence counter -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 046/158] net: sched: Remove Qdisc::running sequence counter +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The Qdisc::running sequence counter has two uses: @@ -40,29 +41,31 @@ Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net> --- - include/linux/netdevice.h | 4 --- - include/net/gen_stats.h | 19 +++++++---------- - include/net/sch_generic.h | 33 ++++++++++++------------------ - net/core/gen_estimator.c | 16 +++++++++----- - net/core/gen_stats.c | 50 +++++++++++++++++++++++++--------------------- - net/sched/act_api.c | 9 ++++---- - net/sched/act_police.c | 2 - - net/sched/sch_api.c | 16 ++------------ - net/sched/sch_atm.c | 3 -- - net/sched/sch_cbq.c | 9 ++------ - net/sched/sch_drr.c | 10 ++------- - net/sched/sch_ets.c | 3 -- - net/sched/sch_generic.c | 10 +-------- - net/sched/sch_hfsc.c | 8 ++----- - net/sched/sch_htb.c | 7 ++---- - net/sched/sch_mq.c | 7 ++---- - net/sched/sch_mqprio.c | 14 ++++++------ - net/sched/sch_multiq.c | 3 -- - net/sched/sch_prio.c | 4 +-- - net/sched/sch_qfq.c | 7 ++---- - net/sched/sch_taprio.c | 2 - + include/linux/netdevice.h | 4 ---- + include/net/gen_stats.h | 19 +++++++-------- + include/net/sch_generic.h | 33 +++++++++++--------------- + net/core/gen_estimator.c | 16 ++++++++----- + net/core/gen_stats.c | 50 ++++++++++++++++++++++----------------- + net/sched/act_api.c | 9 +++---- + net/sched/act_police.c | 2 +- + net/sched/sch_api.c | 16 +++---------- + net/sched/sch_atm.c | 3 +-- + net/sched/sch_cbq.c | 9 +++---- + net/sched/sch_drr.c | 10 +++----- + net/sched/sch_ets.c | 3 +-- + net/sched/sch_generic.c | 10 ++------ + net/sched/sch_hfsc.c | 8 +++---- + net/sched/sch_htb.c | 7 +++--- + net/sched/sch_mq.c | 7 +++--- + net/sched/sch_mqprio.c | 14 +++++------ + net/sched/sch_multiq.c | 3 +-- + net/sched/sch_prio.c | 4 ++-- + net/sched/sch_qfq.c | 7 +++--- + net/sched/sch_taprio.c | 2 +- 21 files changed, 102 insertions(+), 134 deletions(-) +diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h +index ce81cc96a98d..4230c0fe2dcb 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1916,7 +1916,6 @@ enum netdev_ml_priv_type { @@ -81,7 +84,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> bool proto_down; unsigned wol_enabled:1; unsigned threaded:1; -@@ -2360,13 +2358,11 @@ static inline void netdev_for_each_tx_qu +@@ -2360,13 +2358,11 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev, #define netdev_lockdep_set_classes(dev) \ { \ static struct lock_class_key qdisc_tx_busylock_key; \ @@ -95,9 +98,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> lockdep_set_class(&(dev)->addr_list_lock, \ &dev_addr_list_lock_key); \ for (i = 0; i < (dev)->num_tx_queues; i++) \ +diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h +index 52b87588f467..7aa2b8e1fb29 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h -@@ -46,18 +46,15 @@ int gnet_stats_start_copy_compat(struct +@@ -46,18 +46,15 @@ int gnet_stats_start_copy_compat(struct sk_buff *skb, int type, spinlock_t *lock, struct gnet_dump *d, int padattr); @@ -122,7 +127,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> int gnet_stats_copy_rate_est(struct gnet_dump *d, struct net_rate_estimator __rcu **ptr); int gnet_stats_copy_queue(struct gnet_dump *d, -@@ -74,13 +71,13 @@ int gen_new_estimator(struct gnet_stats_ +@@ -74,13 +71,13 @@ int gen_new_estimator(struct gnet_stats_basic_sync *bstats, struct gnet_stats_basic_sync __percpu *cpu_bstats, struct net_rate_estimator __rcu **rate_est, spinlock_t *lock, @@ -138,6 +143,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> bool gen_estimator_active(struct net_rate_estimator __rcu **ptr); bool gen_estimator_read(struct net_rate_estimator __rcu **ptr, struct gnet_stats_rate_est64 *sample); +diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h +index 79499a48030b..be267792408b 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -38,6 +38,10 @@ enum qdisc_state_t { @@ -159,7 +166,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct gnet_stats_queue qstats; unsigned long state; struct Qdisc *next_sched; -@@ -143,11 +146,15 @@ static inline struct Qdisc *qdisc_refcou +@@ -143,11 +146,15 @@ static inline struct Qdisc *qdisc_refcount_inc_nz(struct Qdisc *qdisc) return NULL; } @@ -176,7 +183,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } static inline bool nolock_qdisc_is_empty(const struct Qdisc *qdisc) -@@ -167,6 +174,9 @@ static inline bool qdisc_is_empty(const +@@ -167,6 +174,9 @@ static inline bool qdisc_is_empty(const struct Qdisc *qdisc) return !READ_ONCE(qdisc->q.qlen); } @@ -186,7 +193,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static inline bool qdisc_run_begin(struct Qdisc *qdisc) { if (qdisc->flags & TCQ_F_NOLOCK) { -@@ -206,15 +216,8 @@ static inline bool qdisc_run_begin(struc +@@ -206,15 +216,8 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc) * after it releases the lock at the end of qdisc_run_end(). */ return spin_trylock(&qdisc->seqlock); @@ -203,7 +210,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } static inline void qdisc_run_end(struct Qdisc *qdisc) -@@ -226,7 +229,7 @@ static inline void qdisc_run_end(struct +@@ -226,7 +229,7 @@ static inline void qdisc_run_end(struct Qdisc *qdisc) &qdisc->state))) __netif_schedule(qdisc); } else { @@ -212,7 +219,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } } -@@ -590,14 +593,6 @@ static inline spinlock_t *qdisc_root_sle +@@ -592,14 +595,6 @@ static inline spinlock_t *qdisc_root_sleeping_lock(const struct Qdisc *qdisc) return qdisc_lock(root); } @@ -227,6 +234,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static inline struct net_device *qdisc_dev(const struct Qdisc *qdisc) { return qdisc->dev_queue->dev; +diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c +index a73ad0bf324c..4fcbdd71c59f 100644 --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c @@ -42,7 +42,7 @@ @@ -238,7 +247,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct gnet_stats_basic_sync __percpu *cpu_bstats; u8 ewma_log; u8 intvl_log; /* period : (250ms << intvl_log) */ -@@ -66,7 +66,7 @@ static void est_fetch_counters(struct ne +@@ -66,7 +66,7 @@ static void est_fetch_counters(struct net_rate_estimator *e, if (e->stats_lock) spin_lock(e->stats_lock); @@ -247,7 +256,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (e->stats_lock) spin_unlock(e->stats_lock); -@@ -113,7 +113,9 @@ static void est_timer(struct timer_list +@@ -113,7 +113,9 @@ static void est_timer(struct timer_list *t) * @cpu_bstats: bstats per cpu * @rate_est: rate estimator statistics * @lock: lock for statistics and control path @@ -258,7 +267,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> * @opt: rate estimator configuration TLV * * Creates a new rate estimator with &bstats as source and &rate_est -@@ -129,7 +131,7 @@ int gen_new_estimator(struct gnet_stats_ +@@ -129,7 +131,7 @@ int gen_new_estimator(struct gnet_stats_basic_sync *bstats, struct gnet_stats_basic_sync __percpu *cpu_bstats, struct net_rate_estimator __rcu **rate_est, spinlock_t *lock, @@ -278,7 +287,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> * @opt: rate estimator configuration TLV * * Replaces the configuration of a rate estimator by calling -@@ -230,7 +234,7 @@ int gen_replace_estimator(struct gnet_st +@@ -230,7 +234,7 @@ int gen_replace_estimator(struct gnet_stats_basic_sync *bstats, struct gnet_stats_basic_sync __percpu *cpu_bstats, struct net_rate_estimator __rcu **rate_est, spinlock_t *lock, @@ -287,9 +296,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> { return gen_new_estimator(bstats, cpu_bstats, rate_est, lock, running, opt); +diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c +index 5f57f761def6..5516ea0d5da0 100644 --- a/net/core/gen_stats.c +++ b/net/core/gen_stats.c -@@ -146,42 +146,42 @@ static void gnet_stats_add_basic_cpu(str +@@ -146,42 +146,42 @@ static void gnet_stats_add_basic_cpu(struct gnet_stats_basic_sync *bstats, _bstats_update(bstats, t_bytes, t_packets); } @@ -342,7 +353,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> bstats_bytes = u64_stats_read(&bstats.bytes); bstats_packets = u64_stats_read(&bstats.packets); -@@ -210,10 +210,14 @@ static int +@@ -210,10 +210,14 @@ ___gnet_stats_copy_basic(const seqcount_t *running, /** * gnet_stats_copy_basic - copy basic statistics into statistic TLV @@ -358,7 +369,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> * * Appends the basic statistics to the top level TLV created by * gnet_stats_start_copy(). -@@ -222,22 +226,25 @@ static int +@@ -222,22 +226,25 @@ ___gnet_stats_copy_basic(const seqcount_t *running, * if the room in the socket buffer was not sufficient. */ int @@ -408,9 +419,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } EXPORT_SYMBOL(gnet_stats_copy_basic_hw); +diff --git a/net/sched/act_api.c b/net/sched/act_api.c +index 585829ffa0c4..3258da3d5bed 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c -@@ -501,7 +501,7 @@ int tcf_idr_create(struct tc_action_net +@@ -501,7 +501,7 @@ int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est, if (est) { err = gen_new_estimator(&p->tcfa_bstats, p->cpu_bstats, &p->tcfa_rate_est, @@ -419,7 +432,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (err) goto err4; } -@@ -1173,9 +1173,10 @@ int tcf_action_copy_stats(struct sk_buff +@@ -1173,9 +1173,10 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *p, if (err < 0) goto errout; @@ -433,9 +446,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> gnet_stats_copy_rate_est(&d, &p->tcfa_rate_est) < 0 || gnet_stats_copy_queue(&d, p->cpu_qstats, &p->tcfa_qstats, +diff --git a/net/sched/act_police.c b/net/sched/act_police.c +index c9383805222d..9e77ba8401e5 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c -@@ -125,7 +125,7 @@ static int tcf_police_init(struct net *n +@@ -125,7 +125,7 @@ static int tcf_police_init(struct net *net, struct nlattr *nla, police->common.cpu_bstats, &police->tcf_rate_est, &police->tcf_lock, @@ -444,9 +459,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (err) goto failure; } else if (tb[TCA_POLICE_AVRATE] && +diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c +index 2ba8b824224a..ad0bdefb3205 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c -@@ -942,8 +942,7 @@ static int tc_fill_qdisc(struct sk_buff +@@ -942,8 +942,7 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid, cpu_qstats = q->cpu_qstats; } @@ -456,7 +473,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> gnet_stats_copy_rate_est(&d, &q->rate_est) < 0 || gnet_stats_copy_queue(&d, cpu_qstats, &q->qstats, qlen) < 0) goto nla_put_failure; -@@ -1264,26 +1263,17 @@ static struct Qdisc *qdisc_create(struct +@@ -1264,26 +1263,17 @@ static struct Qdisc *qdisc_create(struct net_device *dev, rcu_assign_pointer(sch->stab, stab); } if (tca[TCA_RATE]) { @@ -484,7 +501,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> tca[TCA_RATE]); if (err) { NL_SET_ERR_MSG(extack, "Failed to generate new estimator"); -@@ -1359,7 +1349,7 @@ static int qdisc_change(struct Qdisc *sc +@@ -1359,7 +1349,7 @@ static int qdisc_change(struct Qdisc *sch, struct nlattr **tca, sch->cpu_bstats, &sch->rate_est, NULL, @@ -493,9 +510,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> tca[TCA_RATE]); } out: +diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c +index fbfe4ce9497b..4c8e994cf0a5 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c -@@ -653,8 +653,7 @@ atm_tc_dump_class_stats(struct Qdisc *sc +@@ -653,8 +653,7 @@ atm_tc_dump_class_stats(struct Qdisc *sch, unsigned long arg, { struct atm_flow_data *flow = (struct atm_flow_data *)arg; @@ -505,9 +524,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> gnet_stats_copy_queue(d, NULL, &flow->qstats, flow->q->q.qlen) < 0) return -1; +diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c +index f0b1282fae11..02d9f0dfe356 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c -@@ -1383,8 +1383,7 @@ cbq_dump_class_stats(struct Qdisc *sch, +@@ -1383,8 +1383,7 @@ cbq_dump_class_stats(struct Qdisc *sch, unsigned long arg, if (cl->undertime != PSCHED_PASTPERFECT) cl->xstats.undertime = cl->undertime - q->now; @@ -517,7 +538,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 || gnet_stats_copy_queue(d, NULL, &cl->qstats, qlen) < 0) return -1; -@@ -1518,7 +1517,7 @@ cbq_change_class(struct Qdisc *sch, u32 +@@ -1518,7 +1517,7 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **t err = gen_replace_estimator(&cl->bstats, NULL, &cl->rate_est, NULL, @@ -526,7 +547,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> tca[TCA_RATE]); if (err) { NL_SET_ERR_MSG(extack, "Failed to replace specified rate estimator"); -@@ -1619,9 +1618,7 @@ cbq_change_class(struct Qdisc *sch, u32 +@@ -1619,9 +1618,7 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **t if (tca[TCA_RATE]) { err = gen_new_estimator(&cl->bstats, NULL, &cl->rate_est, @@ -537,9 +558,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (err) { NL_SET_ERR_MSG(extack, "Couldn't create new estimator"); tcf_block_put(cl->block); +diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c +index 7243617a3595..18e4f7a0b291 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c -@@ -85,8 +85,7 @@ static int drr_change_class(struct Qdisc +@@ -85,8 +85,7 @@ static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid, if (tca[TCA_RATE]) { err = gen_replace_estimator(&cl->bstats, NULL, &cl->rate_est, @@ -549,7 +572,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> tca[TCA_RATE]); if (err) { NL_SET_ERR_MSG(extack, "Failed to replace estimator"); -@@ -119,9 +118,7 @@ static int drr_change_class(struct Qdisc +@@ -119,9 +118,7 @@ static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid, if (tca[TCA_RATE]) { err = gen_replace_estimator(&cl->bstats, NULL, &cl->rate_est, @@ -560,7 +583,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (err) { NL_SET_ERR_MSG(extack, "Failed to replace estimator"); qdisc_put(cl->qdisc); -@@ -268,8 +265,7 @@ static int drr_dump_class_stats(struct Q +@@ -268,8 +265,7 @@ static int drr_dump_class_stats(struct Qdisc *sch, unsigned long arg, if (qlen) xstats.deficit = cl->deficit; @@ -570,9 +593,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 || gnet_stats_copy_queue(d, cl_q->cpu_qstats, &cl_q->qstats, qlen) < 0) return -1; +diff --git a/net/sched/sch_ets.c b/net/sched/sch_ets.c +index b9a5b052a801..e007fc75ef2f 100644 --- a/net/sched/sch_ets.c +++ b/net/sched/sch_ets.c -@@ -325,8 +325,7 @@ static int ets_class_dump_stats(struct Q +@@ -325,8 +325,7 @@ static int ets_class_dump_stats(struct Qdisc *sch, unsigned long arg, struct ets_class *cl = ets_class_from_arg(sch, arg); struct Qdisc *cl_q = cl->qdisc; @@ -582,9 +607,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> qdisc_qstats_copy(d, cl_q) < 0) return -1; +diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c +index 57781af47f12..2b9c1a42dca8 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -304,8 +304,8 @@ static struct sk_buff *dequeue_skb(struc +@@ -304,8 +304,8 @@ static struct sk_buff *dequeue_skb(struct Qdisc *q, bool *validate, /* * Transmit possibly several skbs, and handle the return status as @@ -603,7 +630,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> .busylock = __SPIN_LOCK_UNLOCKED(noop_qdisc.busylock), .gso_skb = { .next = (struct sk_buff *)&noop_qdisc.gso_skb, -@@ -867,7 +866,6 @@ struct Qdisc_ops pfifo_fast_ops __read_m +@@ -867,7 +866,6 @@ struct Qdisc_ops pfifo_fast_ops __read_mostly = { EXPORT_SYMBOL(pfifo_fast_ops); static struct lock_class_key qdisc_tx_busylock; @@ -611,7 +638,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue, const struct Qdisc_ops *ops, -@@ -917,10 +915,6 @@ struct Qdisc *qdisc_alloc(struct netdev_ +@@ -917,10 +915,6 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue, lockdep_set_class(&sch->seqlock, dev->qdisc_tx_busylock ?: &qdisc_tx_busylock); @@ -622,9 +649,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> sch->ops = ops; sch->flags = ops->static_flags; sch->enqueue = ops->enqueue; +diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c +index 181c2905ff98..d3979a6000e7 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c -@@ -965,7 +965,7 @@ hfsc_change_class(struct Qdisc *sch, u32 +@@ -965,7 +965,7 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, err = gen_replace_estimator(&cl->bstats, NULL, &cl->rate_est, NULL, @@ -633,7 +662,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> tca[TCA_RATE]); if (err) return err; -@@ -1033,9 +1033,7 @@ hfsc_change_class(struct Qdisc *sch, u32 +@@ -1033,9 +1033,7 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, if (tca[TCA_RATE]) { err = gen_new_estimator(&cl->bstats, NULL, &cl->rate_est, @@ -644,7 +673,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (err) { tcf_block_put(cl->block); kfree(cl); -@@ -1328,7 +1326,7 @@ hfsc_dump_class_stats(struct Qdisc *sch, +@@ -1328,7 +1326,7 @@ hfsc_dump_class_stats(struct Qdisc *sch, unsigned long arg, xstats.work = cl->cl_total; xstats.rtwork = cl->cl_cumul; @@ -653,9 +682,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 || gnet_stats_copy_queue(d, NULL, &cl->qstats, qlen) < 0) return -1; +diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c +index adceb9e210f6..cf1d45db4e84 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c -@@ -1368,8 +1368,7 @@ htb_dump_class_stats(struct Qdisc *sch, +@@ -1368,8 +1368,7 @@ htb_dump_class_stats(struct Qdisc *sch, unsigned long arg, struct gnet_dump *d) } } @@ -665,7 +696,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 || gnet_stats_copy_queue(d, NULL, &qs, qlen) < 0) return -1; -@@ -1865,7 +1864,7 @@ static int htb_change_class(struct Qdisc +@@ -1865,7 +1864,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, err = gen_new_estimator(&cl->bstats, NULL, &cl->rate_est, NULL, @@ -674,7 +705,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> tca[TCA_RATE] ? : &est.nla); if (err) goto err_block_put; -@@ -1991,7 +1990,7 @@ static int htb_change_class(struct Qdisc +@@ -1991,7 +1990,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, err = gen_replace_estimator(&cl->bstats, NULL, &cl->rate_est, NULL, @@ -683,9 +714,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> tca[TCA_RATE]); if (err) return err; +diff --git a/net/sched/sch_mq.c b/net/sched/sch_mq.c +index f296a00ec1c6..24c5d97d88dd 100644 --- a/net/sched/sch_mq.c +++ b/net/sched/sch_mq.c -@@ -144,8 +144,8 @@ static int mq_dump(struct Qdisc *sch, st +@@ -167,8 +167,8 @@ static int mq_dump(struct Qdisc *sch, struct sk_buff *skb) qdisc = netdev_get_tx_queue(dev, ntx)->qdisc_sleeping; spin_lock_bh(qdisc_lock(qdisc)); @@ -696,7 +729,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> gnet_stats_add_queue(&sch->qstats, qdisc->cpu_qstats, &qdisc->qstats); sch->q.qlen += qdisc_qlen(qdisc); -@@ -231,8 +231,7 @@ static int mq_dump_class_stats(struct Qd +@@ -254,8 +254,7 @@ static int mq_dump_class_stats(struct Qdisc *sch, unsigned long cl, struct netdev_queue *dev_queue = mq_queue_get(sch, cl); sch = dev_queue->qdisc_sleeping; @@ -706,9 +739,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> qdisc_qstats_copy(d, sch) < 0) return -1; return 0; +diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c +index fe4d7f8ea2e7..42d4101e4f3d 100644 --- a/net/sched/sch_mqprio.c +++ b/net/sched/sch_mqprio.c -@@ -402,8 +402,8 @@ static int mqprio_dump(struct Qdisc *sch +@@ -424,8 +424,8 @@ static int mqprio_dump(struct Qdisc *sch, struct sk_buff *skb) qdisc = netdev_get_tx_queue(dev, ntx)->qdisc_sleeping; spin_lock_bh(qdisc_lock(qdisc)); @@ -719,7 +754,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> gnet_stats_add_queue(&sch->qstats, qdisc->cpu_qstats, &qdisc->qstats); sch->q.qlen += qdisc_qlen(qdisc); -@@ -519,8 +519,8 @@ static int mqprio_dump_class_stats(struc +@@ -541,8 +541,8 @@ static int mqprio_dump_class_stats(struct Qdisc *sch, unsigned long cl, spin_lock_bh(qdisc_lock(qdisc)); @@ -730,7 +765,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> gnet_stats_add_queue(&qstats, qdisc->cpu_qstats, &qdisc->qstats); sch->q.qlen += qdisc_qlen(qdisc); -@@ -532,15 +532,15 @@ static int mqprio_dump_class_stats(struc +@@ -554,15 +554,15 @@ static int mqprio_dump_class_stats(struct Qdisc *sch, unsigned long cl, /* Reclaim root sleeping lock before completing stats */ if (d->lock) spin_lock_bh(d->lock); @@ -749,9 +784,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> qdisc_qstats_copy(d, sch) < 0) return -1; } +diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c +index e282e7382117..cd8ab90c4765 100644 --- a/net/sched/sch_multiq.c +++ b/net/sched/sch_multiq.c -@@ -338,8 +338,7 @@ static int multiq_dump_class_stats(struc +@@ -338,8 +338,7 @@ static int multiq_dump_class_stats(struct Qdisc *sch, unsigned long cl, struct Qdisc *cl_q; cl_q = q->queues[cl - 1]; @@ -761,9 +798,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> qdisc_qstats_copy(d, cl_q) < 0) return -1; +diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c +index 03fdf31ccb6a..3b8d7197c06b 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c -@@ -361,8 +361,8 @@ static int prio_dump_class_stats(struct +@@ -361,8 +361,8 @@ static int prio_dump_class_stats(struct Qdisc *sch, unsigned long cl, struct Qdisc *cl_q; cl_q = q->queues[cl - 1]; @@ -774,9 +813,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> qdisc_qstats_copy(d, cl_q) < 0) return -1; +diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c +index a35200f591a2..0b7f9ba28deb 100644 --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c -@@ -451,7 +451,7 @@ static int qfq_change_class(struct Qdisc +@@ -451,7 +451,7 @@ static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, err = gen_replace_estimator(&cl->bstats, NULL, &cl->rate_est, NULL, @@ -785,7 +826,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> tca[TCA_RATE]); if (err) return err; -@@ -478,7 +478,7 @@ static int qfq_change_class(struct Qdisc +@@ -478,7 +478,7 @@ static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, err = gen_new_estimator(&cl->bstats, NULL, &cl->rate_est, NULL, @@ -794,7 +835,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> tca[TCA_RATE]); if (err) goto destroy_class; -@@ -640,8 +640,7 @@ static int qfq_dump_class_stats(struct Q +@@ -640,8 +640,7 @@ static int qfq_dump_class_stats(struct Qdisc *sch, unsigned long arg, xstats.weight = cl->agg->class_weight; xstats.lmax = cl->agg->lmax; @@ -804,9 +845,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net> gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 || qdisc_qstats_copy(d, cl->qdisc) < 0) return -1; +diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c +index a66398fb2d6d..377f896bdedc 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c -@@ -1977,7 +1977,7 @@ static int taprio_dump_class_stats(struc +@@ -1984,7 +1984,7 @@ static int taprio_dump_class_stats(struct Qdisc *sch, unsigned long cl, struct netdev_queue *dev_queue = taprio_queue_get(sch, cl); sch = dev_queue->qdisc_sleeping; @@ -815,3 +858,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net> qdisc_qstats_copy(d, sch) < 0) return -1; return 0; +-- +2.33.1 + diff --git a/debian/patches-rt/net-sched-Allow-statistics-reads-from-softirq.patch b/debian/patches-rt/0047-net-sched-Allow-statistics-reads-from-softirq.patch index 7a5666932..8452b5b02 100644 --- a/debian/patches-rt/net-sched-Allow-statistics-reads-from-softirq.patch +++ b/debian/patches-rt/0047-net-sched-Allow-statistics-reads-from-softirq.patch @@ -1,7 +1,8 @@ +From 26bc885822cc675f196bccc69af9eae793cbc677 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 19 Oct 2021 12:12:04 +0200 -Subject: [PATCH] net: sched: Allow statistics reads from softirq. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 047/158] net: sched: Allow statistics reads from softirq. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Eric reported that the rate estimator reads statics from the softirq which in turn triggers a warning introduced in the statistics rework. @@ -18,12 +19,14 @@ Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net> --- - net/core/gen_stats.c | 2 +- + net/core/gen_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c +index 5516ea0d5da0..15c270e22c5e 100644 --- a/net/core/gen_stats.c +++ b/net/core/gen_stats.c -@@ -154,7 +154,7 @@ void gnet_stats_add_basic(struct gnet_st +@@ -154,7 +154,7 @@ void gnet_stats_add_basic(struct gnet_stats_basic_sync *bstats, u64 bytes = 0; u64 packets = 0; @@ -32,3 +35,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (cpu) { gnet_stats_add_basic_cpu(bstats, cpu); +-- +2.33.1 + diff --git a/debian/patches-rt/net-sched-fix-logic-error-in-qdisc_run_begin.patch b/debian/patches-rt/0048-net-sched-fix-logic-error-in-qdisc_run_begin.patch index 55c4b09d6..6c9ddba9d 100644 --- a/debian/patches-rt/net-sched-fix-logic-error-in-qdisc_run_begin.patch +++ b/debian/patches-rt/0048-net-sched-fix-logic-error-in-qdisc_run_begin.patch @@ -1,10 +1,11 @@ +From e767e52281f3fb4e29839d503de2a102afb3a3e1 Mon Sep 17 00:00:00 2001 From: Eric Dumazet <edumazet@google.com> Date: Mon, 18 Oct 2021 17:34:01 -0700 -Subject: [PATCH] net: sched: fix logic error in qdisc_run_begin() +Subject: [PATCH 048/158] net: sched: fix logic error in qdisc_run_begin() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz For non TCQ_F_NOLOCK qdisc, qdisc_run_begin() tries to set __QDISC_STATE_RUNNING and should return true if the bit was not set. @@ -20,12 +21,14 @@ Tested-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - include/net/sch_generic.h | 2 +- + include/net/sch_generic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h +index be267792408b..7ffefd71ca57 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h -@@ -217,7 +217,7 @@ static inline bool qdisc_run_begin(struc +@@ -217,7 +217,7 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc) */ return spin_trylock(&qdisc->seqlock); } @@ -34,3 +37,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } static inline void qdisc_run_end(struct Qdisc *qdisc) +-- +2.33.1 + diff --git a/debian/patches-rt/net-sched-remove-one-pair-of-atomic-operations.patch b/debian/patches-rt/0049-net-sched-remove-one-pair-of-atomic-operations.patch index d249376e8..0c5135de1 100644 --- a/debian/patches-rt/net-sched-remove-one-pair-of-atomic-operations.patch +++ b/debian/patches-rt/0049-net-sched-remove-one-pair-of-atomic-operations.patch @@ -1,10 +1,11 @@ +From 42f05b60e7c9a67ffc13d4e6bed50dee9626b3ed Mon Sep 17 00:00:00 2001 From: Eric Dumazet <edumazet@google.com> Date: Mon, 18 Oct 2021 17:34:02 -0700 -Subject: [PATCH] net: sched: remove one pair of atomic operations +Subject: [PATCH 049/158] net: sched: remove one pair of atomic operations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz __QDISC_STATE_RUNNING is only set/cleared from contexts owning qdisc lock. @@ -19,9 +20,11 @@ Tested-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - include/net/sch_generic.h | 12 ++++++++---- + include/net/sch_generic.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) +diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h +index 7ffefd71ca57..73c76ffdf803 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -38,10 +38,13 @@ enum qdisc_state_t { @@ -47,7 +50,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct Qdisc *next_sched; struct sk_buff_head skb_bad_txq; -@@ -154,7 +158,7 @@ static inline bool qdisc_is_running(stru +@@ -154,7 +158,7 @@ static inline bool qdisc_is_running(struct Qdisc *qdisc) { if (qdisc->flags & TCQ_F_NOLOCK) return spin_is_locked(&qdisc->seqlock); @@ -56,7 +59,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } static inline bool nolock_qdisc_is_empty(const struct Qdisc *qdisc) -@@ -217,7 +221,7 @@ static inline bool qdisc_run_begin(struc +@@ -217,7 +221,7 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc) */ return spin_trylock(&qdisc->seqlock); } @@ -65,7 +68,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } static inline void qdisc_run_end(struct Qdisc *qdisc) -@@ -229,7 +233,7 @@ static inline void qdisc_run_end(struct +@@ -229,7 +233,7 @@ static inline void qdisc_run_end(struct Qdisc *qdisc) &qdisc->state))) __netif_schedule(qdisc); } else { @@ -74,3 +77,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } } +-- +2.33.1 + diff --git a/debian/patches-rt/net-stats-Read-the-statistics-in-___gnet_stats_copy_.patch b/debian/patches-rt/0050-net-stats-Read-the-statistics-in-___gnet_stats_copy_.patch index b43ea9f32..daa6d587c 100644 --- a/debian/patches-rt/net-stats-Read-the-statistics-in-___gnet_stats_copy_.patch +++ b/debian/patches-rt/0050-net-stats-Read-the-statistics-in-___gnet_stats_copy_.patch @@ -1,8 +1,9 @@ +From c80e6c0d44f4f6757782946d3c940916efccc128 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 21 Oct 2021 11:59:19 +0200 -Subject: [PATCH] net: stats: Read the statistics in ___gnet_stats_copy_basic() - instead of adding. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 050/158] net: stats: Read the statistics in + ___gnet_stats_copy_basic() instead of adding. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Since the rework, the statistics code always adds up the byte and packet value(s). On 32bit architectures a seqcount_t is used in @@ -25,12 +26,14 @@ Fixes: 67c9e6270f301 ("net: sched: Protect Qdisc::bstats with u64_stats") Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20211021095919.bi3szpt3c2kcoiso@linutronix.de --- - net/core/gen_stats.c | 43 +++++++++++++++++++++++++++++++++++++------ + net/core/gen_stats.c | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) +diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c +index 15c270e22c5e..a10335b4ba2d 100644 --- a/net/core/gen_stats.c +++ b/net/core/gen_stats.c -@@ -171,20 +171,51 @@ void gnet_stats_add_basic(struct gnet_st +@@ -171,20 +171,51 @@ void gnet_stats_add_basic(struct gnet_stats_basic_sync *bstats, } EXPORT_SYMBOL(gnet_stats_add_basic); @@ -88,3 +91,6 @@ Link: https://lore.kernel.org/r/20211021095919.bi3szpt3c2kcoiso@linutronix.de if (d->compat_tc_stats && type == TCA_STATS_BASIC) { d->tc_stats.bytes = bstats_bytes; +-- +2.33.1 + diff --git a/debian/patches-rt/net-sched-gred-dynamically-allocate-tc_gred_qopt_off.patch b/debian/patches-rt/0051-net-sched-gred-dynamically-allocate-tc_gred_qopt_off.patch index 195400b9a..2734749a8 100644 --- a/debian/patches-rt/net-sched-gred-dynamically-allocate-tc_gred_qopt_off.patch +++ b/debian/patches-rt/0051-net-sched-gred-dynamically-allocate-tc_gred_qopt_off.patch @@ -1,7 +1,9 @@ +From 4d09db332bec01fa03a5fda13c8e91707b26cbc9 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann <arnd@arndb.de> Date: Tue, 26 Oct 2021 12:07:11 +0200 -Subject: [PATCH] net: sched: gred: dynamically allocate tc_gred_qopt_offload -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 051/158] net: sched: gred: dynamically allocate + tc_gred_qopt_offload +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The tc_gred_qopt_offload structure has grown too big to be on the stack for 32-bit architectures after recent changes. @@ -19,9 +21,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20211026100711.nalhttf6mbe6sudx@linutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- - net/sched/sch_gred.c | 50 ++++++++++++++++++++++++++++++-------------------- + net/sched/sch_gred.c | 50 ++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 20 deletions(-) +diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c +index 72de08ef8335..1073c76d05c4 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c @@ -56,6 +56,7 @@ struct gred_sched { @@ -32,7 +36,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> }; static inline int gred_wred_mode(struct gred_sched *table) -@@ -311,42 +312,43 @@ static void gred_offload(struct Qdisc *s +@@ -311,42 +312,43 @@ static void gred_offload(struct Qdisc *sch, enum tc_gred_command command) { struct gred_sched *table = qdisc_priv(sch); struct net_device *dev = qdisc_dev(sch); @@ -96,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> } static int gred_offload_dump_stats(struct Qdisc *sch) -@@ -731,6 +733,7 @@ static int gred_change(struct Qdisc *sch +@@ -731,6 +733,7 @@ static int gred_change(struct Qdisc *sch, struct nlattr *opt, static int gred_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) { @@ -104,7 +108,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> struct nlattr *tb[TCA_GRED_MAX + 1]; int err; -@@ -754,6 +757,12 @@ static int gred_init(struct Qdisc *sch, +@@ -754,6 +757,12 @@ static int gred_init(struct Qdisc *sch, struct nlattr *opt, sch->limit = qdisc_dev(sch)->tx_queue_len * psched_mtu(qdisc_dev(sch)); @@ -117,7 +121,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> return gred_change_table_def(sch, tb[TCA_GRED_DPS], extack); } -@@ -910,6 +919,7 @@ static void gred_destroy(struct Qdisc *s +@@ -910,6 +919,7 @@ static void gred_destroy(struct Qdisc *sch) gred_destroy_vq(table->tab[i]); } gred_offload(sch, TC_GRED_DESTROY); @@ -125,3 +129,6 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> } static struct Qdisc_ops gred_qdisc_ops __read_mostly = { +-- +2.33.1 + diff --git a/debian/patches-rt/0001_sched_rt_annotate_the_rt_balancing_logic_irqwork_as_irq_work_hard_irq.patch b/debian/patches-rt/0052-sched-rt-Annotate-the-RT-balancing-logic-irqwork-as-.patch index 9c318e14b..87f331dc8 100644 --- a/debian/patches-rt/0001_sched_rt_annotate_the_rt_balancing_logic_irqwork_as_irq_work_hard_irq.patch +++ b/debian/patches-rt/0052-sched-rt-Annotate-the-RT-balancing-logic-irqwork-as-.patch @@ -1,7 +1,9 @@ +From f475cffecaafbec5065e8484734df5d1a3264940 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Subject: sched/rt: Annotate the RT balancing logic irqwork as IRQ_WORK_HARD_IRQ -Date: Wed, 06 Oct 2021 13:18:49 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Date: Wed, 6 Oct 2021 13:18:49 +0200 +Subject: [PATCH 052/158] sched/rt: Annotate the RT balancing logic irqwork as + IRQ_WORK_HARD_IRQ +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The push-IPI logic for RT tasks expects to be invoked from hardirq context. One reason is that a RT task on the remote CPU would block the @@ -22,12 +24,14 @@ Cc: Daniel Bristot de Oliveira <bristot@redhat.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20211006111852.1514359-2-bigeasy@linutronix.de --- - kernel/sched/topology.c | 2 +- + kernel/sched/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c +index 4e8698e62f07..3d0157bd4e14 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c -@@ -526,7 +526,7 @@ static int init_rootdomain(struct root_d +@@ -526,7 +526,7 @@ static int init_rootdomain(struct root_domain *rd) #ifdef HAVE_RT_PUSH_IPI rd->rto_cpu = -1; raw_spin_lock_init(&rd->rto_lock); @@ -36,3 +40,6 @@ Link: https://lore.kernel.org/r/20211006111852.1514359-2-bigeasy@linutronix.de #endif rd->visit_gen = 0; +-- +2.33.1 + diff --git a/debian/patches-rt/0002_irq_work_allow_irq_work_sync_to_sleep_if_irq_work_no_irq_support.patch b/debian/patches-rt/0053-irq_work-Allow-irq_work_sync-to-sleep-if-irq_work-no.patch index c273e441b..ec6e05763 100644 --- a/debian/patches-rt/0002_irq_work_allow_irq_work_sync_to_sleep_if_irq_work_no_irq_support.patch +++ b/debian/patches-rt/0053-irq_work-Allow-irq_work_sync-to-sleep-if-irq_work-no.patch @@ -1,7 +1,9 @@ +From b4fe6c1fa5dbec6728d6b63d76e1b0063c22805c Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Subject: irq_work: Allow irq_work_sync() to sleep if irq_work() no IRQ support. -Date: Wed, 06 Oct 2021 13:18:50 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Date: Wed, 6 Oct 2021 13:18:50 +0200 +Subject: [PATCH 053/158] irq_work: Allow irq_work_sync() to sleep if + irq_work() no IRQ support. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz irq_work() triggers instantly an interrupt if supported by the architecture. Otherwise the work will be processed on the next timer @@ -18,10 +20,12 @@ processes irqwork via the timer tick. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20211006111852.1514359-3-bigeasy@linutronix.de --- - include/linux/irq_work.h | 3 +++ - kernel/irq_work.c | 10 ++++++++++ + include/linux/irq_work.h | 3 +++ + kernel/irq_work.c | 10 ++++++++++ 2 files changed, 13 insertions(+) +diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h +index ec2a47a81e42..b48955e9c920 100644 --- a/include/linux/irq_work.h +++ b/include/linux/irq_work.h @@ -3,6 +3,7 @@ @@ -46,6 +50,8 @@ Link: https://lore.kernel.org/r/20211006111852.1514359-3-bigeasy@linutronix.de } #define IRQ_WORK_INIT(_func) __IRQ_WORK_INIT(_func, 0) +diff --git a/kernel/irq_work.c b/kernel/irq_work.c +index db8c248ebc8c..e789beda8297 100644 --- a/kernel/irq_work.c +++ b/kernel/irq_work.c @@ -160,6 +160,9 @@ void irq_work_single(void *arg) @@ -72,3 +78,6 @@ Link: https://lore.kernel.org/r/20211006111852.1514359-3-bigeasy@linutronix.de while (irq_work_is_busy(work)) cpu_relax(); +-- +2.33.1 + diff --git a/debian/patches-rt/0003_irq_work_handle_some_irq_work_in_a_per_cpu_thread_on_preempt_rt.patch b/debian/patches-rt/0054-irq_work-Handle-some-irq_work-in-a-per-CPU-thread-on.patch index b7c04330d..518e0b622 100644 --- a/debian/patches-rt/0003_irq_work_handle_some_irq_work_in_a_per_cpu_thread_on_preempt_rt.patch +++ b/debian/patches-rt/0054-irq_work-Handle-some-irq_work-in-a-per-CPU-thread-on.patch @@ -1,7 +1,9 @@ +From 6b0aed256667de2557b0bc3864d2847a0538857a Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Subject: irq_work: Handle some irq_work in a per-CPU thread on PREEMPT_RT -Date: Wed, 06 Oct 2021 13:18:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Date: Wed, 6 Oct 2021 13:18:51 +0200 +Subject: [PATCH 054/158] irq_work: Handle some irq_work in a per-CPU thread on + PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The irq_work callback is invoked in hard IRQ context. By default all callbacks are scheduled for invocation right away (given supported by @@ -48,9 +50,11 @@ runs before any SCHED_OTHER tasks do. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20211007092646.uhshe3ut2wkrcfzv@linutronix.de --- - kernel/irq_work.c | 118 ++++++++++++++++++++++++++++++++++++++++++++++++------ + kernel/irq_work.c | 118 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 106 insertions(+), 12 deletions(-) +diff --git a/kernel/irq_work.c b/kernel/irq_work.c +index e789beda8297..90b6b56f92e9 100644 --- a/kernel/irq_work.c +++ b/kernel/irq_work.c @@ -18,11 +18,36 @@ @@ -128,7 +132,7 @@ Link: https://lore.kernel.org/r/20211007092646.uhshe3ut2wkrcfzv@linutronix.de } /* Enqueue the irq work @work on the current CPU */ -@@ -104,17 +143,34 @@ bool irq_work_queue_on(struct irq_work * +@@ -104,17 +143,34 @@ bool irq_work_queue_on(struct irq_work *work, int cpu) if (cpu != smp_processor_id()) { /* Arch remote IPI send/receive backend aren't NMI safe */ WARN_ON_ONCE(in_nmi()); @@ -164,7 +168,7 @@ Link: https://lore.kernel.org/r/20211007092646.uhshe3ut2wkrcfzv@linutronix.de bool irq_work_needs_cpu(void) { struct llist_head *raised, *lazy; -@@ -170,7 +226,12 @@ static void irq_work_run_list(struct lli +@@ -170,7 +226,12 @@ static void irq_work_run_list(struct llist_head *list) struct irq_work *work, *tmp; struct llist_node *llnode; @@ -178,7 +182,7 @@ Link: https://lore.kernel.org/r/20211007092646.uhshe3ut2wkrcfzv@linutronix.de if (llist_empty(list)) return; -@@ -187,7 +248,10 @@ static void irq_work_run_list(struct lli +@@ -187,7 +248,10 @@ static void irq_work_run_list(struct llist_head *list) void irq_work_run(void) { irq_work_run_list(this_cpu_ptr(&raised_list)); @@ -203,7 +207,7 @@ Link: https://lore.kernel.org/r/20211007092646.uhshe3ut2wkrcfzv@linutronix.de } /* -@@ -219,3 +287,29 @@ void irq_work_sync(struct irq_work *work +@@ -219,3 +287,29 @@ void irq_work_sync(struct irq_work *work) cpu_relax(); } EXPORT_SYMBOL_GPL(irq_work_sync); @@ -233,3 +237,6 @@ Link: https://lore.kernel.org/r/20211007092646.uhshe3ut2wkrcfzv@linutronix.de + return 0; +} +early_initcall(irq_work_init_threads); +-- +2.33.1 + diff --git a/debian/patches-rt/0004_irq_work_also_rcuwait_for_irq_work_hard_irq_on_preempt_rt.patch b/debian/patches-rt/0055-irq_work-Also-rcuwait-for-IRQ_WORK_HARD_IRQ-on-PREEM.patch index 234297710..bed7de837 100644 --- a/debian/patches-rt/0004_irq_work_also_rcuwait_for_irq_work_hard_irq_on_preempt_rt.patch +++ b/debian/patches-rt/0055-irq_work-Also-rcuwait-for-IRQ_WORK_HARD_IRQ-on-PREEM.patch @@ -1,7 +1,9 @@ +From eb1f04a88f1f21b5cc7c29127e10a4ce2e68dbad Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Subject: irq_work: Also rcuwait for !IRQ_WORK_HARD_IRQ on PREEMPT_RT -Date: Wed, 06 Oct 2021 13:18:52 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Date: Wed, 6 Oct 2021 13:18:52 +0200 +Subject: [PATCH 055/158] irq_work: Also rcuwait for !IRQ_WORK_HARD_IRQ on + PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz On PREEMPT_RT most items are processed as LAZY via softirq context. Avoid to spin-wait for them because irq_work_sync() could have higher @@ -12,13 +14,15 @@ Wait additionally for !IRQ_WORK_HARD_IRQ irq_work items on PREEMPT_RT. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20211006111852.1514359-5-bigeasy@linutronix.de --- - include/linux/irq_work.h | 5 +++++ - kernel/irq_work.c | 6 ++++-- + include/linux/irq_work.h | 5 +++++ + kernel/irq_work.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) +diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h +index b48955e9c920..8cd11a223260 100644 --- a/include/linux/irq_work.h +++ b/include/linux/irq_work.h -@@ -49,6 +49,11 @@ static inline bool irq_work_is_busy(stru +@@ -49,6 +49,11 @@ static inline bool irq_work_is_busy(struct irq_work *work) return atomic_read(&work->node.a_flags) & IRQ_WORK_BUSY; } @@ -30,6 +34,8 @@ Link: https://lore.kernel.org/r/20211006111852.1514359-5-bigeasy@linutronix.de bool irq_work_queue(struct irq_work *work); bool irq_work_queue_on(struct irq_work *work, int cpu); +diff --git a/kernel/irq_work.c b/kernel/irq_work.c +index 90b6b56f92e9..f7df715ec28e 100644 --- a/kernel/irq_work.c +++ b/kernel/irq_work.c @@ -217,7 +217,8 @@ void irq_work_single(void *arg) @@ -42,7 +48,7 @@ Link: https://lore.kernel.org/r/20211006111852.1514359-5-bigeasy@linutronix.de rcuwait_wake_up(&work->irqwait); } -@@ -277,7 +278,8 @@ void irq_work_sync(struct irq_work *work +@@ -277,7 +278,8 @@ void irq_work_sync(struct irq_work *work) lockdep_assert_irqs_enabled(); might_sleep(); @@ -52,3 +58,6 @@ Link: https://lore.kernel.org/r/20211006111852.1514359-5-bigeasy@linutronix.de rcuwait_wait_event(&work->irqwait, !irq_work_is_busy(work), TASK_UNINTERRUPTIBLE); return; +-- +2.33.1 + diff --git a/debian/patches-rt/irq_poll-Use-raise_softirq_irqoff-in-cpu_dead-notifi.patch b/debian/patches-rt/0056-irq_poll-Use-raise_softirq_irqoff-in-cpu_dead-notifi.patch index f6b54a578..5bb35a340 100644 --- a/debian/patches-rt/irq_poll-Use-raise_softirq_irqoff-in-cpu_dead-notifi.patch +++ b/debian/patches-rt/0056-irq_poll-Use-raise_softirq_irqoff-in-cpu_dead-notifi.patch @@ -1,7 +1,9 @@ +From ca7f829af53a908e0c480142361350e16d5da247 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 2 Apr 2020 21:16:30 +0200 -Subject: [PATCH] irq_poll: Use raise_softirq_irqoff() in cpu_dead notifier -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 056/158] irq_poll: Use raise_softirq_irqoff() in cpu_dead + notifier +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz __raise_softirq_irqoff() adds a bit to the pending sofirq mask and this is it. The softirq won't be handled in a deterministic way but randomly @@ -15,12 +17,14 @@ handle pending softirqs. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lkml.kernel.org/r/20210930103754.2128949-1-bigeasy@linutronix.de --- - lib/irq_poll.c | 2 ++ + lib/irq_poll.c | 2 ++ 1 file changed, 2 insertions(+) +diff --git a/lib/irq_poll.c b/lib/irq_poll.c +index 2f17b488d58e..2b9f797642f6 100644 --- a/lib/irq_poll.c +++ b/lib/irq_poll.c -@@ -191,11 +191,13 @@ static int irq_poll_cpu_dead(unsigned in +@@ -191,11 +191,13 @@ static int irq_poll_cpu_dead(unsigned int cpu) * If a CPU goes away, splice its entries to the current CPU * and trigger a run of the softirq */ @@ -34,3 +38,6 @@ Link: https://lkml.kernel.org/r/20210930103754.2128949-1-bigeasy@linutronix.de return 0; } +-- +2.33.1 + diff --git a/debian/patches-rt/smp_wake_ksoftirqd_on_preempt_rt_instead_do_softirq.patch b/debian/patches-rt/0057-smp-Wake-ksoftirqd-on-PREEMPT_RT-instead-do_softirq.patch index 1ffb510a4..65e65fdb6 100644 --- a/debian/patches-rt/smp_wake_ksoftirqd_on_preempt_rt_instead_do_softirq.patch +++ b/debian/patches-rt/0057-smp-Wake-ksoftirqd-on-PREEMPT_RT-instead-do_softirq.patch @@ -1,7 +1,9 @@ +From 84bae9c605ec51f82abb29a842fde5628a98ddf6 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Subject: smp: Wake ksoftirqd on PREEMPT_RT instead do_softirq(). Date: Mon, 27 Sep 2021 09:38:14 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 057/158] smp: Wake ksoftirqd on PREEMPT_RT instead + do_softirq(). +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The softirq implementation on PREEMPT_RT does not provide do_softirq(). The other user of do_softirq() is replaced with a local_bh_disable() @@ -14,14 +16,14 @@ Wake the softirq thread on PREEMPT_RT if there are any pending softirqs. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210927073814.x5h6osr4dgiu44sc@linutronix.de --- -v1…v2: Drop an empty line. - - kernel/smp.c | 14 ++++++++++++-- + kernel/smp.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) ---- + +diff --git a/kernel/smp.c b/kernel/smp.c +index f43ede0ab183..f0f26e1a0031 100644 --- a/kernel/smp.c +++ b/kernel/smp.c -@@ -690,10 +690,20 @@ void flush_smp_call_function_from_idle(v +@@ -690,10 +690,20 @@ void flush_smp_call_function_from_idle(void) cfd_seq_store(this_cpu_ptr(&cfd_seq_local)->idle, CFD_SEQ_NOCPU, smp_processor_id(), CFD_SEQ_IDLE); @@ -44,3 +46,6 @@ v1…v2: Drop an empty line. local_irq_restore(flags); } +-- +2.33.1 + diff --git a/debian/patches-rt/fs-namespace-Boost-the-mount_lock.lock-owner-instead.patch b/debian/patches-rt/0058-fs-namespace-Boost-the-mount_lock.lock-owner-instead.patch index 10b82429e..db11fa21e 100644 --- a/debian/patches-rt/fs-namespace-Boost-the-mount_lock.lock-owner-instead.patch +++ b/debian/patches-rt/0058-fs-namespace-Boost-the-mount_lock.lock-owner-instead.patch @@ -1,8 +1,9 @@ +From ce6b94c976d8b00fae5c4c9113187bea0e906089 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 25 Oct 2021 16:49:35 +0200 -Subject: [PATCH] fs/namespace: Boost the mount_lock.lock owner instead of - spinning on PREEMPT_RT. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 058/158] fs/namespace: Boost the mount_lock.lock owner instead + of spinning on PREEMPT_RT. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The MNT_WRITE_HOLD flag is used to hold back any new writers while the mount point is about to be made read-only. __mnt_want_write() then loops @@ -24,9 +25,11 @@ means that MNT_WRITE_HOLD is cleared again. Link: https://lkml.kernel.org/r/20211025152218.opvcqfku2lhqvp4o@linutronix.de Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - fs/namespace.c | 20 ++++++++++++++++++-- + fs/namespace.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) +diff --git a/fs/namespace.c b/fs/namespace.c +index 659a8f39c61a..3ab45b47b286 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -343,8 +343,24 @@ int __mnt_want_write(struct vfsmount *m) @@ -56,3 +59,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * After the slowpath clears MNT_WRITE_HOLD, mnt_is_readonly will * be set to match its requirements. So we must not load that until +-- +2.33.1 + diff --git a/debian/patches-rt/fscache-Use-only-one-fscache_object_cong_wait.patch b/debian/patches-rt/0059-fscache-Use-only-one-fscache_object_cong_wait.patch index 4f47d8535..a91156368 100644 --- a/debian/patches-rt/fscache-Use-only-one-fscache_object_cong_wait.patch +++ b/debian/patches-rt/0059-fscache-Use-only-one-fscache_object_cong_wait.patch @@ -1,7 +1,8 @@ +From 341adfb7c200734e1458337b6de0fc8749abc512 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 28 Oct 2021 17:30:50 +0200 -Subject: [PATCH] fscache: Use only one fscache_object_cong_wait. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 059/158] fscache: Use only one fscache_object_cong_wait. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz In the commit mentioned below, fscache was converted from slow-work to workqueue. slow_work_enqueue() and slow_work_sleep_till_thread_needed() @@ -29,11 +30,13 @@ Cc: stable-rt@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lkml.kernel.org/r/20211029083839.xwwt7jgzru3kcpii@linutronix.de --- - fs/fscache/internal.h | 1 - - fs/fscache/main.c | 6 ------ - fs/fscache/object.c | 13 +++++-------- + fs/fscache/internal.h | 1 - + fs/fscache/main.c | 6 ------ + fs/fscache/object.c | 13 +++++-------- 3 files changed, 5 insertions(+), 15 deletions(-) +diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h +index c3e4804b8fcb..9edb87e11680 100644 --- a/fs/fscache/internal.h +++ b/fs/fscache/internal.h @@ -81,7 +81,6 @@ extern unsigned fscache_debug; @@ -44,6 +47,8 @@ Link: https://lkml.kernel.org/r/20211029083839.xwwt7jgzru3kcpii@linutronix.de extern unsigned int fscache_hash(unsigned int salt, unsigned int *data, unsigned int n); +diff --git a/fs/fscache/main.c b/fs/fscache/main.c +index 4207f98e405f..85f8cf3a323d 100644 --- a/fs/fscache/main.c +++ b/fs/fscache/main.c @@ -41,8 +41,6 @@ struct kobject *fscache_root; @@ -55,7 +60,7 @@ Link: https://lkml.kernel.org/r/20211029083839.xwwt7jgzru3kcpii@linutronix.de /* these values serve as lower bounds, will be adjusted in fscache_init() */ static unsigned fscache_object_max_active = 4; static unsigned fscache_op_max_active = 2; -@@ -138,7 +136,6 @@ unsigned int fscache_hash(unsigned int s +@@ -138,7 +136,6 @@ unsigned int fscache_hash(unsigned int salt, unsigned int *data, unsigned int n) static int __init fscache_init(void) { unsigned int nr_cpus = num_possible_cpus(); @@ -73,9 +78,11 @@ Link: https://lkml.kernel.org/r/20211029083839.xwwt7jgzru3kcpii@linutronix.de ret = fscache_proc_init(); if (ret < 0) goto error_proc; +diff --git a/fs/fscache/object.c b/fs/fscache/object.c +index 6a675652129b..7a972d144b54 100644 --- a/fs/fscache/object.c +++ b/fs/fscache/object.c -@@ -798,6 +798,8 @@ void fscache_object_destroy(struct fscac +@@ -798,6 +798,8 @@ void fscache_object_destroy(struct fscache_object *object) } EXPORT_SYMBOL(fscache_object_destroy); @@ -84,7 +91,7 @@ Link: https://lkml.kernel.org/r/20211029083839.xwwt7jgzru3kcpii@linutronix.de /* * enqueue an object for metadata-type processing */ -@@ -806,16 +808,12 @@ void fscache_enqueue_object(struct fscac +@@ -806,16 +808,12 @@ void fscache_enqueue_object(struct fscache_object *object) _enter("{OBJ%x}", object->debug_id); if (fscache_get_object(object, fscache_obj_get_queue) >= 0) { @@ -102,7 +109,7 @@ Link: https://lkml.kernel.org/r/20211029083839.xwwt7jgzru3kcpii@linutronix.de } } -@@ -833,16 +831,15 @@ void fscache_enqueue_object(struct fscac +@@ -833,16 +831,15 @@ void fscache_enqueue_object(struct fscache_object *object) */ bool fscache_object_sleep_till_congested(signed long *timeoutp) { @@ -121,3 +128,6 @@ Link: https://lkml.kernel.org/r/20211029083839.xwwt7jgzru3kcpii@linutronix.de return fscache_object_congested(); } +-- +2.33.1 + diff --git a/debian/patches-rt/0001_sched_clean_up_the_might_sleep_underscore_zoo.patch b/debian/patches-rt/0060-sched-Clean-up-the-might_sleep-underscore-zoo.patch index 8145127b6..e2d856740 100644 --- a/debian/patches-rt/0001_sched_clean_up_the_might_sleep_underscore_zoo.patch +++ b/debian/patches-rt/0060-sched-Clean-up-the-might_sleep-underscore-zoo.patch @@ -1,7 +1,8 @@ +From e0d58312bc5a2836ed46482a248f575ce7948d9b Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> -Subject: sched: Clean up the might_sleep() underscore zoo Date: Thu, 23 Sep 2021 18:54:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 060/158] sched: Clean up the might_sleep() underscore zoo +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz __might_sleep() vs. ___might_sleep() is hard to distinguish. Aside of that the three underscore variant is exposed to provide a checkpoint for @@ -25,15 +26,17 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210923165357.928693482@linutronix.de --- - include/linux/kernel.h | 6 +++--- - include/linux/sched.h | 8 ++++---- - kernel/locking/spinlock_rt.c | 6 +++--- - kernel/sched/core.c | 6 +++--- + include/linux/kernel.h | 6 +++--- + include/linux/sched.h | 8 ++++---- + kernel/locking/spinlock_rt.c | 6 +++--- + kernel/sched/core.c | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) +diff --git a/include/linux/kernel.h b/include/linux/kernel.h +index 2776423a587e..5e4ae54da73e 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h -@@ -111,7 +111,7 @@ static __always_inline void might_resche +@@ -111,7 +111,7 @@ static __always_inline void might_resched(void) #endif /* CONFIG_PREEMPT_* */ #ifdef CONFIG_DEBUG_ATOMIC_SLEEP @@ -42,7 +45,7 @@ Link: https://lore.kernel.org/r/20210923165357.928693482@linutronix.de extern void __might_sleep(const char *file, int line, int preempt_offset); extern void __cant_sleep(const char *file, int line, int preempt_offset); extern void __cant_migrate(const char *file, int line); -@@ -168,8 +168,8 @@ extern void __cant_migrate(const char *f +@@ -168,8 +168,8 @@ extern void __cant_migrate(const char *file, int line); */ # define non_block_end() WARN_ON(current->non_block_count-- == 0) #else @@ -53,9 +56,11 @@ Link: https://lore.kernel.org/r/20210923165357.928693482@linutronix.de static inline void __might_sleep(const char *file, int line, int preempt_offset) { } # define might_sleep() do { might_resched(); } while (0) +diff --git a/include/linux/sched.h b/include/linux/sched.h +index 33789b6abdc3..150670bbc3d6 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -2049,7 +2049,7 @@ static inline int _cond_resched(void) { +@@ -2049,7 +2049,7 @@ static inline int _cond_resched(void) { return 0; } #endif /* !defined(CONFIG_PREEMPTION) || defined(CONFIG_PREEMPT_DYNAMIC) */ #define cond_resched() ({ \ @@ -64,7 +69,7 @@ Link: https://lore.kernel.org/r/20210923165357.928693482@linutronix.de _cond_resched(); \ }) -@@ -2057,9 +2057,9 @@ extern int __cond_resched_lock(spinlock_ +@@ -2057,9 +2057,9 @@ extern int __cond_resched_lock(spinlock_t *lock); extern int __cond_resched_rwlock_read(rwlock_t *lock); extern int __cond_resched_rwlock_write(rwlock_t *lock); @@ -77,9 +82,11 @@ Link: https://lore.kernel.org/r/20210923165357.928693482@linutronix.de }) #define cond_resched_rwlock_read(lock) ({ \ +diff --git a/kernel/locking/spinlock_rt.c b/kernel/locking/spinlock_rt.c +index d2912e44d61f..c5289240cfb4 100644 --- a/kernel/locking/spinlock_rt.c +++ b/kernel/locking/spinlock_rt.c -@@ -32,7 +32,7 @@ static __always_inline void rtlock_lock( +@@ -32,7 +32,7 @@ static __always_inline void rtlock_lock(struct rt_mutex_base *rtm) static __always_inline void __rt_spin_lock(spinlock_t *lock) { @@ -106,9 +113,11 @@ Link: https://lore.kernel.org/r/20210923165357.928693482@linutronix.de rwlock_acquire(&rwlock->dep_map, 0, 0, _RET_IP_); rwbase_write_lock(&rwlock->rwbase, TASK_RTLOCK_WAIT); rcu_read_lock(); +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index 9d31a1b174d2..c6a53e6c95ea 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -9489,11 +9489,11 @@ void __might_sleep(const char *file, int +@@ -9489,11 +9489,11 @@ void __might_sleep(const char *file, int line, int preempt_offset) (void *)current->task_state_change, (void *)current->task_state_change); @@ -122,7 +131,7 @@ Link: https://lore.kernel.org/r/20210923165357.928693482@linutronix.de { /* Ratelimiting timestamp: */ static unsigned long prev_jiffy; -@@ -9538,7 +9538,7 @@ void ___might_sleep(const char *file, in +@@ -9538,7 +9538,7 @@ void ___might_sleep(const char *file, int line, int preempt_offset) dump_stack(); add_taint(TAINT_WARN, LOCKDEP_STILL_OK); } @@ -131,3 +140,6 @@ Link: https://lore.kernel.org/r/20210923165357.928693482@linutronix.de void __cant_sleep(const char *file, int line, int preempt_offset) { +-- +2.33.1 + diff --git a/debian/patches-rt/0002_sched_make_cond_resched__lock_variants_consistent_vs_might_sleep.patch b/debian/patches-rt/0061-sched-Make-cond_resched_-lock-variants-consistent-vs.patch index 9465bebcd..9b3e00f7e 100644 --- a/debian/patches-rt/0002_sched_make_cond_resched__lock_variants_consistent_vs_might_sleep.patch +++ b/debian/patches-rt/0061-sched-Make-cond_resched_-lock-variants-consistent-vs.patch @@ -1,7 +1,9 @@ +From a911a33c8d3dfb4943dc7861dc69c3fe286e26c6 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> -Subject: sched: Make cond_resched_*lock() variants consistent vs. might_sleep() Date: Thu, 23 Sep 2021 18:54:37 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 061/158] sched: Make cond_resched_*lock() variants consistent + vs. might_sleep() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Commit 3427445afd26 ("sched: Exclude cond_resched() from nested sleep test") removed the task state check of __might_sleep() for @@ -19,12 +21,14 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210923165357.991262778@linutronix.de --- - include/linux/sched.h | 12 ++++++------ + include/linux/sched.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) +diff --git a/include/linux/sched.h b/include/linux/sched.h +index 150670bbc3d6..64e9bdb5d523 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -2062,14 +2062,14 @@ extern int __cond_resched_rwlock_write(r +@@ -2062,14 +2062,14 @@ extern int __cond_resched_rwlock_write(rwlock_t *lock); __cond_resched_lock(lock); \ }) @@ -45,3 +49,6 @@ Link: https://lore.kernel.org/r/20210923165357.991262778@linutronix.de }) static inline void cond_resched_rcu(void) +-- +2.33.1 + diff --git a/debian/patches-rt/0003_sched_remove_preempt_offset_argument_from___might_sleep.patch b/debian/patches-rt/0062-sched-Remove-preempt_offset-argument-from-__might_sl.patch index ab2cb99a9..1373d22ab 100644 --- a/debian/patches-rt/0003_sched_remove_preempt_offset_argument_from___might_sleep.patch +++ b/debian/patches-rt/0062-sched-Remove-preempt_offset-argument-from-__might_sl.patch @@ -1,7 +1,9 @@ +From c3a484166d094d272cbdfe59ca3dae770542bef8 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> -Subject: sched: Remove preempt_offset argument from __might_sleep() Date: Thu, 23 Sep 2021 18:54:38 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 062/158] sched: Remove preempt_offset argument from + __might_sleep() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz All callers hand in 0 and never will hand in anything else. @@ -9,14 +11,16 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210923165358.054321586@linutronix.de --- - include/linux/kernel.h | 7 +++---- - kernel/sched/core.c | 4 ++-- - mm/memory.c | 2 +- + include/linux/kernel.h | 7 +++---- + kernel/sched/core.c | 4 ++-- + mm/memory.c | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) +diff --git a/include/linux/kernel.h b/include/linux/kernel.h +index 5e4ae54da73e..f95ee786e4ef 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h -@@ -112,7 +112,7 @@ static __always_inline void might_resche +@@ -112,7 +112,7 @@ static __always_inline void might_resched(void) #ifdef CONFIG_DEBUG_ATOMIC_SLEEP extern void __might_resched(const char *file, int line, int preempt_offset); @@ -25,7 +29,7 @@ Link: https://lore.kernel.org/r/20210923165358.054321586@linutronix.de extern void __cant_sleep(const char *file, int line, int preempt_offset); extern void __cant_migrate(const char *file, int line); -@@ -129,7 +129,7 @@ extern void __cant_migrate(const char *f +@@ -129,7 +129,7 @@ extern void __cant_migrate(const char *file, int line); * supposed to. */ # define might_sleep() \ @@ -34,7 +38,7 @@ Link: https://lore.kernel.org/r/20210923165358.054321586@linutronix.de /** * cant_sleep - annotation for functions that cannot sleep * -@@ -170,8 +170,7 @@ extern void __cant_migrate(const char *f +@@ -170,8 +170,7 @@ extern void __cant_migrate(const char *file, int line); #else static inline void __might_resched(const char *file, int line, int preempt_offset) { } @@ -44,9 +48,11 @@ Link: https://lore.kernel.org/r/20210923165358.054321586@linutronix.de # define might_sleep() do { might_resched(); } while (0) # define cant_sleep() do { } while (0) # define cant_migrate() do { } while (0) +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index c6a53e6c95ea..95c84ce1f7b2 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -9475,7 +9475,7 @@ static inline int preempt_count_equals(i +@@ -9475,7 +9475,7 @@ static inline int preempt_count_equals(int preempt_offset) return (nested == preempt_offset); } @@ -55,7 +61,7 @@ Link: https://lore.kernel.org/r/20210923165358.054321586@linutronix.de { unsigned int state = get_current_state(); /* -@@ -9489,7 +9489,7 @@ void __might_sleep(const char *file, int +@@ -9489,7 +9489,7 @@ void __might_sleep(const char *file, int line, int preempt_offset) (void *)current->task_state_change, (void *)current->task_state_change); @@ -64,9 +70,11 @@ Link: https://lore.kernel.org/r/20210923165358.054321586@linutronix.de } EXPORT_SYMBOL(__might_sleep); +diff --git a/mm/memory.c b/mm/memory.c +index c52be6d6b605..e2c623027e32 100644 --- a/mm/memory.c +++ b/mm/memory.c -@@ -5256,7 +5256,7 @@ void __might_fault(const char *file, int +@@ -5265,7 +5265,7 @@ void __might_fault(const char *file, int line) return; if (pagefault_disabled()) return; @@ -75,3 +83,6 @@ Link: https://lore.kernel.org/r/20210923165358.054321586@linutronix.de #if defined(CONFIG_DEBUG_ATOMIC_SLEEP) if (current->mm) might_lock_read(¤t->mm->mmap_lock); +-- +2.33.1 + diff --git a/debian/patches-rt/0004_sched_cleanup_might_sleep_printks.patch b/debian/patches-rt/0063-sched-Cleanup-might_sleep-printks.patch index b376ae4d4..20d8155c1 100644 --- a/debian/patches-rt/0004_sched_cleanup_might_sleep_printks.patch +++ b/debian/patches-rt/0063-sched-Cleanup-might_sleep-printks.patch @@ -1,7 +1,8 @@ +From bcfeb59bf12bbda37675f9ea257e5ae0358ee00a Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> -Subject: sched: Cleanup might_sleep() printks Date: Thu, 23 Sep 2021 18:54:40 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 063/158] sched: Cleanup might_sleep() printks +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Convert them to pr_*(). No functional change. @@ -9,12 +10,14 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210923165358.117496067@linutronix.de --- - kernel/sched/core.c | 14 ++++++-------- + kernel/sched/core.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index 95c84ce1f7b2..5e827c777aef 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -9516,16 +9516,14 @@ void __might_resched(const char *file, i +@@ -9516,16 +9516,14 @@ void __might_resched(const char *file, int line, int preempt_offset) /* Save this before calling printk(), since that will clobber it: */ preempt_disable_ip = get_preempt_disable_ip(current); @@ -37,3 +40,6 @@ Link: https://lore.kernel.org/r/20210923165358.117496067@linutronix.de debug_show_held_locks(current); if (irqs_disabled()) +-- +2.33.1 + diff --git a/debian/patches-rt/0005_sched_make_might_sleep_output_less_confusing.patch b/debian/patches-rt/0064-sched-Make-might_sleep-output-less-confusing.patch index e1dee86f6..0ba4b7e40 100644 --- a/debian/patches-rt/0005_sched_make_might_sleep_output_less_confusing.patch +++ b/debian/patches-rt/0064-sched-Make-might_sleep-output-less-confusing.patch @@ -1,7 +1,8 @@ +From 68737492e5cd95e0dc1888a6efac47cee124baa3 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> -Subject: sched: Make might_sleep() output less confusing Date: Thu, 23 Sep 2021 18:54:41 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 064/158] sched: Make might_sleep() output less confusing +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz might_sleep() output is pretty informative, but can be confusing at times especially with PREEMPT_RCU when the check triggers due to a voluntary @@ -79,12 +80,14 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210923165358.181022656@linutronix.de --- - kernel/sched/core.c | 27 ++++++++++++++++++++++----- + kernel/sched/core.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index 5e827c777aef..a918a776258b 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -9493,6 +9493,18 @@ void __might_sleep(const char *file, int +@@ -9493,6 +9493,18 @@ void __might_sleep(const char *file, int line) } EXPORT_SYMBOL(__might_sleep); @@ -103,7 +106,7 @@ Link: https://lore.kernel.org/r/20210923165358.181022656@linutronix.de void __might_resched(const char *file, int line, int preempt_offset) { /* Ratelimiting timestamp: */ -@@ -9521,6 +9533,13 @@ void __might_resched(const char *file, i +@@ -9521,6 +9533,13 @@ void __might_resched(const char *file, int line, int preempt_offset) pr_err("in_atomic(): %d, irqs_disabled(): %d, non_block: %d, pid: %d, name: %s\n", in_atomic(), irqs_disabled(), current->non_block_count, current->pid, current->comm); @@ -117,7 +120,7 @@ Link: https://lore.kernel.org/r/20210923165358.181022656@linutronix.de if (task_stack_end_corrupted(current)) pr_emerg("Thread overran stack, or stack corrupted\n"); -@@ -9528,11 +9547,9 @@ void __might_resched(const char *file, i +@@ -9528,11 +9547,9 @@ void __might_resched(const char *file, int line, int preempt_offset) debug_show_held_locks(current); if (irqs_disabled()) print_irqtrace_events(current); @@ -132,3 +135,6 @@ Link: https://lore.kernel.org/r/20210923165358.181022656@linutronix.de dump_stack(); add_taint(TAINT_WARN, LOCKDEP_STILL_OK); } +-- +2.33.1 + diff --git a/debian/patches-rt/0006_sched_make_rcu_nest_depth_distinct_in___might_resched.patch b/debian/patches-rt/0065-sched-Make-RCU-nest-depth-distinct-in-__might_resche.patch index 1aa6fab12..dac462834 100644 --- a/debian/patches-rt/0006_sched_make_rcu_nest_depth_distinct_in___might_resched.patch +++ b/debian/patches-rt/0065-sched-Make-RCU-nest-depth-distinct-in-__might_resche.patch @@ -1,7 +1,9 @@ +From 2bd5c1fd8d2f666eccaadd13d287f2cee4fc7512 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> -Subject: sched: Make RCU nest depth distinct in __might_resched() Date: Thu, 23 Sep 2021 18:54:43 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 065/158] sched: Make RCU nest depth distinct in + __might_resched() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz For !RT kernels RCU nest depth in __might_resched() is always expected to be 0, but on RT kernels it can be non zero while the preempt count is @@ -18,14 +20,16 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210923165358.243232823@linutronix.de --- - include/linux/kernel.h | 4 ++-- - include/linux/sched.h | 3 +++ - kernel/sched/core.c | 28 ++++++++++++++++------------ + include/linux/kernel.h | 4 ++-- + include/linux/sched.h | 3 +++ + kernel/sched/core.c | 28 ++++++++++++++++------------ 3 files changed, 21 insertions(+), 14 deletions(-) +diff --git a/include/linux/kernel.h b/include/linux/kernel.h +index f95ee786e4ef..e8696e4a45aa 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h -@@ -111,7 +111,7 @@ static __always_inline void might_resche +@@ -111,7 +111,7 @@ static __always_inline void might_resched(void) #endif /* CONFIG_PREEMPT_* */ #ifdef CONFIG_DEBUG_ATOMIC_SLEEP @@ -34,7 +38,7 @@ Link: https://lore.kernel.org/r/20210923165358.243232823@linutronix.de extern void __might_sleep(const char *file, int line); extern void __cant_sleep(const char *file, int line, int preempt_offset); extern void __cant_migrate(const char *file, int line); -@@ -169,7 +169,7 @@ extern void __cant_migrate(const char *f +@@ -169,7 +169,7 @@ extern void __cant_migrate(const char *file, int line); # define non_block_end() WARN_ON(current->non_block_count-- == 0) #else static inline void __might_resched(const char *file, int line, @@ -43,9 +47,11 @@ Link: https://lore.kernel.org/r/20210923165358.243232823@linutronix.de static inline void __might_sleep(const char *file, int line) { } # define might_sleep() do { might_resched(); } while (0) # define cant_sleep() do { } while (0) +diff --git a/include/linux/sched.h b/include/linux/sched.h +index 64e9bdb5d523..4dde5e26de8f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -2057,6 +2057,9 @@ extern int __cond_resched_lock(spinlock_ +@@ -2057,6 +2057,9 @@ extern int __cond_resched_lock(spinlock_t *lock); extern int __cond_resched_rwlock_read(rwlock_t *lock); extern int __cond_resched_rwlock_write(rwlock_t *lock); @@ -55,6 +61,8 @@ Link: https://lore.kernel.org/r/20210923165358.243232823@linutronix.de #define cond_resched_lock(lock) ({ \ __might_resched(__FILE__, __LINE__, PREEMPT_LOCK_OFFSET); \ __cond_resched_lock(lock); \ +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index a918a776258b..e68d7a06e7d5 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -9468,12 +9468,6 @@ void __init sched_init(void) @@ -70,7 +78,7 @@ Link: https://lore.kernel.org/r/20210923165358.243232823@linutronix.de void __might_sleep(const char *file, int line) { -@@ -9505,7 +9499,16 @@ static void print_preempt_disable_ip(int +@@ -9505,7 +9499,16 @@ static void print_preempt_disable_ip(int preempt_offset, unsigned long ip) print_ip_sym(KERN_ERR, ip); } @@ -88,7 +96,7 @@ Link: https://lore.kernel.org/r/20210923165358.243232823@linutronix.de { /* Ratelimiting timestamp: */ static unsigned long prev_jiffy; -@@ -9515,7 +9518,7 @@ void __might_resched(const char *file, i +@@ -9515,7 +9518,7 @@ void __might_resched(const char *file, int line, int preempt_offset) /* WARN_ON_ONCE() by default, no rate limit required: */ rcu_sleep_check(); @@ -97,7 +105,7 @@ Link: https://lore.kernel.org/r/20210923165358.243232823@linutronix.de !is_idle_task(current) && !current->non_block_count) || system_state == SYSTEM_BOOTING || system_state > SYSTEM_RUNNING || oops_in_progress) -@@ -9534,11 +9537,11 @@ void __might_resched(const char *file, i +@@ -9534,11 +9537,11 @@ void __might_resched(const char *file, int line, int preempt_offset) in_atomic(), irqs_disabled(), current->non_block_count, current->pid, current->comm); pr_err("preempt_count: %x, expected: %x\n", preempt_count(), @@ -112,7 +120,7 @@ Link: https://lore.kernel.org/r/20210923165358.243232823@linutronix.de } if (task_stack_end_corrupted(current)) -@@ -9548,7 +9551,8 @@ void __might_resched(const char *file, i +@@ -9548,7 +9551,8 @@ void __might_resched(const char *file, int line, int preempt_offset) if (irqs_disabled()) print_irqtrace_events(current); @@ -122,3 +130,6 @@ Link: https://lore.kernel.org/r/20210923165358.243232823@linutronix.de dump_stack(); add_taint(TAINT_WARN, LOCKDEP_STILL_OK); +-- +2.33.1 + diff --git a/debian/patches-rt/0007_sched_make_cond_resched_lock_variants_rt_aware.patch b/debian/patches-rt/0066-sched-Make-cond_resched_lock-variants-RT-aware.patch index e4fab4b9a..5791c0771 100644 --- a/debian/patches-rt/0007_sched_make_cond_resched_lock_variants_rt_aware.patch +++ b/debian/patches-rt/0066-sched-Make-cond_resched_lock-variants-RT-aware.patch @@ -1,7 +1,8 @@ +From d2f27a429d92d9e68a4b5e4dc1018c6edd94050a Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> -Subject: sched: Make cond_resched_lock() variants RT aware Date: Thu, 23 Sep 2021 18:54:44 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 066/158] sched: Make cond_resched_lock() variants RT aware +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The __might_resched() checks in the cond_resched_lock() variants use PREEMPT_LOCK_OFFSET for preempt count offset checking which takes the @@ -24,10 +25,12 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210923165358.305969211@linutronix.de --- - include/linux/preempt.h | 5 +++-- - include/linux/sched.h | 34 +++++++++++++++++++++++++--------- + include/linux/preempt.h | 5 +++-- + include/linux/sched.h | 34 +++++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 11 deletions(-) +diff --git a/include/linux/preempt.h b/include/linux/preempt.h +index 4d244e295e85..031898b38d06 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -122,9 +122,10 @@ @@ -43,9 +46,11 @@ Link: https://lore.kernel.org/r/20210923165358.305969211@linutronix.de #endif /* +diff --git a/include/linux/sched.h b/include/linux/sched.h +index 4dde5e26de8f..2b8c8150792c 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -2060,19 +2060,35 @@ extern int __cond_resched_rwlock_write(r +@@ -2060,19 +2060,35 @@ extern int __cond_resched_rwlock_write(rwlock_t *lock); #define MIGHT_RESCHED_RCU_SHIFT 8 #define MIGHT_RESCHED_PREEMPT_MASK ((1U << MIGHT_RESCHED_RCU_SHIFT) - 1) @@ -90,3 +95,6 @@ Link: https://lore.kernel.org/r/20210923165358.305969211@linutronix.de }) static inline void cond_resched_rcu(void) +-- +2.33.1 + diff --git a/debian/patches-rt/0008_locking_rt_take_rcu_nesting_into_account_for___might_resched.patch b/debian/patches-rt/0067-locking-rt-Take-RCU-nesting-into-account-for-__might.patch index 1fa08e1bd..f3547bbb0 100644 --- a/debian/patches-rt/0008_locking_rt_take_rcu_nesting_into_account_for___might_resched.patch +++ b/debian/patches-rt/0067-locking-rt-Take-RCU-nesting-into-account-for-__might.patch @@ -1,7 +1,9 @@ +From 316428f090b3ee528d50bc06e7c393dc05692b91 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> -Subject: locking/rt: Take RCU nesting into account for __might_resched() Date: Thu, 23 Sep 2021 18:54:46 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 067/158] locking/rt: Take RCU nesting into account for + __might_resched() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The general rule that rcu_read_lock() held sections cannot voluntary sleep does apply even on RT kernels. Though the substitution of spin/rw locks on @@ -26,9 +28,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210923165358.368305497@linutronix.de --- - kernel/locking/spinlock_rt.c | 17 ++++++++++++++--- + kernel/locking/spinlock_rt.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) +diff --git a/kernel/locking/spinlock_rt.c b/kernel/locking/spinlock_rt.c +index c5289240cfb4..b2e553f9255b 100644 --- a/kernel/locking/spinlock_rt.c +++ b/kernel/locking/spinlock_rt.c @@ -24,6 +24,17 @@ @@ -49,7 +53,7 @@ Link: https://lore.kernel.org/r/20210923165358.368305497@linutronix.de static __always_inline void rtlock_lock(struct rt_mutex_base *rtm) { if (unlikely(!rt_mutex_cmpxchg_acquire(rtm, NULL, current))) -@@ -32,7 +43,7 @@ static __always_inline void rtlock_lock( +@@ -32,7 +43,7 @@ static __always_inline void rtlock_lock(struct rt_mutex_base *rtm) static __always_inline void __rt_spin_lock(spinlock_t *lock) { @@ -76,3 +80,6 @@ Link: https://lore.kernel.org/r/20210923165358.368305497@linutronix.de rwlock_acquire(&rwlock->dep_map, 0, 0, _RET_IP_); rwbase_write_lock(&rwlock->rwbase, TASK_RTLOCK_WAIT); rcu_read_lock(); +-- +2.33.1 + diff --git a/debian/patches-rt/0001_sched_limit_the_number_of_task_migrations_per_batch_on_rt.patch b/debian/patches-rt/0068-sched-Limit-the-number-of-task-migrations-per-batch-.patch index 69f2bb898..cc003970e 100644 --- a/debian/patches-rt/0001_sched_limit_the_number_of_task_migrations_per_batch_on_rt.patch +++ b/debian/patches-rt/0068-sched-Limit-the-number-of-task-migrations-per-batch-.patch @@ -1,7 +1,9 @@ +From 96387fd0a5d8fb18fffc63cc612e8f32d95ee4c8 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> -Subject: sched: Limit the number of task migrations per batch on RT Date: Tue, 28 Sep 2021 14:24:25 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 068/158] sched: Limit the number of task migrations per batch + on RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Batched task migrations are a source for large latencies as they keep the scheduler from running while processing the migrations. @@ -13,12 +15,14 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210928122411.425097596@linutronix.de --- - kernel/sched/core.c | 4 ++++ + kernel/sched/core.c | 4 ++++ 1 file changed, 4 insertions(+) ---- + +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index e68d7a06e7d5..bcaf5621ccfa 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -74,7 +74,11 @@ const_debug unsigned int sysctl_sched_fe +@@ -74,7 +74,11 @@ __read_mostly int sysctl_resched_latency_warn_once = 1; * Number of tasks to iterate in a single balance run. * Limited because this is done with IRQs disabled. */ @@ -30,3 +34,6 @@ Link: https://lore.kernel.org/r/20210928122411.425097596@linutronix.de /* * period over which we measure -rt task CPU usage in us. +-- +2.33.1 + diff --git a/debian/patches-rt/0002_sched_disable_ttwu_queue_on_rt.patch b/debian/patches-rt/0069-sched-Disable-TTWU_QUEUE-on-RT.patch index 32e8437a5..802e08f92 100644 --- a/debian/patches-rt/0002_sched_disable_ttwu_queue_on_rt.patch +++ b/debian/patches-rt/0069-sched-Disable-TTWU_QUEUE-on-RT.patch @@ -1,7 +1,8 @@ +From 13b98af269cb7ddefe762ee6e364d2dd659cdccd Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> -Subject: sched: Disable TTWU_QUEUE on RT Date: Tue, 28 Sep 2021 14:24:27 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 069/158] sched: Disable TTWU_QUEUE on RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The queued remote wakeup mechanism has turned out to be suboptimal for RT enabled kernels. The maximum latencies go up by a factor of > 5x in certain @@ -16,9 +17,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210928122411.482262764@linutronix.de --- - kernel/sched/features.h | 5 +++++ + kernel/sched/features.h | 5 +++++ 1 file changed, 5 insertions(+) ---- + +diff --git a/kernel/sched/features.h b/kernel/sched/features.h +index 7f8dace0964c..1cf435bbcd9c 100644 --- a/kernel/sched/features.h +++ b/kernel/sched/features.h @@ -46,11 +46,16 @@ SCHED_FEAT(DOUBLE_TICK, false) @@ -38,3 +41,6 @@ Link: https://lore.kernel.org/r/20210928122411.482262764@linutronix.de /* * When doing wakeups, attempt to limit superfluous scans of the LLC domain. +-- +2.33.1 + diff --git a/debian/patches-rt/0003_sched_move_kprobes_cleanup_out_of_finish_task_switch.patch b/debian/patches-rt/0070-sched-Move-kprobes-cleanup-out-of-finish_task_switch.patch index fb4208a4c..4d2ffd499 100644 --- a/debian/patches-rt/0003_sched_move_kprobes_cleanup_out_of_finish_task_switch.patch +++ b/debian/patches-rt/0070-sched-Move-kprobes-cleanup-out-of-finish_task_switch.patch @@ -1,7 +1,9 @@ +From edc326708d562b65cdba5d29c80021afbeb29f49 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> -Subject: sched: Move kprobes cleanup out of finish_task_switch() Date: Tue, 28 Sep 2021 14:24:28 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 070/158] sched: Move kprobes cleanup out of + finish_task_switch() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Doing cleanups in the tail of schedule() is a latency punishment for the incoming task. The point of invoking kprobes_task_flush() for a dead task @@ -15,11 +17,13 @@ Cc: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210928122411.537994026@linutronix.de --- - kernel/exit.c | 2 ++ - kernel/kprobes.c | 8 ++++---- - kernel/sched/core.c | 6 ------ + kernel/exit.c | 2 ++ + kernel/kprobes.c | 8 ++++---- + kernel/sched/core.c | 6 ------ 3 files changed, 6 insertions(+), 10 deletions(-) +diff --git a/kernel/exit.c b/kernel/exit.c +index 91a43e57a32e..63851320ae73 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -64,6 +64,7 @@ @@ -30,7 +34,7 @@ Link: https://lore.kernel.org/r/20210928122411.537994026@linutronix.de #include <linux/uaccess.h> #include <asm/unistd.h> -@@ -168,6 +169,7 @@ static void delayed_put_task_struct(stru +@@ -168,6 +169,7 @@ static void delayed_put_task_struct(struct rcu_head *rhp) { struct task_struct *tsk = container_of(rhp, struct task_struct, rcu); @@ -38,6 +42,8 @@ Link: https://lore.kernel.org/r/20210928122411.537994026@linutronix.de perf_event_delayed_put(tsk); trace_sched_process_free(tsk); put_task_struct(tsk); +diff --git a/kernel/kprobes.c b/kernel/kprobes.c +index 2ef90d15699f..2ab883d856b5 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1250,10 +1250,10 @@ void kprobe_busy_end(void) @@ -55,9 +61,11 @@ Link: https://lore.kernel.org/r/20210928122411.537994026@linutronix.de */ void kprobe_flush_task(struct task_struct *tk) { +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index bcaf5621ccfa..2ff76391063e 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4845,12 +4845,6 @@ static struct rq *finish_task_switch(str +@@ -4849,12 +4849,6 @@ static struct rq *finish_task_switch(struct task_struct *prev) if (prev->sched_class->task_dead) prev->sched_class->task_dead(prev); @@ -70,3 +78,6 @@ Link: https://lore.kernel.org/r/20210928122411.537994026@linutronix.de /* Task is done with its stack. */ put_task_stack(prev); +-- +2.33.1 + diff --git a/debian/patches-rt/0004_sched_delay_task_stack_freeing_on_rt.patch b/debian/patches-rt/0071-sched-Delay-task-stack-freeing-on-RT.patch index d7be73a28..7216cd02f 100644 --- a/debian/patches-rt/0004_sched_delay_task_stack_freeing_on_rt.patch +++ b/debian/patches-rt/0071-sched-Delay-task-stack-freeing-on-RT.patch @@ -1,7 +1,8 @@ +From 05b9b496262295dc9f12a548a9cc4bcf8e885a97 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Subject: sched: Delay task stack freeing on RT Date: Tue, 28 Sep 2021 14:24:30 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 071/158] sched: Delay task stack freeing on RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Anything which is done on behalf of a dead task at the end of finish_task_switch() is preventing the incoming task from doing useful @@ -14,14 +15,16 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20210928122411.593486363@linutronix.de --- - kernel/exit.c | 5 +++++ - kernel/fork.c | 5 ++++- - kernel/sched/core.c | 8 ++++++-- + kernel/exit.c | 5 +++++ + kernel/fork.c | 5 ++++- + kernel/sched/core.c | 8 ++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) +diff --git a/kernel/exit.c b/kernel/exit.c +index 63851320ae73..1d099609568d 100644 --- a/kernel/exit.c +++ b/kernel/exit.c -@@ -172,6 +172,11 @@ static void delayed_put_task_struct(stru +@@ -172,6 +172,11 @@ static void delayed_put_task_struct(struct rcu_head *rhp) kprobe_flush_task(tsk); perf_event_delayed_put(tsk); trace_sched_process_free(tsk); @@ -33,9 +36,11 @@ Link: https://lore.kernel.org/r/20210928122411.593486363@linutronix.de put_task_struct(tsk); } +diff --git a/kernel/fork.c b/kernel/fork.c +index 10885c649ca4..b46896abbbf5 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -289,7 +289,10 @@ static inline void free_thread_stack(str +@@ -289,7 +289,10 @@ static inline void free_thread_stack(struct task_struct *tsk) return; } @@ -47,9 +52,11 @@ Link: https://lore.kernel.org/r/20210928122411.593486363@linutronix.de return; } #endif +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index 2ff76391063e..8b626d40adc7 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4845,8 +4845,12 @@ static struct rq *finish_task_switch(str +@@ -4849,8 +4849,12 @@ static struct rq *finish_task_switch(struct task_struct *prev) if (prev->sched_class->task_dead) prev->sched_class->task_dead(prev); @@ -64,3 +71,6 @@ Link: https://lore.kernel.org/r/20210928122411.593486363@linutronix.de put_task_struct_rcu_user(prev); } +-- +2.33.1 + diff --git a/debian/patches-rt/0005_sched_move_mmdrop_to_rcu_on_rt.patch b/debian/patches-rt/0072-sched-Move-mmdrop-to-RCU-on-RT.patch index e0bb37a54..55eaf995d 100644 --- a/debian/patches-rt/0005_sched_move_mmdrop_to_rcu_on_rt.patch +++ b/debian/patches-rt/0072-sched-Move-mmdrop-to-RCU-on-RT.patch @@ -1,7 +1,8 @@ +From c75da95e84997f87d1a767be282be60b9ae74a67 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> -Subject: sched: Move mmdrop to RCU on RT Date: Tue, 28 Sep 2021 14:24:32 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 072/158] sched: Move mmdrop to RCU on RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz mmdrop() is invoked from finish_task_switch() by the incoming task to drop the mm which was handed over by the previous task. mmdrop() can be quite @@ -15,12 +16,14 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210928122411.648582026@linutronix.de --- - include/linux/mm_types.h | 4 ++++ - include/linux/sched/mm.h | 20 ++++++++++++++++++++ - kernel/fork.c | 13 +++++++++++++ - kernel/sched/core.c | 2 +- + include/linux/mm_types.h | 4 ++++ + include/linux/sched/mm.h | 20 ++++++++++++++++++++ + kernel/fork.c | 13 +++++++++++++ + kernel/sched/core.c | 2 +- 4 files changed, 38 insertions(+), 1 deletion(-) ---- + +diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h +index 7f8ee09c711f..e9672de22cf2 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -12,6 +12,7 @@ @@ -41,9 +44,11 @@ Link: https://lore.kernel.org/r/20210928122411.648582026@linutronix.de #ifdef CONFIG_HUGETLB_PAGE atomic_long_t hugetlb_usage; #endif +diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h +index 5561486fddef..8358352428d4 100644 --- a/include/linux/sched/mm.h +++ b/include/linux/sched/mm.h -@@ -49,6 +49,26 @@ static inline void mmdrop(struct mm_stru +@@ -49,6 +49,26 @@ static inline void mmdrop(struct mm_struct *mm) __mmdrop(mm); } @@ -70,6 +75,8 @@ Link: https://lore.kernel.org/r/20210928122411.648582026@linutronix.de /** * mmget() - Pin the address space associated with a &struct mm_struct. * @mm: The address space to pin. +diff --git a/kernel/fork.c b/kernel/fork.c +index b46896abbbf5..0aef8ad1028c 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -708,6 +708,19 @@ void __mmdrop(struct mm_struct *mm) @@ -92,9 +99,11 @@ Link: https://lore.kernel.org/r/20210928122411.648582026@linutronix.de static void mmdrop_async_fn(struct work_struct *work) { struct mm_struct *mm; +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index 8b626d40adc7..a203f2605d6d 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4839,7 +4839,7 @@ static struct rq *finish_task_switch(str +@@ -4843,7 +4843,7 @@ static struct rq *finish_task_switch(struct task_struct *prev) */ if (mm) { membarrier_mm_sync_core_before_usermode(mm); @@ -103,3 +112,6 @@ Link: https://lore.kernel.org/r/20210928122411.648582026@linutronix.de } if (unlikely(prev_state == TASK_DEAD)) { if (prev->sched_class->task_dead) +-- +2.33.1 + diff --git a/debian/patches-rt/cgroup__use_irqsave_in_cgroup_rstat_flush_locked.patch b/debian/patches-rt/0073-cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch index b381a2f81..c406a20cd 100644 --- a/debian/patches-rt/cgroup__use_irqsave_in_cgroup_rstat_flush_locked.patch +++ b/debian/patches-rt/0073-cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch @@ -1,9 +1,8 @@ -Subject: cgroup: use irqsave in cgroup_rstat_flush_locked() -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Tue Jul 3 18:19:48 2018 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 3dbfac31fe4f166a3558f7a9b138684bb18b74fc Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Tue, 3 Jul 2018 18:19:48 +0200 +Subject: [PATCH 073/158] cgroup: use irqsave in cgroup_rstat_flush_locked() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz All callers of cgroup_rstat_flush_locked() acquire cgroup_rstat_lock either with spin_lock_irq() or spin_lock_irqsave(). @@ -20,15 +19,15 @@ Acquire the raw_spin_lock_t with disabled interrupts. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://www.spinics.net/lists/cgroups/msg23051.html - - --- - kernel/cgroup/rstat.c | 5 +++-- + kernel/cgroup/rstat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---- + +diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c +index 1486768f2318..bb3b805436c4 100644 --- a/kernel/cgroup/rstat.c +++ b/kernel/cgroup/rstat.c -@@ -156,8 +156,9 @@ static void cgroup_rstat_flush_locked(st +@@ -156,8 +156,9 @@ static void cgroup_rstat_flush_locked(struct cgroup *cgrp, bool may_sleep) raw_spinlock_t *cpu_lock = per_cpu_ptr(&cgroup_rstat_cpu_lock, cpu); struct cgroup *pos = NULL; @@ -39,7 +38,7 @@ Link: https://www.spinics.net/lists/cgroups/msg23051.html while ((pos = cgroup_rstat_cpu_pop_updated(pos, cgrp, cpu))) { struct cgroup_subsys_state *css; -@@ -169,7 +170,7 @@ static void cgroup_rstat_flush_locked(st +@@ -169,7 +170,7 @@ static void cgroup_rstat_flush_locked(struct cgroup *cgrp, bool may_sleep) css->ss->css_rstat_flush(css, cpu); rcu_read_unlock(); } @@ -48,3 +47,6 @@ Link: https://www.spinics.net/lists/cgroups/msg23051.html /* if @may_sleep, play nice and yield if necessary */ if (may_sleep && (need_resched() || +-- +2.33.1 + diff --git a/debian/patches-rt/mm__workingset__replace_IRQ-off_check_with_a_lockdep_assert..patch b/debian/patches-rt/0074-mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch index c30695025..8de87b7c5 100644 --- a/debian/patches-rt/mm__workingset__replace_IRQ-off_check_with_a_lockdep_assert..patch +++ b/debian/patches-rt/0074-mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch @@ -1,9 +1,9 @@ -Subject: mm: workingset: replace IRQ-off check with a lockdep assert. -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Mon Feb 11 10:40:46 2019 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From c9c8652679a463545afae4d63f1f0c5c2710b51f Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Mon, 11 Feb 2019 10:40:46 +0100 +Subject: [PATCH 074/158] mm: workingset: replace IRQ-off check with a lockdep + assert. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Commit @@ -20,9 +20,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20190211113829.sqf6bdi4c4cdd3rp@linutronix.de --- - mm/workingset.c | 5 ++++- + mm/workingset.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---- + +diff --git a/mm/workingset.c b/mm/workingset.c +index d5b81e4f4cbe..d7ceee62e3c6 100644 --- a/mm/workingset.c +++ b/mm/workingset.c @@ -433,6 +433,8 @@ static struct list_lru shadow_nodes; @@ -34,7 +36,7 @@ Link: https://lkml.kernel.org/r/20190211113829.sqf6bdi4c4cdd3rp@linutronix.de /* * Track non-empty nodes that contain only shadow entries; * unlink those that contain pages or are being freed. -@@ -441,7 +443,8 @@ void workingset_update_node(struct xa_no +@@ -441,7 +443,8 @@ void workingset_update_node(struct xa_node *node) * already where they should be. The list_empty() test is safe * as node->private_list is protected by the i_pages lock. */ @@ -44,3 +46,6 @@ Link: https://lkml.kernel.org/r/20190211113829.sqf6bdi4c4cdd3rp@linutronix.de if (node->count && node->count == node->nr_values) { if (list_empty(&node->private_list)) { +-- +2.33.1 + diff --git a/debian/patches-rt/tcp__Remove_superfluous_BH-disable_around_listening_hash.patch b/debian/patches-rt/0075-tcp-Remove-superfluous-BH-disable-around-listening_h.patch index 013ac2413..05cfaa41e 100644 --- a/debian/patches-rt/tcp__Remove_superfluous_BH-disable_around_listening_hash.patch +++ b/debian/patches-rt/0075-tcp-Remove-superfluous-BH-disable-around-listening_h.patch @@ -1,9 +1,9 @@ -Subject: tcp: Remove superfluous BH-disable around listening_hash -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Mon Oct 12 17:33:54 2020 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 2433aab7dcd46e02402058f450b7efeb8724c93e Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Mon, 12 Oct 2020 17:33:54 +0200 +Subject: [PATCH 075/158] tcp: Remove superfluous BH-disable around + listening_hash +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Commit 9652dc2eb9e40 ("tcp: relax listening_hash operations") @@ -21,16 +21,16 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/linux-rt-users/12d6f9879a97cd56c09fb53dee343cbb14f7f1f7.camel@gmx.de/ Link: https://lkml.kernel.org/r/X9CheYjuXWc75Spa@hirez.programming.kicks-ass.net - - --- - net/ipv4/inet_hashtables.c | 19 ++++++++++++------- - net/ipv6/inet6_hashtables.c | 5 +---- + net/ipv4/inet_hashtables.c | 19 ++++++++++++------- + net/ipv6/inet6_hashtables.c | 5 +---- 2 files changed, 13 insertions(+), 11 deletions(-) ---- + +diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c +index 75737267746f..e460c84b1f8e 100644 --- a/net/ipv4/inet_hashtables.c +++ b/net/ipv4/inet_hashtables.c -@@ -637,7 +637,9 @@ int __inet_hash(struct sock *sk, struct +@@ -637,7 +637,9 @@ int __inet_hash(struct sock *sk, struct sock *osk) int err = 0; if (sk->sk_state != TCP_LISTEN) { @@ -88,6 +88,8 @@ Link: https://lkml.kernel.org/r/X9CheYjuXWc75Spa@hirez.programming.kicks-ass.net } EXPORT_SYMBOL_GPL(inet_unhash); +diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c +index 67c9114835c8..0a2e7f228391 100644 --- a/net/ipv6/inet6_hashtables.c +++ b/net/ipv6/inet6_hashtables.c @@ -333,11 +333,8 @@ int inet6_hash(struct sock *sk) @@ -103,3 +105,6 @@ Link: https://lkml.kernel.org/r/X9CheYjuXWc75Spa@hirez.programming.kicks-ass.net return err; } +-- +2.33.1 + diff --git a/debian/patches-rt/jump-label__disable_if_stop_machine_is_used.patch b/debian/patches-rt/0076-jump-label-disable-if-stop_machine-is-used.patch index b1ae32470..809ced9fd 100644 --- a/debian/patches-rt/jump-label__disable_if_stop_machine_is_used.patch +++ b/debian/patches-rt/0076-jump-label-disable-if-stop_machine-is-used.patch @@ -1,9 +1,8 @@ -Subject: jump-label: disable if stop_machine() is used -From: Thomas Gleixner <tglx@linutronix.de> -Date: Wed Jul 8 17:14:48 2015 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 2e5117b6faafd48b5753be6c5c41b00402234261 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Wed, 8 Jul 2015 17:14:48 +0200 +Subject: [PATCH 076/158] jump-label: disable if stop_machine() is used +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Some architectures are using stop_machine() while switching the opcode which leads to latency spikes. @@ -22,12 +21,12 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> [bigeasy: only ARM for now] Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/arm/Kconfig | 2 +- + arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---- + +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 4ebd512043be..ff38750ee503 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -68,7 +68,7 @@ config ARM @@ -39,3 +38,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32 && MMU select HAVE_ARCH_KASAN if MMU && !XIP_KERNEL select HAVE_ARCH_MMAP_RND_BITS if MMU +-- +2.33.1 + diff --git a/debian/patches-rt/locking-Remove-rt_rwlock_is_contended.patch b/debian/patches-rt/0077-locking-Remove-rt_rwlock_is_contended.patch index 43b227a54..cb95818dc 100644 --- a/debian/patches-rt/locking-Remove-rt_rwlock_is_contended.patch +++ b/debian/patches-rt/0077-locking-Remove-rt_rwlock_is_contended.patch @@ -1,7 +1,8 @@ +From 0377d578d9cc08ea35846df61b2649109810c895 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 7 Sep 2021 12:11:47 +0200 -Subject: [PATCH] locking: Remove rt_rwlock_is_contended() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 077/158] locking: Remove rt_rwlock_is_contended() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz rt_rwlock_is_contended() has not users. It makes no sense to use it as rwlock_is_contended() because it is a sleeping lock on RT and preemption @@ -14,12 +15,14 @@ Remove rt_rwlock_is_contended(). Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - kernel/locking/spinlock_rt.c | 6 ------ + kernel/locking/spinlock_rt.c | 6 ------ 1 file changed, 6 deletions(-) +diff --git a/kernel/locking/spinlock_rt.c b/kernel/locking/spinlock_rt.c +index b2e553f9255b..9e396a09fe0f 100644 --- a/kernel/locking/spinlock_rt.c +++ b/kernel/locking/spinlock_rt.c -@@ -257,12 +257,6 @@ void __sched rt_write_unlock(rwlock_t *r +@@ -257,12 +257,6 @@ void __sched rt_write_unlock(rwlock_t *rwlock) } EXPORT_SYMBOL(rt_write_unlock); @@ -32,3 +35,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #ifdef CONFIG_DEBUG_LOCK_ALLOC void __rt_rwlock_init(rwlock_t *rwlock, const char *name, struct lock_class_key *key) +-- +2.33.1 + diff --git a/debian/patches-rt/lockdep-selftests-Avoid-using-local_lock_-acquire-re.patch b/debian/patches-rt/0078-lockdep-selftests-Avoid-using-local_lock_-acquire-re.patch index 85080c3a1..8087d95bf 100644 --- a/debian/patches-rt/lockdep-selftests-Avoid-using-local_lock_-acquire-re.patch +++ b/debian/patches-rt/0078-lockdep-selftests-Avoid-using-local_lock_-acquire-re.patch @@ -1,8 +1,9 @@ +From 05929527d0292a8b3703db8ae321fff98da4116c Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 13 Aug 2021 18:26:10 +0200 -Subject: [PATCH] lockdep/selftests: Avoid using +Subject: [PATCH 078/158] lockdep/selftests: Avoid using local_lock_{acquire|release}(). -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The functions local_lock related functions local_lock_acquire() @@ -14,9 +15,11 @@ can be used. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - lib/locking-selftest.c | 30 +++++++++++++++--------------- + lib/locking-selftest.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) +diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c +index 161108e5d2fe..d5a4fea039b6 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c @@ -139,7 +139,7 @@ static DEFINE_RT_MUTEX(rtmutex_Z2); @@ -28,7 +31,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * non-inlined runtime initializers, to let separate locks share -@@ -1320,7 +1320,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_read_ +@@ -1320,7 +1320,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion3_soft_wlock) # define I_MUTEX(x) lockdep_reset_lock(&mutex_##x.dep_map) # define I_RWSEM(x) lockdep_reset_lock(&rwsem_##x.dep_map) # define I_WW(x) lockdep_reset_lock(&x.dep_map) @@ -114,3 +117,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> spin_unlock(&lock_A); HARDIRQ_ENABLE(); +-- +2.33.1 + diff --git a/debian/patches-rt/0001-sched-Trigger-warning-if-migration_disabled-counter-.patch b/debian/patches-rt/0079-sched-Trigger-warning-if-migration_disabled-counter-.patch index 158e7aa70..4b01e0e99 100644 --- a/debian/patches-rt/0001-sched-Trigger-warning-if-migration_disabled-counter-.patch +++ b/debian/patches-rt/0079-sched-Trigger-warning-if-migration_disabled-counter-.patch @@ -1,8 +1,9 @@ +From f0198951a842c665cf423b82e969dd80d6f9b9a7 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 12 Aug 2021 14:40:05 +0200 -Subject: [PATCH 01/10] sched: Trigger warning if ->migration_disabled counter - underflows. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 079/158] sched: Trigger warning if ->migration_disabled + counter underflows. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz If migrate_enable() is used more often than its counter part then it remains undetected and rq::nr_pinned will underflow, too. @@ -12,9 +13,11 @@ migrate_disable(). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - kernel/sched/core.c | 2 ++ + kernel/sched/core.c | 2 ++ 1 file changed, 2 insertions(+) +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index a203f2605d6d..2d7cf80d95d9 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2152,6 +2152,8 @@ void migrate_enable(void) @@ -26,3 +29,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } /* +-- +2.33.1 + diff --git a/debian/patches-rt/0003-rtmutex-Add-a-special-case-for-ww-mutex-handling.patch b/debian/patches-rt/0080-rtmutex-Add-a-special-case-for-ww-mutex-handling.patch index 017012785..6c2a756b1 100644 --- a/debian/patches-rt/0003-rtmutex-Add-a-special-case-for-ww-mutex-handling.patch +++ b/debian/patches-rt/0080-rtmutex-Add-a-special-case-for-ww-mutex-handling.patch @@ -1,7 +1,8 @@ +From a2f7a496ecf1fc7afe5f70a3a471d8c21bb36f11 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 13 Aug 2021 12:40:49 +0200 -Subject: [PATCH 03/10] rtmutex: Add a special case for ww-mutex handling. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 080/158] rtmutex: Add a special case for ww-mutex handling. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The lockdep selftest for ww-mutex assumes in a few cases the ww_ctx->contending_lock assignment via __ww_mutex_check_kill() which @@ -13,12 +14,14 @@ single one. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - kernel/locking/rtmutex.c | 20 +++++++++++++++++++- + kernel/locking/rtmutex.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) +diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c +index 6bb116c559b4..3665583361c0 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c -@@ -1097,8 +1097,26 @@ static int __sched task_blocks_on_rt_mut +@@ -1097,8 +1097,26 @@ static int __sched task_blocks_on_rt_mutex(struct rt_mutex_base *lock, * which is wrong, as the other waiter is not in a deadlock * situation. */ @@ -46,3 +49,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> raw_spin_lock(&task->pi_lock); waiter->task = task; +-- +2.33.1 + diff --git a/debian/patches-rt/0004-rtmutex-Add-rt_mutex_lock_nest_lock-and-rt_mutex_loc.patch b/debian/patches-rt/0081-rtmutex-Add-rt_mutex_lock_nest_lock-and-rt_mutex_loc.patch index e0db57bfa..e85b8c88c 100644 --- a/debian/patches-rt/0004-rtmutex-Add-rt_mutex_lock_nest_lock-and-rt_mutex_loc.patch +++ b/debian/patches-rt/0081-rtmutex-Add-rt_mutex_lock_nest_lock-and-rt_mutex_loc.patch @@ -1,8 +1,9 @@ +From db5ef2f66ddae88b6b4e8901f49572251fee5d25 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 13 Aug 2021 13:49:49 +0200 -Subject: [PATCH 04/10] rtmutex: Add rt_mutex_lock_nest_lock() and +Subject: [PATCH 081/158] rtmutex: Add rt_mutex_lock_nest_lock() and rt_mutex_lock_killable(). -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The locking selftest for ww-mutex expects to operate directly on the base-mutex which becomes a rtmutex on PREEMPT_RT. @@ -13,13 +14,15 @@ Add rt_mutex_lock_killable(), follows mutex_lock_killable() for rtmutex. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - include/linux/rtmutex.h | 9 +++++++++ - kernel/locking/rtmutex_api.c | 30 ++++++++++++++++++++++++++---- + include/linux/rtmutex.h | 9 +++++++++ + kernel/locking/rtmutex_api.c | 30 ++++++++++++++++++++++++++---- 2 files changed, 35 insertions(+), 4 deletions(-) +diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h +index 9deedfeec2b1..7d049883a08a 100644 --- a/include/linux/rtmutex.h +++ b/include/linux/rtmutex.h -@@ -99,13 +99,22 @@ extern void __rt_mutex_init(struct rt_mu +@@ -99,13 +99,22 @@ extern void __rt_mutex_init(struct rt_mutex *lock, const char *name, struct lock #ifdef CONFIG_DEBUG_LOCK_ALLOC extern void rt_mutex_lock_nested(struct rt_mutex *lock, unsigned int subclass); @@ -42,6 +45,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> extern int rt_mutex_trylock(struct rt_mutex *lock); extern void rt_mutex_unlock(struct rt_mutex *lock); +diff --git a/kernel/locking/rtmutex_api.c b/kernel/locking/rtmutex_api.c +index 5c9299aaabae..900220941caa 100644 --- a/kernel/locking/rtmutex_api.c +++ b/kernel/locking/rtmutex_api.c @@ -21,12 +21,13 @@ int max_lock_depth = 1024; @@ -86,7 +91,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } EXPORT_SYMBOL_GPL(rt_mutex_lock); #endif -@@ -77,11 +84,26 @@ EXPORT_SYMBOL_GPL(rt_mutex_lock); +@@ -77,10 +84,25 @@ EXPORT_SYMBOL_GPL(rt_mutex_lock); */ int __sched rt_mutex_lock_interruptible(struct rt_mutex *lock) { @@ -95,7 +100,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } EXPORT_SYMBOL_GPL(rt_mutex_lock_interruptible); - /** ++/** + * rt_mutex_lock_killable - lock a rt_mutex killable + * + * @lock: the rt_mutex to be locked @@ -110,7 +115,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +} +EXPORT_SYMBOL_GPL(rt_mutex_lock_killable); + -+/** + /** * rt_mutex_trylock - try to lock a rt_mutex * - * @lock: the rt_mutex to be locked +-- +2.33.1 + diff --git a/debian/patches-rt/0005-lockdep-Make-it-RT-aware.patch b/debian/patches-rt/0082-lockdep-Make-it-RT-aware.patch index 7ee8e296c..0425bd6ab 100644 --- a/debian/patches-rt/0005-lockdep-Make-it-RT-aware.patch +++ b/debian/patches-rt/0082-lockdep-Make-it-RT-aware.patch @@ -1,7 +1,8 @@ +From b0531b830a7e03eb59bdf95f4a2a77c85280e92e Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 17 Jul 2011 18:51:23 +0200 -Subject: [PATCH 05/10] lockdep: Make it RT aware -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 082/158] lockdep: Make it RT aware +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz There is not really a softirq context on PREEMPT_RT. Softirqs on PREEMPT_RT are always invoked within the context of a threaded @@ -17,10 +18,12 @@ Teach lockdep that we don't really do softirqs on -RT. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- - include/linux/irqflags.h | 23 +++++++++++++++-------- - kernel/locking/lockdep.c | 2 ++ + include/linux/irqflags.h | 23 +++++++++++++++-------- + kernel/locking/lockdep.c | 2 ++ 2 files changed, 17 insertions(+), 8 deletions(-) +diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h +index 600c10da321a..4b140938b03e 100644 --- a/include/linux/irqflags.h +++ b/include/linux/irqflags.h @@ -71,14 +71,6 @@ do { \ @@ -60,9 +63,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #if defined(CONFIG_IRQSOFF_TRACER) || \ defined(CONFIG_PREEMPT_TRACER) extern void stop_critical_timings(void); +diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c +index d624231eab2b..823624b80b45 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c -@@ -5473,6 +5473,7 @@ static noinstr void check_flags(unsigned +@@ -5473,6 +5473,7 @@ static noinstr void check_flags(unsigned long flags) } } @@ -70,7 +75,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * We dont accurately track softirq state in e.g. * hardirq contexts (such as on 4KSTACKS), so only -@@ -5487,6 +5488,7 @@ static noinstr void check_flags(unsigned +@@ -5487,6 +5488,7 @@ static noinstr void check_flags(unsigned long flags) DEBUG_LOCKS_WARN_ON(!current->softirqs_enabled); } } @@ -78,3 +83,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (!debug_locks) print_irqtrace_events(current); +-- +2.33.1 + diff --git a/debian/patches-rt/0006-lockdep-selftests-Add-rtmutex-to-the-last-column.patch b/debian/patches-rt/0083-lockdep-selftests-Add-rtmutex-to-the-last-column.patch index 75879101f..cfccff010 100644 --- a/debian/patches-rt/0006-lockdep-selftests-Add-rtmutex-to-the-last-column.patch +++ b/debian/patches-rt/0083-lockdep-selftests-Add-rtmutex-to-the-last-column.patch @@ -1,16 +1,19 @@ +From 3387320ea84975ad97afe94232137ef0e46bb9e0 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 12 Aug 2021 16:16:54 +0200 -Subject: [PATCH 06/10] lockdep/selftests: Add rtmutex to the last column -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 083/158] lockdep/selftests: Add rtmutex to the last column +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The last column contains the results for the rtmutex tests. Add it. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - lib/locking-selftest.c | 2 +- + lib/locking-selftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c +index d5a4fea039b6..d4ced8b144c8 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c @@ -2812,7 +2812,7 @@ void locking_selftest(void) @@ -22,3 +25,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> printk(" --------------------------------------------------------------------------\n"); init_shared_classes(); +-- +2.33.1 + diff --git a/debian/patches-rt/0007-lockdep-selftests-Unbalanced-migrate_disable-rcu_rea.patch b/debian/patches-rt/0084-lockdep-selftests-Unbalanced-migrate_disable-rcu_rea.patch index 81a042c22..d0d087b6f 100644 --- a/debian/patches-rt/0007-lockdep-selftests-Unbalanced-migrate_disable-rcu_rea.patch +++ b/debian/patches-rt/0084-lockdep-selftests-Unbalanced-migrate_disable-rcu_rea.patch @@ -1,8 +1,9 @@ +From ed10bca58d74897647d4b3d77b3be414d7c846c2 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 12 Aug 2021 14:25:38 +0200 -Subject: [PATCH 07/10] lockdep/selftests: Unbalanced migrate_disable() & +Subject: [PATCH 084/158] lockdep/selftests: Unbalanced migrate_disable() & rcu_read_lock() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The tests with unbalanced lock() + unlock() operation leave a modified preemption counter behind which is then reset to its original value @@ -23,9 +24,11 @@ become balanced after the double unlock. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - lib/locking-selftest.c | 26 +++++++++++++++++++++++++- + lib/locking-selftest.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) +diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c +index d4ced8b144c8..d43d552f5b6f 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c @@ -712,12 +712,18 @@ GENERATE_TESTCASE(ABCDBCDA_rtmutex); @@ -62,7 +65,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> WARN_ON(irqs_disabled()); -@@ -1432,6 +1444,18 @@ static void dotest(void (*testcase_fn)(v +@@ -1432,6 +1444,18 @@ static void dotest(void (*testcase_fn)(void), int expected, int lockclass_mask) * count, so restore it: */ preempt_count_set(saved_preempt_count); @@ -81,3 +84,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #ifdef CONFIG_TRACE_IRQFLAGS if (softirq_count()) current->softirqs_enabled = 0; +-- +2.33.1 + diff --git a/debian/patches-rt/0008-lockdep-selftests-Skip-the-softirq-related-tests-on-.patch b/debian/patches-rt/0085-lockdep-selftests-Skip-the-softirq-related-tests-on-.patch index 21137ae06..360cf0f09 100644 --- a/debian/patches-rt/0008-lockdep-selftests-Skip-the-softirq-related-tests-on-.patch +++ b/debian/patches-rt/0085-lockdep-selftests-Skip-the-softirq-related-tests-on-.patch @@ -1,8 +1,9 @@ +From 8fb40dbed2e1f3ee312e04ac70c62d0ff86e1ab6 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 12 Aug 2021 16:02:29 +0200 -Subject: [PATCH 08/10] lockdep/selftests: Skip the softirq related tests on +Subject: [PATCH 085/158] lockdep/selftests: Skip the softirq related tests on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The softirq context on PREEMPT_RT is different compared to !PREEMPT_RT. As such lockdep_softirq_enter() is a nop and the all the "softirq safe" @@ -12,9 +13,11 @@ Skip the softirq context tests on PREEMPT_RT. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - lib/locking-selftest.c | 38 +++++++++++++++++++++++++++++++------- + lib/locking-selftest.c | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) +diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c +index d43d552f5b6f..b19006931f13 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c @@ -26,6 +26,12 @@ @@ -30,7 +33,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Change this to 1 if you want to see the failure printouts: */ -@@ -808,6 +814,7 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_ +@@ -808,6 +814,7 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_rlock) #include "locking-selftest-wlock-hardirq.h" GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_wlock) @@ -38,7 +41,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #include "locking-selftest-spin-softirq.h" GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_soft_spin) -@@ -816,10 +823,12 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_ +@@ -816,10 +823,12 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_soft_rlock) #include "locking-selftest-wlock-softirq.h" GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_soft_wlock) @@ -51,7 +54,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Enabling hardirqs with a softirq-safe lock held: */ -@@ -852,6 +861,8 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2A +@@ -852,6 +861,8 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2A_rlock) #undef E1 #undef E2 @@ -60,7 +63,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Enabling irqs with an irq-safe lock held: */ -@@ -881,6 +892,7 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B +@@ -881,6 +892,7 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_rlock) #include "locking-selftest-wlock-hardirq.h" GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_wlock) @@ -68,7 +71,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #include "locking-selftest-spin-softirq.h" GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_spin) -@@ -889,6 +901,7 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B +@@ -889,6 +901,7 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_rlock) #include "locking-selftest-wlock-softirq.h" GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_wlock) @@ -76,7 +79,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #undef E1 #undef E2 -@@ -927,6 +940,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_ +@@ -927,6 +940,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_rlock) #include "locking-selftest-wlock-hardirq.h" GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_wlock) @@ -84,7 +87,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #include "locking-selftest-spin-softirq.h" GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_spin) -@@ -935,6 +949,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_ +@@ -935,6 +949,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_rlock) #include "locking-selftest-wlock-softirq.h" GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_wlock) @@ -92,7 +95,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #undef E1 #undef E2 -@@ -975,6 +990,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_ +@@ -975,6 +990,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_rlock) #include "locking-selftest-wlock-hardirq.h" GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_wlock) @@ -100,7 +103,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #include "locking-selftest-spin-softirq.h" GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_soft_spin) -@@ -983,6 +999,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_ +@@ -983,6 +999,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_soft_rlock) #include "locking-selftest-wlock-softirq.h" GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_soft_wlock) @@ -108,7 +111,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #undef E1 #undef E2 -@@ -1037,6 +1054,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_inver +@@ -1037,6 +1054,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_hard_rlock) #include "locking-selftest-wlock-hardirq.h" GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_hard_wlock) @@ -116,7 +119,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #include "locking-selftest-spin-softirq.h" GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_soft_spin) -@@ -1045,6 +1063,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_inver +@@ -1045,6 +1063,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_soft_rlock) #include "locking-selftest-wlock-softirq.h" GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_soft_wlock) @@ -124,7 +127,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #undef E1 #undef E2 -@@ -1212,12 +1231,14 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_read_ +@@ -1212,12 +1231,14 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion_hard_rlock) #include "locking-selftest-wlock.h" GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion_hard_wlock) @@ -139,7 +142,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #undef E1 #undef E2 -@@ -1258,12 +1279,14 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_read_ +@@ -1258,12 +1279,14 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion2_hard_rlock) #include "locking-selftest-wlock.h" GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion2_hard_wlock) @@ -154,7 +157,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #undef E1 #undef E2 -@@ -1312,12 +1335,14 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_read_ +@@ -1312,12 +1335,14 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion3_hard_rlock) #include "locking-selftest-wlock.h" GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion3_hard_wlock) @@ -169,7 +172,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #ifdef CONFIG_DEBUG_LOCK_ALLOC # define I_SPINLOCK(x) lockdep_reset_lock(&lock_##x.dep_map) -@@ -1523,7 +1548,7 @@ static inline void print_testname(const +@@ -1523,7 +1548,7 @@ static inline void print_testname(const char *testname) #define DO_TESTCASE_2x2RW(desc, name, nr) \ DO_TESTCASE_2RW("hard-"desc, name##_hard, nr) \ @@ -178,7 +181,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #define DO_TESTCASE_6x2x2RW(desc, name) \ DO_TESTCASE_2x2RW(desc, name, 123); \ -@@ -1571,19 +1596,19 @@ static inline void print_testname(const +@@ -1571,19 +1596,19 @@ static inline void print_testname(const char *testname) #define DO_TESTCASE_2I(desc, name, nr) \ DO_TESTCASE_1("hard-"desc, name##_hard, nr); \ @@ -216,3 +219,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> DO_TESTCASE_2x6("safe-A + irqs-on", irqsafe2B); DO_TESTCASE_6x6("safe-A + unsafe-B #1", irqsafe3); DO_TESTCASE_6x6("safe-A + unsafe-B #2", irqsafe4); +-- +2.33.1 + diff --git a/debian/patches-rt/0010-lockdep-selftests-Adapt-ww-tests-for-PREEMPT_RT.patch b/debian/patches-rt/0086-lockdep-selftests-Adapt-ww-tests-for-PREEMPT_RT.patch index 7ad99f0ee..2c7dda7b4 100644 --- a/debian/patches-rt/0010-lockdep-selftests-Adapt-ww-tests-for-PREEMPT_RT.patch +++ b/debian/patches-rt/0086-lockdep-selftests-Adapt-ww-tests-for-PREEMPT_RT.patch @@ -1,7 +1,8 @@ +From 65c837307de0afef86eb7e4f333334f9ff324fcd Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 12 Aug 2021 18:13:39 +0200 -Subject: [PATCH 10/10] lockdep/selftests: Adapt ww-tests for PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 086/158] lockdep/selftests: Adapt ww-tests for PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The ww-mutex selftest operates directly on ww_mutex::base and assumes its type is struct mutex. This isn't true on PREEMPT_RT which turns the @@ -15,9 +16,11 @@ assignment is required in order to pass the tests. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - lib/locking-selftest.c | 74 +++++++++++++++++++++++++++++-------------------- + lib/locking-selftest.c | 74 +++++++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 30 deletions(-) +diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c +index b19006931f13..1266ea3726d7 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c @@ -1700,6 +1700,20 @@ static void ww_test_fail_acquire(void) @@ -132,7 +135,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> WWU(&o); WWL(&o2, &t); -@@ -1860,7 +1874,7 @@ static void ww_test_edeadlk_normal_slow( +@@ -1860,7 +1874,7 @@ static void ww_test_edeadlk_normal_slow(void) { int ret; @@ -141,7 +144,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> mutex_release(&o2.base.dep_map, _THIS_IP_); o2.ctx = &t2; -@@ -1876,7 +1890,7 @@ static void ww_test_edeadlk_normal_slow( +@@ -1876,7 +1890,7 @@ static void ww_test_edeadlk_normal_slow(void) o2.ctx = NULL; mutex_acquire(&o2.base.dep_map, 0, 1, _THIS_IP_); @@ -150,7 +153,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> WWU(&o); ww_mutex_lock_slow(&o2, &t); -@@ -1886,7 +1900,7 @@ static void ww_test_edeadlk_no_unlock(vo +@@ -1886,7 +1900,7 @@ static void ww_test_edeadlk_no_unlock(void) { int ret; @@ -159,7 +162,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> o2.ctx = &t2; mutex_release(&o2.base.dep_map, _THIS_IP_); -@@ -1902,7 +1916,7 @@ static void ww_test_edeadlk_no_unlock(vo +@@ -1902,7 +1916,7 @@ static void ww_test_edeadlk_no_unlock(void) o2.ctx = NULL; mutex_acquire(&o2.base.dep_map, 0, 1, _THIS_IP_); @@ -168,7 +171,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> WWL(&o2, &t); } -@@ -1911,7 +1925,7 @@ static void ww_test_edeadlk_no_unlock_sl +@@ -1911,7 +1925,7 @@ static void ww_test_edeadlk_no_unlock_slow(void) { int ret; @@ -177,7 +180,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> mutex_release(&o2.base.dep_map, _THIS_IP_); o2.ctx = &t2; -@@ -1927,7 +1941,7 @@ static void ww_test_edeadlk_no_unlock_sl +@@ -1927,7 +1941,7 @@ static void ww_test_edeadlk_no_unlock_slow(void) o2.ctx = NULL; mutex_acquire(&o2.base.dep_map, 0, 1, _THIS_IP_); @@ -186,7 +189,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ww_mutex_lock_slow(&o2, &t); } -@@ -1936,7 +1950,7 @@ static void ww_test_edeadlk_acquire_more +@@ -1936,7 +1950,7 @@ static void ww_test_edeadlk_acquire_more(void) { int ret; @@ -195,7 +198,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> mutex_release(&o2.base.dep_map, _THIS_IP_); o2.ctx = &t2; -@@ -1957,7 +1971,7 @@ static void ww_test_edeadlk_acquire_more +@@ -1957,7 +1971,7 @@ static void ww_test_edeadlk_acquire_more_slow(void) { int ret; @@ -204,7 +207,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> mutex_release(&o2.base.dep_map, _THIS_IP_); o2.ctx = &t2; -@@ -1978,11 +1992,11 @@ static void ww_test_edeadlk_acquire_more +@@ -1978,11 +1992,11 @@ static void ww_test_edeadlk_acquire_more_edeadlk(void) { int ret; @@ -218,7 +221,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> mutex_release(&o3.base.dep_map, _THIS_IP_); o3.ctx = &t2; -@@ -2004,11 +2018,11 @@ static void ww_test_edeadlk_acquire_more +@@ -2004,11 +2018,11 @@ static void ww_test_edeadlk_acquire_more_edeadlk_slow(void) { int ret; @@ -232,7 +235,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> mutex_release(&o3.base.dep_map, _THIS_IP_); o3.ctx = &t2; -@@ -2029,7 +2043,7 @@ static void ww_test_edeadlk_acquire_wron +@@ -2029,7 +2043,7 @@ static void ww_test_edeadlk_acquire_wrong(void) { int ret; @@ -241,7 +244,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> mutex_release(&o2.base.dep_map, _THIS_IP_); o2.ctx = &t2; -@@ -2054,7 +2068,7 @@ static void ww_test_edeadlk_acquire_wron +@@ -2054,7 +2068,7 @@ static void ww_test_edeadlk_acquire_wrong_slow(void) { int ret; @@ -250,3 +253,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> mutex_release(&o2.base.dep_map, _THIS_IP_); o2.ctx = &t2; +-- +2.33.1 + diff --git a/debian/patches-rt/locking-Allow-to-include-asm-spinlock_types.h-from-l.patch b/debian/patches-rt/0087-locking-Allow-to-include-asm-spinlock_types.h-from-l.patch index 7bf7c3ec2..7f1ce185c 100644 --- a/debian/patches-rt/locking-Allow-to-include-asm-spinlock_types.h-from-l.patch +++ b/debian/patches-rt/0087-locking-Allow-to-include-asm-spinlock_types.h-from-l.patch @@ -1,11 +1,12 @@ +From 8927f7481eacffd4465457adeb3343ab4f4f4a50 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 17 Aug 2021 09:48:31 +0200 -Subject: [PATCH] locking: Allow to include asm/spinlock_types.h from +Subject: [PATCH 087/158] locking: Allow to include asm/spinlock_types.h from linux/spinlock_types_raw.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The printk header file includes ratelimit_types.h for its __ratelimit() based usage. It requires it for the static initializer used in @@ -94,22 +95,24 @@ include. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - arch/alpha/include/asm/spinlock_types.h | 2 +- - arch/arm/include/asm/spinlock_types.h | 2 +- - arch/arm64/include/asm/spinlock_types.h | 2 +- - arch/csky/include/asm/spinlock_types.h | 2 +- - arch/hexagon/include/asm/spinlock_types.h | 2 +- - arch/ia64/include/asm/spinlock_types.h | 2 +- - arch/powerpc/include/asm/simple_spinlock_types.h | 2 +- - arch/powerpc/include/asm/spinlock_types.h | 2 +- - arch/riscv/include/asm/spinlock_types.h | 2 +- - arch/s390/include/asm/spinlock_types.h | 2 +- - arch/sh/include/asm/spinlock_types.h | 2 +- - arch/xtensa/include/asm/spinlock_types.h | 2 +- - include/linux/ratelimit_types.h | 2 +- - include/linux/spinlock_types_up.h | 2 +- + arch/alpha/include/asm/spinlock_types.h | 2 +- + arch/arm/include/asm/spinlock_types.h | 2 +- + arch/arm64/include/asm/spinlock_types.h | 2 +- + arch/csky/include/asm/spinlock_types.h | 2 +- + arch/hexagon/include/asm/spinlock_types.h | 2 +- + arch/ia64/include/asm/spinlock_types.h | 2 +- + arch/powerpc/include/asm/simple_spinlock_types.h | 2 +- + arch/powerpc/include/asm/spinlock_types.h | 2 +- + arch/riscv/include/asm/spinlock_types.h | 2 +- + arch/s390/include/asm/spinlock_types.h | 2 +- + arch/sh/include/asm/spinlock_types.h | 2 +- + arch/xtensa/include/asm/spinlock_types.h | 2 +- + include/linux/ratelimit_types.h | 2 +- + include/linux/spinlock_types_up.h | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) +diff --git a/arch/alpha/include/asm/spinlock_types.h b/arch/alpha/include/asm/spinlock_types.h +index 1d5716bc060b..2526fd3be5fd 100644 --- a/arch/alpha/include/asm/spinlock_types.h +++ b/arch/alpha/include/asm/spinlock_types.h @@ -2,7 +2,7 @@ @@ -121,6 +124,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # error "please don't include this file directly" #endif +diff --git a/arch/arm/include/asm/spinlock_types.h b/arch/arm/include/asm/spinlock_types.h +index 5976958647fe..0c14b36ef101 100644 --- a/arch/arm/include/asm/spinlock_types.h +++ b/arch/arm/include/asm/spinlock_types.h @@ -2,7 +2,7 @@ @@ -132,6 +137,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # error "please don't include this file directly" #endif +diff --git a/arch/arm64/include/asm/spinlock_types.h b/arch/arm64/include/asm/spinlock_types.h +index 18782f0c4721..11ab1c077697 100644 --- a/arch/arm64/include/asm/spinlock_types.h +++ b/arch/arm64/include/asm/spinlock_types.h @@ -5,7 +5,7 @@ @@ -143,6 +150,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # error "please don't include this file directly" #endif +diff --git a/arch/csky/include/asm/spinlock_types.h b/arch/csky/include/asm/spinlock_types.h +index 8ff0f6ff3a00..db87a12c3827 100644 --- a/arch/csky/include/asm/spinlock_types.h +++ b/arch/csky/include/asm/spinlock_types.h @@ -3,7 +3,7 @@ @@ -154,6 +163,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # error "please don't include this file directly" #endif +diff --git a/arch/hexagon/include/asm/spinlock_types.h b/arch/hexagon/include/asm/spinlock_types.h +index 19d233497ba5..d5f66495b670 100644 --- a/arch/hexagon/include/asm/spinlock_types.h +++ b/arch/hexagon/include/asm/spinlock_types.h @@ -8,7 +8,7 @@ @@ -165,6 +176,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # error "please don't include this file directly" #endif +diff --git a/arch/ia64/include/asm/spinlock_types.h b/arch/ia64/include/asm/spinlock_types.h +index 6e345fefcdca..14b8a161c165 100644 --- a/arch/ia64/include/asm/spinlock_types.h +++ b/arch/ia64/include/asm/spinlock_types.h @@ -2,7 +2,7 @@ @@ -176,6 +189,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # error "please don't include this file directly" #endif +diff --git a/arch/powerpc/include/asm/simple_spinlock_types.h b/arch/powerpc/include/asm/simple_spinlock_types.h +index 0f3cdd8faa95..08243338069d 100644 --- a/arch/powerpc/include/asm/simple_spinlock_types.h +++ b/arch/powerpc/include/asm/simple_spinlock_types.h @@ -2,7 +2,7 @@ @@ -187,6 +202,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # error "please don't include this file directly" #endif +diff --git a/arch/powerpc/include/asm/spinlock_types.h b/arch/powerpc/include/asm/spinlock_types.h +index c5d742f18021..d5f8a74ed2e8 100644 --- a/arch/powerpc/include/asm/spinlock_types.h +++ b/arch/powerpc/include/asm/spinlock_types.h @@ -2,7 +2,7 @@ @@ -198,6 +215,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # error "please don't include this file directly" #endif +diff --git a/arch/riscv/include/asm/spinlock_types.h b/arch/riscv/include/asm/spinlock_types.h +index f398e7638dd6..5a35a49505da 100644 --- a/arch/riscv/include/asm/spinlock_types.h +++ b/arch/riscv/include/asm/spinlock_types.h @@ -6,7 +6,7 @@ @@ -209,6 +228,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # error "please don't include this file directly" #endif +diff --git a/arch/s390/include/asm/spinlock_types.h b/arch/s390/include/asm/spinlock_types.h +index a2bbfd7df85f..b69695e39957 100644 --- a/arch/s390/include/asm/spinlock_types.h +++ b/arch/s390/include/asm/spinlock_types.h @@ -2,7 +2,7 @@ @@ -220,6 +241,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # error "please don't include this file directly" #endif +diff --git a/arch/sh/include/asm/spinlock_types.h b/arch/sh/include/asm/spinlock_types.h +index e82369f286a2..907bda4b1619 100644 --- a/arch/sh/include/asm/spinlock_types.h +++ b/arch/sh/include/asm/spinlock_types.h @@ -2,7 +2,7 @@ @@ -231,6 +254,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # error "please don't include this file directly" #endif +diff --git a/arch/xtensa/include/asm/spinlock_types.h b/arch/xtensa/include/asm/spinlock_types.h +index 64c9389254f1..797aed7df3dd 100644 --- a/arch/xtensa/include/asm/spinlock_types.h +++ b/arch/xtensa/include/asm/spinlock_types.h @@ -2,7 +2,7 @@ @@ -242,6 +267,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # error "please don't include this file directly" #endif +diff --git a/include/linux/ratelimit_types.h b/include/linux/ratelimit_types.h +index b676aa419eef..c21c7f8103e2 100644 --- a/include/linux/ratelimit_types.h +++ b/include/linux/ratelimit_types.h @@ -4,7 +4,7 @@ @@ -253,6 +280,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #define DEFAULT_RATELIMIT_INTERVAL (5 * HZ) #define DEFAULT_RATELIMIT_BURST 10 +diff --git a/include/linux/spinlock_types_up.h b/include/linux/spinlock_types_up.h +index c09b6407ae1b..7f86a2016ac5 100644 --- a/include/linux/spinlock_types_up.h +++ b/include/linux/spinlock_types_up.h @@ -1,7 +1,7 @@ @@ -264,3 +293,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # error "please don't include this file directly" #endif +-- +2.33.1 + diff --git a/debian/patches-rt/sched-Make-preempt_enable_no_resched-behave-like-pre.patch b/debian/patches-rt/0088-sched-Make-preempt_enable_no_resched-behave-like-pre.patch index 88fe420df..7a968283f 100644 --- a/debian/patches-rt/sched-Make-preempt_enable_no_resched-behave-like-pre.patch +++ b/debian/patches-rt/0088-sched-Make-preempt_enable_no_resched-behave-like-pre.patch @@ -1,15 +1,18 @@ +From eba3d1bd5ddaaabda935beb99e1834abf039e599 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 17 Sep 2021 12:56:01 +0200 -Subject: [PATCH] sched: Make preempt_enable_no_resched() behave like +Subject: [PATCH 088/158] sched: Make preempt_enable_no_resched() behave like preempt_enable() on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - include/linux/preempt.h | 6 +++++- + include/linux/preempt.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) +diff --git a/include/linux/preempt.h b/include/linux/preempt.h +index 031898b38d06..d3d93b409cc9 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -189,7 +189,11 @@ do { \ @@ -25,3 +28,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #define preemptible() (preempt_count() == 0 && !irqs_disabled()) +-- +2.33.1 + diff --git a/debian/patches-rt/kernel_sched__add_putget_cpu_light.patch b/debian/patches-rt/0089-kernel-sched-add-put-get-_cpu_light.patch index b2d52feb2..19e923efd 100644 --- a/debian/patches-rt/kernel_sched__add_putget_cpu_light.patch +++ b/debian/patches-rt/0089-kernel-sched-add-put-get-_cpu_light.patch @@ -1,18 +1,17 @@ -Subject: kernel/sched: add {put|get}_cpu_light() -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Sat May 27 19:02:06 2017 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 3f17cb393d276efd8956679cff1044d6a45c705f Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Sat, 27 May 2017 19:02:06 +0200 +Subject: [PATCH 089/158] kernel/sched: add {put|get}_cpu_light() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - include/linux/smp.h | 3 +++ + include/linux/smp.h | 3 +++ 1 file changed, 3 insertions(+) ---- + +diff --git a/include/linux/smp.h b/include/linux/smp.h +index 510519e8a1eb..7ac9fdb5ad09 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -268,6 +268,9 @@ static inline int get_boot_cpu_id(void) @@ -25,3 +24,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Callback to arch code if there's nosmp or maxcpus=0 on the * boot command line: +-- +2.33.1 + diff --git a/debian/patches-rt/block_mq__do_not_invoke_preempt_disable.patch b/debian/patches-rt/0090-block-mq-do-not-invoke-preempt_disable.patch index 7a2b94bc5..6b595e9d7 100644 --- a/debian/patches-rt/block_mq__do_not_invoke_preempt_disable.patch +++ b/debian/patches-rt/0090-block-mq-do-not-invoke-preempt_disable.patch @@ -1,9 +1,8 @@ -Subject: block/mq: do not invoke preempt_disable() -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Tue Jul 14 14:26:34 2015 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 69bf76d72d4ea6bbbc291e2bc5bd277473e03ea5 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Tue, 14 Jul 2015 14:26:34 +0200 +Subject: [PATCH 090/158] block/mq: do not invoke preempt_disable() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz preempt_disable() and get_cpu() don't play well together with the sleeping locks it tries to allocate later. @@ -11,15 +10,15 @@ It seems to be enough to replace it with get_cpu_light() and migrate_disable(). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - block/blk-mq.c | 6 +++--- + block/blk-mq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---- + +diff --git a/block/blk-mq.c b/block/blk-mq.c +index 82de39926a9f..330b6274bf6b 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c -@@ -1559,14 +1559,14 @@ static void __blk_mq_delay_run_hw_queue( +@@ -1563,14 +1563,14 @@ static void __blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async, return; if (!async && !(hctx->flags & BLK_MQ_F_BLOCKING)) { @@ -37,3 +36,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } kblockd_mod_delayed_work_on(blk_mq_hctx_next_cpu(hctx), &hctx->run_work, +-- +2.33.1 + diff --git a/debian/patches-rt/md__raid5__Make_raid5_percpu_handling_RT_aware.patch b/debian/patches-rt/0091-md-raid5-Make-raid5_percpu-handling-RT-aware.patch index dbe6fdd11..8c1e279b8 100644 --- a/debian/patches-rt/md__raid5__Make_raid5_percpu_handling_RT_aware.patch +++ b/debian/patches-rt/0091-md-raid5-Make-raid5_percpu-handling-RT-aware.patch @@ -1,9 +1,8 @@ -Subject: md: raid5: Make raid5_percpu handling RT aware -From: Thomas Gleixner <tglx@linutronix.de> -Date: Tue Apr 6 16:51:31 2010 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 1e5c02b013aace376a46c8b6f98211491bf9f242 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Tue, 6 Apr 2010 16:51:31 +0200 +Subject: [PATCH 091/158] md: raid5: Make raid5_percpu handling RT aware +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz __raid_run_ops() disables preemption with get_cpu() around the access to the raid5_percpu variables. That causes scheduling while atomic @@ -15,17 +14,16 @@ preemptible. Reported-by: Udo van den Heuvel <udovdh@xs4all.nl> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Udo van den Heuvel <udovdh@xs4all.nl> - - - --- - drivers/md/raid5.c | 7 +++++-- - drivers/md/raid5.h | 1 + + drivers/md/raid5.c | 7 +++++-- + drivers/md/raid5.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) ---- + +diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c +index 02ed53b20654..e459744c7a0d 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c -@@ -2217,8 +2217,9 @@ static void raid_run_ops(struct stripe_h +@@ -2217,8 +2217,9 @@ static void raid_run_ops(struct stripe_head *sh, unsigned long ops_request) struct raid5_percpu *percpu; unsigned long cpu; @@ -36,7 +34,7 @@ Tested-by: Udo van den Heuvel <udovdh@xs4all.nl> if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) { ops_run_biofill(sh); overlap_clear++; -@@ -2277,7 +2278,8 @@ static void raid_run_ops(struct stripe_h +@@ -2277,7 +2278,8 @@ static void raid_run_ops(struct stripe_head *sh, unsigned long ops_request) if (test_and_clear_bit(R5_Overlap, &dev->flags)) wake_up(&sh->raid_conf->wait_for_overlap); } @@ -46,7 +44,7 @@ Tested-by: Udo van den Heuvel <udovdh@xs4all.nl> } static void free_stripe(struct kmem_cache *sc, struct stripe_head *sh) -@@ -7102,6 +7104,7 @@ static int raid456_cpu_up_prepare(unsign +@@ -7102,6 +7104,7 @@ static int raid456_cpu_up_prepare(unsigned int cpu, struct hlist_node *node) __func__, cpu); return -ENOMEM; } @@ -54,6 +52,8 @@ Tested-by: Udo van den Heuvel <udovdh@xs4all.nl> return 0; } +diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h +index 5c05acf20e1f..665fe138ab4f 100644 --- a/drivers/md/raid5.h +++ b/drivers/md/raid5.h @@ -635,6 +635,7 @@ struct r5conf { @@ -64,3 +64,6 @@ Tested-by: Udo van den Heuvel <udovdh@xs4all.nl> struct page *spare_page; /* Used when checking P/Q in raid6 */ void *scribble; /* space for constructing buffer * lists and performing address +-- +2.33.1 + diff --git a/debian/patches-rt/scsi_fcoe__Make_RT_aware..patch b/debian/patches-rt/0092-scsi-fcoe-Make-RT-aware.patch index db9850dde..8d08363cb 100644 --- a/debian/patches-rt/scsi_fcoe__Make_RT_aware..patch +++ b/debian/patches-rt/0092-scsi-fcoe-Make-RT-aware.patch @@ -1,25 +1,24 @@ -Subject: scsi/fcoe: Make RT aware. -From: Thomas Gleixner <tglx@linutronix.de> -Date: Sat Nov 12 14:00:48 2011 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From fb35fad5329eeef6a0a2442c573a90e67c8f9a3f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Sat, 12 Nov 2011 14:00:48 +0100 +Subject: [PATCH 092/158] scsi/fcoe: Make RT aware. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Do not disable preemption while taking sleeping locks. All user look safe for migrate_diable() only. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - drivers/scsi/fcoe/fcoe.c | 16 ++++++++-------- - drivers/scsi/fcoe/fcoe_ctlr.c | 4 ++-- - drivers/scsi/libfc/fc_exch.c | 4 ++-- + drivers/scsi/fcoe/fcoe.c | 16 ++++++++-------- + drivers/scsi/fcoe/fcoe_ctlr.c | 4 ++-- + drivers/scsi/libfc/fc_exch.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) ---- + +diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c +index 5ae6c207d3ac..660908027dc5 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c -@@ -1450,11 +1450,11 @@ static int fcoe_rcv(struct sk_buff *skb, +@@ -1450,11 +1450,11 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev, static int fcoe_alloc_paged_crc_eof(struct sk_buff *skb, int tlen) { struct fcoe_percpu_s *fps; @@ -34,7 +33,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return rc; } -@@ -1639,11 +1639,11 @@ static inline int fcoe_filter_frames(str +@@ -1639,11 +1639,11 @@ static inline int fcoe_filter_frames(struct fc_lport *lport, return 0; } @@ -48,7 +47,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return -EINVAL; } -@@ -1684,7 +1684,7 @@ static void fcoe_recv_frame(struct sk_bu +@@ -1684,7 +1684,7 @@ static void fcoe_recv_frame(struct sk_buff *skb) */ hp = (struct fcoe_hdr *) skb_network_header(skb); @@ -57,7 +56,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (unlikely(FC_FCOE_DECAPS_VER(hp) != FC_FCOE_VER)) { if (stats->ErrorFrames < 5) printk(KERN_WARNING "fcoe: FCoE version " -@@ -1716,13 +1716,13 @@ static void fcoe_recv_frame(struct sk_bu +@@ -1716,13 +1716,13 @@ static void fcoe_recv_frame(struct sk_buff *skb) goto drop; if (!fcoe_filter_frames(lport, fp)) { @@ -73,9 +72,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> kfree_skb(skb); } +diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c +index 1756a0ac6f08..3a2cbf35ea3d 100644 --- a/drivers/scsi/fcoe/fcoe_ctlr.c +++ b/drivers/scsi/fcoe/fcoe_ctlr.c -@@ -828,7 +828,7 @@ static unsigned long fcoe_ctlr_age_fcfs( +@@ -828,7 +828,7 @@ static unsigned long fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip) INIT_LIST_HEAD(&del_list); @@ -84,7 +85,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> list_for_each_entry_safe(fcf, next, &fip->fcfs, list) { deadline = fcf->time + fcf->fka_period + fcf->fka_period / 2; -@@ -864,7 +864,7 @@ static unsigned long fcoe_ctlr_age_fcfs( +@@ -864,7 +864,7 @@ static unsigned long fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip) sel_time = fcf->time; } } @@ -93,9 +94,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> list_for_each_entry_safe(fcf, next, &del_list, list) { /* Removes fcf from current list */ +diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c +index 841000445b9a..26d661ddc950 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c -@@ -825,10 +825,10 @@ static struct fc_exch *fc_exch_em_alloc( +@@ -825,10 +825,10 @@ static struct fc_exch *fc_exch_em_alloc(struct fc_lport *lport, } memset(ep, 0, sizeof(*ep)); @@ -108,3 +111,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* peek cache of free slot */ if (pool->left != FC_XID_UNKNOWN) { +-- +2.33.1 + diff --git a/debian/patches-rt/mm_vmalloc__Another_preempt_disable_region_which_sucks.patch b/debian/patches-rt/0093-mm-vmalloc-Another-preempt-disable-region-which-suck.patch index 968754912..4ff32f1eb 100644 --- a/debian/patches-rt/mm_vmalloc__Another_preempt_disable_region_which_sucks.patch +++ b/debian/patches-rt/0093-mm-vmalloc-Another-preempt-disable-region-which-suck.patch @@ -1,21 +1,23 @@ -Subject: mm/vmalloc: Another preempt disable region which sucks -From: Thomas Gleixner <tglx@linutronix.de> -Date: Tue Jul 12 11:39:36 2011 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 8cab8bf0ef1e5645fff68644535c620856849b73 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Tue, 12 Jul 2011 11:39:36 +0200 +Subject: [PATCH 093/158] mm/vmalloc: Another preempt disable region which + sucks +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Avoid the preempt disable version of get_cpu_var(). The inner-lock should provide enough serialisation. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- - mm/vmalloc.c | 10 ++++++---- + mm/vmalloc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ---- + +diff --git a/mm/vmalloc.c b/mm/vmalloc.c +index e8a807c78110..3c5be440ab30 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c -@@ -1918,11 +1918,12 @@ static void *new_vmap_block(unsigned int +@@ -1918,11 +1918,12 @@ static void *new_vmap_block(unsigned int order, gfp_t gfp_mask) return ERR_PTR(err); } @@ -30,7 +32,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return vaddr; } -@@ -2001,7 +2002,8 @@ static void *vb_alloc(unsigned long size +@@ -2001,7 +2002,8 @@ static void *vb_alloc(unsigned long size, gfp_t gfp_mask) order = get_order(size); rcu_read_lock(); @@ -40,7 +42,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> list_for_each_entry_rcu(vb, &vbq->free, free_list) { unsigned long pages_off; -@@ -2024,7 +2026,7 @@ static void *vb_alloc(unsigned long size +@@ -2024,7 +2026,7 @@ static void *vb_alloc(unsigned long size, gfp_t gfp_mask) break; } @@ -49,3 +51,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> rcu_read_unlock(); /* Allocate new block if nothing was found */ +-- +2.33.1 + diff --git a/debian/patches-rt/net__Remove_preemption_disabling_in_netif_rx.patch b/debian/patches-rt/0094-net-Remove-preemption-disabling-in-netif_rx.patch index e59bea017..bfd8fcae8 100644 --- a/debian/patches-rt/net__Remove_preemption_disabling_in_netif_rx.patch +++ b/debian/patches-rt/0094-net-Remove-preemption-disabling-in-netif_rx.patch @@ -1,9 +1,8 @@ -Subject: net: Remove preemption disabling in netif_rx() -From: Priyanka Jain <Priyanka.Jain@freescale.com> -Date: Thu May 17 09:35:11 2012 +0530 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 8ff79e1bce330d68de0aee355f4dea1c67fd91a0 Mon Sep 17 00:00:00 2001 From: Priyanka Jain <Priyanka.Jain@freescale.com> +Date: Thu, 17 May 2012 09:35:11 +0530 +Subject: [PATCH 094/158] net: Remove preemption disabling in netif_rx() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz 1)enqueue_to_backlog() (called from netif_rx) should be bind to a particluar CPU. This can be achieved by @@ -31,15 +30,15 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> [bigeasy: Remove assumption about migrate_disable() from the description.] Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - net/core/dev.c | 8 ++++---- + net/core/dev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---- + +diff --git a/net/core/dev.c b/net/core/dev.c +index 91f53eeb0e79..851f12b9982c 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4884,7 +4884,7 @@ static int netif_rx_internal(struct sk_b +@@ -4896,7 +4896,7 @@ static int netif_rx_internal(struct sk_buff *skb) struct rps_dev_flow voidflow, *rflow = &voidflow; int cpu; @@ -48,7 +47,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> rcu_read_lock(); cpu = get_rps_cpu(skb->dev, skb, &rflow); -@@ -4894,14 +4894,14 @@ static int netif_rx_internal(struct sk_b +@@ -4906,14 +4906,14 @@ static int netif_rx_internal(struct sk_buff *skb) ret = enqueue_to_backlog(skb, cpu, &rflow->last_qtail); rcu_read_unlock(); @@ -66,3 +65,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } return ret; } +-- +2.33.1 + diff --git a/debian/patches-rt/sunrpc__Make_svc_xprt_do_enqueue_use_get_cpu_light.patch b/debian/patches-rt/0095-sunrpc-Make-svc_xprt_do_enqueue-use-get_cpu_light.patch index b6de72923..e909fbecb 100644 --- a/debian/patches-rt/sunrpc__Make_svc_xprt_do_enqueue_use_get_cpu_light.patch +++ b/debian/patches-rt/0095-sunrpc-Make-svc_xprt_do_enqueue-use-get_cpu_light.patch @@ -1,9 +1,9 @@ -Subject: sunrpc: Make svc_xprt_do_enqueue() use get_cpu_light() -From: Mike Galbraith <umgwanakikbuti@gmail.com> -Date: Wed Feb 18 16:05:28 2015 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 9902ddca027e3210e483aae355d249d2afd98a10 Mon Sep 17 00:00:00 2001 From: Mike Galbraith <umgwanakikbuti@gmail.com> +Date: Wed, 18 Feb 2015 16:05:28 +0100 +Subject: [PATCH 095/158] sunrpc: Make svc_xprt_do_enqueue() use + get_cpu_light() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915 |in_atomic(): 1, irqs_disabled(): 0, pid: 3194, name: rpc.nfsd @@ -31,15 +31,15 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com> Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - net/sunrpc/svc_xprt.c | 4 ++-- + net/sunrpc/svc_xprt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---- + +diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c +index 6316bd2b8f37..dfc9d12caef8 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c -@@ -441,7 +441,7 @@ void svc_xprt_do_enqueue(struct svc_xprt +@@ -441,7 +441,7 @@ void svc_xprt_do_enqueue(struct svc_xprt *xprt) if (test_and_set_bit(XPT_BUSY, &xprt->xpt_flags)) return; @@ -48,7 +48,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> pool = svc_pool_for_cpu(xprt->xpt_server, cpu); atomic_long_inc(&pool->sp_stats.packets); -@@ -465,7 +465,7 @@ void svc_xprt_do_enqueue(struct svc_xprt +@@ -465,7 +465,7 @@ void svc_xprt_do_enqueue(struct svc_xprt *xprt) rqstp = NULL; out_unlock: rcu_read_unlock(); @@ -57,3 +57,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> trace_svc_xprt_do_enqueue(xprt, rqstp); } EXPORT_SYMBOL_GPL(svc_xprt_do_enqueue); +-- +2.33.1 + diff --git a/debian/patches-rt/crypto__cryptd_-_add_a_lock_instead_preempt_disable_local_bh_disable.patch b/debian/patches-rt/0096-crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch index dfac1de2f..266d8f525 100644 --- a/debian/patches-rt/crypto__cryptd_-_add_a_lock_instead_preempt_disable_local_bh_disable.patch +++ b/debian/patches-rt/0096-crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch @@ -1,9 +1,9 @@ -Subject: crypto: cryptd - add a lock instead preempt_disable/local_bh_disable -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Thu Jul 26 18:52:00 2018 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From b54f15f6ed9950b6c867a6bc86f03a1b70f2670e Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Thu, 26 Jul 2018 18:52:00 +0200 +Subject: [PATCH 096/158] crypto: cryptd - add a lock instead + preempt_disable/local_bh_disable +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz cryptd has a per-CPU lock which protected with local_bh_disable() and preempt_disable(). @@ -16,15 +16,15 @@ actual ressource is protected by the spinlock. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - crypto/cryptd.c | 19 +++++++++---------- + crypto/cryptd.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) ---- + +diff --git a/crypto/cryptd.c b/crypto/cryptd.c +index a1bea0f4baa8..5f8ca8c1f59c 100644 --- a/crypto/cryptd.c +++ b/crypto/cryptd.c -@@ -36,6 +36,7 @@ static struct workqueue_struct *cryptd_w +@@ -36,6 +36,7 @@ static struct workqueue_struct *cryptd_wq; struct cryptd_cpu_queue { struct crypto_queue queue; struct work_struct work; @@ -32,7 +32,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> }; struct cryptd_queue { -@@ -105,6 +106,7 @@ static int cryptd_init_queue(struct cryp +@@ -105,6 +106,7 @@ static int cryptd_init_queue(struct cryptd_queue *queue, cpu_queue = per_cpu_ptr(queue->cpu_queue, cpu); crypto_init_queue(&cpu_queue->queue, max_cpu_qlen); INIT_WORK(&cpu_queue->work, cryptd_queue_worker); @@ -40,7 +40,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } pr_info("cryptd: max_cpu_qlen set to %d\n", max_cpu_qlen); return 0; -@@ -129,8 +131,10 @@ static int cryptd_enqueue_request(struct +@@ -129,8 +131,10 @@ static int cryptd_enqueue_request(struct cryptd_queue *queue, struct cryptd_cpu_queue *cpu_queue; refcount_t *refcnt; @@ -53,7 +53,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> err = crypto_enqueue_request(&cpu_queue->queue, request); refcnt = crypto_tfm_ctx(request->tfm); -@@ -146,7 +150,7 @@ static int cryptd_enqueue_request(struct +@@ -146,7 +150,7 @@ static int cryptd_enqueue_request(struct cryptd_queue *queue, refcount_inc(refcnt); out_put_cpu: @@ -62,7 +62,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return err; } -@@ -162,16 +166,11 @@ static void cryptd_queue_worker(struct w +@@ -162,16 +166,11 @@ static void cryptd_queue_worker(struct work_struct *work) cpu_queue = container_of(work, struct cryptd_cpu_queue, work); /* * Only handle one request at a time to avoid hogging crypto workqueue. @@ -81,3 +81,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (!req) return; +-- +2.33.1 + diff --git a/debian/patches-rt/softirq__Check_preemption_after_reenabling_interrupts.patch b/debian/patches-rt/0097-softirq-Check-preemption-after-reenabling-interrupts.patch index 5f99e7649..45d8ca3d8 100644 --- a/debian/patches-rt/softirq__Check_preemption_after_reenabling_interrupts.patch +++ b/debian/patches-rt/0097-softirq-Check-preemption-after-reenabling-interrupts.patch @@ -1,9 +1,8 @@ -Subject: softirq: Check preemption after reenabling interrupts -From: Thomas Gleixner <tglx@linutronix.de> -Date: Sun Nov 13 17:17:09 2011 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 07dce8519aa1cb2933cf472e09d892bd0cf74d4d Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Sun, 13 Nov 2011 17:17:09 +0100 +Subject: [PATCH 097/158] softirq: Check preemption after reenabling interrupts +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz raise_softirq_irqoff() disables interrupts and wakes the softirq daemon, but after reenabling interrupts there is no preemption check, @@ -15,14 +14,13 @@ ones which show this behaviour. Reported-by: Carsten Emde <cbe@osadl.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - - --- - include/linux/preempt.h | 3 +++ - net/core/dev.c | 7 +++++++ + include/linux/preempt.h | 3 +++ + net/core/dev.c | 7 +++++++ 2 files changed, 10 insertions(+) ---- + +diff --git a/include/linux/preempt.h b/include/linux/preempt.h +index d3d93b409cc9..a9a0b33160de 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -191,8 +191,10 @@ do { \ @@ -44,9 +42,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #define preemptible() 0 #endif /* CONFIG_PREEMPT_COUNT */ +diff --git a/net/core/dev.c b/net/core/dev.c +index 851f12b9982c..057bb2d60938 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3040,6 +3040,7 @@ static void __netif_reschedule(struct Qd +@@ -3042,6 +3042,7 @@ static void __netif_reschedule(struct Qdisc *q) sd->output_queue_tailp = &q->next_sched; raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_restore(flags); @@ -54,7 +54,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } void __netif_schedule(struct Qdisc *q) -@@ -3102,6 +3103,7 @@ void __dev_kfree_skb_irq(struct sk_buff +@@ -3104,6 +3105,7 @@ void __dev_kfree_skb_irq(struct sk_buff *skb, enum skb_free_reason reason) __this_cpu_write(softnet_data.completion_queue, skb); raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_restore(flags); @@ -62,7 +62,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } EXPORT_SYMBOL(__dev_kfree_skb_irq); -@@ -4644,6 +4646,7 @@ static int enqueue_to_backlog(struct sk_ +@@ -4656,6 +4658,7 @@ static int enqueue_to_backlog(struct sk_buff *skb, int cpu, rps_unlock(sd); local_irq_restore(flags); @@ -70,7 +70,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> atomic_long_inc(&skb->dev->rx_dropped); kfree_skb(skb); -@@ -6387,12 +6390,14 @@ static void net_rps_action_and_irq_enabl +@@ -6399,12 +6402,14 @@ static void net_rps_action_and_irq_enable(struct softnet_data *sd) sd->rps_ipi_list = NULL; local_irq_enable(); @@ -85,7 +85,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static bool sd_has_rps_ipi_waiting(struct softnet_data *sd) -@@ -6470,6 +6475,7 @@ void __napi_schedule(struct napi_struct +@@ -6482,6 +6487,7 @@ void __napi_schedule(struct napi_struct *n) local_irq_save(flags); ____napi_schedule(this_cpu_ptr(&softnet_data), n); local_irq_restore(flags); @@ -93,7 +93,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } EXPORT_SYMBOL(__napi_schedule); -@@ -11292,6 +11298,7 @@ static int dev_cpu_dead(unsigned int old +@@ -11304,6 +11310,7 @@ static int dev_cpu_dead(unsigned int oldcpu) raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_enable(); @@ -101,3 +101,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifdef CONFIG_RPS remsd = oldsd->rps_ipi_list; +-- +2.33.1 + diff --git a/debian/patches-rt/u64_stats__Disable_preemption_on_32bit-UP_SMP_with_RT_during_updates.patch b/debian/patches-rt/0098-u64_stats-Disable-preemption-on-32bit-UP-SMP-with-RT.patch index d962a4519..e6e2d0290 100644 --- a/debian/patches-rt/u64_stats__Disable_preemption_on_32bit-UP_SMP_with_RT_during_updates.patch +++ b/debian/patches-rt/0098-u64_stats-Disable-preemption-on-32bit-UP-SMP-with-RT.patch @@ -1,9 +1,9 @@ -Subject: u64_stats: Disable preemption on 32bit-UP/SMP with RT during updates -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Mon Aug 17 12:28:10 2020 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 92fdc2c94490f6579a5fa428944a32474df088a9 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Mon, 17 Aug 2020 12:28:10 +0200 +Subject: [PATCH 098/158] u64_stats: Disable preemption on 32bit-UP/SMP with RT + during updates +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz On RT the seqcount_t is required even on UP because the softirq can be preempted. The IRQ handler is threaded so it is also preemptible. @@ -15,12 +15,12 @@ interruped. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - include/linux/u64_stats_sync.h | 42 +++++++++++++++++++++++++++-------------- + include/linux/u64_stats_sync.h | 42 ++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 14 deletions(-) ---- + +diff --git a/include/linux/u64_stats_sync.h b/include/linux/u64_stats_sync.h +index e8ec116c916b..81dc1f5e181a 100644 --- a/include/linux/u64_stats_sync.h +++ b/include/linux/u64_stats_sync.h @@ -66,7 +66,7 @@ @@ -32,7 +32,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> seqcount_t seq; #endif }; -@@ -125,7 +125,7 @@ static inline void u64_stats_inc(u64_sta +@@ -125,7 +125,7 @@ static inline void u64_stats_inc(u64_stats_t *p) } #endif @@ -41,7 +41,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #define u64_stats_init(syncp) seqcount_init(&(syncp)->seq) #else static inline void u64_stats_init(struct u64_stats_sync *syncp) -@@ -135,15 +135,19 @@ static inline void u64_stats_init(struct +@@ -135,15 +135,19 @@ static inline void u64_stats_init(struct u64_stats_sync *syncp) static inline void u64_stats_update_begin(struct u64_stats_sync *syncp) { @@ -63,7 +63,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #endif } -@@ -152,8 +156,11 @@ u64_stats_update_begin_irqsave(struct u6 +@@ -152,8 +156,11 @@ u64_stats_update_begin_irqsave(struct u64_stats_sync *syncp) { unsigned long flags = 0; @@ -99,7 +99,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return read_seqcount_begin(&syncp->seq); #else return 0; -@@ -180,7 +190,7 @@ static inline unsigned int __u64_stats_f +@@ -180,7 +190,7 @@ static inline unsigned int __u64_stats_fetch_begin(const struct u64_stats_sync * static inline unsigned int u64_stats_fetch_begin(const struct u64_stats_sync *syncp) { @@ -108,7 +108,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> preempt_disable(); #endif return __u64_stats_fetch_begin(syncp); -@@ -189,7 +199,7 @@ static inline unsigned int u64_stats_fet +@@ -189,7 +199,7 @@ static inline unsigned int u64_stats_fetch_begin(const struct u64_stats_sync *sy static inline bool __u64_stats_fetch_retry(const struct u64_stats_sync *syncp, unsigned int start) { @@ -117,7 +117,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return read_seqcount_retry(&syncp->seq, start); #else return false; -@@ -199,7 +209,7 @@ static inline bool __u64_stats_fetch_ret +@@ -199,7 +209,7 @@ static inline bool __u64_stats_fetch_retry(const struct u64_stats_sync *syncp, static inline bool u64_stats_fetch_retry(const struct u64_stats_sync *syncp, unsigned int start) { @@ -126,7 +126,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> preempt_enable(); #endif return __u64_stats_fetch_retry(syncp, start); -@@ -213,7 +223,9 @@ static inline bool u64_stats_fetch_retry +@@ -213,7 +223,9 @@ static inline bool u64_stats_fetch_retry(const struct u64_stats_sync *syncp, */ static inline unsigned int u64_stats_fetch_begin_irq(const struct u64_stats_sync *syncp) { @@ -137,7 +137,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> local_irq_disable(); #endif return __u64_stats_fetch_begin(syncp); -@@ -222,7 +234,9 @@ static inline unsigned int u64_stats_fet +@@ -222,7 +234,9 @@ static inline unsigned int u64_stats_fetch_begin_irq(const struct u64_stats_sync static inline bool u64_stats_fetch_retry_irq(const struct u64_stats_sync *syncp, unsigned int start) { @@ -148,3 +148,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> local_irq_enable(); #endif return __u64_stats_fetch_retry(syncp, start); +-- +2.33.1 + diff --git a/debian/patches-rt/mm-memcontro--Disable-on-PREEMPT_RT.patch b/debian/patches-rt/0099-mm-memcontrol-Disable-on-PREEMPT_RT.patch index c25641819..a258c932d 100644 --- a/debian/patches-rt/mm-memcontro--Disable-on-PREEMPT_RT.patch +++ b/debian/patches-rt/0099-mm-memcontrol-Disable-on-PREEMPT_RT.patch @@ -1,7 +1,8 @@ -Subject: mm/memcontrol: Disable on PREEMPT_RT +From b0e5de1561b508b4219e78575eb5e50089e5f112 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 25 Jul 2021 21:35:46 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 099/158] mm/memcontrol: Disable on PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz 559271146efc ("mm/memcg: optimize user context object stock access") is a classic example of optimizing for the cpu local BKL serialization without a @@ -11,9 +12,11 @@ Disable MEMCG on RT for now. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- - init/Kconfig | 1 + + init/Kconfig | 1 + 1 file changed, 1 insertion(+) +diff --git a/init/Kconfig b/init/Kconfig +index 45bcaa8e7481..0b8a65ae1d72 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -938,6 +938,7 @@ config PAGE_COUNTER @@ -24,3 +27,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> select PAGE_COUNTER select EVENTFD help +-- +2.33.1 + diff --git a/debian/patches-rt/signal__Revert_ptrace_preempt_magic.patch b/debian/patches-rt/0100-signal-Revert-ptrace-preempt-magic.patch index 9ee13768d..742eb87ec 100644 --- a/debian/patches-rt/signal__Revert_ptrace_preempt_magic.patch +++ b/debian/patches-rt/0100-signal-Revert-ptrace-preempt-magic.patch @@ -1,24 +1,23 @@ -Subject: signal: Revert ptrace preempt magic -From: Thomas Gleixner <tglx@linutronix.de> -Date: Wed Sep 21 19:57:12 2011 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 898e406a7f41869373aa31bf1a6214d68be2c219 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Wed, 21 Sep 2011 19:57:12 +0200 +Subject: [PATCH 100/158] signal: Revert ptrace preempt magic +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Upstream commit '53da1d9456fe7f8 fix ptrace slowness' is nothing more than a bandaid around the ptrace design trainwreck. It's not a correctness issue, it's merily a cosmetic bandaid. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - kernel/signal.c | 8 -------- + kernel/signal.c | 8 -------- 1 file changed, 8 deletions(-) ---- + +diff --git a/kernel/signal.c b/kernel/signal.c +index 5892c91696f8..cda61fdbd664 100644 --- a/kernel/signal.c +++ b/kernel/signal.c -@@ -2275,16 +2275,8 @@ static void ptrace_stop(int exit_code, i +@@ -2296,16 +2296,8 @@ static void ptrace_stop(int exit_code, int why, int clear_code, kernel_siginfo_t if (gstop_done && ptrace_reparented(current)) do_notify_parent_cldstop(current, false, why); @@ -35,3 +34,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> freezable_schedule(); cgroup_leave_frozen(true); } else { +-- +2.33.1 + diff --git a/debian/patches-rt/ptrace__fix_ptrace_vs_tasklist_lock_race.patch b/debian/patches-rt/0101-ptrace-fix-ptrace-vs-tasklist_lock-race.patch index 119853b11..434ebc046 100644 --- a/debian/patches-rt/ptrace__fix_ptrace_vs_tasklist_lock_race.patch +++ b/debian/patches-rt/0101-ptrace-fix-ptrace-vs-tasklist_lock-race.patch @@ -1,9 +1,8 @@ -Subject: ptrace: fix ptrace vs tasklist_lock race -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Thu Aug 29 18:21:04 2013 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From dfa115d012ba4d7eca9ed325a4a7327ce885e300 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Thu, 29 Aug 2013 18:21:04 +0200 +Subject: [PATCH 101/158] ptrace: fix ptrace vs tasklist_lock race +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz As explained by Alexander Fyodorov <halcy@yandex.ru>: @@ -27,14 +26,14 @@ taken in case the caller is interrupted between looking into ->state and [ Fix for ptrace_unfreeze_traced() by Oleg Nesterov ] Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - include/linux/sched.h | 79 +++++++++++++++++++++++++++++++++++++++++++++++--- - kernel/ptrace.c | 38 +++++++++++++++++++----- - kernel/sched/core.c | 4 +- + include/linux/sched.h | 79 ++++++++++++++++++++++++++++++++++++++++--- + kernel/ptrace.c | 38 +++++++++++++++++---- + kernel/sched/core.c | 4 +-- 3 files changed, 108 insertions(+), 13 deletions(-) ---- + +diff --git a/include/linux/sched.h b/include/linux/sched.h +index 2b8c8150792c..04172b57d71d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -118,12 +118,8 @@ struct task_group; @@ -50,7 +49,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Special states are those that do not use the normal wait-loop pattern. See * the comment with set_special_state(). -@@ -2015,6 +2011,81 @@ static inline int test_tsk_need_resched( +@@ -2015,6 +2011,81 @@ static inline int test_tsk_need_resched(struct task_struct *tsk) return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); } @@ -132,9 +131,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * cond_resched() and cond_resched_lock(): latency reduction via * explicit rescheduling in places that are safe. The return +diff --git a/kernel/ptrace.c b/kernel/ptrace.c +index f8589bf8d7dc..df08e8e64a83 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c -@@ -197,7 +197,18 @@ static bool ptrace_freeze_traced(struct +@@ -197,7 +197,18 @@ static bool ptrace_freeze_traced(struct task_struct *task) spin_lock_irq(&task->sighand->siglock); if (task_is_traced(task) && !looks_like_a_spurious_pid(task) && !__fatal_signal_pending(task)) { @@ -153,7 +154,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> ret = true; } spin_unlock_irq(&task->sighand->siglock); -@@ -207,7 +218,11 @@ static bool ptrace_freeze_traced(struct +@@ -207,7 +218,11 @@ static bool ptrace_freeze_traced(struct task_struct *task) static void ptrace_unfreeze_traced(struct task_struct *task) { @@ -166,7 +167,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return; WARN_ON(!task->ptrace || task->parent != current); -@@ -217,12 +232,21 @@ static void ptrace_unfreeze_traced(struc +@@ -217,12 +232,21 @@ static void ptrace_unfreeze_traced(struct task_struct *task) * Recheck state under the lock to close this race. */ spin_lock_irq(&task->sighand->siglock); @@ -194,9 +195,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> spin_unlock_irq(&task->sighand->siglock); } +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index 2d7cf80d95d9..9ff7e8bd058a 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -3207,7 +3207,7 @@ unsigned long wait_task_inactive(struct +@@ -3207,7 +3207,7 @@ unsigned long wait_task_inactive(struct task_struct *p, unsigned int match_state * is actually now running somewhere else! */ while (task_running(rq, p)) { @@ -205,7 +208,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return 0; cpu_relax(); } -@@ -3222,7 +3222,7 @@ unsigned long wait_task_inactive(struct +@@ -3222,7 +3222,7 @@ unsigned long wait_task_inactive(struct task_struct *p, unsigned int match_state running = task_running(rq, p); queued = task_on_rq_queued(p); ncsw = 0; @@ -214,3 +217,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> ncsw = p->nvcsw | LONG_MIN; /* sets MSB */ task_rq_unlock(rq, p, &rf); +-- +2.33.1 + diff --git a/debian/patches-rt/fs_dcache__use_swait_queue_instead_of_waitqueue.patch b/debian/patches-rt/0102-fs-dcache-use-swait_queue-instead-of-waitqueue.patch index 151512491..a5391dcb5 100644 --- a/debian/patches-rt/fs_dcache__use_swait_queue_instead_of_waitqueue.patch +++ b/debian/patches-rt/0102-fs-dcache-use-swait_queue-instead-of-waitqueue.patch @@ -1,35 +1,34 @@ -Subject: fs/dcache: use swait_queue instead of waitqueue -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Wed Sep 14 14:35:49 2016 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From edd4f77d5092fc006ecfc5902e2e20de1d79eaea Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Wed, 14 Sep 2016 14:35:49 +0200 +Subject: [PATCH 102/158] fs/dcache: use swait_queue instead of waitqueue +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz __d_lookup_done() invokes wake_up_all() while holding a hlist_bl_lock() which disables preemption. As a workaround convert it to swait. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - fs/afs/dir_silly.c | 2 +- - fs/cifs/readdir.c | 2 +- - fs/dcache.c | 27 +++++++++++++++------------ - fs/fuse/readdir.c | 2 +- - fs/namei.c | 4 ++-- - fs/nfs/dir.c | 4 ++-- - fs/nfs/unlink.c | 4 ++-- - fs/proc/base.c | 3 ++- - fs/proc/proc_sysctl.c | 2 +- - include/linux/dcache.h | 4 ++-- - include/linux/nfs_xdr.h | 2 +- - kernel/sched/swait.c | 1 + + fs/afs/dir_silly.c | 2 +- + fs/cifs/readdir.c | 2 +- + fs/dcache.c | 27 +++++++++++++++------------ + fs/fuse/readdir.c | 2 +- + fs/namei.c | 4 ++-- + fs/nfs/dir.c | 4 ++-- + fs/nfs/unlink.c | 4 ++-- + fs/proc/base.c | 3 ++- + fs/proc/proc_sysctl.c | 2 +- + include/linux/dcache.h | 4 ++-- + include/linux/nfs_xdr.h | 2 +- + kernel/sched/swait.c | 1 + 12 files changed, 31 insertions(+), 26 deletions(-) ---- + +diff --git a/fs/afs/dir_silly.c b/fs/afs/dir_silly.c +index 45cfd50a9521..502b56597f10 100644 --- a/fs/afs/dir_silly.c +++ b/fs/afs/dir_silly.c -@@ -239,7 +239,7 @@ int afs_silly_iput(struct dentry *dentry +@@ -239,7 +239,7 @@ int afs_silly_iput(struct dentry *dentry, struct inode *inode) struct dentry *alias; int ret; @@ -38,9 +37,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> _enter("%p{%pd},%llx", dentry, dentry, vnode->fid.vnode); +diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c +index 1929e80c09ee..48eb8c30c6db 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c -@@ -69,7 +69,7 @@ cifs_prime_dcache(struct dentry *parent, +@@ -69,7 +69,7 @@ cifs_prime_dcache(struct dentry *parent, struct qstr *name, struct inode *inode; struct super_block *sb = parent->d_sb; struct cifs_sb_info *cifs_sb = CIFS_SB(sb); @@ -49,9 +50,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> cifs_dbg(FYI, "%s: for %s\n", __func__, name->name); +diff --git a/fs/dcache.c b/fs/dcache.c +index cf871a81f4fd..93165b9ba3b0 100644 --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -2553,21 +2553,24 @@ static inline void end_dir_add(struct in +@@ -2553,21 +2553,24 @@ static inline void end_dir_add(struct inode *dir, unsigned n) static void d_wait_lookup(struct dentry *dentry) { @@ -87,7 +90,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> { unsigned int hash = name->hash; struct hlist_bl_head *b = in_lookup_hash(parent, hash); -@@ -2682,7 +2685,7 @@ void __d_lookup_done(struct dentry *dent +@@ -2682,7 +2685,7 @@ void __d_lookup_done(struct dentry *dentry) hlist_bl_lock(b); dentry->d_flags &= ~DCACHE_PAR_LOOKUP; __hlist_bl_del(&dentry->d_u.d_in_lookup_hash); @@ -96,9 +99,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> dentry->d_wait = NULL; hlist_bl_unlock(b); INIT_HLIST_NODE(&dentry->d_u.d_alias); +diff --git a/fs/fuse/readdir.c b/fs/fuse/readdir.c +index bc267832310c..3176913fae6c 100644 --- a/fs/fuse/readdir.c +++ b/fs/fuse/readdir.c -@@ -158,7 +158,7 @@ static int fuse_direntplus_link(struct f +@@ -158,7 +158,7 @@ static int fuse_direntplus_link(struct file *file, struct inode *dir = d_inode(parent); struct fuse_conn *fc; struct inode *inode; @@ -107,9 +112,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (!o->nodeid) { /* +diff --git a/fs/namei.c b/fs/namei.c +index 1946d9667790..d89890a17f1b 100644 --- a/fs/namei.c +++ b/fs/namei.c -@@ -1633,7 +1633,7 @@ static struct dentry *__lookup_slow(cons +@@ -1633,7 +1633,7 @@ static struct dentry *__lookup_slow(const struct qstr *name, { struct dentry *dentry, *old; struct inode *inode = dir->d_inode; @@ -118,7 +125,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* Don't go there if it's already dead */ if (unlikely(IS_DEADDIR(inode))) -@@ -3194,7 +3194,7 @@ static struct dentry *lookup_open(struct +@@ -3194,7 +3194,7 @@ static struct dentry *lookup_open(struct nameidata *nd, struct file *file, struct dentry *dentry; int error, create_error = 0; umode_t mode = op->mode; @@ -127,9 +134,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (unlikely(IS_DEADDIR(dir_inode))) return ERR_PTR(-ENOENT); +diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c +index 5b68c44848ca..85a1006e0a85 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c -@@ -636,7 +636,7 @@ void nfs_prime_dcache(struct dentry *par +@@ -636,7 +636,7 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry, unsigned long dir_verifier) { struct qstr filename = QSTR_INIT(entry->name, entry->len); @@ -138,7 +147,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> struct dentry *dentry; struct dentry *alias; struct inode *inode; -@@ -1876,7 +1876,7 @@ int nfs_atomic_open(struct inode *dir, s +@@ -1875,7 +1875,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry, struct file *file, unsigned open_flags, umode_t mode) { @@ -147,6 +156,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> struct nfs_open_context *ctx; struct dentry *res; struct iattr attr = { .ia_valid = ATTR_OPEN }; +diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c +index 5fa11e1aca4c..984f26eb888c 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c @@ -13,7 +13,7 @@ @@ -158,7 +169,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #include <linux/namei.h> #include <linux/fsnotify.h> -@@ -180,7 +180,7 @@ nfs_async_unlink(struct dentry *dentry, +@@ -180,7 +180,7 @@ nfs_async_unlink(struct dentry *dentry, const struct qstr *name) data->cred = get_current_cred(); data->res.dir_attr = &data->dir_attr; @@ -167,9 +178,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> status = -EBUSY; spin_lock(&dentry->d_lock); +diff --git a/fs/proc/base.c b/fs/proc/base.c +index 1f394095eb88..fade2c7c705b 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c -@@ -95,6 +95,7 @@ +@@ -96,6 +96,7 @@ #include <linux/posix-timers.h> #include <linux/time_namespace.h> #include <linux/resctrl.h> @@ -177,7 +190,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #include <linux/cn_proc.h> #include <trace/events/oom.h> #include "internal.h" -@@ -2040,7 +2041,7 @@ bool proc_fill_cache(struct file *file, +@@ -2043,7 +2044,7 @@ bool proc_fill_cache(struct file *file, struct dir_context *ctx, child = d_hash_and_lookup(dir, &qname); if (!child) { @@ -186,9 +199,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> child = d_alloc_parallel(dir, &qname, &wq); if (IS_ERR(child)) goto end_instantiate; +diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c +index 5d66faecd4ef..619d8e114646 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c -@@ -678,7 +678,7 @@ static bool proc_sys_fill_cache(struct f +@@ -678,7 +678,7 @@ static bool proc_sys_fill_cache(struct file *file, child = d_lookup(dir, &qname); if (!child) { @@ -197,6 +212,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> child = d_alloc_parallel(dir, &qname, &wq); if (IS_ERR(child)) return false; +diff --git a/include/linux/dcache.h b/include/linux/dcache.h +index 9e23d33bb6f1..9f89d4887e35 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -108,7 +108,7 @@ struct dentry { @@ -208,7 +225,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> }; struct list_head d_child; /* child of parent list */ struct list_head d_subdirs; /* our children */ -@@ -240,7 +240,7 @@ extern void d_set_d_op(struct dentry *de +@@ -240,7 +240,7 @@ extern void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op extern struct dentry * d_alloc(struct dentry *, const struct qstr *); extern struct dentry * d_alloc_anon(struct super_block *); extern struct dentry * d_alloc_parallel(struct dentry *, const struct qstr *, @@ -217,6 +234,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> extern struct dentry * d_splice_alias(struct inode *, struct dentry *); extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *); extern struct dentry * d_exact_alias(struct dentry *, struct inode *); +diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h +index e9698b6278a5..1c8393c1280c 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -1692,7 +1692,7 @@ struct nfs_unlinkdata { @@ -228,9 +247,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> const struct cred *cred; struct nfs_fattr dir_attr; long timeout; +diff --git a/kernel/sched/swait.c b/kernel/sched/swait.c +index e1c655f928c7..f230b1ac7f91 100644 --- a/kernel/sched/swait.c +++ b/kernel/sched/swait.c -@@ -64,6 +64,7 @@ void swake_up_all(struct swait_queue_hea +@@ -64,6 +64,7 @@ void swake_up_all(struct swait_queue_head *q) struct swait_queue *curr; LIST_HEAD(tmp); @@ -238,3 +259,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> raw_spin_lock_irq(&q->lock); list_splice_init(&q->task_list, &tmp); while (!list_empty(&tmp)) { +-- +2.33.1 + diff --git a/debian/patches-rt/fs_dcache__disable_preemption_on_i_dir_seqs_write_side.patch b/debian/patches-rt/0103-fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch index 28007f33f..5a7bca284 100644 --- a/debian/patches-rt/fs_dcache__disable_preemption_on_i_dir_seqs_write_side.patch +++ b/debian/patches-rt/0103-fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch @@ -1,9 +1,9 @@ -Subject: fs/dcache: disable preemption on i_dir_seq's write side -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Fri Oct 20 11:29:53 2017 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 02a2a4f129cbf67fb752496e182608fb8011ace7 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Fri, 20 Oct 2017 11:29:53 +0200 +Subject: [PATCH 103/158] fs/dcache: disable preemption on i_dir_seq's write + side +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz i_dir_seq is a sequence counter with a lock which is represented by the lowest bit. The writer atomically updates the counter which ensures that it can be @@ -34,9 +34,11 @@ For now, manually disable preemption on PREEMPT_RT to avoid live locks. Reported-by: Oleg.Karfich@wago.com Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - fs/dcache.c | 10 +++++++++- + fs/dcache.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) ---- + +diff --git a/fs/dcache.c b/fs/dcache.c +index 93165b9ba3b0..02db80f2817f 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -2537,7 +2537,13 @@ EXPORT_SYMBOL(d_rehash); @@ -54,7 +56,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> for (;;) { unsigned n = dir->i_dir_seq; if (!(n & 1) && cmpxchg(&dir->i_dir_seq, n, n + 1) == n) -@@ -2549,6 +2555,8 @@ static inline unsigned start_dir_add(str +@@ -2549,6 +2555,8 @@ static inline unsigned start_dir_add(struct inode *dir) static inline void end_dir_add(struct inode *dir, unsigned n) { smp_store_release(&dir->i_dir_seq, n + 2); @@ -63,3 +65,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } static void d_wait_lookup(struct dentry *dentry) +-- +2.33.1 + diff --git a/debian/patches-rt/rcu__Delay_RCU-selftests.patch b/debian/patches-rt/0104-rcu-Delay-RCU-selftests.patch index 002686d77..dd3a94c72 100644 --- a/debian/patches-rt/rcu__Delay_RCU-selftests.patch +++ b/debian/patches-rt/0104-rcu-Delay-RCU-selftests.patch @@ -1,22 +1,21 @@ -Subject: rcu: Delay RCU-selftests -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Wed Mar 10 15:09:02 2021 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 734e4824bf88bfba0dc17f69f837f5c11f644ce7 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Wed, 10 Mar 2021 15:09:02 +0100 +Subject: [PATCH 104/158] rcu: Delay RCU-selftests +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Delay RCU-selftests until ksoftirqd is up and running. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - include/linux/rcupdate.h | 7 +++++++ - init/main.c | 1 + - kernel/rcu/tasks.h | 9 ++------- + include/linux/rcupdate.h | 7 +++++++ + init/main.c | 1 + + kernel/rcu/tasks.h | 9 ++------- 3 files changed, 10 insertions(+), 7 deletions(-) ---- + +diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h +index 434d12fe2d4f..de6d1a21f113 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -94,6 +94,13 @@ void rcu_init_tasks_generic(void); @@ -33,9 +32,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifdef CONFIG_RCU_STALL_COMMON void rcu_sysrq_start(void); void rcu_sysrq_end(void); +diff --git a/init/main.c b/init/main.c +index bcd132d4e7bd..af4c7f963955 100644 --- a/init/main.c +++ b/init/main.c -@@ -1602,6 +1602,7 @@ static noinline void __init kernel_init_ +@@ -1604,6 +1604,7 @@ static noinline void __init kernel_init_freeable(void) rcu_init_tasks_generic(); do_pre_smp_initcalls(); @@ -43,9 +44,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> lockup_detector_init(); smp_init(); +diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h +index 6591914af486..a404897d826f 100644 --- a/kernel/rcu/tasks.h +++ b/kernel/rcu/tasks.h -@@ -1348,7 +1348,7 @@ static void test_rcu_tasks_callback(stru +@@ -1347,7 +1347,7 @@ static void test_rcu_tasks_callback(struct rcu_head *rhp) rttd->notrun = true; } @@ -54,7 +57,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> { pr_info("Running RCU-tasks wait API self tests\n"); #ifdef CONFIG_TASKS_RCU -@@ -1385,9 +1385,7 @@ static int rcu_tasks_verify_self_tests(v +@@ -1384,9 +1384,7 @@ static int rcu_tasks_verify_self_tests(void) return ret; } late_initcall(rcu_tasks_verify_self_tests); @@ -65,7 +68,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> void __init rcu_init_tasks_generic(void) { -@@ -1402,9 +1400,6 @@ void __init rcu_init_tasks_generic(void) +@@ -1401,9 +1399,6 @@ void __init rcu_init_tasks_generic(void) #ifdef CONFIG_TASKS_TRACE_RCU rcu_spawn_tasks_trace_kthread(); #endif @@ -75,3 +78,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } #else /* #ifdef CONFIG_TASKS_RCU_GENERIC */ +-- +2.33.1 + diff --git a/debian/patches-rt/net_core__use_local_bh_disable_in_netif_rx_ni.patch b/debian/patches-rt/0105-net-core-use-local_bh_disable-in-netif_rx_ni.patch index be25e87ce..7e838542a 100644 --- a/debian/patches-rt/net_core__use_local_bh_disable_in_netif_rx_ni.patch +++ b/debian/patches-rt/0105-net-core-use-local_bh_disable-in-netif_rx_ni.patch @@ -1,9 +1,8 @@ -Subject: net/core: use local_bh_disable() in netif_rx_ni() -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Fri Jun 16 19:03:16 2017 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 2afab41ed228b74635c423ed386dd6ac09403f3f Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Fri, 16 Jun 2017 19:03:16 +0200 +Subject: [PATCH 105/158] net/core: use local_bh_disable() in netif_rx_ni() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz In 2004 netif_rx_ni() gained a preempt_disable() section around netif_rx() and its do_softirq() + testing for it. The do_softirq() part @@ -16,15 +15,15 @@ required. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - net/core/dev.c | 6 ++---- + net/core/dev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) ---- + +diff --git a/net/core/dev.c b/net/core/dev.c +index 057bb2d60938..d4ee0b0bf635 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4943,11 +4943,9 @@ int netif_rx_ni(struct sk_buff *skb) +@@ -4955,11 +4955,9 @@ int netif_rx_ni(struct sk_buff *skb) trace_netif_rx_ni_entry(skb); @@ -38,3 +37,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> trace_netif_rx_ni_exit(err); return err; +-- +2.33.1 + diff --git a/debian/patches-rt/net__Use_skbufhead_with_raw_lock.patch b/debian/patches-rt/0106-net-Use-skbufhead-with-raw-lock.patch index e742a388d..1d4f9a1bf 100644 --- a/debian/patches-rt/net__Use_skbufhead_with_raw_lock.patch +++ b/debian/patches-rt/0106-net-Use-skbufhead-with-raw-lock.patch @@ -1,22 +1,21 @@ -Subject: net: Use skbufhead with raw lock -From: Thomas Gleixner <tglx@linutronix.de> -Date: Tue Jul 12 15:38:34 2011 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 9027d25e263c188cb9179473e02e38b3b3a7ec4d Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Tue, 12 Jul 2011 15:38:34 +0200 +Subject: [PATCH 106/158] net: Use skbufhead with raw lock +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Use the rps lock as rawlock so we can keep irq-off regions. It looks low latency. However we can't kfree() from this context therefore we defer this to the softirq and use the tofree_queue list for it (similar to process_queue). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - include/linux/skbuff.h | 7 +++++++ - net/core/dev.c | 6 +++--- + include/linux/skbuff.h | 7 +++++++ + net/core/dev.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) ---- + +diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h +index b8c273af2910..a66f6ddbdd56 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -297,6 +297,7 @@ struct sk_buff_head { @@ -27,7 +26,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> }; struct sk_buff; -@@ -1916,6 +1917,12 @@ static inline void skb_queue_head_init(s +@@ -1932,6 +1933,12 @@ static inline void skb_queue_head_init(struct sk_buff_head *list) __skb_queue_head_init(list); } @@ -40,9 +39,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> static inline void skb_queue_head_init_class(struct sk_buff_head *list, struct lock_class_key *class) { +diff --git a/net/core/dev.c b/net/core/dev.c +index d4ee0b0bf635..e56e9bd1cd16 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -225,14 +225,14 @@ static inline struct hlist_head *dev_ind +@@ -225,14 +225,14 @@ static inline struct hlist_head *dev_index_hash(struct net *net, int ifindex) static inline void rps_lock(struct softnet_data *sd) { #ifdef CONFIG_RPS @@ -59,7 +60,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #endif } -@@ -11626,7 +11626,7 @@ static int __init net_dev_init(void) +@@ -11638,7 +11638,7 @@ static int __init net_dev_init(void) INIT_WORK(flush, flush_backlog); @@ -68,3 +69,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> skb_queue_head_init(&sd->process_queue); #ifdef CONFIG_XFRM_OFFLOAD skb_queue_head_init(&sd->xfrm_backlog); +-- +2.33.1 + diff --git a/debian/patches-rt/net__Dequeue_in_dev_cpu_dead_without_the_lock.patch b/debian/patches-rt/0107-net-Dequeue-in-dev_cpu_dead-without-the-lock.patch index f2314d16b..b50ab8ba6 100644 --- a/debian/patches-rt/net__Dequeue_in_dev_cpu_dead_without_the_lock.patch +++ b/debian/patches-rt/0107-net-Dequeue-in-dev_cpu_dead-without-the-lock.patch @@ -1,9 +1,8 @@ -Subject: net: Dequeue in dev_cpu_dead() without the lock -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Wed Sep 16 16:15:39 2020 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 7393c24f93536c32c1bb71a0f2801f7be4e371e4 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Wed, 16 Sep 2020 16:15:39 +0200 +Subject: [PATCH 107/158] net: Dequeue in dev_cpu_dead() without the lock +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Upstream uses skb_dequeue() to acquire lock of `input_pkt_queue'. The reason is to synchronize against a remote CPU which still thinks that the CPU is online @@ -17,15 +16,15 @@ Use the unlocked dequeue version for `input_pkt_queue'. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - net/core/dev.c | 2 +- + net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---- + +diff --git a/net/core/dev.c b/net/core/dev.c +index e56e9bd1cd16..031e3dc591f1 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -11310,7 +11310,7 @@ static int dev_cpu_dead(unsigned int old +@@ -11322,7 +11322,7 @@ static int dev_cpu_dead(unsigned int oldcpu) netif_rx_ni(skb); input_queue_head_incr(oldsd); } @@ -34,3 +33,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> netif_rx_ni(skb); input_queue_head_incr(oldsd); } +-- +2.33.1 + diff --git a/debian/patches-rt/net__dev__always_take_qdiscs_busylock_in___dev_xmit_skb.patch b/debian/patches-rt/0108-net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch index 7b4dd8573..85b6d52bd 100644 --- a/debian/patches-rt/net__dev__always_take_qdiscs_busylock_in___dev_xmit_skb.patch +++ b/debian/patches-rt/0108-net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch @@ -1,9 +1,9 @@ -Subject: net: dev: always take qdisc's busylock in __dev_xmit_skb() -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Wed Mar 30 13:36:29 2016 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 8553616a5af5d0b1046e7e85d44686d9982ef7ff Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Wed, 30 Mar 2016 13:36:29 +0200 +Subject: [PATCH 108/158] net: dev: always take qdisc's busylock in + __dev_xmit_skb() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The root-lock is dropped before dev_hard_start_xmit() is invoked and after setting the __QDISC___STATE_RUNNING bit. If this task is now pushed away @@ -18,15 +18,15 @@ low-prio task and submit the packet. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - net/core/dev.c | 4 ++++ + net/core/dev.c | 4 ++++ 1 file changed, 4 insertions(+) ---- + +diff --git a/net/core/dev.c b/net/core/dev.c +index 031e3dc591f1..f39077436e9d 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3825,7 +3825,11 @@ static inline int __dev_xmit_skb(struct +@@ -3833,7 +3833,11 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q, * This permits qdisc->running owner to get the lock more * often and dequeue packets faster. */ @@ -38,3 +38,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (unlikely(contended)) spin_lock(&q->busylock); +-- +2.33.1 + diff --git a/debian/patches-rt/panic__skip_get_random_bytes_for_RT_FULL_in_init_oops_id.patch b/debian/patches-rt/0109-panic-skip-get_random_bytes-for-RT_FULL-in-init_oops.patch index ba587779f..246510703 100644 --- a/debian/patches-rt/panic__skip_get_random_bytes_for_RT_FULL_in_init_oops_id.patch +++ b/debian/patches-rt/0109-panic-skip-get_random_bytes-for-RT_FULL-in-init_oops.patch @@ -1,20 +1,20 @@ -Subject: panic: skip get_random_bytes for RT_FULL in init_oops_id -From: Thomas Gleixner <tglx@linutronix.de> -Date: Tue Jul 14 14:26:34 2015 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 81f0fb3ab564ed0e217e71e17e3c655e2911da60 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Tue, 14 Jul 2015 14:26:34 +0200 +Subject: [PATCH 109/158] panic: skip get_random_bytes for RT_FULL in + init_oops_id +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Disable on -RT. If this is invoked from irq-context we will have problems to acquire the sleeping lock. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - kernel/panic.c | 2 ++ + kernel/panic.c | 2 ++ 1 file changed, 2 insertions(+) ---- + +diff --git a/kernel/panic.c b/kernel/panic.c +index 84c5775d4944..d509c0694af9 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -545,9 +545,11 @@ static u64 oops_id; @@ -29,3 +29,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> oops_id++; return 0; +-- +2.33.1 + diff --git a/debian/patches-rt/x86__stackprotector__Avoid_random_pool_on_rt.patch b/debian/patches-rt/0110-x86-stackprotector-Avoid-random-pool-on-rt.patch index a97efc1e6..cd6772532 100644 --- a/debian/patches-rt/x86__stackprotector__Avoid_random_pool_on_rt.patch +++ b/debian/patches-rt/0110-x86-stackprotector-Avoid-random-pool-on-rt.patch @@ -1,9 +1,8 @@ -Subject: x86: stackprotector: Avoid random pool on rt -From: Thomas Gleixner <tglx@linutronix.de> -Date: Thu Dec 16 14:25:18 2010 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 80bd33fe8e491f64f7abd7610828a2ddb9b163ce Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Thu, 16 Dec 2010 14:25:18 +0100 +Subject: [PATCH 110/158] x86: stackprotector: Avoid random pool on rt +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz CPU bringup calls into the random pool to initialize the stack canary. During boot that works nicely even on RT as the might sleep @@ -15,13 +14,12 @@ entropy and we rely on the TSC randomnness. Reported-by: Carsten Emde <carsten.emde@osadl.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - - --- - arch/x86/include/asm/stackprotector.h | 8 +++++++- + arch/x86/include/asm/stackprotector.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---- + +diff --git a/arch/x86/include/asm/stackprotector.h b/arch/x86/include/asm/stackprotector.h +index 24a8d6c4fb18..2fc22c27df18 100644 --- a/arch/x86/include/asm/stackprotector.h +++ b/arch/x86/include/asm/stackprotector.h @@ -50,7 +50,7 @@ @@ -33,7 +31,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> u64 tsc; #ifdef CONFIG_X86_64 -@@ -61,8 +61,14 @@ static __always_inline void boot_init_st +@@ -61,8 +61,14 @@ static __always_inline void boot_init_stack_canary(void) * of randomness. The TSC only matters for very early init, * there it already has some randomness on most systems. Later * on during the bootup the random pool has true entropy too. @@ -48,3 +46,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> tsc = rdtsc(); canary += tsc + (tsc << 32UL); canary &= CANARY_MASK; +-- +2.33.1 + diff --git a/debian/patches-rt/random__Make_it_work_on_rt.patch b/debian/patches-rt/0111-random-Make-it-work-on-rt.patch index 043a43da2..cd6b892bd 100644 --- a/debian/patches-rt/random__Make_it_work_on_rt.patch +++ b/debian/patches-rt/0111-random-Make-it-work-on-rt.patch @@ -1,9 +1,8 @@ -Subject: random: Make it work on rt -From: Thomas Gleixner <tglx@linutronix.de> -Date: Tue Aug 21 20:38:50 2012 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From b7888983045893431d368e9101c0db985031aa47 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Tue, 21 Aug 2012 20:38:50 +0200 +Subject: [PATCH 111/158] random: Make it work on rt +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Delegate the random insertion to the forced threaded interrupt handler. Store the return IP of the hard interrupt handler in the irq @@ -11,20 +10,19 @@ descriptor and feed it into the random generator as a source of entropy. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - - --- - arch/x86/kernel/cpu/mshyperv.c | 3 ++- - drivers/char/random.c | 11 +++++------ - drivers/hv/hyperv_vmbus.h | 1 + - drivers/hv/vmbus_drv.c | 5 ++++- - include/linux/irqdesc.h | 1 + - include/linux/random.h | 2 +- - kernel/irq/handle.c | 10 ++++++++-- - kernel/irq/manage.c | 6 ++++++ + arch/x86/kernel/cpu/mshyperv.c | 3 ++- + drivers/char/random.c | 11 +++++------ + drivers/hv/hyperv_vmbus.h | 1 + + drivers/hv/vmbus_drv.c | 5 ++++- + include/linux/irqdesc.h | 1 + + include/linux/random.h | 2 +- + kernel/irq/handle.c | 10 ++++++++-- + kernel/irq/manage.c | 6 ++++++ 8 files changed, 28 insertions(+), 11 deletions(-) ---- + +diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c +index ef6316fef99f..86974cd60942 100644 --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c @@ -75,11 +75,12 @@ void hv_remove_vmbus_handler(void) @@ -41,9 +39,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> ack_APIC_irq(); set_irq_regs(old_regs); +diff --git a/drivers/char/random.c b/drivers/char/random.c +index 860900470e17..56b2d5a7e2a0 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c -@@ -1242,26 +1242,25 @@ static __u32 get_reg(struct fast_pool *f +@@ -1242,26 +1242,25 @@ static __u32 get_reg(struct fast_pool *f, struct pt_regs *regs) return *ptr; } @@ -75,6 +75,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> fast_mix(fast_pool); add_interrupt_bench(cycles); +diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h +index d030577ad6a2..ef1db3367df7 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h @@ -19,6 +19,7 @@ @@ -85,6 +87,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #include "hv_trace.h" +diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c +index 392c1ac4f819..c5e9725fb5ff 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -22,6 +22,7 @@ @@ -113,6 +117,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static irqreturn_t vmbus_percpu_isr(int irq, void *dev_id) +diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h +index 59aea39785bf..ab70314af3d5 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h @@ -68,6 +68,7 @@ struct irq_desc { @@ -123,9 +129,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> raw_spinlock_t lock; struct cpumask *percpu_enabled; const struct cpumask *percpu_affinity; +diff --git a/include/linux/random.h b/include/linux/random.h +index f45b8be3e3c4..0e41d0527809 100644 --- a/include/linux/random.h +++ b/include/linux/random.h -@@ -35,7 +35,7 @@ static inline void add_latent_entropy(vo +@@ -35,7 +35,7 @@ static inline void add_latent_entropy(void) {} extern void add_input_randomness(unsigned int type, unsigned int code, unsigned int value) __latent_entropy; @@ -134,9 +142,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> extern void get_random_bytes(void *buf, int nbytes); extern int wait_for_random_bytes(void); +diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c +index 221d80c31e94..1543934f26d2 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c -@@ -190,12 +190,18 @@ irqreturn_t __handle_irq_event_percpu(st +@@ -190,12 +190,18 @@ irqreturn_t __handle_irq_event_percpu(struct irq_desc *desc, unsigned int *flags irqreturn_t handle_irq_event_percpu(struct irq_desc *desc) { @@ -157,6 +167,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (!irq_settings_no_debug(desc)) note_interrupt(desc, retval); +diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c +index 66d51963e837..0f966288a648 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -1281,6 +1281,12 @@ static int irq_thread(void *data) @@ -172,3 +184,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> wake_threads_waitq(desc); } +-- +2.33.1 + diff --git a/debian/patches-rt/0002-drm-i915-Don-t-disable-interrupts-and-pretend-a-lock.patch b/debian/patches-rt/0112-drm-i915-Don-t-disable-interrupts-and-pretend-a-lock.patch index 5c01d5d70..dfa7fa2ec 100644 --- a/debian/patches-rt/0002-drm-i915-Don-t-disable-interrupts-and-pretend-a-lock.patch +++ b/debian/patches-rt/0112-drm-i915-Don-t-disable-interrupts-and-pretend-a-lock.patch @@ -1,8 +1,9 @@ +From 984561d4a382549442850e7559f006b63495d5f4 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 7 Jul 2020 12:25:11 +0200 -Subject: [PATCH 02/10] drm/i915: Don't disable interrupts and pretend a lock +Subject: [PATCH 112/158] drm/i915: Don't disable interrupts and pretend a lock as been acquired in __timeline_mark_lock(). -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz This is a revert of commits d67739268cf0e ("drm/i915/gt: Mark up the nested engine-pm timeline lock as irqsafe") @@ -28,15 +29,17 @@ identified spots which relied on the lockdep annotation. Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - drivers/gpu/drm/i915/gt/intel_context.h | 3 +- - drivers/gpu/drm/i915/gt/intel_context_types.h | 1 - drivers/gpu/drm/i915/gt/intel_engine_pm.c | 38 +------------------------- - drivers/gpu/drm/i915/i915_request.h | 3 +- + drivers/gpu/drm/i915/gt/intel_context.h | 3 +- + drivers/gpu/drm/i915/gt/intel_context_types.h | 1 + + drivers/gpu/drm/i915/gt/intel_engine_pm.c | 38 +------------------ + drivers/gpu/drm/i915/i915_request.h | 3 +- 4 files changed, 7 insertions(+), 38 deletions(-) +diff --git a/drivers/gpu/drm/i915/gt/intel_context.h b/drivers/gpu/drm/i915/gt/intel_context.h +index c41098950746..601274ba86e4 100644 --- a/drivers/gpu/drm/i915/gt/intel_context.h +++ b/drivers/gpu/drm/i915/gt/intel_context.h -@@ -163,7 +163,8 @@ static inline void intel_context_enter(s +@@ -163,7 +163,8 @@ static inline void intel_context_enter(struct intel_context *ce) static inline void intel_context_mark_active(struct intel_context *ce) { @@ -46,6 +49,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ++ce->active_count; } +diff --git a/drivers/gpu/drm/i915/gt/intel_context_types.h b/drivers/gpu/drm/i915/gt/intel_context_types.h +index e54351a170e2..1022be795e68 100644 --- a/drivers/gpu/drm/i915/gt/intel_context_types.h +++ b/drivers/gpu/drm/i915/gt/intel_context_types.h @@ -112,6 +112,7 @@ struct intel_context { @@ -56,9 +61,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct { u64 timeout_us; +diff --git a/drivers/gpu/drm/i915/gt/intel_engine_pm.c b/drivers/gpu/drm/i915/gt/intel_engine_pm.c +index 1f07ac4e0672..e84f03a276d1 100644 --- a/drivers/gpu/drm/i915/gt/intel_engine_pm.c +++ b/drivers/gpu/drm/i915/gt/intel_engine_pm.c -@@ -80,39 +80,6 @@ static int __engine_unpark(struct intel_ +@@ -80,39 +80,6 @@ static int __engine_unpark(struct intel_wakeref *wf) return 0; } @@ -98,7 +105,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static void duration(struct dma_fence *fence, struct dma_fence_cb *cb) { struct i915_request *rq = to_request(fence); -@@ -159,7 +126,6 @@ static bool switch_to_kernel_context(str +@@ -159,7 +126,6 @@ static bool switch_to_kernel_context(struct intel_engine_cs *engine) { struct intel_context *ce = engine->kernel_context; struct i915_request *rq; @@ -106,7 +113,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> bool result = true; /* GPU is pointing to the void, as good as in the kernel context. */ -@@ -201,7 +167,7 @@ static bool switch_to_kernel_context(str +@@ -201,7 +167,7 @@ static bool switch_to_kernel_context(struct intel_engine_cs *engine) * engine->wakeref.count, we may see the request completion and retire * it causing an underflow of the engine->wakeref. */ @@ -115,7 +122,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> GEM_BUG_ON(atomic_read(&ce->timeline->active_count) < 0); rq = __i915_request_create(ce, GFP_NOWAIT); -@@ -233,7 +199,7 @@ static bool switch_to_kernel_context(str +@@ -233,7 +199,7 @@ static bool switch_to_kernel_context(struct intel_engine_cs *engine) result = false; out_unlock: @@ -124,9 +131,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return result; } +diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h +index 1bc1349ba3c2..a2f713b4ac2f 100644 --- a/drivers/gpu/drm/i915/i915_request.h +++ b/drivers/gpu/drm/i915/i915_request.h -@@ -609,7 +609,8 @@ i915_request_timeline(const struct i915_ +@@ -609,7 +609,8 @@ i915_request_timeline(const struct i915_request *rq) { /* Valid only while the request is being constructed (or retired). */ return rcu_dereference_protected(rq->timeline, @@ -136,3 +145,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } static inline struct i915_gem_context * +-- +2.33.1 + diff --git a/debian/patches-rt/0003-drm-i915-Use-preempt_disable-enable_rt-where-recomme.patch b/debian/patches-rt/0113-drm-i915-Use-preempt_disable-enable_rt-where-recomme.patch index f864edec6..be013d015 100644 --- a/debian/patches-rt/0003-drm-i915-Use-preempt_disable-enable_rt-where-recomme.patch +++ b/debian/patches-rt/0113-drm-i915-Use-preempt_disable-enable_rt-where-recomme.patch @@ -1,8 +1,9 @@ +From 3aeb9dcef6e97d6f6916ebfe652df9f713b29687 Mon Sep 17 00:00:00 2001 From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Sat, 27 Feb 2016 08:09:11 +0100 -Subject: [PATCH 03/10] drm/i915: Use preempt_disable/enable_rt() where +Subject: [PATCH 113/158] drm/i915: Use preempt_disable/enable_rt() where recommended -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Mario Kleiner suggest in commit ad3543ede630f ("drm/intel: Push get_scanout_position() timestamping into kms driver.") @@ -29,12 +30,14 @@ Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - drivers/gpu/drm/i915/i915_irq.c | 6 ++++-- + drivers/gpu/drm/i915/i915_irq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) +diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c +index 9bc4f4a8e12e..547347241a47 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c -@@ -886,7 +886,8 @@ static bool i915_get_crtc_scanoutpos(str +@@ -886,7 +886,8 @@ static bool i915_get_crtc_scanoutpos(struct drm_crtc *_crtc, */ spin_lock_irqsave(&dev_priv->uncore.lock, irqflags); @@ -44,7 +47,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* Get optional system timestamp before query. */ if (stime) -@@ -950,7 +951,8 @@ static bool i915_get_crtc_scanoutpos(str +@@ -950,7 +951,8 @@ static bool i915_get_crtc_scanoutpos(struct drm_crtc *_crtc, if (etime) *etime = ktime_get(); @@ -54,3 +57,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); +-- +2.33.1 + diff --git a/debian/patches-rt/0004-drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch b/debian/patches-rt/0114-drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch index 674fa6ec2..e4e90e645 100644 --- a/debian/patches-rt/0004-drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch +++ b/debian/patches-rt/0114-drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch @@ -1,8 +1,9 @@ +From 2bc6fee71ae1bca4af2fdbeafe65e13bb5d7dae2 Mon Sep 17 00:00:00 2001 From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Sat, 27 Feb 2016 09:01:42 +0100 -Subject: [PATCH 04/10] drm/i915: Don't disable interrupts on PREEMPT_RT during - atomic updates -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 114/158] drm/i915: Don't disable interrupts on PREEMPT_RT + during atomic updates +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Commit 8d7849db3eab7 ("drm/i915: Make sprite updates atomic") @@ -32,12 +33,14 @@ Don't disable interrupts on PREEMPT_RT during atomic updates. Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - drivers/gpu/drm/i915/display/intel_crtc.c | 15 ++++++++++----- + drivers/gpu/drm/i915/display/intel_crtc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) +diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c +index 254e67141a77..7a39029b083f 100644 --- a/drivers/gpu/drm/i915/display/intel_crtc.c +++ b/drivers/gpu/drm/i915/display/intel_crtc.c -@@ -425,7 +425,8 @@ void intel_pipe_update_start(const struc +@@ -425,7 +425,8 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state) */ intel_psr_wait_for_idle(new_crtc_state); @@ -47,7 +50,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> crtc->debug.min_vbl = min; crtc->debug.max_vbl = max; -@@ -450,11 +451,13 @@ void intel_pipe_update_start(const struc +@@ -450,11 +451,13 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state) break; } @@ -63,7 +66,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } finish_wait(wq, &wait); -@@ -487,7 +490,8 @@ void intel_pipe_update_start(const struc +@@ -487,7 +490,8 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state) return; irq_disable: @@ -73,7 +76,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } #if IS_ENABLED(CONFIG_DRM_I915_DEBUG_VBLANK_EVADE) -@@ -566,7 +570,8 @@ void intel_pipe_update_end(struct intel_ +@@ -566,7 +570,8 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state) new_crtc_state->uapi.event = NULL; } @@ -83,3 +86,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* Send VRR Push to terminate Vblank */ intel_vrr_send_push(new_crtc_state); +-- +2.33.1 + diff --git a/debian/patches-rt/0005-drm-i915-Don-t-check-for-atomic-context-on-PREEMPT_R.patch b/debian/patches-rt/0115-drm-i915-Don-t-check-for-atomic-context-on-PREEMPT_R.patch index b2e2766b8..d99754240 100644 --- a/debian/patches-rt/0005-drm-i915-Don-t-check-for-atomic-context-on-PREEMPT_R.patch +++ b/debian/patches-rt/0115-drm-i915-Don-t-check-for-atomic-context-on-PREEMPT_R.patch @@ -1,7 +1,9 @@ +From bb1b4ff772dc3337945a9bb026ab9bb4187004ae Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 25 Oct 2021 15:05:18 +0200 -Subject: [PATCH 05/10] drm/i915: Don't check for atomic context on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 115/158] drm/i915: Don't check for atomic context on + PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The !in_atomic() check in _wait_for_atomic() triggers on PREEMPT_RT because the uncore::lock is a spinlock_t and does not disable @@ -14,12 +16,14 @@ currently unsure about changing this. Link: https://lore.kernel.org/all/20211006164628.s2mtsdd2jdbfyf7g@linutronix.de/ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - drivers/gpu/drm/i915/i915_utils.h | 2 +- + drivers/gpu/drm/i915/i915_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h +index 5259edacde38..b36b27c09049 100644 --- a/drivers/gpu/drm/i915/i915_utils.h +++ b/drivers/gpu/drm/i915/i915_utils.h -@@ -343,7 +343,7 @@ wait_remaining_ms_from_jiffies(unsigned +@@ -343,7 +343,7 @@ wait_remaining_ms_from_jiffies(unsigned long timestamp_jiffies, int to_wait_ms) #define wait_for(COND, MS) _wait_for((COND), (MS) * 1000, 10, 1000) /* If CONFIG_PREEMPT_COUNT is disabled, in_atomic() always reports false. */ @@ -28,3 +32,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) WARN_ON_ONCE((ATOMIC) && !in_atomic()) #else # define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) do { } while (0) +-- +2.33.1 + diff --git a/debian/patches-rt/0006-drm-i915-Disable-tracing-points-on-PREEMPT_RT.patch b/debian/patches-rt/0116-drm-i915-Disable-tracing-points-on-PREEMPT_RT.patch index c80aa18c7..d692f7cc3 100644 --- a/debian/patches-rt/0006-drm-i915-Disable-tracing-points-on-PREEMPT_RT.patch +++ b/debian/patches-rt/0116-drm-i915-Disable-tracing-points-on-PREEMPT_RT.patch @@ -1,7 +1,8 @@ +From 9da45a4429cbbdba0c7815aab757206c26358f5b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 6 Dec 2018 09:52:20 +0100 -Subject: [PATCH 06/10] drm/i915: Disable tracing points on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 116/158] drm/i915: Disable tracing points on PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Luca Abeni reported this: | BUG: scheduling while atomic: kworker/u8:2/15203/0x00000003 @@ -27,9 +28,11 @@ Reported-by: Luca Abeni <lucabe72@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - drivers/gpu/drm/i915/i915_trace.h | 4 ++++ + drivers/gpu/drm/i915/i915_trace.h | 4 ++++ 1 file changed, 4 insertions(+) +diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h +index 63fec1c3c132..0cddc5bb0ebe 100644 --- a/drivers/gpu/drm/i915/i915_trace.h +++ b/drivers/gpu/drm/i915/i915_trace.h @@ -2,6 +2,10 @@ @@ -43,3 +46,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #include <linux/stringify.h> #include <linux/types.h> #include <linux/tracepoint.h> +-- +2.33.1 + diff --git a/debian/patches-rt/0007-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch b/debian/patches-rt/0117-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch index 8a833fdf0..eeb403f2e 100644 --- a/debian/patches-rt/0007-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch +++ b/debian/patches-rt/0117-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch @@ -1,8 +1,9 @@ +From 686fe48fc70d3b4dcd9bcebe4b78d0737ca9b8d4 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 19 Dec 2018 10:47:02 +0100 -Subject: [PATCH 07/10] drm/i915: skip DRM_I915_LOW_LEVEL_TRACEPOINTS with +Subject: [PATCH 117/158] drm/i915: skip DRM_I915_LOW_LEVEL_TRACEPOINTS with NOTRACE -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The order of the header files is important. If this header file is included after tracepoint.h was included then the NOTRACE here becomes a @@ -13,12 +14,14 @@ Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- - drivers/gpu/drm/i915/i915_trace.h | 2 +- + drivers/gpu/drm/i915/i915_trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h +index 0cddc5bb0ebe..f345a0f12bf6 100644 --- a/drivers/gpu/drm/i915/i915_trace.h +++ b/drivers/gpu/drm/i915/i915_trace.h -@@ -826,7 +826,7 @@ DEFINE_EVENT(i915_request, i915_request_ +@@ -823,7 +823,7 @@ DEFINE_EVENT(i915_request, i915_request_add, TP_ARGS(rq) ); @@ -27,3 +30,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> DEFINE_EVENT(i915_request, i915_request_guc_submit, TP_PROTO(struct i915_request *rq), TP_ARGS(rq) +-- +2.33.1 + diff --git a/debian/patches-rt/0008-drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch b/debian/patches-rt/0118-drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch index 7f85c293b..b01a06021 100644 --- a/debian/patches-rt/0008-drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch +++ b/debian/patches-rt/0118-drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch @@ -1,7 +1,8 @@ +From ea944f22dc1a9c1d20813eebd0d9a4a6583abba3 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 8 Sep 2021 17:18:00 +0200 -Subject: [PATCH 08/10] drm/i915/gt: Queue and wait for the irq_work item. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 118/158] drm/i915/gt: Queue and wait for the irq_work item. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Disabling interrupts and invoking the irq_work function directly breaks on PREEMPT_RT. @@ -22,12 +23,14 @@ Reported-by: Clark Williams <williams@redhat.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> --- - drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 5 ++--- + drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) +diff --git a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +index 209cf265bf74..6e1b9068d944 100644 --- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c -@@ -311,10 +311,9 @@ void __intel_breadcrumbs_park(struct int +@@ -311,10 +311,9 @@ void __intel_breadcrumbs_park(struct intel_breadcrumbs *b) /* Kick the work once more to drain the signalers, and disarm the irq */ irq_work_sync(&b->irq_work); while (READ_ONCE(b->irq_armed) && !atomic_read(&b->active)) { @@ -40,3 +43,6 @@ Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> } } +-- +2.33.1 + diff --git a/debian/patches-rt/0009-drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch b/debian/patches-rt/0119-drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch index c06c4c33a..2ecd5fb52 100644 --- a/debian/patches-rt/0009-drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch +++ b/debian/patches-rt/0119-drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch @@ -1,8 +1,9 @@ +From a8b06780407b85436481752a4d7817ea63328939 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 8 Sep 2021 19:03:41 +0200 -Subject: [PATCH 09/10] drm/i915/gt: Use spin_lock_irq() instead of +Subject: [PATCH 119/158] drm/i915/gt: Use spin_lock_irq() instead of local_irq_disable() + spin_lock() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz execlists_dequeue() is invoked from a function which uses local_irq_disable() to disable interrupts so the spin_lock() behaves @@ -23,12 +24,14 @@ Reported-by: Clark Williams <williams@redhat.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> --- - drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 17 +++++------------ + .../drm/i915/gt/intel_execlists_submission.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) +diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c +index cafb0608ffb4..07156996fc82 100644 --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c -@@ -1283,7 +1283,7 @@ static void execlists_dequeue(struct int +@@ -1283,7 +1283,7 @@ static void execlists_dequeue(struct intel_engine_cs *engine) * and context switches) submission. */ @@ -37,7 +40,7 @@ Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> /* * If the queue is higher priority than the last -@@ -1383,7 +1383,7 @@ static void execlists_dequeue(struct int +@@ -1383,7 +1383,7 @@ static void execlists_dequeue(struct intel_engine_cs *engine) * Even if ELSP[1] is occupied and not worthy * of timeslices, our queue might be. */ @@ -46,7 +49,7 @@ Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> return; } } -@@ -1409,7 +1409,7 @@ static void execlists_dequeue(struct int +@@ -1409,7 +1409,7 @@ static void execlists_dequeue(struct intel_engine_cs *engine) if (last && !can_merge_rq(last, rq)) { spin_unlock(&ve->base.sched_engine->lock); @@ -55,7 +58,7 @@ Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> return; /* leave this for another sibling */ } -@@ -1571,7 +1571,7 @@ static void execlists_dequeue(struct int +@@ -1571,7 +1571,7 @@ static void execlists_dequeue(struct intel_engine_cs *engine) */ sched_engine->queue_priority_hint = queue_prio(sched_engine); i915_sched_engine_reset_on_empty(sched_engine); @@ -64,7 +67,7 @@ Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> /* * We can skip poking the HW if we ended up with exactly the same set -@@ -1597,13 +1597,6 @@ static void execlists_dequeue(struct int +@@ -1597,13 +1597,6 @@ static void execlists_dequeue(struct intel_engine_cs *engine) } } @@ -78,7 +81,7 @@ Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> static void clear_ports(struct i915_request **ports, int count) { memset_p((void **)ports, NULL, count); -@@ -2427,7 +2420,7 @@ static void execlists_submission_tasklet +@@ -2423,7 +2416,7 @@ static void execlists_submission_tasklet(struct tasklet_struct *t) } if (!engine->execlists.pending[0]) { @@ -87,3 +90,6 @@ Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> start_timeslice(engine); } +-- +2.33.1 + diff --git a/debian/patches-rt/0010-drm-i915-Drop-the-irqs_disabled-check.patch b/debian/patches-rt/0120-drm-i915-Drop-the-irqs_disabled-check.patch index 711f1de53..2c226d36d 100644 --- a/debian/patches-rt/0010-drm-i915-Drop-the-irqs_disabled-check.patch +++ b/debian/patches-rt/0120-drm-i915-Drop-the-irqs_disabled-check.patch @@ -1,7 +1,8 @@ +From e17e5fa1f5b6a7d1d76a878487e15ee9f3e6cb07 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 1 Oct 2021 20:01:03 +0200 -Subject: [PATCH 10/10] drm/i915: Drop the irqs_disabled() check -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 120/158] drm/i915: Drop the irqs_disabled() check +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The !irqs_disabled() check triggers on PREEMPT_RT even with i915_sched_engine::lock acquired. The reason is the lock is transformed @@ -16,12 +17,14 @@ Remove the !irqs_disabled() check. Reported-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - drivers/gpu/drm/i915/i915_request.c | 2 -- + drivers/gpu/drm/i915/i915_request.c | 2 -- 1 file changed, 2 deletions(-) +diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c +index 79da5eca60af..b9dd6100c6d1 100644 --- a/drivers/gpu/drm/i915/i915_request.c +++ b/drivers/gpu/drm/i915/i915_request.c -@@ -559,7 +559,6 @@ bool __i915_request_submit(struct i915_r +@@ -559,7 +559,6 @@ bool __i915_request_submit(struct i915_request *request) RQ_TRACE(request, "\n"); @@ -29,7 +32,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> lockdep_assert_held(&engine->sched_engine->lock); /* -@@ -668,7 +667,6 @@ void __i915_request_unsubmit(struct i915 +@@ -668,7 +667,6 @@ void __i915_request_unsubmit(struct i915_request *request) */ RQ_TRACE(request, "\n"); @@ -37,3 +40,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> lockdep_assert_held(&engine->sched_engine->lock); /* +-- +2.33.1 + diff --git a/debian/patches-rt/signal_x86__Delay_calling_signals_in_atomic.patch b/debian/patches-rt/0121-signal-x86-Delay-calling-signals-in-atomic.patch index 987043395..172162922 100644 --- a/debian/patches-rt/signal_x86__Delay_calling_signals_in_atomic.patch +++ b/debian/patches-rt/0121-signal-x86-Delay-calling-signals-in-atomic.patch @@ -1,9 +1,8 @@ -Subject: signal/x86: Delay calling signals in atomic -From: Oleg Nesterov <oleg@redhat.com> -Date: Tue Jul 14 14:26:34 2015 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From f54bb63fcdcd3eab41bb0806abd6f9d020d0c1b7 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov <oleg@redhat.com> +Date: Tue, 14 Jul 2015 14:26:34 +0200 +Subject: [PATCH 121/158] signal/x86: Delay calling signals in atomic +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz On x86_64 we must disable preemption before we enable interrupts for stack faults, int3 and debugging, because the current task is using @@ -34,15 +33,15 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> [bigeasy: also needed on 32bit as per Yang Shi <yang.shi@linaro.org>] Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/x86/include/asm/signal.h | 13 +++++++++++++ - include/linux/sched.h | 4 ++++ - kernel/entry/common.c | 8 ++++++++ - kernel/signal.c | 28 ++++++++++++++++++++++++++++ + arch/x86/include/asm/signal.h | 13 +++++++++++++ + include/linux/sched.h | 4 ++++ + kernel/entry/common.c | 8 ++++++++ + kernel/signal.c | 28 ++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+) ---- + +diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h +index 2dfb5fea13af..fc03f4f7ed84 100644 --- a/arch/x86/include/asm/signal.h +++ b/arch/x86/include/asm/signal.h @@ -28,6 +28,19 @@ typedef struct { @@ -65,6 +64,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifndef CONFIG_COMPAT #define compat_sigset_t compat_sigset_t typedef sigset_t compat_sigset_t; +diff --git a/include/linux/sched.h b/include/linux/sched.h +index 04172b57d71d..fe5f78007212 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1080,6 +1080,10 @@ struct task_struct { @@ -78,9 +79,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> unsigned long sas_ss_sp; size_t sas_ss_size; unsigned int sas_ss_flags; +diff --git a/kernel/entry/common.c b/kernel/entry/common.c +index d5a61d565ad5..b01531ea4067 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c -@@ -162,6 +162,14 @@ static unsigned long exit_to_user_mode_l +@@ -162,6 +162,14 @@ static unsigned long exit_to_user_mode_loop(struct pt_regs *regs, if (ti_work & _TIF_NEED_RESCHED) schedule(); @@ -95,9 +98,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (ti_work & _TIF_UPROBE) uprobe_notify_resume(regs); +diff --git a/kernel/signal.c b/kernel/signal.c +index cda61fdbd664..d3a69e89b9ee 100644 --- a/kernel/signal.c +++ b/kernel/signal.c -@@ -1317,6 +1317,34 @@ force_sig_info_to_task(struct kernel_sig +@@ -1324,6 +1324,34 @@ force_sig_info_to_task(struct kernel_siginfo *info, struct task_struct *t, struct k_sigaction *action; int sig = info->si_signo; @@ -132,3 +137,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> spin_lock_irqsave(&t->sighand->siglock, flags); action = &t->sighand->action[sig-1]; ignored = action->sa.sa_handler == SIG_IGN; +-- +2.33.1 + diff --git a/debian/patches-rt/x86__kvm_Require_const_tsc_for_RT.patch b/debian/patches-rt/0122-x86-kvm-Require-const-tsc-for-RT.patch index bf084fcfe..2280b6f75 100644 --- a/debian/patches-rt/x86__kvm_Require_const_tsc_for_RT.patch +++ b/debian/patches-rt/0122-x86-kvm-Require-const-tsc-for-RT.patch @@ -1,9 +1,8 @@ -Subject: x86: kvm Require const tsc for RT -From: Thomas Gleixner <tglx@linutronix.de> -Date: Sun Nov 6 12:26:18 2011 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 252c8d61dcf819025c680b57e6d39b6519e311c1 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Sun, 6 Nov 2011 12:26:18 +0100 +Subject: [PATCH 122/158] x86: kvm Require const tsc for RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Non constant TSC is a nightmare on bare metal already, but with virtualization it becomes a complete disaster because the workarounds @@ -11,15 +10,15 @@ are horrible latency wise. That's also a preliminary for running RT in a guest on top of a RT host. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/x86/kvm/x86.c | 8 ++++++++ + arch/x86/kvm/x86.c | 8 ++++++++ 1 file changed, 8 insertions(+) ---- + +diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c +index eff065ce6f8e..d47927a4e8c3 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c -@@ -8433,6 +8433,14 @@ int kvm_arch_init(void *opaque) +@@ -8511,6 +8511,14 @@ int kvm_arch_init(void *opaque) goto out; } @@ -34,3 +33,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> r = -ENOMEM; x86_fpu_cache = kmem_cache_create("x86_fpu", sizeof(struct fpu), __alignof__(struct fpu), SLAB_ACCOUNT, +-- +2.33.1 + diff --git a/debian/patches-rt/x86__Allow_to_enable_RT.patch b/debian/patches-rt/0123-x86-Allow-to-enable-RT.patch index ffa6d3946..6144867f8 100644 --- a/debian/patches-rt/x86__Allow_to_enable_RT.patch +++ b/debian/patches-rt/0123-x86-Allow-to-enable-RT.patch @@ -1,20 +1,19 @@ -Subject: x86: Allow to enable RT -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Wed Aug 7 18:15:38 2019 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 7e7e3cbe65aab1fb79d4d3d4db79f8c6d5c15121 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Wed, 7 Aug 2019 18:15:38 +0200 +Subject: [PATCH 123/158] x86: Allow to enable RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Allow to select RT. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/x86/Kconfig | 1 + + arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) ---- + +diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig +index 1f96809606ac..19d4062f7187 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -27,6 +27,7 @@ config X86_64 @@ -25,3 +24,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> select ARCH_USE_CMPXCHG_LOCKREF select HAVE_ARCH_SOFT_DIRTY select MODULES_USE_ELF_RELA +-- +2.33.1 + diff --git a/debian/patches-rt/x86__Enable_RT_also_on_32bit.patch b/debian/patches-rt/0124-x86-Enable-RT-also-on-32bit.patch index c9058c476..8ed7b541d 100644 --- a/debian/patches-rt/x86__Enable_RT_also_on_32bit.patch +++ b/debian/patches-rt/0124-x86-Enable-RT-also-on-32bit.patch @@ -1,18 +1,17 @@ -Subject: x86: Enable RT also on 32bit -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Thu Nov 7 17:49:20 2019 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 63d520eb2434271562525e57bb373facbf538d70 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Thu, 7 Nov 2019 17:49:20 +0100 +Subject: [PATCH 124/158] x86: Enable RT also on 32bit +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/x86/Kconfig | 2 +- + arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---- + +diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig +index 19d4062f7187..a0352d57506e 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -27,7 +27,6 @@ config X86_64 @@ -31,3 +30,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_MEMTEST select ARCH_USE_QUEUED_RWLOCKS +-- +2.33.1 + diff --git a/debian/patches-rt/genirq__update_irq_set_irqchip_state_documentation.patch b/debian/patches-rt/0125-genirq-update-irq_set_irqchip_state-documentation.patch index e32dd65df..5d92d1b53 100644 --- a/debian/patches-rt/genirq__update_irq_set_irqchip_state_documentation.patch +++ b/debian/patches-rt/0125-genirq-update-irq_set_irqchip_state-documentation.patch @@ -1,9 +1,8 @@ -Subject: genirq: update irq_set_irqchip_state documentation -From: Josh Cartwright <joshc@ni.com> -Date: Thu Feb 11 11:54:00 2016 -0600 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 769594e7f1186b7664fceeac6711185f14081ab7 Mon Sep 17 00:00:00 2001 From: Josh Cartwright <joshc@ni.com> +Date: Thu, 11 Feb 2016 11:54:00 -0600 +Subject: [PATCH 125/158] genirq: update irq_set_irqchip_state documentation +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz On -rt kernels, the use of migrate_disable()/migrate_enable() is sufficient to guarantee a task isn't moved to another CPU. Update the @@ -13,12 +12,14 @@ Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lkml.kernel.org/r/20210917103055.92150-1-bigeasy@linutronix.de --- - kernel/irq/manage.c | 2 +- + kernel/irq/manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---- + +diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c +index 0f966288a648..894e4db1fffc 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c -@@ -2833,7 +2833,7 @@ EXPORT_SYMBOL_GPL(irq_get_irqchip_state) +@@ -2833,7 +2833,7 @@ EXPORT_SYMBOL_GPL(irq_get_irqchip_state); * This call sets the internal irqchip state of an interrupt, * depending on the value of @which. * @@ -27,3 +28,6 @@ Link: https://lkml.kernel.org/r/20210917103055.92150-1-bigeasy@linutronix.de * interrupt controller has per-cpu registers. */ int irq_set_irqchip_state(unsigned int irq, enum irqchip_irq_state which, +-- +2.33.1 + diff --git a/debian/patches-rt/ASoC-mediatek-mt8195-Remove-unsued-irqs_lock.patch b/debian/patches-rt/0126-ASoC-mediatek-mt8195-Remove-unsued-irqs_lock.patch index 4ab40ee8e..a3faa392b 100644 --- a/debian/patches-rt/ASoC-mediatek-mt8195-Remove-unsued-irqs_lock.patch +++ b/debian/patches-rt/0126-ASoC-mediatek-mt8195-Remove-unsued-irqs_lock.patch @@ -1,7 +1,8 @@ +From ced943bef5fbc383f71f226aac3132dd597b2990 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 9 Sep 2021 10:15:30 +0200 -Subject: [PATCH] ASoC: mediatek: mt8195: Remove unsued irqs_lock. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 126/158] ASoC: mediatek: mt8195: Remove unsued irqs_lock. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz irqs_lock is not used, never was. @@ -15,12 +16,14 @@ Cc: Takashi Iwai <tiwai@suse.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - sound/soc/mediatek/common/mtk-afe-fe-dai.c | 1 - + sound/soc/mediatek/common/mtk-afe-fe-dai.c | 1 - 1 file changed, 1 deletion(-) +diff --git a/sound/soc/mediatek/common/mtk-afe-fe-dai.c b/sound/soc/mediatek/common/mtk-afe-fe-dai.c +index e95c7c018e7d..4f2c2379531b 100644 --- a/sound/soc/mediatek/common/mtk-afe-fe-dai.c +++ b/sound/soc/mediatek/common/mtk-afe-fe-dai.c -@@ -288,7 +288,6 @@ const struct snd_soc_dai_ops mtk_afe_fe_ +@@ -288,7 +288,6 @@ const struct snd_soc_dai_ops mtk_afe_fe_ops = { }; EXPORT_SYMBOL_GPL(mtk_afe_fe_ops); @@ -28,3 +31,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> int mtk_dynamic_irq_acquire(struct mtk_base_afe *afe) { int i; +-- +2.33.1 + diff --git a/debian/patches-rt/smack-Guard-smack_ipv6_lock-definition-within-a-SMAC.patch b/debian/patches-rt/0127-smack-Guard-smack_ipv6_lock-definition-within-a-SMAC.patch index 1f66e45b7..68930f039 100644 --- a/debian/patches-rt/smack-Guard-smack_ipv6_lock-definition-within-a-SMAC.patch +++ b/debian/patches-rt/0127-smack-Guard-smack_ipv6_lock-definition-within-a-SMAC.patch @@ -1,8 +1,9 @@ +From c2eb7900890e2ef18173ba1c33ffe20156b7dcf0 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 9 Sep 2021 12:18:29 +0200 -Subject: [PATCH] smack: Guard smack_ipv6_lock definition within a +Subject: [PATCH 127/158] smack: Guard smack_ipv6_lock definition within a SMACK_IPV6_PORT_LABELING block -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The mutex smack_ipv6_lock is only used with the SMACK_IPV6_PORT_LABELING block but its definition is outside of the block. This leads to a @@ -27,9 +28,11 @@ Cc: James Morris <jmorris@namei.org> Cc: "Serge E. Hallyn" <serge@hallyn.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - security/smack/smack_lsm.c | 9 ++++++--- + security/smack/smack_lsm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) +diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c +index 21a0e7c3b8de..e7dd316da551 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -51,8 +51,10 @@ @@ -43,7 +46,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct kmem_cache *smack_rule_cache; int smack_enabled __initdata; -@@ -2603,7 +2605,6 @@ static void smk_ipv6_port_label(struct s +@@ -2603,7 +2605,6 @@ static void smk_ipv6_port_label(struct socket *sock, struct sockaddr *address) mutex_unlock(&smack_ipv6_lock); return; } @@ -51,7 +54,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /** * smk_ipv6_port_check - check Smack port access -@@ -2666,6 +2667,7 @@ static int smk_ipv6_port_check(struct so +@@ -2666,6 +2667,7 @@ static int smk_ipv6_port_check(struct sock *sk, struct sockaddr_in6 *address, return smk_ipv6_check(skp, object, address, act); } @@ -59,7 +62,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /** * smack_inode_setsecurity - set smack xattrs -@@ -2852,8 +2854,9 @@ static int smack_socket_connect(struct s +@@ -2852,8 +2854,9 @@ static int smack_socket_connect(struct socket *sock, struct sockaddr *sap, rc = smk_ipv6_check(ssp->smk_out, rsp, sip, SMK_CONNECTING); } @@ -71,3 +74,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return rc; } +-- +2.33.1 + diff --git a/debian/patches-rt/virt-acrn-Remove-unsued-acrn_irqfds_mutex.patch b/debian/patches-rt/0128-virt-acrn-Remove-unsued-acrn_irqfds_mutex.patch index 97b10c599..016a0f331 100644 --- a/debian/patches-rt/virt-acrn-Remove-unsued-acrn_irqfds_mutex.patch +++ b/debian/patches-rt/0128-virt-acrn-Remove-unsued-acrn_irqfds_mutex.patch @@ -1,7 +1,8 @@ +From 9c964f7eb3bfcf4a1ca0f86a70c0416ba24870b5 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 9 Sep 2021 10:15:30 +0200 -Subject: [PATCH] virt: acrn: Remove unsued acrn_irqfds_mutex. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 128/158] virt: acrn: Remove unsued acrn_irqfds_mutex. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz acrn_irqfds_mutex is not used, never was. @@ -11,9 +12,11 @@ Fixes: aa3b483ff1d71 ("virt: acrn: Introduce irqfd") Cc: Fei Li <fei1.li@intel.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - drivers/virt/acrn/irqfd.c | 1 - + drivers/virt/acrn/irqfd.c | 1 - 1 file changed, 1 deletion(-) +diff --git a/drivers/virt/acrn/irqfd.c b/drivers/virt/acrn/irqfd.c +index df5184979b28..d4ad211dce7a 100644 --- a/drivers/virt/acrn/irqfd.c +++ b/drivers/virt/acrn/irqfd.c @@ -17,7 +17,6 @@ @@ -24,3 +27,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /** * struct hsm_irqfd - Properties of HSM irqfd +-- +2.33.1 + diff --git a/debian/patches-rt/tpm_tis__fix_stall_after_iowrites.patch b/debian/patches-rt/0129-tpm_tis-fix-stall-after-iowrite-s.patch index 012bed7fd..185a49935 100644 --- a/debian/patches-rt/tpm_tis__fix_stall_after_iowrites.patch +++ b/debian/patches-rt/0129-tpm_tis-fix-stall-after-iowrite-s.patch @@ -1,9 +1,8 @@ -Subject: tpm_tis: fix stall after iowrite*()s -From: Haris Okanovic <haris.okanovic@ni.com> -Date: Tue Aug 15 15:13:08 2017 -0500 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From b187bc993d1f44fe952d425995b06b888aa79b14 Mon Sep 17 00:00:00 2001 From: Haris Okanovic <haris.okanovic@ni.com> +Date: Tue, 15 Aug 2017 15:13:08 -0500 +Subject: [PATCH 129/158] tpm_tis: fix stall after iowrite*()s +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz ioread8() operations to TPM MMIO addresses can stall the cpu when immediately following a sequence of iowrite*()'s to the same region. @@ -23,15 +22,15 @@ amortize the cost of flushing data to chip across multiple instructions. Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - drivers/char/tpm/tpm_tis.c | 29 +++++++++++++++++++++++++++-- + drivers/char/tpm/tpm_tis.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) ---- + +diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c +index d3f2e5364c27..9c4a99757afd 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c -@@ -50,6 +50,31 @@ static inline struct tpm_tis_tcg_phy *to +@@ -50,6 +50,31 @@ static inline struct tpm_tis_tcg_phy *to_tpm_tis_tcg_phy(struct tpm_tis_data *da return container_of(data, struct tpm_tis_tcg_phy, priv); } @@ -63,7 +62,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> static int interrupts = -1; module_param(interrupts, int, 0444); MODULE_PARM_DESC(interrupts, "Enable interrupts"); -@@ -169,7 +194,7 @@ static int tpm_tcg_write_bytes(struct tp +@@ -169,7 +194,7 @@ static int tpm_tcg_write_bytes(struct tpm_tis_data *data, u32 addr, u16 len, struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data); while (len--) @@ -72,7 +71,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return 0; } -@@ -196,7 +221,7 @@ static int tpm_tcg_write32(struct tpm_ti +@@ -196,7 +221,7 @@ static int tpm_tcg_write32(struct tpm_tis_data *data, u32 addr, u32 value) { struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data); @@ -81,3 +80,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return 0; } +-- +2.33.1 + diff --git a/debian/patches-rt/mm-zsmalloc-Replace-bit-spinlock-and-get_cpu_var-usa.patch b/debian/patches-rt/0130-mm-zsmalloc-Replace-bit-spinlock-and-get_cpu_var-usa.patch index c3fd635dd..fa7d414de 100644 --- a/debian/patches-rt/mm-zsmalloc-Replace-bit-spinlock-and-get_cpu_var-usa.patch +++ b/debian/patches-rt/0130-mm-zsmalloc-Replace-bit-spinlock-and-get_cpu_var-usa.patch @@ -1,7 +1,9 @@ +From 01369edd26b22e03d7bb5ba35e6800976fa46ba8 Mon Sep 17 00:00:00 2001 From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Tue, 28 Sep 2021 09:38:47 +0200 -Subject: [PATCH] mm/zsmalloc: Replace bit spinlock and get_cpu_var() usage. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 130/158] mm/zsmalloc: Replace bit spinlock and get_cpu_var() + usage. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz For efficiency reasons, zsmalloc is using a slim `handle'. The value is the address of a memory allocation of 4 or 8 bytes depending on the size @@ -32,10 +34,12 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> spinlock_t.] Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - mm/Kconfig | 3 -- - mm/zsmalloc.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- + mm/Kconfig | 3 +- + mm/zsmalloc.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 79 insertions(+), 8 deletions(-) +diff --git a/mm/Kconfig b/mm/Kconfig +index 71c7457bb974..88778414465b 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -640,7 +640,6 @@ config ZSWAP_ZPOOL_DEFAULT_Z3FOLD @@ -55,6 +59,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> help zsmalloc is a slab-based memory allocator designed to store compressed RAM pages. zsmalloc uses virtual memory mapping +diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c +index b897ce3b399a..6a58c1df0cc7 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -57,6 +57,7 @@ @@ -94,7 +100,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> char *vm_buf; /* copy buffer for objects that span pages */ char *vm_addr; /* address of kmap_atomic()'ed pages */ enum zs_mapmode vm_mm; /* mapping mode */ -@@ -322,7 +338,7 @@ static void SetZsPageMovable(struct zs_p +@@ -322,7 +338,7 @@ static void SetZsPageMovable(struct zs_pool *pool, struct zspage *zspage) {} static int create_cache(struct zs_pool *pool) { @@ -103,7 +109,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> 0, 0, NULL); if (!pool->handle_cachep) return 1; -@@ -346,10 +362,27 @@ static void destroy_cache(struct zs_pool +@@ -346,10 +362,27 @@ static void destroy_cache(struct zs_pool *pool) static unsigned long cache_alloc_handle(struct zs_pool *pool, gfp_t gfp) { @@ -133,7 +139,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static void cache_free_handle(struct zs_pool *pool, unsigned long handle) { kmem_cache_free(pool->handle_cachep, (void *)handle); -@@ -368,12 +401,18 @@ static void cache_free_zspage(struct zs_ +@@ -368,12 +401,18 @@ static void cache_free_zspage(struct zs_pool *pool, struct zspage *zspage) static void record_obj(unsigned long handle, unsigned long obj) { @@ -163,7 +169,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static bool is_zspage_isolated(struct zspage *zspage) { -@@ -862,7 +903,13 @@ static unsigned long location_to_obj(str +@@ -862,7 +903,13 @@ static unsigned long location_to_obj(struct page *page, unsigned int obj_idx) static unsigned long handle_to_obj(unsigned long handle) { @@ -177,7 +183,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } static unsigned long obj_to_head(struct page *page, void *obj) -@@ -876,22 +923,46 @@ static unsigned long obj_to_head(struct +@@ -876,22 +923,46 @@ static unsigned long obj_to_head(struct page *page, void *obj) static inline int testpin_tag(unsigned long handle) { @@ -224,7 +230,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } static void reset_page(struct page *page) -@@ -1274,7 +1345,8 @@ void *zs_map_object(struct zs_pool *pool +@@ -1274,7 +1345,8 @@ void *zs_map_object(struct zs_pool *pool, unsigned long handle, class = pool->size_class[class_idx]; off = (class->size * obj_idx) & ~PAGE_MASK; @@ -234,7 +240,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> area->vm_mm = mm; if (off + class->size <= PAGE_SIZE) { /* this object is contained entirely within a page */ -@@ -1328,7 +1400,7 @@ void zs_unmap_object(struct zs_pool *poo +@@ -1328,7 +1400,7 @@ void zs_unmap_object(struct zs_pool *pool, unsigned long handle) __zs_unmap_object(area, pages, off, class->size); } @@ -243,3 +249,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> migrate_read_unlock(zspage); unpin_tag(handle); +-- +2.33.1 + diff --git a/debian/patches-rt/drivers_block_zram__Replace_bit_spinlocks_with_rtmutex_for_-rt.patch b/debian/patches-rt/0131-drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch index 560be2790..005eae339 100644 --- a/debian/patches-rt/drivers_block_zram__Replace_bit_spinlocks_with_rtmutex_for_-rt.patch +++ b/debian/patches-rt/0131-drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch @@ -1,9 +1,9 @@ -Subject: drivers/block/zram: Replace bit spinlocks with rtmutex for -rt -From: Mike Galbraith <umgwanakikbuti@gmail.com> -Date: Thu Mar 31 04:08:28 2016 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 8a6d43fb100480864c2ec2e04f192e72d2a13fda Mon Sep 17 00:00:00 2001 From: Mike Galbraith <umgwanakikbuti@gmail.com> +Date: Thu, 31 Mar 2016 04:08:28 +0200 +Subject: [PATCH 131/158] drivers/block/zram: Replace bit spinlocks with + rtmutex for -rt +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz They're nondeterministic, and lead to ___might_sleep() splats in -rt. OTOH, they're a lot less wasteful than an rtmutex per page. @@ -11,16 +11,16 @@ OTOH, they're a lot less wasteful than an rtmutex per page. Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - drivers/block/zram/zram_drv.c | 36 ++++++++++++++++++++++++++++++++++++ - drivers/block/zram/zram_drv.h | 1 + + drivers/block/zram/zram_drv.c | 36 +++++++++++++++++++++++++++++++++++ + drivers/block/zram/zram_drv.h | 1 + 2 files changed, 37 insertions(+) ---- + +diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c +index 6383c81ac5b3..abb695f5f5e4 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c -@@ -59,6 +59,40 @@ static void zram_free_page(struct zram * +@@ -59,6 +59,40 @@ static void zram_free_page(struct zram *zram, size_t index); static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec, u32 index, int offset, struct bio *bio); @@ -61,7 +61,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> static int zram_slot_trylock(struct zram *zram, u32 index) { -@@ -74,6 +108,7 @@ static void zram_slot_unlock(struct zram +@@ -74,6 +108,7 @@ static void zram_slot_unlock(struct zram *zram, u32 index) { bit_spin_unlock(ZRAM_LOCK, &zram->table[index].flags); } @@ -69,7 +69,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> static inline bool init_done(struct zram *zram) { -@@ -1169,6 +1204,7 @@ static bool zram_meta_alloc(struct zram +@@ -1169,6 +1204,7 @@ static bool zram_meta_alloc(struct zram *zram, u64 disksize) if (!huge_class_size) huge_class_size = zs_huge_class_size(zram->mem_pool); @@ -77,6 +77,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return true; } +diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h +index 80c3b43b4828..d8f6d880f915 100644 --- a/drivers/block/zram/zram_drv.h +++ b/drivers/block/zram/zram_drv.h @@ -63,6 +63,7 @@ struct zram_table_entry { @@ -87,3 +89,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifdef CONFIG_ZRAM_MEMORY_TRACKING ktime_t ac_time; #endif +-- +2.33.1 + diff --git a/debian/patches-rt/leds-trigger-Disable-CPU-trigger-on-PREEMPT_RT.patch b/debian/patches-rt/0132-leds-trigger-Disable-CPU-trigger-on-PREEMPT_RT.patch index eab2fab46..eacfcf622 100644 --- a/debian/patches-rt/leds-trigger-Disable-CPU-trigger-on-PREEMPT_RT.patch +++ b/debian/patches-rt/0132-leds-trigger-Disable-CPU-trigger-on-PREEMPT_RT.patch @@ -1,7 +1,8 @@ +From 972dad5d7ab5cf789d4d057427618409772a5f38 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 23 Jan 2014 14:45:59 +0100 -Subject: [PATCH] leds: trigger: Disable CPU trigger on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 132/158] leds: trigger: Disable CPU trigger on PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The CPU trigger is invoked on ARM from CPU-idle. That trigger later invokes led_trigger_event() which may invoke the callback of the actual driver. @@ -14,9 +15,11 @@ Disable the CPU trigger on PREEMPT_RT. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lkml.kernel.org/r/20210924111501.m57cwwn7ahiyxxdd@linutronix.de --- - drivers/leds/trigger/Kconfig | 1 + + drivers/leds/trigger/Kconfig | 1 + 1 file changed, 1 insertion(+) +diff --git a/drivers/leds/trigger/Kconfig b/drivers/leds/trigger/Kconfig +index 1f1d57288085..dc6816d36d06 100644 --- a/drivers/leds/trigger/Kconfig +++ b/drivers/leds/trigger/Kconfig @@ -64,6 +64,7 @@ config LEDS_TRIGGER_BACKLIGHT @@ -27,3 +30,6 @@ Link: https://lkml.kernel.org/r/20210924111501.m57cwwn7ahiyxxdd@linutronix.de help This allows LEDs to be controlled by active CPUs. This shows the active CPUs across an array of LEDs so you can see which +-- +2.33.1 + diff --git a/debian/patches-rt/generic-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch b/debian/patches-rt/0133-generic-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch index c591dad36..8b7e12106 100644 --- a/debian/patches-rt/generic-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch +++ b/debian/patches-rt/0133-generic-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch @@ -1,7 +1,8 @@ +From 96e70dea77b4bc1045c512270b3a73a0c8c5b9b9 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 24 Sep 2021 17:05:48 +0200 -Subject: [PATCH] generic/softirq: Disable softirq stacks on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 133/158] generic/softirq: Disable softirq stacks on PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz PREEMPT_RT preempts softirqs and the current implementation avoids do_softirq_own_stack() and only uses __do_softirq(). @@ -14,9 +15,11 @@ ensure that do_softirq_own_stack() is not used which is not expected. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - include/asm-generic/softirq_stack.h | 2 +- + include/asm-generic/softirq_stack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/include/asm-generic/softirq_stack.h b/include/asm-generic/softirq_stack.h +index eceeecf6a5bd..d3e2d81656e0 100644 --- a/include/asm-generic/softirq_stack.h +++ b/include/asm-generic/softirq_stack.h @@ -2,7 +2,7 @@ @@ -28,3 +31,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> void do_softirq_own_stack(void); #else static inline void do_softirq_own_stack(void) +-- +2.33.1 + diff --git a/debian/patches-rt/softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch b/debian/patches-rt/0134-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch index d68f39a7b..bdcac287b 100644 --- a/debian/patches-rt/softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch +++ b/debian/patches-rt/0134-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch @@ -1,7 +1,8 @@ +From cd6833f42fcca842bab646d9215ca8cc168da4cb Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 24 Sep 2021 17:05:48 +0200 -Subject: [PATCH] */softirq: Disable softirq stacks on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 134/158] */softirq: Disable softirq stacks on PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz PREEMPT_RT preempts softirqs and the current implementation avoids do_softirq_own_stack() and only uses __do_softirq(). @@ -14,14 +15,16 @@ ensure that do_softirq_own_stack() is not used which is not expected. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - arch/powerpc/kernel/irq.c | 4 ++++ - arch/sh/kernel/irq.c | 2 ++ - arch/sparc/kernel/irq_64.c | 2 ++ + arch/powerpc/kernel/irq.c | 4 ++++ + arch/sh/kernel/irq.c | 2 ++ + arch/sparc/kernel/irq_64.c | 2 ++ 3 files changed, 8 insertions(+) +diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c +index c4f1d6b7d992..02e17a57da83 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c -@@ -690,6 +690,7 @@ static inline void check_stack_overflow( +@@ -690,6 +690,7 @@ static inline void check_stack_overflow(void) } } @@ -29,7 +32,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static __always_inline void call_do_softirq(const void *sp) { /* Temporarily switch r1 to sp, call __do_softirq() then restore r1. */ -@@ -708,6 +709,7 @@ static __always_inline void call_do_soft +@@ -708,6 +709,7 @@ static __always_inline void call_do_softirq(const void *sp) "r11", "r12" ); } @@ -37,7 +40,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static __always_inline void call_do_irq(struct pt_regs *regs, void *sp) { -@@ -820,10 +822,12 @@ void *mcheckirq_ctx[NR_CPUS] __read_most +@@ -820,10 +822,12 @@ void *mcheckirq_ctx[NR_CPUS] __read_mostly; void *softirq_ctx[NR_CPUS] __read_mostly; void *hardirq_ctx[NR_CPUS] __read_mostly; @@ -50,6 +53,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> irq_hw_number_t virq_to_hw(unsigned int virq) { +diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c +index ef0f0827cf57..2d3eca8fee01 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c @@ -149,6 +149,7 @@ void irq_ctx_exit(int cpu) @@ -68,9 +73,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #else static inline void handle_one_irq(unsigned int irq) { +diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c +index c8848bb681a1..41fa1be980a3 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c -@@ -855,6 +855,7 @@ void __irq_entry handler_irq(int pil, st +@@ -855,6 +855,7 @@ void __irq_entry handler_irq(int pil, struct pt_regs *regs) set_irq_regs(old_regs); } @@ -86,3 +93,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #ifdef CONFIG_HOTPLUG_CPU void fixup_irqs(void) +-- +2.33.1 + diff --git a/debian/patches-rt/sched__Add_support_for_lazy_preemption.patch b/debian/patches-rt/0135-sched-Add-support-for-lazy-preemption.patch index 3dfb561e7..489ef5b7e 100644 --- a/debian/patches-rt/sched__Add_support_for_lazy_preemption.patch +++ b/debian/patches-rt/0135-sched-Add-support-for-lazy-preemption.patch @@ -1,9 +1,8 @@ -Subject: sched: Add support for lazy preemption -From: Thomas Gleixner <tglx@linutronix.de> -Date: Fri Oct 26 18:50:54 2012 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 9cc182d7904b30beb33655c95b711809580ecad5 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Fri, 26 Oct 2012 18:50:54 +0100 +Subject: [PATCH 135/158] sched: Add support for lazy preemption +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz It has become an obsession to mitigate the determinism vs. throughput loss of RT. Looking at the mainline semantics of preemption points @@ -54,23 +53,23 @@ there is a clear trend that it enhances the non RT workload performance. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - include/linux/preempt.h | 54 +++++++++++++++++++++++++++-- - include/linux/sched.h | 37 +++++++++++++++++++ - include/linux/thread_info.h | 12 +++++- - include/linux/trace_events.h | 5 ++ - kernel/Kconfig.preempt | 6 +++ - kernel/sched/core.c | 80 +++++++++++++++++++++++++++++++++++++++++-- - kernel/sched/fair.c | 16 ++++---- - kernel/sched/features.h | 3 + - kernel/sched/sched.h | 9 ++++ - kernel/trace/trace.c | 46 +++++++++++++++--------- - kernel/trace/trace_events.c | 1 - kernel/trace/trace_output.c | 14 ++++++- + include/linux/preempt.h | 54 ++++++++++++++++++++++-- + include/linux/sched.h | 37 +++++++++++++++++ + include/linux/thread_info.h | 12 +++++- + include/linux/trace_events.h | 5 ++- + kernel/Kconfig.preempt | 6 +++ + kernel/sched/core.c | 80 +++++++++++++++++++++++++++++++++++- + kernel/sched/fair.c | 16 ++++---- + kernel/sched/features.h | 3 ++ + kernel/sched/sched.h | 9 ++++ + kernel/trace/trace.c | 46 +++++++++++++-------- + kernel/trace/trace_events.c | 1 + + kernel/trace/trace_output.c | 14 ++++++- 12 files changed, 248 insertions(+), 35 deletions(-) ---- + +diff --git a/include/linux/preempt.h b/include/linux/preempt.h +index a9a0b33160de..3da73c968211 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -175,6 +175,20 @@ extern void preempt_count_sub(int val); @@ -158,7 +157,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> set_preempt_need_resched(); \ } while (0) -@@ -410,8 +451,15 @@ extern void migrate_enable(void); +@@ -402,8 +443,15 @@ extern void migrate_enable(void); #else @@ -176,9 +175,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #endif /* CONFIG_SMP */ +diff --git a/include/linux/sched.h b/include/linux/sched.h +index fe5f78007212..4401d0f05cb3 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -2015,6 +2015,43 @@ static inline int test_tsk_need_resched( +@@ -2015,6 +2015,43 @@ static inline int test_tsk_need_resched(struct task_struct *tsk) return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); } @@ -222,9 +223,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifdef CONFIG_PREEMPT_RT static inline bool task_match_saved_state(struct task_struct *p, long match_state) { +diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h +index 0999f6317978..7af834b7c114 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h -@@ -163,7 +163,17 @@ static inline int test_ti_thread_flag(st +@@ -163,7 +163,17 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag) clear_ti_thread_flag(task_thread_info(t), TIF_##fl) #endif /* !CONFIG_GENERIC_ENTRY */ @@ -243,6 +246,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES static inline int arch_within_stack_frames(const void * const stack, +diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h +index 57113190448c..827725f41149 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -69,6 +69,7 @@ struct trace_entry { @@ -253,7 +258,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> }; #define TRACE_EVENT_TYPE_MAX \ -@@ -157,9 +158,10 @@ static inline void tracing_generic_entry +@@ -157,9 +158,10 @@ static inline void tracing_generic_entry_update(struct trace_entry *entry, unsigned int trace_ctx) { entry->preempt_count = trace_ctx & 0xff; @@ -273,6 +278,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> }; #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT +diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt +index 5876e30c5740..5df0776264c2 100644 --- a/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt @@ -1,5 +1,11 @@ @@ -287,6 +294,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> choice prompt "Preemption Model" default PREEMPT_NONE +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index 9ff7e8bd058a..39adf3a8067b 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -986,6 +986,46 @@ void resched_curr(struct rq *rq) @@ -352,7 +361,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> preempt_enable(); } EXPORT_SYMBOL_GPL(migrate_enable); -@@ -4406,6 +4448,9 @@ int sched_fork(unsigned long clone_flags +@@ -4389,6 +4431,9 @@ int sched_fork(unsigned long clone_flags, struct task_struct *p) p->on_cpu = 0; #endif init_task_preempt_count(p); @@ -362,7 +371,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifdef CONFIG_SMP plist_node_init(&p->pushable_tasks, MAX_PRIO); RB_CLEAR_NODE(&p->pushable_dl_tasks); -@@ -6253,6 +6298,7 @@ static void __sched notrace __schedule(u +@@ -6257,6 +6302,7 @@ static void __sched notrace __schedule(unsigned int sched_mode) next = pick_next_task(rq, prev, &rf); clear_tsk_need_resched(prev); @@ -370,7 +379,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> clear_preempt_need_resched(); #ifdef CONFIG_SCHED_DEBUG rq->last_seen_need_resched_ns = 0; -@@ -6470,6 +6516,30 @@ static void __sched notrace preempt_sche +@@ -6474,6 +6520,30 @@ static void __sched notrace preempt_schedule_common(void) } while (need_resched()); } @@ -401,7 +410,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifdef CONFIG_PREEMPTION /* * This is the entry point to schedule() from in-kernel preemption -@@ -6483,7 +6553,8 @@ asmlinkage __visible void __sched notrac +@@ -6487,7 +6557,8 @@ asmlinkage __visible void __sched notrace preempt_schedule(void) */ if (likely(!preemptible())) return; @@ -411,7 +420,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> preempt_schedule_common(); } NOKPROBE_SYMBOL(preempt_schedule); -@@ -6516,6 +6587,9 @@ asmlinkage __visible void __sched notrac +@@ -6520,6 +6591,9 @@ asmlinkage __visible void __sched notrace preempt_schedule_notrace(void) if (likely(!preemptible())) return; @@ -421,7 +430,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> do { /* * Because the function tracer can trace preempt_count_sub() -@@ -8677,7 +8751,9 @@ void __init init_idle(struct task_struct +@@ -8678,7 +8752,9 @@ void __init init_idle(struct task_struct *idle, int cpu) /* Set the preempt count _outside_ the spinlocks! */ init_idle_preempt_count(idle, cpu); @@ -432,9 +441,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * The idle tasks have their own, simple scheduling class: */ +diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c +index e3e667b28f41..f2d0fb3ac43f 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c -@@ -4445,7 +4445,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq +@@ -4445,7 +4445,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr) ideal_runtime = sched_slice(cfs_rq, curr); delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime; if (delta_exec > ideal_runtime) { @@ -443,7 +454,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * The current task ran long enough, ensure it doesn't get * re-elected due to buddy favours. -@@ -4469,7 +4469,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq +@@ -4469,7 +4469,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr) return; if (delta > ideal_runtime) @@ -452,7 +463,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static void -@@ -4612,7 +4612,7 @@ entity_tick(struct cfs_rq *cfs_rq, struc +@@ -4612,7 +4612,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) * validating it and just reschedule. */ if (queued) { @@ -461,7 +472,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return; } /* -@@ -4752,7 +4752,7 @@ static void __account_cfs_rq_runtime(str +@@ -4752,7 +4752,7 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) * hierarchy can be throttled */ if (!assign_cfs_rq_runtime(cfs_rq) && likely(cfs_rq->curr)) @@ -470,7 +481,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static __always_inline -@@ -5515,7 +5515,7 @@ static void hrtick_start_fair(struct rq +@@ -5515,7 +5515,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p) if (delta < 0) { if (task_current(rq, p)) @@ -479,7 +490,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return; } hrtick_start(rq, delta); -@@ -7205,7 +7205,7 @@ static void check_preempt_wakeup(struct +@@ -7205,7 +7205,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ return; preempt: @@ -488,7 +499,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Only set the backward buddy when the current task is still * on the rq. This can happen when a wakeup gets interleaved -@@ -11106,7 +11106,7 @@ static void task_fork_fair(struct task_s +@@ -11106,7 +11106,7 @@ static void task_fork_fair(struct task_struct *p) * 'current' within the tree based on its new key value. */ swap(curr->vruntime, se->vruntime); @@ -497,7 +508,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } se->vruntime -= cfs_rq->min_vruntime; -@@ -11133,7 +11133,7 @@ prio_changed_fair(struct rq *rq, struct +@@ -11133,7 +11133,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio) */ if (task_current(rq, p)) { if (p->prio > oldprio) @@ -506,6 +517,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } else check_preempt_curr(rq, p, 0); } +diff --git a/kernel/sched/features.h b/kernel/sched/features.h +index 1cf435bbcd9c..d5cee51819bf 100644 --- a/kernel/sched/features.h +++ b/kernel/sched/features.h @@ -48,6 +48,9 @@ SCHED_FEAT(NONTASK_CAPACITY, true) @@ -518,9 +531,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #else /* +diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h +index 4f432826933d..8df6227922aa 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h -@@ -2317,6 +2317,15 @@ extern void reweight_task(struct task_st +@@ -2318,6 +2318,15 @@ extern void reweight_task(struct task_struct *p, int prio); extern void resched_curr(struct rq *rq); extern void resched_cpu(int cpu); @@ -536,9 +551,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> extern struct rt_bandwidth def_rt_bandwidth; extern void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime); +diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c +index 18db461f77cd..547de22e8942 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c -@@ -2629,7 +2629,13 @@ unsigned int tracing_gen_ctx_irq_test(un +@@ -2630,7 +2630,13 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) trace_flags |= TRACE_FLAG_NEED_RESCHED; if (test_preempt_need_resched()) trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; @@ -553,7 +570,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> (min_t(unsigned int, migration_disable_value(), 0xf)) << 4; } -@@ -4193,15 +4199,17 @@ unsigned long trace_total_entries(struct +@@ -4206,15 +4212,17 @@ unsigned long trace_total_entries(struct trace_array *tr) static void print_lat_help_header(struct seq_file *m) { @@ -580,7 +597,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static void print_event_info(struct array_buffer *buf, struct seq_file *m) -@@ -4235,14 +4243,16 @@ static void print_func_help_header_irq(s +@@ -4248,14 +4256,16 @@ static void print_func_help_header_irq(struct array_buffer *buf, struct seq_file print_event_info(buf, m); @@ -605,9 +622,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } void +diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c +index 44d031ffe511..01165b0ed6aa 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c -@@ -184,6 +184,7 @@ static int trace_define_common_fields(vo +@@ -184,6 +184,7 @@ static int trace_define_common_fields(void) /* Holds both preempt_count and migrate_disable */ __common_field(unsigned char, preempt_count); __common_field(int, pid); @@ -615,9 +634,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return ret; } +diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c +index c2ca40e8595b..be070d258c3b 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c -@@ -451,6 +451,7 @@ int trace_print_lat_fmt(struct trace_seq +@@ -451,6 +451,7 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) { char hardsoft_irq; char need_resched; @@ -625,7 +646,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> char irqs_off; int hardirq; int softirq; -@@ -481,6 +482,9 @@ int trace_print_lat_fmt(struct trace_seq +@@ -481,6 +482,9 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) break; } @@ -635,7 +656,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> hardsoft_irq = (nmi && hardirq) ? 'Z' : nmi ? 'z' : -@@ -489,14 +493,20 @@ int trace_print_lat_fmt(struct trace_seq +@@ -489,14 +493,20 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) softirq ? 's' : '.' ; @@ -658,3 +679,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (entry->preempt_count & 0xf0) trace_seq_printf(s, "%x", entry->preempt_count >> 4); else +-- +2.33.1 + diff --git a/debian/patches-rt/x86_entry__Use_should_resched_in_idtentry_exit_cond_resched.patch b/debian/patches-rt/0136-x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch index 3f8b7bd6f..aac7d8bc5 100644 --- a/debian/patches-rt/x86_entry__Use_should_resched_in_idtentry_exit_cond_resched.patch +++ b/debian/patches-rt/0136-x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch @@ -1,9 +1,9 @@ -Subject: x86/entry: Use should_resched() in idtentry_exit_cond_resched() -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Tue Jun 30 11:45:14 2020 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From a948d9a35d953ef992827156550cab09635197ef Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Tue, 30 Jun 2020 11:45:14 +0200 +Subject: [PATCH 136/158] x86/entry: Use should_resched() in + idtentry_exit_cond_resched() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The TIF_NEED_RESCHED bit is inlined on x86 into the preemption counter. By using should_resched(0) instead of need_resched() the same check can @@ -14,12 +14,12 @@ Use should_resched(0) instead need_resched(). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - kernel/entry/common.c | 2 +- + kernel/entry/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---- + +diff --git a/kernel/entry/common.c b/kernel/entry/common.c +index b01531ea4067..64bec596959d 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -395,7 +395,7 @@ void irqentry_exit_cond_resched(void) @@ -31,3 +31,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> preempt_schedule_irq(); } } +-- +2.33.1 + diff --git a/debian/patches-rt/x86__Support_for_lazy_preemption.patch b/debian/patches-rt/0137-x86-Support-for-lazy-preemption.patch index 825844f50..fc5452d8b 100644 --- a/debian/patches-rt/x86__Support_for_lazy_preemption.patch +++ b/debian/patches-rt/0137-x86-Support-for-lazy-preemption.patch @@ -1,23 +1,22 @@ -Subject: x86: Support for lazy preemption -From: Thomas Gleixner <tglx@linutronix.de> -Date: Thu Nov 1 11:03:47 2012 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 0dba4a3d3489f8b8869ff8ec6bbd1a3b08945fb9 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Thu, 1 Nov 2012 11:03:47 +0100 +Subject: [PATCH 137/158] x86: Support for lazy preemption +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Implement the x86 pieces for lazy preempt. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/x86/Kconfig | 1 + - arch/x86/include/asm/preempt.h | 33 ++++++++++++++++++++++++++++++++- - arch/x86/include/asm/thread_info.h | 7 +++++++ - include/linux/entry-common.h | 2 +- - kernel/entry/common.c | 2 +- + arch/x86/Kconfig | 1 + + arch/x86/include/asm/preempt.h | 33 +++++++++++++++++++++++++++++- + arch/x86/include/asm/thread_info.h | 7 +++++++ + include/linux/entry-common.h | 2 +- + kernel/entry/common.c | 2 +- 5 files changed, 42 insertions(+), 3 deletions(-) ---- + +diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig +index a0352d57506e..3493d2b94530 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -231,6 +231,7 @@ config X86 @@ -28,9 +27,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> select MMU_GATHER_RCU_TABLE_FREE if PARAVIRT select HAVE_POSIX_CPU_TIMERS_TASK_WORK select HAVE_REGS_AND_STACK_ACCESS_API +diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h +index fe5efbcba824..ab8cb5fc2329 100644 --- a/arch/x86/include/asm/preempt.h +++ b/arch/x86/include/asm/preempt.h -@@ -90,17 +90,48 @@ static __always_inline void __preempt_co +@@ -90,17 +90,48 @@ static __always_inline void __preempt_count_sub(int val) * a decrement which hits zero means we have no preempt_count and should * reschedule. */ @@ -80,6 +81,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } #ifdef CONFIG_PREEMPTION +diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h +index cf132663c219..c95724ae6ff7 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -57,11 +57,14 @@ struct thread_info { @@ -122,6 +125,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #define STACK_WARN (THREAD_SIZE/8) /* +diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h +index 2e2b8d6140ed..572fac3dd288 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -59,7 +59,7 @@ @@ -133,9 +138,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> ARCH_EXIT_TO_USER_MODE_WORK) /** +diff --git a/kernel/entry/common.c b/kernel/entry/common.c +index 64bec596959d..a9579f8bf4f0 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c -@@ -159,7 +159,7 @@ static unsigned long exit_to_user_mode_l +@@ -159,7 +159,7 @@ static unsigned long exit_to_user_mode_loop(struct pt_regs *regs, local_irq_enable_exit_to_user(ti_work); @@ -144,3 +151,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> schedule(); #ifdef ARCH_RT_DELAYS_SIGNAL_SEND +-- +2.33.1 + diff --git a/debian/patches-rt/entry--Fix-the-preempt-lazy-fallout.patch b/debian/patches-rt/0138-entry-Fix-the-preempt-lazy-fallout.patch index f852cc58a..b98970bb6 100644 --- a/debian/patches-rt/entry--Fix-the-preempt-lazy-fallout.patch +++ b/debian/patches-rt/0138-entry-Fix-the-preempt-lazy-fallout.patch @@ -1,7 +1,8 @@ -Subject: entry: Fix the preempt lazy fallout +From efa6cb3678d88f6a26c4ee4773cd30188f419d7f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 13 Jul 2021 07:52:52 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 138/158] entry: Fix the preempt lazy fallout +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Common code needs common defines.... @@ -9,10 +10,12 @@ Fixes: f2f9e496208c ("x86: Support for lazy preemption") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- - arch/x86/include/asm/thread_info.h | 2 -- - include/linux/entry-common.h | 6 ++++++ + arch/x86/include/asm/thread_info.h | 2 -- + include/linux/entry-common.h | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) +diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h +index c95724ae6ff7..75dc786e6365 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -150,8 +150,6 @@ struct thread_info { @@ -24,6 +27,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #define STACK_WARN (THREAD_SIZE/8) /* +diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h +index 572fac3dd288..71064a2c2caf 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -57,6 +57,12 @@ @@ -39,3 +44,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #define EXIT_TO_USER_MODE_WORK \ (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_UPROBE | \ _TIF_NEED_RESCHED_MASK | _TIF_PATCH_PENDING | _TIF_NOTIFY_SIGNAL | \ +-- +2.33.1 + diff --git a/debian/patches-rt/arm__Add_support_for_lazy_preemption.patch b/debian/patches-rt/0139-arm-Add-support-for-lazy-preemption.patch index e94ccd60e..91f18d267 100644 --- a/debian/patches-rt/arm__Add_support_for_lazy_preemption.patch +++ b/debian/patches-rt/0139-arm-Add-support-for-lazy-preemption.patch @@ -1,23 +1,22 @@ -Subject: arm: Add support for lazy preemption -From: Thomas Gleixner <tglx@linutronix.de> -Date: Wed Oct 31 12:04:11 2012 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 574bfcbfb3b3c6b28a64e319ce01c870e1d5a4ca Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Wed, 31 Oct 2012 12:04:11 +0100 +Subject: [PATCH 139/158] arm: Add support for lazy preemption +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Implement the arm pieces for lazy preempt. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/arm/Kconfig | 1 + - arch/arm/include/asm/thread_info.h | 6 +++++- - arch/arm/kernel/asm-offsets.c | 1 + - arch/arm/kernel/entry-armv.S | 19 ++++++++++++++++--- - arch/arm/kernel/signal.c | 3 ++- + arch/arm/Kconfig | 1 + + arch/arm/include/asm/thread_info.h | 6 +++++- + arch/arm/kernel/asm-offsets.c | 1 + + arch/arm/kernel/entry-armv.S | 19 ++++++++++++++++--- + arch/arm/kernel/signal.c | 3 ++- 5 files changed, 25 insertions(+), 5 deletions(-) ---- + +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index ff38750ee503..034dc3b44423 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -109,6 +109,7 @@ config ARM @@ -28,6 +27,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> select MMU_GATHER_RCU_TABLE_FREE if SMP && ARM_LPAE select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_RSEQ +diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h +index 9a18da3e10cc..2fa63d96a4f0 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h @@ -52,6 +52,7 @@ struct cpu_context_save { @@ -38,7 +39,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> struct task_struct *task; /* main task structure */ __u32 cpu; /* cpu */ __u32 cpu_domain; /* cpu domain */ -@@ -134,6 +135,7 @@ extern int vfp_restore_user_hwstate(stru +@@ -134,6 +135,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp *, #define TIF_SYSCALL_TRACEPOINT 6 /* syscall tracepoint instrumentation */ #define TIF_SECCOMP 7 /* seccomp syscall filtering active */ #define TIF_NOTIFY_SIGNAL 8 /* signal notifications exist */ @@ -46,7 +47,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #define TIF_USING_IWMMXT 17 #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ -@@ -148,6 +150,7 @@ extern int vfp_restore_user_hwstate(stru +@@ -148,6 +150,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp *, #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) #define _TIF_SECCOMP (1 << TIF_SECCOMP) #define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL) @@ -54,7 +55,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) /* Checks for any syscall work in entry-common.S */ -@@ -157,7 +160,8 @@ extern int vfp_restore_user_hwstate(stru +@@ -157,7 +160,8 @@ extern int vfp_restore_user_hwstate(struct user_vfp *, /* * Change these and you break ASM code in entry-common.S */ @@ -64,6 +65,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> _TIF_NOTIFY_RESUME | _TIF_UPROBE | \ _TIF_NOTIFY_SIGNAL) +diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c +index a646a3f6440f..beb09d74684f 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c @@ -43,6 +43,7 @@ int main(void) @@ -74,6 +77,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> DEFINE(TI_TASK, offsetof(struct thread_info, task)); DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); DEFINE(TI_CPU_DOMAIN, offsetof(struct thread_info, cpu_domain)); +diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S +index 241b73d64df7..f3a9dd2e98c6 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -206,11 +206,18 @@ ENDPROC(__dabt_svc) @@ -113,9 +118,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #endif __und_fault: +diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c +index a41e27ace391..1e29cec7716f 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c -@@ -607,7 +607,8 @@ do_work_pending(struct pt_regs *regs, un +@@ -607,7 +607,8 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall) */ trace_hardirqs_off(); do { @@ -125,3 +132,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> schedule(); } else { if (unlikely(!user_mode(regs))) +-- +2.33.1 + diff --git a/debian/patches-rt/powerpc__Add_support_for_lazy_preemption.patch b/debian/patches-rt/0140-powerpc-Add-support-for-lazy-preemption.patch index edc7fdc51..d91014fa4 100644 --- a/debian/patches-rt/powerpc__Add_support_for_lazy_preemption.patch +++ b/debian/patches-rt/0140-powerpc-Add-support-for-lazy-preemption.patch @@ -1,21 +1,20 @@ -Subject: powerpc: Add support for lazy preemption -From: Thomas Gleixner <tglx@linutronix.de> -Date: Thu Nov 1 10:14:11 2012 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From f6848d7fc810c4b21a202691f757a04aac2cd862 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Thu, 1 Nov 2012 10:14:11 +0100 +Subject: [PATCH 140/158] powerpc: Add support for lazy preemption +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Implement the powerpc pieces for lazy preempt. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/powerpc/Kconfig | 1 + - arch/powerpc/include/asm/thread_info.h | 7 +++++++ - arch/powerpc/kernel/interrupt.c | 8 ++++++-- + arch/powerpc/Kconfig | 1 + + arch/powerpc/include/asm/thread_info.h | 7 +++++++ + arch/powerpc/kernel/interrupt.c | 8 ++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) ---- + +diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig +index 6b9f523882c5..fc02f2cbb856 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -235,6 +235,7 @@ config PPC @@ -26,6 +25,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_RELIABLE_STACKTRACE select HAVE_RSEQ +diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h +index b4ec6c7dd72e..07df83231ec2 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h @@ -47,6 +47,8 @@ @@ -74,9 +75,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* Bits in local_flags */ /* Don't move TLF_NAPPING without adjusting the code in entry_32.S */ +diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c +index 835b626cd476..3647020770a6 100644 --- a/arch/powerpc/kernel/interrupt.c +++ b/arch/powerpc/kernel/interrupt.c -@@ -346,7 +346,7 @@ interrupt_exit_user_prepare_main(unsigne +@@ -346,7 +346,7 @@ interrupt_exit_user_prepare_main(unsigned long ret, struct pt_regs *regs) ti_flags = READ_ONCE(current_thread_info()->flags); while (unlikely(ti_flags & (_TIF_USER_WORK_MASK & ~_TIF_RESTORE_TM))) { local_irq_enable(); @@ -85,7 +88,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> schedule(); } else { /* -@@ -552,11 +552,15 @@ notrace unsigned long interrupt_exit_ker +@@ -552,11 +552,15 @@ notrace unsigned long interrupt_exit_kernel_prepare(struct pt_regs *regs) /* Returning to a kernel context with local irqs enabled. */ WARN_ON_ONCE(!(regs->msr & MSR_EE)); again: @@ -102,3 +105,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } } +-- +2.33.1 + diff --git a/debian/patches-rt/arch_arm64__Add_lazy_preempt_support.patch b/debian/patches-rt/0141-arch-arm64-Add-lazy-preempt-support.patch index f2b6ccf95..90a2f90ca 100644 --- a/debian/patches-rt/arch_arm64__Add_lazy_preempt_support.patch +++ b/debian/patches-rt/0141-arch-arm64-Add-lazy-preempt-support.patch @@ -1,9 +1,8 @@ -Subject: arch/arm64: Add lazy preempt support -From: Anders Roxell <anders.roxell@linaro.org> -Date: Thu May 14 17:52:17 2015 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 4889d2334581be9c1cb86fc6150fb16ff5f6cfa6 Mon Sep 17 00:00:00 2001 From: Anders Roxell <anders.roxell@linaro.org> +Date: Thu, 14 May 2015 17:52:17 +0200 +Subject: [PATCH 141/158] arch/arm64: Add lazy preempt support +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz arm64 is missing support for PREEMPT_RT. The main feature which is lacking is support for lazy preemption. The arch-specific entry code, @@ -14,16 +13,16 @@ indicate that support for full RT preemption is now available. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/arm64/Kconfig | 1 + - arch/arm64/include/asm/preempt.h | 25 ++++++++++++++++++++++++- - arch/arm64/include/asm/thread_info.h | 8 +++++++- - arch/arm64/kernel/asm-offsets.c | 1 + - arch/arm64/kernel/signal.c | 2 +- + arch/arm64/Kconfig | 1 + + arch/arm64/include/asm/preempt.h | 25 ++++++++++++++++++++++++- + arch/arm64/include/asm/thread_info.h | 8 +++++++- + arch/arm64/kernel/asm-offsets.c | 1 + + arch/arm64/kernel/signal.c | 2 +- 5 files changed, 34 insertions(+), 3 deletions(-) ---- + +diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig +index fee914c716aa..4edd9476b70e 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -192,6 +192,7 @@ config ARM64 @@ -34,9 +33,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> select HAVE_FUNCTION_ARG_ACCESS_API select HAVE_FUTEX_CMPXCHG if FUTEX select MMU_GATHER_RCU_TABLE_FREE +diff --git a/arch/arm64/include/asm/preempt.h b/arch/arm64/include/asm/preempt.h +index e83f0982b99c..2545c17281e1 100644 --- a/arch/arm64/include/asm/preempt.h +++ b/arch/arm64/include/asm/preempt.h -@@ -70,13 +70,36 @@ static inline bool __preempt_count_dec_a +@@ -70,13 +70,36 @@ static inline bool __preempt_count_dec_and_test(void) * interrupt occurring between the non-atomic READ_ONCE/WRITE_ONCE * pair. */ @@ -74,6 +75,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } #ifdef CONFIG_PREEMPTION +diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h +index 6623c99f0984..c55ccec33a5a 100644 --- a/arch/arm64/include/asm/thread_info.h +++ b/arch/arm64/include/asm/thread_info.h @@ -26,6 +26,7 @@ struct thread_info { @@ -84,7 +87,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> union { u64 preempt_count; /* 0 => preemptible, <0 => bug */ struct { -@@ -67,6 +68,7 @@ int arch_dup_task_struct(struct task_str +@@ -67,6 +68,7 @@ int arch_dup_task_struct(struct task_struct *dst, #define TIF_UPROBE 4 /* uprobe breakpoint or singlestep */ #define TIF_MTE_ASYNC_FAULT 5 /* MTE Asynchronous Tag Check Fault */ #define TIF_NOTIFY_SIGNAL 6 /* signal notifications exist */ @@ -92,7 +95,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #define TIF_SYSCALL_TRACE 8 /* syscall trace active */ #define TIF_SYSCALL_AUDIT 9 /* syscall auditing */ #define TIF_SYSCALL_TRACEPOINT 10 /* syscall tracepoint for ftrace */ -@@ -97,8 +99,10 @@ int arch_dup_task_struct(struct task_str +@@ -97,8 +99,10 @@ int arch_dup_task_struct(struct task_struct *dst, #define _TIF_SVE (1 << TIF_SVE) #define _TIF_MTE_ASYNC_FAULT (1 << TIF_MTE_ASYNC_FAULT) #define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL) @@ -104,7 +107,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> _TIF_NOTIFY_RESUME | _TIF_FOREIGN_FPSTATE | \ _TIF_UPROBE | _TIF_MTE_ASYNC_FAULT | \ _TIF_NOTIFY_SIGNAL) -@@ -107,6 +111,8 @@ int arch_dup_task_struct(struct task_str +@@ -107,6 +111,8 @@ int arch_dup_task_struct(struct task_struct *dst, _TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP | \ _TIF_SYSCALL_EMU) @@ -113,6 +116,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifdef CONFIG_SHADOW_CALL_STACK #define INIT_SCS \ .scs_base = init_shadow_call_stack, \ +diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c +index 551427ae8cc5..96a4f6c9eb78 100644 --- a/arch/arm64/kernel/asm-offsets.c +++ b/arch/arm64/kernel/asm-offsets.c @@ -31,6 +31,7 @@ int main(void) @@ -123,9 +128,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifdef CONFIG_ARM64_SW_TTBR0_PAN DEFINE(TSK_TI_TTBR0, offsetof(struct task_struct, thread_info.ttbr0)); #endif +diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c +index c287b9407f28..8a9194ed981c 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c -@@ -920,7 +920,7 @@ static void do_signal(struct pt_regs *re +@@ -920,7 +920,7 @@ static void do_signal(struct pt_regs *regs) void do_notify_resume(struct pt_regs *regs, unsigned long thread_flags) { do { @@ -134,3 +141,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* Unmask Debug and SError for the next task */ local_daif_restore(DAIF_PROCCTX_NOIRQ); +-- +2.33.1 + diff --git a/debian/patches-rt/ARM__enable_irq_in_translation_section_permission_fault_handlers.patch b/debian/patches-rt/0142-ARM-enable-irq-in-translation-section-permission-fau.patch index 433f5b950..c0bf27a46 100644 --- a/debian/patches-rt/ARM__enable_irq_in_translation_section_permission_fault_handlers.patch +++ b/debian/patches-rt/0142-ARM-enable-irq-in-translation-section-permission-fau.patch @@ -1,9 +1,12 @@ -Subject: ARM: enable irq in translation/section permission fault handlers -From: Yadi.hu <yadi.hu@windriver.com> -Date: Wed Dec 10 10:32:09 2014 +0800 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - -From: Yadi.hu <yadi.hu@windriver.com> +From 65b9ea141aa09ccbbda11b9227ec714210deb783 Mon Sep 17 00:00:00 2001 +From: "Yadi.hu" <yadi.hu@windriver.com> +Date: Wed, 10 Dec 2014 10:32:09 +0800 +Subject: [PATCH 142/158] ARM: enable irq in translation/section permission + fault handlers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Probably happens on all ARM, with CONFIG_PREEMPT_RT @@ -61,15 +64,15 @@ permission exception. Signed-off-by: Yadi.hu <yadi.hu@windriver.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/arm/mm/fault.c | 6 ++++++ + arch/arm/mm/fault.c | 6 ++++++ 1 file changed, 6 insertions(+) ---- + +diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c +index efa402025031..59487ee9fd61 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c -@@ -400,6 +400,9 @@ do_translation_fault(unsigned long addr, +@@ -400,6 +400,9 @@ do_translation_fault(unsigned long addr, unsigned int fsr, if (addr < TASK_SIZE) return do_page_fault(addr, fsr, regs); @@ -79,7 +82,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (user_mode(regs)) goto bad_area; -@@ -470,6 +473,9 @@ do_translation_fault(unsigned long addr, +@@ -470,6 +473,9 @@ do_translation_fault(unsigned long addr, unsigned int fsr, static int do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) { @@ -89,3 +92,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> do_bad_area(addr, fsr, regs); return 0; } +-- +2.33.1 + diff --git a/debian/patches-rt/KVM__arm_arm64__downgrade_preempt_disabled_region_to_migrate_disable.patch b/debian/patches-rt/0143-KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch index 523e1643f..c9ae6c6ea 100644 --- a/debian/patches-rt/KVM__arm_arm64__downgrade_preempt_disabled_region_to_migrate_disable.patch +++ b/debian/patches-rt/0143-KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch @@ -1,9 +1,9 @@ -Subject: KVM: arm/arm64: downgrade preempt_disable()d region to migrate_disable() -From: Josh Cartwright <joshc@ni.com> -Date: Thu Feb 11 11:54:01 2016 -0600 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 088c483f549f48ccd41c075dc8111ed7c2826a87 Mon Sep 17 00:00:00 2001 From: Josh Cartwright <joshc@ni.com> +Date: Thu, 11 Feb 2016 11:54:01 -0600 +Subject: [PATCH 143/158] KVM: arm/arm64: downgrade preempt_disable()d region + to migrate_disable() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz kvm_arch_vcpu_ioctl_run() disables the use of preemption when updating the vgic and timer states to prevent the calling task from migrating to @@ -20,15 +20,15 @@ Reported-by: Manish Jaggi <Manish.Jaggi@caviumnetworks.com> Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/arm64/kvm/arm.c | 6 +++--- + arch/arm64/kvm/arm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---- + +diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c +index 9b328bb05596..12b29d851012 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c -@@ -811,7 +811,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v +@@ -811,7 +811,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) * involves poking the GIC, which must be done in a * non-preemptible context. */ @@ -37,7 +37,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> kvm_pmu_flush_hwstate(vcpu); -@@ -835,7 +835,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v +@@ -835,7 +835,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) kvm_timer_sync_user(vcpu); kvm_vgic_sync_hwstate(vcpu); local_irq_enable(); @@ -46,7 +46,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> continue; } -@@ -907,7 +907,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v +@@ -907,7 +907,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) /* Exit types that need handling before we can be preempted */ handle_exit_early(vcpu, ret); @@ -55,3 +55,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * The ARMv8 architecture doesn't give the hypervisor +-- +2.33.1 + diff --git a/debian/patches-rt/arm64-sve-Delay-freeing-memory-in-fpsimd_flush_threa.patch b/debian/patches-rt/0144-arm64-sve-Delay-freeing-memory-in-fpsimd_flush_threa.patch index 3912d4215..9198172cc 100644 --- a/debian/patches-rt/arm64-sve-Delay-freeing-memory-in-fpsimd_flush_threa.patch +++ b/debian/patches-rt/0144-arm64-sve-Delay-freeing-memory-in-fpsimd_flush_threa.patch @@ -1,7 +1,9 @@ +From 5c15b3a9e7659ebb4348080ef426c5ea3d9ce958 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 29 Jul 2021 12:52:14 +0200 -Subject: [PATCH] arm64/sve: Delay freeing memory in fpsimd_flush_thread() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 144/158] arm64/sve: Delay freeing memory in + fpsimd_flush_thread() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz fpsimd_flush_thread() invokes kfree() via sve_free() within a preempt disabled section which is not working on -RT. @@ -10,12 +12,14 @@ Delay freeing of memory until preemption is enabled again. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - arch/arm64/kernel/fpsimd.c | 7 ++++++- + arch/arm64/kernel/fpsimd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) +diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c +index ff4962750b3d..5e5a869b1f3a 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c -@@ -1033,6 +1033,7 @@ void fpsimd_thread_switch(struct task_st +@@ -1033,6 +1033,7 @@ void fpsimd_thread_switch(struct task_struct *next) void fpsimd_flush_thread(void) { int vl, supported_vl; @@ -43,3 +47,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } /* +-- +2.33.1 + diff --git a/debian/patches-rt/arm64-sve-Make-kernel-FPU-protection-RT-friendly.patch b/debian/patches-rt/0145-arm64-sve-Make-kernel-FPU-protection-RT-friendly.patch index 3dde08520..e78a9448b 100644 --- a/debian/patches-rt/arm64-sve-Make-kernel-FPU-protection-RT-friendly.patch +++ b/debian/patches-rt/0145-arm64-sve-Make-kernel-FPU-protection-RT-friendly.patch @@ -1,7 +1,8 @@ +From b7c8269ada4859cb0e363c2770d7941d42c4b0b2 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 29 Jul 2021 10:36:30 +0200 -Subject: [PATCH] arm64/sve: Make kernel FPU protection RT friendly -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 145/158] arm64/sve: Make kernel FPU protection RT friendly +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Non RT kernels need to protect FPU against preemption and bottom half processing. This is achieved by disabling bottom halves via @@ -17,12 +18,14 @@ half processing. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - arch/arm64/kernel/fpsimd.c | 16 ++++++++++++++-- + arch/arm64/kernel/fpsimd.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) +diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c +index 5e5a869b1f3a..99484e8bbade 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c -@@ -179,10 +179,19 @@ static void __get_cpu_fpsimd_context(voi +@@ -179,10 +179,19 @@ static void __get_cpu_fpsimd_context(void) * * The double-underscore version must only be called if you know the task * can't be preempted. @@ -43,7 +46,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> __get_cpu_fpsimd_context(); } -@@ -203,7 +212,10 @@ static void __put_cpu_fpsimd_context(voi +@@ -203,7 +212,10 @@ static void __put_cpu_fpsimd_context(void) static void put_cpu_fpsimd_context(void) { __put_cpu_fpsimd_context(); @@ -55,3 +58,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } static bool have_cpu_fpsimd_context(void) +-- +2.33.1 + diff --git a/debian/patches-rt/arm64-signal-Use-ARCH_RT_DELAYS_SIGNAL_SEND.patch b/debian/patches-rt/0146-arm64-signal-Use-ARCH_RT_DELAYS_SIGNAL_SEND.patch index 324d9171e..0511181cd 100644 --- a/debian/patches-rt/arm64-signal-Use-ARCH_RT_DELAYS_SIGNAL_SEND.patch +++ b/debian/patches-rt/0146-arm64-signal-Use-ARCH_RT_DELAYS_SIGNAL_SEND.patch @@ -1,7 +1,8 @@ +From a6ab6c02e3ad5281a679066578d54a90af435b98 Mon Sep 17 00:00:00 2001 From: He Zhe <zhe.he@windriver.com> Date: Tue, 12 Oct 2021 16:44:21 +0800 -Subject: [PATCH] arm64: signal: Use ARCH_RT_DELAYS_SIGNAL_SEND. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz +Subject: [PATCH 146/158] arm64: signal: Use ARCH_RT_DELAYS_SIGNAL_SEND. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The software breakpoint is handled via do_debug_exception() which disables preemption. On PREEMPT_RT spinlock_t become sleeping locks and @@ -15,13 +16,15 @@ Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20211012084421.35136-1-zhe.he@windriver.com --- - arch/arm64/include/asm/signal.h | 4 ++++ - arch/arm64/kernel/signal.c | 8 ++++++++ + arch/arm64/include/asm/signal.h | 4 ++++ + arch/arm64/kernel/signal.c | 8 ++++++++ 2 files changed, 12 insertions(+) +diff --git a/arch/arm64/include/asm/signal.h b/arch/arm64/include/asm/signal.h +index ef449f5f4ba8..5e535c3e4926 100644 --- a/arch/arm64/include/asm/signal.h +++ b/arch/arm64/include/asm/signal.h -@@ -22,4 +22,8 @@ static inline void __user *arch_untagged +@@ -22,4 +22,8 @@ static inline void __user *arch_untagged_si_addr(void __user *addr, } #define arch_untagged_si_addr arch_untagged_si_addr @@ -30,9 +33,11 @@ Link: https://lore.kernel.org/r/20211012084421.35136-1-zhe.he@windriver.com +#endif + #endif +diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c +index 8a9194ed981c..1d65f2801e13 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c -@@ -928,6 +928,14 @@ void do_notify_resume(struct pt_regs *re +@@ -928,6 +928,14 @@ void do_notify_resume(struct pt_regs *regs, unsigned long thread_flags) } else { local_daif_restore(DAIF_PROCCTX); @@ -47,3 +52,6 @@ Link: https://lore.kernel.org/r/20211012084421.35136-1-zhe.he@windriver.com if (thread_flags & _TIF_UPROBE) uprobe_notify_resume(regs); +-- +2.33.1 + diff --git a/debian/patches-rt/tty_serial_omap__Make_the_locking_RT_aware.patch b/debian/patches-rt/0147-tty-serial-omap-Make-the-locking-RT-aware.patch index 2b1b57413..0fe7a1fa9 100644 --- a/debian/patches-rt/tty_serial_omap__Make_the_locking_RT_aware.patch +++ b/debian/patches-rt/0147-tty-serial-omap-Make-the-locking-RT-aware.patch @@ -1,24 +1,23 @@ -Subject: tty/serial/omap: Make the locking RT aware -From: Thomas Gleixner <tglx@linutronix.de> -Date: Thu Jul 28 13:32:57 2011 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From ff172b0e81629b52fca4b104fa6526ed9812df28 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Thu, 28 Jul 2011 13:32:57 +0200 +Subject: [PATCH 147/158] tty/serial/omap: Make the locking RT aware +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The lock is a sleeping lock and local_irq_save() is not the optimsation we are looking for. Redo it to make it work on -RT and non-RT. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - drivers/tty/serial/omap-serial.c | 12 ++++-------- + drivers/tty/serial/omap-serial.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) ---- + +diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c +index 0862941862c8..10970632f0e4 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c -@@ -1255,13 +1255,10 @@ serial_omap_console_write(struct console +@@ -1255,13 +1255,10 @@ serial_omap_console_write(struct console *co, const char *s, unsigned int ier; int locked = 1; @@ -35,7 +34,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * First save the IER then disable the interrupts -@@ -1288,8 +1285,7 @@ serial_omap_console_write(struct console +@@ -1288,8 +1285,7 @@ serial_omap_console_write(struct console *co, const char *s, check_modem_status(up); if (locked) @@ -45,3 +44,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static int __init +-- +2.33.1 + diff --git a/debian/patches-rt/tty_serial_pl011__Make_the_locking_work_on_RT.patch b/debian/patches-rt/0148-tty-serial-pl011-Make-the-locking-work-on-RT.patch index d1445223d..d300594de 100644 --- a/debian/patches-rt/tty_serial_pl011__Make_the_locking_work_on_RT.patch +++ b/debian/patches-rt/0148-tty-serial-pl011-Make-the-locking-work-on-RT.patch @@ -1,23 +1,22 @@ -Subject: tty/serial/pl011: Make the locking work on RT -From: Thomas Gleixner <tglx@linutronix.de> -Date: Tue Jan 8 21:36:51 2013 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From b00a437e125a2f9e4275690937f5f749298880d7 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> +Date: Tue, 8 Jan 2013 21:36:51 +0100 +Subject: [PATCH 148/158] tty/serial/pl011: Make the locking work on RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The lock is a sleeping lock and local_irq_save() is not the optimsation we are looking for. Redo it to make it work on -RT and non-RT. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - drivers/tty/serial/amba-pl011.c | 17 +++++++++++------ + drivers/tty/serial/amba-pl011.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) ---- + +diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c +index 52518a606c06..1ca270b9857a 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2336,18 +2336,24 @@ pl011_console_write(struct console *co, +@@ -2336,18 +2336,24 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) { struct uart_amba_port *uap = amba_ports[co->index]; unsigned int old_cr = 0, new_cr; @@ -46,7 +45,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * First save the CR then disable the interrupts -@@ -2373,8 +2379,7 @@ pl011_console_write(struct console *co, +@@ -2373,8 +2379,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) pl011_write(old_cr, uap, REG_CR); if (locked) @@ -56,3 +55,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> clk_disable(uap->clk); } +-- +2.33.1 + diff --git a/debian/patches-rt/ARM__Allow_to_enable_RT.patch b/debian/patches-rt/0149-ARM-Allow-to-enable-RT.patch index 014e56ce9..f3f82876a 100644 --- a/debian/patches-rt/ARM__Allow_to_enable_RT.patch +++ b/debian/patches-rt/0149-ARM-Allow-to-enable-RT.patch @@ -1,20 +1,19 @@ -Subject: ARM: Allow to enable RT -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Fri Oct 11 13:14:29 2019 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 2d917363e746ac7196480342d52a28849b4bd192 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Fri, 11 Oct 2019 13:14:29 +0200 +Subject: [PATCH 149/158] ARM: Allow to enable RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Allow to select RT. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/arm/Kconfig | 2 ++ + arch/arm/Kconfig | 2 ++ 1 file changed, 2 insertions(+) ---- + +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 034dc3b44423..5ac2009727bd 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -32,6 +32,7 @@ config ARM @@ -33,3 +32,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> select RTC_LIB select SYS_SUPPORTS_APM_EMULATION select TRACE_IRQFLAGS_SUPPORT if !CPU_V7M +-- +2.33.1 + diff --git a/debian/patches-rt/ARM64__Allow_to_enable_RT.patch b/debian/patches-rt/0150-ARM64-Allow-to-enable-RT.patch index 5f2a9a18d..153470c74 100644 --- a/debian/patches-rt/ARM64__Allow_to_enable_RT.patch +++ b/debian/patches-rt/0150-ARM64-Allow-to-enable-RT.patch @@ -1,20 +1,19 @@ -Subject: ARM64: Allow to enable RT -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Fri Oct 11 13:14:35 2019 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 83b5e1ee927fa2ec1a6e191a4562e135e4767202 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Fri, 11 Oct 2019 13:14:35 +0200 +Subject: [PATCH 150/158] ARM64: Allow to enable RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Allow to select RT. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/arm64/Kconfig | 2 ++ + arch/arm64/Kconfig | 2 ++ 1 file changed, 2 insertions(+) ---- + +diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig +index 4edd9476b70e..aeaa2c2ecc23 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -88,6 +88,7 @@ config ARM64 @@ -33,3 +32,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> select POWER_RESET select POWER_SUPPLY select SPARSE_IRQ +-- +2.33.1 + diff --git a/debian/patches-rt/powerpc__traps__Use_PREEMPT_RT.patch b/debian/patches-rt/0151-powerpc-traps-Use-PREEMPT_RT.patch index 882d0c6e2..6f0f1997d 100644 --- a/debian/patches-rt/powerpc__traps__Use_PREEMPT_RT.patch +++ b/debian/patches-rt/0151-powerpc-traps-Use-PREEMPT_RT.patch @@ -1,20 +1,19 @@ -Subject: powerpc: traps: Use PREEMPT_RT -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Fri Jul 26 11:30:49 2019 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 0198fc9f7805b7b781e8f10022d714c1658511cb Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Fri, 26 Jul 2019 11:30:49 +0200 +Subject: [PATCH 151/158] powerpc: traps: Use PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Add PREEMPT_RT to the backtrace if enabled. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/powerpc/kernel/traps.c | 7 ++++++- + arch/powerpc/kernel/traps.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---- + +diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c +index 11741703d26e..7e4e1f489f56 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -260,12 +260,17 @@ static char *get_mmu_str(void) @@ -36,3 +35,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> IS_ENABLED(CONFIG_SMP) ? " SMP" : "", IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "", debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "", +-- +2.33.1 + diff --git a/debian/patches-rt/powerpc_pseries_iommu__Use_a_locallock_instead_local_irq_save.patch b/debian/patches-rt/0152-powerpc-pseries-iommu-Use-a-locallock-instead-local_.patch index 7d9e7e5a9..5fdcd8e95 100644 --- a/debian/patches-rt/powerpc_pseries_iommu__Use_a_locallock_instead_local_irq_save.patch +++ b/debian/patches-rt/0152-powerpc-pseries-iommu-Use-a-locallock-instead-local_.patch @@ -1,9 +1,9 @@ -Subject: powerpc/pseries/iommu: Use a locallock instead local_irq_save() -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Tue Mar 26 18:31:54 2019 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 5b24d986160c17a3b327e6124232f954eee06bb6 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Tue, 26 Mar 2019 18:31:54 +0100 +Subject: [PATCH 152/158] powerpc/pseries/iommu: Use a locallock instead + local_irq_save() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz The locallock protects the per-CPU variable tce_page. The function attempts to allocate memory while tce_page is protected (by disabling @@ -14,12 +14,12 @@ Use local_irq_save() instead of local_irq_disable(). Cc: stable-rt@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/powerpc/platforms/pseries/iommu.c | 31 ++++++++++++++++++++----------- + arch/powerpc/platforms/pseries/iommu.c | 31 +++++++++++++++++--------- 1 file changed, 20 insertions(+), 11 deletions(-) ---- + +diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c +index 8322ca86d5ac..f524145d7dd3 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -24,6 +24,7 @@ @@ -30,7 +30,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #include <asm/io.h> #include <asm/prom.h> #include <asm/rtas.h> -@@ -195,7 +196,13 @@ static int tce_build_pSeriesLP(unsigned +@@ -195,7 +196,13 @@ static int tce_build_pSeriesLP(unsigned long liobn, long tcenum, long tceshift, return ret; } @@ -45,7 +45,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages, unsigned long uaddr, -@@ -218,9 +225,10 @@ static int tce_buildmulti_pSeriesLP(stru +@@ -218,9 +225,10 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, direction, attrs); } @@ -58,7 +58,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* This is safe to do since interrupts are off when we're called * from iommu_alloc{,_sg}() -@@ -229,12 +237,12 @@ static int tce_buildmulti_pSeriesLP(stru +@@ -229,12 +237,12 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, tcep = (__be64 *)__get_free_page(GFP_ATOMIC); /* If allocation fails, fall back to the loop implementation */ if (!tcep) { @@ -73,7 +73,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } rpn = __pa(uaddr) >> tceshift; -@@ -264,7 +272,7 @@ static int tce_buildmulti_pSeriesLP(stru +@@ -264,7 +272,7 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, tcenum += limit; } while (npages > 0 && !rc); @@ -82,7 +82,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> if (unlikely(rc == H_NOT_ENOUGH_RESOURCES)) { ret = (int)rc; -@@ -440,16 +448,17 @@ static int tce_setrange_multi_pSeriesLP( +@@ -440,16 +448,17 @@ static int tce_setrange_multi_pSeriesLP(unsigned long start_pfn, DMA_BIDIRECTIONAL, 0); } @@ -104,7 +104,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } proto_tce = TCE_PCI_READ | TCE_PCI_WRITE; -@@ -492,7 +501,7 @@ static int tce_setrange_multi_pSeriesLP( +@@ -492,7 +501,7 @@ static int tce_setrange_multi_pSeriesLP(unsigned long start_pfn, /* error cleanup: caller will clear whole range */ @@ -113,3 +113,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return rc; } +-- +2.33.1 + diff --git a/debian/patches-rt/powerpc_kvm__Disable_in-kernel_MPIC_emulation_for_PREEMPT_RT.patch b/debian/patches-rt/0153-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch index aa885707e..813a01d6b 100644 --- a/debian/patches-rt/powerpc_kvm__Disable_in-kernel_MPIC_emulation_for_PREEMPT_RT.patch +++ b/debian/patches-rt/0153-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch @@ -1,9 +1,9 @@ -Subject: powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT -From: Bogdan Purcareata <bogdan.purcareata@freescale.com> -Date: Fri Apr 24 15:53:13 2015 +0000 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 4cf2f4f8d2122e8deeee59bacfdbeb3d45e64e73 Mon Sep 17 00:00:00 2001 From: Bogdan Purcareata <bogdan.purcareata@freescale.com> +Date: Fri, 24 Apr 2015 15:53:13 +0000 +Subject: [PATCH 153/158] powerpc/kvm: Disable in-kernel MPIC emulation for + PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz While converting the openpic emulation code to use a raw_spinlock_t enables guests to run on RT, there's still a performance issue. For interrupts sent in @@ -25,12 +25,12 @@ Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/powerpc/kvm/Kconfig | 1 + + arch/powerpc/kvm/Kconfig | 1 + 1 file changed, 1 insertion(+) ---- + +diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig +index ff581d70f20c..e5c84d55bdfb 100644 --- a/arch/powerpc/kvm/Kconfig +++ b/arch/powerpc/kvm/Kconfig @@ -178,6 +178,7 @@ config KVM_E500MC @@ -41,3 +41,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> select HAVE_KVM_IRQCHIP select HAVE_KVM_IRQFD select HAVE_KVM_IRQ_ROUTING +-- +2.33.1 + diff --git a/debian/patches-rt/powerpc_stackprotector__work_around_stack-guard_init_from_atomic.patch b/debian/patches-rt/0154-powerpc-stackprotector-work-around-stack-guard-init-.patch index 42aacaf1d..eec0f2b38 100644 --- a/debian/patches-rt/powerpc_stackprotector__work_around_stack-guard_init_from_atomic.patch +++ b/debian/patches-rt/0154-powerpc-stackprotector-work-around-stack-guard-init-.patch @@ -1,9 +1,9 @@ -Subject: powerpc/stackprotector: work around stack-guard init from atomic -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Tue Mar 26 18:31:29 2019 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 38925677ad73ddd307e1eaa94a40c022db8d1ea3 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Tue, 26 Mar 2019 18:31:29 +0100 +Subject: [PATCH 154/158] powerpc/stackprotector: work around stack-guard init + from atomic +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz This is invoked from the secondary CPU in atomic context. On x86 we use tsc instead. On Power we XOR it against mftb() so lets use stack address @@ -12,15 +12,15 @@ as the initial value. Cc: stable-rt@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/powerpc/include/asm/stackprotector.h | 4 ++++ + arch/powerpc/include/asm/stackprotector.h | 4 ++++ 1 file changed, 4 insertions(+) ---- + +diff --git a/arch/powerpc/include/asm/stackprotector.h b/arch/powerpc/include/asm/stackprotector.h +index 1c8460e23583..b1653c160bab 100644 --- a/arch/powerpc/include/asm/stackprotector.h +++ b/arch/powerpc/include/asm/stackprotector.h -@@ -24,7 +24,11 @@ static __always_inline void boot_init_st +@@ -24,7 +24,11 @@ static __always_inline void boot_init_stack_canary(void) unsigned long canary; /* Try to get a semi random initial value. */ @@ -32,3 +32,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> canary ^= mftb(); canary ^= LINUX_VERSION_CODE; canary &= CANARY_MASK; +-- +2.33.1 + diff --git a/debian/patches-rt/POWERPC__Allow_to_enable_RT.patch b/debian/patches-rt/0155-POWERPC-Allow-to-enable-RT.patch index 2bdb47eb6..275adf497 100644 --- a/debian/patches-rt/POWERPC__Allow_to_enable_RT.patch +++ b/debian/patches-rt/0155-POWERPC-Allow-to-enable-RT.patch @@ -1,20 +1,19 @@ -Subject: POWERPC: Allow to enable RT -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Fri Oct 11 13:14:41 2019 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 013b45b595451d0ae6c43c9554be964ed585fc6c Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Fri, 11 Oct 2019 13:14:41 +0200 +Subject: [PATCH 155/158] POWERPC: Allow to enable RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Allow to select RT. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - arch/powerpc/Kconfig | 2 ++ + arch/powerpc/Kconfig | 2 ++ 1 file changed, 2 insertions(+) ---- + +diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig +index fc02f2cbb856..3eec2a6395e4 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -151,6 +151,7 @@ config PPC @@ -33,3 +32,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> select HAVE_KERNEL_GZIP select HAVE_KERNEL_LZMA if DEFAULT_UIMAGE select HAVE_KERNEL_LZO if DEFAULT_UIMAGE +-- +2.33.1 + diff --git a/debian/patches-rt/sysfs__Add__sys_kernel_realtime_entry.patch b/debian/patches-rt/0156-sysfs-Add-sys-kernel-realtime-entry.patch index 26c81693d..7fa4a0137 100644 --- a/debian/patches-rt/sysfs__Add__sys_kernel_realtime_entry.patch +++ b/debian/patches-rt/0156-sysfs-Add-sys-kernel-realtime-entry.patch @@ -1,9 +1,8 @@ -Subject: sysfs: Add /sys/kernel/realtime entry -From: Clark Williams <williams@redhat.com> -Date: Sat Jul 30 21:55:53 2011 -0500 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - +From 33a26df13c7518740859577d89409cbc49a978b1 Mon Sep 17 00:00:00 2001 From: Clark Williams <williams@redhat.com> +Date: Sat, 30 Jul 2011 21:55:53 -0500 +Subject: [PATCH 156/158] sysfs: Add /sys/kernel/realtime entry +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz Add a /sys/kernel entry to indicate that the kernel is a realtime kernel. @@ -17,12 +16,12 @@ Are there better solutions? Should it exist and return 0 on !-rt? Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - --- - kernel/ksysfs.c | 12 ++++++++++++ + kernel/ksysfs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) ---- + +diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c +index 35859da8bd4f..dfff31ed644a 100644 --- a/kernel/ksysfs.c +++ b/kernel/ksysfs.c @@ -138,6 +138,15 @@ KERNEL_ATTR_RO(vmcoreinfo); @@ -41,13 +40,16 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* whether file capabilities are enabled */ static ssize_t fscaps_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) -@@ -229,6 +238,9 @@ static struct attribute * kernel_attrs[] +@@ -228,6 +237,9 @@ static struct attribute * kernel_attrs[] = { + #ifndef CONFIG_TINY_RCU &rcu_expedited_attr.attr, &rcu_normal_attr.attr, - #endif ++#endif +#ifdef CONFIG_PREEMPT_RT + &realtime_attr.attr, -+#endif + #endif NULL }; - +-- +2.33.1 + diff --git a/debian/patches-rt/0157-Add-localversion-for-RT-release.patch b/debian/patches-rt/0157-Add-localversion-for-RT-release.patch new file mode 100644 index 000000000..b09830b12 --- /dev/null +++ b/debian/patches-rt/0157-Add-localversion-for-RT-release.patch @@ -0,0 +1,22 @@ +From 1afb02b9853b01cae5b14bbea69094f46eea2c76 Mon Sep 17 00:00:00 2001 +From: Thomas Gleixner <tglx@linutronix.de> +Date: Fri, 8 Jul 2011 20:25:16 +0200 +Subject: [PATCH 157/158] Add localversion for -RT release +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz + +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +--- + localversion-rt | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 localversion-rt + +diff --git a/localversion-rt b/localversion-rt +new file mode 100644 +index 000000000000..c29508d21914 +--- /dev/null ++++ b/localversion-rt +@@ -0,0 +1 @@ ++-rt22 +-- +2.33.1 + diff --git a/debian/patches-rt/0158-Linux-5.15.10-rt24-REBASE.patch b/debian/patches-rt/0158-Linux-5.15.10-rt24-REBASE.patch new file mode 100644 index 000000000..2917a69f4 --- /dev/null +++ b/debian/patches-rt/0158-Linux-5.15.10-rt24-REBASE.patch @@ -0,0 +1,21 @@ +From 8b98e9a53f0f19bcc734e08a7cc322028f5acf4e Mon Sep 17 00:00:00 2001 +From: Clark Williams <williams@redhat.com> +Date: Fri, 17 Dec 2021 14:12:49 -0600 +Subject: [PATCH 158/158] Linux 5.15.10-rt24 REBASE +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.10-rt24.tar.xz + +Signed-off-by: Clark Williams <williams@redhat.com> +--- + localversion-rt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/localversion-rt b/localversion-rt +index c29508d21914..b2111a212663 100644 +--- a/localversion-rt ++++ b/localversion-rt +@@ -1 +1 @@ +--rt22 ++-rt24 +-- +2.33.1 + diff --git a/debian/patches-rt/Add_localversion_for_-RT_release.patch b/debian/patches-rt/Add_localversion_for_-RT_release.patch deleted file mode 100644 index 6b82e1327..000000000 --- a/debian/patches-rt/Add_localversion_for_-RT_release.patch +++ /dev/null @@ -1,19 +0,0 @@ -Subject: Add localversion for -RT release -From: Thomas Gleixner <tglx@linutronix.de> -Date: Fri Jul 8 20:25:16 2011 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz - -From: Thomas Gleixner <tglx@linutronix.de> - -Signed-off-by: Thomas Gleixner <tglx@linutronix.de> - - ---- - localversion-rt | 1 + - 1 file changed, 1 insertion(+) - create mode 100644 localversion-rt ---- ---- /dev/null -+++ b/localversion-rt -@@ -0,0 +1 @@ -+-rt21 diff --git a/debian/patches-rt/series b/debian/patches-rt/series index cf97ca82b..a8e57db22 100644 --- a/debian/patches-rt/series +++ b/debian/patches-rt/series @@ -1,271 +1,158 @@ -# Applied upstream - -########################################################################### -# Valentin's PCP fixes -########################################################################### -# Temp RCU patch, Frederick is working on something, too. -rcu-tree-Protect-rcu_rdp_is_offloaded-invocations-on.patch -sched_introduce_migratable.patch -arm64_mm_make_arch_faults_on_old_pte_check_for_migratability.patch - -########################################################################### -# John's printk queue -########################################################################### -printk__rename_printk_cpulock_API_and_always_disable_interrupts.patch -console__add_write_atomic_interface.patch -kdb__only_use_atomic_consoles_for_output_mirroring.patch -serial__8250__implement_write_atomic.patch -printk__relocate_printk_delay.patch -printk__call_boot_delay_msec_in_printk_delay.patch -printk__use_seqcount_latch_for_console_seq.patch -printk__introduce_kernel_sync_mode.patch -printk__move_console_printing_to_kthreads.patch -printk__remove_deferred_printing.patch -printk__add_console_handover.patch -printk__add_pr_flush.patch -printk__Enhance_the_condition_check_of_msleep_in_pr_flush.patch - -########################################################################### -# Posted and applied -########################################################################### -sched-Switch-wait_task_inactive-to-HRTIMER_MODE_REL_.patch -kthread-Move-prio-affinite-change-into-the-newly-cre.patch -genirq-Move-prio-assignment-into-the-newly-created-t.patch -genirq-Disable-irqfixup-poll-on-PREEMPT_RT.patch -efi-Disable-runtime-services-on-RT.patch -efi-Allow-efi-runtime.patch -mm-Disable-zsmalloc-on-PREEMPT_RT.patch -net-core-disable-NET_RX_BUSY_POLL-on-PREEMPT_RT.patch -samples_kfifo__Rename_read_lock_write_lock.patch -crypto_testmgr_only_disable_migration_in_crypto_disable_simd_for_test.patch -mm_allow_only_slub_on_preempt_rt.patch -mm_page_alloc_use_migrate_disable_in_drain_local_pages_wq.patch -mm_scatterlist_replace_the_preemptible_warning_in_sg_miter_stop.patch -mm-Disable-NUMA_BALANCING_DEFAULT_ENABLED-and-TRANSP.patch -x86-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch - -# KCOV (akpm) -0001_documentation_kcov_include_types_h_in_the_example.patch -0002_documentation_kcov_define_ip_in_the_example.patch -0003_kcov_allocate_per_cpu_memory_on_the_relevant_node.patch -0004_kcov_avoid_enable_disable_interrupts_if_in_task.patch -0005_kcov_replace_local_irq_save_with_a_local_lock_t.patch - -# net-next, Qdics's seqcount removal. -net-sched-sch_ets-properly-init-all-active-DRR-list-.patch -0001-gen_stats-Add-instead-Set-the-value-in-__gnet_stats_.patch -0002-gen_stats-Add-gnet_stats_add_queue.patch -0003-mq-mqprio-Use-gnet_stats_add_queue.patch -0004-gen_stats-Move-remaining-users-to-gnet_stats_add_que.patch -0005-u64_stats-Introduce-u64_stats_set.patch -0006-net-sched-Protect-Qdisc-bstats-with-u64_stats.patch -0007-net-sched-Use-_bstats_update-set-instead-of-raw-writ.patch -0008-net-sched-Merge-Qdisc-bstats-and-Qdisc-cpu_bstats-da.patch -0009-net-sched-Remove-Qdisc-running-sequence-counter.patch -net-sched-Allow-statistics-reads-from-softirq.patch -net-sched-fix-logic-error-in-qdisc_run_begin.patch -net-sched-remove-one-pair-of-atomic-operations.patch -net-stats-Read-the-statistics-in-___gnet_stats_copy_.patch -net-sched-gred-dynamically-allocate-tc_gred_qopt_off.patch - -# tip, irqwork -0001_sched_rt_annotate_the_rt_balancing_logic_irqwork_as_irq_work_hard_irq.patch -0002_irq_work_allow_irq_work_sync_to_sleep_if_irq_work_no_irq_support.patch -0003_irq_work_handle_some_irq_work_in_a_per_cpu_thread_on_preempt_rt.patch -0004_irq_work_also_rcuwait_for_irq_work_hard_irq_on_preempt_rt.patch - -########################################################################### -# Posted -########################################################################### -irq_poll-Use-raise_softirq_irqoff-in-cpu_dead-notifi.patch -smp_wake_ksoftirqd_on_preempt_rt_instead_do_softirq.patch -fs-namespace-Boost-the-mount_lock.lock-owner-instead.patch -fscache-Use-only-one-fscache_object_cong_wait.patch - -# sched -0001_sched_clean_up_the_might_sleep_underscore_zoo.patch -0002_sched_make_cond_resched__lock_variants_consistent_vs_might_sleep.patch -0003_sched_remove_preempt_offset_argument_from___might_sleep.patch -0004_sched_cleanup_might_sleep_printks.patch -0005_sched_make_might_sleep_output_less_confusing.patch -0006_sched_make_rcu_nest_depth_distinct_in___might_resched.patch -0007_sched_make_cond_resched_lock_variants_rt_aware.patch -0008_locking_rt_take_rcu_nesting_into_account_for___might_resched.patch -# -0001_sched_limit_the_number_of_task_migrations_per_batch_on_rt.patch -0002_sched_disable_ttwu_queue_on_rt.patch -0003_sched_move_kprobes_cleanup_out_of_finish_task_switch.patch -0004_sched_delay_task_stack_freeing_on_rt.patch -0005_sched_move_mmdrop_to_rcu_on_rt.patch - -########################################################################### -# Post -########################################################################### -cgroup__use_irqsave_in_cgroup_rstat_flush_locked.patch -mm__workingset__replace_IRQ-off_check_with_a_lockdep_assert..patch -tcp__Remove_superfluous_BH-disable_around_listening_hash.patch - -########################################################################### -# Kconfig bits: -########################################################################### -jump-label__disable_if_stop_machine_is_used.patch - -########################################################################### -# Locking: RT bits. Need review -########################################################################### -locking-Remove-rt_rwlock_is_contended.patch -lockdep-selftests-Avoid-using-local_lock_-acquire-re.patch -0001-sched-Trigger-warning-if-migration_disabled-counter-.patch -0003-rtmutex-Add-a-special-case-for-ww-mutex-handling.patch -0004-rtmutex-Add-rt_mutex_lock_nest_lock-and-rt_mutex_loc.patch -0005-lockdep-Make-it-RT-aware.patch -0006-lockdep-selftests-Add-rtmutex-to-the-last-column.patch -0007-lockdep-selftests-Unbalanced-migrate_disable-rcu_rea.patch -0008-lockdep-selftests-Skip-the-softirq-related-tests-on-.patch -0010-lockdep-selftests-Adapt-ww-tests-for-PREEMPT_RT.patch -locking-Allow-to-include-asm-spinlock_types.h-from-l.patch - -########################################################################### -# preempt: Conditional variants -########################################################################### -sched-Make-preempt_enable_no_resched-behave-like-pre.patch - -########################################################################### -# sched: -########################################################################### -# cpu-light -kernel_sched__add_putget_cpu_light.patch -block_mq__do_not_invoke_preempt_disable.patch -md__raid5__Make_raid5_percpu_handling_RT_aware.patch -scsi_fcoe__Make_RT_aware..patch -mm_vmalloc__Another_preempt_disable_region_which_sucks.patch -net__Remove_preemption_disabling_in_netif_rx.patch -sunrpc__Make_svc_xprt_do_enqueue_use_get_cpu_light.patch -crypto__cryptd_-_add_a_lock_instead_preempt_disable_local_bh_disable.patch - -########################################################################### -# softirq: -########################################################################### -softirq__Check_preemption_after_reenabling_interrupts.patch - -########################################################################### -# mm: Assorted RT bits. Need care -########################################################################### -u64_stats__Disable_preemption_on_32bit-UP_SMP_with_RT_during_updates.patch - -########################################################################### -# Disable memcontrol for now. The protection scopes are FUBARed -########################################################################### -mm-memcontro--Disable-on-PREEMPT_RT.patch -#mm_memcontrol__Disable_preemption_in___mod_memcg_lruvec_state.patch -#mm__memcontrol__Replace_disable-IRQ_locking_with_a_local_lock.patch -#mm_memcontrol__Dont_call_schedule_work_on_in_preemption_disabled_context.patch -#mm_memcontrol__Replace_local_irq_disable_with_local_locks.patch - -########################################################################### -# ptrace: Revisit -########################################################################### -signal__Revert_ptrace_preempt_magic.patch -ptrace__fix_ptrace_vs_tasklist_lock_race.patch - -########################################################################### -# fs: The namespace part needs a proper fix -########################################################################### -fs_dcache__use_swait_queue_instead_of_waitqueue.patch -fs_dcache__disable_preemption_on_i_dir_seqs_write_side.patch - -########################################################################### -# RCU -########################################################################### -rcu__Delay_RCU-selftests.patch - -########################################################################### -# net: -########################################################################### -net_core__use_local_bh_disable_in_netif_rx_ni.patch -net__Use_skbufhead_with_raw_lock.patch -net__Dequeue_in_dev_cpu_dead_without_the_lock.patch -net__dev__always_take_qdiscs_busylock_in___dev_xmit_skb.patch - -########################################################################### -# randomness: -########################################################################### -panic__skip_get_random_bytes_for_RT_FULL_in_init_oops_id.patch -x86__stackprotector__Avoid_random_pool_on_rt.patch -random__Make_it_work_on_rt.patch - -########################################################################### -# DRM: -########################################################################### -0002-drm-i915-Don-t-disable-interrupts-and-pretend-a-lock.patch -0003-drm-i915-Use-preempt_disable-enable_rt-where-recomme.patch -0004-drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch -0005-drm-i915-Don-t-check-for-atomic-context-on-PREEMPT_R.patch -0006-drm-i915-Disable-tracing-points-on-PREEMPT_RT.patch -0007-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch -0008-drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch -0009-drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch -0010-drm-i915-Drop-the-irqs_disabled-check.patch - -########################################################################### -# X86: -########################################################################### -signal_x86__Delay_calling_signals_in_atomic.patch -x86__kvm_Require_const_tsc_for_RT.patch -x86__Allow_to_enable_RT.patch -x86__Enable_RT_also_on_32bit.patch - -########################################################################### -# For later, not essencial -########################################################################### -genirq__update_irq_set_irqchip_state_documentation.patch -ASoC-mediatek-mt8195-Remove-unsued-irqs_lock.patch -smack-Guard-smack_ipv6_lock-definition-within-a-SMAC.patch -virt-acrn-Remove-unsued-acrn_irqfds_mutex.patch -tpm_tis__fix_stall_after_iowrites.patch -mm-zsmalloc-Replace-bit-spinlock-and-get_cpu_var-usa.patch -drivers_block_zram__Replace_bit_spinlocks_with_rtmutex_for_-rt.patch -leds-trigger-Disable-CPU-trigger-on-PREEMPT_RT.patch -generic-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch -softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch - -########################################################################### -# Lazy preemption -########################################################################### -sched__Add_support_for_lazy_preemption.patch -x86_entry__Use_should_resched_in_idtentry_exit_cond_resched.patch -x86__Support_for_lazy_preemption.patch -entry--Fix-the-preempt-lazy-fallout.patch -arm__Add_support_for_lazy_preemption.patch -powerpc__Add_support_for_lazy_preemption.patch -arch_arm64__Add_lazy_preempt_support.patch - -########################################################################### -# ARM/ARM64 -########################################################################### -ARM__enable_irq_in_translation_section_permission_fault_handlers.patch -KVM__arm_arm64__downgrade_preempt_disabled_region_to_migrate_disable.patch -arm64-sve-Delay-freeing-memory-in-fpsimd_flush_threa.patch -arm64-sve-Make-kernel-FPU-protection-RT-friendly.patch -arm64-signal-Use-ARCH_RT_DELAYS_SIGNAL_SEND.patch -tty_serial_omap__Make_the_locking_RT_aware.patch -tty_serial_pl011__Make_the_locking_work_on_RT.patch -ARM__Allow_to_enable_RT.patch -ARM64__Allow_to_enable_RT.patch - -########################################################################### -# POWERPC -########################################################################### -powerpc__traps__Use_PREEMPT_RT.patch -powerpc_pseries_iommu__Use_a_locallock_instead_local_irq_save.patch -powerpc_kvm__Disable_in-kernel_MPIC_emulation_for_PREEMPT_RT.patch -powerpc_stackprotector__work_around_stack-guard_init_from_atomic.patch -POWERPC__Allow_to_enable_RT.patch - -# Sysfs file vs uname() -v -sysfs__Add__sys_kernel_realtime_entry.patch - -########################################################################### -# RT release version -########################################################################### -Add_localversion_for_-RT_release.patch +0001-rcu-tree-Protect-rcu_rdp_is_offloaded-invocations-on.patch +0002-sched-Introduce-migratable.patch +0003-arm64-mm-Make-arch_faults_on_old_pte-check-for-migra.patch +0004-printk-rename-printk-cpulock-API-and-always-disable-.patch +0005-console-add-write_atomic-interface.patch +0006-kdb-only-use-atomic-consoles-for-output-mirroring.patch +0007-serial-8250-implement-write_atomic.patch +0008-printk-relocate-printk_delay.patch +0009-printk-call-boot_delay_msec-in-printk_delay.patch +0010-printk-use-seqcount_latch-for-console_seq.patch +0011-printk-introduce-kernel-sync-mode.patch +0012-printk-move-console-printing-to-kthreads.patch +0013-printk-remove-deferred-printing.patch +0014-printk-add-console-handover.patch +0015-printk-add-pr_flush.patch +0016-printk-Enhance-the-condition-check-of-msleep-in-pr_f.patch +0017-sched-Switch-wait_task_inactive-to-HRTIMER_MODE_REL_.patch +0018-kthread-Move-prio-affinite-change-into-the-newly-cre.patch +0019-genirq-Move-prio-assignment-into-the-newly-created-t.patch +0020-genirq-Disable-irqfixup-poll-on-PREEMPT_RT.patch +0021-efi-Disable-runtime-services-on-RT.patch +0022-efi-Allow-efi-runtime.patch +0023-mm-Disable-zsmalloc-on-PREEMPT_RT.patch +0024-net-core-disable-NET_RX_BUSY_POLL-on-PREEMPT_RT.patch +0025-samples-kfifo-Rename-read_lock-write_lock.patch +0026-crypto-testmgr-Only-disable-migration-in-crypto_disa.patch +0027-mm-Allow-only-SLUB-on-PREEMPT_RT.patch +0028-mm-page_alloc-Use-migrate_disable-in-drain_local_pag.patch +0029-mm-scatterlist-Replace-the-preemptible-warning-in-sg.patch +0030-mm-Disable-NUMA_BALANCING_DEFAULT_ENABLED-and-TRANSP.patch +0031-x86-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch +0032-Documentation-kcov-Include-types.h-in-the-example.patch +0033-Documentation-kcov-Define-ip-in-the-example.patch +0034-kcov-Allocate-per-CPU-memory-on-the-relevant-node.patch +0035-kcov-Avoid-enable-disable-interrupts-if-in_task.patch +0036-kcov-Replace-local_irq_save-with-a-local_lock_t.patch +0037-net-sched-sch_ets-properly-init-all-active-DRR-list-.patch +0038-gen_stats-Add-instead-Set-the-value-in-__gnet_stats_.patch +0039-gen_stats-Add-gnet_stats_add_queue.patch +0040-mq-mqprio-Use-gnet_stats_add_queue.patch +0041-gen_stats-Move-remaining-users-to-gnet_stats_add_que.patch +0042-u64_stats-Introduce-u64_stats_set.patch +0043-net-sched-Protect-Qdisc-bstats-with-u64_stats.patch +0044-net-sched-Use-_bstats_update-set-instead-of-raw-writ.patch +0045-net-sched-Merge-Qdisc-bstats-and-Qdisc-cpu_bstats-da.patch +0046-net-sched-Remove-Qdisc-running-sequence-counter.patch +0047-net-sched-Allow-statistics-reads-from-softirq.patch +0048-net-sched-fix-logic-error-in-qdisc_run_begin.patch +0049-net-sched-remove-one-pair-of-atomic-operations.patch +0050-net-stats-Read-the-statistics-in-___gnet_stats_copy_.patch +0051-net-sched-gred-dynamically-allocate-tc_gred_qopt_off.patch +0052-sched-rt-Annotate-the-RT-balancing-logic-irqwork-as-.patch +0053-irq_work-Allow-irq_work_sync-to-sleep-if-irq_work-no.patch +0054-irq_work-Handle-some-irq_work-in-a-per-CPU-thread-on.patch +0055-irq_work-Also-rcuwait-for-IRQ_WORK_HARD_IRQ-on-PREEM.patch +0056-irq_poll-Use-raise_softirq_irqoff-in-cpu_dead-notifi.patch +0057-smp-Wake-ksoftirqd-on-PREEMPT_RT-instead-do_softirq.patch +0058-fs-namespace-Boost-the-mount_lock.lock-owner-instead.patch +0059-fscache-Use-only-one-fscache_object_cong_wait.patch +0060-sched-Clean-up-the-might_sleep-underscore-zoo.patch +0061-sched-Make-cond_resched_-lock-variants-consistent-vs.patch +0062-sched-Remove-preempt_offset-argument-from-__might_sl.patch +0063-sched-Cleanup-might_sleep-printks.patch +0064-sched-Make-might_sleep-output-less-confusing.patch +0065-sched-Make-RCU-nest-depth-distinct-in-__might_resche.patch +0066-sched-Make-cond_resched_lock-variants-RT-aware.patch +0067-locking-rt-Take-RCU-nesting-into-account-for-__might.patch +0068-sched-Limit-the-number-of-task-migrations-per-batch-.patch +0069-sched-Disable-TTWU_QUEUE-on-RT.patch +0070-sched-Move-kprobes-cleanup-out-of-finish_task_switch.patch +0071-sched-Delay-task-stack-freeing-on-RT.patch +0072-sched-Move-mmdrop-to-RCU-on-RT.patch +0073-cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch +0074-mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch +0075-tcp-Remove-superfluous-BH-disable-around-listening_h.patch +0076-jump-label-disable-if-stop_machine-is-used.patch +0077-locking-Remove-rt_rwlock_is_contended.patch +0078-lockdep-selftests-Avoid-using-local_lock_-acquire-re.patch +0079-sched-Trigger-warning-if-migration_disabled-counter-.patch +0080-rtmutex-Add-a-special-case-for-ww-mutex-handling.patch +0081-rtmutex-Add-rt_mutex_lock_nest_lock-and-rt_mutex_loc.patch +0082-lockdep-Make-it-RT-aware.patch +0083-lockdep-selftests-Add-rtmutex-to-the-last-column.patch +0084-lockdep-selftests-Unbalanced-migrate_disable-rcu_rea.patch +0085-lockdep-selftests-Skip-the-softirq-related-tests-on-.patch +0086-lockdep-selftests-Adapt-ww-tests-for-PREEMPT_RT.patch +0087-locking-Allow-to-include-asm-spinlock_types.h-from-l.patch +0088-sched-Make-preempt_enable_no_resched-behave-like-pre.patch +0089-kernel-sched-add-put-get-_cpu_light.patch +0090-block-mq-do-not-invoke-preempt_disable.patch +0091-md-raid5-Make-raid5_percpu-handling-RT-aware.patch +0092-scsi-fcoe-Make-RT-aware.patch +0093-mm-vmalloc-Another-preempt-disable-region-which-suck.patch +0094-net-Remove-preemption-disabling-in-netif_rx.patch +0095-sunrpc-Make-svc_xprt_do_enqueue-use-get_cpu_light.patch +0096-crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch +0097-softirq-Check-preemption-after-reenabling-interrupts.patch +0098-u64_stats-Disable-preemption-on-32bit-UP-SMP-with-RT.patch +0099-mm-memcontrol-Disable-on-PREEMPT_RT.patch +0100-signal-Revert-ptrace-preempt-magic.patch +0101-ptrace-fix-ptrace-vs-tasklist_lock-race.patch +0102-fs-dcache-use-swait_queue-instead-of-waitqueue.patch +0103-fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch +0104-rcu-Delay-RCU-selftests.patch +0105-net-core-use-local_bh_disable-in-netif_rx_ni.patch +0106-net-Use-skbufhead-with-raw-lock.patch +0107-net-Dequeue-in-dev_cpu_dead-without-the-lock.patch +0108-net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch +0109-panic-skip-get_random_bytes-for-RT_FULL-in-init_oops.patch +0110-x86-stackprotector-Avoid-random-pool-on-rt.patch +0111-random-Make-it-work-on-rt.patch +0112-drm-i915-Don-t-disable-interrupts-and-pretend-a-lock.patch +0113-drm-i915-Use-preempt_disable-enable_rt-where-recomme.patch +0114-drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch +0115-drm-i915-Don-t-check-for-atomic-context-on-PREEMPT_R.patch +0116-drm-i915-Disable-tracing-points-on-PREEMPT_RT.patch +0117-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch +0118-drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch +0119-drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch +0120-drm-i915-Drop-the-irqs_disabled-check.patch +0121-signal-x86-Delay-calling-signals-in-atomic.patch +0122-x86-kvm-Require-const-tsc-for-RT.patch +0123-x86-Allow-to-enable-RT.patch +0124-x86-Enable-RT-also-on-32bit.patch +0125-genirq-update-irq_set_irqchip_state-documentation.patch +0126-ASoC-mediatek-mt8195-Remove-unsued-irqs_lock.patch +0127-smack-Guard-smack_ipv6_lock-definition-within-a-SMAC.patch +0128-virt-acrn-Remove-unsued-acrn_irqfds_mutex.patch +0129-tpm_tis-fix-stall-after-iowrite-s.patch +0130-mm-zsmalloc-Replace-bit-spinlock-and-get_cpu_var-usa.patch +0131-drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch +0132-leds-trigger-Disable-CPU-trigger-on-PREEMPT_RT.patch +0133-generic-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch +0134-softirq-Disable-softirq-stacks-on-PREEMPT_RT.patch +0135-sched-Add-support-for-lazy-preemption.patch +0136-x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch +0137-x86-Support-for-lazy-preemption.patch +0138-entry-Fix-the-preempt-lazy-fallout.patch +0139-arm-Add-support-for-lazy-preemption.patch +0140-powerpc-Add-support-for-lazy-preemption.patch +0141-arch-arm64-Add-lazy-preempt-support.patch +0142-ARM-enable-irq-in-translation-section-permission-fau.patch +0143-KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch +0144-arm64-sve-Delay-freeing-memory-in-fpsimd_flush_threa.patch +0145-arm64-sve-Make-kernel-FPU-protection-RT-friendly.patch +0146-arm64-signal-Use-ARCH_RT_DELAYS_SIGNAL_SEND.patch +0147-tty-serial-omap-Make-the-locking-RT-aware.patch +0148-tty-serial-pl011-Make-the-locking-work-on-RT.patch +0149-ARM-Allow-to-enable-RT.patch +0150-ARM64-Allow-to-enable-RT.patch +0151-powerpc-traps-Use-PREEMPT_RT.patch +0152-powerpc-pseries-iommu-Use-a-locallock-instead-local_.patch +0153-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch +0154-powerpc-stackprotector-work-around-stack-guard-init-.patch +0155-POWERPC-Allow-to-enable-RT.patch +0156-sysfs-Add-sys-kernel-realtime-entry.patch +0157-Add-localversion-for-RT-release.patch +0158-Linux-5.15.10-rt24-REBASE.patch diff --git a/debian/patches/bugfix/all/USB-gadget-detect-too-big-endpoint-0-requests.patch b/debian/patches/bugfix/all/USB-gadget-detect-too-big-endpoint-0-requests.patch deleted file mode 100644 index 68c0ab6de..000000000 --- a/debian/patches/bugfix/all/USB-gadget-detect-too-big-endpoint-0-requests.patch +++ /dev/null @@ -1,112 +0,0 @@ -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Thu, 9 Dec 2021 18:59:27 +0100 -Subject: USB: gadget: detect too-big endpoint 0 requests -Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit?id=36dfdf11af49d3c009c711fb16f5c6e7a274505d -Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2021-39685 - -commit 153a2d7e3350cc89d406ba2d35be8793a64c2038 upstream. - -Sometimes USB hosts can ask for buffers that are too large from endpoint -0, which should not be allowed. If this happens for OUT requests, stall -the endpoint, but for IN requests, trim the request size to the endpoint -buffer size. - -Co-developed-by: Szymon Heidrich <szymon.heidrich@gmail.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/gadget/composite.c | 12 ++++++++++++ - drivers/usb/gadget/legacy/dbgp.c | 13 +++++++++++++ - drivers/usb/gadget/legacy/inode.c | 16 +++++++++++++++- - 3 files changed, 40 insertions(+), 1 deletion(-) - -diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c -index 504c1cbc255d..1ef7922b57b6 100644 ---- a/drivers/usb/gadget/composite.c -+++ b/drivers/usb/gadget/composite.c -@@ -1679,6 +1679,18 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) - struct usb_function *f = NULL; - u8 endp; - -+ if (w_length > USB_COMP_EP0_BUFSIZ) { -+ if (ctrl->bRequestType == USB_DIR_OUT) { -+ goto done; -+ } else { -+ /* Cast away the const, we are going to overwrite on purpose. */ -+ __le16 *temp = (__le16 *)&ctrl->wLength; -+ -+ *temp = cpu_to_le16(USB_COMP_EP0_BUFSIZ); -+ w_length = USB_COMP_EP0_BUFSIZ; -+ } -+ } -+ - /* partial re-init of the response message; the function or the - * gadget might need to intercept e.g. a control-OUT completion - * when we delegate to it. -diff --git a/drivers/usb/gadget/legacy/dbgp.c b/drivers/usb/gadget/legacy/dbgp.c -index e1d566c9918a..e567afcb2794 100644 ---- a/drivers/usb/gadget/legacy/dbgp.c -+++ b/drivers/usb/gadget/legacy/dbgp.c -@@ -345,6 +345,19 @@ static int dbgp_setup(struct usb_gadget *gadget, - void *data = NULL; - u16 len = 0; - -+ if (length > DBGP_REQ_LEN) { -+ if (ctrl->bRequestType == USB_DIR_OUT) { -+ return err; -+ } else { -+ /* Cast away the const, we are going to overwrite on purpose. */ -+ __le16 *temp = (__le16 *)&ctrl->wLength; -+ -+ *temp = cpu_to_le16(DBGP_REQ_LEN); -+ length = DBGP_REQ_LEN; -+ } -+ } -+ -+ - if (request == USB_REQ_GET_DESCRIPTOR) { - switch (value>>8) { - case USB_DT_DEVICE: -diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c -index 539220d7f5b6..0a4041552ed1 100644 ---- a/drivers/usb/gadget/legacy/inode.c -+++ b/drivers/usb/gadget/legacy/inode.c -@@ -110,6 +110,8 @@ enum ep0_state { - /* enough for the whole queue: most events invalidate others */ - #define N_EVENT 5 - -+#define RBUF_SIZE 256 -+ - struct dev_data { - spinlock_t lock; - refcount_t count; -@@ -144,7 +146,7 @@ struct dev_data { - struct dentry *dentry; - - /* except this scratch i/o buffer for ep0 */ -- u8 rbuf [256]; -+ u8 rbuf[RBUF_SIZE]; - }; - - static inline void get_dev (struct dev_data *data) -@@ -1334,6 +1336,18 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) - u16 w_value = le16_to_cpu(ctrl->wValue); - u16 w_length = le16_to_cpu(ctrl->wLength); - -+ if (w_length > RBUF_SIZE) { -+ if (ctrl->bRequestType == USB_DIR_OUT) { -+ return value; -+ } else { -+ /* Cast away the const, we are going to overwrite on purpose. */ -+ __le16 *temp = (__le16 *)&ctrl->wLength; -+ -+ *temp = cpu_to_le16(RBUF_SIZE); -+ w_length = RBUF_SIZE; -+ } -+ } -+ - spin_lock (&dev->lock); - dev->setup_abort = 0; - if (dev->state == STATE_DEV_UNCONNECTED) { --- -2.34.1 - diff --git a/debian/patches/bugfix/all/USB-gadget-zero-allocate-endpoint-0-buffers.patch b/debian/patches/bugfix/all/USB-gadget-zero-allocate-endpoint-0-buffers.patch deleted file mode 100644 index 9c53f8d0d..000000000 --- a/debian/patches/bugfix/all/USB-gadget-zero-allocate-endpoint-0-buffers.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Thu, 9 Dec 2021 19:02:15 +0100 -Subject: USB: gadget: zero allocate endpoint 0 buffers -Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit?id=6eea4ace62fa6414432692ee44f0c0a3d541d97a -Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2021-39685 - -commit 86ebbc11bb3f60908a51f3e41a17e3f477c2eaa3 upstream. - -Under some conditions, USB gadget devices can show allocated buffer -contents to a host. Fix this up by zero-allocating them so that any -extra data will all just be zeros. - -Reported-by: Szymon Heidrich <szymon.heidrich@gmail.com> -Tested-by: Szymon Heidrich <szymon.heidrich@gmail.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/usb/gadget/composite.c | 2 +- - drivers/usb/gadget/legacy/dbgp.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c -index 1ef7922b57b6..284eea9f6e4d 100644 ---- a/drivers/usb/gadget/composite.c -+++ b/drivers/usb/gadget/composite.c -@@ -2221,7 +2221,7 @@ int composite_dev_prepare(struct usb_composite_driver *composite, - if (!cdev->req) - return -ENOMEM; - -- cdev->req->buf = kmalloc(USB_COMP_EP0_BUFSIZ, GFP_KERNEL); -+ cdev->req->buf = kzalloc(USB_COMP_EP0_BUFSIZ, GFP_KERNEL); - if (!cdev->req->buf) - goto fail; - -diff --git a/drivers/usb/gadget/legacy/dbgp.c b/drivers/usb/gadget/legacy/dbgp.c -index e567afcb2794..355bc7dab9d5 100644 ---- a/drivers/usb/gadget/legacy/dbgp.c -+++ b/drivers/usb/gadget/legacy/dbgp.c -@@ -137,7 +137,7 @@ static int dbgp_enable_ep_req(struct usb_ep *ep) - goto fail_1; - } - -- req->buf = kmalloc(DBGP_REQ_LEN, GFP_KERNEL); -+ req->buf = kzalloc(DBGP_REQ_LEN, GFP_KERNEL); - if (!req->buf) { - err = -ENOMEM; - stp = 2; --- -2.34.1 - diff --git a/debian/patches/bugfix/all/atlantic-Fix-OOB-read-and-write-in-hw_atl_utils_fw_r.patch b/debian/patches/bugfix/all/atlantic-Fix-OOB-read-and-write-in-hw_atl_utils_fw_r.patch deleted file mode 100644 index a2953a107..000000000 --- a/debian/patches/bugfix/all/atlantic-Fix-OOB-read-and-write-in-hw_atl_utils_fw_r.patch +++ /dev/null @@ -1,91 +0,0 @@ -From: Zekun Shen <bruceshenzk@gmail.com> -Date: Sat, 13 Nov 2021 22:24:40 -0500 -Subject: atlantic: Fix OOB read and write in hw_atl_utils_fw_rpc_wait -Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit?id=cec49b6dfdb0b9fefd0f17c32014223f73ee2605 -Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2021-43975 - -[ Upstream commit b922f622592af76b57cbc566eaeccda0b31a3496 ] - -This bug report shows up when running our research tools. The -reports is SOOB read, but it seems SOOB write is also possible -a few lines below. - -In details, fw.len and sw.len are inputs coming from io. A len -over the size of self->rpc triggers SOOB. The patch fixes the -bugs by adding sanity checks. - -The bugs are triggerable with compromised/malfunctioning devices. -They are potentially exploitable given they first leak up to -0xffff bytes and able to overwrite the region later. - -The patch is tested with QEMU emulater. -This is NOT tested with a real device. - -Attached is the log we found by fuzzing. - -BUG: KASAN: slab-out-of-bounds in - hw_atl_utils_fw_upload_dwords+0x393/0x3c0 [atlantic] -Read of size 4 at addr ffff888016260b08 by task modprobe/213 -CPU: 0 PID: 213 Comm: modprobe Not tainted 5.6.0 #1 -Call Trace: - dump_stack+0x76/0xa0 - print_address_description.constprop.0+0x16/0x200 - ? hw_atl_utils_fw_upload_dwords+0x393/0x3c0 [atlantic] - ? hw_atl_utils_fw_upload_dwords+0x393/0x3c0 [atlantic] - __kasan_report.cold+0x37/0x7c - ? aq_hw_read_reg_bit+0x60/0x70 [atlantic] - ? hw_atl_utils_fw_upload_dwords+0x393/0x3c0 [atlantic] - kasan_report+0xe/0x20 - hw_atl_utils_fw_upload_dwords+0x393/0x3c0 [atlantic] - hw_atl_utils_fw_rpc_call+0x95/0x130 [atlantic] - hw_atl_utils_fw_rpc_wait+0x176/0x210 [atlantic] - hw_atl_utils_mpi_create+0x229/0x2e0 [atlantic] - ? hw_atl_utils_fw_rpc_wait+0x210/0x210 [atlantic] - ? hw_atl_utils_initfw+0x9f/0x1c8 [atlantic] - hw_atl_utils_initfw+0x12a/0x1c8 [atlantic] - aq_nic_ndev_register+0x88/0x650 [atlantic] - ? aq_nic_ndev_init+0x235/0x3c0 [atlantic] - aq_pci_probe+0x731/0x9b0 [atlantic] - ? aq_pci_func_init+0xc0/0xc0 [atlantic] - local_pci_probe+0xd3/0x160 - pci_device_probe+0x23f/0x3e0 - -Reported-by: Brendan Dolan-Gavitt <brendandg@nyu.edu> -Signed-off-by: Zekun Shen <bruceshenzk@gmail.com> -Signed-off-by: David S. Miller <davem@davemloft.net> -Signed-off-by: Sasha Levin <sashal@kernel.org> ---- - .../ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c -index 404cbf60d3f2..da1d185f6d22 100644 ---- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c -+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c -@@ -559,6 +559,11 @@ int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, - goto err_exit; - - if (fw.len == 0xFFFFU) { -+ if (sw.len > sizeof(self->rpc)) { -+ printk(KERN_INFO "Invalid sw len: %x\n", sw.len); -+ err = -EINVAL; -+ goto err_exit; -+ } - err = hw_atl_utils_fw_rpc_call(self, sw.len); - if (err < 0) - goto err_exit; -@@ -567,6 +572,11 @@ int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, - - if (rpc) { - if (fw.len) { -+ if (fw.len > sizeof(self->rpc)) { -+ printk(KERN_INFO "Invalid fw len: %x\n", fw.len); -+ err = -EINVAL; -+ goto err_exit; -+ } - err = - hw_atl_utils_fw_downld_dwords(self, - self->rpc_addr, --- -2.34.1 - diff --git a/debian/patches/bugfix/all/bpf-fix-kernel-address-leakage-in-atomic-cmpxchg-s-r0-aux-reg.patch b/debian/patches/bugfix/all/bpf-fix-kernel-address-leakage-in-atomic-cmpxchg-s-r0-aux-reg.patch deleted file mode 100644 index aad743511..000000000 --- a/debian/patches/bugfix/all/bpf-fix-kernel-address-leakage-in-atomic-cmpxchg-s-r0-aux-reg.patch +++ /dev/null @@ -1,59 +0,0 @@ -From a82fe085f344ef20b452cd5f481010ff96b5c4cd Mon Sep 17 00:00:00 2001 -From: Daniel Borkmann <daniel@iogearbox.net> -Date: Tue, 7 Dec 2021 11:02:02 +0000 -Subject: bpf: Fix kernel address leakage in atomic cmpxchg's r0 aux reg - -From: Daniel Borkmann <daniel@iogearbox.net> - -commit a82fe085f344ef20b452cd5f481010ff96b5c4cd upstream. - -The implementation of BPF_CMPXCHG on a high level has the following parameters: - - .-[old-val] .-[new-val] - BPF_R0 = cmpxchg{32,64}(DST_REG + insn->off, BPF_R0, SRC_REG) - `-[mem-loc] `-[old-val] - -Given a BPF insn can only have two registers (dst, src), the R0 is fixed and -used as an auxilliary register for input (old value) as well as output (returning -old value from memory location). While the verifier performs a number of safety -checks, it misses to reject unprivileged programs where R0 contains a pointer as -old value. - -Through brute-forcing it takes about ~16sec on my machine to leak a kernel pointer -with BPF_CMPXCHG. The PoC is basically probing for kernel addresses by storing the -guessed address into the map slot as a scalar, and using the map value pointer as -R0 while SRC_REG has a canary value to detect a matching address. - -Fix it by checking R0 for pointers, and reject if that's the case for unprivileged -programs. - -Fixes: 5ffa25502b5a ("bpf: Add instructions for atomic_[cmp]xchg") -Reported-by: Ryota Shiga (Flatt Security) -Acked-by: Brendan Jackman <jackmanb@google.com> -Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> -Signed-off-by: Alexei Starovoitov <ast@kernel.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - kernel/bpf/verifier.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - ---- a/kernel/bpf/verifier.c -+++ b/kernel/bpf/verifier.c -@@ -4386,9 +4386,16 @@ static int check_atomic(struct bpf_verif - - if (insn->imm == BPF_CMPXCHG) { - /* Check comparison of R0 with memory location */ -- err = check_reg_arg(env, BPF_REG_0, SRC_OP); -+ const u32 aux_reg = BPF_REG_0; -+ -+ err = check_reg_arg(env, aux_reg, SRC_OP); - if (err) - return err; -+ -+ if (is_pointer_value(env, aux_reg)) { -+ verbose(env, "R%d leaks addr into mem\n", aux_reg); -+ return -EACCES; -+ } - } - - if (is_pointer_value(env, insn->src_reg)) { diff --git a/debian/patches/bugfix/all/bpf-fix-kernel-address-leakage-in-atomic-fetch.patch b/debian/patches/bugfix/all/bpf-fix-kernel-address-leakage-in-atomic-fetch.patch deleted file mode 100644 index d8035a87f..000000000 --- a/debian/patches/bugfix/all/bpf-fix-kernel-address-leakage-in-atomic-fetch.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 7d3baf0afa3aa9102d6a521a8e4c41888bb79882 Mon Sep 17 00:00:00 2001 -From: Daniel Borkmann <daniel@iogearbox.net> -Date: Tue, 7 Dec 2021 12:51:56 +0000 -Subject: bpf: Fix kernel address leakage in atomic fetch - -From: Daniel Borkmann <daniel@iogearbox.net> - -commit 7d3baf0afa3aa9102d6a521a8e4c41888bb79882 upstream. - -The change in commit 37086bfdc737 ("bpf: Propagate stack bounds to registers -in atomics w/ BPF_FETCH") around check_mem_access() handling is buggy since -this would allow for unprivileged users to leak kernel pointers. For example, -an atomic fetch/and with -1 on a stack destination which holds a spilled -pointer will migrate the spilled register type into a scalar, which can then -be exported out of the program (since scalar != pointer) by dumping it into -a map value. - -The original implementation of XADD was preventing this situation by using -a double call to check_mem_access() one with BPF_READ and a subsequent one -with BPF_WRITE, in both cases passing -1 as a placeholder value instead of -register as per XADD semantics since it didn't contain a value fetch. The -BPF_READ also included a check in check_stack_read_fixed_off() which rejects -the program if the stack slot is of __is_pointer_value() if dst_regno < 0. -The latter is to distinguish whether we're dealing with a regular stack spill/ -fill or some arithmetical operation which is disallowed on non-scalars, see -also 6e7e63cbb023 ("bpf: Forbid XADD on spilled pointers for unprivileged -users") for more context on check_mem_access() and its handling of placeholder -value -1. - -One minimally intrusive option to fix the leak is for the BPF_FETCH case to -initially check the BPF_READ case via check_mem_access() with -1 as register, -followed by the actual load case with non-negative load_reg to propagate -stack bounds to registers. - -Fixes: 37086bfdc737 ("bpf: Propagate stack bounds to registers in atomics w/ BPF_FETCH") -Reported-by: <n4ke4mry@gmail.com> -Acked-by: Brendan Jackman <jackmanb@google.com> -Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> -Signed-off-by: Alexei Starovoitov <ast@kernel.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - kernel/bpf/verifier.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - ---- a/kernel/bpf/verifier.c -+++ b/kernel/bpf/verifier.c -@@ -4417,13 +4417,19 @@ static int check_atomic(struct bpf_verif - load_reg = -1; - } - -- /* check whether we can read the memory */ -+ /* Check whether we can read the memory, with second call for fetch -+ * case to simulate the register fill. -+ */ - err = check_mem_access(env, insn_idx, insn->dst_reg, insn->off, -- BPF_SIZE(insn->code), BPF_READ, load_reg, true); -+ BPF_SIZE(insn->code), BPF_READ, -1, true); -+ if (!err && load_reg >= 0) -+ err = check_mem_access(env, insn_idx, insn->dst_reg, insn->off, -+ BPF_SIZE(insn->code), BPF_READ, load_reg, -+ true); - if (err) - return err; - -- /* check whether we can write into the same memory */ -+ /* Check whether we can write into the same memory. */ - err = check_mem_access(env, insn_idx, insn->dst_reg, insn->off, - BPF_SIZE(insn->code), BPF_WRITE, -1, true); - if (err) diff --git a/debian/patches/bugfix/all/bpf-fix-signed-bounds-propagation-after-mov32.patch b/debian/patches/bugfix/all/bpf-fix-signed-bounds-propagation-after-mov32.patch deleted file mode 100644 index f86318606..000000000 --- a/debian/patches/bugfix/all/bpf-fix-signed-bounds-propagation-after-mov32.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 3cf2b61eb06765e27fec6799292d9fb46d0b7e60 Mon Sep 17 00:00:00 2001 -From: Daniel Borkmann <daniel@iogearbox.net> -Date: Wed, 15 Dec 2021 22:02:19 +0000 -Subject: bpf: Fix signed bounds propagation after mov32 - -From: Daniel Borkmann <daniel@iogearbox.net> - -commit 3cf2b61eb06765e27fec6799292d9fb46d0b7e60 upstream. - -For the case where both s32_{min,max}_value bounds are positive, the -__reg_assign_32_into_64() directly propagates them to their 64 bit -counterparts, otherwise it pessimises them into [0,u32_max] universe and -tries to refine them later on by learning through the tnum as per comment -in mentioned function. However, that does not always happen, for example, -in mov32 operation we call zext_32_to_64(dst_reg) which invokes the -__reg_assign_32_into_64() as is without subsequent bounds update as -elsewhere thus no refinement based on tnum takes place. - -Thus, not calling into the __update_reg_bounds() / __reg_deduce_bounds() / -__reg_bound_offset() triplet as we do, for example, in case of ALU ops via -adjust_scalar_min_max_vals(), will lead to more pessimistic bounds when -dumping the full register state: - -Before fix: - - 0: (b4) w0 = -1 - 1: R0_w=invP4294967295 - (id=0,imm=ffffffff, - smin_value=4294967295,smax_value=4294967295, - umin_value=4294967295,umax_value=4294967295, - var_off=(0xffffffff; 0x0), - s32_min_value=-1,s32_max_value=-1, - u32_min_value=-1,u32_max_value=-1) - - 1: (bc) w0 = w0 - 2: R0_w=invP4294967295 - (id=0,imm=ffffffff, - smin_value=0,smax_value=4294967295, - umin_value=4294967295,umax_value=4294967295, - var_off=(0xffffffff; 0x0), - s32_min_value=-1,s32_max_value=-1, - u32_min_value=-1,u32_max_value=-1) - -Technically, the smin_value=0 and smax_value=4294967295 bounds are not -incorrect, but given the register is still a constant, they break assumptions -about const scalars that smin_value == smax_value and umin_value == umax_value. - -After fix: - - 0: (b4) w0 = -1 - 1: R0_w=invP4294967295 - (id=0,imm=ffffffff, - smin_value=4294967295,smax_value=4294967295, - umin_value=4294967295,umax_value=4294967295, - var_off=(0xffffffff; 0x0), - s32_min_value=-1,s32_max_value=-1, - u32_min_value=-1,u32_max_value=-1) - - 1: (bc) w0 = w0 - 2: R0_w=invP4294967295 - (id=0,imm=ffffffff, - smin_value=4294967295,smax_value=4294967295, - umin_value=4294967295,umax_value=4294967295, - var_off=(0xffffffff; 0x0), - s32_min_value=-1,s32_max_value=-1, - u32_min_value=-1,u32_max_value=-1) - -Without the smin_value == smax_value and umin_value == umax_value invariant -being intact for const scalars, it is possible to leak out kernel pointers -from unprivileged user space if the latter is enabled. For example, when such -registers are involved in pointer arithmtics, then adjust_ptr_min_max_vals() -will taint the destination register into an unknown scalar, and the latter -can be exported and stored e.g. into a BPF map value. - -Fixes: 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking") -Reported-by: Kuee K1r0a <liulin063@gmail.com> -Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> -Reviewed-by: John Fastabend <john.fastabend@gmail.com> -Acked-by: Alexei Starovoitov <ast@kernel.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - kernel/bpf/verifier.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/kernel/bpf/verifier.c -+++ b/kernel/bpf/verifier.c -@@ -8120,6 +8120,10 @@ static int check_alu_op(struct bpf_verif - insn->dst_reg); - } - zext_32_to_64(dst_reg); -+ -+ __update_reg_bounds(dst_reg); -+ __reg_deduce_bounds(dst_reg); -+ __reg_bound_offset(dst_reg); - } - } else { - /* case: R = imm diff --git a/debian/patches/bugfix/all/bpf-make-32-64-bounds-propagation-slightly-more-robust.patch b/debian/patches/bugfix/all/bpf-make-32-64-bounds-propagation-slightly-more-robust.patch deleted file mode 100644 index 6eb5c51fa..000000000 --- a/debian/patches/bugfix/all/bpf-make-32-64-bounds-propagation-slightly-more-robust.patch +++ /dev/null @@ -1,62 +0,0 @@ -From e572ff80f05c33cd0cb4860f864f5c9c044280b6 Mon Sep 17 00:00:00 2001 -From: Daniel Borkmann <daniel@iogearbox.net> -Date: Wed, 15 Dec 2021 22:28:48 +0000 -Subject: bpf: Make 32->64 bounds propagation slightly more robust - -From: Daniel Borkmann <daniel@iogearbox.net> - -commit e572ff80f05c33cd0cb4860f864f5c9c044280b6 upstream. - -Make the bounds propagation in __reg_assign_32_into_64() slightly more -robust and readable by aligning it similarly as we did back in the -__reg_combine_64_into_32() counterpart. Meaning, only propagate or -pessimize them as a smin/smax pair. - -Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> -Reviewed-by: John Fastabend <john.fastabend@gmail.com> -Acked-by: Alexei Starovoitov <ast@kernel.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - kernel/bpf/verifier.c | 24 +++++++++++++++--------- - 1 file changed, 15 insertions(+), 9 deletions(-) - ---- a/kernel/bpf/verifier.c -+++ b/kernel/bpf/verifier.c -@@ -1358,22 +1358,28 @@ static void __reg_bound_offset(struct bp - reg->var_off = tnum_or(tnum_clear_subreg(var64_off), var32_off); - } - -+static bool __reg32_bound_s64(s32 a) -+{ -+ return a >= 0 && a <= S32_MAX; -+} -+ - static void __reg_assign_32_into_64(struct bpf_reg_state *reg) - { - reg->umin_value = reg->u32_min_value; - reg->umax_value = reg->u32_max_value; -- /* Attempt to pull 32-bit signed bounds into 64-bit bounds -- * but must be positive otherwise set to worse case bounds -- * and refine later from tnum. -+ -+ /* Attempt to pull 32-bit signed bounds into 64-bit bounds but must -+ * be positive otherwise set to worse case bounds and refine later -+ * from tnum. - */ -- if (reg->s32_min_value >= 0 && reg->s32_max_value >= 0) -- reg->smax_value = reg->s32_max_value; -- else -- reg->smax_value = U32_MAX; -- if (reg->s32_min_value >= 0) -+ if (__reg32_bound_s64(reg->s32_min_value) && -+ __reg32_bound_s64(reg->s32_max_value)) { - reg->smin_value = reg->s32_min_value; -- else -+ reg->smax_value = reg->s32_max_value; -+ } else { - reg->smin_value = 0; -+ reg->smax_value = U32_MAX; -+ } - } - - static void __reg_combine_32_into_64(struct bpf_reg_state *reg) diff --git a/debian/patches/bugfix/all/drm-vmwgfx-Fix-stale-file-descriptors-on-failed-user.patch b/debian/patches/bugfix/all/drm-vmwgfx-Fix-stale-file-descriptors-on-failed-user.patch new file mode 100644 index 000000000..34fd48e91 --- /dev/null +++ b/debian/patches/bugfix/all/drm-vmwgfx-Fix-stale-file-descriptors-on-failed-user.patch @@ -0,0 +1,166 @@ +From: Mathias Krause <minipli@grsecurity.net> +Date: Thu, 27 Jan 2022 18:34:19 +1000 +Subject: drm/vmwgfx: Fix stale file descriptors on failed usercopy +Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit?id=6066977961fc6f437bc064f628cf9b0e4571c56c +Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2022-22942 + +commit a0f90c8815706981c483a652a6aefca51a5e191c upstream. + +A failing usercopy of the fence_rep object will lead to a stale entry in +the file descriptor table as put_unused_fd() won't release it. This +enables userland to refer to a dangling 'file' object through that still +valid file descriptor, leading to all kinds of use-after-free +exploitation scenarios. + +Fix this by deferring the call to fd_install() until after the usercopy +has succeeded. + +Fixes: c906965dee22 ("drm/vmwgfx: Add export fence to file descriptor support") +Signed-off-by: Mathias Krause <minipli@grsecurity.net> +Signed-off-by: Zack Rusin <zackr@vmware.com> +Signed-off-by: Dave Airlie <airlied@redhat.com> +Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 5 ++-- + drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 33 +++++++++++++------------ + drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +- + drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 +- + 4 files changed, 21 insertions(+), 21 deletions(-) + +diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +index 2a7cec4cb8a8..f9f28516ffb4 100644 +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +@@ -1112,15 +1112,14 @@ extern int vmw_execbuf_fence_commands(struct drm_file *file_priv, + struct vmw_private *dev_priv, + struct vmw_fence_obj **p_fence, + uint32_t *p_handle); +-extern void vmw_execbuf_copy_fence_user(struct vmw_private *dev_priv, ++extern int vmw_execbuf_copy_fence_user(struct vmw_private *dev_priv, + struct vmw_fpriv *vmw_fp, + int ret, + struct drm_vmw_fence_rep __user + *user_fence_rep, + struct vmw_fence_obj *fence, + uint32_t fence_handle, +- int32_t out_fence_fd, +- struct sync_file *sync_file); ++ int32_t out_fence_fd); + bool vmw_cmd_describe(const void *buf, u32 *size, char const **cmd); + + /** +diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +index 5f2ffa9de5c8..9144e8f88c81 100644 +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +@@ -3823,17 +3823,17 @@ int vmw_execbuf_fence_commands(struct drm_file *file_priv, + * Also if copying fails, user-space will be unable to signal the fence object + * so we wait for it immediately, and then unreference the user-space reference. + */ +-void ++int + vmw_execbuf_copy_fence_user(struct vmw_private *dev_priv, + struct vmw_fpriv *vmw_fp, int ret, + struct drm_vmw_fence_rep __user *user_fence_rep, + struct vmw_fence_obj *fence, uint32_t fence_handle, +- int32_t out_fence_fd, struct sync_file *sync_file) ++ int32_t out_fence_fd) + { + struct drm_vmw_fence_rep fence_rep; + + if (user_fence_rep == NULL) +- return; ++ return 0; + + memset(&fence_rep, 0, sizeof(fence_rep)); + +@@ -3861,20 +3861,14 @@ vmw_execbuf_copy_fence_user(struct vmw_private *dev_priv, + * handle. + */ + if (unlikely(ret != 0) && (fence_rep.error == 0)) { +- if (sync_file) +- fput(sync_file->file); +- +- if (fence_rep.fd != -1) { +- put_unused_fd(fence_rep.fd); +- fence_rep.fd = -1; +- } +- + ttm_ref_object_base_unref(vmw_fp->tfile, fence_handle, + TTM_REF_USAGE); + VMW_DEBUG_USER("Fence copy error. Syncing.\n"); + (void) vmw_fence_obj_wait(fence, false, false, + VMW_FENCE_WAIT_TIMEOUT); + } ++ ++ return ret ? -EFAULT : 0; + } + + /** +@@ -4212,16 +4206,23 @@ int vmw_execbuf_process(struct drm_file *file_priv, + + (void) vmw_fence_obj_wait(fence, false, false, + VMW_FENCE_WAIT_TIMEOUT); ++ } ++ } ++ ++ ret = vmw_execbuf_copy_fence_user(dev_priv, vmw_fpriv(file_priv), ret, ++ user_fence_rep, fence, handle, out_fence_fd); ++ ++ if (sync_file) { ++ if (ret) { ++ /* usercopy of fence failed, put the file object */ ++ fput(sync_file->file); ++ put_unused_fd(out_fence_fd); + } else { + /* Link the fence with the FD created earlier */ + fd_install(out_fence_fd, sync_file->file); + } + } + +- vmw_execbuf_copy_fence_user(dev_priv, vmw_fpriv(file_priv), ret, +- user_fence_rep, fence, handle, out_fence_fd, +- sync_file); +- + /* Don't unreference when handing fence out */ + if (unlikely(out_fence != NULL)) { + *out_fence = fence; +@@ -4239,7 +4240,7 @@ int vmw_execbuf_process(struct drm_file *file_priv, + */ + vmw_validation_unref_lists(&val_ctx); + +- return 0; ++ return ret; + + out_unlock_binding: + mutex_unlock(&dev_priv->binding_mutex); +diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +index 9fe12329a4d5..b4d9d7258a54 100644 +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +@@ -1159,7 +1159,7 @@ int vmw_fence_event_ioctl(struct drm_device *dev, void *data, + } + + vmw_execbuf_copy_fence_user(dev_priv, vmw_fp, 0, user_fence_rep, fence, +- handle, -1, NULL); ++ handle, -1); + vmw_fence_obj_unreference(&fence); + return 0; + out_no_create: +diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +index 74fa41909213..14e8f665b13b 100644 +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +@@ -2516,7 +2516,7 @@ void vmw_kms_helper_validation_finish(struct vmw_private *dev_priv, + if (file_priv) + vmw_execbuf_copy_fence_user(dev_priv, vmw_fpriv(file_priv), + ret, user_fence_rep, fence, +- handle, -1, NULL); ++ handle, -1); + if (out_fence) + *out_fence = fence; + else +-- +2.34.1 + diff --git a/debian/patches/bugfix/all/fget-check-that-the-fd-still-exists-after-getting-a-.patch b/debian/patches/bugfix/all/fget-check-that-the-fd-still-exists-after-getting-a-.patch deleted file mode 100644 index 9680bbb41..000000000 --- a/debian/patches/bugfix/all/fget-check-that-the-fd-still-exists-after-getting-a-.patch +++ /dev/null @@ -1,67 +0,0 @@ -From: Linus Torvalds <torvalds@linux-foundation.org> -Date: Wed, 1 Dec 2021 10:06:14 -0800 -Subject: fget: check that the fd still exists after getting a ref to it -Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit?id=6fe4eadd54da3040cf6f6579ae157ae1395dc0f8 -Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2021-4083 - -commit 054aa8d439b9185d4f5eb9a90282d1ce74772969 upstream. - -Jann Horn points out that there is another possible race wrt Unix domain -socket garbage collection, somewhat reminiscent of the one fixed in -commit cbcf01128d0a ("af_unix: fix garbage collect vs MSG_PEEK"). - -See the extended comment about the garbage collection requirements added -to unix_peek_fds() by that commit for details. - -The race comes from how we can locklessly look up a file descriptor just -as it is in the process of being closed, and with the right artificial -timing (Jann added a few strategic 'mdelay(500)' calls to do that), the -Unix domain socket garbage collector could see the reference count -decrement of the close() happen before fget() took its reference to the -file and the file was attached onto a new file descriptor. - -This is all (intentionally) correct on the 'struct file *' side, with -RCU lookups and lockless reference counting very much part of the -design. Getting that reference count out of order isn't a problem per -se. - -But the garbage collector can get confused by seeing this situation of -having seen a file not having any remaining external references and then -seeing it being attached to an fd. - -In commit cbcf01128d0a ("af_unix: fix garbage collect vs MSG_PEEK") the -fix was to serialize the file descriptor install with the garbage -collector by taking and releasing the unix_gc_lock. - -That's not really an option here, but since this all happens when we are -in the process of looking up a file descriptor, we can instead simply -just re-check that the file hasn't been closed in the meantime, and just -re-do the lookup if we raced with a concurrent close() of the same file -descriptor. - -Reported-and-tested-by: Jann Horn <jannh@google.com> -Acked-by: Miklos Szeredi <mszeredi@redhat.com> -Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - fs/file.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/fs/file.c b/fs/file.c -index 8627dacfc424..ad4a8bf3cf10 100644 ---- a/fs/file.c -+++ b/fs/file.c -@@ -858,6 +858,10 @@ static struct file *__fget_files(struct files_struct *files, unsigned int fd, - file = NULL; - else if (!get_file_rcu_many(file, refs)) - goto loop; -+ else if (files_lookup_fd_raw(files, fd) != file) { -+ fput_many(file, refs); -+ goto loop; -+ } - } - rcu_read_unlock(); - --- -2.34.1 - diff --git a/debian/patches/bugfix/all/fuse-release-pipe-buf-after-last-use.patch b/debian/patches/bugfix/all/fuse-release-pipe-buf-after-last-use.patch deleted file mode 100644 index 768dfdffb..000000000 --- a/debian/patches/bugfix/all/fuse-release-pipe-buf-after-last-use.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: Miklos Szeredi <mszeredi@redhat.com> -Date: Thu, 25 Nov 2021 14:05:18 +0100 -Subject: fuse: release pipe buf after last use -Origin: https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git/commit/?h=for-next&id=473441720c8616dfaf4451f9c7ea14f0eb5e5d65 -Bug-Debian: https://bugs.debian.org/1000504 - -Checking buf->flags should be done before the pipe_buf_release() is called -on the pipe buffer, since releasing the buffer might modify the flags. - -This is exactly what page_cache_pipe_buf_release() does, and which results -in the same VM_BUG_ON_PAGE(PageLRU(page)) that the original patch was -trying to fix. - -Reported-by: Justin Forbes <jmforbes@linuxtx.org> -Fixes: 712a951025c0 ("fuse: fix page stealing") -Cc: <stable@vger.kernel.org> # v2.6.35 -Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> ---- - fs/fuse/dev.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c -index 79f7eda49e06..cd54a529460d 100644 ---- a/fs/fuse/dev.c -+++ b/fs/fuse/dev.c -@@ -847,17 +847,17 @@ static int fuse_try_move_page(struct fuse_copy_state *cs, struct page **pagep) - - replace_page_cache_page(oldpage, newpage); - -+ get_page(newpage); -+ -+ if (!(buf->flags & PIPE_BUF_FLAG_LRU)) -+ lru_cache_add(newpage); -+ - /* - * Release while we have extra ref on stolen page. Otherwise - * anon_pipe_buf_release() might think the page can be reused. - */ - pipe_buf_release(cs->pipe, buf); - -- get_page(newpage); -- -- if (!(buf->flags & PIPE_BUF_FLAG_LRU)) -- lru_cache_add(newpage); -- - err = 0; - spin_lock(&cs->req->waitq.lock); - if (test_bit(FR_ABORTED, &cs->req->flags)) --- -2.34.0 - diff --git a/debian/patches/bugfix/all/nfsd-fix-use-after-free-due-to-delegation-race.patch b/debian/patches/bugfix/all/nfsd-fix-use-after-free-due-to-delegation-race.patch deleted file mode 100644 index 34584d8b5..000000000 --- a/debian/patches/bugfix/all/nfsd-fix-use-after-free-due-to-delegation-race.patch +++ /dev/null @@ -1,67 +0,0 @@ -From: "J. Bruce Fields" <bfields@redhat.com> -Date: Mon, 29 Nov 2021 15:08:00 -0500 -Subject: nfsd: fix use-after-free due to delegation race -Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit?id=148c816f10fd11df27ca6a9b3238cdd42fa72cd3 -Bug-Debian: https://bugs.debian.org/988044 - -commit 548ec0805c399c65ed66c6641be467f717833ab5 upstream. - -A delegation break could arrive as soon as we've called vfs_setlease. A -delegation break runs a callback which immediately (in -nfsd4_cb_recall_prepare) adds the delegation to del_recall_lru. If we -then exit nfs4_set_delegation without hashing the delegation, it will be -freed as soon as the callback is done with it, without ever being -removed from del_recall_lru. - -Symptoms show up later as use-after-free or list corruption warnings, -usually in the laundromat thread. - -I suspect aba2072f4523 "nfsd: grant read delegations to clients holding -writes" made this bug easier to hit, but I looked as far back as v3.0 -and it looks to me it already had the same problem. So I'm not sure -where the bug was introduced; it may have been there from the beginning. - -Cc: stable@vger.kernel.org -Signed-off-by: J. Bruce Fields <bfields@redhat.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - fs/nfsd/nfs4state.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c -index 3f4027a5de88..61301affb4c1 100644 ---- a/fs/nfsd/nfs4state.c -+++ b/fs/nfsd/nfs4state.c -@@ -1207,6 +1207,11 @@ hash_delegation_locked(struct nfs4_delegation *dp, struct nfs4_file *fp) - return 0; - } - -+static bool delegation_hashed(struct nfs4_delegation *dp) -+{ -+ return !(list_empty(&dp->dl_perfile)); -+} -+ - static bool - unhash_delegation_locked(struct nfs4_delegation *dp) - { -@@ -1214,7 +1219,7 @@ unhash_delegation_locked(struct nfs4_delegation *dp) - - lockdep_assert_held(&state_lock); - -- if (list_empty(&dp->dl_perfile)) -+ if (!delegation_hashed(dp)) - return false; - - dp->dl_stid.sc_type = NFS4_CLOSED_DELEG_STID; -@@ -4598,7 +4603,7 @@ static void nfsd4_cb_recall_prepare(struct nfsd4_callback *cb) - * queued for a lease break. Don't queue it again. - */ - spin_lock(&state_lock); -- if (dp->dl_time == 0) { -+ if (delegation_hashed(dp) && dp->dl_time == 0) { - dp->dl_time = ktime_get_boottime_seconds(); - list_add_tail(&dp->dl_recall_lru, &nn->del_recall_lru); - } --- -2.34.1 - diff --git a/debian/patches/bugfix/all/radeon-amdgpu-firmware-is-required-for-drm-and-kms-on-r600-onward.patch b/debian/patches/bugfix/all/radeon-amdgpu-firmware-is-required-for-drm-and-kms-on-r600-onward.patch index e0372e4a0..203f89596 100644 --- a/debian/patches/bugfix/all/radeon-amdgpu-firmware-is-required-for-drm-and-kms-on-r600-onward.patch +++ b/debian/patches/bugfix/all/radeon-amdgpu-firmware-is-required-for-drm-and-kms-on-r600-onward.patch @@ -28,22 +28,20 @@ is missing, except for the pre-R600 case. drivers/gpu/drm/radeon/radeon_drv.c | 30 +++++++++++++++++++++++++ 2 files changed, 59 insertions(+) -Index: linux/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c -=================================================================== ---- linux.orig/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c -+++ linux/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c -@@ -38,6 +38,8 @@ - #include <drm/drm_probe_helper.h> +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +@@ -39,6 +39,8 @@ #include <linux/mmu_notifier.h> #include <linux/suspend.h> + #include <linux/fb.h> +#include <linux/namei.h> +#include <linux/path.h> #include "amdgpu.h" #include "amdgpu_irq.h" -@@ -1246,6 +1248,28 @@ MODULE_DEVICE_TABLE(pci, pciidlist); - - static const struct drm_driver amdgpu_kms_driver; +@@ -1267,6 +1269,28 @@ static bool amdgpu_is_fw_framebuffer(res + return found; + } +/* Test that /lib/firmware/amdgpu is a directory (or symlink to a + * directory). We could try to match the udev search path, but let's @@ -70,9 +68,9 @@ Index: linux/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c static int amdgpu_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { -@@ -1310,6 +1334,11 @@ static int amdgpu_pci_probe(struct pci_d - } - #endif +@@ -1337,6 +1361,11 @@ static int amdgpu_pci_probe(struct pci_d + size = pci_resource_len(pdev, 0); + is_fw_fb = amdgpu_is_fw_framebuffer(base, size); + if (!amdgpu_firmware_installed()) { + DRM_ERROR("amdgpu requires firmware installed\n"); @@ -82,10 +80,8 @@ Index: linux/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c /* Get rid of things like offb */ ret = drm_aperture_remove_conflicting_pci_framebuffers(pdev, &amdgpu_kms_driver); if (ret) -Index: linux/drivers/gpu/drm/radeon/radeon_drv.c -=================================================================== ---- linux.orig/drivers/gpu/drm/radeon/radeon_drv.c -+++ linux/drivers/gpu/drm/radeon/radeon_drv.c +--- a/drivers/gpu/drm/radeon/radeon_drv.c ++++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -49,6 +49,8 @@ #include <drm/drm_probe_helper.h> #include <drm/drm_vblank.h> diff --git a/debian/patches/bugfix/all/ucount-Make-get_ucount-a-safe-get_user-replacement.patch b/debian/patches/bugfix/all/ucount-Make-get_ucount-a-safe-get_user-replacement.patch new file mode 100644 index 000000000..cabaf358b --- /dev/null +++ b/debian/patches/bugfix/all/ucount-Make-get_ucount-a-safe-get_user-replacement.patch @@ -0,0 +1,58 @@ +From: "Eric W. Biederman" <ebiederm@xmission.com> +Date: Mon, 24 Jan 2022 12:46:50 -0600 +Subject: ucount: Make get_ucount a safe get_user replacement +Origin: https://git.kernel.org/linus/f9d87929d451d3e649699d0f1d74f71f77ad38f5 +Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2022-24122 + +When the ucount code was refactored to create get_ucount it was missed +that some of the contexts in which a rlimit is kept elevated can be +the only reference to the user/ucount in the system. + +Ordinary ucount references exist in places that also have a reference +to the user namspace, but in POSIX message queues, the SysV shm code, +and the SIGPENDING code there is no independent user namespace +reference. + +Inspection of the the user_namespace show no instance of circular +references between struct ucounts and the user_namespace. So +hold a reference from struct ucount to i's user_namespace to +resolve this problem. + +Link: https://lore.kernel.org/lkml/YZV7Z+yXbsx9p3JN@fixkernel.com/ +Reported-by: Qian Cai <quic_qiancai@quicinc.com> +Reported-by: Mathias Krause <minipli@grsecurity.net> +Tested-by: Mathias Krause <minipli@grsecurity.net> +Reviewed-by: Mathias Krause <minipli@grsecurity.net> +Reviewed-by: Alexey Gladkov <legion@kernel.org> +Fixes: d64696905554 ("Reimplement RLIMIT_SIGPENDING on top of ucounts") +Fixes: 6e52a9f0532f ("Reimplement RLIMIT_MSGQUEUE on top of ucounts") +Fixes: d7c9e99aee48 ("Reimplement RLIMIT_MEMLOCK on top of ucounts") +Cc: stable@vger.kernel.org +Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> +--- + kernel/ucount.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/kernel/ucount.c b/kernel/ucount.c +index 7b32c356ebc5..65b597431c86 100644 +--- a/kernel/ucount.c ++++ b/kernel/ucount.c +@@ -190,6 +190,7 @@ struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid) + kfree(new); + } else { + hlist_add_head(&new->node, hashent); ++ get_user_ns(new->ns); + spin_unlock_irq(&ucounts_lock); + return new; + } +@@ -210,6 +211,7 @@ void put_ucounts(struct ucounts *ucounts) + if (atomic_dec_and_lock_irqsave(&ucounts->count, &ucounts_lock, flags)) { + hlist_del_init(&ucounts->node); + spin_unlock_irqrestore(&ucounts_lock, flags); ++ put_user_ns(ucounts->ns); + kfree(ucounts); + } + } +-- +2.34.1 + diff --git a/debian/patches/bugfix/all/vfs-fs_context-fix-up-param-length-parsing-in-legacy.patch b/debian/patches/bugfix/all/vfs-fs_context-fix-up-param-length-parsing-in-legacy.patch new file mode 100644 index 000000000..e4bdc3aef --- /dev/null +++ b/debian/patches/bugfix/all/vfs-fs_context-fix-up-param-length-parsing-in-legacy.patch @@ -0,0 +1,39 @@ +From: Jamie Hill-Daniel <jamie@hill-daniel.co.uk> +Date: Tue, 18 Jan 2022 08:06:04 +0100 +Subject: vfs: fs_context: fix up param length parsing in legacy_parse_param +Origin: https://git.kernel.org/linus/722d94847de29310e8aa03fcbdb41fc92c521756 +Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2022-0185 + +The "PAGE_SIZE - 2 - size" calculation in legacy_parse_param() is an +unsigned type so a large value of "size" results in a high positive +value instead of a negative value as expected. Fix this by getting rid +of the subtraction. + +Signed-off-by: Jamie Hill-Daniel <jamie@hill-daniel.co.uk> +Signed-off-by: William Liu <willsroot@protonmail.com> +Tested-by: Salvatore Bonaccorso <carnil@debian.org> +Tested-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> +Acked-by: Dan Carpenter <dan.carpenter@oracle.com> +Acked-by: Al Viro <viro@zeniv.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> +--- + fs/fs_context.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fs/fs_context.c b/fs/fs_context.c +index b7e43a780a62..24ce12f0db32 100644 +--- a/fs/fs_context.c ++++ b/fs/fs_context.c +@@ -548,7 +548,7 @@ static int legacy_parse_param(struct fs_context *fc, struct fs_parameter *param) + param->key); + } + +- if (len > PAGE_SIZE - 2 - size) ++ if (size + len + 2 > PAGE_SIZE) + return invalf(fc, "VFS: Legacy: Cumulative options too large"); + if (strchr(param->key, ',') || + (param->type == fs_value_is_string && +-- +2.34.1 + diff --git a/debian/patches/bugfix/x86/Revert-drm-i915-Implement-Wa_1508744258.patch b/debian/patches/bugfix/x86/Revert-drm-i915-Implement-Wa_1508744258.patch deleted file mode 100644 index 9280eff97..000000000 --- a/debian/patches/bugfix/x86/Revert-drm-i915-Implement-Wa_1508744258.patch +++ /dev/null @@ -1,53 +0,0 @@ -From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= <jose.souza@intel.com> -Date: Fri, 19 Nov 2021 06:09:30 -0800 -Subject: Revert "drm/i915: Implement Wa_1508744258" -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit?id=894b21da042f94f23f1bcbe7362b54b1657aa345 -Bug-Debian: https://bugs.debian.org/1001128 - -[ Upstream commit 72641d8d60401a5f1e1a0431ceaf928680d34418 ] - -This workarounds are causing hangs, because I missed the fact that it -needs to be enabled for all cases and disabled when doing a resolve -pass. - -So KMD only needs to whitelist it and UMD will be the one setting it -on per case. - -This reverts commit 28ec02c9cbebf3feeaf21a59df9dfbc02bda3362. - -Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4145 -Signed-off-by: José Roberto de Souza <jose.souza@intel.com> -Fixes: 28ec02c9cbeb ("drm/i915: Implement Wa_1508744258") -Reviewed-by: Matt Atwood <matthew.s.atwood@intel.com> -Link: https://patchwork.freedesktop.org/patch/msgid/20211119140931.32791-1-jose.souza@intel.com -(cherry picked from commit f3799ff16fcfacd44aee55db162830df461b631f) -Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> -Signed-off-by: Sasha Levin <sashal@kernel.org> ---- - drivers/gpu/drm/i915/gt/intel_workarounds.c | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c -index aae609d7d85d..6b5ab19a2ada 100644 ---- a/drivers/gpu/drm/i915/gt/intel_workarounds.c -+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c -@@ -621,13 +621,6 @@ static void gen12_ctx_workarounds_init(struct intel_engine_cs *engine, - FF_MODE2_GS_TIMER_MASK, - FF_MODE2_GS_TIMER_224, - 0, false); -- -- /* -- * Wa_14012131227:dg1 -- * Wa_1508744258:tgl,rkl,dg1,adl-s,adl-p -- */ -- wa_masked_en(wal, GEN7_COMMON_SLICE_CHICKEN1, -- GEN9_RHWO_OPTIMIZATION_DISABLE); - } - - static void dg1_ctx_workarounds_init(struct intel_engine_cs *engine, --- -2.34.1 - diff --git a/debian/patches/bugfix/x86/drm-i915-Flush-TLBs-before-releasing-backing-store.patch b/debian/patches/bugfix/x86/drm-i915-Flush-TLBs-before-releasing-backing-store.patch new file mode 100644 index 000000000..1b5b03043 --- /dev/null +++ b/debian/patches/bugfix/x86/drm-i915-Flush-TLBs-before-releasing-backing-store.patch @@ -0,0 +1,350 @@ +From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> +Date: Tue, 19 Oct 2021 13:27:10 +0100 +Subject: drm/i915: Flush TLBs before releasing backing store +Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit?id=8a17a077e7e9ecce25c95dbdb27843d2d6c2f0f7 +Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2022-0330 + +commit 7938d61591d33394a21bdd7797a245b65428f44c upstream. + +We need to flush TLBs before releasing backing store otherwise userspace +is able to encounter stale entries if a) it is not declaring access to +certain buffers and b) it races with the backing store release from a +such undeclared execution already executing on the GPU in parallel. + +The approach taken is to mark any buffer objects which were ever bound +to the GPU and to trigger a serialized TLB flush when their backing +store is released. + +Alternatively the flushing could be done on VMA unbind, at which point +we would be able to ascertain whether there is potential a parallel GPU +execution (which could race), but essentially it boils down to paying +the cost of TLB flushes potentially needlessly at VMA unbind time (when +the backing store is not known to be going away so not needed for +safety), versus potentially needlessly at backing store relase time +(since we at that point cannot tell whether there is anything executing +on the GPU which uses that object). + +Thereforce simplicity of implementation has been chosen for now with +scope to benchmark and refine later as required. + +Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> +Reported-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com> +Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> +Acked-by: Dave Airlie <airlied@redhat.com> +Cc: Daniel Vetter <daniel.vetter@ffwll.ch> +Cc: Jon Bloomfield <jon.bloomfield@intel.com> +Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> +Cc: Jani Nikula <jani.nikula@intel.com> +Cc: stable@vger.kernel.org +Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + .../gpu/drm/i915/gem/i915_gem_object_types.h | 1 + + drivers/gpu/drm/i915/gem/i915_gem_pages.c | 10 ++ + drivers/gpu/drm/i915/gt/intel_gt.c | 102 ++++++++++++++++++ + drivers/gpu/drm/i915/gt/intel_gt.h | 2 + + drivers/gpu/drm/i915/gt/intel_gt_types.h | 2 + + drivers/gpu/drm/i915/i915_reg.h | 11 ++ + drivers/gpu/drm/i915/i915_vma.c | 3 + + drivers/gpu/drm/i915/intel_uncore.c | 26 ++++- + drivers/gpu/drm/i915/intel_uncore.h | 2 + + 9 files changed, 155 insertions(+), 4 deletions(-) + +diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h +index 2471f36aaff3..3012cbe5b0b7 100644 +--- a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h ++++ b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h +@@ -298,6 +298,7 @@ struct drm_i915_gem_object { + I915_BO_ALLOC_USER) + #define I915_BO_READONLY BIT(4) + #define I915_TILING_QUIRK_BIT 5 /* unknown swizzling; do not release! */ ++#define I915_BO_WAS_BOUND_BIT 6 + + /** + * @mem_flags - Mutable placement-related flags +diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c +index 8eb1c3a6fc9c..8d6c38a62201 100644 +--- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c ++++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c +@@ -10,6 +10,8 @@ + #include "i915_gem_lmem.h" + #include "i915_gem_mman.h" + ++#include "gt/intel_gt.h" ++ + void __i915_gem_object_set_pages(struct drm_i915_gem_object *obj, + struct sg_table *pages, + unsigned int sg_page_sizes) +@@ -218,6 +220,14 @@ __i915_gem_object_unset_pages(struct drm_i915_gem_object *obj) + __i915_gem_object_reset_page_iter(obj); + obj->mm.page_sizes.phys = obj->mm.page_sizes.sg = 0; + ++ if (test_and_clear_bit(I915_BO_WAS_BOUND_BIT, &obj->flags)) { ++ struct drm_i915_private *i915 = to_i915(obj->base.dev); ++ intel_wakeref_t wakeref; ++ ++ with_intel_runtime_pm_if_active(&i915->runtime_pm, wakeref) ++ intel_gt_invalidate_tlbs(&i915->gt); ++ } ++ + return pages; + } + +diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c +index 62d40c986642..e1e1d17d49fd 100644 +--- a/drivers/gpu/drm/i915/gt/intel_gt.c ++++ b/drivers/gpu/drm/i915/gt/intel_gt.c +@@ -29,6 +29,8 @@ void intel_gt_init_early(struct intel_gt *gt, struct drm_i915_private *i915) + + spin_lock_init(>->irq_lock); + ++ mutex_init(>->tlb_invalidate_lock); ++ + INIT_LIST_HEAD(>->closed_vma); + spin_lock_init(>->closed_lock); + +@@ -895,3 +897,103 @@ void intel_gt_info_print(const struct intel_gt_info *info, + + intel_sseu_dump(&info->sseu, p); + } ++ ++struct reg_and_bit { ++ i915_reg_t reg; ++ u32 bit; ++}; ++ ++static struct reg_and_bit ++get_reg_and_bit(const struct intel_engine_cs *engine, const bool gen8, ++ const i915_reg_t *regs, const unsigned int num) ++{ ++ const unsigned int class = engine->class; ++ struct reg_and_bit rb = { }; ++ ++ if (drm_WARN_ON_ONCE(&engine->i915->drm, ++ class >= num || !regs[class].reg)) ++ return rb; ++ ++ rb.reg = regs[class]; ++ if (gen8 && class == VIDEO_DECODE_CLASS) ++ rb.reg.reg += 4 * engine->instance; /* GEN8_M2TCR */ ++ else ++ rb.bit = engine->instance; ++ ++ rb.bit = BIT(rb.bit); ++ ++ return rb; ++} ++ ++void intel_gt_invalidate_tlbs(struct intel_gt *gt) ++{ ++ static const i915_reg_t gen8_regs[] = { ++ [RENDER_CLASS] = GEN8_RTCR, ++ [VIDEO_DECODE_CLASS] = GEN8_M1TCR, /* , GEN8_M2TCR */ ++ [VIDEO_ENHANCEMENT_CLASS] = GEN8_VTCR, ++ [COPY_ENGINE_CLASS] = GEN8_BTCR, ++ }; ++ static const i915_reg_t gen12_regs[] = { ++ [RENDER_CLASS] = GEN12_GFX_TLB_INV_CR, ++ [VIDEO_DECODE_CLASS] = GEN12_VD_TLB_INV_CR, ++ [VIDEO_ENHANCEMENT_CLASS] = GEN12_VE_TLB_INV_CR, ++ [COPY_ENGINE_CLASS] = GEN12_BLT_TLB_INV_CR, ++ }; ++ struct drm_i915_private *i915 = gt->i915; ++ struct intel_uncore *uncore = gt->uncore; ++ struct intel_engine_cs *engine; ++ enum intel_engine_id id; ++ const i915_reg_t *regs; ++ unsigned int num = 0; ++ ++ if (I915_SELFTEST_ONLY(gt->awake == -ENODEV)) ++ return; ++ ++ if (GRAPHICS_VER(i915) == 12) { ++ regs = gen12_regs; ++ num = ARRAY_SIZE(gen12_regs); ++ } else if (GRAPHICS_VER(i915) >= 8 && GRAPHICS_VER(i915) <= 11) { ++ regs = gen8_regs; ++ num = ARRAY_SIZE(gen8_regs); ++ } else if (GRAPHICS_VER(i915) < 8) { ++ return; ++ } ++ ++ if (drm_WARN_ONCE(&i915->drm, !num, ++ "Platform does not implement TLB invalidation!")) ++ return; ++ ++ GEM_TRACE("\n"); ++ ++ assert_rpm_wakelock_held(&i915->runtime_pm); ++ ++ mutex_lock(>->tlb_invalidate_lock); ++ intel_uncore_forcewake_get(uncore, FORCEWAKE_ALL); ++ ++ for_each_engine(engine, gt, id) { ++ /* ++ * HW architecture suggest typical invalidation time at 40us, ++ * with pessimistic cases up to 100us and a recommendation to ++ * cap at 1ms. We go a bit higher just in case. ++ */ ++ const unsigned int timeout_us = 100; ++ const unsigned int timeout_ms = 4; ++ struct reg_and_bit rb; ++ ++ rb = get_reg_and_bit(engine, regs == gen8_regs, regs, num); ++ if (!i915_mmio_reg_offset(rb.reg)) ++ continue; ++ ++ intel_uncore_write_fw(uncore, rb.reg, rb.bit); ++ if (__intel_wait_for_register_fw(uncore, ++ rb.reg, rb.bit, 0, ++ timeout_us, timeout_ms, ++ NULL)) ++ drm_err_ratelimited(>->i915->drm, ++ "%s TLB invalidation did not complete in %ums!\n", ++ engine->name, timeout_ms); ++ } ++ ++ intel_uncore_forcewake_put_delayed(uncore, FORCEWAKE_ALL); ++ mutex_unlock(>->tlb_invalidate_lock); ++} +diff --git a/drivers/gpu/drm/i915/gt/intel_gt.h b/drivers/gpu/drm/i915/gt/intel_gt.h +index 74e771871a9b..c0169d6017c2 100644 +--- a/drivers/gpu/drm/i915/gt/intel_gt.h ++++ b/drivers/gpu/drm/i915/gt/intel_gt.h +@@ -90,4 +90,6 @@ void intel_gt_info_print(const struct intel_gt_info *info, + + void intel_gt_watchdog_work(struct work_struct *work); + ++void intel_gt_invalidate_tlbs(struct intel_gt *gt); ++ + #endif /* __INTEL_GT_H__ */ +diff --git a/drivers/gpu/drm/i915/gt/intel_gt_types.h b/drivers/gpu/drm/i915/gt/intel_gt_types.h +index a81e21bf1bd1..9fbcbcc6c35d 100644 +--- a/drivers/gpu/drm/i915/gt/intel_gt_types.h ++++ b/drivers/gpu/drm/i915/gt/intel_gt_types.h +@@ -72,6 +72,8 @@ struct intel_gt { + + struct intel_uc uc; + ++ struct mutex tlb_invalidate_lock; ++ + struct intel_gt_timelines { + spinlock_t lock; /* protects active_list */ + struct list_head active_list; +diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h +index 9023d4ecf3b3..c65473fc9093 100644 +--- a/drivers/gpu/drm/i915/i915_reg.h ++++ b/drivers/gpu/drm/i915/i915_reg.h +@@ -2669,6 +2669,12 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg) + #define GAMT_CHKN_DISABLE_DYNAMIC_CREDIT_SHARING (1 << 28) + #define GAMT_CHKN_DISABLE_I2M_CYCLE_ON_WR_PORT (1 << 24) + ++#define GEN8_RTCR _MMIO(0x4260) ++#define GEN8_M1TCR _MMIO(0x4264) ++#define GEN8_M2TCR _MMIO(0x4268) ++#define GEN8_BTCR _MMIO(0x426c) ++#define GEN8_VTCR _MMIO(0x4270) ++ + #if 0 + #define PRB0_TAIL _MMIO(0x2030) + #define PRB0_HEAD _MMIO(0x2034) +@@ -2763,6 +2769,11 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg) + #define FAULT_VA_HIGH_BITS (0xf << 0) + #define FAULT_GTT_SEL (1 << 4) + ++#define GEN12_GFX_TLB_INV_CR _MMIO(0xced8) ++#define GEN12_VD_TLB_INV_CR _MMIO(0xcedc) ++#define GEN12_VE_TLB_INV_CR _MMIO(0xcee0) ++#define GEN12_BLT_TLB_INV_CR _MMIO(0xcee4) ++ + #define GEN12_AUX_ERR_DBG _MMIO(0x43f4) + + #define FPGA_DBG _MMIO(0x42300) +diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c +index 4b7fc4647e46..dfd20060812b 100644 +--- a/drivers/gpu/drm/i915/i915_vma.c ++++ b/drivers/gpu/drm/i915/i915_vma.c +@@ -434,6 +434,9 @@ int i915_vma_bind(struct i915_vma *vma, + vma->ops->bind_vma(vma->vm, NULL, vma, cache_level, bind_flags); + } + ++ if (vma->obj) ++ set_bit(I915_BO_WAS_BOUND_BIT, &vma->obj->flags); ++ + atomic_or(bind_flags, &vma->flags); + return 0; + } +diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c +index 6b38bc2811c1..de8d0558389c 100644 +--- a/drivers/gpu/drm/i915/intel_uncore.c ++++ b/drivers/gpu/drm/i915/intel_uncore.c +@@ -718,7 +718,8 @@ void intel_uncore_forcewake_get__locked(struct intel_uncore *uncore, + } + + static void __intel_uncore_forcewake_put(struct intel_uncore *uncore, +- enum forcewake_domains fw_domains) ++ enum forcewake_domains fw_domains, ++ bool delayed) + { + struct intel_uncore_forcewake_domain *domain; + unsigned int tmp; +@@ -733,7 +734,11 @@ static void __intel_uncore_forcewake_put(struct intel_uncore *uncore, + continue; + } + +- uncore->funcs.force_wake_put(uncore, domain->mask); ++ if (delayed && ++ !(domain->uncore->fw_domains_timer & domain->mask)) ++ fw_domain_arm_timer(domain); ++ else ++ uncore->funcs.force_wake_put(uncore, domain->mask); + } + } + +@@ -754,7 +759,20 @@ void intel_uncore_forcewake_put(struct intel_uncore *uncore, + return; + + spin_lock_irqsave(&uncore->lock, irqflags); +- __intel_uncore_forcewake_put(uncore, fw_domains); ++ __intel_uncore_forcewake_put(uncore, fw_domains, false); ++ spin_unlock_irqrestore(&uncore->lock, irqflags); ++} ++ ++void intel_uncore_forcewake_put_delayed(struct intel_uncore *uncore, ++ enum forcewake_domains fw_domains) ++{ ++ unsigned long irqflags; ++ ++ if (!uncore->funcs.force_wake_put) ++ return; ++ ++ spin_lock_irqsave(&uncore->lock, irqflags); ++ __intel_uncore_forcewake_put(uncore, fw_domains, true); + spin_unlock_irqrestore(&uncore->lock, irqflags); + } + +@@ -796,7 +814,7 @@ void intel_uncore_forcewake_put__locked(struct intel_uncore *uncore, + if (!uncore->funcs.force_wake_put) + return; + +- __intel_uncore_forcewake_put(uncore, fw_domains); ++ __intel_uncore_forcewake_put(uncore, fw_domains, false); + } + + void assert_forcewakes_inactive(struct intel_uncore *uncore) +diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h +index 3c0b0a8b5250..4c63209dcf53 100644 +--- a/drivers/gpu/drm/i915/intel_uncore.h ++++ b/drivers/gpu/drm/i915/intel_uncore.h +@@ -229,6 +229,8 @@ void intel_uncore_forcewake_get(struct intel_uncore *uncore, + enum forcewake_domains domains); + void intel_uncore_forcewake_put(struct intel_uncore *uncore, + enum forcewake_domains domains); ++void intel_uncore_forcewake_put_delayed(struct intel_uncore *uncore, ++ enum forcewake_domains domains); + void intel_uncore_forcewake_flush(struct intel_uncore *uncore, + enum forcewake_domains fw_domains); + +-- +2.34.1 + diff --git a/debian/patches/bugfix/x86/mwifiex-Fix-skb_over_panic-in-mwifiex_usb_recv.patch b/debian/patches/bugfix/x86/mwifiex-Fix-skb_over_panic-in-mwifiex_usb_recv.patch new file mode 100644 index 000000000..28c82ee7f --- /dev/null +++ b/debian/patches/bugfix/x86/mwifiex-Fix-skb_over_panic-in-mwifiex_usb_recv.patch @@ -0,0 +1,67 @@ +From: Zekun Shen <bruceshenzk@gmail.com> +Date: Sat, 30 Oct 2021 22:42:50 -0400 +Subject: mwifiex: Fix skb_over_panic in mwifiex_usb_recv() +Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit?id=b2762757f4e484f8a164546f93aca82568d87649 +Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2021-43976 + +[ Upstream commit 04d80663f67ccef893061b49ec8a42ff7045ae84 ] + +Currently, with an unknown recv_type, mwifiex_usb_recv +just return -1 without restoring the skb. Next time +mwifiex_usb_rx_complete is invoked with the same skb, +calling skb_put causes skb_over_panic. + +The bug is triggerable with a compromised/malfunctioning +usb device. After applying the patch, skb_over_panic +no longer shows up with the same input. + +Attached is the panic report from fuzzing. +skbuff: skb_over_panic: text:000000003bf1b5fa + len:2048 put:4 head:00000000dd6a115b data:000000000a9445d8 + tail:0x844 end:0x840 dev:<NULL> +kernel BUG at net/core/skbuff.c:109! +invalid opcode: 0000 [#1] SMP KASAN NOPTI +CPU: 0 PID: 198 Comm: in:imklog Not tainted 5.6.0 #60 +RIP: 0010:skb_panic+0x15f/0x161 +Call Trace: + <IRQ> + ? mwifiex_usb_rx_complete+0x26b/0xfcd [mwifiex_usb] + skb_put.cold+0x24/0x24 + mwifiex_usb_rx_complete+0x26b/0xfcd [mwifiex_usb] + __usb_hcd_giveback_urb+0x1e4/0x380 + usb_giveback_urb_bh+0x241/0x4f0 + ? __hrtimer_run_queues+0x316/0x740 + ? __usb_hcd_giveback_urb+0x380/0x380 + tasklet_action_common.isra.0+0x135/0x330 + __do_softirq+0x18c/0x634 + irq_exit+0x114/0x140 + smp_apic_timer_interrupt+0xde/0x380 + apic_timer_interrupt+0xf/0x20 + </IRQ> + +Reported-by: Brendan Dolan-Gavitt <brendandg@nyu.edu> +Signed-off-by: Zekun Shen <bruceshenzk@gmail.com> +Signed-off-by: Kalle Valo <kvalo@codeaurora.org> +Link: https://lore.kernel.org/r/YX4CqjfRcTa6bVL+@Zekuns-MBP-16.fios-router.home +Signed-off-by: Sasha Levin <sashal@kernel.org> +--- + drivers/net/wireless/marvell/mwifiex/usb.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c +index 9736aa0ab7fd..8f01fcbe9396 100644 +--- a/drivers/net/wireless/marvell/mwifiex/usb.c ++++ b/drivers/net/wireless/marvell/mwifiex/usb.c +@@ -130,7 +130,8 @@ static int mwifiex_usb_recv(struct mwifiex_adapter *adapter, + default: + mwifiex_dbg(adapter, ERROR, + "unknown recv_type %#x\n", recv_type); +- return -1; ++ ret = -1; ++ goto exit_restore_skb; + } + break; + case MWIFIEX_USB_EP_DATA: +-- +2.34.1 + diff --git a/debian/patches/debian/export-symbols-needed-by-android-drivers.patch b/debian/patches/debian/export-symbols-needed-by-android-drivers.patch index 1532d10bc..36a8406b0 100644 --- a/debian/patches/debian/export-symbols-needed-by-android-drivers.patch +++ b/debian/patches/debian/export-symbols-needed-by-android-drivers.patch @@ -32,7 +32,7 @@ Export the currently un-exported symbols they depend on. /** --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -6931,6 +6931,7 @@ int can_nice(const struct task_struct *p +@@ -6935,6 +6935,7 @@ int can_nice(const struct task_struct *p return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) || capable(CAP_SYS_NICE)); } @@ -40,6 +40,16 @@ Export the currently un-exported symbols they depend on. #ifdef __ARCH_WANT_SYS_NICE +--- a/kernel/sched/wait.c ++++ b/kernel/sched/wait.c +@@ -244,6 +244,7 @@ void __wake_up_pollfree(struct wait_queu + /* POLLFREE must have cleared the queue. */ + WARN_ON_ONCE(waitqueue_active(wq_head)); + } ++EXPORT_SYMBOL_GPL(__wake_up_pollfree); + + /* + * Note: we use "set_current_state()" _after_ the wait-queue add, --- a/kernel/task_work.c +++ b/kernel/task_work.c @@ -60,6 +60,7 @@ int task_work_add(struct task_struct *ta diff --git a/debian/patches/series b/debian/patches/series index 6f5874334..c9c555a10 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -76,7 +76,6 @@ bugfix/arm/arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch bugfix/powerpc/powerpc-boot-fix-missing-crc32poly.h-when-building-with-kernel_xz.patch bugfix/arm64/arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch bugfix/x86/x86-32-disable-3dnow-in-generic-config.patch -bugfix/x86/Revert-drm-i915-Implement-Wa_1508744258.patch # Arch features features/arm64/arm64-dts-rockchip-Add-support-for-two-PWM-fans-on-h.patch @@ -87,8 +86,6 @@ features/x86/x86-make-x32-syscall-support-conditional.patch # Miscellaneous bug fixes bugfix/all/disable-some-marvell-phys.patch bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch -bugfix/all/fuse-release-pipe-buf-after-last-use.patch -bugfix/all/nfsd-fix-use-after-free-due-to-delegation-race.patch # Miscellaneous features @@ -108,14 +105,11 @@ features/all/db-mok-keyring/KEYS-Make-use-of-platform-keyring-for-module-signatu # Security fixes debian/i386-686-pae-pci-set-pci-nobios-by-default.patch debian/ntfs-mark-it-as-broken.patch -bugfix/all/atlantic-Fix-OOB-read-and-write-in-hw_atl_utils_fw_r.patch -bugfix/all/fget-check-that-the-fd-still-exists-after-getting-a-.patch -bugfix/all/USB-gadget-detect-too-big-endpoint-0-requests.patch -bugfix/all/USB-gadget-zero-allocate-endpoint-0-buffers.patch -bugfix/all/bpf-fix-kernel-address-leakage-in-atomic-fetch.patch -bugfix/all/bpf-fix-signed-bounds-propagation-after-mov32.patch -bugfix/all/bpf-make-32-64-bounds-propagation-slightly-more-robust.patch -bugfix/all/bpf-fix-kernel-address-leakage-in-atomic-cmpxchg-s-r0-aux-reg.patch +bugfix/all/vfs-fs_context-fix-up-param-length-parsing-in-legacy.patch +bugfix/x86/mwifiex-Fix-skb_over_panic-in-mwifiex_usb_recv.patch +bugfix/x86/drm-i915-Flush-TLBs-before-releasing-backing-store.patch +bugfix/all/drm-vmwgfx-Fix-stale-file-descriptors-on-failed-user.patch +bugfix/all/ucount-Make-get_ucount-a-safe-get_user-replacement.patch # Fix exported symbol versions bugfix/all/module-disable-matching-missing-version-crc.patch diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index da7d7493b..f538f3a58 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -35,8 +35,8 @@ Build-Depends-Arch: # used by upstream headers_install target and by debian/rules.d/tools/usb/usbip rsync, lz4 [amd64 arm64] <!stage1 !pkg.linux.nokernel>, -# used for bft debug info (not multi-arch capable) - dwarves:native (>= 1.16~) <!stage1 !pkg.linux.nokernel>, +# used for bft debug info + pahole <!stage1 !pkg.linux.nokernel> | dwarves:native (>= 1.16~) <!stage1 !pkg.linux.nokernel>, Rules-Requires-Root: no Vcs-Git: https://salsa.debian.org/kernel-team/linux.git Vcs-Browser: https://salsa.debian.org/kernel-team/linux diff --git a/debian/templates/control.tools-versioned.in b/debian/templates/control.tools-versioned.in index 4d5957da2..9ea6b6e91 100644 --- a/debian/templates/control.tools-versioned.in +++ b/debian/templates/control.tools-versioned.in @@ -24,7 +24,7 @@ Build-Depends: libperl-dev, libunwind-dev [amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc ppc64 ppc64el sh4], # version in bullseye is too old -# libopencsd-dev, +# libopencsd-dev (>= 1.1.1), python3-dev, Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python3:Depends} Recommends: linux-base diff --git a/debian/upstream/rt-signing-key.pgp b/debian/upstream/rt-signing-key.pgp Binary files differindex a176d69c3..6ba4cb0fd 100644 --- a/debian/upstream/rt-signing-key.pgp +++ b/debian/upstream/rt-signing-key.pgp |