Re: [PATCH] x86: Fix CPA memtype reserving in the set_pages_arraycases

From: Ingo Molnar
Date: Mon Aug 03 2009 - 05:19:21 EST



* Dave Airlie <airlied@xxxxxxxx> wrote:

> > hm, i'm missing a description about how this bug was triggered.
> > How did you end up getting highmem pages to a cpa call?
>
> GEM and TTM both allocate page arrays and just pass them to cpa,
> we don't know what type of pages the allocator gives us back and
> we really shouldn't have to, so having cpa ignore highmem pages is
> certainly the right option.
>
> GEM just uses shmem code to alloc the pages and TTM has its own
> allocator.

Neither of my questions was answered though: do highmem pages ever
get passed in and what were the effects of the bug and how was it
noticed?

If no highmem pages can be passed in then the right solution is not
to ignore them silently but to add a WARN_ONCE() to enforce that
they are not used in the future either.

If they are used today then i'd like to know where exactly and
double check that all the cache attributes are consistent: as a
highmem page might be visible to user-space as well or might be
mapped via the vmalloc space, etc.

And yes, if it happens and all the other mapping aliases are fine
then ignoring them is the right solution.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/