Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShellPkg/Shell: Do not set end device path if already end #3744

Conversation

mdkinney
Copy link
Member

@mdkinney mdkinney commented Dec 9, 2022

Update Shell Protocol EfiShellGetMapFromDevicePath() to not set the end if the device path if it is already an end of entire device path. This removes a write oprtation that can cause failures if the Device Path Protocol is mapped to read-only memory. In general Device Path Protocols should not be modified unless the API explicitly states that the device path is modified.

Cc: Ard Biesheuvel ardb@kernel.org
Cc: Ray Ni ray.ni@intel.com
Cc: Zhichao Gao zhichao.gao@intel.com
Signed-off-by: Michael D Kinney michael.d.kinney@intel.com

Update Shell Protocol EfiShellGetMapFromDevicePath() to not
set the end if the device path if it is already an end of
entire device path.  This removes a write operation that can
cause failures if the Device Path Protocol is mapped to
read-only memory.  In general Device Path Protocols should not
be modified unless the API explicitly states that the device
path is modified.

Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
@mdkinney mdkinney force-pushed the Bug_xxx_ShellPkg_EfiShellGetMapFromDevicePath_Filter_SetDevicePathEndNode branch from cc3bcd6 to 42b0205 Compare December 13, 2022 20:49
@mdkinney mdkinney added the push Auto push patch series in PR if all checks pass label Dec 13, 2022
@mergify mergify bot merged commit 592bf33 into tianocore:master Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
push Auto push patch series in PR if all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant