Skip to content

[Task]: Make core_free_pool() and core_free_pages() unsafe #1235

@makubacki

Description

@makubacki

Request Description

There are requirements on the core_free_pool() and core_free_pages() functions that caller's must take into account beyond simple pointer expections.

pub fn core_free_pages(memory: efi::PhysicalAddress, pages: usize) -> Result<(), EfiError>
pub fn core_free_pool(buffer: *mut c_void) -> Result<(), EfiError>

This issue tracks marking the functions as unsafe with the caller expectations that the memory buffer being given to the function is allocated per the expected APIs (in addition to not being null).


The goal is to clearly communicate to free() callers the safety requirements. Therefore, this will extend up the call stack to functions the directly call the free APIs.

Are you going to make the change?

Someone else needs to make the change

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Type

No fields configured for Task.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions