On Mon, Apr 12, 2021 at 01:08:38PM -0700, Kees Cook wrote:
> On Mon, Apr 12, 2021 at 10:00:18AM +0200, Peter Zijlstra wrote:
> > @@ -1249,14 +1249,14 @@ static int check_absent_pte(pte_t *pte,
> >  
> >  static int check_present(unsigned long addr, unsigned long len)
> >  {
> > -   return apply_to_page_range(current->mm, addr, len,
> > -                              check_present_pte, (void *)addr);
> > +   return verify_page_range(current->mm, addr, len,
> > +                            check_present_pte, (void *)addr);
> 
> For example, switch to returning bad addr through verify_page_range(),
> or have a by-reference value, etc:
> 
>       unsigned long failed;
> 
>       failed = verify_page_range(current->mm< addr, len, check_present_pte);
>       if (failed) {
>               pr_err("missing PTE:%lx\n",
>                      (addr - failed) >> PAGE_SHIFT);

OK, lemme try that.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to