Skip to content

lwiperf: fix double-free of pcb on error #15272

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

Closed
wants to merge 58 commits into from
Closed

Conversation

hifoolno
Copy link
Contributor

Summary of changes

Fix double-free of pcb on error as done in LwIP:
lwip-tcpip/lwip@fc5b6f7

Impact of changes

Migration actions required

Documentation


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


Sadik.Ozer and others added 15 commits April 8, 2022 10:40
Signed-off-by: Sadik.Ozer <[email protected]>
Signed-off-by: Sadik.Ozer <[email protected]>
Signed-off-by: Sadik.Ozer <[email protected]>
Signed-off-by: Sadik.Ozer <[email protected]>
Signed-off-by: Sadik.Ozer <[email protected]>
It is used by rom bootloader

Signed-off-by: Sadik.Ozer <[email protected]>
Signed-off-by: Sadik.Ozer <[email protected]>
Signed-off-by: Sadik.Ozer <[email protected]>
Signed-off-by: Sadik.Ozer <[email protected]>
@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Apr 20, 2022
@ciarmcom ciarmcom requested a review from a team April 20, 2022 09:30
@ciarmcom
Copy link
Member

@hifoolno, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

0xc0170
0xc0170 previously approved these changes Apr 20, 2022
0xc0170 added 3 commits April 20, 2022 11:18
See actions/checkout#762
Our tests are failing as checkout is not working (no git repository found)
Where we use git commands directly, we need to add safe directory. This is because
the recent git changes introduced, for details visit:
actions/checkout#766
…git-failure

Github actions: use safe.directory for actions invoking git
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 20, 2022

Github actions fix #15270 was merged, please rebase and it should be green

16L-YT and others added 18 commits May 6, 2022 17:24
Bluetooth: Inform privacy risk of using signed writes.
Support ITM tracing for Ambiq Apollo3 targets
The sleep_for function is updated to use the chrono time arguments since
the regular ones are deprecated.
The function SMSC9220_EMAC::low_level_input should create a heap for the
packet equal to the size of the message (most of which are couple hundred
bytes). The current code uses maximum frame size (1522 bytes) for each
packet. This will cause the heap to quickly fill up. In fact, the default
memory size (lwip.mem-size) used for this heap is 1600 bytes. This means
that once you have one other packet allocated (extremely common), the
heap allocation will always fails.

Also, it is recommend to increase the default lwip.mem-size because that
amount is very small especially if you send or receive a few large packets
in the network. This is NOT done in current commit.
The function smsc9220_receive_by_chunks loads data from the Ethernet port.
It is expected to return the Ethernet frame without the 4 CRC bytes.
However, it is required to call the Ethernet data port register (32-bit)
an amount equal to the number of frame words (including the 4 CRC bytes)
to pop all frame words. The current code doesn't call the register for the
last word (which has CRC data). This causes subsequent calls to have this
missed word at the beginning. The impact of this is huge as the high level
API is getting fed wrong data. The fix adds one additional call to the data
port register.
The functions smsc9220_receive_by_chunks and smsc9220_send_by_chunks are
supposed to implement receiving and sending packets by chunks. However,
the functions SMSC9220_EMAC::low_level_input and SMSC9220_EMAC::link_out,
which call them respectively, already require or assemble the full packet.
Also, smsc9220_receive_by_chunks doesn't implement the "chunks" part.

This commit renames the functions to smsc9220_receive_packet and
smsc9220_send_packet. The functions now do their operations by word
instead of by bytes. The functions SMSC9220_EMAC::low_level_input and
SMSC9220_EMAC::link_out already handle allocation, continuity and word
alignment of the packet buffer.
STM32G4: Fix serial port at low speed baud
In loading Curve448, MPI N is in uninitialized state and its sign flag N.s isn't initialized to 1.
This is fixed by following:
Mbed-TLS/mbedtls#5811
Engine doesn't support P + Q when P and Q are the same. Workaround by 2*P
…d-curve448

Mbed TLS: Fix wrong MPI N in ECP Curve448 curve
@0xc0170
Copy link
Contributor

0xc0170 commented Jun 10, 2022

@xiaohuizhang98 Can you please rebase? Or shall we close this pull request?

@mergify mergify bot dismissed 0xc0170’s stale review June 10, 2022 16:15

Pull request has been modified.

@hifoolno
Copy link
Contributor Author

@xiaohuizhang98 Can you please rebase? Or shall we close this pull request?

I'm very sorry I'm not very proficient in using git. I tried to rebase in my local repository. I don't know if this will work. If not, I'll re-submit a pull request. Thanks!

@hifoolno
Copy link
Contributor Author

@xiaohuizhang98 Can you please rebase? Or shall we close this pull request?

I resubmit a PR #15295
Thanks

@0xc0170 0xc0170 closed this Jun 23, 2022
@mergify mergify bot removed needs: review component: connectivity release-type: patch Indentifies a PR as containing just a patch labels Jun 23, 2022
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.