Re: [PATCH] regset: use vmalloc() for regset_get_alloc()

From: Doug Anderson
Date: Thu Feb 01 2024 - 22:16:30 EST


Hi,

On Thu, Feb 1, 2024 at 7:04 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Feb 01, 2024 at 06:54:51PM -0800, Doug Anderson wrote:
> > > What the hell? Which regset could have lead to that?
> > > It would need to have the total size of register in excess of
> > > 256K. Seriously, which regset is that about? Note that we
> > > have just made sure that size is not greater than that product.
> > > size is unsigned int, so it's not as if a negative value passed
> > > to function could get through that test only to be interpreted
> > > as large positive later...
> > >
> > > Details, please.
> >
> > I can continue to dig more, but it is easy for me to reproduce this.
> > On the stack is elf_core_dump() and it seems like we're getting a core
> > dump of the chrome process. So I just arbitrarily look for the chrome
> > GPU process:
> >
> > $ ps aux | grep gpu-process
> > chronos 2075 3.0 1.1 34075552 95372 ? S<l 18:44 0:01
> > /opt/google/chrome/chrome --type=gpu-process ...
> >
> > Then I send it a quit:
> >
> > $ kill -quit 2075
> >
> > I added some printouts for this allocation and there are a ton. Here's
> > all of them, some of which are over 256K:
>
> Well, the next step would be to see which regset it is - if you
> see that kind of allocation, print regset->n, regset->size and
> regset->core_note_type.

Of course! Here are the big ones:

[ 45.875574] DOUG: Allocating 279584 bytes, n=17474, size=16,
core_note_type=1029
[ 45.884809] DOUG: Allocating 8768 bytes, n=548, size=16, core_note_type=1035
[ 45.893958] DOUG: Allocating 65552 bytes, n=4097, size=16,
core_note_type=1036

-Doug