Re: [PATCH 2/2] efi/gop: Fix memory leak in __gop_query32/64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 04, 2019 at 03:30:22PM +0000, Ard Biesheuvel wrote:
> On Wed, 4 Dec 2019 at 15:27, Arvind Sankar <nivedita@xxxxxxxxxxxx> wrote:
> >
> > On Wed, Dec 04, 2019 at 03:11:09PM +0000, Ard Biesheuvel wrote:
> > > On Tue, 3 Dec 2019 at 21:47, Arvind Sankar <nivedita@xxxxxxxxxxxx> wrote:
> > > >
> > > > gop->query_mode returns info in callee-allocated memory which must be
> > > > freed by the caller.
> > > >
> > > > We don't actually need to call it in order to obtain the info for the
> > > > current graphics mode, which is already there in gop->mode->info, so
> > > > just access it directly.
> > > >
> > > > Also nothing uses the size of the info structure, so remove the
> > > > argument.
> > > >
> > > > Signed-off-by: Arvind Sankar <nivedita@xxxxxxxxxxxx>
> > >
> > > Thanks Arvind
> > >
> > > I agree with this patch in principle, but I'd prefer it if we could
> > > get rid of the __gop_queryXX routines altogether, or if we need a
> > > helper, to at least merge them into on, taking gopXX->mode as an input
> > > argument.
> > >
> >
> > I can do that. I'm also planning a few patches later to merge the 32-bit
> > and 64-bit versions together if there are no objections, but that needs
> > a little more work. Right now the query code can't be merged together
> > because mode's layout is different between 32-bit and 64-bit versions,
> > but it can certainly be folded into the main setup routines.
> >
> 
> Fair enough.
> 
> Are you building/testing this on x86 hardware only? That's perfectly
> fine, but it would be good to know.
> 

Yes, I only have 64-bit x86 hardware.



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux