Messages in this thread | | | From | Chris Wilson <> | Subject | Re: [Intel-gfx] [PATCH v2 5/5] tools/testing/scatterlist: Test new __sg_alloc_table_from_pages | Date | Wed, 06 Sep 2017 13:39:32 +0100 |
| |
Quoting Tvrtko Ursulin (2017-09-06 13:10:57) > > On 06/09/2017 11:48, Chris Wilson wrote: > > All ascending. Interesting challenge for 3,2,1,0; it can be coalesced, > > we just don't. I wonder if we are missing some like that. But for the > > Hm, how do you think descending pages could be coalesced? By > re-arranging the pages? But that would break everything, do I don't get it.
Wishful thinking; I wasn't considering the order inside the object, just their physical addresses. > > > moment, 0, 2, 1, would be a good addition to the above set. > > > > Is there any value in checking overflows in this interface? > > Overflows as in size > num_pages * PAGE_SIZE as passed in to > __sg_alloc_table_from_pages ? It is not checked in the implementation at > the moment and it looks it is harmless.
Just thinking aloud if there was a way to get a mult/add overflow. That we do page size coalescing, the only avenue is from a buggy max_seg.
Going back to the makefile, perhaps add the magic for ubsan as well? -fsanitize=address -fsanitize=undefined -Chris
| |