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

Add NULL Check to allow IpmiSendCommandInternal flow through avoinding assert as routine does not consider NULL para… #243

Conversation

anandakrishnanl
Copy link
Contributor

@anandakrishnanl anandakrishnanl commented Jun 28, 2024

Description

IpmiSendCommandInternal did not allow NULL parameter for ResponseData and ResponseDataSize Parameters.

Expected Behavior:
NULL can be passed as parameter for some specific IPMI commands.

FIX APPLIED:
Allow IpmiSendCommandInternal to allow a NULL parameter as long as ResponseDataSize is zero.

  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

Tested with Oem Specific Ipmi Command. Prior to change, cpu exception occurred. After fix, system was able to continue.

Integration Instructions

N/A

…meter for ResponseData and ResponseDataSize Parameter

Current Behavior:

IpmiSendCommandInternal does not consider NULL parameter for ResponseData and ResponseDataSize Parameter

Expected Behavior:

NULL can be passed as parameter for

IN OUT UINT8 *ResponseData,
IN OUT UINT8 *ResponseDataSize

in IpmiSendCommandInternal Routine


FIX APPLIED:

Add NULL Check as IpmiSendCommandInternal does not consider NULL parameter for ResponseData and ResponseDataSize Parameter
@github-actions github-actions bot added the impact:non-functional Does not have a functional impact label Jun 28, 2024
@cfernald
Copy link
Contributor

cfernald commented Jul 1, 2024

Could you update the title to indicate this is allowing for a null instance of the response on a send? Right now its unclear if you are adding a check to prevent or allow this.

@anandakrishnanl anandakrishnanl changed the title Add NULL Check as IpmiSendCommandInternal does not consider NULL para… Add NULL Check to allow IpmiSendCommandInternal flow through avoinding assert as routine does not consider NULL para… Jul 8, 2024
@anandakrishnanl
Copy link
Contributor Author

Could you update the title to indicate this is allowing for a null instance of the response on a send? Right now its unclear if you are adding a check to prevent or allow this.

Modified the Title

@anandakrishnanl
Copy link
Contributor Author

@anandakrishnanl please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="AMI"

@codecov-commenter
Copy link

codecov-commenter commented Jul 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.92%. Comparing base (0c52422) to head (80a5452).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #243      +/-   ##
==========================================
+ Coverage   27.85%   27.92%   +0.07%     
==========================================
  Files          44       44              
  Lines        2987     2990       +3     
  Branches      275      277       +2     
==========================================
+ Hits          832      835       +3     
  Misses       2149     2149              
  Partials        6        6              
Flag Coverage Δ
IpmiFeaturePkg 27.92% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@apop5 apop5 merged commit 253124f into microsoft:main Jul 26, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:non-functional Does not have a functional impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants