Re: [PATCH] mm/gup_test: reject wrapped user ranges
From: Andrew Morton
Date: Wed Jun 10 2026 - 16:33:34 EST
On Wed, 10 Jun 2026 13:22:32 -0400 Samuel Moelius <sam.moelius@xxxxxxxxxxxxxxx> wrote:
> > > start_time = ktime_get();
> > > - for (addr = gup->addr; addr < gup->addr + gup->size; addr = next) {
> > > + for (addr = gup->addr; addr < end; addr = next) {
> > > if (nr != gup->nr_pages_per_call)
> > > break;
> > >
> > > next = addr + nr * PAGE_SIZE;
> >
> > Sashiko AI review identified a pre-existing possible overflow here on
> > 32-bit machines.
> >
> > https://sashiko.dev/#/patchset/20260609004814.1240586.6294d614ac80.gup-test-range-end-wrap@xxxxxxxxxxxxxxx
>
> Does the __u64 or Sashiko AI point require action from me?
Not really. The patch makes the code better, that's what counts!