Skip to content

Reduce default MBEDTLS_MPI_MAX_SIZE #8936

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

Merged
merged 2 commits into from
Dec 4, 2018

Conversation

RonEld
Copy link
Contributor

@RonEld RonEld commented Dec 2, 2018

Description

Reduce the default size of MBEDTLS_MPI_MAX_SIZE to 512 bytes,
as the default 1024 consumes much stack, and supporting RSA 4096 bit
may suffice at the moment.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 3, 2018

Travis failure will be fixed on master soon (we will request rebase once done). See #8945

Copy link
Contributor

@Patater Patater left a comment

Choose a reason for hiding this comment

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

LGTM. Could use a comment.

@@ -140,6 +140,8 @@ conf unset MBEDTLS_SSL_TRUNCATED_HMAC

conf unset MBEDTLS_PLATFORM_TIME_TYPE_MACRO

conf set MBEDTLS_MPI_MAX_SIZE 512
Copy link
Contributor

Choose a reason for hiding this comment

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

May be worth adding a comment on effects of this limitation, as well as its benefits.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a comment, as asked

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 3, 2018

Travis failure will be fixed on master soon (we will request rebase once done). See #8945

The fix is on master, if you rebase, it should allow travis to run

@RonEld
Copy link
Contributor Author

RonEld commented Dec 3, 2018

OK, I'll rebase. Do you want me to squash the two commits while I'm on it?

@cmonr
Copy link
Contributor

cmonr commented Dec 3, 2018

@RonEld No need to squash. Both commits look good asis.

Ron Eldor added 2 commits December 3, 2018 18:59
Reduce the default size of `MBEDTLS_MPI_MAX_SIZE` to 512 bytes,
as the default 1024 consumes much stack, and supporting RSA 4096 bit
may suffice at the moment.
Add a comment in the `adjust-config.sh` script, for effects
and benefits of the new value.
@RonEld RonEld force-pushed the reduce_default_mpi_max_size branch from abadb4e to edc09cf Compare December 3, 2018 17:00
Copy link
Contributor

@Patater Patater left a comment

Choose a reason for hiding this comment

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

@cmonr
Copy link
Contributor

cmonr commented Dec 4, 2018

CI started

@RonEld
Copy link
Contributor Author

RonEld commented Dec 4, 2018

@Patater

Note that our TLS Client example uses 256 here.

Thanks for the reminder! I have created ARMmbed/mbed-os-example-tls#220 to avoid future compilation warnings.

@RonEld
Copy link
Contributor Author

RonEld commented Dec 4, 2018

@cmonr @0xc0170 Why did the CI fail? I can't seem to find in the log a failure

@mbed-ci
Copy link

mbed-ci commented Dec 4, 2018

Test run: SUCCESS

Summary: 4 of 4 test jobs passed
Build number : 1
Build artifacts
Build logs

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 4, 2018

Will restart CI once rc 2 is completed (the failure is new, not related, we will track it and report back)

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 4, 2018

CI restarted

@cmonr cmonr merged commit 3325070 into ARMmbed:master Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants