RE: [PATCH v2 0/4] vmalloc: Improve vmalloc(4MB) performance

From: David Laight
Date: Thu Mar 25 2021 - 12:01:00 EST


From: Matthew Wilcox
> Sent: 24 March 2021 15:05
>
> I may have gone a little too far with the first patch. It turns out we
> have a lot of code using the vmalloc caller functionality, and I decided
> to convert it all to unsigned long instead of leaving some paths as void *
> and casting later.

What is the 'address of the caller' needed for?
If it gets printed anywhere it ought to be a pointer type
throughout so that it will get hashed and not leak the
real address.

Even then it is probably better to use a typed pointer
(eg to an undefined structure) than 'void *'.
That might also pick up more incorrect uses.

Of course things like _RET_IP_ would need changing to return
the same pointer type.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)