On Thu, 8 Dec 2022 at 23:35, Ard Biesheuvel wrote:
>
> On Thu, 8 Dec 2022 at 22:57, Kinney, Michael D
> wrote:
> >
> > Ard,
> >
> > Thank you for the correction.
> >
> > If we add that CONST, then the ShellPkg build breaks with an error
> >
> > c:\work\github\tianocore\edk2\ShellPkg\Application\S
e of the callers.
>
OK, so what is the way forward here?
> > -Original Message-
> > From: devel@edk2.groups.io On Behalf Of Ard
> > Biesheuvel
> > Sent: Thursday, December 8, 2022 1:40 PM
> > To: devel@edk2.groups.io; Kinney, Michael D
> > Cc: N
> Cc: Ni, Ray ; Gao, Zhichao
> Subject: RE: [edk2-devel] [PATCH] ShellPkg: Avoid corrupting installed device
> path protocols
>
> Ard,
>
> Thank you for the correction.
>
> If we add that CONST, then the ShellPkg build breaks with an error
>
> c:\work\
Kinney, Michael D
> Cc: Ni, Ray ; Gao, Zhichao
> Subject: Re: [edk2-devel] [PATCH] ShellPkg: Avoid corrupting installed device
> path protocols
>
> On Thu, 8 Dec 2022 at 22:15, Michael D Kinney
> wrote:
> >
> > Hi Ard,
> >
> > There is a difference betw
On Thu, 8 Dec 2022 at 22:15, Michael D Kinney
wrote:
>
> Hi Ard,
>
> There is a difference between returning a pointer to a device path
> and modifying the device path contents.
>
> If you add CONST to the argument, then an updated pointer to a device
> path can not be returned.
>
No, this is inc
022 12:12 PM
> To: Kinney, Michael D
> Cc: devel@edk2.groups.io; Ni, Ray ; Gao, Zhichao
>
> Subject: Re: [edk2-devel] [PATCH] ShellPkg: Avoid corrupting installed device
> path protocols
>
> On Thu, 8 Dec 2022 at 20:20, Kinney, Michael D
> wrote:
> >
> > H
Biesheuvel
> > Sent: Thursday, December 8, 2022 10:45 AM
> > To: Kinney, Michael D
> > Cc: devel@edk2.groups.io; Ni, Ray ; Gao, Zhichao
> >
> > Subject: Re: [edk2-devel] [PATCH] ShellPkg: Avoid corrupting installed
> > device path protocols
> >
>
5 AM
> To: Kinney, Michael D
> Cc: devel@edk2.groups.io; Ni, Ray ; Gao, Zhichao
>
> Subject: Re: [edk2-devel] [PATCH] ShellPkg: Avoid corrupting installed device
> path protocols
>
> On Thu, 8 Dec 2022 at 19:28, Kinney, Michael D
> wrote:
> >
> > Hi Ard,
> &g
On Thu, 8 Dec 2022 at 19:28, Kinney, Michael D
wrote:
>
> Hi Ard,
>
> From this description, it does not look like it should be modifying the
> contents of the device path. Just point to the device path end node that
> follows the match found.
>
> /**
> Gets the mapping that most closely matche
SetDevicePathEndNode (*DevicePath); ?
Thanks,
Mike
> -Original Message-
> From: Ard Biesheuvel
> Sent: Thursday, December 8, 2022 9:23 AM
> To: devel@edk2.groups.io; Kinney, Michael D
> Cc: Ni, Ray ; Gao, Zhichao
> Subject: Re: [edk2-devel] [PATCH] ShellPkg: Avoid corruptin
om: devel@edk2.groups.io On Behalf Of Ard
> > Biesheuvel
> > Sent: Wednesday, December 7, 2022 8:13 AM
> > To: devel@edk2.groups.io
> > Cc: Ni, Ray ; Gao, Zhichao ; Ard
> > Biesheuvel
> > Subject: [edk2-devel] [PATCH] ShellPkg: Avoid corrupting installed device
> &
k2.groups.io
> Cc: Ni, Ray ; Gao, Zhichao ; Ard
> Biesheuvel
> Subject: [edk2-devel] [PATCH] ShellPkg: Avoid corrupting installed device
> path protocols
>
> The Shell locates device path protocol instances from the database and
> happily passes them to destructive device pa
The Shell locates device path protocol instances from the database and
happily passes them to destructive device path operations, resulting in
the original protocol to get corrupted as well. So take a copy instead,
and discard it once we no longer need it.
Signed-off-by: Ard Biesheuvel
---
Shell
13 matches
Mail list logo