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

teec: use multiple of page size for page aligned buffers #361

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

jenswi-linaro
Copy link
Contributor

When allocating a page aligned buffer, round the size up the next multiple of page size. With this we can guarantee that a part of that page isn't registered already.

Copy link
Contributor

@jbech-linaro jbech-linaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Joakim Bech <joakim.bech@linaro.org>

When allocating a page aligned buffer, round the size up the next
multiple of page size. With this we can guarantee that a part of that
page isn't registered already.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
@jenswi-linaro
Copy link
Contributor Author

Tag applied.

@jforissier
Copy link
Contributor

Bug fix worth taking in 4.0.0 I suppose?

@jenswi-linaro
Copy link
Contributor Author

Yes, please.

@jenswi-linaro
Copy link
Contributor Author

Sadly it doesn't fix OP-TEE/optee_os#6374 but the error looks more or less the same from a normal world point of view so it's nice to remove one source of this error.

@jforissier jforissier merged commit acb0885 into OP-TEE:master Oct 19, 2023
3 checks passed
@jenswi-linaro jenswi-linaro deleted the fix_aligned_alloc branch October 19, 2023 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants