Download raw body.
uvm_fault_unwire() & truncation
> Index: uvm/uvm_fault.c
> ===================================================================
> RCS file: /cvs/src/sys/uvm/uvm_fault.c,v
> diff -u -p -r1.135 uvm_fault.c
> --- uvm/uvm_fault.c 5 Sep 2023 05:08:26 -0000 1.135
> +++ uvm/uvm_fault.c 21 Oct 2024 11:02:33 -0000
> @@ -552,7 +552,7 @@ struct uvm_faultctx {
>
> int uvm_fault_check(
> struct uvm_faultinfo *, struct uvm_faultctx *,
> - struct vm_anon ***);
> + struct vm_anon ***, vm_fault_t);
>
> int uvm_fault_upper(
> struct uvm_faultinfo *, struct uvm_faultctx *,
> @@ -585,11 +585,6 @@ uvm_fault(vm_map_t orig_map, vaddr_t vad
> ufi.orig_map = orig_map;
> ufi.orig_rvaddr = trunc_page(vaddr);
> ufi.orig_size = PAGE_SIZE; /* can't get any smaller than this */
> - if (fault_type == VM_FAULT_WIRE)
> - flt.narrow = TRUE; /* don't look for neighborhood
> - * pages on wire */
> - else
> - flt.narrow = FALSE; /* normal fault */
You should keep a default initialization of flt.narrow to FALSE, or at
least make sure uvm_fault_check() initializes it to FALSE in the
non-narrow code paths (e.g. around line 700 where all the fields are
initialized).
Apart from this, the diff is ok.
uvm_fault_unwire() & truncation