--
Dear,
I had sent you a mail but i don't think you received it that's why am
writing you again.It is important you get back to me as soon as you
can.
Maddah Hussain
When a CFS task that was boosted by a SCHED_DEADLINE
task boosts another CFS task (nested priority inheritance),
Kernel panic is observed.
Fixing priority inheritance changes the way how sched_deadline
attributes are being inherited from original donor task.
Additional supporting patches are added to fix throttling of
boosted tasks.
Daniel Bristot de Oliveira (1):
sched/deadline: Unthrottle PI boosted threads while enqueuing
Lucas Stach (1):
sched/deadline: Fix stale throttling on de-/boosted tasks
Juri Lelli (1):
sched/deadline: Fix priority inheritance with multiple scheduling
classes
Hui Su (1):
kernel/sched: Remove dl_boosted flag comment
include/linux/sched.h | 13 ++--
kernel/sched/core.c | 11 ++--
kernel/sched/deadline.c | 131 +++++++++++++++++++++++++---------------
3 files changed, 96 insertions(+), 59 deletions(-)
--
2.34.1
The error exit of privcmd_ioctl_dm_op() is calling unlock_pages()
potentially with pages being NULL, leading to a NULL dereference.
Additionally lock_pages() doesn't check for pin_user_pages_fast()
having been completely successful, resulting in potentially not
locking all pages into memory. This could result in sporadic failures
when using the related memory in user mode.
Fix all of that by calling unlock_pages() always with the real number
of pinned pages, which will be zero in case pages being NULL, and by
checking the number of pages pinned by pin_user_pages_fast() matching
the expected number of pages.
Cc: <stable(a)vger.kernel.org>
Fixes: ab520be8cd5d ("xen/privcmd: Add IOCTL_PRIVCMD_DM_OP")
Reported-by: Rustam Subkhankulov <subkhankulov(a)ispras.ru>
Signed-off-by: Juergen Gross <jgross(a)suse.com>
---
V2:
- use "pinned" as parameter for unlock_pages() (Jan Beulich)
- drop label "unlock" again (Jan Beulich)
- add check for complete success of pin_user_pages_fast()
V3:
- continue after partial success of pin_user_pages_fast() (Jan Beulich)
---
drivers/xen/privcmd.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
index 3369734108af..1ca7e3ea6fd4 100644
--- a/drivers/xen/privcmd.c
+++ b/drivers/xen/privcmd.c
@@ -581,7 +581,7 @@ static int lock_pages(
struct privcmd_dm_op_buf kbufs[], unsigned int num,
struct page *pages[], unsigned int nr_pages, unsigned int *pinned)
{
- unsigned int i;
+ unsigned int i, off = 0;
for (i = 0; i < num; i++) {
unsigned int requested;
@@ -589,19 +589,23 @@ static int lock_pages(
requested = DIV_ROUND_UP(
offset_in_page(kbufs[i].uptr) + kbufs[i].size,
- PAGE_SIZE);
+ PAGE_SIZE) - off;
if (requested > nr_pages)
return -ENOSPC;
page_count = pin_user_pages_fast(
- (unsigned long) kbufs[i].uptr,
+ (unsigned long)kbufs[i].uptr + off * PAGE_SIZE,
requested, FOLL_WRITE, pages);
- if (page_count < 0)
- return page_count;
+ if (page_count <= 0)
+ return page_count ? : -EFAULT;
*pinned += page_count;
nr_pages -= page_count;
pages += page_count;
+
+ off = requested - page_count;
+ if (off)
+ i--;
}
return 0;
@@ -677,10 +681,8 @@ static long privcmd_ioctl_dm_op(struct file *file, void __user *udata)
}
rc = lock_pages(kbufs, kdata.num, pages, nr_pages, &pinned);
- if (rc < 0) {
- nr_pages = pinned;
+ if (rc < 0)
goto out;
- }
for (i = 0; i < kdata.num; i++) {
set_xen_guest_handle(xbufs[i].h, kbufs[i].uptr);
@@ -692,7 +694,7 @@ static long privcmd_ioctl_dm_op(struct file *file, void __user *udata)
xen_preemptible_hcall_end();
out:
- unlock_pages(pages, nr_pages);
+ unlock_pages(pages, pinned);
kfree(xbufs);
kfree(pages);
kfree(kbufs);
--
2.35.3
Hi Greg,
This 5.10.y backport series contains fixes from v5.17 release.
All the patches in this series have already been applied to 5.15.y
except for patch 2 which you have queued to 5.15.y yesterday [1].
Yesterday's 5.15.y series contains mostly fixed from v5.18/v5.19.
The applicable fixed from that series will be included in the next
5.10.y series.
Thanks,
Amir.
Changes from [v1]:
- Added Acked-by Darrick
- CC stable
[1] https://lore.kernel.org/linux-xfs/YwSADLkBPNe7hZQs@kroah.com/
[v1] https://lore.kernel.org/linux-xfs/20220822162802.1661512-1-amir73il@gmail.c…
Christoph Hellwig (1):
fs: remove __sync_filesystem
Dan Carpenter (1):
xfs: prevent a WARN_ONCE() in xfs_ioc_attr_list()
Darrick J. Wong (4):
xfs: reject crazy array sizes being fed to XFS_IOC_GETBMAP*
vfs: make sync_filesystem return errors from ->sync_fs
xfs: return errors in xfs_fs_sync_fs
xfs: only bother with sync_filesystem during readonly remount
fs/sync.c | 48 ++++++++++++++++++++++++----------------------
fs/xfs/xfs_ioctl.c | 4 ++--
fs/xfs/xfs_ioctl.h | 5 +++--
fs/xfs/xfs_super.c | 13 ++++++++++---
4 files changed, 40 insertions(+), 30 deletions(-)
--
2.25.1
Hi Greg,
stable kernels 5.18 and 5.15 seem to be missing upstream patch
c64cc2802a78 ("x86/entry: Move CLD to the start of the idtentry macro").
This is a prerequisite patch for 64cbd0acb582 ("x86/entry: Don't call
error_entry() for XENPV"), which is included in 5.15.y and 5.18.y.
Could you please take c64cc2802a78 for 5.15 and 5.18?
Juergen
Rajesh reports [1] that the test_align BPF selftest is broken in
5.4.210. Three patches were added since 5.4.209:
(A) 7c1134c7da99 ("bpf: Verifer, adjust_scalar_min_max_vals to always call update_reg_bounds()")
(B) 6a9b3f0f3bad ("selftests/bpf: Fix test_align verifier log patterns")
(C) 6098562ed9df ("selftests/bpf: Fix "dubious pointer arithmetic" test")
(A) fixes an issue in the BPF verifier, which changes the verifier trace
output. (B) fixes those trace changes in the selftests.
Unfortunately (B) also address changes to the verifier output from other
patches that weren't backported to v5.4, so the test now fails.
(C) also addresses a different verifier change that is not in v5.4.
Therefore revert (C), and partially revert (B).
[1] https://lore.kernel.org/all/CAPXMrf-C5XEUfOJd3GCtgtHOkc8DxDGbLxE5=GFmr+Py0z…
Jean-Philippe Brucker (2):
Revert "selftests/bpf: Fix "dubious pointer arithmetic" test"
Revert "selftests/bpf: Fix test_align verifier log patterns"
tools/testing/selftests/bpf/test_align.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--
2.37.1
The error exit of privcmd_ioctl_dm_op() is calling unlock_pages()
potentially with pages being NULL, leading to a NULL dereference.
Additionally lock_pages() doesn't check for pin_user_pages_fast()
having been completely successful, resulting in potentially not
locking all pages into memory. This could result in sporadic failures
when using the related memory in user mode.
Fix all of that by calling unlock_pages() always with the real number
of pinned pages, which will be zero in case pages being NULL, and by
checking the number of patches pinned by pin_user_pages_fast()
matching the expected number of pages.
Cc: <stable(a)vger.kernel.org>
Fixes: ab520be8cd5d ("xen/privcmd: Add IOCTL_PRIVCMD_DM_OP")
Reported-by: Rustam Subkhankulov <subkhankulov(a)ispras.ru>
Signed-off-by: Juergen Gross <jgross(a)suse.com>
---
V2:
- use "pinned" as parameter for unlock_pages() (Jan Beulich)
- drop label "unlock" again (Jan Beulich)
- add check for complete success of pin_user_pages_fast()
---
drivers/xen/privcmd.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
index 3369734108af..7dc62510635e 100644
--- a/drivers/xen/privcmd.c
+++ b/drivers/xen/privcmd.c
@@ -602,6 +602,10 @@ static int lock_pages(
*pinned += page_count;
nr_pages -= page_count;
pages += page_count;
+
+ /* Exact reason isn't known, EFAULT is one possibility. */
+ if (page_count < requested)
+ return -EFAULT;
}
return 0;
@@ -677,10 +681,8 @@ static long privcmd_ioctl_dm_op(struct file *file, void __user *udata)
}
rc = lock_pages(kbufs, kdata.num, pages, nr_pages, &pinned);
- if (rc < 0) {
- nr_pages = pinned;
+ if (rc < 0)
goto out;
- }
for (i = 0; i < kdata.num; i++) {
set_xen_guest_handle(xbufs[i].h, kbufs[i].uptr);
@@ -692,7 +694,7 @@ static long privcmd_ioctl_dm_op(struct file *file, void __user *udata)
xen_preemptible_hcall_end();
out:
- unlock_pages(pages, nr_pages);
+ unlock_pages(pages, pinned);
kfree(xbufs);
kfree(pages);
kfree(kbufs);
--
2.35.3