Re: [PATCH 1/4] xen/dmalloc: Introduce dmalloc() APIs

2022-12-11 Thread Julien Grall
Hi Andrew, On 23/12/2020 16:34, Andrew Cooper wrote: Wrappers for xmalloc() and friends, which track allocations tied to a specific domain. Check for any leaked memory at domain destruction time. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu CC: Stefano S

Re: [PATCH 1/4] xen/dmalloc: Introduce dmalloc() APIs

2021-01-14 Thread Andrew Cooper
On 14/01/2021 10:14, Jan Beulich wrote: > On 14.01.2021 00:16, Andrew Cooper wrote: >> On 05/01/2021 15:56, Jan Beulich wrote: >>> On 23.12.2020 17:34, Andrew Cooper wrote: RFC: * This probably wants to be less fatal in release builds >>> I'm not even convinced this wants to be a panic()

Re: [PATCH 1/4] xen/dmalloc: Introduce dmalloc() APIs

2021-01-14 Thread Jan Beulich
On 14.01.2021 00:16, Andrew Cooper wrote: > On 05/01/2021 15:56, Jan Beulich wrote: >> On 23.12.2020 17:34, Andrew Cooper wrote: >>> RFC: >>> * This probably wants to be less fatal in release builds >> I'm not even convinced this wants to be a panic() in debug builds. > > Any memory leak spotted

Re: [PATCH 1/4] xen/dmalloc: Introduce dmalloc() APIs

2021-01-13 Thread Andrew Cooper
On 05/01/2021 15:56, Jan Beulich wrote: > On 23.12.2020 17:34, Andrew Cooper wrote: >> RFC: >> * This probably wants to be less fatal in release builds > I'm not even convinced this wants to be a panic() in debug builds. Any memory leak spotted by this is an XSA, except in the narrow case of bein

Re: [PATCH 1/4] xen/dmalloc: Introduce dmalloc() APIs

2021-01-05 Thread Jan Beulich
On 23.12.2020 17:34, Andrew Cooper wrote: > --- /dev/null > +++ b/xen/common/dmalloc.c > @@ -0,0 +1,19 @@ > +#include > +#include > +#include > + > +void dfree(struct domain *d, void *ptr) > +{ > +atomic_dec(&d->dalloc_heap); > +xfree(ptr); > +} > + > +void *_dzalloc(struct domain *d, si

Re: [PATCH 1/4] xen/dmalloc: Introduce dmalloc() APIs

2021-01-05 Thread Jan Beulich
On 23.12.2020 17:34, Andrew Cooper wrote: > RFC: > * This probably wants to be less fatal in release builds I'm not even convinced this wants to be a panic() in debug builds. > * In an ideal world, we'd also want to count the total number of bytes >allocated from the xmalloc heap, which wou

[PATCH 1/4] xen/dmalloc: Introduce dmalloc() APIs

2020-12-23 Thread Andrew Cooper
Wrappers for xmalloc() and friends, which track allocations tied to a specific domain. Check for any leaked memory at domain destruction time. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: