Re: [PATCH v5 bpf-next 01/10] lib/buildid: harden build ID parsing logic

Andi Kleen
2024-08-13T00:52:07Z

> @@ -152,6 +160,10 @@ int build_id_parse(struct vm_area_struct *vma, unsigned char *build_id,
> page = find_get_page(vma->vm_file->f_mapping, 0);
> if (!page)
> return -EFAULT; /* page not mapped */
> + if (!PageUptodate(page)) {
> + put_page(page);
> + return -EFAULT;
> + }

That change is not described. As I understand it might prevent reading
previous data in the page or maybe junk under an IO error? Anyways I guess it's a
good change.

Reviewed-by: Andi Kleen <ak@linux.intel.com>

-Andi