Re: [PATCH v2 0/9] Add dynamic memory allocator support for nolibc

From: Paul E. McKenney
Date: Wed Mar 30 2022 - 14:52:07 EST


On Wed, Mar 30, 2022 at 04:41:14AM +0200, Willy Tarreau wrote:
> Hi Ammar,
>
> On Tue, Mar 29, 2022 at 05:20:31PM +0700, Ammar Faizi wrote:
> > On 3/29/22 5:17 PM, Ammar Faizi wrote:
> > > Hi,
> > >
> > > This is a patchset v2 to add dynamic memory allocator support
> > > for nolibc after 2 RFCs, please review the changes carefully.
>
> Thank you! For me it's OK for all the series:
>
> Acked-by: Willy Tarreau <w@xxxxxx>
>
> I do have a minor comment about the use of __builtin_mul_overflow() here.
> While this code is included in the kernel and mostly for use with kernel
> related stuff, till now I've been careful to support older compilers (I'm
> still seeing 4.8, 4.7 and 4.4 commonly in field). I don't find it urgent,
> but I think that sooner or later it would be nice to implement an
> alternative for compilers missing this builtin, especially if it's the
> only one that prevents older compilers from being used. Probably that
> something like this (untested) would do the job:
>
> if (nmemb && ~(size_t)0 / nmemb < size) {
> SET_ERRNO(ENOMEM);
> return NULL;
> }
> size *= nmemb;
>
> But again, for me it's not a showstopper and can be improved later.
>
> > Sorry, forgot to replace === with --- in for each patch.
> > Should I resend?
>
> Let's see what Paul prefers. sed 's/===/---/' on the mbox should fix
> it otherwise a resend will be needed.

Given that I am adding your Acked-by anyway, why not? ;-)

But please check the commits to make sure that this had the desired
effect.

Thanx, Paul