irq/urgent for v6.2
Subsystems (4)
Linus,
please pull the latest irq/urgent branch from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-2023-02-19
up to: 2b129f0b24ab: PCI/MSI: Provide missing stubs for CONFIG_PCI_MSI=n
A single fix for the PCI/MSI infrastructure:
The addition of the new alloc/free interfaces in this cycle forgot to add stub functions for pci_msix_alloc_irq_at() and pci_msix_free_irq() for the CONFIG_PCI_MSI=n case
Thanks,
tglx
------------------>
Reinette Chatre (1):
PCI/MSI: Provide missing stubs for CONFIG_PCI_MSI=n
include/linux/pci.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
include/linux/pci.h +12 -0
@@ -1621,6 +1621,18 @@ pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs, flags, NULL); } +static inline struct msi_map pci_msix_alloc_irq_at (struct pci_dev *dev,unsigned int index, +const struct irq_affinity_desc *affdesc) +{ +struct msi_map map = { .index = -ENOSYS , }; + +return map; +} + +static inline void pci_msix_free_irq (struct pci_dev *pdev,struct msi_map map) +{ +} +static inline void pci_free_irq_vectors (struct pci_dev *dev) { }
[GIT pull] timers/urgent for v6.2
Linus,
please pull the latest timers/urgent branch from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-2023-02-19
up to: d125d1349abe: alarmtimer: Prevent starvation by small intervals and SIG_IGN
A fix for a long standing issue in the alarmtimer code:
Posix-timers armed with a short interval with an ignored signal result in an unpriviledged DoS. Due to the ignored signal the timer switches into self rearm mode. This issue had been "fixed" before but a rework of the alarmtimer code 5 years ago lost that workaround.
There is no real good solution for this issue, which is also worked around in the core posix-timer code in the same way, but it certainly moved way up on the ever growing todo list.
Thanks,
tglx
------------------>
Thomas Gleixner (1):
alarmtimer: Prevent starvation by small intervals and SIG_IGN
kernel/time/alarmtimer.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-)
kernel/time/alarmtimer.c +29 -4
@@ -470,11 +470,35 @@ u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval) }EXPORT_SYMBOL_GPL (alarm_forward); -u64 alarm_forward_now (struct alarm *alarm,ktime_t interval) +static u64 __alarm_forward_now (struct alarm *alarm,ktime_t interval,bool throttle) {struct alarm_base *base = &alarm_bases[alarm->type]; +ktime_t now = base->get_ktime (); + +if (IS_ENABLED (CONFIG_HIGH_RES_TIMERS ) && throttle) { +/* +* Same issue as with posix_timer_fn(). Timers which are +* periodic but the signal is ignored can starve the system +* with a very small interval. The real fix which was +* promised in the context of posix_timer_fn() never +* materialized, but someone should really work on it. +* +* To prevent DOS fake @now to be 1 jiffie out which keeps +* the overrun accounting correct but creates an +* inconsistency vs. timer_gettime(2). +*/ +ktime_t kj =NSEC_PER_SEC /HZ ; + +if (interval < kj) + now =ktime_add (now, kj); + } + +return alarm_forward (alarm, now, interval); +} -return alarm_forward (alarm, base->get_ktime (), interval); +u64 alarm_forward_now (struct alarm *alarm,ktime_t interval) +{ +return __alarm_forward_now (alarm, interval, false); }EXPORT_SYMBOL_GPL (alarm_forward_now);
@@ -551,9 +575,10 @@ static enum alarmtimer_restart alarm_handle_timer(struct alarm *alarm,if (posix_timer_event (ptr, si_private) && ptr->it_interval) {/* * Handle ignored signals and rearm the timer. This will go -* away once we handle ignored signals proper. +* away once we handle ignored signals proper. Ensure that +* small intervals cannot starve the system. */ - ptr->it_overrun +=alarm_forward_now (alarm, ptr->it_interval); + ptr->it_overrun +=__alarm_forward_now (alarm, ptr->it_interval, true); ++ptr->it_requeue_pending; ptr->it_active =1 ; result =ALARMTIMER_RESTART ;
Re: [GIT pull] timers/urgent for v6.2
The pull request you sent on Sun, 19 Feb 2023 00:42:25 +0100 (CET):
The pull request you sent on Sun, 19 Feb 2023 00:42:25 +0100 (CET):
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gittimers-urgent-2023-02-19
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/0097c18e459c5ca5d169750eaed99fd272606c1a
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
[GIT pull] x86/urgent for v6.2
In reply to Thomas GleixnerLinus,
please pull the latest x86/urgent branch from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2023-02-19
up to: f9f57da2c2d1: x86/mtrr: Revert 90b926e68f50 ("x86/pat: Fix pat_x_mtrr_type() for MTRR disabled case")
A single fix for x86:
Revert the recent change to the MTRR code which aimed to support SEV-SNP guests on Hyper-V. It cuased a regression on XEN Dom0 kernels.
The underlying issue of MTTR (mis)handling in the x86 code needs some deeper investigation and is definitely not 6.2 material.
Thanks,
tglx
------------------>
Juergen Gross (1):
x86/mtrr: Revert 90b926e68f50 ("x86/pat: Fix pat_x_mtrr_type() for MTRR disabled case")arch/x86/mm/pat/memtype.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/mm/pat/memtype.c +1 -2
@@ -387,8 +387,7 @@ static unsigned long pat_x_mtrr_type(u64 start, u64 end,u8 mtrr_type, uniform; mtrr_type =mtrr_type_lookup (start, end, &uniform); -if (mtrr_type !=MTRR_TYPE_WRBACK && - mtrr_type !=MTRR_TYPE_INVALID ) +if (mtrr_type !=MTRR_TYPE_WRBACK )return _PAGE_CACHE_MODE_UC_MINUS;return _PAGE_CACHE_MODE_WB;
Re: [GIT pull] x86/urgent for v6.2
The pull request you sent on Sun, 19 Feb 2023 00:42:26 +0100 (CET):
The pull request you sent on Sun, 19 Feb 2023 00:42:26 +0100 (CET):
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitx86-urgent-2023-02-19
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/925cf0457d7e62ce08878ffb789189ac08ca8677
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
The pull request you sent on Sun, 19 Feb 2023 00:42:23 +0100 (CET):
The pull request you sent on Sun, 19 Feb 2023 00:42:23 +0100 (CET):
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitirq-urgent-2023-02-19
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/a33d946cbb8709339a856d7da406a7a670e86a60
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html