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

[Bug]: PolicyServicePkg's PolicyLibs are missing MemoryAllocationLib #596

Closed
1 task done
apop5 opened this issue Oct 19, 2023 · 0 comments · Fixed by #597
Closed
1 task done

[Bug]: PolicyServicePkg's PolicyLibs are missing MemoryAllocationLib #596

apop5 opened this issue Oct 19, 2023 · 0 comments · Fixed by #597
Assignees
Labels
complexity:easy Requires minimal background information and effort to accomplish complexity:good-first-issue Good for newcomers type:bug Something isn't working urgency:low Little to no impact

Comments

@apop5
Copy link
Contributor

apop5 commented Oct 19, 2023

Is there an existing issue for this?

  • I have searched existing issues

Current Behavior

PolicyServicePkg's PolicyLib rely on PolicyLibCommon, which includes MemoryAllocationLib, header.
The Policy Libs do not enumerate MemoryAllocationLib in the LibraryClasses section of their INF files.

If one of the enumerated library classes do not include MemoryAllocationLib, a build error will occur.

Expected Behavior

DxePolicyLib, MmPolicyLib and PeiPolicyLib need to enumerate all library classes they are dependent upon.

Steps To Reproduce

A Dxe driver that consumes PolicyLib and BaseDebugLibNull will generate a build error for unresolved externals for FreePool and AllocatePool

Build Environment

- OS(s): Win11
- Tool Chain(s): VS2022
- Targets Impacted:

Version Information

release/202302

Urgency

Low

Are you going to fix this?

I will fix it

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

@apop5 apop5 added complexity:easy Requires minimal background information and effort to accomplish type:bug Something isn't working complexity:good-first-issue Good for newcomers labels Oct 19, 2023
@apop5 apop5 self-assigned this Oct 19, 2023
@github-actions github-actions bot added the urgency:low Little to no impact label Oct 19, 2023
apop5 added a commit that referenced this issue Oct 19, 2023
… rely on it (#597)

## Description

PolicyServicePkg's PolicyLib rely on PolicyLibCommon, which includes
MemoryAllocationLib, header.
The Policy Libs do not enumerate MemoryAllocationLib in the
LibraryClasses section of their INF files.

If one of the enumerated library classes do not include
MemoryAllocationLib, a build error will occur.

Fixes #596 

- [ ] 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
A platform threw a build error because of unresolved externals coming
from the MemoryAllocationLib usage.
Adding MemoryAllocationLib to the INFs resolved the build error. 

## Integration Instructions
N/A

---------

Signed-off-by: Aaron <105021049+apop5@users.noreply.github.com>
Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
kenlautner pushed a commit that referenced this issue Dec 14, 2023
… rely on it (#597)

## Description

PolicyServicePkg's PolicyLib rely on PolicyLibCommon, which includes
MemoryAllocationLib, header.
The Policy Libs do not enumerate MemoryAllocationLib in the
LibraryClasses section of their INF files.

If one of the enumerated library classes do not include
MemoryAllocationLib, a build error will occur.

Fixes #596 

- [ ] 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
A platform threw a build error because of unresolved externals coming
from the MemoryAllocationLib usage.
Adding MemoryAllocationLib to the INFs resolved the build error. 

## Integration Instructions
N/A

---------

Signed-off-by: Aaron <105021049+apop5@users.noreply.github.com>
Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
kenlautner pushed a commit that referenced this issue Dec 14, 2023
… rely on it (#597)

## Description

PolicyServicePkg's PolicyLib rely on PolicyLibCommon, which includes
MemoryAllocationLib, header.
The Policy Libs do not enumerate MemoryAllocationLib in the
LibraryClasses section of their INF files.

If one of the enumerated library classes do not include
MemoryAllocationLib, a build error will occur.

Fixes #596 

- [ ] 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
A platform threw a build error because of unresolved externals coming
from the MemoryAllocationLib usage.
Adding MemoryAllocationLib to the INFs resolved the build error. 

## Integration Instructions
N/A

---------

Signed-off-by: Aaron <105021049+apop5@users.noreply.github.com>
Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
kenlautner pushed a commit that referenced this issue Dec 16, 2023
… rely on it (#597)

## Description

PolicyServicePkg's PolicyLib rely on PolicyLibCommon, which includes
MemoryAllocationLib, header.
The Policy Libs do not enumerate MemoryAllocationLib in the
LibraryClasses section of their INF files.

If one of the enumerated library classes do not include
MemoryAllocationLib, a build error will occur.

Fixes #596 

- [ ] 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
A platform threw a build error because of unresolved externals coming
from the MemoryAllocationLib usage.
Adding MemoryAllocationLib to the INFs resolved the build error. 

## Integration Instructions
N/A

---------

Signed-off-by: Aaron <105021049+apop5@users.noreply.github.com>
Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
kenlautner pushed a commit that referenced this issue Dec 18, 2023
… rely on it (#597)

## Description

PolicyServicePkg's PolicyLib rely on PolicyLibCommon, which includes
MemoryAllocationLib, header.
The Policy Libs do not enumerate MemoryAllocationLib in the
LibraryClasses section of their INF files.

If one of the enumerated library classes do not include
MemoryAllocationLib, a build error will occur.

Fixes #596 

- [ ] 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
A platform threw a build error because of unresolved externals coming
from the MemoryAllocationLib usage.
Adding MemoryAllocationLib to the INFs resolved the build error. 

## Integration Instructions
N/A

---------

Signed-off-by: Aaron <105021049+apop5@users.noreply.github.com>
Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
kenlautner pushed a commit that referenced this issue Dec 18, 2023
… rely on it (#597)

## Description

PolicyServicePkg's PolicyLib rely on PolicyLibCommon, which includes
MemoryAllocationLib, header.
The Policy Libs do not enumerate MemoryAllocationLib in the
LibraryClasses section of their INF files.

If one of the enumerated library classes do not include
MemoryAllocationLib, a build error will occur.

Fixes #596 

- [ ] 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
A platform threw a build error because of unresolved externals coming
from the MemoryAllocationLib usage.
Adding MemoryAllocationLib to the INFs resolved the build error. 

## Integration Instructions
N/A

---------

Signed-off-by: Aaron <105021049+apop5@users.noreply.github.com>
Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
kenlautner pushed a commit that referenced this issue Dec 18, 2023
… rely on it (#597)

## Description

PolicyServicePkg's PolicyLib rely on PolicyLibCommon, which includes
MemoryAllocationLib, header.
The Policy Libs do not enumerate MemoryAllocationLib in the
LibraryClasses section of their INF files.

If one of the enumerated library classes do not include
MemoryAllocationLib, a build error will occur.

Fixes #596 

- [ ] 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
A platform threw a build error because of unresolved externals coming
from the MemoryAllocationLib usage.
Adding MemoryAllocationLib to the INFs resolved the build error. 

## Integration Instructions
N/A

---------

Signed-off-by: Aaron <105021049+apop5@users.noreply.github.com>
Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
kenlautner pushed a commit that referenced this issue Jan 19, 2024
… rely on it (#597)

## Description

PolicyServicePkg's PolicyLib rely on PolicyLibCommon, which includes
MemoryAllocationLib, header.
The Policy Libs do not enumerate MemoryAllocationLib in the
LibraryClasses section of their INF files.

If one of the enumerated library classes do not include
MemoryAllocationLib, a build error will occur.

Fixes #596 

- [ ] 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
A platform threw a build error because of unresolved externals coming
from the MemoryAllocationLib usage.
Adding MemoryAllocationLib to the INFs resolved the build error. 

## Integration Instructions
N/A

---------

Signed-off-by: Aaron <105021049+apop5@users.noreply.github.com>
Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity:easy Requires minimal background information and effort to accomplish complexity:good-first-issue Good for newcomers type:bug Something isn't working urgency:low Little to no impact
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant