grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/3] efinet: handle get_status() properly


From: Andrei Borzenkov
Subject: Re: [PATCH 1/3] efinet: handle get_status() properly
Date: Thu, 6 Aug 2015 06:42:00 +0300

В Wed, 5 Aug 2015 22:32:13 +0200
"Vladimir 'phcoder' Serbinenko" <address@hidden> пишет:

> This patch improperly assumes that GRUB is the only thing in EFI that
> transmits.

Actually since recently we try to ensure that grub *is* the only user
of network interface. 

>           Your patch surely fixed your machine but likely breaks some
> other machines. Could you instead make an explicit check for (void *)1 and
> add a comment on which machine it's necessary?

Yes, this patch should add verbose comment to code explaining a) what
problem it tries to fix and b) why ignoring EFI specification is
justified here. Also mention actual hardware/firmware implementation
where this bug happens for future reference.

Looking at other implementations gPXE opens SNP non-exclusively and
explicitly checks returned address. That corresponds to what grub
did in the past. iPXE opens SNP exclusively and assumes anything !=
NULL means transmit completed (it seems to start off with gPXE model).

> Le 5 août 2015 10:28 PM, "Josef Bacik" <address@hidden> a écrit :
> 
> > On 08/05/2015 04:04 PM, Andrei Borzenkov wrote:
> >
> >> В Wed, 5 Aug 2015 14:36:37 -0400
> >> Josef Bacik <address@hidden> пишет:
> >>
> >> The EFI SNP documentation isn't super clear on the value that is returned
> >>> in
> >>> txbuf when calling into GetStatus.  The documentation says its the
> >>> pointer to
> >>> the recycle buffer, but the documentation for Transmit() says that it
> >>> should be
> >>> the pointer to the buffer that we transmitted.
> >>>
> >>
> >> Actually it says "Recycled transmit buffer address" and further
> >> "GetStatus() until the transmitted buffer shows up in the recycled
> >> transmit buffer" so it looks reasonably clear to me.
> >>
> >>                                                On the boxes I'm using
> >>> it's just
> >>> a random pointer (usually 0x1).  It is definitely transmitting stuff,
> >>> but the
> >>> get_status call is not returning the pointer to the txbuf we passed in.
> >>>
> >>
> >> Which sounds like firmware bug. To be sure - you observe it also using
> >> current GIT master?
> >>
> >>
> > This is on git master as of last week, so I have your latest patch
> >
> > efinet: enable hardware filters when opening interface
> >
> > and it was still happening.  I know what Transmit() says, but GetStatus()
> > says it'll just be a pointer to the recycled transmit buffer address, which
> > to me could mean the pointer to whatever the internal queue was being used
> > by UEFI.  Anyway that's not important, what is important is that the
> > current code doesn't work with hardware that exists in the wild.  If it's a
> > firmware bug then fine, what do users do if they have buggy firmware that
> > isn't being updated anymore?  I think making grub more tolerant to crappy
> > firmware is a good thing.  Thanks,
> >
> > Josef
> >
> > _______________________________________________
> > Grub-devel mailing list
> > address@hidden
> > https://lists.gnu.org/mailman/listinfo/grub-devel
> >




reply via email to

[Prev in Thread] Current Thread [Next in Thread]