[roll] Roll fuchsia [kernel][vm] Fix DirtyPage allocations

Fixes two related latent bugs in the DirtyPagesLocked zero page
allocation logic. First bug is theoretically benign, where even if all
pages are allocated by the call to pmm_alloc_pages, since the count is
not updated we still allocate each page individually, ultimately
causing double the required allocations.

Second bug occurs if the passed in allocation list already has enough
items to satisfy all the zero pages, since the number of zero pages is
pre truncated this will cause us to completely skip the the process of
then actually inserting and marking the pages dirty.

These two bugs cannot manifest today as pager backed VMOs are, also
incorrectly, not marked as being able to have delayed allocations. As
the allocations cannot delay, the second set of individual page
allocations will never need to generate a page request, and so we will
never have to retry the function with too many items already in the
alloc_list.

Given this a test cannot be written today to validate this bug.
However, the existing tests will fail with the current code if pager
backed VMOs gain PMM_ALLOC_FLAG_CAN_WAIT, and so if/when that happens
that will count as a regression test.

Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1064112
Original-Revision: 0eabe588d7537a72b8dc9608249fd740bc8e89fe
GitOrigin-RevId: d70ea235df9ff56532d841f0b7683945f37a1f4d
Change-Id: I59702929596520fa222bb5a74c88f02c2e2c57f8
1 file changed
tree: 992084a59b5ee4d2258edfea0336fab0c73e4dc2
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cts
  6. firmware
  7. flower
  8. jiri.lock
  9. MILESTONE
  10. minimal
  11. prebuilts
  12. README.md
  13. stem
  14. test_durations
  15. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.