Re: [PATCH 2/3] mem: fix ASan shadow for remapped memory segments

2022-04-27 Thread Burakov, Anatoly
On 26-Apr-22 5:07 PM, Burakov, Anatoly wrote: On 26-Apr-22 3:15 PM, David Marchand wrote: On Tue, Apr 26, 2022 at 2:54 PM Burakov, Anatoly wrote: @@ -1040,9 +1040,25 @@ malloc_heap_free(struct malloc_elem *elem)   rte_mcfg_mem_write_unlock();    free_unlock: -   /* Poison memory r

Re: [PATCH 2/3] mem: fix ASan shadow for remapped memory segments

2022-04-26 Thread Burakov, Anatoly
On 26-Apr-22 3:15 PM, David Marchand wrote: On Tue, Apr 26, 2022 at 2:54 PM Burakov, Anatoly wrote: @@ -1040,9 +1040,25 @@ malloc_heap_free(struct malloc_elem *elem) rte_mcfg_mem_write_unlock(); free_unlock: - /* Poison memory range if belonging to some still mapped pages. *

Re: [PATCH 2/3] mem: fix ASan shadow for remapped memory segments

2022-04-26 Thread David Marchand
On Tue, Apr 26, 2022 at 2:54 PM Burakov, Anatoly wrote: > >> @@ -1040,9 +1040,25 @@ malloc_heap_free(struct malloc_elem *elem) > >> > >> rte_mcfg_mem_write_unlock(); > >> free_unlock: > >> - /* Poison memory range if belonging to some still mapped > >> pages. */ > >> - if (!

Re: [PATCH 2/3] mem: fix ASan shadow for remapped memory segments

2022-04-26 Thread Burakov, Anatoly
On 21-Apr-22 2:18 PM, Burakov, Anatoly wrote: On 21-Apr-22 10:37 AM, David Marchand wrote: On Wed, Apr 20, 2022 at 4:47 PM Burakov, Anatoly wrote: On 15-Apr-22 6:31 PM, David Marchand wrote: When releasing some memory, the allocator can choose to return some pages to the OS. At the same time

Re: [PATCH 2/3] mem: fix ASan shadow for remapped memory segments

2022-04-21 Thread Burakov, Anatoly
On 21-Apr-22 10:37 AM, David Marchand wrote: On Wed, Apr 20, 2022 at 4:47 PM Burakov, Anatoly wrote: On 15-Apr-22 6:31 PM, David Marchand wrote: When releasing some memory, the allocator can choose to return some pages to the OS. At the same time, this memory was poisoned in ASAn shadow. Doin

Re: [PATCH 2/3] mem: fix ASan shadow for remapped memory segments

2022-04-21 Thread David Marchand
On Thu, Apr 21, 2022 at 11:37 AM David Marchand wrote: > > On Wed, Apr 20, 2022 at 4:47 PM Burakov, Anatoly > wrote: > > > > On 15-Apr-22 6:31 PM, David Marchand wrote: > > > When releasing some memory, the allocator can choose to return some > > > pages to the OS. At the same time, this memory w

Re: [PATCH 2/3] mem: fix ASan shadow for remapped memory segments

2022-04-21 Thread David Marchand
On Wed, Apr 20, 2022 at 4:47 PM Burakov, Anatoly wrote: > > On 15-Apr-22 6:31 PM, David Marchand wrote: > > When releasing some memory, the allocator can choose to return some > > pages to the OS. At the same time, this memory was poisoned in ASAn > > shadow. Doing the latter made it impossible to

Re: [PATCH 2/3] mem: fix ASan shadow for remapped memory segments

2022-04-20 Thread Burakov, Anatoly
On 15-Apr-22 6:31 PM, David Marchand wrote: When releasing some memory, the allocator can choose to return some pages to the OS. At the same time, this memory was poisoned in ASAn shadow. Doing the latter made it impossible to remap this same page later. On the other hand, without this poison, th

[PATCH 2/3] mem: fix ASan shadow for remapped memory segments

2022-04-15 Thread David Marchand
When releasing some memory, the allocator can choose to return some pages to the OS. At the same time, this memory was poisoned in ASAn shadow. Doing the latter made it impossible to remap this same page later. On the other hand, without this poison, the OS would pagefault in any case for this page