On Thu, 2019-09-05 at 10:03 +0200, Vlastimil Babka wrote: > On 9/4/19 4:24 PM, Walter Wu wrote: > > On Wed, 2019-09-04 at 16:13 +0200, Vlastimil Babka wrote: > >> On 9/4/19 4:06 PM, Walter Wu wrote: > >> > >> The THP fix is not required for the rest of the series, it was even merged to > >> mainline separately. > >> > >>> And It looks like something is different, because we only need last > >>> stack of page, so it can decrease memory overhead. > >> > >> That would save you depot_stack_handle_t (which is u32) per page. I guess that's > >> nothing compared to KASAN overhead? > >> > > If we can use less memory, we can achieve what we want. Why not? > > In my experience to solve some UAFs, it's important to know not only the > freeing stack, but also the allocating stack. Do they make sense together, > or not? In some cases, even longer history of alloc/free would be nice :) > We think it only has free stack to find out the root cause. Maybe we can refer to other people's experience and ideas. > Also by simply recording the free stack in the existing depot handle, > you might confuse existing page_owner file consumers, who won't know > that this is a freeing stack. > Don't worry it. 1. Our feature option has this description about last stack of page. when consumer enable our feature, they should know the changing. 2. We add to print text message for alloc or free stack before dump the stack of page. so consumers should know what is it. > All that just doesn't seem to justify saving an u32 per page. Actually, We want to slim memory usage instead of increasing the memory usage at another mail discussion. Maybe, maintainer or reviewer can provide some ideas. That will be great. > > > > >